{-# 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.AttachProject
(
ServicesTenancyUnitsAttachProjectResource
, servicesTenancyUnitsAttachProject
, ServicesTenancyUnitsAttachProject
, stuapXgafv
, stuapUploadProtocol
, stuapAccessToken
, stuapUploadType
, stuapPayload
, stuapName
, stuapCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceConsumerManagement.Types
type ServicesTenancyUnitsAttachProjectResource =
"v1" :>
CaptureMode "name" "attachProject" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AttachTenantProjectRequest :>
Post '[JSON] Operation
data ServicesTenancyUnitsAttachProject = ServicesTenancyUnitsAttachProject'
{ _stuapXgafv :: !(Maybe Xgafv)
, _stuapUploadProtocol :: !(Maybe Text)
, _stuapAccessToken :: !(Maybe Text)
, _stuapUploadType :: !(Maybe Text)
, _stuapPayload :: !AttachTenantProjectRequest
, _stuapName :: !Text
, _stuapCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesTenancyUnitsAttachProject
:: AttachTenantProjectRequest
-> Text
-> ServicesTenancyUnitsAttachProject
servicesTenancyUnitsAttachProject pStuapPayload_ pStuapName_ =
ServicesTenancyUnitsAttachProject'
{ _stuapXgafv = Nothing
, _stuapUploadProtocol = Nothing
, _stuapAccessToken = Nothing
, _stuapUploadType = Nothing
, _stuapPayload = pStuapPayload_
, _stuapName = pStuapName_
, _stuapCallback = Nothing
}
stuapXgafv :: Lens' ServicesTenancyUnitsAttachProject (Maybe Xgafv)
stuapXgafv
= lens _stuapXgafv (\ s a -> s{_stuapXgafv = a})
stuapUploadProtocol :: Lens' ServicesTenancyUnitsAttachProject (Maybe Text)
stuapUploadProtocol
= lens _stuapUploadProtocol
(\ s a -> s{_stuapUploadProtocol = a})
stuapAccessToken :: Lens' ServicesTenancyUnitsAttachProject (Maybe Text)
stuapAccessToken
= lens _stuapAccessToken
(\ s a -> s{_stuapAccessToken = a})
stuapUploadType :: Lens' ServicesTenancyUnitsAttachProject (Maybe Text)
stuapUploadType
= lens _stuapUploadType
(\ s a -> s{_stuapUploadType = a})
stuapPayload :: Lens' ServicesTenancyUnitsAttachProject AttachTenantProjectRequest
stuapPayload
= lens _stuapPayload (\ s a -> s{_stuapPayload = a})
stuapName :: Lens' ServicesTenancyUnitsAttachProject Text
stuapName
= lens _stuapName (\ s a -> s{_stuapName = a})
stuapCallback :: Lens' ServicesTenancyUnitsAttachProject (Maybe Text)
stuapCallback
= lens _stuapCallback
(\ s a -> s{_stuapCallback = a})
instance GoogleRequest
ServicesTenancyUnitsAttachProject where
type Rs ServicesTenancyUnitsAttachProject = Operation
type Scopes ServicesTenancyUnitsAttachProject =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ServicesTenancyUnitsAttachProject'{..}
= go _stuapName _stuapXgafv _stuapUploadProtocol
_stuapAccessToken
_stuapUploadType
_stuapCallback
(Just AltJSON)
_stuapPayload
serviceConsumerManagementService
where go
= buildClient
(Proxy ::
Proxy ServicesTenancyUnitsAttachProjectResource)
mempty