{-# 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.NotificationChannelDescriptors.Get
(
ProjectsNotificationChannelDescriptorsGetResource
, projectsNotificationChannelDescriptorsGet
, ProjectsNotificationChannelDescriptorsGet
, pncdgXgafv
, pncdgUploadProtocol
, pncdgAccessToken
, pncdgUploadType
, pncdgName
, pncdgCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsNotificationChannelDescriptorsGetResource
=
"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] NotificationChannelDescriptor
data ProjectsNotificationChannelDescriptorsGet = ProjectsNotificationChannelDescriptorsGet'
{ _pncdgXgafv :: !(Maybe Xgafv)
, _pncdgUploadProtocol :: !(Maybe Text)
, _pncdgAccessToken :: !(Maybe Text)
, _pncdgUploadType :: !(Maybe Text)
, _pncdgName :: !Text
, _pncdgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotificationChannelDescriptorsGet
:: Text
-> ProjectsNotificationChannelDescriptorsGet
projectsNotificationChannelDescriptorsGet pPncdgName_ =
ProjectsNotificationChannelDescriptorsGet'
{ _pncdgXgafv = Nothing
, _pncdgUploadProtocol = Nothing
, _pncdgAccessToken = Nothing
, _pncdgUploadType = Nothing
, _pncdgName = pPncdgName_
, _pncdgCallback = Nothing
}
pncdgXgafv :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Xgafv)
pncdgXgafv
= lens _pncdgXgafv (\ s a -> s{_pncdgXgafv = a})
pncdgUploadProtocol :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgUploadProtocol
= lens _pncdgUploadProtocol
(\ s a -> s{_pncdgUploadProtocol = a})
pncdgAccessToken :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgAccessToken
= lens _pncdgAccessToken
(\ s a -> s{_pncdgAccessToken = a})
pncdgUploadType :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgUploadType
= lens _pncdgUploadType
(\ s a -> s{_pncdgUploadType = a})
pncdgName :: Lens' ProjectsNotificationChannelDescriptorsGet Text
pncdgName
= lens _pncdgName (\ s a -> s{_pncdgName = a})
pncdgCallback :: Lens' ProjectsNotificationChannelDescriptorsGet (Maybe Text)
pncdgCallback
= lens _pncdgCallback
(\ s a -> s{_pncdgCallback = a})
instance GoogleRequest
ProjectsNotificationChannelDescriptorsGet where
type Rs ProjectsNotificationChannelDescriptorsGet =
NotificationChannelDescriptor
type Scopes ProjectsNotificationChannelDescriptorsGet
=
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read"]
requestClient
ProjectsNotificationChannelDescriptorsGet'{..}
= go _pncdgName _pncdgXgafv _pncdgUploadProtocol
_pncdgAccessToken
_pncdgUploadType
_pncdgCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy ::
Proxy
ProjectsNotificationChannelDescriptorsGetResource)
mempty