{-# 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.RegionAutoscalers.Patch
(
RegionAutoscalersPatchResource
, regionAutoscalersPatch
, RegionAutoscalersPatch
, rapRequestId
, rapProject
, rapPayload
, rapAutoscaler
, rapRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionAutoscalersPatchResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"autoscalers" :>
QueryParam "requestId" Text :>
QueryParam "autoscaler" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Patch '[JSON] Operation
data RegionAutoscalersPatch = RegionAutoscalersPatch'
{ _rapRequestId :: !(Maybe Text)
, _rapProject :: !Text
, _rapPayload :: !Autoscaler
, _rapAutoscaler :: !(Maybe Text)
, _rapRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionAutoscalersPatch
:: Text
-> Autoscaler
-> Text
-> RegionAutoscalersPatch
regionAutoscalersPatch pRapProject_ pRapPayload_ pRapRegion_ =
RegionAutoscalersPatch'
{ _rapRequestId = Nothing
, _rapProject = pRapProject_
, _rapPayload = pRapPayload_
, _rapAutoscaler = Nothing
, _rapRegion = pRapRegion_
}
rapRequestId :: Lens' RegionAutoscalersPatch (Maybe Text)
rapRequestId
= lens _rapRequestId (\ s a -> s{_rapRequestId = a})
rapProject :: Lens' RegionAutoscalersPatch Text
rapProject
= lens _rapProject (\ s a -> s{_rapProject = a})
rapPayload :: Lens' RegionAutoscalersPatch Autoscaler
rapPayload
= lens _rapPayload (\ s a -> s{_rapPayload = a})
rapAutoscaler :: Lens' RegionAutoscalersPatch (Maybe Text)
rapAutoscaler
= lens _rapAutoscaler
(\ s a -> s{_rapAutoscaler = a})
rapRegion :: Lens' RegionAutoscalersPatch Text
rapRegion
= lens _rapRegion (\ s a -> s{_rapRegion = a})
instance GoogleRequest RegionAutoscalersPatch where
type Rs RegionAutoscalersPatch = Operation
type Scopes RegionAutoscalersPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionAutoscalersPatch'{..}
= go _rapProject _rapRegion _rapRequestId
_rapAutoscaler
(Just AltJSON)
_rapPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionAutoscalersPatchResource)
mempty