module Network.Google.Resource.Compute.RegionAutoscalers.Patch
(
RegionAutoscalersPatchResource
, regionAutoscalersPatch
, RegionAutoscalersPatch
, 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 "autoscaler" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Patch '[JSON] Operation
data RegionAutoscalersPatch = RegionAutoscalersPatch'
{ _rapProject :: !Text
, _rapPayload :: !Autoscaler
, _rapAutoscaler :: !Text
, _rapRegion :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
regionAutoscalersPatch
:: Text
-> Autoscaler
-> Text
-> Text
-> RegionAutoscalersPatch
regionAutoscalersPatch pRapProject_ pRapPayload_ pRapAutoscaler_ pRapRegion_ =
RegionAutoscalersPatch'
{ _rapProject = pRapProject_
, _rapPayload = pRapPayload_
, _rapAutoscaler = pRapAutoscaler_
, _rapRegion = pRapRegion_
}
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 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 (Just _rapAutoscaler)
(Just AltJSON)
_rapPayload
computeService
where go
= buildClient
(Proxy :: Proxy RegionAutoscalersPatchResource)
mempty