{-# 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.ServiceUser.Projects.Services.Enable
(
ProjectsServicesEnableResource
, projectsServicesEnable
, ProjectsServicesEnable
, pseXgafv
, pseUploadProtocol
, pseAccessToken
, pseUploadType
, psePayload
, pseName
, pseCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUser.Types
type ProjectsServicesEnableResource =
"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 ProjectsServicesEnable = ProjectsServicesEnable'
{ _pseXgafv :: !(Maybe Xgafv)
, _pseUploadProtocol :: !(Maybe Text)
, _pseAccessToken :: !(Maybe Text)
, _pseUploadType :: !(Maybe Text)
, _psePayload :: !EnableServiceRequest
, _pseName :: !Text
, _pseCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServicesEnable
:: EnableServiceRequest
-> Text
-> ProjectsServicesEnable
projectsServicesEnable pPsePayload_ pPseName_ =
ProjectsServicesEnable'
{ _pseXgafv = Nothing
, _pseUploadProtocol = Nothing
, _pseAccessToken = Nothing
, _pseUploadType = Nothing
, _psePayload = pPsePayload_
, _pseName = pPseName_
, _pseCallback = Nothing
}
pseXgafv :: Lens' ProjectsServicesEnable (Maybe Xgafv)
pseXgafv = lens _pseXgafv (\ s a -> s{_pseXgafv = a})
pseUploadProtocol :: Lens' ProjectsServicesEnable (Maybe Text)
pseUploadProtocol
= lens _pseUploadProtocol
(\ s a -> s{_pseUploadProtocol = a})
pseAccessToken :: Lens' ProjectsServicesEnable (Maybe Text)
pseAccessToken
= lens _pseAccessToken
(\ s a -> s{_pseAccessToken = a})
pseUploadType :: Lens' ProjectsServicesEnable (Maybe Text)
pseUploadType
= lens _pseUploadType
(\ s a -> s{_pseUploadType = a})
psePayload :: Lens' ProjectsServicesEnable EnableServiceRequest
psePayload
= lens _psePayload (\ s a -> s{_psePayload = a})
pseName :: Lens' ProjectsServicesEnable Text
pseName = lens _pseName (\ s a -> s{_pseName = a})
pseCallback :: Lens' ProjectsServicesEnable (Maybe Text)
pseCallback
= lens _pseCallback (\ s a -> s{_pseCallback = a})
instance GoogleRequest ProjectsServicesEnable where
type Rs ProjectsServicesEnable = Operation
type Scopes ProjectsServicesEnable =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"]
requestClient ProjectsServicesEnable'{..}
= go _pseName _pseXgafv _pseUploadProtocol
_pseAccessToken
_pseUploadType
_pseCallback
(Just AltJSON)
_psePayload
serviceUserService
where go
= buildClient
(Proxy :: Proxy ProjectsServicesEnableResource)
mempty