{-# 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.UptimeCheckConfigs.Patch
(
ProjectsUptimeCheckConfigsPatchResource
, projectsUptimeCheckConfigsPatch
, ProjectsUptimeCheckConfigsPatch
, puccpXgafv
, puccpUploadProtocol
, puccpUpdateMask
, puccpAccessToken
, puccpUploadType
, puccpPayload
, puccpName
, puccpCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsUptimeCheckConfigsPatchResource =
"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] UptimeCheckConfig :>
Patch '[JSON] UptimeCheckConfig
data ProjectsUptimeCheckConfigsPatch = ProjectsUptimeCheckConfigsPatch'
{ _puccpXgafv :: !(Maybe Xgafv)
, _puccpUploadProtocol :: !(Maybe Text)
, _puccpUpdateMask :: !(Maybe GFieldMask)
, _puccpAccessToken :: !(Maybe Text)
, _puccpUploadType :: !(Maybe Text)
, _puccpPayload :: !UptimeCheckConfig
, _puccpName :: !Text
, _puccpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsUptimeCheckConfigsPatch
:: UptimeCheckConfig
-> Text
-> ProjectsUptimeCheckConfigsPatch
projectsUptimeCheckConfigsPatch pPuccpPayload_ pPuccpName_ =
ProjectsUptimeCheckConfigsPatch'
{ _puccpXgafv = Nothing
, _puccpUploadProtocol = Nothing
, _puccpUpdateMask = Nothing
, _puccpAccessToken = Nothing
, _puccpUploadType = Nothing
, _puccpPayload = pPuccpPayload_
, _puccpName = pPuccpName_
, _puccpCallback = Nothing
}
puccpXgafv :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe Xgafv)
puccpXgafv
= lens _puccpXgafv (\ s a -> s{_puccpXgafv = a})
puccpUploadProtocol :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe Text)
puccpUploadProtocol
= lens _puccpUploadProtocol
(\ s a -> s{_puccpUploadProtocol = a})
puccpUpdateMask :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe GFieldMask)
puccpUpdateMask
= lens _puccpUpdateMask
(\ s a -> s{_puccpUpdateMask = a})
puccpAccessToken :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe Text)
puccpAccessToken
= lens _puccpAccessToken
(\ s a -> s{_puccpAccessToken = a})
puccpUploadType :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe Text)
puccpUploadType
= lens _puccpUploadType
(\ s a -> s{_puccpUploadType = a})
puccpPayload :: Lens' ProjectsUptimeCheckConfigsPatch UptimeCheckConfig
puccpPayload
= lens _puccpPayload (\ s a -> s{_puccpPayload = a})
puccpName :: Lens' ProjectsUptimeCheckConfigsPatch Text
puccpName
= lens _puccpName (\ s a -> s{_puccpName = a})
puccpCallback :: Lens' ProjectsUptimeCheckConfigsPatch (Maybe Text)
puccpCallback
= lens _puccpCallback
(\ s a -> s{_puccpCallback = a})
instance GoogleRequest
ProjectsUptimeCheckConfigsPatch where
type Rs ProjectsUptimeCheckConfigsPatch =
UptimeCheckConfig
type Scopes ProjectsUptimeCheckConfigsPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsUptimeCheckConfigsPatch'{..}
= go _puccpName _puccpXgafv _puccpUploadProtocol
_puccpUpdateMask
_puccpAccessToken
_puccpUploadType
_puccpCallback
(Just AltJSON)
_puccpPayload
monitoringService
where go
= buildClient
(Proxy ::
Proxy ProjectsUptimeCheckConfigsPatchResource)
mempty