{-# 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.List
(
PoolsListResource
, poolsList
, PoolsList
, plZone
, plProjectName
, plPageToken
, plMaxResults
) where
import Network.Google.Prelude
import Network.Google.ReplicaPool.Types
type PoolsListResource =
"replicapool" :>
"v1beta1" :>
"projects" :>
Capture "projectName" Text :>
"zones" :>
Capture "zone" Text :>
"pools" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PoolsListResponse
data PoolsList = PoolsList'
{ _plZone :: !Text
, _plProjectName :: !Text
, _plPageToken :: !(Maybe Text)
, _plMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
poolsList
:: Text
-> Text
-> PoolsList
poolsList pPlZone_ pPlProjectName_ =
PoolsList'
{ _plZone = pPlZone_
, _plProjectName = pPlProjectName_
, _plPageToken = Nothing
, _plMaxResults = 500
}
plZone :: Lens' PoolsList Text
plZone = lens _plZone (\ s a -> s{_plZone = a})
plProjectName :: Lens' PoolsList Text
plProjectName
= lens _plProjectName
(\ s a -> s{_plProjectName = a})
plPageToken :: Lens' PoolsList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plMaxResults :: Lens' PoolsList Int32
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. _Coerce
instance GoogleRequest PoolsList where
type Rs PoolsList = PoolsListResponse
type Scopes PoolsList =
'["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 PoolsList'{..}
= go _plProjectName _plZone _plPageToken
(Just _plMaxResults)
(Just AltJSON)
replicaPoolService
where go
= buildClient (Proxy :: Proxy PoolsListResource)
mempty