{-# 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.Patch
(
GroupsPatchResource
, groupsPatch
, GroupsPatch
, gpGroupKey
, gpPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type GroupsPatchResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
Capture "groupKey" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Patch '[JSON] Group
data GroupsPatch = GroupsPatch'
{ _gpGroupKey :: !Text
, _gpPayload :: !Group
} deriving (Eq,Show,Data,Typeable,Generic)
groupsPatch
:: Text
-> Group
-> GroupsPatch
groupsPatch pGpGroupKey_ pGpPayload_ =
GroupsPatch'
{ _gpGroupKey = pGpGroupKey_
, _gpPayload = pGpPayload_
}
gpGroupKey :: Lens' GroupsPatch Text
gpGroupKey
= lens _gpGroupKey (\ s a -> s{_gpGroupKey = a})
gpPayload :: Lens' GroupsPatch Group
gpPayload
= lens _gpPayload (\ s a -> s{_gpPayload = a})
instance GoogleRequest GroupsPatch where
type Rs GroupsPatch = Group
type Scopes GroupsPatch =
'["https://www.googleapis.com/auth/admin.directory.group"]
requestClient GroupsPatch'{..}
= go _gpGroupKey (Just AltJSON) _gpPayload
directoryService
where go
= buildClient (Proxy :: Proxy GroupsPatchResource)
mempty