{-# 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.NotificationChannels.Get
(
ProjectsNotificationChannelsGetResource
, projectsNotificationChannelsGet
, ProjectsNotificationChannelsGet
, pncgXgafv
, pncgUploadProtocol
, pncgAccessToken
, pncgUploadType
, pncgName
, pncgCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsNotificationChannelsGetResource =
"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] NotificationChannel
data ProjectsNotificationChannelsGet = ProjectsNotificationChannelsGet'
{ _pncgXgafv :: !(Maybe Xgafv)
, _pncgUploadProtocol :: !(Maybe Text)
, _pncgAccessToken :: !(Maybe Text)
, _pncgUploadType :: !(Maybe Text)
, _pncgName :: !Text
, _pncgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotificationChannelsGet
:: Text
-> ProjectsNotificationChannelsGet
projectsNotificationChannelsGet pPncgName_ =
ProjectsNotificationChannelsGet'
{ _pncgXgafv = Nothing
, _pncgUploadProtocol = Nothing
, _pncgAccessToken = Nothing
, _pncgUploadType = Nothing
, _pncgName = pPncgName_
, _pncgCallback = Nothing
}
pncgXgafv :: Lens' ProjectsNotificationChannelsGet (Maybe Xgafv)
pncgXgafv
= lens _pncgXgafv (\ s a -> s{_pncgXgafv = a})
pncgUploadProtocol :: Lens' ProjectsNotificationChannelsGet (Maybe Text)
pncgUploadProtocol
= lens _pncgUploadProtocol
(\ s a -> s{_pncgUploadProtocol = a})
pncgAccessToken :: Lens' ProjectsNotificationChannelsGet (Maybe Text)
pncgAccessToken
= lens _pncgAccessToken
(\ s a -> s{_pncgAccessToken = a})
pncgUploadType :: Lens' ProjectsNotificationChannelsGet (Maybe Text)
pncgUploadType
= lens _pncgUploadType
(\ s a -> s{_pncgUploadType = a})
pncgName :: Lens' ProjectsNotificationChannelsGet Text
pncgName = lens _pncgName (\ s a -> s{_pncgName = a})
pncgCallback :: Lens' ProjectsNotificationChannelsGet (Maybe Text)
pncgCallback
= lens _pncgCallback (\ s a -> s{_pncgCallback = a})
instance GoogleRequest
ProjectsNotificationChannelsGet where
type Rs ProjectsNotificationChannelsGet =
NotificationChannel
type Scopes ProjectsNotificationChannelsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read"]
requestClient ProjectsNotificationChannelsGet'{..}
= go _pncgName _pncgXgafv _pncgUploadProtocol
_pncgAccessToken
_pncgUploadType
_pncgCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsNotificationChannelsGetResource)
mempty