All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.bigquery.model.TableFieldSchema Maven / Gradle / Ivy

There is a newer version: v2-rev20241027-2.0.0
Show newest version
/*
 * 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;

/**
 * A field in TableSchema
 *
 * 

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 TableFieldSchema extends com.google.api.client.json.GenericJson { /** * Deprecated. * The value may be {@code null}. */ @com.google.api.client.util.Key private Categories categories; /** * Optional. Field collation can be set only when the type of field is STRING. The following * values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. * Default to case-sensitive behavior. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String collation; /** * Optional. A SQL expression to specify the [default value] * (https://cloud.google.com/bigquery/docs/default-values) for this field. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String defaultValueExpression; /** * Optional. The field description. The maximum length is 1,024 characters. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String description; /** * Optional. Describes the nested schema fields if the type property is set to RECORD. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List fields; /** * Optional. Definition of the foreign data type. Only valid for top-level schema fields (not * nested fields). If the type is FOREIGN, this field is required. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String foreignTypeDefinition; /** * Optional. Definition of how values are generated for the field. Setting this option means that * the field is an identity column. Only valid for top-level schema INTEGER fields (not nested * fields). * The value may be {@code null}. */ @com.google.api.client.util.Key private IdentityColumnInfo identityColumnInfo; /** * Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not * specified, no maximum length constraint is imposed on this field. If type = "STRING", then * max_length represents the maximum UTF-8 length of strings in this field. If type = "BYTES", * then max_length represents the maximum number of bytes in this field. It is invalid to set this * field if type ≠ "STRING" and ≠ "BYTES". * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long maxLength; /** * Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default * value is NULLABLE. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String mode; /** * Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or * underscores (_), and must start with a letter or underscore. The maximum length is 300 * characters. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String name; /** * Optional. The policy tags attached to this field, used for field-level access control. If not * set, defaults to empty policy_tags. * The value may be {@code null}. */ @com.google.api.client.util.Key private PolicyTags policyTags; /** * Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of * digits in the fractional part in base 10) constraints for values of this field for NUMERIC or * BIGNUMERIC. It is invalid to set precision or scale if type ≠ "NUMERIC" and ≠ "BIGNUMERIC". If * precision and scale are not specified, no value range constraint is imposed on this field * insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be * in this range when: * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * * Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): * [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: * If type * = "NUMERIC": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ * precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is * specified but not scale (and thus scale is interpreted to be equal to zero): * If type = * "NUMERIC": 1 ≤ precision ≤ 29. * If type = "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is * specified but not precision, then it is invalid. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long precision; /** * Represents the type of a field element. * The value may be {@code null}. */ @com.google.api.client.util.Key private RangeElementType rangeElementType; /** * Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC * type. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String roundingMode; /** * Optional. See documentation for precision. * The value may be {@code null}. */ @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.lang.Long scale; /** * Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE ([Preview](/products/#product-launch- * stages)) Use of RECORD/STRUCT indicates that the field contains a nested schema. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * Deprecated. * @return value or {@code null} for none */ public Categories getCategories() { return categories; } /** * Deprecated. * @param categories categories or {@code null} for none */ public TableFieldSchema setCategories(Categories categories) { this.categories = categories; return this; } /** * Optional. Field collation can be set only when the type of field is STRING. The following * values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. * Default to case-sensitive behavior. * @return value or {@code null} for none */ public java.lang.String getCollation() { return collation; } /** * Optional. Field collation can be set only when the type of field is STRING. The following * values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. * Default to case-sensitive behavior. * @param collation collation or {@code null} for none */ public TableFieldSchema setCollation(java.lang.String collation) { this.collation = collation; return this; } /** * Optional. A SQL expression to specify the [default value] * (https://cloud.google.com/bigquery/docs/default-values) for this field. * @return value or {@code null} for none */ public java.lang.String getDefaultValueExpression() { return defaultValueExpression; } /** * Optional. A SQL expression to specify the [default value] * (https://cloud.google.com/bigquery/docs/default-values) for this field. * @param defaultValueExpression defaultValueExpression or {@code null} for none */ public TableFieldSchema setDefaultValueExpression(java.lang.String defaultValueExpression) { this.defaultValueExpression = defaultValueExpression; return this; } /** * Optional. The field description. The maximum length is 1,024 characters. * @return value or {@code null} for none */ public java.lang.String getDescription() { return description; } /** * Optional. The field description. The maximum length is 1,024 characters. * @param description description or {@code null} for none */ public TableFieldSchema setDescription(java.lang.String description) { this.description = description; return this; } /** * Optional. Describes the nested schema fields if the type property is set to RECORD. * @return value or {@code null} for none */ public java.util.List getFields() { return fields; } /** * Optional. Describes the nested schema fields if the type property is set to RECORD. * @param fields fields or {@code null} for none */ public TableFieldSchema setFields(java.util.List fields) { this.fields = fields; return this; } /** * Optional. Definition of the foreign data type. Only valid for top-level schema fields (not * nested fields). If the type is FOREIGN, this field is required. * @return value or {@code null} for none */ public java.lang.String getForeignTypeDefinition() { return foreignTypeDefinition; } /** * Optional. Definition of the foreign data type. Only valid for top-level schema fields (not * nested fields). If the type is FOREIGN, this field is required. * @param foreignTypeDefinition foreignTypeDefinition or {@code null} for none */ public TableFieldSchema setForeignTypeDefinition(java.lang.String foreignTypeDefinition) { this.foreignTypeDefinition = foreignTypeDefinition; return this; } /** * Optional. Definition of how values are generated for the field. Setting this option means that * the field is an identity column. Only valid for top-level schema INTEGER fields (not nested * fields). * @return value or {@code null} for none */ public IdentityColumnInfo getIdentityColumnInfo() { return identityColumnInfo; } /** * Optional. Definition of how values are generated for the field. Setting this option means that * the field is an identity column. Only valid for top-level schema INTEGER fields (not nested * fields). * @param identityColumnInfo identityColumnInfo or {@code null} for none */ public TableFieldSchema setIdentityColumnInfo(IdentityColumnInfo identityColumnInfo) { this.identityColumnInfo = identityColumnInfo; return this; } /** * Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not * specified, no maximum length constraint is imposed on this field. If type = "STRING", then * max_length represents the maximum UTF-8 length of strings in this field. If type = "BYTES", * then max_length represents the maximum number of bytes in this field. It is invalid to set this * field if type ≠ "STRING" and ≠ "BYTES". * @return value or {@code null} for none */ public java.lang.Long getMaxLength() { return maxLength; } /** * Optional. Maximum length of values of this field for STRINGS or BYTES. If max_length is not * specified, no maximum length constraint is imposed on this field. If type = "STRING", then * max_length represents the maximum UTF-8 length of strings in this field. If type = "BYTES", * then max_length represents the maximum number of bytes in this field. It is invalid to set this * field if type ≠ "STRING" and ≠ "BYTES". * @param maxLength maxLength or {@code null} for none */ public TableFieldSchema setMaxLength(java.lang.Long maxLength) { this.maxLength = maxLength; return this; } /** * Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default * value is NULLABLE. * @return value or {@code null} for none */ public java.lang.String getMode() { return mode; } /** * Optional. The field mode. Possible values include NULLABLE, REQUIRED and REPEATED. The default * value is NULLABLE. * @param mode mode or {@code null} for none */ public TableFieldSchema setMode(java.lang.String mode) { this.mode = mode; return this; } /** * Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or * underscores (_), and must start with a letter or underscore. The maximum length is 300 * characters. * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * Required. The field name. The name must contain only letters (a-z, A-Z), numbers (0-9), or * underscores (_), and must start with a letter or underscore. The maximum length is 300 * characters. * @param name name or {@code null} for none */ public TableFieldSchema setName(java.lang.String name) { this.name = name; return this; } /** * Optional. The policy tags attached to this field, used for field-level access control. If not * set, defaults to empty policy_tags. * @return value or {@code null} for none */ public PolicyTags getPolicyTags() { return policyTags; } /** * Optional. The policy tags attached to this field, used for field-level access control. If not * set, defaults to empty policy_tags. * @param policyTags policyTags or {@code null} for none */ public TableFieldSchema setPolicyTags(PolicyTags policyTags) { this.policyTags = policyTags; return this; } /** * Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of * digits in the fractional part in base 10) constraints for values of this field for NUMERIC or * BIGNUMERIC. It is invalid to set precision or scale if type ≠ "NUMERIC" and ≠ "BIGNUMERIC". If * precision and scale are not specified, no value range constraint is imposed on this field * insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be * in this range when: * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * * Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): * [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: * If type * = "NUMERIC": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ * precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is * specified but not scale (and thus scale is interpreted to be equal to zero): * If type = * "NUMERIC": 1 ≤ precision ≤ 29. * If type = "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is * specified but not precision, then it is invalid. * @return value or {@code null} for none */ public java.lang.Long getPrecision() { return precision; } /** * Optional. Precision (maximum number of total digits in base 10) and scale (maximum number of * digits in the fractional part in base 10) constraints for values of this field for NUMERIC or * BIGNUMERIC. It is invalid to set precision or scale if type ≠ "NUMERIC" and ≠ "BIGNUMERIC". If * precision and scale are not specified, no value range constraint is imposed on this field * insofar as values are permitted by the type. Values of this NUMERIC or BIGNUMERIC field must be * in this range when: * Precision (P) and scale (S) are specified: [-10P-S + 10-S, 10P-S - 10-S] * * Precision (P) is specified but not scale (and thus scale is interpreted to be equal to zero): * [-10P + 1, 10P - 1]. Acceptable values for precision and scale if both are specified: * If type * = "NUMERIC": 1 ≤ precision - scale ≤ 29 and 0 ≤ scale ≤ 9. * If type = "BIGNUMERIC": 1 ≤ * precision - scale ≤ 38 and 0 ≤ scale ≤ 38. Acceptable values for precision if only precision is * specified but not scale (and thus scale is interpreted to be equal to zero): * If type = * "NUMERIC": 1 ≤ precision ≤ 29. * If type = "BIGNUMERIC": 1 ≤ precision ≤ 38. If scale is * specified but not precision, then it is invalid. * @param precision precision or {@code null} for none */ public TableFieldSchema setPrecision(java.lang.Long precision) { this.precision = precision; return this; } /** * Represents the type of a field element. * @return value or {@code null} for none */ public RangeElementType getRangeElementType() { return rangeElementType; } /** * Represents the type of a field element. * @param rangeElementType rangeElementType or {@code null} for none */ public TableFieldSchema setRangeElementType(RangeElementType rangeElementType) { this.rangeElementType = rangeElementType; return this; } /** * Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC * type. * @return value or {@code null} for none */ public java.lang.String getRoundingMode() { return roundingMode; } /** * Optional. Specifies the rounding mode to be used when storing values of NUMERIC and BIGNUMERIC * type. * @param roundingMode roundingMode or {@code null} for none */ public TableFieldSchema setRoundingMode(java.lang.String roundingMode) { this.roundingMode = roundingMode; return this; } /** * Optional. See documentation for precision. * @return value or {@code null} for none */ public java.lang.Long getScale() { return scale; } /** * Optional. See documentation for precision. * @param scale scale or {@code null} for none */ public TableFieldSchema setScale(java.lang.Long scale) { this.scale = scale; return this; } /** * Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE ([Preview](/products/#product-launch- * stages)) Use of RECORD/STRUCT indicates that the field contains a nested schema. * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * Required. The field data type. Possible values include: * STRING * BYTES * INTEGER (or INT64) * * FLOAT (or FLOAT64) * BOOLEAN (or BOOL) * TIMESTAMP * DATE * TIME * DATETIME * GEOGRAPHY * * NUMERIC * BIGNUMERIC * JSON * RECORD (or STRUCT) * RANGE ([Preview](/products/#product-launch- * stages)) Use of RECORD/STRUCT indicates that the field contains a nested schema. * @param type type or {@code null} for none */ public TableFieldSchema setType(java.lang.String type) { this.type = type; return this; } @Override public TableFieldSchema set(String fieldName, Object value) { return (TableFieldSchema) super.set(fieldName, value); } @Override public TableFieldSchema clone() { return (TableFieldSchema) super.clone(); } /** * Deprecated. */ public static final class Categories extends com.google.api.client.json.GenericJson { /** * Deprecated. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List names; /** * Deprecated. * @return value or {@code null} for none */ public java.util.List getNames() { return names; } /** * Deprecated. * @param names names or {@code null} for none */ public Categories setNames(java.util.List names) { this.names = names; return this; } @Override public Categories set(String fieldName, Object value) { return (Categories) super.set(fieldName, value); } @Override public Categories clone() { return (Categories) super.clone(); } } /** * Optional. The policy tags attached to this field, used for field-level access control. If not * set, defaults to empty policy_tags. */ public static final class PolicyTags extends com.google.api.client.json.GenericJson { /** * A list of policy tag resource names. For example, * "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List names; /** * A list of policy tag resource names. For example, * "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed. * @return value or {@code null} for none */ public java.util.List getNames() { return names; } /** * A list of policy tag resource names. For example, * "projects/1/locations/eu/taxonomies/2/policyTags/3". At most 1 policy tag is currently allowed. * @param names names or {@code null} for none */ public PolicyTags setNames(java.util.List names) { this.names = names; return this; } @Override public PolicyTags set(String fieldName, Object value) { return (PolicyTags) super.set(fieldName, value); } @Override public PolicyTags clone() { return (PolicyTags) super.clone(); } } /** * Represents the type of a field element. */ public static final class RangeElementType extends com.google.api.client.json.GenericJson { /** * Required. The type of a field element. For more information, see TableFieldSchema.type. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String type; /** * Required. The type of a field element. For more information, see TableFieldSchema.type. * @return value or {@code null} for none */ public java.lang.String getType() { return type; } /** * Required. The type of a field element. For more information, see TableFieldSchema.type. * @param type type or {@code null} for none */ public RangeElementType setType(java.lang.String type) { this.type = type; return this; } @Override public RangeElementType set(String fieldName, Object value) { return (RangeElementType) super.set(fieldName, value); } @Override public RangeElementType clone() { return (RangeElementType) super.clone(); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy