{-# 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.Update
(
GroupsUpdateResource
, groupsUpdate
, GroupsUpdate
, guPayload
, guGroupUniqueId
) where
import Network.Google.GroupsSettings.Types
import Network.Google.Prelude
type GroupsUpdateResource =
"groups" :>
"v1" :>
"groups" :>
Capture "groupUniqueId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Groups :> Put '[JSON] Groups
data GroupsUpdate = GroupsUpdate'
{ _guPayload :: !Groups
, _guGroupUniqueId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
groupsUpdate
:: Groups
-> Text
-> GroupsUpdate
groupsUpdate pGuPayload_ pGuGroupUniqueId_ =
GroupsUpdate'
{ _guPayload = pGuPayload_
, _guGroupUniqueId = pGuGroupUniqueId_
}
guPayload :: Lens' GroupsUpdate Groups
guPayload
= lens _guPayload (\ s a -> s{_guPayload = a})
guGroupUniqueId :: Lens' GroupsUpdate Text
guGroupUniqueId
= lens _guGroupUniqueId
(\ s a -> s{_guGroupUniqueId = a})
instance GoogleRequest GroupsUpdate where
type Rs GroupsUpdate = Groups
type Scopes GroupsUpdate =
'["https://www.googleapis.com/auth/apps.groups.settings"]
requestClient GroupsUpdate'{..}
= go _guGroupUniqueId (Just AltJSON) _guPayload
groupsSettingsService
where go
= buildClient (Proxy :: Proxy GroupsUpdateResource)
mempty