{-# 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.MonitoredResourceDescriptors.Get
(
ProjectsMonitoredResourceDescriptorsGetResource
, projectsMonitoredResourceDescriptorsGet
, ProjectsMonitoredResourceDescriptorsGet
, pmrdgXgafv
, pmrdgUploadProtocol
, pmrdgAccessToken
, pmrdgUploadType
, pmrdgName
, pmrdgCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsMonitoredResourceDescriptorsGetResource
=
"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] MonitoredResourceDescriptor
data ProjectsMonitoredResourceDescriptorsGet = ProjectsMonitoredResourceDescriptorsGet'
{ _pmrdgXgafv :: !(Maybe Xgafv)
, _pmrdgUploadProtocol :: !(Maybe Text)
, _pmrdgAccessToken :: !(Maybe Text)
, _pmrdgUploadType :: !(Maybe Text)
, _pmrdgName :: !Text
, _pmrdgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsMonitoredResourceDescriptorsGet
:: Text
-> ProjectsMonitoredResourceDescriptorsGet
projectsMonitoredResourceDescriptorsGet pPmrdgName_ =
ProjectsMonitoredResourceDescriptorsGet'
{ _pmrdgXgafv = Nothing
, _pmrdgUploadProtocol = Nothing
, _pmrdgAccessToken = Nothing
, _pmrdgUploadType = Nothing
, _pmrdgName = pPmrdgName_
, _pmrdgCallback = Nothing
}
pmrdgXgafv :: Lens' ProjectsMonitoredResourceDescriptorsGet (Maybe Xgafv)
pmrdgXgafv
= lens _pmrdgXgafv (\ s a -> s{_pmrdgXgafv = a})
pmrdgUploadProtocol :: Lens' ProjectsMonitoredResourceDescriptorsGet (Maybe Text)
pmrdgUploadProtocol
= lens _pmrdgUploadProtocol
(\ s a -> s{_pmrdgUploadProtocol = a})
pmrdgAccessToken :: Lens' ProjectsMonitoredResourceDescriptorsGet (Maybe Text)
pmrdgAccessToken
= lens _pmrdgAccessToken
(\ s a -> s{_pmrdgAccessToken = a})
pmrdgUploadType :: Lens' ProjectsMonitoredResourceDescriptorsGet (Maybe Text)
pmrdgUploadType
= lens _pmrdgUploadType
(\ s a -> s{_pmrdgUploadType = a})
pmrdgName :: Lens' ProjectsMonitoredResourceDescriptorsGet Text
pmrdgName
= lens _pmrdgName (\ s a -> s{_pmrdgName = a})
pmrdgCallback :: Lens' ProjectsMonitoredResourceDescriptorsGet (Maybe Text)
pmrdgCallback
= lens _pmrdgCallback
(\ s a -> s{_pmrdgCallback = a})
instance GoogleRequest
ProjectsMonitoredResourceDescriptorsGet where
type Rs ProjectsMonitoredResourceDescriptorsGet =
MonitoredResourceDescriptor
type Scopes ProjectsMonitoredResourceDescriptorsGet =
'["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
ProjectsMonitoredResourceDescriptorsGet'{..}
= go _pmrdgName _pmrdgXgafv _pmrdgUploadProtocol
_pmrdgAccessToken
_pmrdgUploadType
_pmrdgCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy ::
Proxy
ProjectsMonitoredResourceDescriptorsGetResource)
mempty