{-# 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.Update
(
RegionAutoscalersUpdateResource
, regionAutoscalersUpdate
, RegionAutoscalersUpdate
, rauRequestId
, rauProject
, rauPayload
, rauAutoscaler
, rauRegion
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type RegionAutoscalersUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"regions" :>
Capture "region" Text :>
"autoscalers" :>
QueryParam "requestId" Text :>
QueryParam "autoscaler" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Put '[JSON] Operation
data RegionAutoscalersUpdate = RegionAutoscalersUpdate'
{ _rauRequestId :: !(Maybe Text)
, _rauProject :: !Text
, _rauPayload :: !Autoscaler
, _rauAutoscaler :: !(Maybe Text)
, _rauRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionAutoscalersUpdate
:: Text
-> Autoscaler
-> Text
-> RegionAutoscalersUpdate
regionAutoscalersUpdate pRauProject_ pRauPayload_ pRauRegion_ =
RegionAutoscalersUpdate'
{ _rauRequestId = Nothing
, _rauProject = pRauProject_
, _rauPayload = pRauPayload_
, _rauAutoscaler = Nothing
, _rauRegion = pRauRegion_
}
rauRequestId :: Lens' RegionAutoscalersUpdate (Maybe Text)
rauRequestId
= lens _rauRequestId (\ s a -> s{_rauRequestId = a})
rauProject :: Lens' RegionAutoscalersUpdate Text
rauProject
= lens _rauProject (\ s a -> s{_rauProject = a})
rauPayload :: Lens' RegionAutoscalersUpdate Autoscaler
rauPayload
= lens _rauPayload (\ s a -> s{_rauPayload = a})
rauAutoscaler :: Lens' RegionAutoscalersUpdate (Maybe Text)
rauAutoscaler
= lens _rauAutoscaler
(\ s a -> s{_rauAutoscaler = a})
rauRegion :: Lens' RegionAutoscalersUpdate Text
rauRegion
= lens _rauRegion (\ s a -> s{_rauRegion = a})
instance GoogleRequest RegionAutoscalersUpdate where
type Rs RegionAutoscalersUpdate = Operation
type Scopes RegionAutoscalersUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient RegionAutoscalersUpdate'{..}
= go _rauProject _rauRegion _rauRequestId
_rauAutoscaler
(Just AltJSON)
_rauPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionAutoscalersUpdateResource)
mempty