{-# 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.ReplicaPool.Pools.Resize
(
PoolsResizeResource
, poolsResize
, PoolsResize
, prNumReplicas
, prPoolName
, prZone
, prProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsResizeResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"resize" :>
QueryParam "numReplicas" (Textual Int32) :>
QueryParam "alt" AltJSON :> Post '[JSON] Pool
data PoolsResize = PoolsResize'
{ _prNumReplicas :: !(Maybe (Textual Int32))
, _prPoolName :: !Text
, _prZone :: !Text
, _prProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
poolsResize
:: Text
-> Text
-> Text
-> PoolsResize
poolsResize pPrPoolName_ pPrZone_ pPrProjectName_ =
PoolsResize'
{ _prNumReplicas = Nothing
, _prPoolName = pPrPoolName_
, _prZone = pPrZone_
, _prProjectName = pPrProjectName_
}
prNumReplicas :: Lens' PoolsResize (Maybe Int32)
prNumReplicas
= lens _prNumReplicas
(\ s a -> s{_prNumReplicas = a})
. mapping _Coerce
prPoolName :: Lens' PoolsResize Text
prPoolName
= lens _prPoolName (\ s a -> s{_prPoolName = a})
prZone :: Lens' PoolsResize Text
prZone = lens _prZone (\ s a -> s{_prZone = a})
prProjectName :: Lens' PoolsResize Text
prProjectName
= lens _prProjectName
(\ s a -> s{_prProjectName = a})
instance GoogleRequest PoolsResize where
type Rs PoolsResize = Pool
type Scopes PoolsResize =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient PoolsResize'{..}
= go _prProjectName _prZone _prPoolName
_prNumReplicas
(Just AltJSON)
replicaPoolService
where go
= buildClient (Proxy :: Proxy PoolsResizeResource)
mempty