/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/alloydb/v1/resources.proto

package com.google.cloud.alloydb.v1;

/**
 *
 *
 * <pre>
 * SupportedDatabaseFlag gives general information about a database flag,
 * like type and allowed values. This is a static value that is defined
 * on the server side, and it cannot be modified by callers.
 * To set the Database flags on a particular Instance, a caller should modify
 * the Instance.database_flags field.
 * </pre>
 *
 * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag}
 */
public final class SupportedDatabaseFlag extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag)
    SupportedDatabaseFlagOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use SupportedDatabaseFlag.newBuilder() to construct.
  private SupportedDatabaseFlag(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private SupportedDatabaseFlag() {
    name_ = "";
    flagName_ = "";
    valueType_ = 0;
    supportedDbVersions_ = java.util.Collections.emptyList();
  }

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

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.alloydb.v1.ResourcesProto
        .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.alloydb.v1.ResourcesProto
        .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.class,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * ValueType describes the semantic type of the value that the flag accepts.
   * Regardless of the ValueType, the Instance.database_flags field accepts the
   * stringified version of the value, i.e. "20" or "3.14".
   * </pre>
   *
   * Protobuf enum {@code google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType}
   */
  public enum ValueType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * This is an unknown flag type.
     * </pre>
     *
     * <code>VALUE_TYPE_UNSPECIFIED = 0;</code>
     */
    VALUE_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * String type flag.
     * </pre>
     *
     * <code>STRING = 1;</code>
     */
    STRING(1),
    /**
     *
     *
     * <pre>
     * Integer type flag.
     * </pre>
     *
     * <code>INTEGER = 2;</code>
     */
    INTEGER(2),
    /**
     *
     *
     * <pre>
     * Float type flag.
     * </pre>
     *
     * <code>FLOAT = 3;</code>
     */
    FLOAT(3),
    /**
     *
     *
     * <pre>
     * Denotes that the flag does not accept any values.
     * </pre>
     *
     * <code>NONE = 4;</code>
     */
    NONE(4),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * This is an unknown flag type.
     * </pre>
     *
     * <code>VALUE_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int VALUE_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * String type flag.
     * </pre>
     *
     * <code>STRING = 1;</code>
     */
    public static final int STRING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Integer type flag.
     * </pre>
     *
     * <code>INTEGER = 2;</code>
     */
    public static final int INTEGER_VALUE = 2;
    /**
     *
     *
     * <pre>
     * Float type flag.
     * </pre>
     *
     * <code>FLOAT = 3;</code>
     */
    public static final int FLOAT_VALUE = 3;
    /**
     *
     *
     * <pre>
     * Denotes that the flag does not accept any values.
     * </pre>
     *
     * <code>NONE = 4;</code>
     */
    public static final int NONE_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 ValueType 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 ValueType forNumber(int value) {
      switch (value) {
        case 0:
          return VALUE_TYPE_UNSPECIFIED;
        case 1:
          return STRING;
        case 2:
          return INTEGER;
        case 3:
          return FLOAT;
        case 4:
          return NONE;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType)
  }

  public interface StringRestrictionsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @return A list containing the allowedValues.
     */
    java.util.List<java.lang.String> getAllowedValuesList();
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @return The count of allowedValues.
     */
    int getAllowedValuesCount();
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @param index The index of the element to return.
     * @return The allowedValues at the given index.
     */
    java.lang.String getAllowedValues(int index);
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the allowedValues at the given index.
     */
    com.google.protobuf.ByteString getAllowedValuesBytes(int index);
  }
  /**
   *
   *
   * <pre>
   * Restrictions on STRING type values
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions}
   */
  public static final class StringRestrictions extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
      StringRestrictionsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use StringRestrictions.newBuilder() to construct.
    private StringRestrictions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private StringRestrictions() {
      allowedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    }

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_StringRestrictions_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_StringRestrictions_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.class,
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder.class);
    }

    public static final int ALLOWED_VALUES_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private com.google.protobuf.LazyStringList allowedValues_;
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @return A list containing the allowedValues.
     */
    public com.google.protobuf.ProtocolStringList getAllowedValuesList() {
      return allowedValues_;
    }
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @return The count of allowedValues.
     */
    public int getAllowedValuesCount() {
      return allowedValues_.size();
    }
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @param index The index of the element to return.
     * @return The allowedValues at the given index.
     */
    public java.lang.String getAllowedValues(int index) {
      return allowedValues_.get(index);
    }
    /**
     *
     *
     * <pre>
     * The list of allowed values, if bounded. This field will be empty
     * if there is a unbounded number of allowed values.
     * </pre>
     *
     * <code>repeated string allowed_values = 1;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the allowedValues at the given index.
     */
    public com.google.protobuf.ByteString getAllowedValuesBytes(int index) {
      return allowedValues_.getByteString(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++) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedValues_.getRaw(i));
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      {
        int dataSize = 0;
        for (int i = 0; i < allowedValues_.size(); i++) {
          dataSize += computeStringSizeNoTag(allowedValues_.getRaw(i));
        }
        size += dataSize;
        size += 1 * getAllowedValuesList().size();
      }
      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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions other =
          (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) 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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions 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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

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

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions 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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     *
     *
     * <pre>
     * Restrictions on STRING type values
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_StringRestrictions_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_StringRestrictions_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.class,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder.class);
      }

      // Construct using
      // com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        allowedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_StringRestrictions_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
          getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions build() {
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions result =
            buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions buildPartial() {
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions result =
            new com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartialRepeatedFields(
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions result) {
        if (((bitField0_ & 0x00000001) != 0)) {
          allowedValues_ = allowedValues_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.allowedValues_ = allowedValues_;
      }

      private void buildPartial0(
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions 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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) {
          return mergeFrom(
              (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions other) {
        if (other
            == com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
                .getDefaultInstance()) return this;
        if (!other.allowedValues_.isEmpty()) {
          if (allowedValues_.isEmpty()) {
            allowedValues_ = other.allowedValues_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureAllowedValuesIsMutable();
            allowedValues_.addAll(other.allowedValues_);
          }
          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:
                {
                  java.lang.String s = input.readStringRequireUtf8();
                  ensureAllowedValuesIsMutable();
                  allowedValues_.add(s);
                  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 com.google.protobuf.LazyStringList allowedValues_ =
          com.google.protobuf.LazyStringArrayList.EMPTY;

      private void ensureAllowedValuesIsMutable() {
        if (!((bitField0_ & 0x00000001) != 0)) {
          allowedValues_ = new com.google.protobuf.LazyStringArrayList(allowedValues_);
          bitField0_ |= 0x00000001;
        }
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @return A list containing the allowedValues.
       */
      public com.google.protobuf.ProtocolStringList getAllowedValuesList() {
        return allowedValues_.getUnmodifiableView();
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @return The count of allowedValues.
       */
      public int getAllowedValuesCount() {
        return allowedValues_.size();
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param index The index of the element to return.
       * @return The allowedValues at the given index.
       */
      public java.lang.String getAllowedValues(int index) {
        return allowedValues_.get(index);
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param index The index of the value to return.
       * @return The bytes of the allowedValues at the given index.
       */
      public com.google.protobuf.ByteString getAllowedValuesBytes(int index) {
        return allowedValues_.getByteString(index);
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param index The index to set the value at.
       * @param value The allowedValues to set.
       * @return This builder for chaining.
       */
      public Builder setAllowedValues(int index, java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAllowedValuesIsMutable();
        allowedValues_.set(index, value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param value The allowedValues to add.
       * @return This builder for chaining.
       */
      public Builder addAllowedValues(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAllowedValuesIsMutable();
        allowedValues_.add(value);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param values The allowedValues to add.
       * @return This builder for chaining.
       */
      public Builder addAllAllowedValues(java.lang.Iterable<java.lang.String> values) {
        ensureAllowedValuesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedValues_);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearAllowedValues() {
        allowedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The list of allowed values, if bounded. This field will be empty
       * if there is a unbounded number of allowed values.
       * </pre>
       *
       * <code>repeated string allowed_values = 1;</code>
       *
       * @param value The bytes of the allowedValues to add.
       * @return This builder for chaining.
       */
      public Builder addAllowedValuesBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ensureAllowedValuesIsMutable();
        allowedValues_.add(value);
        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.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
    private static final com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions();
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface IntegerRestrictionsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     *
     * @return Whether the minValue field is set.
     */
    boolean hasMinValue();
    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     *
     * @return The minValue.
     */
    com.google.protobuf.Int64Value getMinValue();
    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     */
    com.google.protobuf.Int64ValueOrBuilder getMinValueOrBuilder();

    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     *
     * @return Whether the maxValue field is set.
     */
    boolean hasMaxValue();
    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     *
     * @return The maxValue.
     */
    com.google.protobuf.Int64Value getMaxValue();
    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     */
    com.google.protobuf.Int64ValueOrBuilder getMaxValueOrBuilder();
  }
  /**
   *
   *
   * <pre>
   * Restrictions on INTEGER type values.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions}
   */
  public static final class IntegerRestrictions extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
      IntegerRestrictionsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use IntegerRestrictions.newBuilder() to construct.
    private IntegerRestrictions(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private IntegerRestrictions() {}

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

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

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_IntegerRestrictions_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_IntegerRestrictions_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.class,
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder.class);
    }

    public static final int MIN_VALUE_FIELD_NUMBER = 1;
    private com.google.protobuf.Int64Value minValue_;
    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     *
     * @return Whether the minValue field is set.
     */
    @java.lang.Override
    public boolean hasMinValue() {
      return minValue_ != null;
    }
    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     *
     * @return The minValue.
     */
    @java.lang.Override
    public com.google.protobuf.Int64Value getMinValue() {
      return minValue_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : minValue_;
    }
    /**
     *
     *
     * <pre>
     * The minimum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value min_value = 1;</code>
     */
    @java.lang.Override
    public com.google.protobuf.Int64ValueOrBuilder getMinValueOrBuilder() {
      return minValue_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : minValue_;
    }

    public static final int MAX_VALUE_FIELD_NUMBER = 2;
    private com.google.protobuf.Int64Value maxValue_;
    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     *
     * @return Whether the maxValue field is set.
     */
    @java.lang.Override
    public boolean hasMaxValue() {
      return maxValue_ != null;
    }
    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     *
     * @return The maxValue.
     */
    @java.lang.Override
    public com.google.protobuf.Int64Value getMaxValue() {
      return maxValue_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxValue_;
    }
    /**
     *
     *
     * <pre>
     * The maximum value that can be specified, if applicable.
     * </pre>
     *
     * <code>.google.protobuf.Int64Value max_value = 2;</code>
     */
    @java.lang.Override
    public com.google.protobuf.Int64ValueOrBuilder getMaxValueOrBuilder() {
      return maxValue_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxValue_;
    }

    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 (minValue_ != null) {
        output.writeMessage(1, getMinValue());
      }
      if (maxValue_ != null) {
        output.writeMessage(2, getMaxValue());
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (minValue_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMinValue());
      }
      if (maxValue_ != null) {
        size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMaxValue());
      }
      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.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions other =
          (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) obj;

      if (hasMinValue() != other.hasMinValue()) return false;
      if (hasMinValue()) {
        if (!getMinValue().equals(other.getMinValue())) return false;
      }
      if (hasMaxValue() != other.hasMaxValue()) return false;
      if (hasMaxValue()) {
        if (!getMaxValue().equals(other.getMaxValue())) 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 (hasMinValue()) {
        hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getMinValue().hashCode();
      }
      if (hasMaxValue()) {
        hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getMaxValue().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions 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.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

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

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

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

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

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions 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.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     *
     *
     * <pre>
     * Restrictions on INTEGER type values.
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_IntegerRestrictions_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_IntegerRestrictions_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.class,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder
                    .class);
      }

      // Construct using
      // com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        minValue_ = null;
        if (minValueBuilder_ != null) {
          minValueBuilder_.dispose();
          minValueBuilder_ = null;
        }
        maxValue_ = null;
        if (maxValueBuilder_ != null) {
          maxValueBuilder_.dispose();
          maxValueBuilder_ = null;
        }
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.alloydb.v1.ResourcesProto
            .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_IntegerRestrictions_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
          getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
            .getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions build() {
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions result =
            buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions buildPartial() {
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions result =
            new com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.minValue_ = minValueBuilder_ == null ? minValue_ : minValueBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.maxValue_ = maxValueBuilder_ == null ? maxValue_ : maxValueBuilder_.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.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) {
          return mergeFrom(
              (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions other) {
        if (other
            == com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
                .getDefaultInstance()) return this;
        if (other.hasMinValue()) {
          mergeMinValue(other.getMinValue());
        }
        if (other.hasMaxValue()) {
          mergeMaxValue(other.getMaxValue());
        }
        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:
                {
                  input.readMessage(getMinValueFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  input.readMessage(getMaxValueFieldBuilder().getBuilder(), extensionRegistry);
                  bitField0_ |= 0x00000002;
                  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 bitField0_;

      private com.google.protobuf.Int64Value minValue_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Int64Value,
              com.google.protobuf.Int64Value.Builder,
              com.google.protobuf.Int64ValueOrBuilder>
          minValueBuilder_;
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       *
       * @return Whether the minValue field is set.
       */
      public boolean hasMinValue() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       *
       * @return The minValue.
       */
      public com.google.protobuf.Int64Value getMinValue() {
        if (minValueBuilder_ == null) {
          return minValue_ == null
              ? com.google.protobuf.Int64Value.getDefaultInstance()
              : minValue_;
        } else {
          return minValueBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public Builder setMinValue(com.google.protobuf.Int64Value value) {
        if (minValueBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          minValue_ = value;
        } else {
          minValueBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public Builder setMinValue(com.google.protobuf.Int64Value.Builder builderForValue) {
        if (minValueBuilder_ == null) {
          minValue_ = builderForValue.build();
        } else {
          minValueBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public Builder mergeMinValue(com.google.protobuf.Int64Value value) {
        if (minValueBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0)
              && minValue_ != null
              && minValue_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
            getMinValueBuilder().mergeFrom(value);
          } else {
            minValue_ = value;
          }
        } else {
          minValueBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public Builder clearMinValue() {
        bitField0_ = (bitField0_ & ~0x00000001);
        minValue_ = null;
        if (minValueBuilder_ != null) {
          minValueBuilder_.dispose();
          minValueBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public com.google.protobuf.Int64Value.Builder getMinValueBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getMinValueFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      public com.google.protobuf.Int64ValueOrBuilder getMinValueOrBuilder() {
        if (minValueBuilder_ != null) {
          return minValueBuilder_.getMessageOrBuilder();
        } else {
          return minValue_ == null
              ? com.google.protobuf.Int64Value.getDefaultInstance()
              : minValue_;
        }
      }
      /**
       *
       *
       * <pre>
       * The minimum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value min_value = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Int64Value,
              com.google.protobuf.Int64Value.Builder,
              com.google.protobuf.Int64ValueOrBuilder>
          getMinValueFieldBuilder() {
        if (minValueBuilder_ == null) {
          minValueBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Int64Value,
                  com.google.protobuf.Int64Value.Builder,
                  com.google.protobuf.Int64ValueOrBuilder>(
                  getMinValue(), getParentForChildren(), isClean());
          minValue_ = null;
        }
        return minValueBuilder_;
      }

      private com.google.protobuf.Int64Value maxValue_;
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Int64Value,
              com.google.protobuf.Int64Value.Builder,
              com.google.protobuf.Int64ValueOrBuilder>
          maxValueBuilder_;
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       *
       * @return Whether the maxValue field is set.
       */
      public boolean hasMaxValue() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       *
       * @return The maxValue.
       */
      public com.google.protobuf.Int64Value getMaxValue() {
        if (maxValueBuilder_ == null) {
          return maxValue_ == null
              ? com.google.protobuf.Int64Value.getDefaultInstance()
              : maxValue_;
        } else {
          return maxValueBuilder_.getMessage();
        }
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public Builder setMaxValue(com.google.protobuf.Int64Value value) {
        if (maxValueBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          maxValue_ = value;
        } else {
          maxValueBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public Builder setMaxValue(com.google.protobuf.Int64Value.Builder builderForValue) {
        if (maxValueBuilder_ == null) {
          maxValue_ = builderForValue.build();
        } else {
          maxValueBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public Builder mergeMaxValue(com.google.protobuf.Int64Value value) {
        if (maxValueBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0)
              && maxValue_ != null
              && maxValue_ != com.google.protobuf.Int64Value.getDefaultInstance()) {
            getMaxValueBuilder().mergeFrom(value);
          } else {
            maxValue_ = value;
          }
        } else {
          maxValueBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public Builder clearMaxValue() {
        bitField0_ = (bitField0_ & ~0x00000002);
        maxValue_ = null;
        if (maxValueBuilder_ != null) {
          maxValueBuilder_.dispose();
          maxValueBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public com.google.protobuf.Int64Value.Builder getMaxValueBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getMaxValueFieldBuilder().getBuilder();
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      public com.google.protobuf.Int64ValueOrBuilder getMaxValueOrBuilder() {
        if (maxValueBuilder_ != null) {
          return maxValueBuilder_.getMessageOrBuilder();
        } else {
          return maxValue_ == null
              ? com.google.protobuf.Int64Value.getDefaultInstance()
              : maxValue_;
        }
      }
      /**
       *
       *
       * <pre>
       * The maximum value that can be specified, if applicable.
       * </pre>
       *
       * <code>.google.protobuf.Int64Value max_value = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Int64Value,
              com.google.protobuf.Int64Value.Builder,
              com.google.protobuf.Int64ValueOrBuilder>
          getMaxValueFieldBuilder() {
        if (maxValueBuilder_ == null) {
          maxValueBuilder_ =
              new com.google.protobuf.SingleFieldBuilderV3<
                  com.google.protobuf.Int64Value,
                  com.google.protobuf.Int64Value.Builder,
                  com.google.protobuf.Int64ValueOrBuilder>(
                  getMaxValue(), getParentForChildren(), isClean());
          maxValue_ = null;
        }
        return maxValueBuilder_;
      }

      @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.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
    private static final com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE =
          new com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions();
    }

    public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private int restrictionsCase_ = 0;
  private java.lang.Object restrictions_;

  public enum RestrictionsCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    STRING_RESTRICTIONS(7),
    INTEGER_RESTRICTIONS(8),
    RESTRICTIONS_NOT_SET(0);
    private final int value;

    private RestrictionsCase(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 RestrictionsCase valueOf(int value) {
      return forNumber(value);
    }

    public static RestrictionsCase forNumber(int value) {
      switch (value) {
        case 7:
          return STRING_RESTRICTIONS;
        case 8:
          return INTEGER_RESTRICTIONS;
        case 0:
          return RESTRICTIONS_NOT_SET;
        default:
          return null;
      }
    }

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

  public RestrictionsCase getRestrictionsCase() {
    return RestrictionsCase.forNumber(restrictionsCase_);
  }

  public static final int STRING_RESTRICTIONS_FIELD_NUMBER = 7;
  /**
   *
   *
   * <pre>
   * Restriction on STRING type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
   * </code>
   *
   * @return Whether the stringRestrictions field is set.
   */
  @java.lang.Override
  public boolean hasStringRestrictions() {
    return restrictionsCase_ == 7;
  }
  /**
   *
   *
   * <pre>
   * Restriction on STRING type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
   * </code>
   *
   * @return The stringRestrictions.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
      getStringRestrictions() {
    if (restrictionsCase_ == 7) {
      return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) restrictions_;
    }
    return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        .getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Restriction on STRING type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder
      getStringRestrictionsOrBuilder() {
    if (restrictionsCase_ == 7) {
      return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) restrictions_;
    }
    return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        .getDefaultInstance();
  }

  public static final int INTEGER_RESTRICTIONS_FIELD_NUMBER = 8;
  /**
   *
   *
   * <pre>
   * Restriction on INTEGER type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
   * </code>
   *
   * @return Whether the integerRestrictions field is set.
   */
  @java.lang.Override
  public boolean hasIntegerRestrictions() {
    return restrictionsCase_ == 8;
  }
  /**
   *
   *
   * <pre>
   * Restriction on INTEGER type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
   * </code>
   *
   * @return The integerRestrictions.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
      getIntegerRestrictions() {
    if (restrictionsCase_ == 8) {
      return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) restrictions_;
    }
    return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        .getDefaultInstance();
  }
  /**
   *
   *
   * <pre>
   * Restriction on INTEGER type value.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder
      getIntegerRestrictionsOrBuilder() {
    if (restrictionsCase_ == 8) {
      return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) restrictions_;
    }
    return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        .getDefaultInstance();
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * The name of the flag resource, following Google Cloud conventions, e.g.:
   *  * projects/{project}/locations/{location}/flags/{flag}
   * This field currently has no semantic meaning.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the flag resource, following Google Cloud conventions, e.g.:
   *  * projects/{project}/locations/{location}/flags/{flag}
   * This field currently has no semantic meaning.
   * </pre>
   *
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FLAG_NAME_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object flagName_ = "";
  /**
   *
   *
   * <pre>
   * The name of the database flag, e.g. "max_allowed_packets".
   * The is a possibly key for the Instance.database_flags map field.
   * </pre>
   *
   * <code>string flag_name = 2;</code>
   *
   * @return The flagName.
   */
  @java.lang.Override
  public java.lang.String getFlagName() {
    java.lang.Object ref = flagName_;
    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();
      flagName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the database flag, e.g. "max_allowed_packets".
   * The is a possibly key for the Instance.database_flags map field.
   * </pre>
   *
   * <code>string flag_name = 2;</code>
   *
   * @return The bytes for flagName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getFlagNameBytes() {
    java.lang.Object ref = flagName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      flagName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VALUE_TYPE_FIELD_NUMBER = 3;
  private int valueType_ = 0;
  /**
   * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
   *
   * @return The enum numeric value on the wire for valueType.
   */
  @java.lang.Override
  public int getValueTypeValue() {
    return valueType_;
  }
  /**
   * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
   *
   * @return The valueType.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType getValueType() {
    com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType result =
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.forNumber(valueType_);
    return result == null
        ? com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.UNRECOGNIZED
        : result;
  }

  public static final int ACCEPTS_MULTIPLE_VALUES_FIELD_NUMBER = 4;
  private boolean acceptsMultipleValues_ = false;
  /**
   *
   *
   * <pre>
   * Whether the database flag accepts multiple values. If true,
   * a comma-separated list of stringified values may be specified.
   * </pre>
   *
   * <code>bool accepts_multiple_values = 4;</code>
   *
   * @return The acceptsMultipleValues.
   */
  @java.lang.Override
  public boolean getAcceptsMultipleValues() {
    return acceptsMultipleValues_;
  }

  public static final int SUPPORTED_DB_VERSIONS_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private java.util.List<java.lang.Integer> supportedDbVersions_;

  private static final com.google.protobuf.Internal.ListAdapter.Converter<
          java.lang.Integer, com.google.cloud.alloydb.v1.DatabaseVersion>
      supportedDbVersions_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer, com.google.cloud.alloydb.v1.DatabaseVersion>() {
            public com.google.cloud.alloydb.v1.DatabaseVersion convert(java.lang.Integer from) {
              com.google.cloud.alloydb.v1.DatabaseVersion result =
                  com.google.cloud.alloydb.v1.DatabaseVersion.forNumber(from);
              return result == null
                  ? com.google.cloud.alloydb.v1.DatabaseVersion.UNRECOGNIZED
                  : result;
            }
          };
  /**
   *
   *
   * <pre>
   * Major database engine versions for which this flag is supported.
   * </pre>
   *
   * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
   *
   * @return A list containing the supportedDbVersions.
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.alloydb.v1.DatabaseVersion> getSupportedDbVersionsList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, com.google.cloud.alloydb.v1.DatabaseVersion>(
        supportedDbVersions_, supportedDbVersions_converter_);
  }
  /**
   *
   *
   * <pre>
   * Major database engine versions for which this flag is supported.
   * </pre>
   *
   * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
   *
   * @return The count of supportedDbVersions.
   */
  @java.lang.Override
  public int getSupportedDbVersionsCount() {
    return supportedDbVersions_.size();
  }
  /**
   *
   *
   * <pre>
   * Major database engine versions for which this flag is supported.
   * </pre>
   *
   * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
   *
   * @param index The index of the element to return.
   * @return The supportedDbVersions at the given index.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1.DatabaseVersion getSupportedDbVersions(int index) {
    return supportedDbVersions_converter_.convert(supportedDbVersions_.get(index));
  }
  /**
   *
   *
   * <pre>
   * Major database engine versions for which this flag is supported.
   * </pre>
   *
   * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
   *
   * @return A list containing the enum numeric values on the wire for supportedDbVersions.
   */
  @java.lang.Override
  public java.util.List<java.lang.Integer> getSupportedDbVersionsValueList() {
    return supportedDbVersions_;
  }
  /**
   *
   *
   * <pre>
   * Major database engine versions for which this flag is supported.
   * </pre>
   *
   * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
   *
   * @param index The index of the value to return.
   * @return The enum numeric value on the wire of supportedDbVersions at the given index.
   */
  @java.lang.Override
  public int getSupportedDbVersionsValue(int index) {
    return supportedDbVersions_.get(index);
  }

  private int supportedDbVersionsMemoizedSerializedSize;

  public static final int REQUIRES_DB_RESTART_FIELD_NUMBER = 6;
  private boolean requiresDbRestart_ = false;
  /**
   *
   *
   * <pre>
   * Whether setting or updating this flag on an Instance requires a database
   * restart. If a flag that requires database restart is set, the backend
   * will automatically restart the database (making sure to satisfy any
   * availability SLO's).
   * </pre>
   *
   * <code>bool requires_db_restart = 6;</code>
   *
   * @return The requiresDbRestart.
   */
  @java.lang.Override
  public boolean getRequiresDbRestart() {
    return requiresDbRestart_;
  }

  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 {
    getSerializedSize();
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flagName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, flagName_);
    }
    if (valueType_
        != com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.VALUE_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(3, valueType_);
    }
    if (acceptsMultipleValues_ != false) {
      output.writeBool(4, acceptsMultipleValues_);
    }
    if (getSupportedDbVersionsList().size() > 0) {
      output.writeUInt32NoTag(42);
      output.writeUInt32NoTag(supportedDbVersionsMemoizedSerializedSize);
    }
    for (int i = 0; i < supportedDbVersions_.size(); i++) {
      output.writeEnumNoTag(supportedDbVersions_.get(i));
    }
    if (requiresDbRestart_ != false) {
      output.writeBool(6, requiresDbRestart_);
    }
    if (restrictionsCase_ == 7) {
      output.writeMessage(
          7, (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) restrictions_);
    }
    if (restrictionsCase_ == 8) {
      output.writeMessage(
          8, (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions) restrictions_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(flagName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, flagName_);
    }
    if (valueType_
        != com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.VALUE_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, valueType_);
    }
    if (acceptsMultipleValues_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, acceptsMultipleValues_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < supportedDbVersions_.size(); i++) {
        dataSize +=
            com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(supportedDbVersions_.get(i));
      }
      size += dataSize;
      if (!getSupportedDbVersionsList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
      }
      supportedDbVersionsMemoizedSerializedSize = dataSize;
    }
    if (requiresDbRestart_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requiresDbRestart_);
    }
    if (restrictionsCase_ == 7) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              7,
              (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions) restrictions_);
    }
    if (restrictionsCase_ == 8) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              8,
              (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
                  restrictions_);
    }
    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.alloydb.v1.SupportedDatabaseFlag)) {
      return super.equals(obj);
    }
    com.google.cloud.alloydb.v1.SupportedDatabaseFlag other =
        (com.google.cloud.alloydb.v1.SupportedDatabaseFlag) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getFlagName().equals(other.getFlagName())) return false;
    if (valueType_ != other.valueType_) return false;
    if (getAcceptsMultipleValues() != other.getAcceptsMultipleValues()) return false;
    if (!supportedDbVersions_.equals(other.supportedDbVersions_)) return false;
    if (getRequiresDbRestart() != other.getRequiresDbRestart()) return false;
    if (!getRestrictionsCase().equals(other.getRestrictionsCase())) return false;
    switch (restrictionsCase_) {
      case 7:
        if (!getStringRestrictions().equals(other.getStringRestrictions())) return false;
        break;
      case 8:
        if (!getIntegerRestrictions().equals(other.getIntegerRestrictions())) 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();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + FLAG_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getFlagName().hashCode();
    hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + valueType_;
    hash = (37 * hash) + ACCEPTS_MULTIPLE_VALUES_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAcceptsMultipleValues());
    if (getSupportedDbVersionsCount() > 0) {
      hash = (37 * hash) + SUPPORTED_DB_VERSIONS_FIELD_NUMBER;
      hash = (53 * hash) + supportedDbVersions_.hashCode();
    }
    hash = (37 * hash) + REQUIRES_DB_RESTART_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequiresDbRestart());
    switch (restrictionsCase_) {
      case 7:
        hash = (37 * hash) + STRING_RESTRICTIONS_FIELD_NUMBER;
        hash = (53 * hash) + getStringRestrictions().hashCode();
        break;
      case 8:
        hash = (37 * hash) + INTEGER_RESTRICTIONS_FIELD_NUMBER;
        hash = (53 * hash) + getIntegerRestrictions().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

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

  public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag 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.alloydb.v1.SupportedDatabaseFlag prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * SupportedDatabaseFlag gives general information about a database flag,
   * like type and allowed values. This is a static value that is defined
   * on the server side, and it cannot be modified by callers.
   * To set the Database flags on a particular Instance, a caller should modify
   * the Instance.database_flags field.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1.SupportedDatabaseFlag}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1.SupportedDatabaseFlag)
      com.google.cloud.alloydb.v1.SupportedDatabaseFlagOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.class,
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.Builder.class);
    }

    // Construct using com.google.cloud.alloydb.v1.SupportedDatabaseFlag.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (stringRestrictionsBuilder_ != null) {
        stringRestrictionsBuilder_.clear();
      }
      if (integerRestrictionsBuilder_ != null) {
        integerRestrictionsBuilder_.clear();
      }
      name_ = "";
      flagName_ = "";
      valueType_ = 0;
      acceptsMultipleValues_ = false;
      supportedDbVersions_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000040);
      requiresDbRestart_ = false;
      restrictionsCase_ = 0;
      restrictions_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.alloydb.v1.ResourcesProto
          .internal_static_google_cloud_alloydb_v1_SupportedDatabaseFlag_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag getDefaultInstanceForType() {
      return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag buildPartial() {
      com.google.cloud.alloydb.v1.SupportedDatabaseFlag result =
          new com.google.cloud.alloydb.v1.SupportedDatabaseFlag(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      buildPartialOneofs(result);
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag result) {
      if (((bitField0_ & 0x00000040) != 0)) {
        supportedDbVersions_ = java.util.Collections.unmodifiableList(supportedDbVersions_);
        bitField0_ = (bitField0_ & ~0x00000040);
      }
      result.supportedDbVersions_ = supportedDbVersions_;
    }

    private void buildPartial0(com.google.cloud.alloydb.v1.SupportedDatabaseFlag result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.flagName_ = flagName_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.valueType_ = valueType_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.acceptsMultipleValues_ = acceptsMultipleValues_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.requiresDbRestart_ = requiresDbRestart_;
      }
    }

    private void buildPartialOneofs(com.google.cloud.alloydb.v1.SupportedDatabaseFlag result) {
      result.restrictionsCase_ = restrictionsCase_;
      result.restrictions_ = this.restrictions_;
      if (restrictionsCase_ == 7 && stringRestrictionsBuilder_ != null) {
        result.restrictions_ = stringRestrictionsBuilder_.build();
      }
      if (restrictionsCase_ == 8 && integerRestrictionsBuilder_ != null) {
        result.restrictions_ = integerRestrictionsBuilder_.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.alloydb.v1.SupportedDatabaseFlag) {
        return mergeFrom((com.google.cloud.alloydb.v1.SupportedDatabaseFlag) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.alloydb.v1.SupportedDatabaseFlag other) {
      if (other == com.google.cloud.alloydb.v1.SupportedDatabaseFlag.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (!other.getFlagName().isEmpty()) {
        flagName_ = other.flagName_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (other.valueType_ != 0) {
        setValueTypeValue(other.getValueTypeValue());
      }
      if (other.getAcceptsMultipleValues() != false) {
        setAcceptsMultipleValues(other.getAcceptsMultipleValues());
      }
      if (!other.supportedDbVersions_.isEmpty()) {
        if (supportedDbVersions_.isEmpty()) {
          supportedDbVersions_ = other.supportedDbVersions_;
          bitField0_ = (bitField0_ & ~0x00000040);
        } else {
          ensureSupportedDbVersionsIsMutable();
          supportedDbVersions_.addAll(other.supportedDbVersions_);
        }
        onChanged();
      }
      if (other.getRequiresDbRestart() != false) {
        setRequiresDbRestart(other.getRequiresDbRestart());
      }
      switch (other.getRestrictionsCase()) {
        case STRING_RESTRICTIONS:
          {
            mergeStringRestrictions(other.getStringRestrictions());
            break;
          }
        case INTEGER_RESTRICTIONS:
          {
            mergeIntegerRestrictions(other.getIntegerRestrictions());
            break;
          }
        case RESTRICTIONS_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 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 10
            case 18:
              {
                flagName_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 18
            case 24:
              {
                valueType_ = input.readEnum();
                bitField0_ |= 0x00000010;
                break;
              } // case 24
            case 32:
              {
                acceptsMultipleValues_ = input.readBool();
                bitField0_ |= 0x00000020;
                break;
              } // case 32
            case 40:
              {
                int tmpRaw = input.readEnum();
                ensureSupportedDbVersionsIsMutable();
                supportedDbVersions_.add(tmpRaw);
                break;
              } // case 40
            case 42:
              {
                int length = input.readRawVarint32();
                int oldLimit = input.pushLimit(length);
                while (input.getBytesUntilLimit() > 0) {
                  int tmpRaw = input.readEnum();
                  ensureSupportedDbVersionsIsMutable();
                  supportedDbVersions_.add(tmpRaw);
                }
                input.popLimit(oldLimit);
                break;
              } // case 42
            case 48:
              {
                requiresDbRestart_ = input.readBool();
                bitField0_ |= 0x00000080;
                break;
              } // case 48
            case 58:
              {
                input.readMessage(
                    getStringRestrictionsFieldBuilder().getBuilder(), extensionRegistry);
                restrictionsCase_ = 7;
                break;
              } // case 58
            case 66:
              {
                input.readMessage(
                    getIntegerRestrictionsFieldBuilder().getBuilder(), extensionRegistry);
                restrictionsCase_ = 8;
                break;
              } // case 66
            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 restrictionsCase_ = 0;
    private java.lang.Object restrictions_;

    public RestrictionsCase getRestrictionsCase() {
      return RestrictionsCase.forNumber(restrictionsCase_);
    }

    public Builder clearRestrictions() {
      restrictionsCase_ = 0;
      restrictions_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder>
        stringRestrictionsBuilder_;
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     *
     * @return Whether the stringRestrictions field is set.
     */
    @java.lang.Override
    public boolean hasStringRestrictions() {
      return restrictionsCase_ == 7;
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     *
     * @return The stringRestrictions.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
        getStringRestrictions() {
      if (stringRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 7) {
          return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
              restrictions_;
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
            .getDefaultInstance();
      } else {
        if (restrictionsCase_ == 7) {
          return stringRestrictionsBuilder_.getMessage();
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    public Builder setStringRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions value) {
      if (stringRestrictionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        restrictions_ = value;
        onChanged();
      } else {
        stringRestrictionsBuilder_.setMessage(value);
      }
      restrictionsCase_ = 7;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    public Builder setStringRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder
            builderForValue) {
      if (stringRestrictionsBuilder_ == null) {
        restrictions_ = builderForValue.build();
        onChanged();
      } else {
        stringRestrictionsBuilder_.setMessage(builderForValue.build());
      }
      restrictionsCase_ = 7;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    public Builder mergeStringRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions value) {
      if (stringRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 7
            && restrictions_
                != com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
                    .getDefaultInstance()) {
          restrictions_ =
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.newBuilder(
                      (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
                          restrictions_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          restrictions_ = value;
        }
        onChanged();
      } else {
        if (restrictionsCase_ == 7) {
          stringRestrictionsBuilder_.mergeFrom(value);
        } else {
          stringRestrictionsBuilder_.setMessage(value);
        }
      }
      restrictionsCase_ = 7;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    public Builder clearStringRestrictions() {
      if (stringRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 7) {
          restrictionsCase_ = 0;
          restrictions_ = null;
          onChanged();
        }
      } else {
        if (restrictionsCase_ == 7) {
          restrictionsCase_ = 0;
          restrictions_ = null;
        }
        stringRestrictionsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder
        getStringRestrictionsBuilder() {
      return getStringRestrictionsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder
        getStringRestrictionsOrBuilder() {
      if ((restrictionsCase_ == 7) && (stringRestrictionsBuilder_ != null)) {
        return stringRestrictionsBuilder_.getMessageOrBuilder();
      } else {
        if (restrictionsCase_ == 7) {
          return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
              restrictions_;
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Restriction on STRING type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions string_restrictions = 7;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder>
        getStringRestrictionsFieldBuilder() {
      if (stringRestrictionsBuilder_ == null) {
        if (!(restrictionsCase_ == 7)) {
          restrictions_ =
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions
                  .getDefaultInstance();
        }
        stringRestrictionsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions.Builder,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictionsOrBuilder>(
                (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.StringRestrictions)
                    restrictions_,
                getParentForChildren(),
                isClean());
        restrictions_ = null;
      }
      restrictionsCase_ = 7;
      onChanged();
      return stringRestrictionsBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder>
        integerRestrictionsBuilder_;
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     *
     * @return Whether the integerRestrictions field is set.
     */
    @java.lang.Override
    public boolean hasIntegerRestrictions() {
      return restrictionsCase_ == 8;
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     *
     * @return The integerRestrictions.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
        getIntegerRestrictions() {
      if (integerRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 8) {
          return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
              restrictions_;
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
            .getDefaultInstance();
      } else {
        if (restrictionsCase_ == 8) {
          return integerRestrictionsBuilder_.getMessage();
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    public Builder setIntegerRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions value) {
      if (integerRestrictionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        restrictions_ = value;
        onChanged();
      } else {
        integerRestrictionsBuilder_.setMessage(value);
      }
      restrictionsCase_ = 8;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    public Builder setIntegerRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder
            builderForValue) {
      if (integerRestrictionsBuilder_ == null) {
        restrictions_ = builderForValue.build();
        onChanged();
      } else {
        integerRestrictionsBuilder_.setMessage(builderForValue.build());
      }
      restrictionsCase_ = 8;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    public Builder mergeIntegerRestrictions(
        com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions value) {
      if (integerRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 8
            && restrictions_
                != com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
                    .getDefaultInstance()) {
          restrictions_ =
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.newBuilder(
                      (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
                          restrictions_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          restrictions_ = value;
        }
        onChanged();
      } else {
        if (restrictionsCase_ == 8) {
          integerRestrictionsBuilder_.mergeFrom(value);
        } else {
          integerRestrictionsBuilder_.setMessage(value);
        }
      }
      restrictionsCase_ = 8;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    public Builder clearIntegerRestrictions() {
      if (integerRestrictionsBuilder_ == null) {
        if (restrictionsCase_ == 8) {
          restrictionsCase_ = 0;
          restrictions_ = null;
          onChanged();
        }
      } else {
        if (restrictionsCase_ == 8) {
          restrictionsCase_ = 0;
          restrictions_ = null;
        }
        integerRestrictionsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder
        getIntegerRestrictionsBuilder() {
      return getIntegerRestrictionsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder
        getIntegerRestrictionsOrBuilder() {
      if ((restrictionsCase_ == 8) && (integerRestrictionsBuilder_ != null)) {
        return integerRestrictionsBuilder_.getMessageOrBuilder();
      } else {
        if (restrictionsCase_ == 8) {
          return (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
              restrictions_;
        }
        return com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
            .getDefaultInstance();
      }
    }
    /**
     *
     *
     * <pre>
     * Restriction on INTEGER type value.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions integer_restrictions = 8;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder,
            com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder>
        getIntegerRestrictionsFieldBuilder() {
      if (integerRestrictionsBuilder_ == null) {
        if (!(restrictionsCase_ == 8)) {
          restrictions_ =
              com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions
                  .getDefaultInstance();
        }
        integerRestrictionsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions.Builder,
                com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictionsOrBuilder>(
                (com.google.cloud.alloydb.v1.SupportedDatabaseFlag.IntegerRestrictions)
                    restrictions_,
                getParentForChildren(),
                isClean());
        restrictions_ = null;
      }
      restrictionsCase_ = 8;
      onChanged();
      return integerRestrictionsBuilder_;
    }

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * The name of the flag resource, following Google Cloud conventions, e.g.:
     *  * projects/{project}/locations/{location}/flags/{flag}
     * This field currently has no semantic meaning.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the flag resource, following Google Cloud conventions, e.g.:
     *  * projects/{project}/locations/{location}/flags/{flag}
     * This field currently has no semantic meaning.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the flag resource, following Google Cloud conventions, e.g.:
     *  * projects/{project}/locations/{location}/flags/{flag}
     * This field currently has no semantic meaning.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the flag resource, following Google Cloud conventions, e.g.:
     *  * projects/{project}/locations/{location}/flags/{flag}
     * This field currently has no semantic meaning.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the flag resource, following Google Cloud conventions, e.g.:
     *  * projects/{project}/locations/{location}/flags/{flag}
     * This field currently has no semantic meaning.
     * </pre>
     *
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private java.lang.Object flagName_ = "";
    /**
     *
     *
     * <pre>
     * The name of the database flag, e.g. "max_allowed_packets".
     * The is a possibly key for the Instance.database_flags map field.
     * </pre>
     *
     * <code>string flag_name = 2;</code>
     *
     * @return The flagName.
     */
    public java.lang.String getFlagName() {
      java.lang.Object ref = flagName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        flagName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the database flag, e.g. "max_allowed_packets".
     * The is a possibly key for the Instance.database_flags map field.
     * </pre>
     *
     * <code>string flag_name = 2;</code>
     *
     * @return The bytes for flagName.
     */
    public com.google.protobuf.ByteString getFlagNameBytes() {
      java.lang.Object ref = flagName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        flagName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the database flag, e.g. "max_allowed_packets".
     * The is a possibly key for the Instance.database_flags map field.
     * </pre>
     *
     * <code>string flag_name = 2;</code>
     *
     * @param value The flagName to set.
     * @return This builder for chaining.
     */
    public Builder setFlagName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      flagName_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the database flag, e.g. "max_allowed_packets".
     * The is a possibly key for the Instance.database_flags map field.
     * </pre>
     *
     * <code>string flag_name = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearFlagName() {
      flagName_ = getDefaultInstance().getFlagName();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the database flag, e.g. "max_allowed_packets".
     * The is a possibly key for the Instance.database_flags map field.
     * </pre>
     *
     * <code>string flag_name = 2;</code>
     *
     * @param value The bytes for flagName to set.
     * @return This builder for chaining.
     */
    public Builder setFlagNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      flagName_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }

    private int valueType_ = 0;
    /**
     * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
     *
     * @return The enum numeric value on the wire for valueType.
     */
    @java.lang.Override
    public int getValueTypeValue() {
      return valueType_;
    }
    /**
     * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
     *
     * @param value The enum numeric value on the wire for valueType to set.
     * @return This builder for chaining.
     */
    public Builder setValueTypeValue(int value) {
      valueType_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
     *
     * @return The valueType.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType getValueType() {
      com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType result =
          com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.forNumber(valueType_);
      return result == null
          ? com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType.UNRECOGNIZED
          : result;
    }
    /**
     * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
     *
     * @param value The valueType to set.
     * @return This builder for chaining.
     */
    public Builder setValueType(com.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000010;
      valueType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.google.cloud.alloydb.v1.SupportedDatabaseFlag.ValueType value_type = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearValueType() {
      bitField0_ = (bitField0_ & ~0x00000010);
      valueType_ = 0;
      onChanged();
      return this;
    }

    private boolean acceptsMultipleValues_;
    /**
     *
     *
     * <pre>
     * Whether the database flag accepts multiple values. If true,
     * a comma-separated list of stringified values may be specified.
     * </pre>
     *
     * <code>bool accepts_multiple_values = 4;</code>
     *
     * @return The acceptsMultipleValues.
     */
    @java.lang.Override
    public boolean getAcceptsMultipleValues() {
      return acceptsMultipleValues_;
    }
    /**
     *
     *
     * <pre>
     * Whether the database flag accepts multiple values. If true,
     * a comma-separated list of stringified values may be specified.
     * </pre>
     *
     * <code>bool accepts_multiple_values = 4;</code>
     *
     * @param value The acceptsMultipleValues to set.
     * @return This builder for chaining.
     */
    public Builder setAcceptsMultipleValues(boolean value) {

      acceptsMultipleValues_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether the database flag accepts multiple values. If true,
     * a comma-separated list of stringified values may be specified.
     * </pre>
     *
     * <code>bool accepts_multiple_values = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAcceptsMultipleValues() {
      bitField0_ = (bitField0_ & ~0x00000020);
      acceptsMultipleValues_ = false;
      onChanged();
      return this;
    }

    private java.util.List<java.lang.Integer> supportedDbVersions_ =
        java.util.Collections.emptyList();

    private void ensureSupportedDbVersionsIsMutable() {
      if (!((bitField0_ & 0x00000040) != 0)) {
        supportedDbVersions_ = new java.util.ArrayList<java.lang.Integer>(supportedDbVersions_);
        bitField0_ |= 0x00000040;
      }
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @return A list containing the supportedDbVersions.
     */
    public java.util.List<com.google.cloud.alloydb.v1.DatabaseVersion>
        getSupportedDbVersionsList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, com.google.cloud.alloydb.v1.DatabaseVersion>(
          supportedDbVersions_, supportedDbVersions_converter_);
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @return The count of supportedDbVersions.
     */
    public int getSupportedDbVersionsCount() {
      return supportedDbVersions_.size();
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param index The index of the element to return.
     * @return The supportedDbVersions at the given index.
     */
    public com.google.cloud.alloydb.v1.DatabaseVersion getSupportedDbVersions(int index) {
      return supportedDbVersions_converter_.convert(supportedDbVersions_.get(index));
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param index The index to set the value at.
     * @param value The supportedDbVersions to set.
     * @return This builder for chaining.
     */
    public Builder setSupportedDbVersions(
        int index, com.google.cloud.alloydb.v1.DatabaseVersion value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureSupportedDbVersionsIsMutable();
      supportedDbVersions_.set(index, value.getNumber());
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param value The supportedDbVersions to add.
     * @return This builder for chaining.
     */
    public Builder addSupportedDbVersions(com.google.cloud.alloydb.v1.DatabaseVersion value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureSupportedDbVersionsIsMutable();
      supportedDbVersions_.add(value.getNumber());
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param values The supportedDbVersions to add.
     * @return This builder for chaining.
     */
    public Builder addAllSupportedDbVersions(
        java.lang.Iterable<? extends com.google.cloud.alloydb.v1.DatabaseVersion> values) {
      ensureSupportedDbVersionsIsMutable();
      for (com.google.cloud.alloydb.v1.DatabaseVersion value : values) {
        supportedDbVersions_.add(value.getNumber());
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSupportedDbVersions() {
      supportedDbVersions_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @return A list containing the enum numeric values on the wire for supportedDbVersions.
     */
    public java.util.List<java.lang.Integer> getSupportedDbVersionsValueList() {
      return java.util.Collections.unmodifiableList(supportedDbVersions_);
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param index The index of the value to return.
     * @return The enum numeric value on the wire of supportedDbVersions at the given index.
     */
    public int getSupportedDbVersionsValue(int index) {
      return supportedDbVersions_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param index The index to set the value at.
     * @param value The enum numeric value on the wire for supportedDbVersions to set.
     * @return This builder for chaining.
     */
    public Builder setSupportedDbVersionsValue(int index, int value) {
      ensureSupportedDbVersionsIsMutable();
      supportedDbVersions_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param value The enum numeric value on the wire for supportedDbVersions to add.
     * @return This builder for chaining.
     */
    public Builder addSupportedDbVersionsValue(int value) {
      ensureSupportedDbVersionsIsMutable();
      supportedDbVersions_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Major database engine versions for which this flag is supported.
     * </pre>
     *
     * <code>repeated .google.cloud.alloydb.v1.DatabaseVersion supported_db_versions = 5;</code>
     *
     * @param values The enum numeric values on the wire for supportedDbVersions to add.
     * @return This builder for chaining.
     */
    public Builder addAllSupportedDbVersionsValue(java.lang.Iterable<java.lang.Integer> values) {
      ensureSupportedDbVersionsIsMutable();
      for (int value : values) {
        supportedDbVersions_.add(value);
      }
      onChanged();
      return this;
    }

    private boolean requiresDbRestart_;
    /**
     *
     *
     * <pre>
     * Whether setting or updating this flag on an Instance requires a database
     * restart. If a flag that requires database restart is set, the backend
     * will automatically restart the database (making sure to satisfy any
     * availability SLO's).
     * </pre>
     *
     * <code>bool requires_db_restart = 6;</code>
     *
     * @return The requiresDbRestart.
     */
    @java.lang.Override
    public boolean getRequiresDbRestart() {
      return requiresDbRestart_;
    }
    /**
     *
     *
     * <pre>
     * Whether setting or updating this flag on an Instance requires a database
     * restart. If a flag that requires database restart is set, the backend
     * will automatically restart the database (making sure to satisfy any
     * availability SLO's).
     * </pre>
     *
     * <code>bool requires_db_restart = 6;</code>
     *
     * @param value The requiresDbRestart to set.
     * @return This builder for chaining.
     */
    public Builder setRequiresDbRestart(boolean value) {

      requiresDbRestart_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether setting or updating this flag on an Instance requires a database
     * restart. If a flag that requires database restart is set, the backend
     * will automatically restart the database (making sure to satisfy any
     * availability SLO's).
     * </pre>
     *
     * <code>bool requires_db_restart = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRequiresDbRestart() {
      bitField0_ = (bitField0_ & ~0x00000080);
      requiresDbRestart_ = false;
      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.alloydb.v1.SupportedDatabaseFlag)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1.SupportedDatabaseFlag)
  private static final com.google.cloud.alloydb.v1.SupportedDatabaseFlag DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1.SupportedDatabaseFlag();
  }

  public static com.google.cloud.alloydb.v1.SupportedDatabaseFlag getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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