{-# 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.Replicas.Restart
(
ReplicasRestartResource
, replicasRestart
, ReplicasRestart
, rrPoolName
, rrZone
, rrReplicaName
, rrProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type ReplicasRestartResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"replicas" :>
Capture "replicaName" Text :>
"restart" :>
QueryParam "alt" AltJSON :> Post '[JSON] Replica
data ReplicasRestart = ReplicasRestart'
{ _rrPoolName :: !Text
, _rrZone :: !Text
, _rrReplicaName :: !Text
, _rrProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
replicasRestart
:: Text
-> Text
-> Text
-> Text
-> ReplicasRestart
replicasRestart pRrPoolName_ pRrZone_ pRrReplicaName_ pRrProjectName_ =
ReplicasRestart'
{ _rrPoolName = pRrPoolName_
, _rrZone = pRrZone_
, _rrReplicaName = pRrReplicaName_
, _rrProjectName = pRrProjectName_
}
rrPoolName :: Lens' ReplicasRestart Text
rrPoolName
= lens _rrPoolName (\ s a -> s{_rrPoolName = a})
rrZone :: Lens' ReplicasRestart Text
rrZone = lens _rrZone (\ s a -> s{_rrZone = a})
rrReplicaName :: Lens' ReplicasRestart Text
rrReplicaName
= lens _rrReplicaName
(\ s a -> s{_rrReplicaName = a})
rrProjectName :: Lens' ReplicasRestart Text
rrProjectName
= lens _rrProjectName
(\ s a -> s{_rrProjectName = a})
instance GoogleRequest ReplicasRestart where
type Rs ReplicasRestart = Replica
type Scopes ReplicasRestart =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/replicapool"]
requestClient ReplicasRestart'{..}
= go _rrProjectName _rrZone _rrPoolName
_rrReplicaName
(Just AltJSON)
replicaPoolService
where go
= buildClient
(Proxy :: Proxy ReplicasRestartResource)
mempty