{-# 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
-- | Create Group
--
-- /See:/ 'groupsInsert' smart constructor.
newtype GroupsInsert = GroupsInsert'
{ _giPayload :: Group
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'GroupsInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'giPayload'
groupsInsert
:: Group -- ^ 'giPayload'
-> GroupsInsert
groupsInsert pGiPayload_ =
GroupsInsert'
{ _giPayload = pGiPayload_
}
-- | Multipart request metadata.
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