{-# 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.List
(
ReplicasListResource
, replicasList
, ReplicasList
, rlPoolName
, rlZone
, rlProjectName
, rlPageToken
, rlMaxResults
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type ReplicasListResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
Capture "poolName" Text :>
"replicas" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ReplicasListResponse
data ReplicasList = ReplicasList'
{ _rlPoolName :: !Text
, _rlZone :: !Text
, _rlProjectName :: !Text
, _rlPageToken :: !(Maybe Text)
, _rlMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
replicasList
:: Text
-> Text
-> Text
-> ReplicasList
replicasList pRlPoolName_ pRlZone_ pRlProjectName_ =
ReplicasList'
{ _rlPoolName = pRlPoolName_
, _rlZone = pRlZone_
, _rlProjectName = pRlProjectName_
, _rlPageToken = Nothing
, _rlMaxResults = 500
}
rlPoolName :: Lens' ReplicasList Text
rlPoolName
= lens _rlPoolName (\ s a -> s{_rlPoolName = a})
rlZone :: Lens' ReplicasList Text
rlZone = lens _rlZone (\ s a -> s{_rlZone = a})
rlProjectName :: Lens' ReplicasList Text
rlProjectName
= lens _rlProjectName
(\ s a -> s{_rlProjectName = a})
rlPageToken :: Lens' ReplicasList (Maybe Text)
rlPageToken
= lens _rlPageToken (\ s a -> s{_rlPageToken = a})
rlMaxResults :: Lens' ReplicasList Int32
rlMaxResults
= lens _rlMaxResults (\ s a -> s{_rlMaxResults = a})
. _Coerce
instance GoogleRequest ReplicasList where
type Rs ReplicasList = ReplicasListResponse
type Scopes ReplicasList =
'["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 ReplicasList'{..}
= go _rlProjectName _rlZone _rlPoolName _rlPageToken
(Just _rlMaxResults)
(Just AltJSON)
replicaPoolService
where go
= buildClient (Proxy :: Proxy ReplicasListResource)
mempty