{-# 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.AlertPolicies.Get
(
ProjectsAlertPoliciesGetResource
, projectsAlertPoliciesGet
, ProjectsAlertPoliciesGet
, papgXgafv
, papgUploadProtocol
, papgAccessToken
, papgUploadType
, papgName
, papgCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsAlertPoliciesGetResource =
"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] AlertPolicy
data ProjectsAlertPoliciesGet = ProjectsAlertPoliciesGet'
{ _papgXgafv :: !(Maybe Xgafv)
, _papgUploadProtocol :: !(Maybe Text)
, _papgAccessToken :: !(Maybe Text)
, _papgUploadType :: !(Maybe Text)
, _papgName :: !Text
, _papgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAlertPoliciesGet
:: Text
-> ProjectsAlertPoliciesGet
projectsAlertPoliciesGet pPapgName_ =
ProjectsAlertPoliciesGet'
{ _papgXgafv = Nothing
, _papgUploadProtocol = Nothing
, _papgAccessToken = Nothing
, _papgUploadType = Nothing
, _papgName = pPapgName_
, _papgCallback = Nothing
}
papgXgafv :: Lens' ProjectsAlertPoliciesGet (Maybe Xgafv)
papgXgafv
= lens _papgXgafv (\ s a -> s{_papgXgafv = a})
papgUploadProtocol :: Lens' ProjectsAlertPoliciesGet (Maybe Text)
papgUploadProtocol
= lens _papgUploadProtocol
(\ s a -> s{_papgUploadProtocol = a})
papgAccessToken :: Lens' ProjectsAlertPoliciesGet (Maybe Text)
papgAccessToken
= lens _papgAccessToken
(\ s a -> s{_papgAccessToken = a})
papgUploadType :: Lens' ProjectsAlertPoliciesGet (Maybe Text)
papgUploadType
= lens _papgUploadType
(\ s a -> s{_papgUploadType = a})
papgName :: Lens' ProjectsAlertPoliciesGet Text
papgName = lens _papgName (\ s a -> s{_papgName = a})
papgCallback :: Lens' ProjectsAlertPoliciesGet (Maybe Text)
papgCallback
= lens _papgCallback (\ s a -> s{_papgCallback = a})
instance GoogleRequest ProjectsAlertPoliciesGet where
type Rs ProjectsAlertPoliciesGet = AlertPolicy
type Scopes ProjectsAlertPoliciesGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/monitoring.read"]
requestClient ProjectsAlertPoliciesGet'{..}
= go _papgName _papgXgafv _papgUploadProtocol
_papgAccessToken
_papgUploadType
_papgCallback
(Just AltJSON)
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsAlertPoliciesGetResource)
mempty