{-# 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.Insert
(
AutoscalersInsertResource
, autoscalersInsert
, AutoscalersInsert
, aiiRequestId
, aiiProject
, aiiZone
, aiiPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type AutoscalersInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"autoscalers" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Autoscaler :> Post '[JSON] Operation
data AutoscalersInsert = AutoscalersInsert'
{ _aiiRequestId :: !(Maybe Text)
, _aiiProject :: !Text
, _aiiZone :: !Text
, _aiiPayload :: !Autoscaler
} deriving (Eq,Show,Data,Typeable,Generic)
autoscalersInsert
:: Text
-> Text
-> Autoscaler
-> AutoscalersInsert
autoscalersInsert pAiiProject_ pAiiZone_ pAiiPayload_ =
AutoscalersInsert'
{ _aiiRequestId = Nothing
, _aiiProject = pAiiProject_
, _aiiZone = pAiiZone_
, _aiiPayload = pAiiPayload_
}
aiiRequestId :: Lens' AutoscalersInsert (Maybe Text)
aiiRequestId
= lens _aiiRequestId (\ s a -> s{_aiiRequestId = a})
aiiProject :: Lens' AutoscalersInsert Text
aiiProject
= lens _aiiProject (\ s a -> s{_aiiProject = a})
aiiZone :: Lens' AutoscalersInsert Text
aiiZone = lens _aiiZone (\ s a -> s{_aiiZone = a})
aiiPayload :: Lens' AutoscalersInsert Autoscaler
aiiPayload
= lens _aiiPayload (\ s a -> s{_aiiPayload = a})
instance GoogleRequest AutoscalersInsert where
type Rs AutoscalersInsert = Operation
type Scopes AutoscalersInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient AutoscalersInsert'{..}
= go _aiiProject _aiiZone _aiiRequestId
(Just AltJSON)
_aiiPayload
computeService
where go
= buildClient
(Proxy :: Proxy AutoscalersInsertResource)
mempty