{-# 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.ServiceConsumerManagement.Services.TenancyUnits.AddProject
(
ServicesTenancyUnitsAddProjectResource
, servicesTenancyUnitsAddProject
, ServicesTenancyUnitsAddProject
, sParent
, sXgafv
, sUploadProtocol
, sAccessToken
, sUploadType
, sPayload
, sCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceConsumerManagement.Types
type ServicesTenancyUnitsAddProjectResource =
"v1" :>
CaptureMode "parent" "addProject" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AddTenantProjectRequest :>
Post '[JSON] Operation
data ServicesTenancyUnitsAddProject = ServicesTenancyUnitsAddProject'
{ _sParent :: !Text
, _sXgafv :: !(Maybe Xgafv)
, _sUploadProtocol :: !(Maybe Text)
, _sAccessToken :: !(Maybe Text)
, _sUploadType :: !(Maybe Text)
, _sPayload :: !AddTenantProjectRequest
, _sCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesTenancyUnitsAddProject
:: Text
-> AddTenantProjectRequest
-> ServicesTenancyUnitsAddProject
servicesTenancyUnitsAddProject pSParent_ pSPayload_ =
ServicesTenancyUnitsAddProject'
{ _sParent = pSParent_
, _sXgafv = Nothing
, _sUploadProtocol = Nothing
, _sAccessToken = Nothing
, _sUploadType = Nothing
, _sPayload = pSPayload_
, _sCallback = Nothing
}
sParent :: Lens' ServicesTenancyUnitsAddProject Text
sParent = lens _sParent (\ s a -> s{_sParent = a})
sXgafv :: Lens' ServicesTenancyUnitsAddProject (Maybe Xgafv)
sXgafv = lens _sXgafv (\ s a -> s{_sXgafv = a})
sUploadProtocol :: Lens' ServicesTenancyUnitsAddProject (Maybe Text)
sUploadProtocol
= lens _sUploadProtocol
(\ s a -> s{_sUploadProtocol = a})
sAccessToken :: Lens' ServicesTenancyUnitsAddProject (Maybe Text)
sAccessToken
= lens _sAccessToken (\ s a -> s{_sAccessToken = a})
sUploadType :: Lens' ServicesTenancyUnitsAddProject (Maybe Text)
sUploadType
= lens _sUploadType (\ s a -> s{_sUploadType = a})
sPayload :: Lens' ServicesTenancyUnitsAddProject AddTenantProjectRequest
sPayload = lens _sPayload (\ s a -> s{_sPayload = a})
sCallback :: Lens' ServicesTenancyUnitsAddProject (Maybe Text)
sCallback
= lens _sCallback (\ s a -> s{_sCallback = a})
instance GoogleRequest ServicesTenancyUnitsAddProject
where
type Rs ServicesTenancyUnitsAddProject = Operation
type Scopes ServicesTenancyUnitsAddProject =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ServicesTenancyUnitsAddProject'{..}
= go _sParent _sXgafv _sUploadProtocol _sAccessToken
_sUploadType
_sCallback
(Just AltJSON)
_sPayload
serviceConsumerManagementService
where go
= buildClient
(Proxy ::
Proxy ServicesTenancyUnitsAddProjectResource)
mempty