/*
 * 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/v1beta/resources.proto

package com.google.cloud.alloydb.v1beta;

/**
 *
 *
 * <pre>
 * An Instance is a computing unit that an end customer can connect to.
 * It's the main unit of computing resources in AlloyDB.
 * </pre>
 *
 * Protobuf type {@code google.cloud.alloydb.v1beta.Instance}
 */
public final class Instance extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance)
    InstanceOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Instance.newBuilder() to construct.
  private Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Instance() {
    name_ = "";
    displayName_ = "";
    uid_ = "";
    state_ = 0;
    instanceType_ = 0;
    availabilityType_ = 0;
    gceZone_ = "";
    nodes_ = java.util.Collections.emptyList();
    ipAddress_ = "";
    etag_ = "";
  }

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

  @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.v1beta.ResourcesProto
        .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 7:
        return internalGetLabels();
      case 13:
        return internalGetDatabaseFlags();
      case 18:
        return internalGetAnnotations();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

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

  /**
   *
   *
   * <pre>
   * Instance State
   * </pre>
   *
   * Protobuf enum {@code google.cloud.alloydb.v1beta.Instance.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The state of the instance is unknown.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The instance is active and running.
     * </pre>
     *
     * <code>READY = 1;</code>
     */
    READY(1),
    /**
     *
     *
     * <pre>
     * The instance is stopped. Instance name and IP resources are preserved.
     * </pre>
     *
     * <code>STOPPED = 2;</code>
     */
    STOPPED(2),
    /**
     *
     *
     * <pre>
     * The instance is being created.
     * </pre>
     *
     * <code>CREATING = 3;</code>
     */
    CREATING(3),
    /**
     *
     *
     * <pre>
     * The instance is being deleted.
     * </pre>
     *
     * <code>DELETING = 4;</code>
     */
    DELETING(4),
    /**
     *
     *
     * <pre>
     * The instance is down for maintenance.
     * </pre>
     *
     * <code>MAINTENANCE = 5;</code>
     */
    MAINTENANCE(5),
    /**
     *
     *
     * <pre>
     * The creation of the instance failed or a fatal error occurred during
     * an operation on the instance.
     * Note: Instances in this state would tried to be auto-repaired. And
     * Customers should be able to restart, update or delete these instances.
     * </pre>
     *
     * <code>FAILED = 6;</code>
     */
    FAILED(6),
    /**
     *
     *
     * <pre>
     * Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that
     * index unused in case that state also needs to exposed via consumer apis
     * in future.
     * The instance has been configured to sync data from some other source.
     * </pre>
     *
     * <code>BOOTSTRAPPING = 8;</code>
     */
    BOOTSTRAPPING(8),
    /**
     *
     *
     * <pre>
     * The instance is being promoted.
     * </pre>
     *
     * <code>PROMOTING = 9;</code>
     */
    PROMOTING(9),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The state of the instance is unknown.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The instance is active and running.
     * </pre>
     *
     * <code>READY = 1;</code>
     */
    public static final int READY_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The instance is stopped. Instance name and IP resources are preserved.
     * </pre>
     *
     * <code>STOPPED = 2;</code>
     */
    public static final int STOPPED_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The instance is being created.
     * </pre>
     *
     * <code>CREATING = 3;</code>
     */
    public static final int CREATING_VALUE = 3;
    /**
     *
     *
     * <pre>
     * The instance is being deleted.
     * </pre>
     *
     * <code>DELETING = 4;</code>
     */
    public static final int DELETING_VALUE = 4;
    /**
     *
     *
     * <pre>
     * The instance is down for maintenance.
     * </pre>
     *
     * <code>MAINTENANCE = 5;</code>
     */
    public static final int MAINTENANCE_VALUE = 5;
    /**
     *
     *
     * <pre>
     * The creation of the instance failed or a fatal error occurred during
     * an operation on the instance.
     * Note: Instances in this state would tried to be auto-repaired. And
     * Customers should be able to restart, update or delete these instances.
     * </pre>
     *
     * <code>FAILED = 6;</code>
     */
    public static final int FAILED_VALUE = 6;
    /**
     *
     *
     * <pre>
     * Index 7 is used in the producer apis for ROLLED_BACK state. Keeping that
     * index unused in case that state also needs to exposed via consumer apis
     * in future.
     * The instance has been configured to sync data from some other source.
     * </pre>
     *
     * <code>BOOTSTRAPPING = 8;</code>
     */
    public static final int BOOTSTRAPPING_VALUE = 8;
    /**
     *
     *
     * <pre>
     * The instance is being promoted.
     * </pre>
     *
     * <code>PROMOTING = 9;</code>
     */
    public static final int PROMOTING_VALUE = 9;

    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 State 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 State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return READY;
        case 2:
          return STOPPED;
        case 3:
          return CREATING;
        case 4:
          return DELETING;
        case 5:
          return MAINTENANCE;
        case 6:
          return FAILED;
        case 8:
          return BOOTSTRAPPING;
        case 9:
          return PROMOTING;
        default:
          return null;
      }
    }

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

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

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.alloydb.v1beta.Instance.State)
  }

  /**
   *
   *
   * <pre>
   * Type of an Instance
   * </pre>
   *
   * Protobuf enum {@code google.cloud.alloydb.v1beta.Instance.InstanceType}
   */
  public enum InstanceType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The type of the instance is unknown.
     * </pre>
     *
     * <code>INSTANCE_TYPE_UNSPECIFIED = 0;</code>
     */
    INSTANCE_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * PRIMARY instances support read and write operations.
     * </pre>
     *
     * <code>PRIMARY = 1;</code>
     */
    PRIMARY(1),
    /**
     *
     *
     * <pre>
     * READ POOL instances support read operations only. Each read pool instance
     * consists of one or more homogeneous nodes.
     *  * Read pool of size 1 can only have zonal availability.
     *  * Read pools with node count of 2 or more can have regional
     *    availability (nodes are present in 2 or more zones in a region).
     * </pre>
     *
     * <code>READ_POOL = 2;</code>
     */
    READ_POOL(2),
    /**
     *
     *
     * <pre>
     * SECONDARY instances support read operations only. SECONDARY instance
     * is a cross-region read replica
     * </pre>
     *
     * <code>SECONDARY = 3;</code>
     */
    SECONDARY(3),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The type of the instance is unknown.
     * </pre>
     *
     * <code>INSTANCE_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int INSTANCE_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * PRIMARY instances support read and write operations.
     * </pre>
     *
     * <code>PRIMARY = 1;</code>
     */
    public static final int PRIMARY_VALUE = 1;
    /**
     *
     *
     * <pre>
     * READ POOL instances support read operations only. Each read pool instance
     * consists of one or more homogeneous nodes.
     *  * Read pool of size 1 can only have zonal availability.
     *  * Read pools with node count of 2 or more can have regional
     *    availability (nodes are present in 2 or more zones in a region).
     * </pre>
     *
     * <code>READ_POOL = 2;</code>
     */
    public static final int READ_POOL_VALUE = 2;
    /**
     *
     *
     * <pre>
     * SECONDARY instances support read operations only. SECONDARY instance
     * is a cross-region read replica
     * </pre>
     *
     * <code>SECONDARY = 3;</code>
     */
    public static final int SECONDARY_VALUE = 3;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static InstanceType 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 InstanceType forNumber(int value) {
      switch (value) {
        case 0:
          return INSTANCE_TYPE_UNSPECIFIED;
        case 1:
          return PRIMARY;
        case 2:
          return READ_POOL;
        case 3:
          return SECONDARY;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<InstanceType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<InstanceType>() {
          public InstanceType findValueByNumber(int number) {
            return InstanceType.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.v1beta.Instance.getDescriptor().getEnumTypes().get(1);
    }

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.alloydb.v1beta.Instance.InstanceType)
  }

  /**
   *
   *
   * <pre>
   * The Availability type of an instance. Potential values:
   * - ZONAL: The instance serves data from only one zone. Outages in that
   * zone affect instance availability.
   * - REGIONAL: The instance can serve data from more than one zone in a
   * region (it is highly available).
   * </pre>
   *
   * Protobuf enum {@code google.cloud.alloydb.v1beta.Instance.AvailabilityType}
   */
  public enum AvailabilityType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * This is an unknown Availability type.
     * </pre>
     *
     * <code>AVAILABILITY_TYPE_UNSPECIFIED = 0;</code>
     */
    AVAILABILITY_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Zonal available instance.
     * </pre>
     *
     * <code>ZONAL = 1;</code>
     */
    ZONAL(1),
    /**
     *
     *
     * <pre>
     * Regional (or Highly) available instance.
     * </pre>
     *
     * <code>REGIONAL = 2;</code>
     */
    REGIONAL(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * This is an unknown Availability type.
     * </pre>
     *
     * <code>AVAILABILITY_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int AVAILABILITY_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Zonal available instance.
     * </pre>
     *
     * <code>ZONAL = 1;</code>
     */
    public static final int ZONAL_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Regional (or Highly) available instance.
     * </pre>
     *
     * <code>REGIONAL = 2;</code>
     */
    public static final int REGIONAL_VALUE = 2;

    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 AvailabilityType 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 AvailabilityType forNumber(int value) {
      switch (value) {
        case 0:
          return AVAILABILITY_TYPE_UNSPECIFIED;
        case 1:
          return ZONAL;
        case 2:
          return REGIONAL;
        default:
          return null;
      }
    }

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

    private static final com.google.protobuf.Internal.EnumLiteMap<AvailabilityType>
        internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<AvailabilityType>() {
              public AvailabilityType findValueByNumber(int number) {
                return AvailabilityType.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.v1beta.Instance.getDescriptor().getEnumTypes().get(2);
    }

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

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

    // @@protoc_insertion_point(enum_scope:google.cloud.alloydb.v1beta.Instance.AvailabilityType)
  }

  public interface MachineConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.MachineConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The number of CPU's in the VM instance.
     * </pre>
     *
     * <code>int32 cpu_count = 1;</code>
     *
     * @return The cpuCount.
     */
    int getCpuCount();
  }
  /**
   *
   *
   * <pre>
   * MachineConfig describes the configuration of a machine.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.MachineConfig}
   */
  public static final class MachineConfig extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.MachineConfig)
      MachineConfigOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use MachineConfig.newBuilder() to construct.
    private MachineConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private MachineConfig() {}

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

    @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.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_MachineConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_MachineConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1beta.Instance.MachineConfig.class,
              com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder.class);
    }

    public static final int CPU_COUNT_FIELD_NUMBER = 1;
    private int cpuCount_ = 0;
    /**
     *
     *
     * <pre>
     * The number of CPU's in the VM instance.
     * </pre>
     *
     * <code>int32 cpu_count = 1;</code>
     *
     * @return The cpuCount.
     */
    @java.lang.Override
    public int getCpuCount() {
      return cpuCount_;
    }

    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 (cpuCount_ != 0) {
        output.writeInt32(1, cpuCount_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (cpuCount_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, cpuCount_);
      }
      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.v1beta.Instance.MachineConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1beta.Instance.MachineConfig other =
          (com.google.cloud.alloydb.v1beta.Instance.MachineConfig) obj;

      if (getCpuCount() != other.getCpuCount()) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + CPU_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + getCpuCount();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

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

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

    public static com.google.cloud.alloydb.v1beta.Instance.MachineConfig 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.v1beta.Instance.MachineConfig 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>
     * MachineConfig describes the configuration of a machine.
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.MachineConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.MachineConfig)
        com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_MachineConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_MachineConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1beta.Instance.MachineConfig.class,
                com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder.class);
      }

      // Construct using com.google.cloud.alloydb.v1beta.Instance.MachineConfig.newBuilder()
      private Builder() {}

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

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

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

      @java.lang.Override
      public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance();
      }

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

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

      private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance.MachineConfig result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.cpuCount_ = cpuCount_;
        }
      }

      @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.v1beta.Instance.MachineConfig) {
          return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.MachineConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance.MachineConfig other) {
        if (other == com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance())
          return this;
        if (other.getCpuCount() != 0) {
          setCpuCount(other.getCpuCount());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8:
                {
                  cpuCount_ = input.readInt32();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              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 int cpuCount_;
      /**
       *
       *
       * <pre>
       * The number of CPU's in the VM instance.
       * </pre>
       *
       * <code>int32 cpu_count = 1;</code>
       *
       * @return The cpuCount.
       */
      @java.lang.Override
      public int getCpuCount() {
        return cpuCount_;
      }
      /**
       *
       *
       * <pre>
       * The number of CPU's in the VM instance.
       * </pre>
       *
       * <code>int32 cpu_count = 1;</code>
       *
       * @param value The cpuCount to set.
       * @return This builder for chaining.
       */
      public Builder setCpuCount(int value) {

        cpuCount_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The number of CPU's in the VM instance.
       * </pre>
       *
       * <code>int32 cpu_count = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearCpuCount() {
        bitField0_ = (bitField0_ & ~0x00000001);
        cpuCount_ = 0;
        onChanged();
        return this;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.MachineConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.MachineConfig)
    private static final com.google.cloud.alloydb.v1beta.Instance.MachineConfig DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.MachineConfig();
    }

    public static com.google.cloud.alloydb.v1beta.Instance.MachineConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface NodeOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.Node)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     * </pre>
     *
     * <code>string zone_id = 1;</code>
     *
     * @return The zoneId.
     */
    java.lang.String getZoneId();
    /**
     *
     *
     * <pre>
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     * </pre>
     *
     * <code>string zone_id = 1;</code>
     *
     * @return The bytes for zoneId.
     */
    com.google.protobuf.ByteString getZoneIdBytes();

    /**
     *
     *
     * <pre>
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     * </pre>
     *
     * <code>string id = 2;</code>
     *
     * @return The id.
     */
    java.lang.String getId();
    /**
     *
     *
     * <pre>
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     * </pre>
     *
     * <code>string id = 2;</code>
     *
     * @return The bytes for id.
     */
    com.google.protobuf.ByteString getIdBytes();

    /**
     *
     *
     * <pre>
     * The private IP address of the VM e.g. "10.57.0.34".
     * </pre>
     *
     * <code>string ip = 3;</code>
     *
     * @return The ip.
     */
    java.lang.String getIp();
    /**
     *
     *
     * <pre>
     * The private IP address of the VM e.g. "10.57.0.34".
     * </pre>
     *
     * <code>string ip = 3;</code>
     *
     * @return The bytes for ip.
     */
    com.google.protobuf.ByteString getIpBytes();

    /**
     *
     *
     * <pre>
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     * </pre>
     *
     * <code>string state = 4;</code>
     *
     * @return The state.
     */
    java.lang.String getState();
    /**
     *
     *
     * <pre>
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     * </pre>
     *
     * <code>string state = 4;</code>
     *
     * @return The bytes for state.
     */
    com.google.protobuf.ByteString getStateBytes();
  }
  /**
   *
   *
   * <pre>
   * Details of a single node in the instance.
   * Nodes in an AlloyDB instance are ephemereal, they can change during
   * update, failover, autohealing and resize operations.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.Node}
   */
  public static final class Node extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.Node)
      NodeOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use Node.newBuilder() to construct.
    private Node(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private Node() {
      zoneId_ = "";
      id_ = "";
      ip_ = "";
      state_ = "";
    }

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

    @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.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_Node_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_Node_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1beta.Instance.Node.class,
              com.google.cloud.alloydb.v1beta.Instance.Node.Builder.class);
    }

    public static final int ZONE_ID_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object zoneId_ = "";
    /**
     *
     *
     * <pre>
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     * </pre>
     *
     * <code>string zone_id = 1;</code>
     *
     * @return The zoneId.
     */
    @java.lang.Override
    public java.lang.String getZoneId() {
      java.lang.Object ref = zoneId_;
      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();
        zoneId_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone of the VM e.g. "us-central1-b".
     * </pre>
     *
     * <code>string zone_id = 1;</code>
     *
     * @return The bytes for zoneId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getZoneIdBytes() {
      java.lang.Object ref = zoneId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        zoneId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ID_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object id_ = "";
    /**
     *
     *
     * <pre>
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     * </pre>
     *
     * <code>string id = 2;</code>
     *
     * @return The id.
     */
    @java.lang.Override
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      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();
        id_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
     * </pre>
     *
     * <code>string id = 2;</code>
     *
     * @return The bytes for id.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int IP_FIELD_NUMBER = 3;

    @SuppressWarnings("serial")
    private volatile java.lang.Object ip_ = "";
    /**
     *
     *
     * <pre>
     * The private IP address of the VM e.g. "10.57.0.34".
     * </pre>
     *
     * <code>string ip = 3;</code>
     *
     * @return The ip.
     */
    @java.lang.Override
    public java.lang.String getIp() {
      java.lang.Object ref = ip_;
      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();
        ip_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * The private IP address of the VM e.g. "10.57.0.34".
     * </pre>
     *
     * <code>string ip = 3;</code>
     *
     * @return The bytes for ip.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getIpBytes() {
      java.lang.Object ref = ip_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        ip_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int STATE_FIELD_NUMBER = 4;

    @SuppressWarnings("serial")
    private volatile java.lang.Object state_ = "";
    /**
     *
     *
     * <pre>
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     * </pre>
     *
     * <code>string state = 4;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public java.lang.String getState() {
      java.lang.Object ref = state_;
      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();
        state_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Determined by state of the compute VM and postgres-service health.
     * Compute VM state can have values listed in
     * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
     * postgres-service health can have values: HEALTHY and UNHEALTHY.
     * </pre>
     *
     * <code>string state = 4;</code>
     *
     * @return The bytes for state.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getStateBytes() {
      java.lang.Object ref = state_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        state_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, zoneId_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ip_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, state_);
      }
      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(zoneId_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, zoneId_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ip_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, state_);
      }
      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.v1beta.Instance.Node)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1beta.Instance.Node other =
          (com.google.cloud.alloydb.v1beta.Instance.Node) obj;

      if (!getZoneId().equals(other.getZoneId())) return false;
      if (!getId().equals(other.getId())) return false;
      if (!getIp().equals(other.getIp())) return false;
      if (!getState().equals(other.getState())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + ZONE_ID_FIELD_NUMBER;
      hash = (53 * hash) + getZoneId().hashCode();
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId().hashCode();
      hash = (37 * hash) + IP_FIELD_NUMBER;
      hash = (53 * hash) + getIp().hashCode();
      hash = (37 * hash) + STATE_FIELD_NUMBER;
      hash = (53 * hash) + getState().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

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

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

    public static com.google.cloud.alloydb.v1beta.Instance.Node 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.v1beta.Instance.Node 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>
     * Details of a single node in the instance.
     * Nodes in an AlloyDB instance are ephemereal, they can change during
     * update, failover, autohealing and resize operations.
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.Node}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.Node)
        com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_Node_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_Node_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1beta.Instance.Node.class,
                com.google.cloud.alloydb.v1beta.Instance.Node.Builder.class);
      }

      // Construct using com.google.cloud.alloydb.v1beta.Instance.Node.newBuilder()
      private Builder() {}

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

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

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

      @java.lang.Override
      public com.google.cloud.alloydb.v1beta.Instance.Node getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance();
      }

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

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

      private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance.Node result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.zoneId_ = zoneId_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.id_ = id_;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.ip_ = ip_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.state_ = state_;
        }
      }

      @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.v1beta.Instance.Node) {
          return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.Node) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance.Node other) {
        if (other == com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance())
          return this;
        if (!other.getZoneId().isEmpty()) {
          zoneId_ = other.zoneId_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getId().isEmpty()) {
          id_ = other.id_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (!other.getIp().isEmpty()) {
          ip_ = other.ip_;
          bitField0_ |= 0x00000004;
          onChanged();
        }
        if (!other.getState().isEmpty()) {
          state_ = other.state_;
          bitField0_ |= 0x00000008;
          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:
                {
                  zoneId_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  id_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              case 26:
                {
                  ip_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 26
              case 34:
                {
                  state_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 34
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object zoneId_ = "";
      /**
       *
       *
       * <pre>
       * The Compute Engine zone of the VM e.g. "us-central1-b".
       * </pre>
       *
       * <code>string zone_id = 1;</code>
       *
       * @return The zoneId.
       */
      public java.lang.String getZoneId() {
        java.lang.Object ref = zoneId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          zoneId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The Compute Engine zone of the VM e.g. "us-central1-b".
       * </pre>
       *
       * <code>string zone_id = 1;</code>
       *
       * @return The bytes for zoneId.
       */
      public com.google.protobuf.ByteString getZoneIdBytes() {
        java.lang.Object ref = zoneId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          zoneId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The Compute Engine zone of the VM e.g. "us-central1-b".
       * </pre>
       *
       * <code>string zone_id = 1;</code>
       *
       * @param value The zoneId to set.
       * @return This builder for chaining.
       */
      public Builder setZoneId(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        zoneId_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The Compute Engine zone of the VM e.g. "us-central1-b".
       * </pre>
       *
       * <code>string zone_id = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearZoneId() {
        zoneId_ = getDefaultInstance().getZoneId();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The Compute Engine zone of the VM e.g. "us-central1-b".
       * </pre>
       *
       * <code>string zone_id = 1;</code>
       *
       * @param value The bytes for zoneId to set.
       * @return This builder for chaining.
       */
      public Builder setZoneIdBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        zoneId_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object id_ = "";
      /**
       *
       *
       * <pre>
       * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
       * </pre>
       *
       * <code>string id = 2;</code>
       *
       * @return The id.
       */
      public java.lang.String getId() {
        java.lang.Object ref = id_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          id_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
       * </pre>
       *
       * <code>string id = 2;</code>
       *
       * @return The bytes for id.
       */
      public com.google.protobuf.ByteString getIdBytes() {
        java.lang.Object ref = id_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          id_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
       * </pre>
       *
       * <code>string id = 2;</code>
       *
       * @param value The id to set.
       * @return This builder for chaining.
       */
      public Builder setId(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        id_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
       * </pre>
       *
       * <code>string id = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearId() {
        id_ = getDefaultInstance().getId();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The identifier of the VM e.g. "test-read-0601-407e52be-ms3l".
       * </pre>
       *
       * <code>string id = 2;</code>
       *
       * @param value The bytes for id to set.
       * @return This builder for chaining.
       */
      public Builder setIdBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        id_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      private java.lang.Object ip_ = "";
      /**
       *
       *
       * <pre>
       * The private IP address of the VM e.g. "10.57.0.34".
       * </pre>
       *
       * <code>string ip = 3;</code>
       *
       * @return The ip.
       */
      public java.lang.String getIp() {
        java.lang.Object ref = ip_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          ip_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The private IP address of the VM e.g. "10.57.0.34".
       * </pre>
       *
       * <code>string ip = 3;</code>
       *
       * @return The bytes for ip.
       */
      public com.google.protobuf.ByteString getIpBytes() {
        java.lang.Object ref = ip_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          ip_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * The private IP address of the VM e.g. "10.57.0.34".
       * </pre>
       *
       * <code>string ip = 3;</code>
       *
       * @param value The ip to set.
       * @return This builder for chaining.
       */
      public Builder setIp(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ip_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The private IP address of the VM e.g. "10.57.0.34".
       * </pre>
       *
       * <code>string ip = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearIp() {
        ip_ = getDefaultInstance().getIp();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The private IP address of the VM e.g. "10.57.0.34".
       * </pre>
       *
       * <code>string ip = 3;</code>
       *
       * @param value The bytes for ip to set.
       * @return This builder for chaining.
       */
      public Builder setIpBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        ip_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }

      private java.lang.Object state_ = "";
      /**
       *
       *
       * <pre>
       * Determined by state of the compute VM and postgres-service health.
       * Compute VM state can have values listed in
       * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
       * postgres-service health can have values: HEALTHY and UNHEALTHY.
       * </pre>
       *
       * <code>string state = 4;</code>
       *
       * @return The state.
       */
      public java.lang.String getState() {
        java.lang.Object ref = state_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          state_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Determined by state of the compute VM and postgres-service health.
       * Compute VM state can have values listed in
       * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
       * postgres-service health can have values: HEALTHY and UNHEALTHY.
       * </pre>
       *
       * <code>string state = 4;</code>
       *
       * @return The bytes for state.
       */
      public com.google.protobuf.ByteString getStateBytes() {
        java.lang.Object ref = state_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          state_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Determined by state of the compute VM and postgres-service health.
       * Compute VM state can have values listed in
       * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
       * postgres-service health can have values: HEALTHY and UNHEALTHY.
       * </pre>
       *
       * <code>string state = 4;</code>
       *
       * @param value The state to set.
       * @return This builder for chaining.
       */
      public Builder setState(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        state_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Determined by state of the compute VM and postgres-service health.
       * Compute VM state can have values listed in
       * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
       * postgres-service health can have values: HEALTHY and UNHEALTHY.
       * </pre>
       *
       * <code>string state = 4;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearState() {
        state_ = getDefaultInstance().getState();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Determined by state of the compute VM and postgres-service health.
       * Compute VM state can have values listed in
       * https://cloud.google.com/compute/docs/instances/instance-life-cycle and
       * postgres-service health can have values: HEALTHY and UNHEALTHY.
       * </pre>
       *
       * <code>string state = 4;</code>
       *
       * @param value The bytes for state to set.
       * @return This builder for chaining.
       */
      public Builder setStateBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        state_ = value;
        bitField0_ |= 0x00000008;
        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.v1beta.Instance.Node)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.Node)
    private static final com.google.cloud.alloydb.v1beta.Instance.Node DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.Node();
    }

    public static com.google.cloud.alloydb.v1beta.Instance.Node getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.Node getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface QueryInsightsInstanceConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Record application tags for an instance.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_application_tags = 2;</code>
     *
     * @return Whether the recordApplicationTags field is set.
     */
    boolean hasRecordApplicationTags();
    /**
     *
     *
     * <pre>
     * Record application tags for an instance.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_application_tags = 2;</code>
     *
     * @return The recordApplicationTags.
     */
    boolean getRecordApplicationTags();

    /**
     *
     *
     * <pre>
     * Record client address for an instance. Client address is PII information.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_client_address = 3;</code>
     *
     * @return Whether the recordClientAddress field is set.
     */
    boolean hasRecordClientAddress();
    /**
     *
     *
     * <pre>
     * Record client address for an instance. Client address is PII information.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_client_address = 3;</code>
     *
     * @return The recordClientAddress.
     */
    boolean getRecordClientAddress();

    /**
     *
     *
     * <pre>
     * Query string length. The default value is 1024.
     * Any integer between 256 and 4500 is considered valid.
     * </pre>
     *
     * <code>uint32 query_string_length = 4;</code>
     *
     * @return The queryStringLength.
     */
    int getQueryStringLength();

    /**
     *
     *
     * <pre>
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 5.
     * Any integer between 0 and 20 is considered valid.
     * </pre>
     *
     * <code>optional uint32 query_plans_per_minute = 5;</code>
     *
     * @return Whether the queryPlansPerMinute field is set.
     */
    boolean hasQueryPlansPerMinute();
    /**
     *
     *
     * <pre>
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 5.
     * Any integer between 0 and 20 is considered valid.
     * </pre>
     *
     * <code>optional uint32 query_plans_per_minute = 5;</code>
     *
     * @return The queryPlansPerMinute.
     */
    int getQueryPlansPerMinute();
  }
  /**
   *
   *
   * <pre>
   * QueryInsights Instance specific configuration.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig}
   */
  public static final class QueryInsightsInstanceConfig
      extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig)
      QueryInsightsInstanceConfigOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use QueryInsightsInstanceConfig.newBuilder() to construct.
    private QueryInsightsInstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private QueryInsightsInstanceConfig() {}

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

    @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.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_QueryInsightsInstanceConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_QueryInsightsInstanceConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.class,
              com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder.class);
    }

    private int bitField0_;
    public static final int RECORD_APPLICATION_TAGS_FIELD_NUMBER = 2;
    private boolean recordApplicationTags_ = false;
    /**
     *
     *
     * <pre>
     * Record application tags for an instance.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_application_tags = 2;</code>
     *
     * @return Whether the recordApplicationTags field is set.
     */
    @java.lang.Override
    public boolean hasRecordApplicationTags() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *
     *
     * <pre>
     * Record application tags for an instance.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_application_tags = 2;</code>
     *
     * @return The recordApplicationTags.
     */
    @java.lang.Override
    public boolean getRecordApplicationTags() {
      return recordApplicationTags_;
    }

    public static final int RECORD_CLIENT_ADDRESS_FIELD_NUMBER = 3;
    private boolean recordClientAddress_ = false;
    /**
     *
     *
     * <pre>
     * Record client address for an instance. Client address is PII information.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_client_address = 3;</code>
     *
     * @return Whether the recordClientAddress field is set.
     */
    @java.lang.Override
    public boolean hasRecordClientAddress() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * Record client address for an instance. Client address is PII information.
     * This flag is turned "on" by default.
     * </pre>
     *
     * <code>optional bool record_client_address = 3;</code>
     *
     * @return The recordClientAddress.
     */
    @java.lang.Override
    public boolean getRecordClientAddress() {
      return recordClientAddress_;
    }

    public static final int QUERY_STRING_LENGTH_FIELD_NUMBER = 4;
    private int queryStringLength_ = 0;
    /**
     *
     *
     * <pre>
     * Query string length. The default value is 1024.
     * Any integer between 256 and 4500 is considered valid.
     * </pre>
     *
     * <code>uint32 query_string_length = 4;</code>
     *
     * @return The queryStringLength.
     */
    @java.lang.Override
    public int getQueryStringLength() {
      return queryStringLength_;
    }

    public static final int QUERY_PLANS_PER_MINUTE_FIELD_NUMBER = 5;
    private int queryPlansPerMinute_ = 0;
    /**
     *
     *
     * <pre>
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 5.
     * Any integer between 0 and 20 is considered valid.
     * </pre>
     *
     * <code>optional uint32 query_plans_per_minute = 5;</code>
     *
     * @return Whether the queryPlansPerMinute field is set.
     */
    @java.lang.Override
    public boolean hasQueryPlansPerMinute() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * Number of query execution plans captured by Insights per minute
     * for all queries combined. The default value is 5.
     * Any integer between 0 and 20 is considered valid.
     * </pre>
     *
     * <code>optional uint32 query_plans_per_minute = 5;</code>
     *
     * @return The queryPlansPerMinute.
     */
    @java.lang.Override
    public int getQueryPlansPerMinute() {
      return queryPlansPerMinute_;
    }

    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 (((bitField0_ & 0x00000001) != 0)) {
        output.writeBool(2, recordApplicationTags_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeBool(3, recordClientAddress_);
      }
      if (queryStringLength_ != 0) {
        output.writeUInt32(4, queryStringLength_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeUInt32(5, queryPlansPerMinute_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, recordApplicationTags_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, recordClientAddress_);
      }
      if (queryStringLength_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, queryStringLength_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, queryPlansPerMinute_);
      }
      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.v1beta.Instance.QueryInsightsInstanceConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig other =
          (com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig) obj;

      if (hasRecordApplicationTags() != other.hasRecordApplicationTags()) return false;
      if (hasRecordApplicationTags()) {
        if (getRecordApplicationTags() != other.getRecordApplicationTags()) return false;
      }
      if (hasRecordClientAddress() != other.hasRecordClientAddress()) return false;
      if (hasRecordClientAddress()) {
        if (getRecordClientAddress() != other.getRecordClientAddress()) return false;
      }
      if (getQueryStringLength() != other.getQueryStringLength()) return false;
      if (hasQueryPlansPerMinute() != other.hasQueryPlansPerMinute()) return false;
      if (hasQueryPlansPerMinute()) {
        if (getQueryPlansPerMinute() != other.getQueryPlansPerMinute()) 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 (hasRecordApplicationTags()) {
        hash = (37 * hash) + RECORD_APPLICATION_TAGS_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRecordApplicationTags());
      }
      if (hasRecordClientAddress()) {
        hash = (37 * hash) + RECORD_CLIENT_ADDRESS_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRecordClientAddress());
      }
      hash = (37 * hash) + QUERY_STRING_LENGTH_FIELD_NUMBER;
      hash = (53 * hash) + getQueryStringLength();
      if (hasQueryPlansPerMinute()) {
        hash = (37 * hash) + QUERY_PLANS_PER_MINUTE_FIELD_NUMBER;
        hash = (53 * hash) + getQueryPlansPerMinute();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

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

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

    public static com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig 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.v1beta.Instance.QueryInsightsInstanceConfig 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>
     * QueryInsights Instance specific configuration.
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig)
        com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_QueryInsightsInstanceConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_QueryInsightsInstanceConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.class,
                com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder.class);
      }

      // Construct using
      // com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.newBuilder()
      private Builder() {}

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

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        recordApplicationTags_ = false;
        recordClientAddress_ = false;
        queryStringLength_ = 0;
        queryPlansPerMinute_ = 0;
        return this;
      }

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

      @java.lang.Override
      public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
          getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
            .getDefaultInstance();
      }

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

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

      private void buildPartial0(
          com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig result) {
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.recordApplicationTags_ = recordApplicationTags_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.recordClientAddress_ = recordClientAddress_;
          to_bitField0_ |= 0x00000002;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.queryStringLength_ = queryStringLength_;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.queryPlansPerMinute_ = queryPlansPerMinute_;
          to_bitField0_ |= 0x00000004;
        }
        result.bitField0_ |= to_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.v1beta.Instance.QueryInsightsInstanceConfig) {
          return mergeFrom(
              (com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig other) {
        if (other
            == com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
                .getDefaultInstance()) return this;
        if (other.hasRecordApplicationTags()) {
          setRecordApplicationTags(other.getRecordApplicationTags());
        }
        if (other.hasRecordClientAddress()) {
          setRecordClientAddress(other.getRecordClientAddress());
        }
        if (other.getQueryStringLength() != 0) {
          setQueryStringLength(other.getQueryStringLength());
        }
        if (other.hasQueryPlansPerMinute()) {
          setQueryPlansPerMinute(other.getQueryPlansPerMinute());
        }
        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 16:
                {
                  recordApplicationTags_ = input.readBool();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 16
              case 24:
                {
                  recordClientAddress_ = input.readBool();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 24
              case 32:
                {
                  queryStringLength_ = input.readUInt32();
                  bitField0_ |= 0x00000004;
                  break;
                } // case 32
              case 40:
                {
                  queryPlansPerMinute_ = input.readUInt32();
                  bitField0_ |= 0x00000008;
                  break;
                } // case 40
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private boolean recordApplicationTags_;
      /**
       *
       *
       * <pre>
       * Record application tags for an instance.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_application_tags = 2;</code>
       *
       * @return Whether the recordApplicationTags field is set.
       */
      @java.lang.Override
      public boolean hasRecordApplicationTags() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       *
       *
       * <pre>
       * Record application tags for an instance.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_application_tags = 2;</code>
       *
       * @return The recordApplicationTags.
       */
      @java.lang.Override
      public boolean getRecordApplicationTags() {
        return recordApplicationTags_;
      }
      /**
       *
       *
       * <pre>
       * Record application tags for an instance.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_application_tags = 2;</code>
       *
       * @param value The recordApplicationTags to set.
       * @return This builder for chaining.
       */
      public Builder setRecordApplicationTags(boolean value) {

        recordApplicationTags_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Record application tags for an instance.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_application_tags = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearRecordApplicationTags() {
        bitField0_ = (bitField0_ & ~0x00000001);
        recordApplicationTags_ = false;
        onChanged();
        return this;
      }

      private boolean recordClientAddress_;
      /**
       *
       *
       * <pre>
       * Record client address for an instance. Client address is PII information.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_client_address = 3;</code>
       *
       * @return Whether the recordClientAddress field is set.
       */
      @java.lang.Override
      public boolean hasRecordClientAddress() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       *
       *
       * <pre>
       * Record client address for an instance. Client address is PII information.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_client_address = 3;</code>
       *
       * @return The recordClientAddress.
       */
      @java.lang.Override
      public boolean getRecordClientAddress() {
        return recordClientAddress_;
      }
      /**
       *
       *
       * <pre>
       * Record client address for an instance. Client address is PII information.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_client_address = 3;</code>
       *
       * @param value The recordClientAddress to set.
       * @return This builder for chaining.
       */
      public Builder setRecordClientAddress(boolean value) {

        recordClientAddress_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Record client address for an instance. Client address is PII information.
       * This flag is turned "on" by default.
       * </pre>
       *
       * <code>optional bool record_client_address = 3;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearRecordClientAddress() {
        bitField0_ = (bitField0_ & ~0x00000002);
        recordClientAddress_ = false;
        onChanged();
        return this;
      }

      private int queryStringLength_;
      /**
       *
       *
       * <pre>
       * Query string length. The default value is 1024.
       * Any integer between 256 and 4500 is considered valid.
       * </pre>
       *
       * <code>uint32 query_string_length = 4;</code>
       *
       * @return The queryStringLength.
       */
      @java.lang.Override
      public int getQueryStringLength() {
        return queryStringLength_;
      }
      /**
       *
       *
       * <pre>
       * Query string length. The default value is 1024.
       * Any integer between 256 and 4500 is considered valid.
       * </pre>
       *
       * <code>uint32 query_string_length = 4;</code>
       *
       * @param value The queryStringLength to set.
       * @return This builder for chaining.
       */
      public Builder setQueryStringLength(int value) {

        queryStringLength_ = value;
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Query string length. The default value is 1024.
       * Any integer between 256 and 4500 is considered valid.
       * </pre>
       *
       * <code>uint32 query_string_length = 4;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearQueryStringLength() {
        bitField0_ = (bitField0_ & ~0x00000004);
        queryStringLength_ = 0;
        onChanged();
        return this;
      }

      private int queryPlansPerMinute_;
      /**
       *
       *
       * <pre>
       * Number of query execution plans captured by Insights per minute
       * for all queries combined. The default value is 5.
       * Any integer between 0 and 20 is considered valid.
       * </pre>
       *
       * <code>optional uint32 query_plans_per_minute = 5;</code>
       *
       * @return Whether the queryPlansPerMinute field is set.
       */
      @java.lang.Override
      public boolean hasQueryPlansPerMinute() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       *
       *
       * <pre>
       * Number of query execution plans captured by Insights per minute
       * for all queries combined. The default value is 5.
       * Any integer between 0 and 20 is considered valid.
       * </pre>
       *
       * <code>optional uint32 query_plans_per_minute = 5;</code>
       *
       * @return The queryPlansPerMinute.
       */
      @java.lang.Override
      public int getQueryPlansPerMinute() {
        return queryPlansPerMinute_;
      }
      /**
       *
       *
       * <pre>
       * Number of query execution plans captured by Insights per minute
       * for all queries combined. The default value is 5.
       * Any integer between 0 and 20 is considered valid.
       * </pre>
       *
       * <code>optional uint32 query_plans_per_minute = 5;</code>
       *
       * @param value The queryPlansPerMinute to set.
       * @return This builder for chaining.
       */
      public Builder setQueryPlansPerMinute(int value) {

        queryPlansPerMinute_ = value;
        bitField0_ |= 0x00000008;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Number of query execution plans captured by Insights per minute
       * for all queries combined. The default value is 5.
       * Any integer between 0 and 20 is considered valid.
       * </pre>
       *
       * <code>optional uint32 query_plans_per_minute = 5;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearQueryPlansPerMinute() {
        bitField0_ = (bitField0_ & ~0x00000008);
        queryPlansPerMinute_ = 0;
        onChanged();
        return this;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig)
    private static final com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig();
    }

    public static com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface ReadPoolConfigOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.alloydb.v1beta.Instance.ReadPoolConfig)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Read capacity, i.e. number of nodes in a read pool instance.
     * </pre>
     *
     * <code>int32 node_count = 1;</code>
     *
     * @return The nodeCount.
     */
    int getNodeCount();
  }
  /**
   *
   *
   * <pre>
   * Configuration for a read pool instance.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.ReadPoolConfig}
   */
  public static final class ReadPoolConfig extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.alloydb.v1beta.Instance.ReadPoolConfig)
      ReadPoolConfigOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use ReadPoolConfig.newBuilder() to construct.
    private ReadPoolConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private ReadPoolConfig() {}

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

    @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.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_ReadPoolConfig_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.alloydb.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_ReadPoolConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.class,
              com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder.class);
    }

    public static final int NODE_COUNT_FIELD_NUMBER = 1;
    private int nodeCount_ = 0;
    /**
     *
     *
     * <pre>
     * Read capacity, i.e. number of nodes in a read pool instance.
     * </pre>
     *
     * <code>int32 node_count = 1;</code>
     *
     * @return The nodeCount.
     */
    @java.lang.Override
    public int getNodeCount() {
      return nodeCount_;
    }

    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 (nodeCount_ != 0) {
        output.writeInt32(1, nodeCount_);
      }
      getUnknownFields().writeTo(output);
    }

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

      size = 0;
      if (nodeCount_ != 0) {
        size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, nodeCount_);
      }
      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.v1beta.Instance.ReadPoolConfig)) {
        return super.equals(obj);
      }
      com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig other =
          (com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig) obj;

      if (getNodeCount() != other.getNodeCount()) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + getNodeCount();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

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

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

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

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

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

    public static com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig 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.v1beta.Instance.ReadPoolConfig 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>
     * Configuration for a read pool instance.
     * </pre>
     *
     * Protobuf type {@code google.cloud.alloydb.v1beta.Instance.ReadPoolConfig}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance.ReadPoolConfig)
        com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_ReadPoolConfig_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.alloydb.v1beta.ResourcesProto
            .internal_static_google_cloud_alloydb_v1beta_Instance_ReadPoolConfig_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.class,
                com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder.class);
      }

      // Construct using com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.newBuilder()
      private Builder() {}

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

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

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

      @java.lang.Override
      public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getDefaultInstanceForType() {
        return com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance();
      }

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

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

      private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.nodeCount_ = nodeCount_;
        }
      }

      @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.v1beta.Instance.ReadPoolConfig) {
          return mergeFrom((com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig other) {
        if (other == com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance())
          return this;
        if (other.getNodeCount() != 0) {
          setNodeCount(other.getNodeCount());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 8:
                {
                  nodeCount_ = input.readInt32();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 8
              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 int nodeCount_;
      /**
       *
       *
       * <pre>
       * Read capacity, i.e. number of nodes in a read pool instance.
       * </pre>
       *
       * <code>int32 node_count = 1;</code>
       *
       * @return The nodeCount.
       */
      @java.lang.Override
      public int getNodeCount() {
        return nodeCount_;
      }
      /**
       *
       *
       * <pre>
       * Read capacity, i.e. number of nodes in a read pool instance.
       * </pre>
       *
       * <code>int32 node_count = 1;</code>
       *
       * @param value The nodeCount to set.
       * @return This builder for chaining.
       */
      public Builder setNodeCount(int value) {

        nodeCount_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Read capacity, i.e. number of nodes in a read pool instance.
       * </pre>
       *
       * <code>int32 node_count = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearNodeCount() {
        bitField0_ = (bitField0_ & ~0x00000001);
        nodeCount_ = 0;
        onChanged();
        return this;
      }

      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }

      // @@protoc_insertion_point(builder_scope:google.cloud.alloydb.v1beta.Instance.ReadPoolConfig)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.alloydb.v1beta.Instance.ReadPoolConfig)
    private static final com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig();
    }

    public static com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The name of the instance resource with the format:
   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
   * where the cluster and instance ID segments should satisfy the regex
   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
   * lowercase letters, numbers, and dashes, starting with a letter, and ending
   * with a letter or number. For more details see https://google.aip.dev/122.
   * The prefix of the instance resource name is the name of the parent
   * resource:
   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</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>
   * Output only. The name of the instance resource with the format:
   *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
   * where the cluster and instance ID segments should satisfy the regex
   * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
   * lowercase letters, numbers, and dashes, starting with a letter, and ending
   * with a letter or number. For more details see https://google.aip.dev/122.
   * The prefix of the instance resource name is the name of the parent
   * resource:
   *  * projects/{project}/locations/{region}/clusters/{cluster_id}
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</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 DISPLAY_NAME_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object displayName_ = "";
  /**
   *
   *
   * <pre>
   * User-settable and human-readable display name for the Instance.
   * </pre>
   *
   * <code>string display_name = 2;</code>
   *
   * @return The displayName.
   */
  @java.lang.Override
  public java.lang.String getDisplayName() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      displayName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * User-settable and human-readable display name for the Instance.
   * </pre>
   *
   * <code>string display_name = 2;</code>
   *
   * @return The bytes for displayName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDisplayNameBytes() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      displayName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int UID_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object uid_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The system-generated UID of the resource. The UID is assigned
   * when the resource is created, and it is retained until it is deleted.
   * </pre>
   *
   * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The uid.
   */
  @java.lang.Override
  public java.lang.String getUid() {
    java.lang.Object ref = uid_;
    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();
      uid_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The system-generated UID of the resource. The UID is assigned
   * when the resource is created, and it is retained until it is deleted.
   * </pre>
   *
   * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for uid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getUidBytes() {
    java.lang.Object ref = uid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      uid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp createTime_;
  /**
   *
   *
   * <pre>
   * Output only. Create time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the createTime field is set.
   */
  @java.lang.Override
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Create time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The createTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Create time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }

  public static final int UPDATE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp updateTime_;
  /**
   *
   *
   * <pre>
   * Output only. Update time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the updateTime field is set.
   */
  @java.lang.Override
  public boolean hasUpdateTime() {
    return updateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Update time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The updateTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getUpdateTime() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Update time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
    return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
  }

  public static final int DELETE_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp deleteTime_;
  /**
   *
   *
   * <pre>
   * Output only. Delete time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the deleteTime field is set.
   */
  @java.lang.Override
  public boolean hasDeleteTime() {
    return deleteTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. Delete time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The deleteTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getDeleteTime() {
    return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
  }
  /**
   *
   *
   * <pre>
   * Output only. Delete time stamp
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
    return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
  }

  public static final int LABELS_FIELD_NUMBER = 7;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.alloydb.v1beta.ResourcesProto
                .internal_static_google_cloud_alloydb_v1beta_Instance_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 7;</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int STATE_FIELD_NUMBER = 8;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * Output only. The current serving state of the instance.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * Output only. The current serving state of the instance.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.State getState() {
    com.google.cloud.alloydb.v1beta.Instance.State result =
        com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_);
    return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result;
  }

  public static final int INSTANCE_TYPE_FIELD_NUMBER = 9;
  private int instanceType_ = 0;
  /**
   *
   *
   * <pre>
   * Required. The type of the instance. Specified at creation time.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The enum numeric value on the wire for instanceType.
   */
  @java.lang.Override
  public int getInstanceTypeValue() {
    return instanceType_;
  }
  /**
   *
   *
   * <pre>
   * Required. The type of the instance. Specified at creation time.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
   * </code>
   *
   * @return The instanceType.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() {
    com.google.cloud.alloydb.v1beta.Instance.InstanceType result =
        com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_);
    return result == null
        ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED
        : result;
  }

  public static final int MACHINE_CONFIG_FIELD_NUMBER = 10;
  private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_;
  /**
   *
   *
   * <pre>
   * Configurations for the machines that host the underlying
   * database engine.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
   *
   * @return Whether the machineConfig field is set.
   */
  @java.lang.Override
  public boolean hasMachineConfig() {
    return machineConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Configurations for the machines that host the underlying
   * database engine.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
   *
   * @return The machineConfig.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() {
    return machineConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()
        : machineConfig_;
  }
  /**
   *
   *
   * <pre>
   * Configurations for the machines that host the underlying
   * database engine.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder
      getMachineConfigOrBuilder() {
    return machineConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()
        : machineConfig_;
  }

  public static final int AVAILABILITY_TYPE_FIELD_NUMBER = 11;
  private int availabilityType_ = 0;
  /**
   *
   *
   * <pre>
   * Availability type of an Instance.
   * Defaults to REGIONAL for both primary and read instances.
   * Note that primary and read instances can have different availability types.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
   *
   * @return The enum numeric value on the wire for availabilityType.
   */
  @java.lang.Override
  public int getAvailabilityTypeValue() {
    return availabilityType_;
  }
  /**
   *
   *
   * <pre>
   * Availability type of an Instance.
   * Defaults to REGIONAL for both primary and read instances.
   * Note that primary and read instances can have different availability types.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
   *
   * @return The availabilityType.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() {
    com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result =
        com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_);
    return result == null
        ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED
        : result;
  }

  public static final int GCE_ZONE_FIELD_NUMBER = 12;

  @SuppressWarnings("serial")
  private volatile java.lang.Object gceZone_ = "";
  /**
   *
   *
   * <pre>
   * The Compute Engine zone that the instance should serve from, per
   * https://cloud.google.com/compute/docs/regions-zones
   * This can ONLY be specified for ZONAL instances.
   * If present for a REGIONAL instance, an error will be thrown.
   * If this is absent for a ZONAL instance, instance is created in a random
   * zone with available capacity.
   * </pre>
   *
   * <code>string gce_zone = 12;</code>
   *
   * @return The gceZone.
   */
  @java.lang.Override
  public java.lang.String getGceZone() {
    java.lang.Object ref = gceZone_;
    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();
      gceZone_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Compute Engine zone that the instance should serve from, per
   * https://cloud.google.com/compute/docs/regions-zones
   * This can ONLY be specified for ZONAL instances.
   * If present for a REGIONAL instance, an error will be thrown.
   * If this is absent for a ZONAL instance, instance is created in a random
   * zone with available capacity.
   * </pre>
   *
   * <code>string gce_zone = 12;</code>
   *
   * @return The bytes for gceZone.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getGceZoneBytes() {
    java.lang.Object ref = gceZone_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      gceZone_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATABASE_FLAGS_FIELD_NUMBER = 13;

  private static final class DatabaseFlagsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.alloydb.v1beta.ResourcesProto
                .internal_static_google_cloud_alloydb_v1beta_Instance_DatabaseFlagsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> databaseFlags_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetDatabaseFlags() {
    if (databaseFlags_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          DatabaseFlagsDefaultEntryHolder.defaultEntry);
    }
    return databaseFlags_;
  }

  public int getDatabaseFlagsCount() {
    return internalGetDatabaseFlags().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Database flags. Set at instance level.
   *  * They are copied from primary instance on read instance creation.
   *  * Read instances can set new or override existing flags that are relevant
   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
   *    set on read instance may or may not be present on primary.
   * This is a list of "key": "value" pairs.
   * "key": The name of the flag. These flags are passed at instance setup time,
   * so include both server options and system variables for Postgres. Flags are
   * specified with underscores, not hyphens.
   * "value": The value of the flag. Booleans are set to **on** for true
   * and **off** for false. This field must be omitted if the flag
   * doesn't take a value.
   * </pre>
   *
   * <code>map&lt;string, string&gt; database_flags = 13;</code>
   */
  @java.lang.Override
  public boolean containsDatabaseFlags(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetDatabaseFlags().getMap().containsKey(key);
  }
  /** Use {@link #getDatabaseFlagsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getDatabaseFlags() {
    return getDatabaseFlagsMap();
  }
  /**
   *
   *
   * <pre>
   * Database flags. Set at instance level.
   *  * They are copied from primary instance on read instance creation.
   *  * Read instances can set new or override existing flags that are relevant
   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
   *    set on read instance may or may not be present on primary.
   * This is a list of "key": "value" pairs.
   * "key": The name of the flag. These flags are passed at instance setup time,
   * so include both server options and system variables for Postgres. Flags are
   * specified with underscores, not hyphens.
   * "value": The value of the flag. Booleans are set to **on** for true
   * and **off** for false. This field must be omitted if the flag
   * doesn't take a value.
   * </pre>
   *
   * <code>map&lt;string, string&gt; database_flags = 13;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getDatabaseFlagsMap() {
    return internalGetDatabaseFlags().getMap();
  }
  /**
   *
   *
   * <pre>
   * Database flags. Set at instance level.
   *  * They are copied from primary instance on read instance creation.
   *  * Read instances can set new or override existing flags that are relevant
   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
   *    set on read instance may or may not be present on primary.
   * This is a list of "key": "value" pairs.
   * "key": The name of the flag. These flags are passed at instance setup time,
   * so include both server options and system variables for Postgres. Flags are
   * specified with underscores, not hyphens.
   * "value": The value of the flag. Booleans are set to **on** for true
   * and **off** for false. This field must be omitted if the flag
   * doesn't take a value.
   * </pre>
   *
   * <code>map&lt;string, string&gt; database_flags = 13;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getDatabaseFlagsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetDatabaseFlags().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Database flags. Set at instance level.
   *  * They are copied from primary instance on read instance creation.
   *  * Read instances can set new or override existing flags that are relevant
   *    for reads, e.g. for enabling columnar cache on a read instance. Flags
   *    set on read instance may or may not be present on primary.
   * This is a list of "key": "value" pairs.
   * "key": The name of the flag. These flags are passed at instance setup time,
   * so include both server options and system variables for Postgres. Flags are
   * specified with underscores, not hyphens.
   * "value": The value of the flag. Booleans are set to **on** for true
   * and **off** for false. This field must be omitted if the flag
   * doesn't take a value.
   * </pre>
   *
   * <code>map&lt;string, string&gt; database_flags = 13;</code>
   */
  @java.lang.Override
  public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetDatabaseFlags().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int WRITABLE_NODE_FIELD_NUMBER = 19;
  private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_;
  /**
   *
   *
   * <pre>
   * Output only. This is set for the read-write VM of the PRIMARY instance
   * only.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return Whether the writableNode field is set.
   */
  @java.lang.Override
  public boolean hasWritableNode() {
    return writableNode_ != null;
  }
  /**
   *
   *
   * <pre>
   * Output only. This is set for the read-write VM of the PRIMARY instance
   * only.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   *
   * @return The writableNode.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.Node getWritableNode() {
    return writableNode_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()
        : writableNode_;
  }
  /**
   *
   *
   * <pre>
   * Output only. This is set for the read-write VM of the PRIMARY instance
   * only.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getWritableNodeOrBuilder() {
    return writableNode_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()
        : writableNode_;
  }

  public static final int NODES_FIELD_NUMBER = 20;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.alloydb.v1beta.Instance.Node> nodes_;
  /**
   *
   *
   * <pre>
   * Output only. List of available read-only VMs in this instance, including
   * the standby for a PRIMARY instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.alloydb.v1beta.Instance.Node> getNodesList() {
    return nodes_;
  }
  /**
   *
   *
   * <pre>
   * Output only. List of available read-only VMs in this instance, including
   * the standby for a PRIMARY instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
      getNodesOrBuilderList() {
    return nodes_;
  }
  /**
   *
   *
   * <pre>
   * Output only. List of available read-only VMs in this instance, including
   * the standby for a PRIMARY instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public int getNodesCount() {
    return nodes_.size();
  }
  /**
   *
   *
   * <pre>
   * Output only. List of available read-only VMs in this instance, including
   * the standby for a PRIMARY instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.Node getNodes(int index) {
    return nodes_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Output only. List of available read-only VMs in this instance, including
   * the standby for a PRIMARY instance.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getNodesOrBuilder(int index) {
    return nodes_.get(index);
  }

  public static final int QUERY_INSIGHTS_CONFIG_FIELD_NUMBER = 21;
  private com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig queryInsightsConfig_;
  /**
   *
   *
   * <pre>
   * Configuration for query insights.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
   * </code>
   *
   * @return Whether the queryInsightsConfig field is set.
   */
  @java.lang.Override
  public boolean hasQueryInsightsConfig() {
    return queryInsightsConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Configuration for query insights.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
   * </code>
   *
   * @return The queryInsightsConfig.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
      getQueryInsightsConfig() {
    return queryInsightsConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.getDefaultInstance()
        : queryInsightsConfig_;
  }
  /**
   *
   *
   * <pre>
   * Configuration for query insights.
   * </pre>
   *
   * <code>
   * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder
      getQueryInsightsConfigOrBuilder() {
    return queryInsightsConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.getDefaultInstance()
        : queryInsightsConfig_;
  }

  public static final int READ_POOL_CONFIG_FIELD_NUMBER = 14;
  private com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig readPoolConfig_;
  /**
   *
   *
   * <pre>
   * Read pool specific config.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
   *
   * @return Whether the readPoolConfig field is set.
   */
  @java.lang.Override
  public boolean hasReadPoolConfig() {
    return readPoolConfig_ != null;
  }
  /**
   *
   *
   * <pre>
   * Read pool specific config.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
   *
   * @return The readPoolConfig.
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getReadPoolConfig() {
    return readPoolConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()
        : readPoolConfig_;
  }
  /**
   *
   *
   * <pre>
   * Read pool specific config.
   * </pre>
   *
   * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
   */
  @java.lang.Override
  public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder
      getReadPoolConfigOrBuilder() {
    return readPoolConfig_ == null
        ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()
        : readPoolConfig_;
  }

  public static final int IP_ADDRESS_FIELD_NUMBER = 15;

  @SuppressWarnings("serial")
  private volatile java.lang.Object ipAddress_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The IP address for the Instance.
   * This is the connection endpoint for an end-user application.
   * </pre>
   *
   * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The ipAddress.
   */
  @java.lang.Override
  public java.lang.String getIpAddress() {
    java.lang.Object ref = ipAddress_;
    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();
      ipAddress_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The IP address for the Instance.
   * This is the connection endpoint for an end-user application.
   * </pre>
   *
   * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for ipAddress.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getIpAddressBytes() {
    java.lang.Object ref = ipAddress_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      ipAddress_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RECONCILING_FIELD_NUMBER = 16;
  private boolean reconciling_ = false;
  /**
   *
   *
   * <pre>
   * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
   * Set to true if the current state of Instance does not match the user's
   * intended state, and the service is actively updating the resource to
   * reconcile them. This can happen due to user-triggered updates or
   * system actions like failover or maintenance.
   * </pre>
   *
   * <code>bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The reconciling.
   */
  @java.lang.Override
  public boolean getReconciling() {
    return reconciling_;
  }

  public static final int ETAG_FIELD_NUMBER = 17;

  @SuppressWarnings("serial")
  private volatile java.lang.Object etag_ = "";
  /**
   *
   *
   * <pre>
   * For Resource freshness validation (https://google.aip.dev/154)
   * </pre>
   *
   * <code>string etag = 17;</code>
   *
   * @return The etag.
   */
  @java.lang.Override
  public java.lang.String getEtag() {
    java.lang.Object ref = etag_;
    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();
      etag_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * For Resource freshness validation (https://google.aip.dev/154)
   * </pre>
   *
   * <code>string etag = 17;</code>
   *
   * @return The bytes for etag.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getEtagBytes() {
    java.lang.Object ref = etag_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      etag_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ANNOTATIONS_FIELD_NUMBER = 18;

  private static final class AnnotationsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.alloydb.v1beta.ResourcesProto
                .internal_static_google_cloud_alloydb_v1beta_Instance_AnnotationsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> annotations_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetAnnotations() {
    if (annotations_ == null) {
      return com.google.protobuf.MapField.emptyMapField(AnnotationsDefaultEntryHolder.defaultEntry);
    }
    return annotations_;
  }

  public int getAnnotationsCount() {
    return internalGetAnnotations().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Annotations to allow client tools to store small amount of arbitrary data.
   * This is distinct from labels.
   * https://google.aip.dev/128
   * </pre>
   *
   * <code>map&lt;string, string&gt; annotations = 18;</code>
   */
  @java.lang.Override
  public boolean containsAnnotations(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetAnnotations().getMap().containsKey(key);
  }
  /** Use {@link #getAnnotationsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getAnnotations() {
    return getAnnotationsMap();
  }
  /**
   *
   *
   * <pre>
   * Annotations to allow client tools to store small amount of arbitrary data.
   * This is distinct from labels.
   * https://google.aip.dev/128
   * </pre>
   *
   * <code>map&lt;string, string&gt; annotations = 18;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getAnnotationsMap() {
    return internalGetAnnotations().getMap();
  }
  /**
   *
   *
   * <pre>
   * Annotations to allow client tools to store small amount of arbitrary data.
   * This is distinct from labels.
   * https://google.aip.dev/128
   * </pre>
   *
   * <code>map&lt;string, string&gt; annotations = 18;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getAnnotationsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetAnnotations().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Annotations to allow client tools to store small amount of arbitrary data.
   * This is distinct from labels.
   * https://google.aip.dev/128
   * </pre>
   *
   * <code>map&lt;string, string&gt; annotations = 18;</code>
   */
  @java.lang.Override
  public java.lang.String getAnnotationsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetAnnotations().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, uid_);
    }
    if (createTime_ != null) {
      output.writeMessage(4, getCreateTime());
    }
    if (updateTime_ != null) {
      output.writeMessage(5, getUpdateTime());
    }
    if (deleteTime_ != null) {
      output.writeMessage(6, getDeleteTime());
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7);
    if (state_ != com.google.cloud.alloydb.v1beta.Instance.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(8, state_);
    }
    if (instanceType_
        != com.google.cloud.alloydb.v1beta.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(9, instanceType_);
    }
    if (machineConfig_ != null) {
      output.writeMessage(10, getMachineConfig());
    }
    if (availabilityType_
        != com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.AVAILABILITY_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(11, availabilityType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gceZone_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, gceZone_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetDatabaseFlags(), DatabaseFlagsDefaultEntryHolder.defaultEntry, 13);
    if (readPoolConfig_ != null) {
      output.writeMessage(14, getReadPoolConfig());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, ipAddress_);
    }
    if (reconciling_ != false) {
      output.writeBool(16, reconciling_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, etag_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetAnnotations(), AnnotationsDefaultEntryHolder.defaultEntry, 18);
    if (writableNode_ != null) {
      output.writeMessage(19, getWritableNode());
    }
    for (int i = 0; i < nodes_.size(); i++) {
      output.writeMessage(20, nodes_.get(i));
    }
    if (queryInsightsConfig_ != null) {
      output.writeMessage(21, getQueryInsightsConfig());
    }
    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(displayName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, uid_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreateTime());
    }
    if (updateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime());
    }
    if (deleteTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getDeleteTime());
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__);
    }
    if (state_ != com.google.cloud.alloydb.v1beta.Instance.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, state_);
    }
    if (instanceType_
        != com.google.cloud.alloydb.v1beta.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, instanceType_);
    }
    if (machineConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getMachineConfig());
    }
    if (availabilityType_
        != com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.AVAILABILITY_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, availabilityType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gceZone_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, gceZone_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetDatabaseFlags().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> databaseFlags__ =
          DatabaseFlagsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, databaseFlags__);
    }
    if (readPoolConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getReadPoolConfig());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, ipAddress_);
    }
    if (reconciling_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, reconciling_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, etag_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetAnnotations().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> annotations__ =
          AnnotationsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, annotations__);
    }
    if (writableNode_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, getWritableNode());
    }
    for (int i = 0; i < nodes_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(20, nodes_.get(i));
    }
    if (queryInsightsConfig_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(21, getQueryInsightsConfig());
    }
    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.v1beta.Instance)) {
      return super.equals(obj);
    }
    com.google.cloud.alloydb.v1beta.Instance other = (com.google.cloud.alloydb.v1beta.Instance) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getDisplayName().equals(other.getDisplayName())) return false;
    if (!getUid().equals(other.getUid())) return false;
    if (hasCreateTime() != other.hasCreateTime()) return false;
    if (hasCreateTime()) {
      if (!getCreateTime().equals(other.getCreateTime())) return false;
    }
    if (hasUpdateTime() != other.hasUpdateTime()) return false;
    if (hasUpdateTime()) {
      if (!getUpdateTime().equals(other.getUpdateTime())) return false;
    }
    if (hasDeleteTime() != other.hasDeleteTime()) return false;
    if (hasDeleteTime()) {
      if (!getDeleteTime().equals(other.getDeleteTime())) return false;
    }
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (state_ != other.state_) return false;
    if (instanceType_ != other.instanceType_) return false;
    if (hasMachineConfig() != other.hasMachineConfig()) return false;
    if (hasMachineConfig()) {
      if (!getMachineConfig().equals(other.getMachineConfig())) return false;
    }
    if (availabilityType_ != other.availabilityType_) return false;
    if (!getGceZone().equals(other.getGceZone())) return false;
    if (!internalGetDatabaseFlags().equals(other.internalGetDatabaseFlags())) return false;
    if (hasWritableNode() != other.hasWritableNode()) return false;
    if (hasWritableNode()) {
      if (!getWritableNode().equals(other.getWritableNode())) return false;
    }
    if (!getNodesList().equals(other.getNodesList())) return false;
    if (hasQueryInsightsConfig() != other.hasQueryInsightsConfig()) return false;
    if (hasQueryInsightsConfig()) {
      if (!getQueryInsightsConfig().equals(other.getQueryInsightsConfig())) return false;
    }
    if (hasReadPoolConfig() != other.hasReadPoolConfig()) return false;
    if (hasReadPoolConfig()) {
      if (!getReadPoolConfig().equals(other.getReadPoolConfig())) return false;
    }
    if (!getIpAddress().equals(other.getIpAddress())) return false;
    if (getReconciling() != other.getReconciling()) return false;
    if (!getEtag().equals(other.getEtag())) return false;
    if (!internalGetAnnotations().equals(other.internalGetAnnotations())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDisplayName().hashCode();
    hash = (37 * hash) + UID_FIELD_NUMBER;
    hash = (53 * hash) + getUid().hashCode();
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasUpdateTime()) {
      hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUpdateTime().hashCode();
    }
    if (hasDeleteTime()) {
      hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getDeleteTime().hashCode();
    }
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + INSTANCE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + instanceType_;
    if (hasMachineConfig()) {
      hash = (37 * hash) + MACHINE_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getMachineConfig().hashCode();
    }
    hash = (37 * hash) + AVAILABILITY_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + availabilityType_;
    hash = (37 * hash) + GCE_ZONE_FIELD_NUMBER;
    hash = (53 * hash) + getGceZone().hashCode();
    if (!internalGetDatabaseFlags().getMap().isEmpty()) {
      hash = (37 * hash) + DATABASE_FLAGS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetDatabaseFlags().hashCode();
    }
    if (hasWritableNode()) {
      hash = (37 * hash) + WRITABLE_NODE_FIELD_NUMBER;
      hash = (53 * hash) + getWritableNode().hashCode();
    }
    if (getNodesCount() > 0) {
      hash = (37 * hash) + NODES_FIELD_NUMBER;
      hash = (53 * hash) + getNodesList().hashCode();
    }
    if (hasQueryInsightsConfig()) {
      hash = (37 * hash) + QUERY_INSIGHTS_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getQueryInsightsConfig().hashCode();
    }
    if (hasReadPoolConfig()) {
      hash = (37 * hash) + READ_POOL_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getReadPoolConfig().hashCode();
    }
    hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getIpAddress().hashCode();
    hash = (37 * hash) + RECONCILING_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReconciling());
    hash = (37 * hash) + ETAG_FIELD_NUMBER;
    hash = (53 * hash) + getEtag().hashCode();
    if (!internalGetAnnotations().getMap().isEmpty()) {
      hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetAnnotations().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.cloud.alloydb.v1beta.Instance 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.v1beta.Instance 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>
   * An Instance is a computing unit that an end customer can connect to.
   * It's the main unit of computing resources in AlloyDB.
   * </pre>
   *
   * Protobuf type {@code google.cloud.alloydb.v1beta.Instance}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.alloydb.v1beta.Instance)
      com.google.cloud.alloydb.v1beta.InstanceOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.alloydb.v1beta.ResourcesProto
          .internal_static_google_cloud_alloydb_v1beta_Instance_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 7:
          return internalGetLabels();
        case 13:
          return internalGetDatabaseFlags();
        case 18:
          return internalGetAnnotations();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 7:
          return internalGetMutableLabels();
        case 13:
          return internalGetMutableDatabaseFlags();
        case 18:
          return internalGetMutableAnnotations();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

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

    // Construct using com.google.cloud.alloydb.v1beta.Instance.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      displayName_ = "";
      uid_ = "";
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      deleteTime_ = null;
      if (deleteTimeBuilder_ != null) {
        deleteTimeBuilder_.dispose();
        deleteTimeBuilder_ = null;
      }
      internalGetMutableLabels().clear();
      state_ = 0;
      instanceType_ = 0;
      machineConfig_ = null;
      if (machineConfigBuilder_ != null) {
        machineConfigBuilder_.dispose();
        machineConfigBuilder_ = null;
      }
      availabilityType_ = 0;
      gceZone_ = "";
      internalGetMutableDatabaseFlags().clear();
      writableNode_ = null;
      if (writableNodeBuilder_ != null) {
        writableNodeBuilder_.dispose();
        writableNodeBuilder_ = null;
      }
      if (nodesBuilder_ == null) {
        nodes_ = java.util.Collections.emptyList();
      } else {
        nodes_ = null;
        nodesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00004000);
      queryInsightsConfig_ = null;
      if (queryInsightsConfigBuilder_ != null) {
        queryInsightsConfigBuilder_.dispose();
        queryInsightsConfigBuilder_ = null;
      }
      readPoolConfig_ = null;
      if (readPoolConfigBuilder_ != null) {
        readPoolConfigBuilder_.dispose();
        readPoolConfigBuilder_ = null;
      }
      ipAddress_ = "";
      reconciling_ = false;
      etag_ = "";
      internalGetMutableAnnotations().clear();
      return this;
    }

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

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

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

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

    private void buildPartialRepeatedFields(com.google.cloud.alloydb.v1beta.Instance result) {
      if (nodesBuilder_ == null) {
        if (((bitField0_ & 0x00004000) != 0)) {
          nodes_ = java.util.Collections.unmodifiableList(nodes_);
          bitField0_ = (bitField0_ & ~0x00004000);
        }
        result.nodes_ = nodes_;
      } else {
        result.nodes_ = nodesBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.alloydb.v1beta.Instance result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.displayName_ = displayName_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.uid_ = uid_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.deleteTime_ = deleteTimeBuilder_ == null ? deleteTime_ : deleteTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.instanceType_ = instanceType_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.machineConfig_ =
            machineConfigBuilder_ == null ? machineConfig_ : machineConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.availabilityType_ = availabilityType_;
      }
      if (((from_bitField0_ & 0x00000800) != 0)) {
        result.gceZone_ = gceZone_;
      }
      if (((from_bitField0_ & 0x00001000) != 0)) {
        result.databaseFlags_ = internalGetDatabaseFlags();
        result.databaseFlags_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00002000) != 0)) {
        result.writableNode_ =
            writableNodeBuilder_ == null ? writableNode_ : writableNodeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00008000) != 0)) {
        result.queryInsightsConfig_ =
            queryInsightsConfigBuilder_ == null
                ? queryInsightsConfig_
                : queryInsightsConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00010000) != 0)) {
        result.readPoolConfig_ =
            readPoolConfigBuilder_ == null ? readPoolConfig_ : readPoolConfigBuilder_.build();
      }
      if (((from_bitField0_ & 0x00020000) != 0)) {
        result.ipAddress_ = ipAddress_;
      }
      if (((from_bitField0_ & 0x00040000) != 0)) {
        result.reconciling_ = reconciling_;
      }
      if (((from_bitField0_ & 0x00080000) != 0)) {
        result.etag_ = etag_;
      }
      if (((from_bitField0_ & 0x00100000) != 0)) {
        result.annotations_ = internalGetAnnotations();
        result.annotations_.makeImmutable();
      }
    }

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

    public Builder mergeFrom(com.google.cloud.alloydb.v1beta.Instance other) {
      if (other == com.google.cloud.alloydb.v1beta.Instance.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getDisplayName().isEmpty()) {
        displayName_ = other.displayName_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getUid().isEmpty()) {
        uid_ = other.uid_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasUpdateTime()) {
        mergeUpdateTime(other.getUpdateTime());
      }
      if (other.hasDeleteTime()) {
        mergeDeleteTime(other.getDeleteTime());
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00000040;
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (other.instanceType_ != 0) {
        setInstanceTypeValue(other.getInstanceTypeValue());
      }
      if (other.hasMachineConfig()) {
        mergeMachineConfig(other.getMachineConfig());
      }
      if (other.availabilityType_ != 0) {
        setAvailabilityTypeValue(other.getAvailabilityTypeValue());
      }
      if (!other.getGceZone().isEmpty()) {
        gceZone_ = other.gceZone_;
        bitField0_ |= 0x00000800;
        onChanged();
      }
      internalGetMutableDatabaseFlags().mergeFrom(other.internalGetDatabaseFlags());
      bitField0_ |= 0x00001000;
      if (other.hasWritableNode()) {
        mergeWritableNode(other.getWritableNode());
      }
      if (nodesBuilder_ == null) {
        if (!other.nodes_.isEmpty()) {
          if (nodes_.isEmpty()) {
            nodes_ = other.nodes_;
            bitField0_ = (bitField0_ & ~0x00004000);
          } else {
            ensureNodesIsMutable();
            nodes_.addAll(other.nodes_);
          }
          onChanged();
        }
      } else {
        if (!other.nodes_.isEmpty()) {
          if (nodesBuilder_.isEmpty()) {
            nodesBuilder_.dispose();
            nodesBuilder_ = null;
            nodes_ = other.nodes_;
            bitField0_ = (bitField0_ & ~0x00004000);
            nodesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getNodesFieldBuilder()
                    : null;
          } else {
            nodesBuilder_.addAllMessages(other.nodes_);
          }
        }
      }
      if (other.hasQueryInsightsConfig()) {
        mergeQueryInsightsConfig(other.getQueryInsightsConfig());
      }
      if (other.hasReadPoolConfig()) {
        mergeReadPoolConfig(other.getReadPoolConfig());
      }
      if (!other.getIpAddress().isEmpty()) {
        ipAddress_ = other.ipAddress_;
        bitField0_ |= 0x00020000;
        onChanged();
      }
      if (other.getReconciling() != false) {
        setReconciling(other.getReconciling());
      }
      if (!other.getEtag().isEmpty()) {
        etag_ = other.etag_;
        bitField0_ |= 0x00080000;
        onChanged();
      }
      internalGetMutableAnnotations().mergeFrom(other.internalGetAnnotations());
      bitField0_ |= 0x00100000;
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                displayName_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                uid_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            case 58:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00000040;
                break;
              } // case 58
            case 64:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000080;
                break;
              } // case 64
            case 72:
              {
                instanceType_ = input.readEnum();
                bitField0_ |= 0x00000100;
                break;
              } // case 72
            case 82:
              {
                input.readMessage(getMachineConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000200;
                break;
              } // case 82
            case 88:
              {
                availabilityType_ = input.readEnum();
                bitField0_ |= 0x00000400;
                break;
              } // case 88
            case 98:
              {
                gceZone_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000800;
                break;
              } // case 98
            case 106:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> databaseFlags__ =
                    input.readMessage(
                        DatabaseFlagsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableDatabaseFlags()
                    .getMutableMap()
                    .put(databaseFlags__.getKey(), databaseFlags__.getValue());
                bitField0_ |= 0x00001000;
                break;
              } // case 106
            case 114:
              {
                input.readMessage(getReadPoolConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00010000;
                break;
              } // case 114
            case 122:
              {
                ipAddress_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00020000;
                break;
              } // case 122
            case 128:
              {
                reconciling_ = input.readBool();
                bitField0_ |= 0x00040000;
                break;
              } // case 128
            case 138:
              {
                etag_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00080000;
                break;
              } // case 138
            case 146:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> annotations__ =
                    input.readMessage(
                        AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableAnnotations()
                    .getMutableMap()
                    .put(annotations__.getKey(), annotations__.getValue());
                bitField0_ |= 0x00100000;
                break;
              } // case 146
            case 154:
              {
                input.readMessage(getWritableNodeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00002000;
                break;
              } // case 154
            case 162:
              {
                com.google.cloud.alloydb.v1beta.Instance.Node m =
                    input.readMessage(
                        com.google.cloud.alloydb.v1beta.Instance.Node.parser(), extensionRegistry);
                if (nodesBuilder_ == null) {
                  ensureNodesIsMutable();
                  nodes_.add(m);
                } else {
                  nodesBuilder_.addMessage(m);
                }
                break;
              } // case 162
            case 170:
              {
                input.readMessage(
                    getQueryInsightsConfigFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00008000;
                break;
              } // case 170
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The name of the instance resource with the format:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
     * where the cluster and instance ID segments should satisfy the regex
     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
     * lowercase letters, numbers, and dashes, starting with a letter, and ending
     * with a letter or number. For more details see https://google.aip.dev/122.
     * The prefix of the instance resource name is the name of the parent
     * resource:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</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>
     * Output only. The name of the instance resource with the format:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
     * where the cluster and instance ID segments should satisfy the regex
     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
     * lowercase letters, numbers, and dashes, starting with a letter, and ending
     * with a letter or number. For more details see https://google.aip.dev/122.
     * The prefix of the instance resource name is the name of the parent
     * resource:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</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>
     * Output only. The name of the instance resource with the format:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
     * where the cluster and instance ID segments should satisfy the regex
     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
     * lowercase letters, numbers, and dashes, starting with a letter, and ending
     * with a letter or number. For more details see https://google.aip.dev/122.
     * The prefix of the instance resource name is the name of the parent
     * resource:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the instance resource with the format:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
     * where the cluster and instance ID segments should satisfy the regex
     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
     * lowercase letters, numbers, and dashes, starting with a letter, and ending
     * with a letter or number. For more details see https://google.aip.dev/122.
     * The prefix of the instance resource name is the name of the parent
     * resource:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The name of the instance resource with the format:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}/instances/{instance_id}
     * where the cluster and instance ID segments should satisfy the regex
     * expression `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`, e.g. 1-63 characters of
     * lowercase letters, numbers, and dashes, starting with a letter, and ending
     * with a letter or number. For more details see https://google.aip.dev/122.
     * The prefix of the instance resource name is the name of the parent
     * resource:
     *  * projects/{project}/locations/{region}/clusters/{cluster_id}
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      name_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object displayName_ = "";
    /**
     *
     *
     * <pre>
     * User-settable and human-readable display name for the Instance.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     *
     * @return The displayName.
     */
    public java.lang.String getDisplayName() {
      java.lang.Object ref = displayName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        displayName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * User-settable and human-readable display name for the Instance.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     *
     * @return The bytes for displayName.
     */
    public com.google.protobuf.ByteString getDisplayNameBytes() {
      java.lang.Object ref = displayName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        displayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * User-settable and human-readable display name for the Instance.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     *
     * @param value The displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      displayName_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User-settable and human-readable display name for the Instance.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDisplayName() {
      displayName_ = getDefaultInstance().getDisplayName();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User-settable and human-readable display name for the Instance.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     *
     * @param value The bytes for displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      displayName_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object uid_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The system-generated UID of the resource. The UID is assigned
     * when the resource is created, and it is retained until it is deleted.
     * </pre>
     *
     * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The uid.
     */
    public java.lang.String getUid() {
      java.lang.Object ref = uid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        uid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The system-generated UID of the resource. The UID is assigned
     * when the resource is created, and it is retained until it is deleted.
     * </pre>
     *
     * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for uid.
     */
    public com.google.protobuf.ByteString getUidBytes() {
      java.lang.Object ref = uid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        uid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The system-generated UID of the resource. The UID is assigned
     * when the resource is created, and it is retained until it is deleted.
     * </pre>
     *
     * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The uid to set.
     * @return This builder for chaining.
     */
    public Builder setUid(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      uid_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The system-generated UID of the resource. The UID is assigned
     * when the resource is created, and it is retained until it is deleted.
     * </pre>
     *
     * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearUid() {
      uid_ = getDefaultInstance().getUid();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The system-generated UID of the resource. The UID is assigned
     * when the resource is created, and it is retained until it is deleted.
     * </pre>
     *
     * <code>string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for uid to set.
     * @return This builder for chaining.
     */
    public Builder setUidBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      uid_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        createTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the createTime field is set.
     */
    public boolean hasCreateTime() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The createTime.
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
      } else {
        createTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && createTime_ != null
            && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getCreateTimeBuilder().mergeFrom(value);
        } else {
          createTime_ = value;
        }
      } else {
        createTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearCreateTime() {
      bitField0_ = (bitField0_ & ~0x00000008);
      createTime_ = null;
      if (createTimeBuilder_ != null) {
        createTimeBuilder_.dispose();
        createTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : createTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Create time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(), getParentForChildren(), isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp updateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        updateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the updateTime field is set.
     */
    public boolean hasUpdateTime() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The updateTime.
     */
    public com.google.protobuf.Timestamp getUpdateTime() {
      if (updateTimeBuilder_ == null) {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      } else {
        return updateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        updateTime_ = value;
      } else {
        updateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (updateTimeBuilder_ == null) {
        updateTime_ = builderForValue.build();
      } else {
        updateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
      if (updateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && updateTime_ != null
            && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getUpdateTimeBuilder().mergeFrom(value);
        } else {
          updateTime_ = value;
        }
      } else {
        updateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearUpdateTime() {
      bitField0_ = (bitField0_ & ~0x00000010);
      updateTime_ = null;
      if (updateTimeBuilder_ != null) {
        updateTimeBuilder_.dispose();
        updateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getUpdateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
      if (updateTimeBuilder_ != null) {
        return updateTimeBuilder_.getMessageOrBuilder();
      } else {
        return updateTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : updateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Update time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getUpdateTimeFieldBuilder() {
      if (updateTimeBuilder_ == null) {
        updateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getUpdateTime(), getParentForChildren(), isClean());
        updateTime_ = null;
      }
      return updateTimeBuilder_;
    }

    private com.google.protobuf.Timestamp deleteTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        deleteTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the deleteTime field is set.
     */
    public boolean hasDeleteTime() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The deleteTime.
     */
    public com.google.protobuf.Timestamp getDeleteTime() {
      if (deleteTimeBuilder_ == null) {
        return deleteTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deleteTime_;
      } else {
        return deleteTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deleteTime_ = value;
      } else {
        deleteTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (deleteTimeBuilder_ == null) {
        deleteTime_ = builderForValue.build();
      } else {
        deleteTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && deleteTime_ != null
            && deleteTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
          getDeleteTimeBuilder().mergeFrom(value);
        } else {
          deleteTime_ = value;
        }
      } else {
        deleteTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearDeleteTime() {
      bitField0_ = (bitField0_ & ~0x00000020);
      deleteTime_ = null;
      if (deleteTimeBuilder_ != null) {
        deleteTimeBuilder_.dispose();
        deleteTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getDeleteTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
      if (deleteTimeBuilder_ != null) {
        return deleteTimeBuilder_.getMessageOrBuilder();
      } else {
        return deleteTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : deleteTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. Delete time stamp
     * </pre>
     *
     * <code>
     * .google.protobuf.Timestamp delete_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getDeleteTimeFieldBuilder() {
      if (deleteTimeBuilder_ == null) {
        deleteTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getDeleteTime(), getParentForChildren(), isClean());
        deleteTime_ = null;
      }
      return deleteTimeBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x00000040;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x00000040);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x00000040;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x00000040;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 7;</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00000040;
      return this;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * Output only. The current serving state of the instance.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current serving state of the instance.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {
      state_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current serving state of the instance.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.State getState() {
      com.google.cloud.alloydb.v1beta.Instance.State result =
          com.google.cloud.alloydb.v1beta.Instance.State.forNumber(state_);
      return result == null ? com.google.cloud.alloydb.v1beta.Instance.State.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current serving state of the instance.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.alloydb.v1beta.Instance.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000080;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The current serving state of the instance.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000080);
      state_ = 0;
      onChanged();
      return this;
    }

    private int instanceType_ = 0;
    /**
     *
     *
     * <pre>
     * Required. The type of the instance. Specified at creation time.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The enum numeric value on the wire for instanceType.
     */
    @java.lang.Override
    public int getInstanceTypeValue() {
      return instanceType_;
    }
    /**
     *
     *
     * <pre>
     * Required. The type of the instance. Specified at creation time.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The enum numeric value on the wire for instanceType to set.
     * @return This builder for chaining.
     */
    public Builder setInstanceTypeValue(int value) {
      instanceType_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The type of the instance. Specified at creation time.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return The instanceType.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.InstanceType getInstanceType() {
      com.google.cloud.alloydb.v1beta.Instance.InstanceType result =
          com.google.cloud.alloydb.v1beta.Instance.InstanceType.forNumber(instanceType_);
      return result == null
          ? com.google.cloud.alloydb.v1beta.Instance.InstanceType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Required. The type of the instance. Specified at creation time.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @param value The instanceType to set.
     * @return This builder for chaining.
     */
    public Builder setInstanceType(com.google.cloud.alloydb.v1beta.Instance.InstanceType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000100;
      instanceType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. The type of the instance. Specified at creation time.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.InstanceType instance_type = 9 [(.google.api.field_behavior) = REQUIRED];
     * </code>
     *
     * @return This builder for chaining.
     */
    public Builder clearInstanceType() {
      bitField0_ = (bitField0_ & ~0x00000100);
      instanceType_ = 0;
      onChanged();
      return this;
    }

    private com.google.cloud.alloydb.v1beta.Instance.MachineConfig machineConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.MachineConfig,
            com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder>
        machineConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     *
     * @return Whether the machineConfig field is set.
     */
    public boolean hasMachineConfig() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     *
     * @return The machineConfig.
     */
    public com.google.cloud.alloydb.v1beta.Instance.MachineConfig getMachineConfig() {
      if (machineConfigBuilder_ == null) {
        return machineConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()
            : machineConfig_;
      } else {
        return machineConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public Builder setMachineConfig(com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) {
      if (machineConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        machineConfig_ = value;
      } else {
        machineConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public Builder setMachineConfig(
        com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder builderForValue) {
      if (machineConfigBuilder_ == null) {
        machineConfig_ = builderForValue.build();
      } else {
        machineConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public Builder mergeMachineConfig(
        com.google.cloud.alloydb.v1beta.Instance.MachineConfig value) {
      if (machineConfigBuilder_ == null) {
        if (((bitField0_ & 0x00000200) != 0)
            && machineConfig_ != null
            && machineConfig_
                != com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()) {
          getMachineConfigBuilder().mergeFrom(value);
        } else {
          machineConfig_ = value;
        }
      } else {
        machineConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public Builder clearMachineConfig() {
      bitField0_ = (bitField0_ & ~0x00000200);
      machineConfig_ = null;
      if (machineConfigBuilder_ != null) {
        machineConfigBuilder_.dispose();
        machineConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder
        getMachineConfigBuilder() {
      bitField0_ |= 0x00000200;
      onChanged();
      return getMachineConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder
        getMachineConfigOrBuilder() {
      if (machineConfigBuilder_ != null) {
        return machineConfigBuilder_.getMessageOrBuilder();
      } else {
        return machineConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.MachineConfig.getDefaultInstance()
            : machineConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Configurations for the machines that host the underlying
     * database engine.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.MachineConfig machine_config = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.MachineConfig,
            com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder>
        getMachineConfigFieldBuilder() {
      if (machineConfigBuilder_ == null) {
        machineConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1beta.Instance.MachineConfig,
                com.google.cloud.alloydb.v1beta.Instance.MachineConfig.Builder,
                com.google.cloud.alloydb.v1beta.Instance.MachineConfigOrBuilder>(
                getMachineConfig(), getParentForChildren(), isClean());
        machineConfig_ = null;
      }
      return machineConfigBuilder_;
    }

    private int availabilityType_ = 0;
    /**
     *
     *
     * <pre>
     * Availability type of an Instance.
     * Defaults to REGIONAL for both primary and read instances.
     * Note that primary and read instances can have different availability types.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
     *
     * @return The enum numeric value on the wire for availabilityType.
     */
    @java.lang.Override
    public int getAvailabilityTypeValue() {
      return availabilityType_;
    }
    /**
     *
     *
     * <pre>
     * Availability type of an Instance.
     * Defaults to REGIONAL for both primary and read instances.
     * Note that primary and read instances can have different availability types.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
     *
     * @param value The enum numeric value on the wire for availabilityType to set.
     * @return This builder for chaining.
     */
    public Builder setAvailabilityTypeValue(int value) {
      availabilityType_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Availability type of an Instance.
     * Defaults to REGIONAL for both primary and read instances.
     * Note that primary and read instances can have different availability types.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
     *
     * @return The availabilityType.
     */
    @java.lang.Override
    public com.google.cloud.alloydb.v1beta.Instance.AvailabilityType getAvailabilityType() {
      com.google.cloud.alloydb.v1beta.Instance.AvailabilityType result =
          com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.forNumber(availabilityType_);
      return result == null
          ? com.google.cloud.alloydb.v1beta.Instance.AvailabilityType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Availability type of an Instance.
     * Defaults to REGIONAL for both primary and read instances.
     * Note that primary and read instances can have different availability types.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
     *
     * @param value The availabilityType to set.
     * @return This builder for chaining.
     */
    public Builder setAvailabilityType(
        com.google.cloud.alloydb.v1beta.Instance.AvailabilityType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000400;
      availabilityType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Availability type of an Instance.
     * Defaults to REGIONAL for both primary and read instances.
     * Note that primary and read instances can have different availability types.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.AvailabilityType availability_type = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAvailabilityType() {
      bitField0_ = (bitField0_ & ~0x00000400);
      availabilityType_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object gceZone_ = "";
    /**
     *
     *
     * <pre>
     * The Compute Engine zone that the instance should serve from, per
     * https://cloud.google.com/compute/docs/regions-zones
     * This can ONLY be specified for ZONAL instances.
     * If present for a REGIONAL instance, an error will be thrown.
     * If this is absent for a ZONAL instance, instance is created in a random
     * zone with available capacity.
     * </pre>
     *
     * <code>string gce_zone = 12;</code>
     *
     * @return The gceZone.
     */
    public java.lang.String getGceZone() {
      java.lang.Object ref = gceZone_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        gceZone_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone that the instance should serve from, per
     * https://cloud.google.com/compute/docs/regions-zones
     * This can ONLY be specified for ZONAL instances.
     * If present for a REGIONAL instance, an error will be thrown.
     * If this is absent for a ZONAL instance, instance is created in a random
     * zone with available capacity.
     * </pre>
     *
     * <code>string gce_zone = 12;</code>
     *
     * @return The bytes for gceZone.
     */
    public com.google.protobuf.ByteString getGceZoneBytes() {
      java.lang.Object ref = gceZone_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        gceZone_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone that the instance should serve from, per
     * https://cloud.google.com/compute/docs/regions-zones
     * This can ONLY be specified for ZONAL instances.
     * If present for a REGIONAL instance, an error will be thrown.
     * If this is absent for a ZONAL instance, instance is created in a random
     * zone with available capacity.
     * </pre>
     *
     * <code>string gce_zone = 12;</code>
     *
     * @param value The gceZone to set.
     * @return This builder for chaining.
     */
    public Builder setGceZone(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      gceZone_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone that the instance should serve from, per
     * https://cloud.google.com/compute/docs/regions-zones
     * This can ONLY be specified for ZONAL instances.
     * If present for a REGIONAL instance, an error will be thrown.
     * If this is absent for a ZONAL instance, instance is created in a random
     * zone with available capacity.
     * </pre>
     *
     * <code>string gce_zone = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearGceZone() {
      gceZone_ = getDefaultInstance().getGceZone();
      bitField0_ = (bitField0_ & ~0x00000800);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone that the instance should serve from, per
     * https://cloud.google.com/compute/docs/regions-zones
     * This can ONLY be specified for ZONAL instances.
     * If present for a REGIONAL instance, an error will be thrown.
     * If this is absent for a ZONAL instance, instance is created in a random
     * zone with available capacity.
     * </pre>
     *
     * <code>string gce_zone = 12;</code>
     *
     * @param value The bytes for gceZone to set.
     * @return This builder for chaining.
     */
    public Builder setGceZoneBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      gceZone_ = value;
      bitField0_ |= 0x00000800;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> databaseFlags_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetDatabaseFlags() {
      if (databaseFlags_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            DatabaseFlagsDefaultEntryHolder.defaultEntry);
      }
      return databaseFlags_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableDatabaseFlags() {
      if (databaseFlags_ == null) {
        databaseFlags_ =
            com.google.protobuf.MapField.newMapField(DatabaseFlagsDefaultEntryHolder.defaultEntry);
      }
      if (!databaseFlags_.isMutable()) {
        databaseFlags_ = databaseFlags_.copy();
      }
      bitField0_ |= 0x00001000;
      onChanged();
      return databaseFlags_;
    }

    public int getDatabaseFlagsCount() {
      return internalGetDatabaseFlags().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    @java.lang.Override
    public boolean containsDatabaseFlags(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetDatabaseFlags().getMap().containsKey(key);
    }
    /** Use {@link #getDatabaseFlagsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getDatabaseFlags() {
      return getDatabaseFlagsMap();
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getDatabaseFlagsMap() {
      return internalGetDatabaseFlags().getMap();
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getDatabaseFlagsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetDatabaseFlags().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    @java.lang.Override
    public java.lang.String getDatabaseFlagsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetDatabaseFlags().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearDatabaseFlags() {
      bitField0_ = (bitField0_ & ~0x00001000);
      internalGetMutableDatabaseFlags().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    public Builder removeDatabaseFlags(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableDatabaseFlags().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableDatabaseFlags() {
      bitField0_ |= 0x00001000;
      return internalGetMutableDatabaseFlags().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    public Builder putDatabaseFlags(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableDatabaseFlags().getMutableMap().put(key, value);
      bitField0_ |= 0x00001000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Database flags. Set at instance level.
     *  * They are copied from primary instance on read instance creation.
     *  * Read instances can set new or override existing flags that are relevant
     *    for reads, e.g. for enabling columnar cache on a read instance. Flags
     *    set on read instance may or may not be present on primary.
     * This is a list of "key": "value" pairs.
     * "key": The name of the flag. These flags are passed at instance setup time,
     * so include both server options and system variables for Postgres. Flags are
     * specified with underscores, not hyphens.
     * "value": The value of the flag. Booleans are set to **on** for true
     * and **off** for false. This field must be omitted if the flag
     * doesn't take a value.
     * </pre>
     *
     * <code>map&lt;string, string&gt; database_flags = 13;</code>
     */
    public Builder putAllDatabaseFlags(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableDatabaseFlags().getMutableMap().putAll(values);
      bitField0_ |= 0x00001000;
      return this;
    }

    private com.google.cloud.alloydb.v1beta.Instance.Node writableNode_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.Node,
            com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
            com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
        writableNodeBuilder_;
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return Whether the writableNode field is set.
     */
    public boolean hasWritableNode() {
      return ((bitField0_ & 0x00002000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     *
     * @return The writableNode.
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node getWritableNode() {
      if (writableNodeBuilder_ == null) {
        return writableNode_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()
            : writableNode_;
      } else {
        return writableNodeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) {
      if (writableNodeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        writableNode_ = value;
      } else {
        writableNodeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setWritableNode(
        com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) {
      if (writableNodeBuilder_ == null) {
        writableNode_ = builderForValue.build();
      } else {
        writableNodeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder mergeWritableNode(com.google.cloud.alloydb.v1beta.Instance.Node value) {
      if (writableNodeBuilder_ == null) {
        if (((bitField0_ & 0x00002000) != 0)
            && writableNode_ != null
            && writableNode_
                != com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()) {
          getWritableNodeBuilder().mergeFrom(value);
        } else {
          writableNode_ = value;
        }
      } else {
        writableNodeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00002000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearWritableNode() {
      bitField0_ = (bitField0_ & ~0x00002000);
      writableNode_ = null;
      if (writableNodeBuilder_ != null) {
        writableNodeBuilder_.dispose();
        writableNodeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getWritableNodeBuilder() {
      bitField0_ |= 0x00002000;
      onChanged();
      return getWritableNodeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getWritableNodeOrBuilder() {
      if (writableNodeBuilder_ != null) {
        return writableNodeBuilder_.getMessageOrBuilder();
      } else {
        return writableNode_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance()
            : writableNode_;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. This is set for the read-write VM of the PRIMARY instance
     * only.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.Node writable_node = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.Node,
            com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
            com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
        getWritableNodeFieldBuilder() {
      if (writableNodeBuilder_ == null) {
        writableNodeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1beta.Instance.Node,
                com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
                com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>(
                getWritableNode(), getParentForChildren(), isClean());
        writableNode_ = null;
      }
      return writableNodeBuilder_;
    }

    private java.util.List<com.google.cloud.alloydb.v1beta.Instance.Node> nodes_ =
        java.util.Collections.emptyList();

    private void ensureNodesIsMutable() {
      if (!((bitField0_ & 0x00004000) != 0)) {
        nodes_ = new java.util.ArrayList<com.google.cloud.alloydb.v1beta.Instance.Node>(nodes_);
        bitField0_ |= 0x00004000;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.Node,
            com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
            com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
        nodesBuilder_;

    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.alloydb.v1beta.Instance.Node> getNodesList() {
      if (nodesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(nodes_);
      } else {
        return nodesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public int getNodesCount() {
      if (nodesBuilder_ == null) {
        return nodes_.size();
      } else {
        return nodesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node getNodes(int index) {
      if (nodesBuilder_ == null) {
        return nodes_.get(index);
      } else {
        return nodesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) {
      if (nodesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodesIsMutable();
        nodes_.set(index, value);
        onChanged();
      } else {
        nodesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder setNodes(
        int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) {
      if (nodesBuilder_ == null) {
        ensureNodesIsMutable();
        nodes_.set(index, builderForValue.build());
        onChanged();
      } else {
        nodesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node value) {
      if (nodesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodesIsMutable();
        nodes_.add(value);
        onChanged();
      } else {
        nodesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addNodes(int index, com.google.cloud.alloydb.v1beta.Instance.Node value) {
      if (nodesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureNodesIsMutable();
        nodes_.add(index, value);
        onChanged();
      } else {
        nodesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addNodes(com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) {
      if (nodesBuilder_ == null) {
        ensureNodesIsMutable();
        nodes_.add(builderForValue.build());
        onChanged();
      } else {
        nodesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addNodes(
        int index, com.google.cloud.alloydb.v1beta.Instance.Node.Builder builderForValue) {
      if (nodesBuilder_ == null) {
        ensureNodesIsMutable();
        nodes_.add(index, builderForValue.build());
        onChanged();
      } else {
        nodesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder addAllNodes(
        java.lang.Iterable<? extends com.google.cloud.alloydb.v1beta.Instance.Node> values) {
      if (nodesBuilder_ == null) {
        ensureNodesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_);
        onChanged();
      } else {
        nodesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder clearNodes() {
      if (nodesBuilder_ == null) {
        nodes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00004000);
        onChanged();
      } else {
        nodesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public Builder removeNodes(int index) {
      if (nodesBuilder_ == null) {
        ensureNodesIsMutable();
        nodes_.remove(index);
        onChanged();
      } else {
        nodesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node.Builder getNodesBuilder(int index) {
      return getNodesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder getNodesOrBuilder(int index) {
      if (nodesBuilder_ == null) {
        return nodes_.get(index);
      } else {
        return nodesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<? extends com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
        getNodesOrBuilderList() {
      if (nodesBuilder_ != null) {
        return nodesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(nodes_);
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder() {
      return getNodesFieldBuilder()
          .addBuilder(com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.Node.Builder addNodesBuilder(int index) {
      return getNodesFieldBuilder()
          .addBuilder(index, com.google.cloud.alloydb.v1beta.Instance.Node.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Output only. List of available read-only VMs in this instance, including
     * the standby for a PRIMARY instance.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.alloydb.v1beta.Instance.Node nodes = 20 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * </code>
     */
    public java.util.List<com.google.cloud.alloydb.v1beta.Instance.Node.Builder>
        getNodesBuilderList() {
      return getNodesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.Node,
            com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
            com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>
        getNodesFieldBuilder() {
      if (nodesBuilder_ == null) {
        nodesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.alloydb.v1beta.Instance.Node,
                com.google.cloud.alloydb.v1beta.Instance.Node.Builder,
                com.google.cloud.alloydb.v1beta.Instance.NodeOrBuilder>(
                nodes_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean());
        nodes_ = null;
      }
      return nodesBuilder_;
    }

    private com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
        queryInsightsConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig,
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder>
        queryInsightsConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     *
     * @return Whether the queryInsightsConfig field is set.
     */
    public boolean hasQueryInsightsConfig() {
      return ((bitField0_ & 0x00008000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     *
     * @return The queryInsightsConfig.
     */
    public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
        getQueryInsightsConfig() {
      if (queryInsightsConfigBuilder_ == null) {
        return queryInsightsConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
                .getDefaultInstance()
            : queryInsightsConfig_;
      } else {
        return queryInsightsConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public Builder setQueryInsightsConfig(
        com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) {
      if (queryInsightsConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        queryInsightsConfig_ = value;
      } else {
        queryInsightsConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public Builder setQueryInsightsConfig(
        com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder
            builderForValue) {
      if (queryInsightsConfigBuilder_ == null) {
        queryInsightsConfig_ = builderForValue.build();
      } else {
        queryInsightsConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public Builder mergeQueryInsightsConfig(
        com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig value) {
      if (queryInsightsConfigBuilder_ == null) {
        if (((bitField0_ & 0x00008000) != 0)
            && queryInsightsConfig_ != null
            && queryInsightsConfig_
                != com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
                    .getDefaultInstance()) {
          getQueryInsightsConfigBuilder().mergeFrom(value);
        } else {
          queryInsightsConfig_ = value;
        }
      } else {
        queryInsightsConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00008000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public Builder clearQueryInsightsConfig() {
      bitField0_ = (bitField0_ & ~0x00008000);
      queryInsightsConfig_ = null;
      if (queryInsightsConfigBuilder_ != null) {
        queryInsightsConfigBuilder_.dispose();
        queryInsightsConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder
        getQueryInsightsConfigBuilder() {
      bitField0_ |= 0x00008000;
      onChanged();
      return getQueryInsightsConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder
        getQueryInsightsConfigOrBuilder() {
      if (queryInsightsConfigBuilder_ != null) {
        return queryInsightsConfigBuilder_.getMessageOrBuilder();
      } else {
        return queryInsightsConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig
                .getDefaultInstance()
            : queryInsightsConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Configuration for query insights.
     * </pre>
     *
     * <code>
     * .google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig query_insights_config = 21;
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig,
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder>
        getQueryInsightsConfigFieldBuilder() {
      if (queryInsightsConfigBuilder_ == null) {
        queryInsightsConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig,
                com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfig.Builder,
                com.google.cloud.alloydb.v1beta.Instance.QueryInsightsInstanceConfigOrBuilder>(
                getQueryInsightsConfig(), getParentForChildren(), isClean());
        queryInsightsConfig_ = null;
      }
      return queryInsightsConfigBuilder_;
    }

    private com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig readPoolConfig_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig,
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder>
        readPoolConfigBuilder_;
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     *
     * @return Whether the readPoolConfig field is set.
     */
    public boolean hasReadPoolConfig() {
      return ((bitField0_ & 0x00010000) != 0);
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     *
     * @return The readPoolConfig.
     */
    public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig getReadPoolConfig() {
      if (readPoolConfigBuilder_ == null) {
        return readPoolConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()
            : readPoolConfig_;
      } else {
        return readPoolConfigBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public Builder setReadPoolConfig(
        com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) {
      if (readPoolConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        readPoolConfig_ = value;
      } else {
        readPoolConfigBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public Builder setReadPoolConfig(
        com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder builderForValue) {
      if (readPoolConfigBuilder_ == null) {
        readPoolConfig_ = builderForValue.build();
      } else {
        readPoolConfigBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public Builder mergeReadPoolConfig(
        com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig value) {
      if (readPoolConfigBuilder_ == null) {
        if (((bitField0_ & 0x00010000) != 0)
            && readPoolConfig_ != null
            && readPoolConfig_
                != com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()) {
          getReadPoolConfigBuilder().mergeFrom(value);
        } else {
          readPoolConfig_ = value;
        }
      } else {
        readPoolConfigBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00010000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public Builder clearReadPoolConfig() {
      bitField0_ = (bitField0_ & ~0x00010000);
      readPoolConfig_ = null;
      if (readPoolConfigBuilder_ != null) {
        readPoolConfigBuilder_.dispose();
        readPoolConfigBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder
        getReadPoolConfigBuilder() {
      bitField0_ |= 0x00010000;
      onChanged();
      return getReadPoolConfigFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    public com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder
        getReadPoolConfigOrBuilder() {
      if (readPoolConfigBuilder_ != null) {
        return readPoolConfigBuilder_.getMessageOrBuilder();
      } else {
        return readPoolConfig_ == null
            ? com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.getDefaultInstance()
            : readPoolConfig_;
      }
    }
    /**
     *
     *
     * <pre>
     * Read pool specific config.
     * </pre>
     *
     * <code>.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig read_pool_config = 14;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig,
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder,
            com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder>
        getReadPoolConfigFieldBuilder() {
      if (readPoolConfigBuilder_ == null) {
        readPoolConfigBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig,
                com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfig.Builder,
                com.google.cloud.alloydb.v1beta.Instance.ReadPoolConfigOrBuilder>(
                getReadPoolConfig(), getParentForChildren(), isClean());
        readPoolConfig_ = null;
      }
      return readPoolConfigBuilder_;
    }

    private java.lang.Object ipAddress_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The IP address for the Instance.
     * This is the connection endpoint for an end-user application.
     * </pre>
     *
     * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The ipAddress.
     */
    public java.lang.String getIpAddress() {
      java.lang.Object ref = ipAddress_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        ipAddress_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The IP address for the Instance.
     * This is the connection endpoint for an end-user application.
     * </pre>
     *
     * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for ipAddress.
     */
    public com.google.protobuf.ByteString getIpAddressBytes() {
      java.lang.Object ref = ipAddress_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        ipAddress_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The IP address for the Instance.
     * This is the connection endpoint for an end-user application.
     * </pre>
     *
     * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The ipAddress to set.
     * @return This builder for chaining.
     */
    public Builder setIpAddress(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ipAddress_ = value;
      bitField0_ |= 0x00020000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The IP address for the Instance.
     * This is the connection endpoint for an end-user application.
     * </pre>
     *
     * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIpAddress() {
      ipAddress_ = getDefaultInstance().getIpAddress();
      bitField0_ = (bitField0_ & ~0x00020000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The IP address for the Instance.
     * This is the connection endpoint for an end-user application.
     * </pre>
     *
     * <code>string ip_address = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for ipAddress to set.
     * @return This builder for chaining.
     */
    public Builder setIpAddressBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ipAddress_ = value;
      bitField0_ |= 0x00020000;
      onChanged();
      return this;
    }

    private boolean reconciling_;
    /**
     *
     *
     * <pre>
     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
     * Set to true if the current state of Instance does not match the user's
     * intended state, and the service is actively updating the resource to
     * reconcile them. This can happen due to user-triggered updates or
     * system actions like failover or maintenance.
     * </pre>
     *
     * <code>bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The reconciling.
     */
    @java.lang.Override
    public boolean getReconciling() {
      return reconciling_;
    }
    /**
     *
     *
     * <pre>
     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
     * Set to true if the current state of Instance does not match the user's
     * intended state, and the service is actively updating the resource to
     * reconcile them. This can happen due to user-triggered updates or
     * system actions like failover or maintenance.
     * </pre>
     *
     * <code>bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The reconciling to set.
     * @return This builder for chaining.
     */
    public Builder setReconciling(boolean value) {

      reconciling_ = value;
      bitField0_ |= 0x00040000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. Reconciling (https://google.aip.dev/128#reconciliation).
     * Set to true if the current state of Instance does not match the user's
     * intended state, and the service is actively updating the resource to
     * reconcile them. This can happen due to user-triggered updates or
     * system actions like failover or maintenance.
     * </pre>
     *
     * <code>bool reconciling = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearReconciling() {
      bitField0_ = (bitField0_ & ~0x00040000);
      reconciling_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object etag_ = "";
    /**
     *
     *
     * <pre>
     * For Resource freshness validation (https://google.aip.dev/154)
     * </pre>
     *
     * <code>string etag = 17;</code>
     *
     * @return The etag.
     */
    public java.lang.String getEtag() {
      java.lang.Object ref = etag_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        etag_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * For Resource freshness validation (https://google.aip.dev/154)
     * </pre>
     *
     * <code>string etag = 17;</code>
     *
     * @return The bytes for etag.
     */
    public com.google.protobuf.ByteString getEtagBytes() {
      java.lang.Object ref = etag_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        etag_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * For Resource freshness validation (https://google.aip.dev/154)
     * </pre>
     *
     * <code>string etag = 17;</code>
     *
     * @param value The etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtag(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      etag_ = value;
      bitField0_ |= 0x00080000;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * For Resource freshness validation (https://google.aip.dev/154)
     * </pre>
     *
     * <code>string etag = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEtag() {
      etag_ = getDefaultInstance().getEtag();
      bitField0_ = (bitField0_ & ~0x00080000);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * For Resource freshness validation (https://google.aip.dev/154)
     * </pre>
     *
     * <code>string etag = 17;</code>
     *
     * @param value The bytes for etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtagBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      etag_ = value;
      bitField0_ |= 0x00080000;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> annotations_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetAnnotations() {
      if (annotations_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            AnnotationsDefaultEntryHolder.defaultEntry);
      }
      return annotations_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableAnnotations() {
      if (annotations_ == null) {
        annotations_ =
            com.google.protobuf.MapField.newMapField(AnnotationsDefaultEntryHolder.defaultEntry);
      }
      if (!annotations_.isMutable()) {
        annotations_ = annotations_.copy();
      }
      bitField0_ |= 0x00100000;
      onChanged();
      return annotations_;
    }

    public int getAnnotationsCount() {
      return internalGetAnnotations().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    @java.lang.Override
    public boolean containsAnnotations(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetAnnotations().getMap().containsKey(key);
    }
    /** Use {@link #getAnnotationsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getAnnotations() {
      return getAnnotationsMap();
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getAnnotationsMap() {
      return internalGetAnnotations().getMap();
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getAnnotationsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetAnnotations().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    @java.lang.Override
    public java.lang.String getAnnotationsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetAnnotations().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearAnnotations() {
      bitField0_ = (bitField0_ & ~0x00100000);
      internalGetMutableAnnotations().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    public Builder removeAnnotations(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableAnnotations().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableAnnotations() {
      bitField0_ |= 0x00100000;
      return internalGetMutableAnnotations().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    public Builder putAnnotations(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableAnnotations().getMutableMap().put(key, value);
      bitField0_ |= 0x00100000;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Annotations to allow client tools to store small amount of arbitrary data.
     * This is distinct from labels.
     * https://google.aip.dev/128
     * </pre>
     *
     * <code>map&lt;string, string&gt; annotations = 18;</code>
     */
    public Builder putAllAnnotations(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableAnnotations().getMutableMap().putAll(values);
      bitField0_ |= 0x00100000;
      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.v1beta.Instance)
  }

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

  static {
    DEFAULT_INSTANCE = new com.google.cloud.alloydb.v1beta.Instance();
  }

  public static com.google.cloud.alloydb.v1beta.Instance getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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