{-# 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.CloudIdentity.Groups.Patch
(
GroupsPatchResource
, groupsPatch
, GroupsPatch
, gpXgafv
, gpUploadProtocol
, gpUpdateMask
, gpAccessToken
, gpUploadType
, gpPayload
, gpName
, gpCallback
) where
import Network.Google.CloudIdentity.Types
import Network.Google.Prelude
type GroupsPatchResource =
"v1" :>
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] Group :> Patch '[JSON] Operation
data GroupsPatch = GroupsPatch'
{ _gpXgafv :: !(Maybe Xgafv)
, _gpUploadProtocol :: !(Maybe Text)
, _gpUpdateMask :: !(Maybe GFieldMask)
, _gpAccessToken :: !(Maybe Text)
, _gpUploadType :: !(Maybe Text)
, _gpPayload :: !Group
, _gpName :: !Text
, _gpCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupsPatch
:: Group
-> Text
-> GroupsPatch
groupsPatch pGpPayload_ pGpName_ =
GroupsPatch'
{ _gpXgafv = Nothing
, _gpUploadProtocol = Nothing
, _gpUpdateMask = Nothing
, _gpAccessToken = Nothing
, _gpUploadType = Nothing
, _gpPayload = pGpPayload_
, _gpName = pGpName_
, _gpCallback = Nothing
}
gpXgafv :: Lens' GroupsPatch (Maybe Xgafv)
gpXgafv = lens _gpXgafv (\ s a -> s{_gpXgafv = a})
gpUploadProtocol :: Lens' GroupsPatch (Maybe Text)
gpUploadProtocol
= lens _gpUploadProtocol
(\ s a -> s{_gpUploadProtocol = a})
gpUpdateMask :: Lens' GroupsPatch (Maybe GFieldMask)
gpUpdateMask
= lens _gpUpdateMask (\ s a -> s{_gpUpdateMask = a})
gpAccessToken :: Lens' GroupsPatch (Maybe Text)
gpAccessToken
= lens _gpAccessToken
(\ s a -> s{_gpAccessToken = a})
gpUploadType :: Lens' GroupsPatch (Maybe Text)
gpUploadType
= lens _gpUploadType (\ s a -> s{_gpUploadType = a})
gpPayload :: Lens' GroupsPatch Group
gpPayload
= lens _gpPayload (\ s a -> s{_gpPayload = a})
gpName :: Lens' GroupsPatch Text
gpName = lens _gpName (\ s a -> s{_gpName = a})
gpCallback :: Lens' GroupsPatch (Maybe Text)
gpCallback
= lens _gpCallback (\ s a -> s{_gpCallback = a})
instance GoogleRequest GroupsPatch where
type Rs GroupsPatch = Operation
type Scopes GroupsPatch = '[]
requestClient GroupsPatch'{..}
= go _gpName _gpXgafv _gpUploadProtocol _gpUpdateMask
_gpAccessToken
_gpUploadType
_gpCallback
(Just AltJSON)
_gpPayload
cloudIdentityService
where go
= buildClient (Proxy :: Proxy GroupsPatchResource)
mempty