{-# 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.Patch
(
ProjectsNotificationChannelsPatchResource
, projectsNotificationChannelsPatch
, ProjectsNotificationChannelsPatch
, pncpXgafv
, pncpUploadProtocol
, pncpUpdateMask
, pncpAccessToken
, pncpUploadType
, pncpPayload
, pncpName
, pncpCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsNotificationChannelsPatchResource =
"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] NotificationChannel :>
Patch '[JSON] NotificationChannel
data ProjectsNotificationChannelsPatch = ProjectsNotificationChannelsPatch'
{ _pncpXgafv :: !(Maybe Xgafv)
, _pncpUploadProtocol :: !(Maybe Text)
, _pncpUpdateMask :: !(Maybe GFieldMask)
, _pncpAccessToken :: !(Maybe Text)
, _pncpUploadType :: !(Maybe Text)
, _pncpPayload :: !NotificationChannel
, _pncpName :: !Text
, _pncpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotificationChannelsPatch
:: NotificationChannel
-> Text
-> ProjectsNotificationChannelsPatch
projectsNotificationChannelsPatch pPncpPayload_ pPncpName_ =
ProjectsNotificationChannelsPatch'
{ _pncpXgafv = Nothing
, _pncpUploadProtocol = Nothing
, _pncpUpdateMask = Nothing
, _pncpAccessToken = Nothing
, _pncpUploadType = Nothing
, _pncpPayload = pPncpPayload_
, _pncpName = pPncpName_
, _pncpCallback = Nothing
}
pncpXgafv :: Lens' ProjectsNotificationChannelsPatch (Maybe Xgafv)
pncpXgafv
= lens _pncpXgafv (\ s a -> s{_pncpXgafv = a})
pncpUploadProtocol :: Lens' ProjectsNotificationChannelsPatch (Maybe Text)
pncpUploadProtocol
= lens _pncpUploadProtocol
(\ s a -> s{_pncpUploadProtocol = a})
pncpUpdateMask :: Lens' ProjectsNotificationChannelsPatch (Maybe GFieldMask)
pncpUpdateMask
= lens _pncpUpdateMask
(\ s a -> s{_pncpUpdateMask = a})
pncpAccessToken :: Lens' ProjectsNotificationChannelsPatch (Maybe Text)
pncpAccessToken
= lens _pncpAccessToken
(\ s a -> s{_pncpAccessToken = a})
pncpUploadType :: Lens' ProjectsNotificationChannelsPatch (Maybe Text)
pncpUploadType
= lens _pncpUploadType
(\ s a -> s{_pncpUploadType = a})
pncpPayload :: Lens' ProjectsNotificationChannelsPatch NotificationChannel
pncpPayload
= lens _pncpPayload (\ s a -> s{_pncpPayload = a})
pncpName :: Lens' ProjectsNotificationChannelsPatch Text
pncpName = lens _pncpName (\ s a -> s{_pncpName = a})
pncpCallback :: Lens' ProjectsNotificationChannelsPatch (Maybe Text)
pncpCallback
= lens _pncpCallback (\ s a -> s{_pncpCallback = a})
instance GoogleRequest
ProjectsNotificationChannelsPatch where
type Rs ProjectsNotificationChannelsPatch =
NotificationChannel
type Scopes ProjectsNotificationChannelsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsNotificationChannelsPatch'{..}
= go _pncpName _pncpXgafv _pncpUploadProtocol
_pncpUpdateMask
_pncpAccessToken
_pncpUploadType
_pncpCallback
(Just AltJSON)
_pncpPayload
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsNotificationChannelsPatchResource)
mempty