{-# 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.Jobs.List
(
JobsListResource
, jobsList
, JobsList
, jlMaxCreationTime
, jlMinCreationTime
, jlStateFilter
, jlProjection
, jlPageToken
, jlProjectId
, jlAllUsers
, jlMaxResults
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type JobsListResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"jobs" :>
QueryParam "maxCreationTime" (Textual Word64) :>
QueryParam "minCreationTime" (Textual Word64) :>
QueryParams "stateFilter" JobsListStateFilter :>
QueryParam "projection" JobsListProjection :>
QueryParam "pageToken" Text :>
QueryParam "allUsers" Bool :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] JobList
data JobsList = JobsList'
{ _jlMaxCreationTime :: !(Maybe (Textual Word64))
, _jlMinCreationTime :: !(Maybe (Textual Word64))
, _jlStateFilter :: !(Maybe [JobsListStateFilter])
, _jlProjection :: !(Maybe JobsListProjection)
, _jlPageToken :: !(Maybe Text)
, _jlProjectId :: !Text
, _jlAllUsers :: !(Maybe Bool)
, _jlMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
jobsList
:: Text
-> JobsList
jobsList pJlProjectId_ =
JobsList'
{ _jlMaxCreationTime = Nothing
, _jlMinCreationTime = Nothing
, _jlStateFilter = Nothing
, _jlProjection = Nothing
, _jlPageToken = Nothing
, _jlProjectId = pJlProjectId_
, _jlAllUsers = Nothing
, _jlMaxResults = Nothing
}
jlMaxCreationTime :: Lens' JobsList (Maybe Word64)
jlMaxCreationTime
= lens _jlMaxCreationTime
(\ s a -> s{_jlMaxCreationTime = a})
. mapping _Coerce
jlMinCreationTime :: Lens' JobsList (Maybe Word64)
jlMinCreationTime
= lens _jlMinCreationTime
(\ s a -> s{_jlMinCreationTime = a})
. mapping _Coerce
jlStateFilter :: Lens' JobsList [JobsListStateFilter]
jlStateFilter
= lens _jlStateFilter
(\ s a -> s{_jlStateFilter = a})
. _Default
. _Coerce
jlProjection :: Lens' JobsList (Maybe JobsListProjection)
jlProjection
= lens _jlProjection (\ s a -> s{_jlProjection = a})
jlPageToken :: Lens' JobsList (Maybe Text)
jlPageToken
= lens _jlPageToken (\ s a -> s{_jlPageToken = a})
jlProjectId :: Lens' JobsList Text
jlProjectId
= lens _jlProjectId (\ s a -> s{_jlProjectId = a})
jlAllUsers :: Lens' JobsList (Maybe Bool)
jlAllUsers
= lens _jlAllUsers (\ s a -> s{_jlAllUsers = a})
jlMaxResults :: Lens' JobsList (Maybe Word32)
jlMaxResults
= lens _jlMaxResults (\ s a -> s{_jlMaxResults = a})
. mapping _Coerce
instance GoogleRequest JobsList where
type Rs JobsList = JobList
type Scopes JobsList =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient JobsList'{..}
= go _jlProjectId _jlMaxCreationTime
_jlMinCreationTime
(_jlStateFilter ^. _Default)
_jlProjection
_jlPageToken
_jlAllUsers
_jlMaxResults
(Just AltJSON)
bigQueryService
where go
= buildClient (Proxy :: Proxy JobsListResource)
mempty