{-# 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.Rollback
(
RollingUpdatesRollbackResource
, rollingUpdatesRollback
, RollingUpdatesRollback
, rurRollingUpdate
, rurProject
, rurZone
) where
import Network.Google.Prelude
import Network.Google.ReplicaPoolUpdater.Types
type RollingUpdatesRollbackResource =
"replicapoolupdater" :>
"v1beta1" :>
"projects" :>
Capture "project" Text :>
"zones" :>
Capture "zone" Text :>
"rollingUpdates" :>
Capture "rollingUpdate" Text :>
"rollback" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data RollingUpdatesRollback = RollingUpdatesRollback'
{ _rurRollingUpdate :: !Text
, _rurProject :: !Text
, _rurZone :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
rollingUpdatesRollback
:: Text
-> Text
-> Text
-> RollingUpdatesRollback
rollingUpdatesRollback pRurRollingUpdate_ pRurProject_ pRurZone_ =
RollingUpdatesRollback'
{ _rurRollingUpdate = pRurRollingUpdate_
, _rurProject = pRurProject_
, _rurZone = pRurZone_
}
rurRollingUpdate :: Lens' RollingUpdatesRollback Text
rurRollingUpdate
= lens _rurRollingUpdate
(\ s a -> s{_rurRollingUpdate = a})
rurProject :: Lens' RollingUpdatesRollback Text
rurProject
= lens _rurProject (\ s a -> s{_rurProject = a})
rurZone :: Lens' RollingUpdatesRollback Text
rurZone = lens _rurZone (\ s a -> s{_rurZone = a})
instance GoogleRequest RollingUpdatesRollback where
type Rs RollingUpdatesRollback = Operation
type Scopes RollingUpdatesRollback =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/replicapool"]
requestClient RollingUpdatesRollback'{..}
= go _rurProject _rurZone _rurRollingUpdate
(Just AltJSON)
replicaPoolUpdaterService
where go
= buildClient
(Proxy :: Proxy RollingUpdatesRollbackResource)
mempty