{-# 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.Patch
(
ProjectsAlertPoliciesPatchResource
, projectsAlertPoliciesPatch
, ProjectsAlertPoliciesPatch
, pAppXgafv
, pAppUploadProtocol
, pAppUpdateMask
, pAppAccessToken
, pAppUploadType
, pAppPayload
, pAppName
, pAppCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsAlertPoliciesPatchResource =
"v3" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AlertPolicy :>
Patch '[JSON] AlertPolicy
data ProjectsAlertPoliciesPatch = ProjectsAlertPoliciesPatch'
{ _pAppXgafv :: !(Maybe Xgafv)
, _pAppUploadProtocol :: !(Maybe Text)
, _pAppUpdateMask :: !(Maybe GFieldMask)
, _pAppAccessToken :: !(Maybe Text)
, _pAppUploadType :: !(Maybe Text)
, _pAppPayload :: !AlertPolicy
, _pAppName :: !Text
, _pAppCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAlertPoliciesPatch
:: AlertPolicy
-> Text
-> ProjectsAlertPoliciesPatch
projectsAlertPoliciesPatch pPAppPayload_ pPAppName_ =
ProjectsAlertPoliciesPatch'
{ _pAppXgafv = Nothing
, _pAppUploadProtocol = Nothing
, _pAppUpdateMask = Nothing
, _pAppAccessToken = Nothing
, _pAppUploadType = Nothing
, _pAppPayload = pPAppPayload_
, _pAppName = pPAppName_
, _pAppCallback = Nothing
}
pAppXgafv :: Lens' ProjectsAlertPoliciesPatch (Maybe Xgafv)
pAppXgafv
= lens _pAppXgafv (\ s a -> s{_pAppXgafv = a})
pAppUploadProtocol :: Lens' ProjectsAlertPoliciesPatch (Maybe Text)
pAppUploadProtocol
= lens _pAppUploadProtocol
(\ s a -> s{_pAppUploadProtocol = a})
pAppUpdateMask :: Lens' ProjectsAlertPoliciesPatch (Maybe GFieldMask)
pAppUpdateMask
= lens _pAppUpdateMask
(\ s a -> s{_pAppUpdateMask = a})
pAppAccessToken :: Lens' ProjectsAlertPoliciesPatch (Maybe Text)
pAppAccessToken
= lens _pAppAccessToken
(\ s a -> s{_pAppAccessToken = a})
pAppUploadType :: Lens' ProjectsAlertPoliciesPatch (Maybe Text)
pAppUploadType
= lens _pAppUploadType
(\ s a -> s{_pAppUploadType = a})
pAppPayload :: Lens' ProjectsAlertPoliciesPatch AlertPolicy
pAppPayload
= lens _pAppPayload (\ s a -> s{_pAppPayload = a})
pAppName :: Lens' ProjectsAlertPoliciesPatch Text
pAppName = lens _pAppName (\ s a -> s{_pAppName = a})
pAppCallback :: Lens' ProjectsAlertPoliciesPatch (Maybe Text)
pAppCallback
= lens _pAppCallback (\ s a -> s{_pAppCallback = a})
instance GoogleRequest ProjectsAlertPoliciesPatch
where
type Rs ProjectsAlertPoliciesPatch = AlertPolicy
type Scopes ProjectsAlertPoliciesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsAlertPoliciesPatch'{..}
= go _pAppName _pAppXgafv _pAppUploadProtocol
_pAppUpdateMask
_pAppAccessToken
_pAppUploadType
_pAppCallback
(Just AltJSON)
_pAppPayload
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsAlertPoliciesPatchResource)
mempty