target.apidocs.com.google.api.services.bigquery.model.QueryResponse.html Maven / Gradle / Ivy
QueryResponse (BigQuery API v2-rev20240727-2.0.0)
com.google.api.services.bigquery.model
Class QueryResponse
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.bigquery.model.QueryResponse
-
public final class QueryResponse
extends com.google.api.client.json.GenericJson
Model definition for QueryResponse.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
QueryResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
QueryResponse
clone()
Boolean
getCacheHit()
Whether the query result was fetched from the query cache.
DmlStatistics
getDmlStats()
Output only.
List<ErrorProto>
getErrors()
Output only.
Boolean
getJobComplete()
Whether the query has completed or not.
JobCreationReason
getJobCreationReason()
Optional.
JobReference
getJobReference()
Reference to the Job that was created to run the query.
String
getKind()
The resource type.
Long
getNumDmlAffectedRows()
Output only.
String
getPageToken()
A token used for paging results.
String
getQueryId()
Query ID for the completed query.
List<TableRow>
getRows()
An object with as many results as can be contained within the maximum permitted reply size.
TableSchema
getSchema()
The schema of the results.
SessionInfo
getSessionInfo()
Output only.
Long
getTotalBytesProcessed()
The total number of bytes processed for this query.
BigInteger
getTotalRows()
The total number of rows in the complete query result set, which can be more than the number of
rows in this single page of results.
QueryResponse
set(String fieldName,
Object value)
QueryResponse
setCacheHit(Boolean cacheHit)
Whether the query result was fetched from the query cache.
QueryResponse
setDmlStats(DmlStatistics dmlStats)
Output only.
QueryResponse
setErrors(List<ErrorProto> errors)
Output only.
QueryResponse
setJobComplete(Boolean jobComplete)
Whether the query has completed or not.
QueryResponse
setJobCreationReason(JobCreationReason jobCreationReason)
Optional.
QueryResponse
setJobReference(JobReference jobReference)
Reference to the Job that was created to run the query.
QueryResponse
setKind(String kind)
The resource type.
QueryResponse
setNumDmlAffectedRows(Long numDmlAffectedRows)
Output only.
QueryResponse
setPageToken(String pageToken)
A token used for paging results.
QueryResponse
setQueryId(String queryId)
Query ID for the completed query.
QueryResponse
setRows(List<TableRow> rows)
An object with as many results as can be contained within the maximum permitted reply size.
QueryResponse
setSchema(TableSchema schema)
The schema of the results.
QueryResponse
setSessionInfo(SessionInfo sessionInfo)
Output only.
QueryResponse
setTotalBytesProcessed(Long totalBytesProcessed)
The total number of bytes processed for this query.
QueryResponse
setTotalRows(BigInteger totalRows)
The total number of rows in the complete query result set, which can be more than the number of
rows in this single page of results.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getCacheHit
public Boolean getCacheHit()
Whether the query result was fetched from the query cache.
- Returns:
- value or
null
for none
-
setCacheHit
public QueryResponse setCacheHit(Boolean cacheHit)
Whether the query result was fetched from the query cache.
- Parameters:
cacheHit
- cacheHit or null
for none
-
getDmlStats
public DmlStatistics getDmlStats()
Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE.
- Returns:
- value or
null
for none
-
setDmlStats
public QueryResponse setDmlStats(DmlStatistics dmlStats)
Output only. Detailed statistics for DML statements INSERT, UPDATE, DELETE, MERGE or TRUNCATE.
- Parameters:
dmlStats
- dmlStats or null
for none
-
getErrors
public List<ErrorProto> getErrors()
Output only. The first errors or warnings encountered during the running of the job. The final
message includes the number of errors that caused the process to stop. Errors here do not
necessarily mean that the job has completed or was unsuccessful. For more information about
error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages).
- Returns:
- value or
null
for none
-
setErrors
public QueryResponse setErrors(List<ErrorProto> errors)
Output only. The first errors or warnings encountered during the running of the job. The final
message includes the number of errors that caused the process to stop. Errors here do not
necessarily mean that the job has completed or was unsuccessful. For more information about
error messages, see [Error messages](https://cloud.google.com/bigquery/docs/error-messages).
- Parameters:
errors
- errors or null
for none
-
getJobComplete
public Boolean getJobComplete()
Whether the query has completed or not. If rows or totalRows are present, this will always be
true. If this is false, totalRows will not be available.
- Returns:
- value or
null
for none
-
setJobComplete
public QueryResponse setJobComplete(Boolean jobComplete)
Whether the query has completed or not. If rows or totalRows are present, this will always be
true. If this is false, totalRows will not be available.
- Parameters:
jobComplete
- jobComplete or null
for none
-
getJobCreationReason
public JobCreationReason getJobCreationReason()
Optional. Only relevant when a job_reference is present in the response. If job_reference is
not present it will always be unset. When job_reference is present, this field should be
interpreted as follows: If set, it will provide the reason of why a Job was created. If not
set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs
will always be created.
- Returns:
- value or
null
for none
-
setJobCreationReason
public QueryResponse setJobCreationReason(JobCreationReason jobCreationReason)
Optional. Only relevant when a job_reference is present in the response. If job_reference is
not present it will always be unset. When job_reference is present, this field should be
interpreted as follows: If set, it will provide the reason of why a Job was created. If not
set, it should be treated as the default: REQUESTED. This feature is not yet available. Jobs
will always be created.
- Parameters:
jobCreationReason
- jobCreationReason or null
for none
-
getJobReference
public JobReference getJobReference()
Reference to the Job that was created to run the query. This field will be present even if the
original request timed out, in which case GetQueryResults can be used to read the results once
the query has completed. Since this API only returns the first page of results, subsequent
pages can be fetched via the same mechanism (GetQueryResults).
- Returns:
- value or
null
for none
-
setJobReference
public QueryResponse setJobReference(JobReference jobReference)
Reference to the Job that was created to run the query. This field will be present even if the
original request timed out, in which case GetQueryResults can be used to read the results once
the query has completed. Since this API only returns the first page of results, subsequent
pages can be fetched via the same mechanism (GetQueryResults).
- Parameters:
jobReference
- jobReference or null
for none
-
getKind
public String getKind()
The resource type.
- Returns:
- value or
null
for none
-
setKind
public QueryResponse setKind(String kind)
The resource type.
- Parameters:
kind
- kind or null
for none
-
getNumDmlAffectedRows
public Long getNumDmlAffectedRows()
Output only. The number of rows affected by a DML statement. Present only for DML statements
INSERT, UPDATE or DELETE.
- Returns:
- value or
null
for none
-
setNumDmlAffectedRows
public QueryResponse setNumDmlAffectedRows(Long numDmlAffectedRows)
Output only. The number of rows affected by a DML statement. Present only for DML statements
INSERT, UPDATE or DELETE.
- Parameters:
numDmlAffectedRows
- numDmlAffectedRows or null
for none
-
getPageToken
public String getPageToken()
A token used for paging results. A non-empty token indicates that additional results are
available. To see additional results, query the [`jobs.getQueryResults`](https://cloud.google.c
om/bigquery/docs/reference/rest/v2/jobs/getQueryResults) method. For more information, see
[Paging through table data](https://cloud.google.com/bigquery/docs/paging-results).
- Returns:
- value or
null
for none
-
setPageToken
public QueryResponse setPageToken(String pageToken)
A token used for paging results. A non-empty token indicates that additional results are
available. To see additional results, query the [`jobs.getQueryResults`](https://cloud.google.c
om/bigquery/docs/reference/rest/v2/jobs/getQueryResults) method. For more information, see
[Paging through table data](https://cloud.google.com/bigquery/docs/paging-results).
- Parameters:
pageToken
- pageToken or null
for none
-
getQueryId
public String getQueryId()
Query ID for the completed query. This ID will be auto-generated. This field is not yet
available and it is currently not guaranteed to be populated.
- Returns:
- value or
null
for none
-
setQueryId
public QueryResponse setQueryId(String queryId)
Query ID for the completed query. This ID will be auto-generated. This field is not yet
available and it is currently not guaranteed to be populated.
- Parameters:
queryId
- queryId or null
for none
-
getRows
public List<TableRow> getRows()
An object with as many results as can be contained within the maximum permitted reply size. To
get any additional rows, you can call GetQueryResults and specify the jobReference returned
above.
- Returns:
- value or
null
for none
-
setRows
public QueryResponse setRows(List<TableRow> rows)
An object with as many results as can be contained within the maximum permitted reply size. To
get any additional rows, you can call GetQueryResults and specify the jobReference returned
above.
- Parameters:
rows
- rows or null
for none
-
getSchema
public TableSchema getSchema()
The schema of the results. Present only when the query completes successfully.
- Returns:
- value or
null
for none
-
setSchema
public QueryResponse setSchema(TableSchema schema)
The schema of the results. Present only when the query completes successfully.
- Parameters:
schema
- schema or null
for none
-
getSessionInfo
public SessionInfo getSessionInfo()
Output only. Information of the session if this job is part of one.
- Returns:
- value or
null
for none
-
setSessionInfo
public QueryResponse setSessionInfo(SessionInfo sessionInfo)
Output only. Information of the session if this job is part of one.
- Parameters:
sessionInfo
- sessionInfo or null
for none
-
getTotalBytesProcessed
public Long getTotalBytesProcessed()
The total number of bytes processed for this query. If this query was a dry run, this is the
number of bytes that would be processed if the query were run.
- Returns:
- value or
null
for none
-
setTotalBytesProcessed
public QueryResponse setTotalBytesProcessed(Long totalBytesProcessed)
The total number of bytes processed for this query. If this query was a dry run, this is the
number of bytes that would be processed if the query were run.
- Parameters:
totalBytesProcessed
- totalBytesProcessed or null
for none
-
getTotalRows
public BigInteger getTotalRows()
The total number of rows in the complete query result set, which can be more than the number of
rows in this single page of results.
- Returns:
- value or
null
for none
-
setTotalRows
public QueryResponse setTotalRows(BigInteger totalRows)
The total number of rows in the complete query result set, which can be more than the number of
rows in this single page of results.
- Parameters:
totalRows
- totalRows or null
for none
-
set
public QueryResponse set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public QueryResponse clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.