com.google.api.services.bigquery.model.JobConfigurationExtract Maven / Gradle / Ivy
/*
* 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://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.bigquery.model;
/**
* JobConfigurationExtract configures a job that exports data from a BigQuery table into Google
* Cloud Storage.
*
* 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.
*/
@SuppressWarnings("javadoc")
public final class JobConfigurationExtract extends com.google.api.client.json.GenericJson {
/**
* Optional. The compression type to use for exported files. Possible values include DEFLATE,
* GZIP, NONE, SNAPPY, and ZSTD. The default value is NONE. Not all compression formats are
* support for all file formats. DEFLATE is only supported for Avro. ZSTD is only supported for
* Parquet. Not applicable when extracting models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String compression;
/**
* Optional. The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON,
* PARQUET, or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default
* value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The
* default value for models is ML_TF_SAVED_MODEL.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String destinationFormat;
/**
* [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The
* fully-qualified Google Cloud Storage URI where the extracted table should be written.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String destinationUri;
/**
* [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should
* be written.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List destinationUris;
/**
* Optional. When extracting data in CSV format, this defines the delimiter to use between fields
* in the exported data. Default is ','. Not applicable when extracting models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String fieldDelimiter;
/**
* Optional. Model extract options only applicable when extracting models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ModelExtractOptions modelExtractOptions;
/**
* Optional. Whether to print out a header row in the results. Default is true. Not applicable
* when extracting models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean printHeader;
/**
* A reference to the model being exported.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ModelReference sourceModel;
/**
* A reference to the table being exported.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private TableReference sourceTable;
/**
* Whether to use logical types when extracting to AVRO format. Not applicable when extracting
* models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean useAvroLogicalTypes;
/**
* Optional. The compression type to use for exported files. Possible values include DEFLATE,
* GZIP, NONE, SNAPPY, and ZSTD. The default value is NONE. Not all compression formats are
* support for all file formats. DEFLATE is only supported for Avro. ZSTD is only supported for
* Parquet. Not applicable when extracting models.
* @return value or {@code null} for none
*/
public java.lang.String getCompression() {
return compression;
}
/**
* Optional. The compression type to use for exported files. Possible values include DEFLATE,
* GZIP, NONE, SNAPPY, and ZSTD. The default value is NONE. Not all compression formats are
* support for all file formats. DEFLATE is only supported for Avro. ZSTD is only supported for
* Parquet. Not applicable when extracting models.
* @param compression compression or {@code null} for none
*/
public JobConfigurationExtract setCompression(java.lang.String compression) {
this.compression = compression;
return this;
}
/**
* Optional. The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON,
* PARQUET, or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default
* value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The
* default value for models is ML_TF_SAVED_MODEL.
* @return value or {@code null} for none
*/
public java.lang.String getDestinationFormat() {
return destinationFormat;
}
/**
* Optional. The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON,
* PARQUET, or AVRO for tables and ML_TF_SAVED_MODEL or ML_XGBOOST_BOOSTER for models. The default
* value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV. The
* default value for models is ML_TF_SAVED_MODEL.
* @param destinationFormat destinationFormat or {@code null} for none
*/
public JobConfigurationExtract setDestinationFormat(java.lang.String destinationFormat) {
this.destinationFormat = destinationFormat;
return this;
}
/**
* [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The
* fully-qualified Google Cloud Storage URI where the extracted table should be written.
* @return value or {@code null} for none
*/
public java.lang.String getDestinationUri() {
return destinationUri;
}
/**
* [Pick one] DEPRECATED: Use destinationUris instead, passing only one URI as necessary. The
* fully-qualified Google Cloud Storage URI where the extracted table should be written.
* @param destinationUri destinationUri or {@code null} for none
*/
public JobConfigurationExtract setDestinationUri(java.lang.String destinationUri) {
this.destinationUri = destinationUri;
return this;
}
/**
* [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should
* be written.
* @return value or {@code null} for none
*/
public java.util.List getDestinationUris() {
return destinationUris;
}
/**
* [Pick one] A list of fully-qualified Google Cloud Storage URIs where the extracted table should
* be written.
* @param destinationUris destinationUris or {@code null} for none
*/
public JobConfigurationExtract setDestinationUris(java.util.List destinationUris) {
this.destinationUris = destinationUris;
return this;
}
/**
* Optional. When extracting data in CSV format, this defines the delimiter to use between fields
* in the exported data. Default is ','. Not applicable when extracting models.
* @return value or {@code null} for none
*/
public java.lang.String getFieldDelimiter() {
return fieldDelimiter;
}
/**
* Optional. When extracting data in CSV format, this defines the delimiter to use between fields
* in the exported data. Default is ','. Not applicable when extracting models.
* @param fieldDelimiter fieldDelimiter or {@code null} for none
*/
public JobConfigurationExtract setFieldDelimiter(java.lang.String fieldDelimiter) {
this.fieldDelimiter = fieldDelimiter;
return this;
}
/**
* Optional. Model extract options only applicable when extracting models.
* @return value or {@code null} for none
*/
public ModelExtractOptions getModelExtractOptions() {
return modelExtractOptions;
}
/**
* Optional. Model extract options only applicable when extracting models.
* @param modelExtractOptions modelExtractOptions or {@code null} for none
*/
public JobConfigurationExtract setModelExtractOptions(ModelExtractOptions modelExtractOptions) {
this.modelExtractOptions = modelExtractOptions;
return this;
}
/**
* Optional. Whether to print out a header row in the results. Default is true. Not applicable
* when extracting models.
* @return value or {@code null} for none
*/
public java.lang.Boolean getPrintHeader() {
return printHeader;
}
/**
* Optional. Whether to print out a header row in the results. Default is true. Not applicable
* when extracting models.
* @param printHeader printHeader or {@code null} for none
*/
public JobConfigurationExtract setPrintHeader(java.lang.Boolean printHeader) {
this.printHeader = printHeader;
return this;
}
/**
* Convenience method that returns only {@link Boolean#TRUE} or {@link Boolean#FALSE}.
*
*
* Boolean properties can have four possible values:
* {@code null}, {@link com.google.api.client.util.Data#NULL_BOOLEAN}, {@link Boolean#TRUE}
* or {@link Boolean#FALSE}.
*
*
*
* This method returns {@link Boolean#TRUE} if the default of the property is {@link Boolean#TRUE}
* and it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}.
* {@link Boolean#FALSE} is returned if the default of the property is {@link Boolean#FALSE} and
* it is {@code null} or {@link com.google.api.client.util.Data#NULL_BOOLEAN}.
*
*
*
* Optional. Whether to print out a header row in the results. Default is true. Not applicable when
extracting models.
*
*/
public boolean isPrintHeader() {
if (printHeader == null || printHeader == com.google.api.client.util.Data.NULL_BOOLEAN) {
return true;
}
return printHeader;
}
/**
* A reference to the model being exported.
* @return value or {@code null} for none
*/
public ModelReference getSourceModel() {
return sourceModel;
}
/**
* A reference to the model being exported.
* @param sourceModel sourceModel or {@code null} for none
*/
public JobConfigurationExtract setSourceModel(ModelReference sourceModel) {
this.sourceModel = sourceModel;
return this;
}
/**
* A reference to the table being exported.
* @return value or {@code null} for none
*/
public TableReference getSourceTable() {
return sourceTable;
}
/**
* A reference to the table being exported.
* @param sourceTable sourceTable or {@code null} for none
*/
public JobConfigurationExtract setSourceTable(TableReference sourceTable) {
this.sourceTable = sourceTable;
return this;
}
/**
* Whether to use logical types when extracting to AVRO format. Not applicable when extracting
* models.
* @return value or {@code null} for none
*/
public java.lang.Boolean getUseAvroLogicalTypes() {
return useAvroLogicalTypes;
}
/**
* Whether to use logical types when extracting to AVRO format. Not applicable when extracting
* models.
* @param useAvroLogicalTypes useAvroLogicalTypes or {@code null} for none
*/
public JobConfigurationExtract setUseAvroLogicalTypes(java.lang.Boolean useAvroLogicalTypes) {
this.useAvroLogicalTypes = useAvroLogicalTypes;
return this;
}
@Override
public JobConfigurationExtract set(String fieldName, Object value) {
return (JobConfigurationExtract) super.set(fieldName, value);
}
@Override
public JobConfigurationExtract clone() {
return (JobConfigurationExtract) super.clone();
}
}