{-# 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.CloudIdentity.Groups.Create
(
GroupsCreateResource
, groupsCreate
, GroupsCreate
, gcXgafv
, gcUploadProtocol
, gcAccessToken
, gcUploadType
, gcPayload
, gcCallback
) where
import Network.Google.CloudIdentity.Types
import Network.Google.Prelude
type GroupsCreateResource =
"v1" :>
"groups" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Group :> Post '[JSON] Operation
data GroupsCreate = GroupsCreate'
{ _gcXgafv :: !(Maybe Xgafv)
, _gcUploadProtocol :: !(Maybe Text)
, _gcAccessToken :: !(Maybe Text)
, _gcUploadType :: !(Maybe Text)
, _gcPayload :: !Group
, _gcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupsCreate
:: Group
-> GroupsCreate
groupsCreate pGcPayload_ =
GroupsCreate'
{ _gcXgafv = Nothing
, _gcUploadProtocol = Nothing
, _gcAccessToken = Nothing
, _gcUploadType = Nothing
, _gcPayload = pGcPayload_
, _gcCallback = Nothing
}
gcXgafv :: Lens' GroupsCreate (Maybe Xgafv)
gcXgafv = lens _gcXgafv (\ s a -> s{_gcXgafv = a})
gcUploadProtocol :: Lens' GroupsCreate (Maybe Text)
gcUploadProtocol
= lens _gcUploadProtocol
(\ s a -> s{_gcUploadProtocol = a})
gcAccessToken :: Lens' GroupsCreate (Maybe Text)
gcAccessToken
= lens _gcAccessToken
(\ s a -> s{_gcAccessToken = a})
gcUploadType :: Lens' GroupsCreate (Maybe Text)
gcUploadType
= lens _gcUploadType (\ s a -> s{_gcUploadType = a})
gcPayload :: Lens' GroupsCreate Group
gcPayload
= lens _gcPayload (\ s a -> s{_gcPayload = a})
gcCallback :: Lens' GroupsCreate (Maybe Text)
gcCallback
= lens _gcCallback (\ s a -> s{_gcCallback = a})
instance GoogleRequest GroupsCreate where
type Rs GroupsCreate = Operation
type Scopes GroupsCreate = '[]
requestClient GroupsCreate'{..}
= go _gcXgafv _gcUploadProtocol _gcAccessToken
_gcUploadType
_gcCallback
(Just AltJSON)
_gcPayload
cloudIdentityService
where go
= buildClient (Proxy :: Proxy GroupsCreateResource)
mempty