{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.Monitoring.Projects.MetricDescriptors.Get
(
ProjectsMetricDescriptorsGetResource
, projectsMetricDescriptorsGet
, ProjectsMetricDescriptorsGet
, pmdgXgafv
, pmdgUploadProtocol
, pmdgAccessToken
, pmdgUploadType
, pmdgName
, pmdgCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsMetricDescriptorsGetResource =
"v3" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] MetricDescriptor
data ProjectsMetricDescriptorsGet = ProjectsMetricDescriptorsGet'
{ _pmdgXgafv :: !(Maybe Xgafv)
, _pmdgUploadProtocol :: !(Maybe Text)
, _pmdgAccessToken :: !(Maybe Text)
, _pmdgUploadType :: !(Maybe Text)
, _pmdgName :: !Text
, _pmdgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMetricDescriptorsGet
:: Text
-> ProjectsMetricDescriptorsGet
projectsMetricDescriptorsGet pPmdgName_ =
ProjectsMetricDescriptorsGet'
{ _pmdgXgafv = Nothing
, _pmdgUploadProtocol = Nothing
, _pmdgAccessToken = Nothing
, _pmdgUploadType = Nothing
, _pmdgName = pPmdgName_
, _pmdgCallback = Nothing
}
pmdgXgafv :: Lens' ProjectsMetricDescriptorsGet (Maybe Xgafv)
pmdgXgafv
= lens _pmdgXgafv (\ s a -> s{_pmdgXgafv = a})
pmdgUploadProtocol :: Lens' ProjectsMetricDescriptorsGet (Maybe Text)
pmdgUploadProtocol
= lens _pmdgUploadProtocol
(\ s a -> s{_pmdgUploadProtocol = a})
pmdgAccessToken :: Lens' ProjectsMetricDescriptorsGet (Maybe Text)
pmdgAccessToken
= lens _pmdgAccessToken
(\ s a -> s{_pmdgAccessToken = a})
pmdgUploadType :: Lens' ProjectsMetricDescriptorsGet (Maybe Text)
pmdgUploadType
= lens _pmdgUploadType
(\ s a -> s{_pmdgUploadType = a})
pmdgName :: Lens' ProjectsMetricDescriptorsGet Text
pmdgName = lens _pmdgName (\ s a -> s{_pmdgName = a})
pmdgCallback :: Lens' ProjectsMetricDescriptorsGet (Maybe Text)
pmdgCallback
= lens _pmdgCallback (\ s a -> s{_pmdgCallback = a})
instance GoogleRequest ProjectsMetricDescriptorsGet
where
type Rs ProjectsMetricDescriptorsGet =
MetricDescriptor
type Scopes ProjectsMetricDescriptorsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read",
"https://www.googleapis.com/auth/monitoring.write"]
requestClient ProjectsMetricDescriptorsGet'{..}
= go _pmdgName _pmdgXgafv _pmdgUploadProtocol
_pmdgAccessToken
_pmdgUploadType
_pmdgCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsMetricDescriptorsGetResource)
mempty