{-# 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.Updatetemplate
(
PoolsUpdatetemplateResource
, poolsUpdatetemplate
, PoolsUpdatetemplate
, puPoolName
, puZone
, puPayload
, puProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsUpdatetemplateResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"updateTemplate" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Template :> Post '[JSON] ()
data PoolsUpdatetemplate = PoolsUpdatetemplate'
{ _puPoolName :: !Text
, _puZone :: !Text
, _puPayload :: !Template
, _puProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
poolsUpdatetemplate
:: Text
-> Text
-> Template
-> Text
-> PoolsUpdatetemplate
poolsUpdatetemplate pPuPoolName_ pPuZone_ pPuPayload_ pPuProjectName_ =
PoolsUpdatetemplate'
{ _puPoolName = pPuPoolName_
, _puZone = pPuZone_
, _puPayload = pPuPayload_
, _puProjectName = pPuProjectName_
}
puPoolName :: Lens' PoolsUpdatetemplate Text
puPoolName
= lens _puPoolName (\ s a -> s{_puPoolName = a})
puZone :: Lens' PoolsUpdatetemplate Text
puZone = lens _puZone (\ s a -> s{_puZone = a})
puPayload :: Lens' PoolsUpdatetemplate Template
puPayload
= lens _puPayload (\ s a -> s{_puPayload = a})
puProjectName :: Lens' PoolsUpdatetemplate Text
puProjectName
= lens _puProjectName
(\ s a -> s{_puProjectName = a})
instance GoogleRequest PoolsUpdatetemplate where
type Rs PoolsUpdatetemplate = ()
type Scopes PoolsUpdatetemplate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient PoolsUpdatetemplate'{..}
= go _puProjectName _puZone _puPoolName
(Just AltJSON)
_puPayload
replicaPoolService
where go
= buildClient
(Proxy :: Proxy PoolsUpdatetemplateResource)
mempty