{-# 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.ServiceUsage.Services.BatchEnable
(
ServicesBatchEnableResource
, servicesBatchEnable
, ServicesBatchEnable
, sbeParent
, sbeXgafv
, sbeUploadProtocol
, sbeAccessToken
, sbeUploadType
, sbePayload
, sbeCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUsage.Types
type ServicesBatchEnableResource =
"v1" :>
Capture "parent" Text :>
"services:batchEnable" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchEnableServicesRequest :>
Post '[JSON] Operation
data ServicesBatchEnable = ServicesBatchEnable'
{ _sbeParent :: !Text
, _sbeXgafv :: !(Maybe Xgafv)
, _sbeUploadProtocol :: !(Maybe Text)
, _sbeAccessToken :: !(Maybe Text)
, _sbeUploadType :: !(Maybe Text)
, _sbePayload :: !BatchEnableServicesRequest
, _sbeCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesBatchEnable
:: Text
-> BatchEnableServicesRequest
-> ServicesBatchEnable
servicesBatchEnable pSbeParent_ pSbePayload_ =
ServicesBatchEnable'
{ _sbeParent = pSbeParent_
, _sbeXgafv = Nothing
, _sbeUploadProtocol = Nothing
, _sbeAccessToken = Nothing
, _sbeUploadType = Nothing
, _sbePayload = pSbePayload_
, _sbeCallback = Nothing
}
sbeParent :: Lens' ServicesBatchEnable Text
sbeParent
= lens _sbeParent (\ s a -> s{_sbeParent = a})
sbeXgafv :: Lens' ServicesBatchEnable (Maybe Xgafv)
sbeXgafv = lens _sbeXgafv (\ s a -> s{_sbeXgafv = a})
sbeUploadProtocol :: Lens' ServicesBatchEnable (Maybe Text)
sbeUploadProtocol
= lens _sbeUploadProtocol
(\ s a -> s{_sbeUploadProtocol = a})
sbeAccessToken :: Lens' ServicesBatchEnable (Maybe Text)
sbeAccessToken
= lens _sbeAccessToken
(\ s a -> s{_sbeAccessToken = a})
sbeUploadType :: Lens' ServicesBatchEnable (Maybe Text)
sbeUploadType
= lens _sbeUploadType
(\ s a -> s{_sbeUploadType = a})
sbePayload :: Lens' ServicesBatchEnable BatchEnableServicesRequest
sbePayload
= lens _sbePayload (\ s a -> s{_sbePayload = a})
sbeCallback :: Lens' ServicesBatchEnable (Maybe Text)
sbeCallback
= lens _sbeCallback (\ s a -> s{_sbeCallback = a})
instance GoogleRequest ServicesBatchEnable where
type Rs ServicesBatchEnable = Operation
type Scopes ServicesBatchEnable =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"]
requestClient ServicesBatchEnable'{..}
= go _sbeParent _sbeXgafv _sbeUploadProtocol
_sbeAccessToken
_sbeUploadType
_sbeCallback
(Just AltJSON)
_sbePayload
serviceUsageService
where go
= buildClient
(Proxy :: Proxy ServicesBatchEnableResource)
mempty