{-# 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.GroupsSettings.Groups.Patch
(
GroupsPatchResource
, groupsPatch
, GroupsPatch
, gpPayload
, gpGroupUniqueId
) where
import Network.Google.GroupsSettings.Types
import Network.Google.Prelude
type GroupsPatchResource =
"groups" :>
"v1" :>
"groups" :>
Capture "groupUniqueId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Groups :> Patch '[JSON] Groups
data GroupsPatch =
GroupsPatch'
{ _gpPayload :: !Groups
, _gpGroupUniqueId :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
groupsPatch
:: Groups
-> Text
-> GroupsPatch
groupsPatch pGpPayload_ pGpGroupUniqueId_ =
GroupsPatch' {_gpPayload = pGpPayload_, _gpGroupUniqueId = pGpGroupUniqueId_}
gpPayload :: Lens' GroupsPatch Groups
gpPayload
= lens _gpPayload (\ s a -> s{_gpPayload = a})
gpGroupUniqueId :: Lens' GroupsPatch Text
gpGroupUniqueId
= lens _gpGroupUniqueId
(\ s a -> s{_gpGroupUniqueId = a})
instance GoogleRequest GroupsPatch where
type Rs GroupsPatch = Groups
type Scopes GroupsPatch =
'["https://www.googleapis.com/auth/apps.groups.settings"]
requestClient GroupsPatch'{..}
= go _gpGroupUniqueId (Just AltJSON) _gpPayload
groupsSettingsService
where go
= buildClient (Proxy :: Proxy GroupsPatchResource)
mempty