{-# 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.GetQueryResults
(
JobsGetQueryResultsResource
, jobsGetQueryResults
, JobsGetQueryResults
, jgqrJobId
, jgqrLocation
, jgqrTimeoutMs
, jgqrPageToken
, jgqrProjectId
, jgqrStartIndex
, jgqrMaxResults
) where
import Network.Google.BigQuery.Types
import Network.Google.Prelude
type JobsGetQueryResultsResource =
"bigquery" :>
"v2" :>
"projects" :>
Capture "projectId" Text :>
"queries" :>
Capture "jobId" Text :>
QueryParam "location" Text :>
QueryParam "timeoutMs" (Textual Word32) :>
QueryParam "pageToken" Text :>
QueryParam "startIndex" (Textual Word64) :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetQueryResultsResponse
data JobsGetQueryResults = JobsGetQueryResults'
{ _jgqrJobId :: !Text
, _jgqrLocation :: !(Maybe Text)
, _jgqrTimeoutMs :: !(Maybe (Textual Word32))
, _jgqrPageToken :: !(Maybe Text)
, _jgqrProjectId :: !Text
, _jgqrStartIndex :: !(Maybe (Textual Word64))
, _jgqrMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
jobsGetQueryResults
:: Text
-> Text
-> JobsGetQueryResults
jobsGetQueryResults pJgqrJobId_ pJgqrProjectId_ =
JobsGetQueryResults'
{ _jgqrJobId = pJgqrJobId_
, _jgqrLocation = Nothing
, _jgqrTimeoutMs = Nothing
, _jgqrPageToken = Nothing
, _jgqrProjectId = pJgqrProjectId_
, _jgqrStartIndex = Nothing
, _jgqrMaxResults = Nothing
}
jgqrJobId :: Lens' JobsGetQueryResults Text
jgqrJobId
= lens _jgqrJobId (\ s a -> s{_jgqrJobId = a})
jgqrLocation :: Lens' JobsGetQueryResults (Maybe Text)
jgqrLocation
= lens _jgqrLocation (\ s a -> s{_jgqrLocation = a})
jgqrTimeoutMs :: Lens' JobsGetQueryResults (Maybe Word32)
jgqrTimeoutMs
= lens _jgqrTimeoutMs
(\ s a -> s{_jgqrTimeoutMs = a})
. mapping _Coerce
jgqrPageToken :: Lens' JobsGetQueryResults (Maybe Text)
jgqrPageToken
= lens _jgqrPageToken
(\ s a -> s{_jgqrPageToken = a})
jgqrProjectId :: Lens' JobsGetQueryResults Text
jgqrProjectId
= lens _jgqrProjectId
(\ s a -> s{_jgqrProjectId = a})
jgqrStartIndex :: Lens' JobsGetQueryResults (Maybe Word64)
jgqrStartIndex
= lens _jgqrStartIndex
(\ s a -> s{_jgqrStartIndex = a})
. mapping _Coerce
jgqrMaxResults :: Lens' JobsGetQueryResults (Maybe Word32)
jgqrMaxResults
= lens _jgqrMaxResults
(\ s a -> s{_jgqrMaxResults = a})
. mapping _Coerce
instance GoogleRequest JobsGetQueryResults where
type Rs JobsGetQueryResults = GetQueryResultsResponse
type Scopes JobsGetQueryResults =
'["https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient JobsGetQueryResults'{..}
= go _jgqrProjectId _jgqrJobId _jgqrLocation
_jgqrTimeoutMs
_jgqrPageToken
_jgqrStartIndex
_jgqrMaxResults
(Just AltJSON)
bigQueryService
where go
= buildClient
(Proxy :: Proxy JobsGetQueryResultsResource)
mempty