{-# 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.Databases.List
(
DatabasesListResource
, databasesList
, DatabasesList
, dlProject
, dlInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type DatabasesListResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"databases" :>
QueryParam "alt" AltJSON :>
Get '[JSON] DatabasesListResponse
data DatabasesList = DatabasesList'
{ _dlProject :: !Text
, _dlInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
databasesList
:: Text
-> Text
-> DatabasesList
databasesList pDlProject_ pDlInstance_ =
DatabasesList'
{ _dlProject = pDlProject_
, _dlInstance = pDlInstance_
}
dlProject :: Lens' DatabasesList Text
dlProject
= lens _dlProject (\ s a -> s{_dlProject = a})
dlInstance :: Lens' DatabasesList Text
dlInstance
= lens _dlInstance (\ s a -> s{_dlInstance = a})
instance GoogleRequest DatabasesList where
type Rs DatabasesList = DatabasesListResponse
type Scopes DatabasesList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient DatabasesList'{..}
= go _dlProject _dlInstance (Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy DatabasesListResource)
mempty