{-# 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.SQL.Instances.List
(
InstancesListResource
, instancesList
, InstancesList
, ilProject
, ilFilter
, ilPageToken
, ilMaxResults
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesListResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
QueryParam "filter" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] InstancesListResponse
data InstancesList = InstancesList'
{ _ilProject :: !Text
, _ilFilter :: !(Maybe Text)
, _ilPageToken :: !(Maybe Text)
, _ilMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
instancesList
:: Text
-> InstancesList
instancesList pIlProject_ =
InstancesList'
{ _ilProject = pIlProject_
, _ilFilter = Nothing
, _ilPageToken = Nothing
, _ilMaxResults = Nothing
}
ilProject :: Lens' InstancesList Text
ilProject
= lens _ilProject (\ s a -> s{_ilProject = a})
ilFilter :: Lens' InstancesList (Maybe Text)
ilFilter = lens _ilFilter (\ s a -> s{_ilFilter = a})
ilPageToken :: Lens' InstancesList (Maybe Text)
ilPageToken
= lens _ilPageToken (\ s a -> s{_ilPageToken = a})
ilMaxResults :: Lens' InstancesList (Maybe Word32)
ilMaxResults
= lens _ilMaxResults (\ s a -> s{_ilMaxResults = a})
. mapping _Coerce
instance GoogleRequest InstancesList where
type Rs InstancesList = InstancesListResponse
type Scopes InstancesList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesList'{..}
= go _ilProject _ilFilter _ilPageToken _ilMaxResults
(Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy InstancesListResource)
mempty