/*
 * Copyright 2020 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

package com.google.cloud.dataplex.v1;

/**
 *
 *
 * <pre>
 * Schema information describing the structure and layout of the data.
 * </pre>
 *
 * 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();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  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);
  }

  /**
   *
   *
   * <pre>
   * Type information for fields in schemas and partition schemas.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.dataplex.v1.Schema.Type}
   */
  public enum Type implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * SchemaType unspecified.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Boolean field.
     * </pre>
     *
     * <code>BOOLEAN = 1;</code>
     */
    BOOLEAN(1),
    /**
     *
     *
     * <pre>
     * Single byte numeric field.
     * </pre>
     *
     * <code>BYTE = 2;</code>
     */
    BYTE(2),
    /**
     *
     *
     * <pre>
     * 16-bit numeric field.
     * </pre>
     *
     * <code>INT16 = 3;</code>
     */
    INT16(3),
    /**
     *
     *
     * <pre>
     * 32-bit numeric field.
     * </pre>
     *
     * <code>INT32 = 4;</code>
     */
    INT32(4),
    /**
     *
     *
     * <pre>
     * 64-bit numeric field.
     * </pre>
     *
     * <code>INT64 = 5;</code>
     */
    INT64(5),
    /**
     *
     *
     * <pre>
     * Floating point numeric field.
     * </pre>
     *
     * <code>FLOAT = 6;</code>
     */
    FLOAT(6),
    /**
     *
     *
     * <pre>
     * Double precision numeric field.
     * </pre>
     *
     * <code>DOUBLE = 7;</code>
     */
    DOUBLE(7),
    /**
     *
     *
     * <pre>
     * Real value numeric field.
     * </pre>
     *
     * <code>DECIMAL = 8;</code>
     */
    DECIMAL(8),
    /**
     *
     *
     * <pre>
     * Sequence of characters field.
     * </pre>
     *
     * <code>STRING = 9;</code>
     */
    STRING(9),
    /**
     *
     *
     * <pre>
     * Sequence of bytes field.
     * </pre>
     *
     * <code>BINARY = 10;</code>
     */
    BINARY(10),
    /**
     *
     *
     * <pre>
     * Date and time field.
     * </pre>
     *
     * <code>TIMESTAMP = 11;</code>
     */
    TIMESTAMP(11),
    /**
     *
     *
     * <pre>
     * Date field.
     * </pre>
     *
     * <code>DATE = 12;</code>
     */
    DATE(12),
    /**
     *
     *
     * <pre>
     * Time field.
     * </pre>
     *
     * <code>TIME = 13;</code>
     */
    TIME(13),
    /**
     *
     *
     * <pre>
     * Structured field. Nested fields that define the structure of the map.
     * If all nested fields are nullable, this field represents a union.
     * </pre>
     *
     * <code>RECORD = 14;</code>
     */
    RECORD(14),
    /**
     *
     *
     * <pre>
     * Null field that does not have values.
     * </pre>
     *
     * <code>NULL = 100;</code>
     */
    NULL(100),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * SchemaType unspecified.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Boolean field.
     * </pre>
     *
     * <code>BOOLEAN = 1;</code>
     */
    public static final int BOOLEAN_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Single byte numeric field.
     * </pre>
     *
     * <code>BYTE = 2;</code>
     */
    public static final int BYTE_VALUE = 2;
    /**
     *
     *
     * <pre>
     * 16-bit numeric field.
     * </pre>
     *
     * <code>INT16 = 3;</code>
     */
    public static final int INT16_VALUE = 3;
    /**
     *
     *
     * <pre>
     * 32-bit numeric field.
     * </pre>
     *
     * <code>INT32 = 4;</code>
     */
    public static final int INT32_VALUE = 4;
    /**
     *
     *
     * <pre>
     * 64-bit numeric field.
     * </pre>
     *
     * <code>INT64 = 5;</code>
     */
    public static final int INT64_VALUE = 5;
    /**
     *
     *
     * <pre>
     * Floating point numeric field.
     * </pre>
     *
     * <code>FLOAT = 6;</code>
     */
    public static final int FLOAT_VALUE = 6;
    /**
     *
     *
     * <pre>
     * Double precision numeric field.
     * </pre>
     *
     * <code>DOUBLE = 7;</code>
     */
    public static final int DOUBLE_VALUE = 7;
    /**
     *
     *
     * <pre>
     * Real value numeric field.
     * </pre>
     *
     * <code>DECIMAL = 8;</code>
     */
    public static final int DECIMAL_VALUE = 8;
    /**
     *
     *
     * <pre>
     * Sequence of characters field.
     * </pre>
     *
     * <code>STRING = 9;</code>
     */
    public static final int STRING_VALUE = 9;
    /**
     *
     *
     * <pre>
     * Sequence of bytes field.
     * </pre>
     *
     * <code>BINARY = 10;</code>
     */
    public static final int BINARY_VALUE = 10;
    /**
     *
     *
     * <pre>
     * Date and time field.
     * </pre>
     *
     * <code>TIMESTAMP = 11;</code>
     */
    public static final int TIMESTAMP_VALUE = 11;
    /**
     *
     *
     * <pre>
     * Date field.
     * </pre>
     *
     * <code>DATE = 12;</code>
     */
    public static final int DATE_VALUE = 12;
    /**
     *
     *
     * <pre>
     * Time field.
     * </pre>
     *
     * <code>TIME = 13;</code>
     */
    public static final int TIME_VALUE = 13;
    /**
     *
     *
     * <pre>
     * Structured field. Nested fields that define the structure of the map.
     * If all nested fields are nullable, this field represents a union.
     * </pre>
     *
     * <code>RECORD = 14;</code>
     */
    public static final int RECORD_VALUE = 14;
    /**
     *
     *
     * <pre>
     * Null field that does not have values.
     * </pre>
     *
     * <code>NULL = 100;</code>
     */
    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<Type> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Type>() {
          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)
  }

  /**
   *
   *
   * <pre>
   * Additional qualifiers to define field semantics.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.dataplex.v1.Schema.Mode}
   */
  public enum Mode implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Mode unspecified.
     * </pre>
     *
     * <code>MODE_UNSPECIFIED = 0;</code>
     */
    MODE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The field has required semantics.
     * </pre>
     *
     * <code>REQUIRED = 1;</code>
     */
    REQUIRED(1),
    /**
     *
     *
     * <pre>
     * The field has optional semantics, and may be null.
     * </pre>
     *
     * <code>NULLABLE = 2;</code>
     */
    NULLABLE(2),
    /**
     *
     *
     * <pre>
     * The field has repeated (0 or more) semantics, and is a list of values.
     * </pre>
     *
     * <code>REPEATED = 3;</code>
     */
    REPEATED(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Mode unspecified.
     * </pre>
     *
     * <code>MODE_UNSPECIFIED = 0;</code>
     */
    public static final int MODE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The field has required semantics.
     * </pre>
     *
     * <code>REQUIRED = 1;</code>
     */
    public static final int REQUIRED_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The field has optional semantics, and may be null.
     * </pre>
     *
     * <code>NULLABLE = 2;</code>
     */
    public static final int NULLABLE_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The field has repeated (0 or more) semantics, and is a list of values.
     * </pre>
     *
     * <code>REPEATED = 3;</code>
     */
    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<Mode> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Mode> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Mode>() {
          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)
  }

  /**
   *
   *
   * <pre>
   * The structure of paths within the entity, which represent partitions.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.dataplex.v1.Schema.PartitionStyle}
   */
  public enum PartitionStyle implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * PartitionStyle unspecified
     * </pre>
     *
     * <code>PARTITION_STYLE_UNSPECIFIED = 0;</code>
     */
    PARTITION_STYLE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * 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`.
     * </pre>
     *
     * <code>HIVE_COMPATIBLE = 1;</code>
     */
    HIVE_COMPATIBLE(1),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * PartitionStyle unspecified
     * </pre>
     *
     * <code>PARTITION_STYLE_UNSPECIFIED = 0;</code>
     */
    public static final int PARTITION_STYLE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * 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`.
     * </pre>
     *
     * <code>HIVE_COMPATIBLE = 1;</code>
     */
    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<PartitionStyle> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<PartitionStyle> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<PartitionStyle>() {
          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 {

    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The name.
     */
    java.lang.String getName();
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for name.
     */
    com.google.protobuf.ByteString getNameBytes();

    /**
     *
     *
     * <pre>
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The description.
     */
    java.lang.String getDescription();
    /**
     *
     *
     * <pre>
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @return The bytes for description.
     */
    com.google.protobuf.ByteString getDescriptionBytes();

    /**
     *
     *
     * <pre>
     * Required. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    int getTypeValue();
    /**
     *
     *
     * <pre>
     * Required. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The type.
     */
    com.google.cloud.dataplex.v1.Schema.Type getType();

    /**
     *
     *
     * <pre>
     * Required. Additional field semantics.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for mode.
     */
    int getModeValue();
    /**
     *
     *
     * <pre>
     * Required. Additional field semantics.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The mode.
     */
    com.google.cloud.dataplex.v1.Schema.Mode getMode();

    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> getFieldsList();
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index);
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    int getFieldsCount();
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    java.util.List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>
        getFieldsOrBuilderList();
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index);
  }
  /**
   *
   *
   * <pre>
   * Represents a column field within a table schema.
   * </pre>
   *
   * 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();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    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_ = "";
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @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_ = "";
    /**
     *
     *
     * <pre>
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. User friendly field description. Must be less than or equal to
     * 1024 characters.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     *
     * @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;
    /**
     *
     *
     * <pre>
     * Required. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Required. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @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;
    /**
     *
     *
     * <pre>
     * Required. Additional field semantics.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for mode.
     */
    @java.lang.Override
    public int getModeValue() {
      return mode_;
    }
    /**
     *
     *
     * <pre>
     * Required. Additional field semantics.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @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<com.google.cloud.dataplex.v1.Schema.SchemaField> fields_;
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> getFieldsList() {
      return fields_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>
        getFieldsOrBuilderList() {
      return fields_;
    }
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public int getFieldsCount() {
      return fields_.size();
    }
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) {
      return fields_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. Any nested field for complex types.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    @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;
    }
    /**
     *
     *
     * <pre>
     * Represents a column field within a table schema.
     * </pre>
     *
     * Protobuf type {@code google.cloud.dataplex.v1.Schema.SchemaField}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<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_ = "";
      /**
       *
       *
       * <pre>
       * 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.
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * 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.
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * 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.
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * 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.
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearName() {
        name_ = getDefaultInstance().getName();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * 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.
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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_ = "";
      /**
       *
       *
       * <pre>
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * </pre>
       *
       * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * </pre>
       *
       * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * </pre>
       *
       * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * </pre>
       *
       * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearDescription() {
        description_ = getDefaultInstance().getDescription();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. User friendly field description. Must be less than or equal to
       * 1024 characters.
       * </pre>
       *
       * <code>string description = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
       *
       * @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;
      /**
       *
       *
       * <pre>
       * Required. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @return The enum numeric value on the wire for type.
       */
      @java.lang.Override
      public int getTypeValue() {
        return type_;
      }
      /**
       *
       *
       * <pre>
       * Required. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 3 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @return This builder for chaining.
       */
      public Builder clearType() {
        bitField0_ = (bitField0_ & ~0x00000004);
        type_ = 0;
        onChanged();
        return this;
      }

      private int mode_ = 0;
      /**
       *
       *
       * <pre>
       * Required. Additional field semantics.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @return The enum numeric value on the wire for mode.
       */
      @java.lang.Override
      public int getModeValue() {
        return mode_;
      }
      /**
       *
       *
       * <pre>
       * Required. Additional field semantics.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Additional field semantics.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Additional field semantics.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Additional field semantics.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Mode mode = 4 [(.google.api.field_behavior) = REQUIRED];
       * </code>
       *
       * @return This builder for chaining.
       */
      public Builder clearMode() {
        bitField0_ = (bitField0_ & ~0x00000008);
        mode_ = 0;
        onChanged();
        return this;
      }

      private java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> fields_ =
          java.util.Collections.emptyList();

      private void ensureFieldsIsMutable() {
        if (!((bitField0_ & 0x00000010) != 0)) {
          fields_ =
              new java.util.ArrayList<com.google.cloud.dataplex.v1.Schema.SchemaField>(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_;

      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> getFieldsList() {
        if (fieldsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(fields_);
        } else {
          return fieldsBuilder_.getMessageList();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public int getFieldsCount() {
        if (fieldsBuilder_ == null) {
          return fields_.size();
        } else {
          return fieldsBuilder_.getCount();
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) {
        if (fieldsBuilder_ == null) {
          return fields_.get(index);
        } else {
          return fieldsBuilder_.getMessage(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      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;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder addAllFields(
          java.lang.Iterable<? extends com.google.cloud.dataplex.v1.Schema.SchemaField> values) {
        if (fieldsBuilder_ == null) {
          ensureFieldsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_);
          onChanged();
        } else {
          fieldsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder clearFields() {
        if (fieldsBuilder_ == null) {
          fields_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
          onChanged();
        } else {
          fieldsBuilder_.clear();
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public Builder removeFields(int index) {
        if (fieldsBuilder_ == null) {
          ensureFieldsIsMutable();
          fields_.remove(index);
          onChanged();
        } else {
          fieldsBuilder_.remove(index);
        }
        return this;
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder getFieldsBuilder(int index) {
        return getFieldsFieldBuilder().getBuilder(index);
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(
          int index) {
        if (fieldsBuilder_ == null) {
          return fields_.get(index);
        } else {
          return fieldsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>
          getFieldsOrBuilderList() {
        if (fieldsBuilder_ != null) {
          return fieldsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(fields_);
        }
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder() {
        return getFieldsFieldBuilder()
            .addBuilder(com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder(int index) {
        return getFieldsFieldBuilder()
            .addBuilder(
                index, com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance());
      }
      /**
       *
       *
       * <pre>
       * Optional. Any nested field for complex types.
       * </pre>
       *
       * <code>
       * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 10 [(.google.api.field_behavior) = OPTIONAL];
       * </code>
       */
      public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField.Builder>
          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<SchemaField> PARSER =
        new com.google.protobuf.AbstractParser<SchemaField>() {
          @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<SchemaField> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<SchemaField> 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 {

    /**
     *
     *
     * <pre>
     * 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..
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The name.
     */
    java.lang.String getName();
    /**
     *
     *
     * <pre>
     * 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..
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The bytes for name.
     */
    com.google.protobuf.ByteString getNameBytes();

    /**
     *
     *
     * <pre>
     * Required. Immutable. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    int getTypeValue();
    /**
     *
     *
     * <pre>
     * Required. Immutable. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The type.
     */
    com.google.cloud.dataplex.v1.Schema.Type getType();
  }
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * 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();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
      return this.unknownFields;
    }

    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_ = "";
    /**
     *
     *
     * <pre>
     * 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..
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * 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..
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @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;
    /**
     *
     *
     * <pre>
     * Required. Immutable. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Required. Immutable. The type of field.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * Protobuf type {@code google.cloud.dataplex.v1.Schema.PartitionField}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<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_ = "";
      /**
       *
       *
       * <pre>
       * 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..
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * 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..
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
        }
      }
      /**
       *
       *
       * <pre>
       * 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..
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * 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..
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearName() {
        name_ = getDefaultInstance().getName();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * 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..
       * </pre>
       *
       * <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @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;
      /**
       *
       *
       * <pre>
       * Required. Immutable. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
       * </code>
       *
       * @return The enum numeric value on the wire for type.
       */
      @java.lang.Override
      public int getTypeValue() {
        return type_;
      }
      /**
       *
       *
       * <pre>
       * Required. Immutable. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Immutable. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Immutable. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
       * </code>
       *
       * @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;
      }
      /**
       *
       *
       * <pre>
       * Required. Immutable. The type of field.
       * </pre>
       *
       * <code>
       * .google.cloud.dataplex.v1.Schema.Type type = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
       * </code>
       *
       * @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<PartitionField> PARSER =
        new com.google.protobuf.AbstractParser<PartitionField>() {
          @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<PartitionField> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<PartitionField> 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;
  /**
   *
   *
   * <pre>
   * 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.
   * </pre>
   *
   * <code>bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   *
   * @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<com.google.cloud.dataplex.v1.Schema.SchemaField> fields_;
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> getFieldsList() {
    return fields_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>
      getFieldsOrBuilderList() {
    return fields_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public int getFieldsCount() {
    return fields_.size();
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) {
    return fields_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing data in table entities.
   * **Note:** BigQuery SchemaFields are immutable.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @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<com.google.cloud.dataplex.v1.Schema.PartitionField> partitionFields_;
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.dataplex.v1.Schema.PartitionField>
      getPartitionFieldsList() {
    return partitionFields_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder>
      getPartitionFieldsOrBuilderList() {
    return partitionFields_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public int getPartitionFieldsCount() {
    return partitionFields_.size();
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.dataplex.v1.Schema.PartitionField getPartitionFields(int index) {
    return partitionFields_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Optional. The sequence of fields describing the partition structure in
   * entities. If this field is empty, there are no partitions within the data.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   */
  @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;
  /**
   *
   *
   * <pre>
   * Optional. The structure of paths containing partition data within the
   * entity.
   * </pre>
   *
   * <code>
   * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @return The enum numeric value on the wire for partitionStyle.
   */
  @java.lang.Override
  public int getPartitionStyleValue() {
    return partitionStyle_;
  }
  /**
   *
   *
   * <pre>
   * Optional. The structure of paths containing partition data within the
   * entity.
   * </pre>
   *
   * <code>
   * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
   * </code>
   *
   * @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;
  }
  /**
   *
   *
   * <pre>
   * Schema information describing the structure and layout of the data.
   * </pre>
   *
   * Protobuf type {@code google.cloud.dataplex.v1.Schema}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<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_;
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return The userManaged.
     */
    @java.lang.Override
    public boolean getUserManaged() {
      return userManaged_;
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @param value The userManaged to set.
     * @return This builder for chaining.
     */
    public Builder setUserManaged(boolean value) {

      userManaged_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * 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.
     * </pre>
     *
     * <code>bool user_managed = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUserManaged() {
      bitField0_ = (bitField0_ & ~0x00000001);
      userManaged_ = false;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> fields_ =
        java.util.Collections.emptyList();

    private void ensureFieldsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        fields_ = new java.util.ArrayList<com.google.cloud.dataplex.v1.Schema.SchemaField>(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_;

    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField> getFieldsList() {
      if (fieldsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(fields_);
      } else {
        return fieldsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public int getFieldsCount() {
      if (fieldsBuilder_ == null) {
        return fields_.size();
      } else {
        return fieldsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.SchemaField getFields(int index) {
      if (fieldsBuilder_ == null) {
        return fields_.get(index);
      } else {
        return fieldsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder addAllFields(
        java.lang.Iterable<? extends com.google.cloud.dataplex.v1.Schema.SchemaField> values) {
      if (fieldsBuilder_ == null) {
        ensureFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_);
        onChanged();
      } else {
        fieldsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearFields() {
      if (fieldsBuilder_ == null) {
        fields_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        fieldsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder removeFields(int index) {
      if (fieldsBuilder_ == null) {
        ensureFieldsIsMutable();
        fields_.remove(index);
        onChanged();
      } else {
        fieldsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder getFieldsBuilder(int index) {
      return getFieldsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder getFieldsOrBuilder(int index) {
      if (fieldsBuilder_ == null) {
        return fields_.get(index);
      } else {
        return fieldsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.SchemaFieldOrBuilder>
        getFieldsOrBuilderList() {
      if (fieldsBuilder_ != null) {
        return fieldsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(fields_);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder() {
      return getFieldsFieldBuilder()
          .addBuilder(com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.SchemaField.Builder addFieldsBuilder(int index) {
      return getFieldsFieldBuilder()
          .addBuilder(index, com.google.cloud.dataplex.v1.Schema.SchemaField.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing data in table entities.
     * **Note:** BigQuery SchemaFields are immutable.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.SchemaField fields = 2 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<com.google.cloud.dataplex.v1.Schema.SchemaField.Builder>
        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<com.google.cloud.dataplex.v1.Schema.PartitionField> partitionFields_ =
        java.util.Collections.emptyList();

    private void ensurePartitionFieldsIsMutable() {
      if (!((bitField0_ & 0x00000004) != 0)) {
        partitionFields_ =
            new java.util.ArrayList<com.google.cloud.dataplex.v1.Schema.PartitionField>(
                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_;

    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<com.google.cloud.dataplex.v1.Schema.PartitionField>
        getPartitionFieldsList() {
      if (partitionFieldsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(partitionFields_);
      } else {
        return partitionFieldsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public int getPartitionFieldsCount() {
      if (partitionFieldsBuilder_ == null) {
        return partitionFields_.size();
      } else {
        return partitionFieldsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.PartitionField getPartitionFields(int index) {
      if (partitionFieldsBuilder_ == null) {
        return partitionFields_.get(index);
      } else {
        return partitionFieldsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder addAllPartitionFields(
        java.lang.Iterable<? extends com.google.cloud.dataplex.v1.Schema.PartitionField> values) {
      if (partitionFieldsBuilder_ == null) {
        ensurePartitionFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partitionFields_);
        onChanged();
      } else {
        partitionFieldsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder clearPartitionFields() {
      if (partitionFieldsBuilder_ == null) {
        partitionFields_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        partitionFieldsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public Builder removePartitionFields(int index) {
      if (partitionFieldsBuilder_ == null) {
        ensurePartitionFieldsIsMutable();
        partitionFields_.remove(index);
        onChanged();
      } else {
        partitionFieldsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder getPartitionFieldsBuilder(
        int index) {
      return getPartitionFieldsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder getPartitionFieldsOrBuilder(
        int index) {
      if (partitionFieldsBuilder_ == null) {
        return partitionFields_.get(index);
      } else {
        return partitionFieldsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<? extends com.google.cloud.dataplex.v1.Schema.PartitionFieldOrBuilder>
        getPartitionFieldsOrBuilderList() {
      if (partitionFieldsBuilder_ != null) {
        return partitionFieldsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(partitionFields_);
      }
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder addPartitionFieldsBuilder() {
      return getPartitionFieldsFieldBuilder()
          .addBuilder(com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public com.google.cloud.dataplex.v1.Schema.PartitionField.Builder addPartitionFieldsBuilder(
        int index) {
      return getPartitionFieldsFieldBuilder()
          .addBuilder(
              index, com.google.cloud.dataplex.v1.Schema.PartitionField.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Optional. The sequence of fields describing the partition structure in
     * entities. If this field is empty, there are no partitions within the data.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.dataplex.v1.Schema.PartitionField partition_fields = 3 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     */
    public java.util.List<com.google.cloud.dataplex.v1.Schema.PartitionField.Builder>
        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;
    /**
     *
     *
     * <pre>
     * Optional. The structure of paths containing partition data within the
     * entity.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @return The enum numeric value on the wire for partitionStyle.
     */
    @java.lang.Override
    public int getPartitionStyleValue() {
      return partitionStyle_;
    }
    /**
     *
     *
     * <pre>
     * Optional. The structure of paths containing partition data within the
     * entity.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The structure of paths containing partition data within the
     * entity.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The structure of paths containing partition data within the
     * entity.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * Optional. The structure of paths containing partition data within the
     * entity.
     * </pre>
     *
     * <code>
     * .google.cloud.dataplex.v1.Schema.PartitionStyle partition_style = 4 [(.google.api.field_behavior) = OPTIONAL];
     * </code>
     *
     * @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<Schema> PARSER =
      new com.google.protobuf.AbstractParser<Schema>() {
        @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<Schema> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Schema> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.dataplex.v1.Schema getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
