{-# 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.Enable
(
ServicesEnableResource
, servicesEnable
, ServicesEnable
, seXgafv
, seUploadProtocol
, seAccessToken
, seUploadType
, sePayload
, seName
, seCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUsage.Types
type ServicesEnableResource =
"v1" :>
CaptureMode "name" "enable" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EnableServiceRequest :>
Post '[JSON] Operation
data ServicesEnable = ServicesEnable'
{ _seXgafv :: !(Maybe Xgafv)
, _seUploadProtocol :: !(Maybe Text)
, _seAccessToken :: !(Maybe Text)
, _seUploadType :: !(Maybe Text)
, _sePayload :: !EnableServiceRequest
, _seName :: !Text
, _seCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesEnable
:: EnableServiceRequest
-> Text
-> ServicesEnable
servicesEnable pSePayload_ pSeName_ =
ServicesEnable'
{ _seXgafv = Nothing
, _seUploadProtocol = Nothing
, _seAccessToken = Nothing
, _seUploadType = Nothing
, _sePayload = pSePayload_
, _seName = pSeName_
, _seCallback = Nothing
}
seXgafv :: Lens' ServicesEnable (Maybe Xgafv)
seXgafv = lens _seXgafv (\ s a -> s{_seXgafv = a})
seUploadProtocol :: Lens' ServicesEnable (Maybe Text)
seUploadProtocol
= lens _seUploadProtocol
(\ s a -> s{_seUploadProtocol = a})
seAccessToken :: Lens' ServicesEnable (Maybe Text)
seAccessToken
= lens _seAccessToken
(\ s a -> s{_seAccessToken = a})
seUploadType :: Lens' ServicesEnable (Maybe Text)
seUploadType
= lens _seUploadType (\ s a -> s{_seUploadType = a})
sePayload :: Lens' ServicesEnable EnableServiceRequest
sePayload
= lens _sePayload (\ s a -> s{_sePayload = a})
seName :: Lens' ServicesEnable Text
seName = lens _seName (\ s a -> s{_seName = a})
seCallback :: Lens' ServicesEnable (Maybe Text)
seCallback
= lens _seCallback (\ s a -> s{_seCallback = a})
instance GoogleRequest ServicesEnable where
type Rs ServicesEnable = Operation
type Scopes ServicesEnable =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"]
requestClient ServicesEnable'{..}
= go _seName _seXgafv _seUploadProtocol
_seAccessToken
_seUploadType
_seCallback
(Just AltJSON)
_sePayload
serviceUsageService
where go
= buildClient (Proxy :: Proxy ServicesEnableResource)
mempty