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