{-# 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.Get
(
PoolsGetResource
, poolsGet
, PoolsGet
, pgPoolName
, pgZone
, pgProjectName
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsGetResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Pool
data PoolsGet = PoolsGet'
{ _pgPoolName :: !Text
, _pgZone :: !Text
, _pgProjectName :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
poolsGet
:: Text
-> Text
-> Text
-> PoolsGet
poolsGet pPgPoolName_ pPgZone_ pPgProjectName_ =
PoolsGet'
{ _pgPoolName = pPgPoolName_
, _pgZone = pPgZone_
, _pgProjectName = pPgProjectName_
}
pgPoolName :: Lens' PoolsGet Text
pgPoolName
= lens _pgPoolName (\ s a -> s{_pgPoolName = a})
pgZone :: Lens' PoolsGet Text
pgZone = lens _pgZone (\ s a -> s{_pgZone = a})
pgProjectName :: Lens' PoolsGet Text
pgProjectName
= lens _pgProjectName
(\ s a -> s{_pgProjectName = a})
instance GoogleRequest PoolsGet where
type Rs PoolsGet = Pool
type Scopes PoolsGet =
'["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 PoolsGet'{..}
= go _pgProjectName _pgZone _pgPoolName
(Just AltJSON)
replicaPoolService
where go
= buildClient (Proxy :: Proxy PoolsGetResource)
mempty