{-# 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.Get
(
ReplicasGetResource
, replicasGet
, ReplicasGet
, rgPoolName
, rgZone
, rgReplicaName
, rgProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type ReplicasGetResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"replicas" :>
Capture "replicaName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Replica
data ReplicasGet = ReplicasGet'
{ _rgPoolName :: !Text
, _rgZone :: !Text
, _rgReplicaName :: !Text
, _rgProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
replicasGet
:: Text
-> Text
-> Text
-> Text
-> ReplicasGet
replicasGet pRgPoolName_ pRgZone_ pRgReplicaName_ pRgProjectName_ =
ReplicasGet'
{ _rgPoolName = pRgPoolName_
, _rgZone = pRgZone_
, _rgReplicaName = pRgReplicaName_
, _rgProjectName = pRgProjectName_
}
rgPoolName :: Lens' ReplicasGet Text
rgPoolName
= lens _rgPoolName (\ s a -> s{_rgPoolName = a})
rgZone :: Lens' ReplicasGet Text
rgZone = lens _rgZone (\ s a -> s{_rgZone = a})
rgReplicaName :: Lens' ReplicasGet Text
rgReplicaName
= lens _rgReplicaName
(\ s a -> s{_rgReplicaName = a})
rgProjectName :: Lens' ReplicasGet Text
rgProjectName
= lens _rgProjectName
(\ s a -> s{_rgProjectName = a})
instance GoogleRequest ReplicasGet where
type Rs ReplicasGet = Replica
type Scopes ReplicasGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/ndev.cloudman",
"https://www.googleapis.com/auth/ndev.cloudman.readonly",
"https://www.googleapis.com/auth/replicapool",
"https://www.googleapis.com/auth/replicapool.readonly"]
requestClient ReplicasGet'{..}
= go _rgProjectName _rgZone _rgPoolName
_rgReplicaName
(Just AltJSON)
replicaPoolService
where go
= buildClient (Proxy :: Proxy ReplicasGetResource)
mempty