{-# 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.ReplicaPoolUpdater.RollingUpdates.Insert
(
RollingUpdatesInsertResource
, rollingUpdatesInsert
, RollingUpdatesInsert
, ruiProject
, ruiZone
, ruiPayload
) where
import Network.Google.Prelude
import Network.Google.ReplicaPoolUpdater.Types
type RollingUpdatesInsertResource =
"replicapoolupdater" :>
"v1beta1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"rollingUpdates" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] RollingUpdate :>
Post '[JSON] Operation
data RollingUpdatesInsert = RollingUpdatesInsert'
{ _ruiProject :: !Text
, _ruiZone :: !Text
, _ruiPayload :: !RollingUpdate
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdatesInsert
:: Text
-> Text
-> RollingUpdate
-> RollingUpdatesInsert
rollingUpdatesInsert pRuiProject_ pRuiZone_ pRuiPayload_ =
RollingUpdatesInsert'
{ _ruiProject = pRuiProject_
, _ruiZone = pRuiZone_
, _ruiPayload = pRuiPayload_
}
ruiProject :: Lens' RollingUpdatesInsert Text
ruiProject
= lens _ruiProject (\ s a -> s{_ruiProject = a})
ruiZone :: Lens' RollingUpdatesInsert Text
ruiZone = lens _ruiZone (\ s a -> s{_ruiZone = a})
ruiPayload :: Lens' RollingUpdatesInsert RollingUpdate
ruiPayload
= lens _ruiPayload (\ s a -> s{_ruiPayload = a})
instance GoogleRequest RollingUpdatesInsert where
type Rs RollingUpdatesInsert = Operation
type Scopes RollingUpdatesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/replicapool"]
requestClient RollingUpdatesInsert'{..}
= go _ruiProject _ruiZone (Just AltJSON) _ruiPayload
replicaPoolUpdaterService
where go
= buildClient
(Proxy :: Proxy RollingUpdatesInsertResource)
mempty