{-# 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.Disable
(
ProjectsServicesDisableResource
, projectsServicesDisable
, ProjectsServicesDisable
, psdXgafv
, psdUploadProtocol
, psdAccessToken
, psdUploadType
, psdPayload
, psdName
, psdCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUser.Types
type ProjectsServicesDisableResource =
"v1" :>
CaptureMode "name" "disable" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DisableServiceRequest :>
Post '[JSON] Operation
data ProjectsServicesDisable = ProjectsServicesDisable'
{ _psdXgafv :: !(Maybe Xgafv)
, _psdUploadProtocol :: !(Maybe Text)
, _psdAccessToken :: !(Maybe Text)
, _psdUploadType :: !(Maybe Text)
, _psdPayload :: !DisableServiceRequest
, _psdName :: !Text
, _psdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsServicesDisable
:: DisableServiceRequest
-> Text
-> ProjectsServicesDisable
projectsServicesDisable pPsdPayload_ pPsdName_ =
ProjectsServicesDisable'
{ _psdXgafv = Nothing
, _psdUploadProtocol = Nothing
, _psdAccessToken = Nothing
, _psdUploadType = Nothing
, _psdPayload = pPsdPayload_
, _psdName = pPsdName_
, _psdCallback = Nothing
}
psdXgafv :: Lens' ProjectsServicesDisable (Maybe Xgafv)
psdXgafv = lens _psdXgafv (\ s a -> s{_psdXgafv = a})
psdUploadProtocol :: Lens' ProjectsServicesDisable (Maybe Text)
psdUploadProtocol
= lens _psdUploadProtocol
(\ s a -> s{_psdUploadProtocol = a})
psdAccessToken :: Lens' ProjectsServicesDisable (Maybe Text)
psdAccessToken
= lens _psdAccessToken
(\ s a -> s{_psdAccessToken = a})
psdUploadType :: Lens' ProjectsServicesDisable (Maybe Text)
psdUploadType
= lens _psdUploadType
(\ s a -> s{_psdUploadType = a})
psdPayload :: Lens' ProjectsServicesDisable DisableServiceRequest
psdPayload
= lens _psdPayload (\ s a -> s{_psdPayload = a})
psdName :: Lens' ProjectsServicesDisable Text
psdName = lens _psdName (\ s a -> s{_psdName = a})
psdCallback :: Lens' ProjectsServicesDisable (Maybe Text)
psdCallback
= lens _psdCallback (\ s a -> s{_psdCallback = a})
instance GoogleRequest ProjectsServicesDisable where
type Rs ProjectsServicesDisable = Operation
type Scopes ProjectsServicesDisable =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"]
requestClient ProjectsServicesDisable'{..}
= go _psdName _psdXgafv _psdUploadProtocol
_psdAccessToken
_psdUploadType
_psdCallback
(Just AltJSON)
_psdPayload
serviceUserService
where go
= buildClient
(Proxy :: Proxy ProjectsServicesDisableResource)
mempty