{-# 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.BackupRuns.List
(
BackupRunsListResource
, backupRunsList
, BackupRunsList
, brlProject
, brlPageToken
, brlMaxResults
, brlInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type BackupRunsListResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"backupRuns" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] BackupRunsListResponse
data BackupRunsList = BackupRunsList'
{ _brlProject :: !Text
, _brlPageToken :: !(Maybe Text)
, _brlMaxResults :: !(Maybe (Textual Int32))
, _brlInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
backupRunsList
:: Text
-> Text
-> BackupRunsList
backupRunsList pBrlProject_ pBrlInstance_ =
BackupRunsList'
{ _brlProject = pBrlProject_
, _brlPageToken = Nothing
, _brlMaxResults = Nothing
, _brlInstance = pBrlInstance_
}
brlProject :: Lens' BackupRunsList Text
brlProject
= lens _brlProject (\ s a -> s{_brlProject = a})
brlPageToken :: Lens' BackupRunsList (Maybe Text)
brlPageToken
= lens _brlPageToken (\ s a -> s{_brlPageToken = a})
brlMaxResults :: Lens' BackupRunsList (Maybe Int32)
brlMaxResults
= lens _brlMaxResults
(\ s a -> s{_brlMaxResults = a})
. mapping _Coerce
brlInstance :: Lens' BackupRunsList Text
brlInstance
= lens _brlInstance (\ s a -> s{_brlInstance = a})
instance GoogleRequest BackupRunsList where
type Rs BackupRunsList = BackupRunsListResponse
type Scopes BackupRunsList =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient BackupRunsList'{..}
= go _brlProject _brlInstance _brlPageToken
_brlMaxResults
(Just AltJSON)
sQLAdminService
where go
= buildClient (Proxy :: Proxy BackupRunsListResource)
mempty