{-# 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.Groups.Update
(
ProjectsGroupsUpdateResource
, projectsGroupsUpdate
, ProjectsGroupsUpdate
, pguXgafv
, pguValidateOnly
, pguUploadProtocol
, pguAccessToken
, pguUploadType
, pguPayload
, pguName
, pguCallback
) where
import Network.Google.Monitoring.Types
import Network.Google.Prelude
type ProjectsGroupsUpdateResource =
"v3" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "validateOnly" Bool :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Put '[JSON] Group
data ProjectsGroupsUpdate = ProjectsGroupsUpdate'
{ _pguXgafv :: !(Maybe Xgafv)
, _pguValidateOnly :: !(Maybe Bool)
, _pguUploadProtocol :: !(Maybe Text)
, _pguAccessToken :: !(Maybe Text)
, _pguUploadType :: !(Maybe Text)
, _pguPayload :: !Group
, _pguName :: !Text
, _pguCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsGroupsUpdate
:: Group
-> Text
-> ProjectsGroupsUpdate
projectsGroupsUpdate pPguPayload_ pPguName_ =
ProjectsGroupsUpdate'
{ _pguXgafv = Nothing
, _pguValidateOnly = Nothing
, _pguUploadProtocol = Nothing
, _pguAccessToken = Nothing
, _pguUploadType = Nothing
, _pguPayload = pPguPayload_
, _pguName = pPguName_
, _pguCallback = Nothing
}
pguXgafv :: Lens' ProjectsGroupsUpdate (Maybe Xgafv)
pguXgafv = lens _pguXgafv (\ s a -> s{_pguXgafv = a})
pguValidateOnly :: Lens' ProjectsGroupsUpdate (Maybe Bool)
pguValidateOnly
= lens _pguValidateOnly
(\ s a -> s{_pguValidateOnly = a})
pguUploadProtocol :: Lens' ProjectsGroupsUpdate (Maybe Text)
pguUploadProtocol
= lens _pguUploadProtocol
(\ s a -> s{_pguUploadProtocol = a})
pguAccessToken :: Lens' ProjectsGroupsUpdate (Maybe Text)
pguAccessToken
= lens _pguAccessToken
(\ s a -> s{_pguAccessToken = a})
pguUploadType :: Lens' ProjectsGroupsUpdate (Maybe Text)
pguUploadType
= lens _pguUploadType
(\ s a -> s{_pguUploadType = a})
pguPayload :: Lens' ProjectsGroupsUpdate Group
pguPayload
= lens _pguPayload (\ s a -> s{_pguPayload = a})
pguName :: Lens' ProjectsGroupsUpdate Text
pguName = lens _pguName (\ s a -> s{_pguName = a})
pguCallback :: Lens' ProjectsGroupsUpdate (Maybe Text)
pguCallback
= lens _pguCallback (\ s a -> s{_pguCallback = a})
instance GoogleRequest ProjectsGroupsUpdate where
type Rs ProjectsGroupsUpdate = Group
type Scopes ProjectsGroupsUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/monitoring"]
requestClient ProjectsGroupsUpdate'{..}
= go _pguName _pguXgafv _pguValidateOnly
_pguUploadProtocol
_pguAccessToken
_pguUploadType
_pguCallback
(Just AltJSON)
_pguPayload
monitoringService
where go
= buildClient
(Proxy :: Proxy ProjectsGroupsUpdateResource)
mempty