
com.google.api.services.bigquery.model.QueryRequest Maven / Gradle / Ivy
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://code.google.com/p/google-apis-client-generator/
* (build: 2013-08-01 15:32:38 UTC)
* on 2013-08-06 at 21:33:58 UTC
* Modify at your own risk.
*/
package com.google.api.services.bigquery.model;
/**
* Model definition for QueryRequest.
*
* 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:
* http://code.google.com/p/google-http-java-client/wiki/JSON
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class QueryRequest extends com.google.api.client.json.GenericJson {
/**
* [Optional] Specifies the default datasetId and projectId to assume for any unqualified table
* names in the query. If not set, all table names in the query string must be fully-qualified in
* the format projectId:datasetId.tableid.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DatasetReference defaultDataset;
/**
* [Optional] If set, don't actually run the query. A valid query will return an empty response,
* while an invalid query will return the same error it would if it wasn't a dry run.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean dryRun;
/**
* The resource type of the request.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String kind;
/**
* [Optional] The maximum number of results to return per page of results. If the response list
* exceeds the maximum response size for a single response, you will have to page through the
* results. Default is to return the maximum response size.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Long maxResults;
/**
* [Experimental] Specifies the the minimum fraction of data that must be scanned before a query
* returns. This should be specified as a value between 0.0 and 1.0 inclusive. The default value
* is 1.0.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Double minCompletionRatio;
/**
* [Experimental] If set, preserve null values in table data, rather than mapping null values to
* the column's default value. This flag currently defaults to false, but the default will soon be
* changed to true. Shortly afterward, this flag will be removed completely. Please specify true
* if possible, and false only if you need to force the old behavior while updating client code.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean preserveNulls;
/**
* [Required] A query string, following the BigQuery query syntax of the query to execute. Table
* names should be qualified by dataset name in the format projectId:datasetId.tableId unless you
* specify the defaultDataset value. If the table is in the same project as the job, you can omit
* the project ID. Example: SELECT f1 FROM myProjectId:myDatasetId.myTableId.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String query;
/**
* [Optional] How long to wait for the query to complete, in milliseconds, before returning.
* Default is to return immediately. If the timeout passes before the job completes, the request
* will fail with a TIMEOUT error.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Long timeoutMs;
/**
* [Optional] Whether to look for the result in the query cache. The query cache is a best-effort
* cache that will be flushed whenever tables in the query are modified.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean useQueryCache;
/**
* [Optional] Specifies the default datasetId and projectId to assume for any unqualified table
* names in the query. If not set, all table names in the query string must be fully-qualified in
* the format projectId:datasetId.tableid.
* @return value or {@code null} for none
*/
public DatasetReference getDefaultDataset() {
return defaultDataset;
}
/**
* [Optional] Specifies the default datasetId and projectId to assume for any unqualified table
* names in the query. If not set, all table names in the query string must be fully-qualified in
* the format projectId:datasetId.tableid.
* @param defaultDataset defaultDataset or {@code null} for none
*/
public QueryRequest setDefaultDataset(DatasetReference defaultDataset) {
this.defaultDataset = defaultDataset;
return this;
}
/**
* [Optional] If set, don't actually run the query. A valid query will return an empty response,
* while an invalid query will return the same error it would if it wasn't a dry run.
* @return value or {@code null} for none
*/
public java.lang.Boolean getDryRun() {
return dryRun;
}
/**
* [Optional] If set, don't actually run the query. A valid query will return an empty response,
* while an invalid query will return the same error it would if it wasn't a dry run.
* @param dryRun dryRun or {@code null} for none
*/
public QueryRequest setDryRun(java.lang.Boolean dryRun) {
this.dryRun = dryRun;
return this;
}
/**
* The resource type of the request.
* @return value or {@code null} for none
*/
public java.lang.String getKind() {
return kind;
}
/**
* The resource type of the request.
* @param kind kind or {@code null} for none
*/
public QueryRequest setKind(java.lang.String kind) {
this.kind = kind;
return this;
}
/**
* [Optional] The maximum number of results to return per page of results. If the response list
* exceeds the maximum response size for a single response, you will have to page through the
* results. Default is to return the maximum response size.
* @return value or {@code null} for none
*/
public java.lang.Long getMaxResults() {
return maxResults;
}
/**
* [Optional] The maximum number of results to return per page of results. If the response list
* exceeds the maximum response size for a single response, you will have to page through the
* results. Default is to return the maximum response size.
* @param maxResults maxResults or {@code null} for none
*/
public QueryRequest setMaxResults(java.lang.Long maxResults) {
this.maxResults = maxResults;
return this;
}
/**
* [Experimental] Specifies the the minimum fraction of data that must be scanned before a query
* returns. This should be specified as a value between 0.0 and 1.0 inclusive. The default value
* is 1.0.
* @return value or {@code null} for none
*/
public java.lang.Double getMinCompletionRatio() {
return minCompletionRatio;
}
/**
* [Experimental] Specifies the the minimum fraction of data that must be scanned before a query
* returns. This should be specified as a value between 0.0 and 1.0 inclusive. The default value
* is 1.0.
* @param minCompletionRatio minCompletionRatio or {@code null} for none
*/
public QueryRequest setMinCompletionRatio(java.lang.Double minCompletionRatio) {
this.minCompletionRatio = minCompletionRatio;
return this;
}
/**
* [Experimental] If set, preserve null values in table data, rather than mapping null values to
* the column's default value. This flag currently defaults to false, but the default will soon be
* changed to true. Shortly afterward, this flag will be removed completely. Please specify true
* if possible, and false only if you need to force the old behavior while updating client code.
* @return value or {@code null} for none
*/
public java.lang.Boolean getPreserveNulls() {
return preserveNulls;
}
/**
* [Experimental] If set, preserve null values in table data, rather than mapping null values to
* the column's default value. This flag currently defaults to false, but the default will soon be
* changed to true. Shortly afterward, this flag will be removed completely. Please specify true
* if possible, and false only if you need to force the old behavior while updating client code.
* @param preserveNulls preserveNulls or {@code null} for none
*/
public QueryRequest setPreserveNulls(java.lang.Boolean preserveNulls) {
this.preserveNulls = preserveNulls;
return this;
}
/**
* [Required] A query string, following the BigQuery query syntax of the query to execute. Table
* names should be qualified by dataset name in the format projectId:datasetId.tableId unless you
* specify the defaultDataset value. If the table is in the same project as the job, you can omit
* the project ID. Example: SELECT f1 FROM myProjectId:myDatasetId.myTableId.
* @return value or {@code null} for none
*/
public java.lang.String getQuery() {
return query;
}
/**
* [Required] A query string, following the BigQuery query syntax of the query to execute. Table
* names should be qualified by dataset name in the format projectId:datasetId.tableId unless you
* specify the defaultDataset value. If the table is in the same project as the job, you can omit
* the project ID. Example: SELECT f1 FROM myProjectId:myDatasetId.myTableId.
* @param query query or {@code null} for none
*/
public QueryRequest setQuery(java.lang.String query) {
this.query = query;
return this;
}
/**
* [Optional] How long to wait for the query to complete, in milliseconds, before returning.
* Default is to return immediately. If the timeout passes before the job completes, the request
* will fail with a TIMEOUT error.
* @return value or {@code null} for none
*/
public java.lang.Long getTimeoutMs() {
return timeoutMs;
}
/**
* [Optional] How long to wait for the query to complete, in milliseconds, before returning.
* Default is to return immediately. If the timeout passes before the job completes, the request
* will fail with a TIMEOUT error.
* @param timeoutMs timeoutMs or {@code null} for none
*/
public QueryRequest setTimeoutMs(java.lang.Long timeoutMs) {
this.timeoutMs = timeoutMs;
return this;
}
/**
* [Optional] Whether to look for the result in the query cache. The query cache is a best-effort
* cache that will be flushed whenever tables in the query are modified.
* @return value or {@code null} for none
*/
public java.lang.Boolean getUseQueryCache() {
return useQueryCache;
}
/**
* [Optional] Whether to look for the result in the query cache. The query cache is a best-effort
* cache that will be flushed whenever tables in the query are modified.
* @param useQueryCache useQueryCache or {@code null} for none
*/
public QueryRequest setUseQueryCache(java.lang.Boolean useQueryCache) {
this.useQueryCache = useQueryCache;
return this;
}
@Override
public QueryRequest set(String fieldName, Object value) {
return (QueryRequest) super.set(fieldName, value);
}
@Override
public QueryRequest clone() {
return (QueryRequest) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy