{-# 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.Update
(
AutoscalersUpdateResource
, autoscalersUpdate
, AutoscalersUpdate
, auRequestId
, auProject
, auZone
, auPayload
, auAutoscaler
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type AutoscalersUpdateResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"autoscalers" :>
QueryParam "requestId" Text :>
QueryParam "autoscaler" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Put '[JSON] Operation
data AutoscalersUpdate = AutoscalersUpdate'
{ _auRequestId :: !(Maybe Text)
, _auProject :: !Text
, _auZone :: !Text
, _auPayload :: !Autoscaler
, _auAutoscaler :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
autoscalersUpdate
:: Text
-> Text
-> Autoscaler
-> AutoscalersUpdate
autoscalersUpdate pAuProject_ pAuZone_ pAuPayload_ =
AutoscalersUpdate'
{ _auRequestId = Nothing
, _auProject = pAuProject_
, _auZone = pAuZone_
, _auPayload = pAuPayload_
, _auAutoscaler = Nothing
}
auRequestId :: Lens' AutoscalersUpdate (Maybe Text)
auRequestId
= lens _auRequestId (\ s a -> s{_auRequestId = a})
auProject :: Lens' AutoscalersUpdate Text
auProject
= lens _auProject (\ s a -> s{_auProject = a})
auZone :: Lens' AutoscalersUpdate Text
auZone = lens _auZone (\ s a -> s{_auZone = a})
auPayload :: Lens' AutoscalersUpdate Autoscaler
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
auAutoscaler :: Lens' AutoscalersUpdate (Maybe Text)
auAutoscaler
= lens _auAutoscaler (\ s a -> s{_auAutoscaler = a})
instance GoogleRequest AutoscalersUpdate where
type Rs AutoscalersUpdate = Operation
type Scopes AutoscalersUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient AutoscalersUpdate'{..}
= go _auProject _auZone _auRequestId _auAutoscaler
(Just AltJSON)
_auPayload
computeService
where go
= buildClient
(Proxy :: Proxy AutoscalersUpdateResource)
mempty