/*
 * Copyright 2023 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/datacatalog/v1beta1/tags.proto

package com.google.cloud.datacatalog.v1beta1;

/** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType} */
public final class FieldType extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.FieldType)
    FieldTypeOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use FieldType.newBuilder() to construct.
  private FieldType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private FieldType() {}

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new FieldType();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.datacatalog.v1beta1.Tags
        .internal_static_google_cloud_datacatalog_v1beta1_FieldType_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.datacatalog.v1beta1.Tags
        .internal_static_google_cloud_datacatalog_v1beta1_FieldType_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.datacatalog.v1beta1.FieldType.class,
            com.google.cloud.datacatalog.v1beta1.FieldType.Builder.class);
  }

  /** Protobuf enum {@code google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType} */
  public enum PrimitiveType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * This is the default invalid value for a type.
     * </pre>
     *
     * <code>PRIMITIVE_TYPE_UNSPECIFIED = 0;</code>
     */
    PRIMITIVE_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * A double precision number.
     * </pre>
     *
     * <code>DOUBLE = 1;</code>
     */
    DOUBLE(1),
    /**
     *
     *
     * <pre>
     * An UTF-8 string.
     * </pre>
     *
     * <code>STRING = 2;</code>
     */
    STRING(2),
    /**
     *
     *
     * <pre>
     * A boolean value.
     * </pre>
     *
     * <code>BOOL = 3;</code>
     */
    BOOL(3),
    /**
     *
     *
     * <pre>
     * A timestamp.
     * </pre>
     *
     * <code>TIMESTAMP = 4;</code>
     */
    TIMESTAMP(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * This is the default invalid value for a type.
     * </pre>
     *
     * <code>PRIMITIVE_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int PRIMITIVE_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * A double precision number.
     * </pre>
     *
     * <code>DOUBLE = 1;</code>
     */
    public static final int DOUBLE_VALUE = 1;
    /**
     *
     *
     * <pre>
     * An UTF-8 string.
     * </pre>
     *
     * <code>STRING = 2;</code>
     */
    public static final int STRING_VALUE = 2;
    /**
     *
     *
     * <pre>
     * A boolean value.
     * </pre>
     *
     * <code>BOOL = 3;</code>
     */
    public static final int BOOL_VALUE = 3;
    /**
     *
     *
     * <pre>
     * A timestamp.
     * </pre>
     *
     * <code>TIMESTAMP = 4;</code>
     */
    public static final int TIMESTAMP_VALUE = 4;

    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 PrimitiveType 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 PrimitiveType forNumber(int value) {
      switch (value) {
        case 0:
          return PRIMITIVE_TYPE_UNSPECIFIED;
        case 1:
          return DOUBLE;
        case 2:
          return STRING;
        case 3:
          return BOOL;
        case 4:
          return TIMESTAMP;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<PrimitiveType> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<PrimitiveType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<PrimitiveType>() {
          public PrimitiveType findValueByNumber(int number) {
            return PrimitiveType.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.datacatalog.v1beta1.FieldType.getDescriptor().getEnumTypes().get(0);
    }

    private static final PrimitiveType[] VALUES = values();

    public static PrimitiveType 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 PrimitiveType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType)
  }

  public interface EnumTypeOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.FieldType.EnumType)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    java.util.List<com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
        getAllowedValuesList();
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue getAllowedValues(int index);
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    int getAllowedValuesCount();
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    java.util.List<
            ? extends com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>
        getAllowedValuesOrBuilderList();
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder
        getAllowedValuesOrBuilder(int index);
  }
  /** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType.EnumType} */
  public static final class EnumType extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.FieldType.EnumType)
      EnumTypeOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use EnumType.newBuilder() to construct.
    private EnumType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private EnumType() {
      allowedValues_ = java.util.Collections.emptyList();
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
      return new EnumType();
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.datacatalog.v1beta1.Tags
          .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.datacatalog.v1beta1.Tags
          .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.class,
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder.class);
    }

    public interface EnumValueOrBuilder
        extends
        // @@protoc_insertion_point(interface_extends:google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue)
        com.google.protobuf.MessageOrBuilder {

      /**
       *
       *
       * <pre>
       * Required. The display name of the enum value. Must not be an empty
       * string.
       * </pre>
       *
       * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The displayName.
       */
      java.lang.String getDisplayName();
      /**
       *
       *
       * <pre>
       * Required. The display name of the enum value. Must not be an empty
       * string.
       * </pre>
       *
       * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The bytes for displayName.
       */
      com.google.protobuf.ByteString getDisplayNameBytes();
    }
    /** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} */
    public static final class EnumValue extends com.google.protobuf.GeneratedMessageV3
        implements
        // @@protoc_insertion_point(message_implements:google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue)
        EnumValueOrBuilder {
      private static final long serialVersionUID = 0L;
      // Use EnumValue.newBuilder() to construct.
      private EnumValue(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }

      private EnumValue() {
        displayName_ = "";
      }

      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
        return new EnumValue();
      }

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.datacatalog.v1beta1.Tags
            .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_EnumValue_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.datacatalog.v1beta1.Tags
            .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_EnumValue_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.class,
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder.class);
      }

      public static final int DISPLAY_NAME_FIELD_NUMBER = 1;

      @SuppressWarnings("serial")
      private volatile java.lang.Object displayName_ = "";
      /**
       *
       *
       * <pre>
       * Required. The display name of the enum value. Must not be an empty
       * string.
       * </pre>
       *
       * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The displayName.
       */
      @java.lang.Override
      public java.lang.String getDisplayName() {
        java.lang.Object ref = displayName_;
        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();
          displayName_ = s;
          return s;
        }
      }
      /**
       *
       *
       * <pre>
       * Required. The display name of the enum value. Must not be an empty
       * string.
       * </pre>
       *
       * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
       *
       * @return The bytes for displayName.
       */
      @java.lang.Override
      public com.google.protobuf.ByteString getDisplayNameBytes() {
        java.lang.Object ref = displayName_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          displayName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      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(displayName_)) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_);
        }
        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(displayName_)) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_);
        }
        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.datacatalog.v1beta1.FieldType.EnumType.EnumValue)) {
          return super.equals(obj);
        }
        com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue other =
            (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue) obj;

        if (!getDisplayName().equals(other.getDisplayName())) 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) + DISPLAY_NAME_FIELD_NUMBER;
        hash = (53 * hash) + getDisplayName().hashCode();
        hash = (29 * hash) + getUnknownFields().hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue 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.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue 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.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue 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.datacatalog.v1beta1.FieldType.EnumType.EnumValue
          parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
          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.datacatalog.v1beta1.FieldType.EnumType.EnumValue parseFrom(
          com.google.protobuf.CodedInputStream input) throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue 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.datacatalog.v1beta1.FieldType.EnumType.EnumValue 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;
      }
      /** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue} */
      public static final class Builder
          extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
          implements
          // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue)
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
          return com.google.cloud.datacatalog.v1beta1.Tags
              .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_EnumValue_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.cloud.datacatalog.v1beta1.Tags
              .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_EnumValue_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.class,
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder.class);
        }

        // Construct using
        // com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.newBuilder()
        private Builder() {}

        private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
        }

        @java.lang.Override
        public Builder clear() {
          super.clear();
          bitField0_ = 0;
          displayName_ = "";
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
          return com.google.cloud.datacatalog.v1beta1.Tags
              .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_EnumValue_descriptor;
        }

        @java.lang.Override
        public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
            getDefaultInstanceForType() {
          return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
              .getDefaultInstance();
        }

        @java.lang.Override
        public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue build() {
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue buildPartial() {
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue result =
              new com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue(this);
          if (bitField0_ != 0) {
            buildPartial0(result);
          }
          onBuilt();
          return result;
        }

        private void buildPartial0(
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue result) {
          int from_bitField0_ = bitField0_;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.displayName_ = displayName_;
          }
        }

        @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.datacatalog.v1beta1.FieldType.EnumType.EnumValue) {
            return mergeFrom(
                (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue) other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue other) {
          if (other
              == com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
                  .getDefaultInstance()) return this;
          if (!other.getDisplayName().isEmpty()) {
            displayName_ = other.displayName_;
            bitField0_ |= 0x00000001;
            onChanged();
          }
          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:
                  {
                    displayName_ = input.readStringRequireUtf8();
                    bitField0_ |= 0x00000001;
                    break;
                  } // case 10
                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 displayName_ = "";
        /**
         *
         *
         * <pre>
         * Required. The display name of the enum value. Must not be an empty
         * string.
         * </pre>
         *
         * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
         *
         * @return The displayName.
         */
        public java.lang.String getDisplayName() {
          java.lang.Object ref = displayName_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            displayName_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Required. The display name of the enum value. Must not be an empty
         * string.
         * </pre>
         *
         * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
         *
         * @return The bytes for displayName.
         */
        public com.google.protobuf.ByteString getDisplayNameBytes() {
          java.lang.Object ref = displayName_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b =
                com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
            displayName_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         *
         *
         * <pre>
         * Required. The display name of the enum value. Must not be an empty
         * string.
         * </pre>
         *
         * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
         *
         * @param value The displayName to set.
         * @return This builder for chaining.
         */
        public Builder setDisplayName(java.lang.String value) {
          if (value == null) {
            throw new NullPointerException();
          }
          displayName_ = value;
          bitField0_ |= 0x00000001;
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Required. The display name of the enum value. Must not be an empty
         * string.
         * </pre>
         *
         * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
         *
         * @return This builder for chaining.
         */
        public Builder clearDisplayName() {
          displayName_ = getDefaultInstance().getDisplayName();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
          return this;
        }
        /**
         *
         *
         * <pre>
         * Required. The display name of the enum value. Must not be an empty
         * string.
         * </pre>
         *
         * <code>string display_name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
         *
         * @param value The bytes for displayName to set.
         * @return This builder for chaining.
         */
        public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
          if (value == null) {
            throw new NullPointerException();
          }
          checkByteStringIsUtf8(value);
          displayName_ = value;
          bitField0_ |= 0x00000001;
          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.datacatalog.v1beta1.FieldType.EnumType.EnumValue)
      }

      // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue)
      private static final com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
          DEFAULT_INSTANCE;

      static {
        DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue();
      }

      public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
          getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static final com.google.protobuf.Parser<EnumValue> PARSER =
          new com.google.protobuf.AbstractParser<EnumValue>() {
            @java.lang.Override
            public EnumValue 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<EnumValue> parser() {
        return PARSER;
      }

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

      @java.lang.Override
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
          getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }
    }

    public static final int ALLOWED_VALUES_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private java.util.List<com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
        allowedValues_;
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    @java.lang.Override
    public java.util.List<com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
        getAllowedValuesList() {
      return allowedValues_;
    }
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    @java.lang.Override
    public java.util.List<
            ? extends com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>
        getAllowedValuesOrBuilderList() {
      return allowedValues_;
    }
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    @java.lang.Override
    public int getAllowedValuesCount() {
      return allowedValues_.size();
    }
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue getAllowedValues(
        int index) {
      return allowedValues_.get(index);
    }
    /**
     * <code>
     * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder
        getAllowedValuesOrBuilder(int index) {
      return allowedValues_.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 {
      for (int i = 0; i < allowedValues_.size(); i++) {
        output.writeMessage(1, allowedValues_.get(i));
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      for (int i = 0; i < allowedValues_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, allowedValues_.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.datacatalog.v1beta1.FieldType.EnumType)) {
        return super.equals(obj);
      }
      com.google.cloud.datacatalog.v1beta1.FieldType.EnumType other =
          (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) obj;

      if (!getAllowedValuesList().equals(other.getAllowedValuesList())) 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();
      if (getAllowedValuesCount() > 0) {
        hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER;
        hash = (53 * hash) + getAllowedValuesList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType 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.datacatalog.v1beta1.FieldType.EnumType parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType 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.datacatalog.v1beta1.FieldType.EnumType parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType 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.datacatalog.v1beta1.FieldType.EnumType parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType 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.datacatalog.v1beta1.FieldType.EnumType parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType 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.datacatalog.v1beta1.FieldType.EnumType 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;
    }
    /** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType.EnumType} */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.FieldType.EnumType)
        com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.datacatalog.v1beta1.Tags
            .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.datacatalog.v1beta1.Tags
            .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.class,
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder.class);
      }

      // Construct using com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        if (allowedValuesBuilder_ == null) {
          allowedValues_ = java.util.Collections.emptyList();
        } else {
          allowedValues_ = null;
          allowedValuesBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.datacatalog.v1beta1.Tags
            .internal_static_google_cloud_datacatalog_v1beta1_FieldType_EnumType_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType getDefaultInstanceForType() {
        return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType build() {
        com.google.cloud.datacatalog.v1beta1.FieldType.EnumType result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType buildPartial() {
        com.google.cloud.datacatalog.v1beta1.FieldType.EnumType result =
            new com.google.cloud.datacatalog.v1beta1.FieldType.EnumType(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType result) {
        if (allowedValuesBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)) {
            allowedValues_ = java.util.Collections.unmodifiableList(allowedValues_);
            bitField0_ = (bitField0_ & ~0x00000001);
          }
          result.allowedValues_ = allowedValues_;
        } else {
          result.allowedValues_ = allowedValuesBuilder_.build();
        }
      }

      private void buildPartial0(com.google.cloud.datacatalog.v1beta1.FieldType.EnumType result) {
        int from_bitField0_ = bitField0_;
      }

      @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.datacatalog.v1beta1.FieldType.EnumType) {
          return mergeFrom((com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.datacatalog.v1beta1.FieldType.EnumType other) {
        if (other == com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance())
          return this;
        if (allowedValuesBuilder_ == null) {
          if (!other.allowedValues_.isEmpty()) {
            if (allowedValues_.isEmpty()) {
              allowedValues_ = other.allowedValues_;
              bitField0_ = (bitField0_ & ~0x00000001);
            } else {
              ensureAllowedValuesIsMutable();
              allowedValues_.addAll(other.allowedValues_);
            }
            onChanged();
          }
        } else {
          if (!other.allowedValues_.isEmpty()) {
            if (allowedValuesBuilder_.isEmpty()) {
              allowedValuesBuilder_.dispose();
              allowedValuesBuilder_ = null;
              allowedValues_ = other.allowedValues_;
              bitField0_ = (bitField0_ & ~0x00000001);
              allowedValuesBuilder_ =
                  com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                      ? getAllowedValuesFieldBuilder()
                      : null;
            } else {
              allowedValuesBuilder_.addAllMessages(other.allowedValues_);
            }
          }
        }
        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:
                {
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue m =
                      input.readMessage(
                          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
                              .parser(),
                          extensionRegistry);
                  if (allowedValuesBuilder_ == null) {
                    ensureAllowedValuesIsMutable();
                    allowedValues_.add(m);
                  } else {
                    allowedValuesBuilder_.addMessage(m);
                  }
                  break;
                } // case 10
              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.util.List<com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
          allowedValues_ = java.util.Collections.emptyList();

      private void ensureAllowedValuesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          allowedValues_ =
              new java.util.ArrayList<
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>(
                  allowedValues_);
          bitField0_ |= 0x00000001;
        }
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue,
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder,
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>
          allowedValuesBuilder_;

      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public java.util.List<com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
          getAllowedValuesList() {
        if (allowedValuesBuilder_ == null) {
          return java.util.Collections.unmodifiableList(allowedValues_);
        } else {
          return allowedValuesBuilder_.getMessageList();
        }
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public int getAllowedValuesCount() {
        if (allowedValuesBuilder_ == null) {
          return allowedValues_.size();
        } else {
          return allowedValuesBuilder_.getCount();
        }
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue getAllowedValues(
          int index) {
        if (allowedValuesBuilder_ == null) {
          return allowedValues_.get(index);
        } else {
          return allowedValuesBuilder_.getMessage(index);
        }
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder setAllowedValues(
          int index, com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue value) {
        if (allowedValuesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedValuesIsMutable();
          allowedValues_.set(index, value);
          onChanged();
        } else {
          allowedValuesBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder setAllowedValues(
          int index,
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
              builderForValue) {
        if (allowedValuesBuilder_ == null) {
          ensureAllowedValuesIsMutable();
          allowedValues_.set(index, builderForValue.build());
          onChanged();
        } else {
          allowedValuesBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder addAllowedValues(
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue value) {
        if (allowedValuesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedValuesIsMutable();
          allowedValues_.add(value);
          onChanged();
        } else {
          allowedValuesBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder addAllowedValues(
          int index, com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue value) {
        if (allowedValuesBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureAllowedValuesIsMutable();
          allowedValues_.add(index, value);
          onChanged();
        } else {
          allowedValuesBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder addAllowedValues(
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
              builderForValue) {
        if (allowedValuesBuilder_ == null) {
          ensureAllowedValuesIsMutable();
          allowedValues_.add(builderForValue.build());
          onChanged();
        } else {
          allowedValuesBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder addAllowedValues(
          int index,
          com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
              builderForValue) {
        if (allowedValuesBuilder_ == null) {
          ensureAllowedValuesIsMutable();
          allowedValues_.add(index, builderForValue.build());
          onChanged();
        } else {
          allowedValuesBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder addAllAllowedValues(
          java.lang.Iterable<
                  ? extends com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue>
              values) {
        if (allowedValuesBuilder_ == null) {
          ensureAllowedValuesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedValues_);
          onChanged();
        } else {
          allowedValuesBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder clearAllowedValues() {
        if (allowedValuesBuilder_ == null) {
          allowedValues_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000001);
          onChanged();
        } else {
          allowedValuesBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public Builder removeAllowedValues(int index) {
        if (allowedValuesBuilder_ == null) {
          ensureAllowedValuesIsMutable();
          allowedValues_.remove(index);
          onChanged();
        } else {
          allowedValuesBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
          getAllowedValuesBuilder(int index) {
        return getAllowedValuesFieldBuilder().getBuilder(index);
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder
          getAllowedValuesOrBuilder(int index) {
        if (allowedValuesBuilder_ == null) {
          return allowedValues_.get(index);
        } else {
          return allowedValuesBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public java.util.List<
              ? extends com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>
          getAllowedValuesOrBuilderList() {
        if (allowedValuesBuilder_ != null) {
          return allowedValuesBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(allowedValues_);
        }
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
          addAllowedValuesBuilder() {
        return getAllowedValuesFieldBuilder()
            .addBuilder(
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
                    .getDefaultInstance());
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder
          addAllowedValuesBuilder(int index) {
        return getAllowedValuesFieldBuilder()
            .addBuilder(
                index,
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue
                    .getDefaultInstance());
      }
      /**
       * <code>
       * repeated .google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue allowed_values = 1;
       * </code>
       */
      public java.util.List<
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder>
          getAllowedValuesBuilderList() {
        return getAllowedValuesFieldBuilder().getBuilderList();
      }

      private com.google.protobuf.RepeatedFieldBuilderV3<
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue,
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder,
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>
          getAllowedValuesFieldBuilder() {
        if (allowedValuesBuilder_ == null) {
          allowedValuesBuilder_ =
              new com.google.protobuf.RepeatedFieldBuilderV3<
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue,
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValue.Builder,
                  com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.EnumValueOrBuilder>(
                  allowedValues_,
                  ((bitField0_ & 0x00000001) != 0),
                  getParentForChildren(),
                  isClean());
          allowedValues_ = null;
        }
        return allowedValuesBuilder_;
      }

      @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.datacatalog.v1beta1.FieldType.EnumType)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.FieldType.EnumType)
    private static final com.google.cloud.datacatalog.v1beta1.FieldType.EnumType DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1beta1.FieldType.EnumType();
    }

    public static com.google.cloud.datacatalog.v1beta1.FieldType.EnumType getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<EnumType> PARSER =
        new com.google.protobuf.AbstractParser<EnumType>() {
          @java.lang.Override
          public EnumType 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<EnumType> parser() {
      return PARSER;
    }

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

    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int typeDeclCase_ = 0;

  @SuppressWarnings("serial")
  private java.lang.Object typeDecl_;

  public enum TypeDeclCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    PRIMITIVE_TYPE(1),
    ENUM_TYPE(2),
    TYPEDECL_NOT_SET(0);
    private final int value;

    private TypeDeclCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TypeDeclCase valueOf(int value) {
      return forNumber(value);
    }

    public static TypeDeclCase forNumber(int value) {
      switch (value) {
        case 1:
          return PRIMITIVE_TYPE;
        case 2:
          return ENUM_TYPE;
        case 0:
          return TYPEDECL_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public TypeDeclCase getTypeDeclCase() {
    return TypeDeclCase.forNumber(typeDeclCase_);
  }

  public static final int PRIMITIVE_TYPE_FIELD_NUMBER = 1;
  /**
   *
   *
   * <pre>
   * Represents primitive types - string, bool etc.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
   *
   * @return Whether the primitiveType field is set.
   */
  public boolean hasPrimitiveType() {
    return typeDeclCase_ == 1;
  }
  /**
   *
   *
   * <pre>
   * Represents primitive types - string, bool etc.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
   *
   * @return The enum numeric value on the wire for primitiveType.
   */
  public int getPrimitiveTypeValue() {
    if (typeDeclCase_ == 1) {
      return (java.lang.Integer) typeDecl_;
    }
    return 0;
  }
  /**
   *
   *
   * <pre>
   * Represents primitive types - string, bool etc.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
   *
   * @return The primitiveType.
   */
  public com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType getPrimitiveType() {
    if (typeDeclCase_ == 1) {
      com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType result =
          com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType.forNumber(
              (java.lang.Integer) typeDecl_);
      return result == null
          ? com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType.UNRECOGNIZED
          : result;
    }
    return com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType.PRIMITIVE_TYPE_UNSPECIFIED;
  }

  public static final int ENUM_TYPE_FIELD_NUMBER = 2;
  /**
   *
   *
   * <pre>
   * Represents an enum type.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
   *
   * @return Whether the enumType field is set.
   */
  @java.lang.Override
  public boolean hasEnumType() {
    return typeDeclCase_ == 2;
  }
  /**
   *
   *
   * <pre>
   * Represents an enum type.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
   *
   * @return The enumType.
   */
  @java.lang.Override
  public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType getEnumType() {
    if (typeDeclCase_ == 2) {
      return (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_;
    }
    return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Represents an enum type.
   * </pre>
   *
   * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
   */
  @java.lang.Override
  public com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder getEnumTypeOrBuilder() {
    if (typeDeclCase_ == 2) {
      return (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_;
    }
    return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
  }

  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 (typeDeclCase_ == 1) {
      output.writeEnum(1, ((java.lang.Integer) typeDecl_));
    }
    if (typeDeclCase_ == 2) {
      output.writeMessage(2, (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (typeDeclCase_ == 1) {
      size +=
          com.google.protobuf.CodedOutputStream.computeEnumSize(1, ((java.lang.Integer) typeDecl_));
    }
    if (typeDeclCase_ == 2) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              2, (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_);
    }
    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.datacatalog.v1beta1.FieldType)) {
      return super.equals(obj);
    }
    com.google.cloud.datacatalog.v1beta1.FieldType other =
        (com.google.cloud.datacatalog.v1beta1.FieldType) obj;

    if (!getTypeDeclCase().equals(other.getTypeDeclCase())) return false;
    switch (typeDeclCase_) {
      case 1:
        if (getPrimitiveTypeValue() != other.getPrimitiveTypeValue()) return false;
        break;
      case 2:
        if (!getEnumType().equals(other.getEnumType())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (typeDeclCase_) {
      case 1:
        hash = (37 * hash) + PRIMITIVE_TYPE_FIELD_NUMBER;
        hash = (53 * hash) + getPrimitiveTypeValue();
        break;
      case 2:
        hash = (37 * hash) + ENUM_TYPE_FIELD_NUMBER;
        hash = (53 * hash) + getEnumType().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType 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.datacatalog.v1beta1.FieldType parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType 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.datacatalog.v1beta1.FieldType parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType 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.datacatalog.v1beta1.FieldType parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType 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.datacatalog.v1beta1.FieldType parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType 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.datacatalog.v1beta1.FieldType 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;
  }
  /** Protobuf type {@code google.cloud.datacatalog.v1beta1.FieldType} */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.datacatalog.v1beta1.FieldType)
      com.google.cloud.datacatalog.v1beta1.FieldTypeOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.datacatalog.v1beta1.Tags
          .internal_static_google_cloud_datacatalog_v1beta1_FieldType_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.datacatalog.v1beta1.Tags
          .internal_static_google_cloud_datacatalog_v1beta1_FieldType_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.datacatalog.v1beta1.FieldType.class,
              com.google.cloud.datacatalog.v1beta1.FieldType.Builder.class);
    }

    // Construct using com.google.cloud.datacatalog.v1beta1.FieldType.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (enumTypeBuilder_ != null) {
        enumTypeBuilder_.clear();
      }
      typeDeclCase_ = 0;
      typeDecl_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.datacatalog.v1beta1.Tags
          .internal_static_google_cloud_datacatalog_v1beta1_FieldType_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType getDefaultInstanceForType() {
      return com.google.cloud.datacatalog.v1beta1.FieldType.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType build() {
      com.google.cloud.datacatalog.v1beta1.FieldType result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType buildPartial() {
      com.google.cloud.datacatalog.v1beta1.FieldType result =
          new com.google.cloud.datacatalog.v1beta1.FieldType(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.datacatalog.v1beta1.FieldType result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(com.google.cloud.datacatalog.v1beta1.FieldType result) {
      result.typeDeclCase_ = typeDeclCase_;
      result.typeDecl_ = this.typeDecl_;
      if (typeDeclCase_ == 2 && enumTypeBuilder_ != null) {
        result.typeDecl_ = enumTypeBuilder_.build();
      }
    }

    @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.datacatalog.v1beta1.FieldType) {
        return mergeFrom((com.google.cloud.datacatalog.v1beta1.FieldType) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.datacatalog.v1beta1.FieldType other) {
      if (other == com.google.cloud.datacatalog.v1beta1.FieldType.getDefaultInstance()) return this;
      switch (other.getTypeDeclCase()) {
        case PRIMITIVE_TYPE:
          {
            setPrimitiveTypeValue(other.getPrimitiveTypeValue());
            break;
          }
        case ENUM_TYPE:
          {
            mergeEnumType(other.getEnumType());
            break;
          }
        case TYPEDECL_NOT_SET:
          {
            break;
          }
      }
      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:
              {
                int rawValue = input.readEnum();
                typeDeclCase_ = 1;
                typeDecl_ = rawValue;
                break;
              } // case 8
            case 18:
              {
                input.readMessage(getEnumTypeFieldBuilder().getBuilder(), extensionRegistry);
                typeDeclCase_ = 2;
                break;
              } // case 18
            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 typeDeclCase_ = 0;
    private java.lang.Object typeDecl_;

    public TypeDeclCase getTypeDeclCase() {
      return TypeDeclCase.forNumber(typeDeclCase_);
    }

    public Builder clearTypeDecl() {
      typeDeclCase_ = 0;
      typeDecl_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @return Whether the primitiveType field is set.
     */
    @java.lang.Override
    public boolean hasPrimitiveType() {
      return typeDeclCase_ == 1;
    }
    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @return The enum numeric value on the wire for primitiveType.
     */
    @java.lang.Override
    public int getPrimitiveTypeValue() {
      if (typeDeclCase_ == 1) {
        return ((java.lang.Integer) typeDecl_).intValue();
      }
      return 0;
    }
    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @param value The enum numeric value on the wire for primitiveType to set.
     * @return This builder for chaining.
     */
    public Builder setPrimitiveTypeValue(int value) {
      typeDeclCase_ = 1;
      typeDecl_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @return The primitiveType.
     */
    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType getPrimitiveType() {
      if (typeDeclCase_ == 1) {
        com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType result =
            com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType.forNumber(
                (java.lang.Integer) typeDecl_);
        return result == null
            ? com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType.UNRECOGNIZED
            : result;
      }
      return com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType
          .PRIMITIVE_TYPE_UNSPECIFIED;
    }
    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @param value The primitiveType to set.
     * @return This builder for chaining.
     */
    public Builder setPrimitiveType(
        com.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      typeDeclCase_ = 1;
      typeDecl_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents primitive types - string, bool etc.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.PrimitiveType primitive_type = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearPrimitiveType() {
      if (typeDeclCase_ == 1) {
        typeDeclCase_ = 0;
        typeDecl_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType,
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder,
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder>
        enumTypeBuilder_;
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     *
     * @return Whether the enumType field is set.
     */
    @java.lang.Override
    public boolean hasEnumType() {
      return typeDeclCase_ == 2;
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     *
     * @return The enumType.
     */
    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType getEnumType() {
      if (enumTypeBuilder_ == null) {
        if (typeDeclCase_ == 2) {
          return (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_;
        }
        return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
      } else {
        if (typeDeclCase_ == 2) {
          return enumTypeBuilder_.getMessage();
        }
        return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    public Builder setEnumType(com.google.cloud.datacatalog.v1beta1.FieldType.EnumType value) {
      if (enumTypeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeDecl_ = value;
        onChanged();
      } else {
        enumTypeBuilder_.setMessage(value);
      }
      typeDeclCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    public Builder setEnumType(
        com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder builderForValue) {
      if (enumTypeBuilder_ == null) {
        typeDecl_ = builderForValue.build();
        onChanged();
      } else {
        enumTypeBuilder_.setMessage(builderForValue.build());
      }
      typeDeclCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    public Builder mergeEnumType(com.google.cloud.datacatalog.v1beta1.FieldType.EnumType value) {
      if (enumTypeBuilder_ == null) {
        if (typeDeclCase_ == 2
            && typeDecl_
                != com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance()) {
          typeDecl_ =
              com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.newBuilder(
                      (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          typeDecl_ = value;
        }
        onChanged();
      } else {
        if (typeDeclCase_ == 2) {
          enumTypeBuilder_.mergeFrom(value);
        } else {
          enumTypeBuilder_.setMessage(value);
        }
      }
      typeDeclCase_ = 2;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    public Builder clearEnumType() {
      if (enumTypeBuilder_ == null) {
        if (typeDeclCase_ == 2) {
          typeDeclCase_ = 0;
          typeDecl_ = null;
          onChanged();
        }
      } else {
        if (typeDeclCase_ == 2) {
          typeDeclCase_ = 0;
          typeDecl_ = null;
        }
        enumTypeBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder getEnumTypeBuilder() {
      return getEnumTypeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    @java.lang.Override
    public com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder getEnumTypeOrBuilder() {
      if ((typeDeclCase_ == 2) && (enumTypeBuilder_ != null)) {
        return enumTypeBuilder_.getMessageOrBuilder();
      } else {
        if (typeDeclCase_ == 2) {
          return (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_;
        }
        return com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Represents an enum type.
     * </pre>
     *
     * <code>.google.cloud.datacatalog.v1beta1.FieldType.EnumType enum_type = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType,
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder,
            com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder>
        getEnumTypeFieldBuilder() {
      if (enumTypeBuilder_ == null) {
        if (!(typeDeclCase_ == 2)) {
          typeDecl_ = com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.getDefaultInstance();
        }
        enumTypeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType,
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumType.Builder,
                com.google.cloud.datacatalog.v1beta1.FieldType.EnumTypeOrBuilder>(
                (com.google.cloud.datacatalog.v1beta1.FieldType.EnumType) typeDecl_,
                getParentForChildren(),
                isClean());
        typeDecl_ = null;
      }
      typeDeclCase_ = 2;
      onChanged();
      return enumTypeBuilder_;
    }

    @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.datacatalog.v1beta1.FieldType)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.datacatalog.v1beta1.FieldType)
  private static final com.google.cloud.datacatalog.v1beta1.FieldType DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.datacatalog.v1beta1.FieldType();
  }

  public static com.google.cloud.datacatalog.v1beta1.FieldType getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<FieldType> PARSER =
      new com.google.protobuf.AbstractParser<FieldType>() {
        @java.lang.Override
        public FieldType 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<FieldType> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.cloud.datacatalog.v1beta1.FieldType getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
