{-# 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.Create
(
ServicesTenancyUnitsCreateResource
, servicesTenancyUnitsCreate
, ServicesTenancyUnitsCreate
, stucParent
, stucXgafv
, stucUploadProtocol
, stucAccessToken
, stucUploadType
, stucPayload
, stucCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceConsumerManagement.Types
type ServicesTenancyUnitsCreateResource =
"v1" :>
Capture "parent" Text :>
"tenancyUnits" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CreateTenancyUnitRequest :>
Post '[JSON] TenancyUnit
data ServicesTenancyUnitsCreate = ServicesTenancyUnitsCreate'
{ _stucParent :: !Text
, _stucXgafv :: !(Maybe Xgafv)
, _stucUploadProtocol :: !(Maybe Text)
, _stucAccessToken :: !(Maybe Text)
, _stucUploadType :: !(Maybe Text)
, _stucPayload :: !CreateTenancyUnitRequest
, _stucCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesTenancyUnitsCreate
:: Text
-> CreateTenancyUnitRequest
-> ServicesTenancyUnitsCreate
servicesTenancyUnitsCreate pStucParent_ pStucPayload_ =
ServicesTenancyUnitsCreate'
{ _stucParent = pStucParent_
, _stucXgafv = Nothing
, _stucUploadProtocol = Nothing
, _stucAccessToken = Nothing
, _stucUploadType = Nothing
, _stucPayload = pStucPayload_
, _stucCallback = Nothing
}
stucParent :: Lens' ServicesTenancyUnitsCreate Text
stucParent
= lens _stucParent (\ s a -> s{_stucParent = a})
stucXgafv :: Lens' ServicesTenancyUnitsCreate (Maybe Xgafv)
stucXgafv
= lens _stucXgafv (\ s a -> s{_stucXgafv = a})
stucUploadProtocol :: Lens' ServicesTenancyUnitsCreate (Maybe Text)
stucUploadProtocol
= lens _stucUploadProtocol
(\ s a -> s{_stucUploadProtocol = a})
stucAccessToken :: Lens' ServicesTenancyUnitsCreate (Maybe Text)
stucAccessToken
= lens _stucAccessToken
(\ s a -> s{_stucAccessToken = a})
stucUploadType :: Lens' ServicesTenancyUnitsCreate (Maybe Text)
stucUploadType
= lens _stucUploadType
(\ s a -> s{_stucUploadType = a})
stucPayload :: Lens' ServicesTenancyUnitsCreate CreateTenancyUnitRequest
stucPayload
= lens _stucPayload (\ s a -> s{_stucPayload = a})
stucCallback :: Lens' ServicesTenancyUnitsCreate (Maybe Text)
stucCallback
= lens _stucCallback (\ s a -> s{_stucCallback = a})
instance GoogleRequest ServicesTenancyUnitsCreate
where
type Rs ServicesTenancyUnitsCreate = TenancyUnit
type Scopes ServicesTenancyUnitsCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ServicesTenancyUnitsCreate'{..}
= go _stucParent _stucXgafv _stucUploadProtocol
_stucAccessToken
_stucUploadType
_stucCallback
(Just AltJSON)
_stucPayload
serviceConsumerManagementService
where go
= buildClient
(Proxy :: Proxy ServicesTenancyUnitsCreateResource)
mempty