{-# 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.BigQuery.Tables.List
(
TablesListResource
, tablesList
, TablesList
, tlDataSetId
, tlPageToken
, tlProjectId
, tlMaxResults
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type TablesListResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
Capture "datasetId" Text :>
"tables" :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] TableList
data TablesList = TablesList'
{ _tlDataSetId :: !Text
, _tlPageToken :: !(Maybe Text)
, _tlProjectId :: !Text
, _tlMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
tablesList
:: Text
-> Text
-> TablesList
tablesList pTlDataSetId_ pTlProjectId_ =
TablesList'
{ _tlDataSetId = pTlDataSetId_
, _tlPageToken = Nothing
, _tlProjectId = pTlProjectId_
, _tlMaxResults = Nothing
}
tlDataSetId :: Lens' TablesList Text
tlDataSetId
= lens _tlDataSetId (\ s a -> s{_tlDataSetId = a})
tlPageToken :: Lens' TablesList (Maybe Text)
tlPageToken
= lens _tlPageToken (\ s a -> s{_tlPageToken = a})
tlProjectId :: Lens' TablesList Text
tlProjectId
= lens _tlProjectId (\ s a -> s{_tlProjectId = a})
tlMaxResults :: Lens' TablesList (Maybe Word32)
tlMaxResults
= lens _tlMaxResults (\ s a -> s{_tlMaxResults = a})
. mapping _Coerce
instance GoogleRequest TablesList where
type Rs TablesList = TableList
type Scopes TablesList =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient TablesList'{..}
= go _tlProjectId _tlDataSetId _tlPageToken
_tlMaxResults
(Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy TablesListResource)
mempty