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

com.google.cloud.dataplex.v1.Schema Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dataplex/v1/metadata.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.dataplex.v1;

/**
 *
 *
 * 
 * Schema information describing the structure and layout of the data.
 * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema} */ public final class Schema extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Schema) SchemaOrBuilder { private static final long serialVersionUID = 0L; // Use Schema.newBuilder() to construct. private Schema(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Schema() { fields_ = java.util.Collections.emptyList(); partitionFields_ = java.util.Collections.emptyList(); partitionStyle_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Schema(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.class, com.google.cloud.dataplex.v1.Schema.Builder.class); } /** * * *
   * Type information for fields in schemas and partition schemas.
   * 
* * Protobuf enum {@code google.cloud.dataplex.v1.Schema.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * SchemaType unspecified.
     * 
* * TYPE_UNSPECIFIED = 0; */ TYPE_UNSPECIFIED(0), /** * * *
     * Boolean field.
     * 
* * BOOLEAN = 1; */ BOOLEAN(1), /** * * *
     * Single byte numeric field.
     * 
* * BYTE = 2; */ BYTE(2), /** * * *
     * 16-bit numeric field.
     * 
* * INT16 = 3; */ INT16(3), /** * * *
     * 32-bit numeric field.
     * 
* * INT32 = 4; */ INT32(4), /** * * *
     * 64-bit numeric field.
     * 
* * INT64 = 5; */ INT64(5), /** * * *
     * Floating point numeric field.
     * 
* * FLOAT = 6; */ FLOAT(6), /** * * *
     * Double precision numeric field.
     * 
* * DOUBLE = 7; */ DOUBLE(7), /** * * *
     * Real value numeric field.
     * 
* * DECIMAL = 8; */ DECIMAL(8), /** * * *
     * Sequence of characters field.
     * 
* * STRING = 9; */ STRING(9), /** * * *
     * Sequence of bytes field.
     * 
* * BINARY = 10; */ BINARY(10), /** * * *
     * Date and time field.
     * 
* * TIMESTAMP = 11; */ TIMESTAMP(11), /** * * *
     * Date field.
     * 
* * DATE = 12; */ DATE(12), /** * * *
     * Time field.
     * 
* * TIME = 13; */ TIME(13), /** * * *
     * Structured field. Nested fields that define the structure of the map.
     * If all nested fields are nullable, this field represents a union.
     * 
* * RECORD = 14; */ RECORD(14), /** * * *
     * Null field that does not have values.
     * 
* * NULL = 100; */ NULL(100), UNRECOGNIZED(-1), ; /** * * *
     * SchemaType unspecified.
     * 
* * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * Boolean field.
     * 
* * BOOLEAN = 1; */ public static final int BOOLEAN_VALUE = 1; /** * * *
     * Single byte numeric field.
     * 
* * BYTE = 2; */ public static final int BYTE_VALUE = 2; /** * * *
     * 16-bit numeric field.
     * 
* * INT16 = 3; */ public static final int INT16_VALUE = 3; /** * * *
     * 32-bit numeric field.
     * 
* * INT32 = 4; */ public static final int INT32_VALUE = 4; /** * * *
     * 64-bit numeric field.
     * 
* * INT64 = 5; */ public static final int INT64_VALUE = 5; /** * * *
     * Floating point numeric field.
     * 
* * FLOAT = 6; */ public static final int FLOAT_VALUE = 6; /** * * *
     * Double precision numeric field.
     * 
* * DOUBLE = 7; */ public static final int DOUBLE_VALUE = 7; /** * * *
     * Real value numeric field.
     * 
* * DECIMAL = 8; */ public static final int DECIMAL_VALUE = 8; /** * * *
     * Sequence of characters field.
     * 
* * STRING = 9; */ public static final int STRING_VALUE = 9; /** * * *
     * Sequence of bytes field.
     * 
* * BINARY = 10; */ public static final int BINARY_VALUE = 10; /** * * *
     * Date and time field.
     * 
* * TIMESTAMP = 11; */ public static final int TIMESTAMP_VALUE = 11; /** * * *
     * Date field.
     * 
* * DATE = 12; */ public static final int DATE_VALUE = 12; /** * * *
     * Time field.
     * 
* * TIME = 13; */ public static final int TIME_VALUE = 13; /** * * *
     * Structured field. Nested fields that define the structure of the map.
     * If all nested fields are nullable, this field represents a union.
     * 
* * RECORD = 14; */ public static final int RECORD_VALUE = 14; /** * * *
     * Null field that does not have values.
     * 
* * NULL = 100; */ public static final int NULL_VALUE = 100; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Type forNumber(int value) { switch (value) { case 0: return TYPE_UNSPECIFIED; case 1: return BOOLEAN; case 2: return BYTE; case 3: return INT16; case 4: return INT32; case 5: return INT64; case 6: return FLOAT; case 7: return DOUBLE; case 8: return DECIMAL; case 9: return STRING; case 10: return BINARY; case 11: return TIMESTAMP; case 12: return DATE; case 13: return TIME; case 14: return RECORD; case 100: return NULL; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dataplex.v1.Schema.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Schema.Type) } /** * * *
   * Additional qualifiers to define field semantics.
   * 
* * Protobuf enum {@code google.cloud.dataplex.v1.Schema.Mode} */ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Mode unspecified.
     * 
* * MODE_UNSPECIFIED = 0; */ MODE_UNSPECIFIED(0), /** * * *
     * The field has required semantics.
     * 
* * REQUIRED = 1; */ REQUIRED(1), /** * * *
     * The field has optional semantics, and may be null.
     * 
* * NULLABLE = 2; */ NULLABLE(2), /** * * *
     * The field has repeated (0 or more) semantics, and is a list of values.
     * 
* * REPEATED = 3; */ REPEATED(3), UNRECOGNIZED(-1), ; /** * * *
     * Mode unspecified.
     * 
* * MODE_UNSPECIFIED = 0; */ public static final int MODE_UNSPECIFIED_VALUE = 0; /** * * *
     * The field has required semantics.
     * 
* * REQUIRED = 1; */ public static final int REQUIRED_VALUE = 1; /** * * *
     * The field has optional semantics, and may be null.
     * 
* * NULLABLE = 2; */ public static final int NULLABLE_VALUE = 2; /** * * *
     * The field has repeated (0 or more) semantics, and is a list of values.
     * 
* * REPEATED = 3; */ public static final int REPEATED_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Mode valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Mode forNumber(int value) { switch (value) { case 0: return MODE_UNSPECIFIED; case 1: return REQUIRED; case 2: return NULLABLE; case 3: return REPEATED; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Mode findValueByNumber(int number) { return Mode.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dataplex.v1.Schema.getDescriptor().getEnumTypes().get(1); } private static final Mode[] VALUES = values(); public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Mode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Schema.Mode) } /** * * *
   * The structure of paths within the entity, which represent partitions.
   * 
* * Protobuf enum {@code google.cloud.dataplex.v1.Schema.PartitionStyle} */ public enum PartitionStyle implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * PartitionStyle unspecified
     * 
* * PARTITION_STYLE_UNSPECIFIED = 0; */ PARTITION_STYLE_UNSPECIFIED(0), /** * * *
     * Partitions are hive-compatible.
     * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
     * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
     * 
* * HIVE_COMPATIBLE = 1; */ HIVE_COMPATIBLE(1), UNRECOGNIZED(-1), ; /** * * *
     * PartitionStyle unspecified
     * 
* * PARTITION_STYLE_UNSPECIFIED = 0; */ public static final int PARTITION_STYLE_UNSPECIFIED_VALUE = 0; /** * * *
     * Partitions are hive-compatible.
     * Examples: `gs://bucket/path/to/table/dt=2019-10-31/lang=en`,
     * `gs://bucket/path/to/table/dt=2019-10-31/lang=en/late`.
     * 
* * HIVE_COMPATIBLE = 1; */ public static final int HIVE_COMPATIBLE_VALUE = 1; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static PartitionStyle valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static PartitionStyle forNumber(int value) { switch (value) { case 0: return PARTITION_STYLE_UNSPECIFIED; case 1: return HIVE_COMPATIBLE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public PartitionStyle findValueByNumber(int number) { return PartitionStyle.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dataplex.v1.Schema.getDescriptor().getEnumTypes().get(2); } private static final PartitionStyle[] VALUES = values(); public static PartitionStyle valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private PartitionStyle(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Schema.PartitionStyle) } public interface SchemaFieldOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Schema.SchemaField) com.google.protobuf.MessageOrBuilder { /** * * *
     * Required. The name of the field. Must contain only letters, numbers and
     * underscores, with a maximum length of 767 characters,
     * and must begin with a letter or underscore.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ java.lang.String getName(); /** * * *
     * Required. The name of the field. Must contain only letters, numbers and
     * underscores, with a maximum length of 767 characters,
     * and must begin with a letter or underscore.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * * *
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ java.lang.String getDescription(); /** * * *
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ com.google.protobuf.ByteString getDescriptionBytes(); /** * * *
     * Required. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * * *
     * Required. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The type. */ com.google.cloud.dataplex.v1.Schema.Type getType(); /** * * *
     * Required. Additional field semantics.
     * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for mode. */ int getModeValue(); /** * * *
     * Required. Additional field semantics.
     * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The mode. */ com.google.cloud.dataplex.v1.Schema.Mode getMode(); /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ java.util.List getFieldsList(); /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index); /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ int getFieldsCount(); /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ java.util.List getFieldsOrBuilderList(); /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index); } /** * * *
   * Represents a column field within a table schema.
   * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema.SchemaField} */ public static final class SchemaField extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Schema.SchemaField) SchemaFieldOrBuilder { private static final long serialVersionUID = 0L; // Use SchemaField.newBuilder() to construct. private SchemaField(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SchemaField() { name_ = ""; description_ = ""; type_ = 0; mode_ = 0; fields_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SchemaField(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.SchemaField.class, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
     * Required. The name of the field. Must contain only letters, numbers and
     * underscores, with a maximum length of 767 characters,
     * and must begin with a letter or underscore.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
     * Required. The name of the field. Must contain only letters, numbers and
     * underscores, with a maximum length of 767 characters,
     * and must begin with a letter or underscore.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * * *
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 3; private int type_ = 0; /** * * *
     * Required. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
     * Required. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The type. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Type getType() { com.google.cloud.dataplex.v1.Schema.Type result = com.google.cloud.dataplex.v1.Schema.Type.forNumber(type_); return result == null ? com.google.cloud.dataplex.v1.Schema.Type.UNRECOGNIZED : result; } public static final int MODE_FIELD_NUMBER = 4; private int mode_ = 0; /** * * *
     * Required. Additional field semantics.
     * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for mode. */ @java.lang.Override public int getModeValue() { return mode_; } /** * * *
     * Required. Additional field semantics.
     * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The mode. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Mode getMode() { com.google.cloud.dataplex.v1.Schema.Mode result = com.google.cloud.dataplex.v1.Schema.Mode.forNumber(mode_); return result == null ? com.google.cloud.dataplex.v1.Schema.Mode.UNRECOGNIZED : result; } public static final int FIELDS_FIELD_NUMBER = 10; @SuppressWarnings("serial") private java.util.List fields_; /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getFieldsList() { return fields_; } /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getFieldsOrBuilderList() { return fields_; } /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getFieldsCount() { return fields_.size(); } /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) { return fields_.get(index); } /** * * *
     * Optional. Any nested field for complex types.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index) { return fields_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(3, type_); } if (mode_ != com.google.cloud.dataplex.v1.Schema.Mode.MODE_UNSPECIFIED.getNumber()) { output.writeEnum(4, mode_); } for (int i = 0; i < fields_.size(); i++) { output.writeMessage(10, fields_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); } if (mode_ != com.google.cloud.dataplex.v1.Schema.Mode.MODE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, mode_); } for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, fields_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dataplex.v1.Schema.SchemaField)) { return super.equals(obj); } com.google.cloud.dataplex.v1.Schema.SchemaField other = (com.google.cloud.dataplex.v1.Schema.SchemaField) obj; if (!getName().equals(other.getName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (type_ != other.type_) return false; if (mode_ != other.mode_) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; if (getFieldsCount() > 0) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.SchemaField parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dataplex.v1.Schema.SchemaField prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Represents a column field within a table schema.
     * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema.SchemaField} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Schema.SchemaField) com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.SchemaField.class, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder.class); } // Construct using com.google.cloud.dataplex.v1.Schema.SchemaField.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; description_ = ""; type_ = 0; mode_ = 0; if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); } else { fields_ = null; fieldsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_SchemaField_descriptor; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField getDefaultInstanceForType() { return com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField build() { com.google.cloud.dataplex.v1.Schema.SchemaField result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField buildPartial() { com.google.cloud.dataplex.v1.Schema.SchemaField result = new com.google.cloud.dataplex.v1.Schema.SchemaField(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.dataplex.v1.Schema.SchemaField result) { if (fieldsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { fields_ = java.util.Collections.unmodifiableList(fields_); bitField0_ = (bitField0_ & ~0x00000010); } result.fields_ = fields_; } else { result.fields_ = fieldsBuilder_.build(); } } private void buildPartial0(com.google.cloud.dataplex.v1.Schema.SchemaField result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.mode_ = mode_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dataplex.v1.Schema.SchemaField) { return mergeFrom((com.google.cloud.dataplex.v1.Schema.SchemaField) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema.SchemaField other) { if (other == com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (other.mode_ != 0) { setModeValue(other.getModeValue()); } if (fieldsBuilder_ == null) { if (!other.fields_.isEmpty()) { if (fields_.isEmpty()) { fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureFieldsIsMutable(); fields_.addAll(other.fields_); } onChanged(); } } else { if (!other.fields_.isEmpty()) { if (fieldsBuilder_.isEmpty()) { fieldsBuilder_.dispose(); fieldsBuilder_ = null; fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000010); fieldsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { fieldsBuilder_.addAllMessages(other.fields_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { type_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { mode_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 82: { com.google.cloud.dataplex.v1.Schema.SchemaField m = input.readMessage( com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), extensionRegistry); if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(m); } else { fieldsBuilder_.addMessage(m); } break; } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
       * Required. The name of the field. Must contain only letters, numbers and
       * underscores, with a maximum length of 767 characters,
       * and must begin with a letter or underscore.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Required. The name of the field. Must contain only letters, numbers and
       * underscores, with a maximum length of 767 characters,
       * and must begin with a letter or underscore.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Required. The name of the field. Must contain only letters, numbers and
       * underscores, with a maximum length of 767 characters,
       * and must begin with a letter or underscore.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Required. The name of the field. Must contain only letters, numbers and
       * underscores, with a maximum length of 767 characters,
       * and must begin with a letter or underscore.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Required. The name of the field. Must contain only letters, numbers and
       * underscores, with a maximum length of 767 characters,
       * and must begin with a letter or underscore.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object description_ = ""; /** * * *
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * 
* * string description = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int type_ = 0; /** * * *
       * Required. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
       * Required. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Required. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The type. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Type getType() { com.google.cloud.dataplex.v1.Schema.Type result = com.google.cloud.dataplex.v1.Schema.Type.forNumber(type_); return result == null ? com.google.cloud.dataplex.v1.Schema.Type.UNRECOGNIZED : result; } /** * * *
       * Required. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(com.google.cloud.dataplex.v1.Schema.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; type_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Required. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000004); type_ = 0; onChanged(); return this; } private int mode_ = 0; /** * * *
       * Required. Additional field semantics.
       * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for mode. */ @java.lang.Override public int getModeValue() { return mode_; } /** * * *
       * Required. Additional field semantics.
       * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for mode to set. * @return This builder for chaining. */ public Builder setModeValue(int value) { mode_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
       * Required. Additional field semantics.
       * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return The mode. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Mode getMode() { com.google.cloud.dataplex.v1.Schema.Mode result = com.google.cloud.dataplex.v1.Schema.Mode.forNumber(mode_); return result == null ? com.google.cloud.dataplex.v1.Schema.Mode.UNRECOGNIZED : result; } /** * * *
       * Required. Additional field semantics.
       * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The mode to set. * @return This builder for chaining. */ public Builder setMode(com.google.cloud.dataplex.v1.Schema.Mode value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; mode_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Required. Additional field semantics.
       * 
* * * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearMode() { bitField0_ = (bitField0_ & ~0x00000008); mode_ = 0; onChanged(); return this; } private java.util.List fields_ = java.util.Collections.emptyList(); private void ensureFieldsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { fields_ = new java.util.ArrayList(fields_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder> fieldsBuilder_; /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsList() { if (fieldsBuilder_ == null) { return java.util.Collections.unmodifiableList(fields_); } else { return fieldsBuilder_.getMessageList(); } } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getFieldsCount() { if (fieldsBuilder_ == null) { return fields_.size(); } else { return fieldsBuilder_.getCount(); } } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessage(index); } } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFields(int index, com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.set(index, value); onChanged(); } else { fieldsBuilder_.setMessage(index, value); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFields( int index, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.set(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields(com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(value); onChanged(); } else { fieldsBuilder_.addMessage(value); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields(int index, com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(index, value); onChanged(); } else { fieldsBuilder_.addMessage(index, value); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields( com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields( int index, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllFields( java.lang.Iterable values) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { fieldsBuilder_.addAllMessages(values); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearFields() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { fieldsBuilder_.clear(); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeFields(int index) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.remove(index); onChanged(); } else { fieldsBuilder_.remove(index); } return this; } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder( int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessageOrBuilder(index); } } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsOrBuilderList() { if (fieldsBuilder_ != null) { return fieldsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fields_); } } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder() { return getFieldsFieldBuilder() .addBuilder(com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance()); } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder(int index) { return getFieldsFieldBuilder() .addBuilder( index, com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance()); } /** * * *
       * Optional. Any nested field for complex types.
       * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsBuilderList() { return getFieldsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder> getFieldsFieldBuilder() { if (fieldsBuilder_ == null) { fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>( fields_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); fields_ = null; } return fieldsBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.Schema.SchemaField) } // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Schema.SchemaField) private static final com.google.cloud.dataplex.v1.Schema.SchemaField DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Schema.SchemaField(); } public static com.google.cloud.dataplex.v1.Schema.SchemaField getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SchemaField parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PartitionFieldOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.Schema.PartitionField) com.google.protobuf.MessageOrBuilder { /** * * *
     * Required. Partition field name must consist of letters, numbers, and
     * underscores only, with a maximum of length of 256 characters, and must
     * begin with a letter or underscore..
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ java.lang.String getName(); /** * * *
     * Required. Partition field name must consist of letters, numbers, and
     * underscores only, with a maximum of length of 256 characters, and must
     * begin with a letter or underscore..
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * * *
     * Required. Immutable. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for type. */ int getTypeValue(); /** * * *
     * Required. Immutable. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The type. */ com.google.cloud.dataplex.v1.Schema.Type getType(); } /** * * *
   * Represents a key field within the entity's partition structure. You could
   * have up to 20 partition fields, but only the first 10 partitions have the
   * filtering ability due to performance consideration. **Note:**
   * Partition fields are immutable.
   * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema.PartitionField} */ public static final class PartitionField extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.Schema.PartitionField) PartitionFieldOrBuilder { private static final long serialVersionUID = 0L; // Use PartitionField.newBuilder() to construct. private PartitionField(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PartitionField() { name_ = ""; type_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new PartitionField(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.PartitionField.class, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
     * Required. Partition field name must consist of letters, numbers, and
     * underscores only, with a maximum of length of 256 characters, and must
     * begin with a letter or underscore..
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
     * Required. Partition field name must consist of letters, numbers, and
     * underscores only, with a maximum of length of 256 characters, and must
     * begin with a letter or underscore..
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 2; private int type_ = 0; /** * * *
     * Required. Immutable. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
     * Required. Immutable. The type of field.
     * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The type. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Type getType() { com.google.cloud.dataplex.v1.Schema.Type result = com.google.cloud.dataplex.v1.Schema.Type.forNumber(type_); return result == null ? com.google.cloud.dataplex.v1.Schema.Type.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (type_ != com.google.cloud.dataplex.v1.Schema.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dataplex.v1.Schema.PartitionField)) { return super.equals(obj); } com.google.cloud.dataplex.v1.Schema.PartitionField other = (com.google.cloud.dataplex.v1.Schema.PartitionField) obj; if (!getName().equals(other.getName())) return false; if (type_ != other.type_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema.PartitionField parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dataplex.v1.Schema.PartitionField prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Represents a key field within the entity's partition structure. You could
     * have up to 20 partition fields, but only the first 10 partitions have the
     * filtering ability due to performance consideration. **Note:**
     * Partition fields are immutable.
     * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema.PartitionField} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Schema.PartitionField) com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.PartitionField.class, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder.class); } // Construct using com.google.cloud.dataplex.v1.Schema.PartitionField.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; type_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_PartitionField_descriptor; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionField getDefaultInstanceForType() { return com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionField build() { com.google.cloud.dataplex.v1.Schema.PartitionField result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionField buildPartial() { com.google.cloud.dataplex.v1.Schema.PartitionField result = new com.google.cloud.dataplex.v1.Schema.PartitionField(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.dataplex.v1.Schema.PartitionField result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.type_ = type_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dataplex.v1.Schema.PartitionField) { return mergeFrom((com.google.cloud.dataplex.v1.Schema.PartitionField) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema.PartitionField other) { if (other == com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { type_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
       * Required. Partition field name must consist of letters, numbers, and
       * underscores only, with a maximum of length of 256 characters, and must
       * begin with a letter or underscore..
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Required. Partition field name must consist of letters, numbers, and
       * underscores only, with a maximum of length of 256 characters, and must
       * begin with a letter or underscore..
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Required. Partition field name must consist of letters, numbers, and
       * underscores only, with a maximum of length of 256 characters, and must
       * begin with a letter or underscore..
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Required. Partition field name must consist of letters, numbers, and
       * underscores only, with a maximum of length of 256 characters, and must
       * begin with a letter or underscore..
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Required. Partition field name must consist of letters, numbers, and
       * underscores only, with a maximum of length of 256 characters, and must
       * begin with a letter or underscore..
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int type_ = 0; /** * * *
       * Required. Immutable. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The enum numeric value on the wire for type. */ @java.lang.Override public int getTypeValue() { return type_; } /** * * *
       * Required. Immutable. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ public Builder setTypeValue(int value) { type_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Required. Immutable. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return The type. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.Type getType() { com.google.cloud.dataplex.v1.Schema.Type result = com.google.cloud.dataplex.v1.Schema.Type.forNumber(type_); return result == null ? com.google.cloud.dataplex.v1.Schema.Type.UNRECOGNIZED : result; } /** * * *
       * Required. Immutable. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @param value The type to set. * @return This builder for chaining. */ public Builder setType(com.google.cloud.dataplex.v1.Schema.Type value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; type_ = value.getNumber(); onChanged(); return this; } /** * * *
       * Required. Immutable. The type of field.
       * 
* * * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * * * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000002); type_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.Schema.PartitionField) } // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Schema.PartitionField) private static final com.google.cloud.dataplex.v1.Schema.PartitionField DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Schema.PartitionField(); } public static com.google.cloud.dataplex.v1.Schema.PartitionField getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PartitionField parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionField getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int USER_MANAGED_FIELD_NUMBER = 1; private boolean userManaged_ = false; /** * * *
   * Required. Set to `true` if user-managed or `false` if managed by Dataplex.
   * The default is `false` (managed by Dataplex).
   *
   * - Set to `false`to enable Dataplex discovery to update the schema.
   *   including new data discovery, schema inference, and schema evolution.
   *   Users retain the ability to input and edit the schema. Dataplex
   *   treats schema input by the user as though produced
   *   by a previous Dataplex discovery operation, and it will
   *   evolve the schema and take action based on that treatment.
   *
   * - Set to `true` to fully manage the entity
   *   schema. This setting guarantees that Dataplex will not
   *   change schema fields.
   * 
* * bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The userManaged. */ @java.lang.Override public boolean getUserManaged() { return userManaged_; } public static final int FIELDS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List fields_; /** * * *
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getFieldsList() { return fields_; } /** * * *
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getFieldsOrBuilderList() { return fields_; } /** * * *
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getFieldsCount() { return fields_.size(); } /** * * *
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) { return fields_.get(index); } /** * * *
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index) { return fields_.get(index); } public static final int PARTITION_FIELDS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List partitionFields_; /** * * *
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getPartitionFieldsList() { return partitionFields_; } /** * * *
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.List getPartitionFieldsOrBuilderList() { return partitionFields_; } /** * * *
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public int getPartitionFieldsCount() { return partitionFields_.size(); } /** * * *
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionField getPartitionFields(int index) { return partitionFields_.get(index); } /** * * *
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder getPartitionFieldsOrBuilder( int index) { return partitionFields_.get(index); } public static final int PARTITION_STYLE_FIELD_NUMBER = 4; private int partitionStyle_ = 0; /** * * *
   * Optional. The structure of paths containing partition data within the
   * entity.
   * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for partitionStyle. */ @java.lang.Override public int getPartitionStyleValue() { return partitionStyle_; } /** * * *
   * Optional. The structure of paths containing partition data within the
   * entity.
   * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The partitionStyle. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionStyle getPartitionStyle() { com.google.cloud.dataplex.v1.Schema.PartitionStyle result = com.google.cloud.dataplex.v1.Schema.PartitionStyle.forNumber(partitionStyle_); return result == null ? com.google.cloud.dataplex.v1.Schema.PartitionStyle.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (userManaged_ != false) { output.writeBool(1, userManaged_); } for (int i = 0; i < fields_.size(); i++) { output.writeMessage(2, fields_.get(i)); } for (int i = 0; i < partitionFields_.size(); i++) { output.writeMessage(3, partitionFields_.get(i)); } if (partitionStyle_ != com.google.cloud.dataplex.v1.Schema.PartitionStyle.PARTITION_STYLE_UNSPECIFIED .getNumber()) { output.writeEnum(4, partitionStyle_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (userManaged_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, userManaged_); } for (int i = 0; i < fields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); } for (int i = 0; i < partitionFields_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, partitionFields_.get(i)); } if (partitionStyle_ != com.google.cloud.dataplex.v1.Schema.PartitionStyle.PARTITION_STYLE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, partitionStyle_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dataplex.v1.Schema)) { return super.equals(obj); } com.google.cloud.dataplex.v1.Schema other = (com.google.cloud.dataplex.v1.Schema) obj; if (getUserManaged() != other.getUserManaged()) return false; if (!getFieldsList().equals(other.getFieldsList())) return false; if (!getPartitionFieldsList().equals(other.getPartitionFieldsList())) return false; if (partitionStyle_ != other.partitionStyle_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USER_MANAGED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUserManaged()); if (getFieldsCount() > 0) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + getFieldsList().hashCode(); } if (getPartitionFieldsCount() > 0) { hash = (37 * hash) + PARTITION_FIELDS_FIELD_NUMBER; hash = (53 * hash) + getPartitionFieldsList().hashCode(); } hash = (37 * hash) + PARTITION_STYLE_FIELD_NUMBER; hash = (53 * hash) + partitionStyle_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dataplex.v1.Schema parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dataplex.v1.Schema parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.dataplex.v1.Schema parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dataplex.v1.Schema parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dataplex.v1.Schema prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Schema information describing the structure and layout of the data.
   * 
* * Protobuf type {@code google.cloud.dataplex.v1.Schema} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.Schema) com.google.cloud.dataplex.v1.SchemaOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dataplex.v1.Schema.class, com.google.cloud.dataplex.v1.Schema.Builder.class); } // Construct using com.google.cloud.dataplex.v1.Schema.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; userManaged_ = false; if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); } else { fields_ = null; fieldsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (partitionFieldsBuilder_ == null) { partitionFields_ = java.util.Collections.emptyList(); } else { partitionFields_ = null; partitionFieldsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); partitionStyle_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dataplex.v1.MetadataProto .internal_static_google_cloud_dataplex_v1_Schema_descriptor; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema getDefaultInstanceForType() { return com.google.cloud.dataplex.v1.Schema.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dataplex.v1.Schema build() { com.google.cloud.dataplex.v1.Schema result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema buildPartial() { com.google.cloud.dataplex.v1.Schema result = new com.google.cloud.dataplex.v1.Schema(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.dataplex.v1.Schema result) { if (fieldsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { fields_ = java.util.Collections.unmodifiableList(fields_); bitField0_ = (bitField0_ & ~0x00000002); } result.fields_ = fields_; } else { result.fields_ = fieldsBuilder_.build(); } if (partitionFieldsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { partitionFields_ = java.util.Collections.unmodifiableList(partitionFields_); bitField0_ = (bitField0_ & ~0x00000004); } result.partitionFields_ = partitionFields_; } else { result.partitionFields_ = partitionFieldsBuilder_.build(); } } private void buildPartial0(com.google.cloud.dataplex.v1.Schema result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.userManaged_ = userManaged_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.partitionStyle_ = partitionStyle_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dataplex.v1.Schema) { return mergeFrom((com.google.cloud.dataplex.v1.Schema) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dataplex.v1.Schema other) { if (other == com.google.cloud.dataplex.v1.Schema.getDefaultInstance()) return this; if (other.getUserManaged() != false) { setUserManaged(other.getUserManaged()); } if (fieldsBuilder_ == null) { if (!other.fields_.isEmpty()) { if (fields_.isEmpty()) { fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureFieldsIsMutable(); fields_.addAll(other.fields_); } onChanged(); } } else { if (!other.fields_.isEmpty()) { if (fieldsBuilder_.isEmpty()) { fieldsBuilder_.dispose(); fieldsBuilder_ = null; fields_ = other.fields_; bitField0_ = (bitField0_ & ~0x00000002); fieldsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFieldsFieldBuilder() : null; } else { fieldsBuilder_.addAllMessages(other.fields_); } } } if (partitionFieldsBuilder_ == null) { if (!other.partitionFields_.isEmpty()) { if (partitionFields_.isEmpty()) { partitionFields_ = other.partitionFields_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensurePartitionFieldsIsMutable(); partitionFields_.addAll(other.partitionFields_); } onChanged(); } } else { if (!other.partitionFields_.isEmpty()) { if (partitionFieldsBuilder_.isEmpty()) { partitionFieldsBuilder_.dispose(); partitionFieldsBuilder_ = null; partitionFields_ = other.partitionFields_; bitField0_ = (bitField0_ & ~0x00000004); partitionFieldsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPartitionFieldsFieldBuilder() : null; } else { partitionFieldsBuilder_.addAllMessages(other.partitionFields_); } } } if (other.partitionStyle_ != 0) { setPartitionStyleValue(other.getPartitionStyleValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { userManaged_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { com.google.cloud.dataplex.v1.Schema.SchemaField m = input.readMessage( com.google.cloud.dataplex.v1.Schema.SchemaField.parser(), extensionRegistry); if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(m); } else { fieldsBuilder_.addMessage(m); } break; } // case 18 case 26: { com.google.cloud.dataplex.v1.Schema.PartitionField m = input.readMessage( com.google.cloud.dataplex.v1.Schema.PartitionField.parser(), extensionRegistry); if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); partitionFields_.add(m); } else { partitionFieldsBuilder_.addMessage(m); } break; } // case 26 case 32: { partitionStyle_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private boolean userManaged_; /** * * *
     * Required. Set to `true` if user-managed or `false` if managed by Dataplex.
     * The default is `false` (managed by Dataplex).
     *
     * - Set to `false`to enable Dataplex discovery to update the schema.
     *   including new data discovery, schema inference, and schema evolution.
     *   Users retain the ability to input and edit the schema. Dataplex
     *   treats schema input by the user as though produced
     *   by a previous Dataplex discovery operation, and it will
     *   evolve the schema and take action based on that treatment.
     *
     * - Set to `true` to fully manage the entity
     *   schema. This setting guarantees that Dataplex will not
     *   change schema fields.
     * 
* * bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The userManaged. */ @java.lang.Override public boolean getUserManaged() { return userManaged_; } /** * * *
     * Required. Set to `true` if user-managed or `false` if managed by Dataplex.
     * The default is `false` (managed by Dataplex).
     *
     * - Set to `false`to enable Dataplex discovery to update the schema.
     *   including new data discovery, schema inference, and schema evolution.
     *   Users retain the ability to input and edit the schema. Dataplex
     *   treats schema input by the user as though produced
     *   by a previous Dataplex discovery operation, and it will
     *   evolve the schema and take action based on that treatment.
     *
     * - Set to `true` to fully manage the entity
     *   schema. This setting guarantees that Dataplex will not
     *   change schema fields.
     * 
* * bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The userManaged to set. * @return This builder for chaining. */ public Builder setUserManaged(boolean value) { userManaged_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Set to `true` if user-managed or `false` if managed by Dataplex.
     * The default is `false` (managed by Dataplex).
     *
     * - Set to `false`to enable Dataplex discovery to update the schema.
     *   including new data discovery, schema inference, and schema evolution.
     *   Users retain the ability to input and edit the schema. Dataplex
     *   treats schema input by the user as though produced
     *   by a previous Dataplex discovery operation, and it will
     *   evolve the schema and take action based on that treatment.
     *
     * - Set to `true` to fully manage the entity
     *   schema. This setting guarantees that Dataplex will not
     *   change schema fields.
     * 
* * bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearUserManaged() { bitField0_ = (bitField0_ & ~0x00000001); userManaged_ = false; onChanged(); return this; } private java.util.List fields_ = java.util.Collections.emptyList(); private void ensureFieldsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { fields_ = new java.util.ArrayList(fields_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder> fieldsBuilder_; /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsList() { if (fieldsBuilder_ == null) { return java.util.Collections.unmodifiableList(fields_); } else { return fieldsBuilder_.getMessageList(); } } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getFieldsCount() { if (fieldsBuilder_ == null) { return fields_.size(); } else { return fieldsBuilder_.getCount(); } } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessage(index); } } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFields(int index, com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.set(index, value); onChanged(); } else { fieldsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setFields( int index, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.set(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields(com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(value); onChanged(); } else { fieldsBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields(int index, com.google.cloud.dataplex.v1.Schema.SchemaField value) { if (fieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFieldsIsMutable(); fields_.add(index, value); onChanged(); } else { fieldsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields( com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addFields( int index, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder builderForValue) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.add(index, builderForValue.build()); onChanged(); } else { fieldsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllFields( java.lang.Iterable values) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); onChanged(); } else { fieldsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearFields() { if (fieldsBuilder_ == null) { fields_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { fieldsBuilder_.clear(); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeFields(int index) { if (fieldsBuilder_ == null) { ensureFieldsIsMutable(); fields_.remove(index); onChanged(); } else { fieldsBuilder_.remove(index); } return this; } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder getFieldsBuilder(int index) { return getFieldsFieldBuilder().getBuilder(index); } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index) { if (fieldsBuilder_ == null) { return fields_.get(index); } else { return fieldsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsOrBuilderList() { if (fieldsBuilder_ != null) { return fieldsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fields_); } } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder() { return getFieldsFieldBuilder() .addBuilder(com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance()); } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder(int index) { return getFieldsFieldBuilder() .addBuilder(index, com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance()); } /** * * *
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getFieldsBuilderList() { return getFieldsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder> getFieldsFieldBuilder() { if (fieldsBuilder_ == null) { fieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.SchemaField, com.google.cloud.dataplex.v1.Schema.SchemaField.Builder, com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>( fields_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fields_ = null; } return fieldsBuilder_; } private java.util.List partitionFields_ = java.util.Collections.emptyList(); private void ensurePartitionFieldsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { partitionFields_ = new java.util.ArrayList( partitionFields_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.PartitionField, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder, com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder> partitionFieldsBuilder_; /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getPartitionFieldsList() { if (partitionFieldsBuilder_ == null) { return java.util.Collections.unmodifiableList(partitionFields_); } else { return partitionFieldsBuilder_.getMessageList(); } } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getPartitionFieldsCount() { if (partitionFieldsBuilder_ == null) { return partitionFields_.size(); } else { return partitionFieldsBuilder_.getCount(); } } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.PartitionField getPartitionFields(int index) { if (partitionFieldsBuilder_ == null) { return partitionFields_.get(index); } else { return partitionFieldsBuilder_.getMessage(index); } } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPartitionFields( int index, com.google.cloud.dataplex.v1.Schema.PartitionField value) { if (partitionFieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartitionFieldsIsMutable(); partitionFields_.set(index, value); onChanged(); } else { partitionFieldsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPartitionFields( int index, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder builderForValue) { if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); partitionFields_.set(index, builderForValue.build()); onChanged(); } else { partitionFieldsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addPartitionFields(com.google.cloud.dataplex.v1.Schema.PartitionField value) { if (partitionFieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartitionFieldsIsMutable(); partitionFields_.add(value); onChanged(); } else { partitionFieldsBuilder_.addMessage(value); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addPartitionFields( int index, com.google.cloud.dataplex.v1.Schema.PartitionField value) { if (partitionFieldsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartitionFieldsIsMutable(); partitionFields_.add(index, value); onChanged(); } else { partitionFieldsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addPartitionFields( com.google.cloud.dataplex.v1.Schema.PartitionField.Builder builderForValue) { if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); partitionFields_.add(builderForValue.build()); onChanged(); } else { partitionFieldsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addPartitionFields( int index, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder builderForValue) { if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); partitionFields_.add(index, builderForValue.build()); onChanged(); } else { partitionFieldsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllPartitionFields( java.lang.Iterable values) { if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partitionFields_); onChanged(); } else { partitionFieldsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearPartitionFields() { if (partitionFieldsBuilder_ == null) { partitionFields_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { partitionFieldsBuilder_.clear(); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removePartitionFields(int index) { if (partitionFieldsBuilder_ == null) { ensurePartitionFieldsIsMutable(); partitionFields_.remove(index); onChanged(); } else { partitionFieldsBuilder_.remove(index); } return this; } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder getPartitionFieldsBuilder( int index) { return getPartitionFieldsFieldBuilder().getBuilder(index); } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder getPartitionFieldsOrBuilder( int index) { if (partitionFieldsBuilder_ == null) { return partitionFields_.get(index); } else { return partitionFieldsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getPartitionFieldsOrBuilderList() { if (partitionFieldsBuilder_ != null) { return partitionFieldsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(partitionFields_); } } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder addPartitionFieldsBuilder() { return getPartitionFieldsFieldBuilder() .addBuilder(com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance()); } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder addPartitionFieldsBuilder( int index) { return getPartitionFieldsFieldBuilder() .addBuilder( index, com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance()); } /** * * *
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * 
* * * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List getPartitionFieldsBuilderList() { return getPartitionFieldsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.PartitionField, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder, com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder> getPartitionFieldsFieldBuilder() { if (partitionFieldsBuilder_ == null) { partitionFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dataplex.v1.Schema.PartitionField, com.google.cloud.dataplex.v1.Schema.PartitionField.Builder, com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder>( partitionFields_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partitionFields_ = null; } return partitionFieldsBuilder_; } private int partitionStyle_ = 0; /** * * *
     * Optional. The structure of paths containing partition data within the
     * entity.
     * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for partitionStyle. */ @java.lang.Override public int getPartitionStyleValue() { return partitionStyle_; } /** * * *
     * Optional. The structure of paths containing partition data within the
     * entity.
     * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for partitionStyle to set. * @return This builder for chaining. */ public Builder setPartitionStyleValue(int value) { partitionStyle_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. The structure of paths containing partition data within the
     * entity.
     * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The partitionStyle. */ @java.lang.Override public com.google.cloud.dataplex.v1.Schema.PartitionStyle getPartitionStyle() { com.google.cloud.dataplex.v1.Schema.PartitionStyle result = com.google.cloud.dataplex.v1.Schema.PartitionStyle.forNumber(partitionStyle_); return result == null ? com.google.cloud.dataplex.v1.Schema.PartitionStyle.UNRECOGNIZED : result; } /** * * *
     * Optional. The structure of paths containing partition data within the
     * entity.
     * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The partitionStyle to set. * @return This builder for chaining. */ public Builder setPartitionStyle(com.google.cloud.dataplex.v1.Schema.PartitionStyle value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; partitionStyle_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. The structure of paths containing partition data within the
     * entity.
     * 
* * * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearPartitionStyle() { bitField0_ = (bitField0_ & ~0x00000008); partitionStyle_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.Schema) } // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.Schema) private static final com.google.cloud.dataplex.v1.Schema DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.Schema(); } public static com.google.cloud.dataplex.v1.Schema getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Schema parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.dataplex.v1.Schema getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy