{-# 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.DataSets.List
(
DataSetsListResource
, dataSetsList
, DataSetsList
, dslAll
, dslFilter
, dslPageToken
, dslProjectId
, dslMaxResults
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type DataSetsListResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"datasets" :>
QueryParam "all" Bool :>
QueryParam "filter" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] DataSetList
data DataSetsList = DataSetsList'
{ _dslAll :: !(Maybe Bool)
, _dslFilter :: !(Maybe Text)
, _dslPageToken :: !(Maybe Text)
, _dslProjectId :: !Text
, _dslMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
dataSetsList
:: Text
-> DataSetsList
dataSetsList pDslProjectId_ =
DataSetsList'
{ _dslAll = Nothing
, _dslFilter = Nothing
, _dslPageToken = Nothing
, _dslProjectId = pDslProjectId_
, _dslMaxResults = Nothing
}
dslAll :: Lens' DataSetsList (Maybe Bool)
dslAll = lens _dslAll (\ s a -> s{_dslAll = a})
dslFilter :: Lens' DataSetsList (Maybe Text)
dslFilter
= lens _dslFilter (\ s a -> s{_dslFilter = a})
dslPageToken :: Lens' DataSetsList (Maybe Text)
dslPageToken
= lens _dslPageToken (\ s a -> s{_dslPageToken = a})
dslProjectId :: Lens' DataSetsList Text
dslProjectId
= lens _dslProjectId (\ s a -> s{_dslProjectId = a})
dslMaxResults :: Lens' DataSetsList (Maybe Word32)
dslMaxResults
= lens _dslMaxResults
(\ s a -> s{_dslMaxResults = a})
. mapping _Coerce
instance GoogleRequest DataSetsList where
type Rs DataSetsList = DataSetList
type Scopes DataSetsList =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient DataSetsList'{..}
= go _dslProjectId _dslAll _dslFilter _dslPageToken
_dslMaxResults
(Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy DataSetsListResource)
mempty