{-# 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.Insert
(
GroupsInsertResource
, groupsInsert
, GroupsInsert
, giPayload
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type GroupsInsertResource =
"admin" :>
"directory" :>
"v1" :>
"groups" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Post '[JSON] Group
newtype GroupsInsert =
GroupsInsert'
{ _giPayload :: Group
}
deriving (Eq, Show, Data, Typeable, Generic)
groupsInsert
:: Group
-> GroupsInsert
groupsInsert pGiPayload_ = GroupsInsert' {_giPayload = pGiPayload_}
giPayload :: Lens' GroupsInsert Group
giPayload
= lens _giPayload (\ s a -> s{_giPayload = a})
instance GoogleRequest GroupsInsert where
type Rs GroupsInsert = Group
type Scopes GroupsInsert =
'["https://www.googleapis.com/auth/admin.directory.group"]
requestClient GroupsInsert'{..}
= go (Just AltJSON) _giPayload directoryService
where go
= buildClient (Proxy :: Proxy GroupsInsertResource)
mempty