{-# 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.Memberships.Create
(
GroupsMembershipsCreateResource
, groupsMembershipsCreate
, GroupsMembershipsCreate
, gmcParent
, gmcXgafv
, gmcUploadProtocol
, gmcAccessToken
, gmcUploadType
, gmcPayload
, gmcCallback
) where
import Network.Google.CloudIdentity.Types
import Network.Google.Prelude
type GroupsMembershipsCreateResource =
"v1" :>
Capture "parent" Text :>
"memberships" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Membership :> Post '[JSON] Operation
data GroupsMembershipsCreate = GroupsMembershipsCreate'
{ _gmcParent :: !Text
, _gmcXgafv :: !(Maybe Xgafv)
, _gmcUploadProtocol :: !(Maybe Text)
, _gmcAccessToken :: !(Maybe Text)
, _gmcUploadType :: !(Maybe Text)
, _gmcPayload :: !Membership
, _gmcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
groupsMembershipsCreate
:: Text
-> Membership
-> GroupsMembershipsCreate
groupsMembershipsCreate pGmcParent_ pGmcPayload_ =
GroupsMembershipsCreate'
{ _gmcParent = pGmcParent_
, _gmcXgafv = Nothing
, _gmcUploadProtocol = Nothing
, _gmcAccessToken = Nothing
, _gmcUploadType = Nothing
, _gmcPayload = pGmcPayload_
, _gmcCallback = Nothing
}
gmcParent :: Lens' GroupsMembershipsCreate Text
gmcParent
= lens _gmcParent (\ s a -> s{_gmcParent = a})
gmcXgafv :: Lens' GroupsMembershipsCreate (Maybe Xgafv)
gmcXgafv = lens _gmcXgafv (\ s a -> s{_gmcXgafv = a})
gmcUploadProtocol :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcUploadProtocol
= lens _gmcUploadProtocol
(\ s a -> s{_gmcUploadProtocol = a})
gmcAccessToken :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcAccessToken
= lens _gmcAccessToken
(\ s a -> s{_gmcAccessToken = a})
gmcUploadType :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcUploadType
= lens _gmcUploadType
(\ s a -> s{_gmcUploadType = a})
gmcPayload :: Lens' GroupsMembershipsCreate Membership
gmcPayload
= lens _gmcPayload (\ s a -> s{_gmcPayload = a})
gmcCallback :: Lens' GroupsMembershipsCreate (Maybe Text)
gmcCallback
= lens _gmcCallback (\ s a -> s{_gmcCallback = a})
instance GoogleRequest GroupsMembershipsCreate where
type Rs GroupsMembershipsCreate = Operation
type Scopes GroupsMembershipsCreate = '[]
requestClient GroupsMembershipsCreate'{..}
= go _gmcParent _gmcXgafv _gmcUploadProtocol
_gmcAccessToken
_gmcUploadType
_gmcCallback
(Just AltJSON)
_gmcPayload
cloudIdentityService
where go
= buildClient
(Proxy :: Proxy GroupsMembershipsCreateResource)
mempty