{-# 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.Compute.Autoscalers.Patch
(
AutoscalersPatchResource
, autoscalersPatch
, AutoscalersPatch
, apRequestId
, apProject
, apZone
, apPayload
, apAutoscaler
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type AutoscalersPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"autoscalers" :>
QueryParam "requestId" Text :>
QueryParam "autoscaler" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Patch '[JSON] Operation
data AutoscalersPatch = AutoscalersPatch'
{ _apRequestId :: !(Maybe Text)
, _apProject :: !Text
, _apZone :: !Text
, _apPayload :: !Autoscaler
, _apAutoscaler :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
autoscalersPatch
:: Text
-> Text
-> Autoscaler
-> AutoscalersPatch
autoscalersPatch pApProject_ pApZone_ pApPayload_ =
AutoscalersPatch'
{ _apRequestId = Nothing
, _apProject = pApProject_
, _apZone = pApZone_
, _apPayload = pApPayload_
, _apAutoscaler = Nothing
}
apRequestId :: Lens' AutoscalersPatch (Maybe Text)
apRequestId
= lens _apRequestId (\ s a -> s{_apRequestId = a})
apProject :: Lens' AutoscalersPatch Text
apProject
= lens _apProject (\ s a -> s{_apProject = a})
apZone :: Lens' AutoscalersPatch Text
apZone = lens _apZone (\ s a -> s{_apZone = a})
apPayload :: Lens' AutoscalersPatch Autoscaler
apPayload
= lens _apPayload (\ s a -> s{_apPayload = a})
apAutoscaler :: Lens' AutoscalersPatch (Maybe Text)
apAutoscaler
= lens _apAutoscaler (\ s a -> s{_apAutoscaler = a})
instance GoogleRequest AutoscalersPatch where
type Rs AutoscalersPatch = Operation
type Scopes AutoscalersPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient AutoscalersPatch'{..}
= go _apProject _apZone _apRequestId _apAutoscaler
(Just AltJSON)
_apPayload
computeService
where go
= buildClient
(Proxy :: Proxy AutoscalersPatchResource)
mempty