{-# 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.Disable
(
ServicesDisableResource
, servicesDisable
, ServicesDisable
, sdXgafv
, sdUploadProtocol
, sdAccessToken
, sdUploadType
, sdPayload
, sdName
, sdCallback
) where
import Network.Google.Prelude
import Network.Google.ServiceUsage.Types
type ServicesDisableResource =
"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 ServicesDisable = ServicesDisable'
{ _sdXgafv :: !(Maybe Xgafv)
, _sdUploadProtocol :: !(Maybe Text)
, _sdAccessToken :: !(Maybe Text)
, _sdUploadType :: !(Maybe Text)
, _sdPayload :: !DisableServiceRequest
, _sdName :: !Text
, _sdCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
servicesDisable
:: DisableServiceRequest
-> Text
-> ServicesDisable
servicesDisable pSdPayload_ pSdName_ =
ServicesDisable'
{ _sdXgafv = Nothing
, _sdUploadProtocol = Nothing
, _sdAccessToken = Nothing
, _sdUploadType = Nothing
, _sdPayload = pSdPayload_
, _sdName = pSdName_
, _sdCallback = Nothing
}
sdXgafv :: Lens' ServicesDisable (Maybe Xgafv)
sdXgafv = lens _sdXgafv (\ s a -> s{_sdXgafv = a})
sdUploadProtocol :: Lens' ServicesDisable (Maybe Text)
sdUploadProtocol
= lens _sdUploadProtocol
(\ s a -> s{_sdUploadProtocol = a})
sdAccessToken :: Lens' ServicesDisable (Maybe Text)
sdAccessToken
= lens _sdAccessToken
(\ s a -> s{_sdAccessToken = a})
sdUploadType :: Lens' ServicesDisable (Maybe Text)
sdUploadType
= lens _sdUploadType (\ s a -> s{_sdUploadType = a})
sdPayload :: Lens' ServicesDisable DisableServiceRequest
sdPayload
= lens _sdPayload (\ s a -> s{_sdPayload = a})
sdName :: Lens' ServicesDisable Text
sdName = lens _sdName (\ s a -> s{_sdName = a})
sdCallback :: Lens' ServicesDisable (Maybe Text)
sdCallback
= lens _sdCallback (\ s a -> s{_sdCallback = a})
instance GoogleRequest ServicesDisable where
type Rs ServicesDisable = Operation
type Scopes ServicesDisable =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/service.management"]
requestClient ServicesDisable'{..}
= go _sdName _sdXgafv _sdUploadProtocol
_sdAccessToken
_sdUploadType
_sdCallback
(Just AltJSON)
_sdPayload
serviceUsageService
where go
= buildClient
(Proxy :: Proxy ServicesDisableResource)
mempty