// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/bigtable/admin/v2/instance.proto

package com.google.bigtable.admin.v2;

/**
 * <pre>
 * A configuration object describing how Cloud Bigtable should treat traffic
 * from a particular end user application.
 * </pre>
 *
 * Protobuf type {@code google.bigtable.admin.v2.AppProfile}
 */
public  final class AppProfile extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile)
    AppProfileOrBuilder {
private static final long serialVersionUID = 0L;
  // Use AppProfile.newBuilder() to construct.
  private AppProfile(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AppProfile() {
    name_ = "";
    etag_ = "";
    description_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private AppProfile(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            etag_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            description_ = s;
            break;
          }
          case 42: {
            com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder subBuilder = null;
            if (routingPolicyCase_ == 5) {
              subBuilder = ((com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_).toBuilder();
            }
            routingPolicy_ =
                input.readMessage(com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_);
              routingPolicy_ = subBuilder.buildPartial();
            }
            routingPolicyCase_ = 5;
            break;
          }
          case 50: {
            com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder subBuilder = null;
            if (routingPolicyCase_ == 6) {
              subBuilder = ((com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_).toBuilder();
            }
            routingPolicy_ =
                input.readMessage(com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_);
              routingPolicy_ = subBuilder.buildPartial();
            }
            routingPolicyCase_ = 6;
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.bigtable.admin.v2.AppProfile.class, com.google.bigtable.admin.v2.AppProfile.Builder.class);
  }

  public interface MultiClusterRoutingUseAnyOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * <pre>
   * Read/write requests may be routed to any cluster in the instance, and will
   * fail over to another cluster in the event of transient errors or delays.
   * Choosing this option sacrifices read-your-writes consistency to improve
   * availability.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny}
   */
  public  static final class MultiClusterRoutingUseAny extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)
      MultiClusterRoutingUseAnyOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use MultiClusterRoutingUseAny.newBuilder() to construct.
    private MultiClusterRoutingUseAny(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private MultiClusterRoutingUseAny() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private MultiClusterRoutingUseAny(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.class, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder.class);
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      size += unknownFields.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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)) {
        return super.equals(obj);
      }
      com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny other = (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) obj;

      boolean result = true;
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

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

    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny 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.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Read/write requests may be routed to any cluster in the instance, and will
     * fail over to another cluster in the event of transient errors or delays.
     * Choosing this option sacrifices read-your-writes consistency to improve
     * availability.
     * </pre>
     *
     * Protobuf type {@code google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.class, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder.class);
      }

      // Construct using com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_MultiClusterRoutingUseAny_descriptor;
      }

      public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getDefaultInstanceForType() {
        return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
      }

      public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny build() {
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny buildPartial() {
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny result = new com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny(this);
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) {
          return mergeFrom((com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny other) {
        if (other == com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)
    }

    // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny)
    private static final com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny();
    }

    public static com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<MultiClusterRoutingUseAny>
        PARSER = new com.google.protobuf.AbstractParser<MultiClusterRoutingUseAny>() {
      public MultiClusterRoutingUseAny parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new MultiClusterRoutingUseAny(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<MultiClusterRoutingUseAny> parser() {
      return PARSER;
    }

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

    public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface SingleClusterRoutingOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.bigtable.admin.v2.AppProfile.SingleClusterRouting)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The cluster to which read/write requests should be routed.
     * </pre>
     *
     * <code>string cluster_id = 1;</code>
     */
    java.lang.String getClusterId();
    /**
     * <pre>
     * The cluster to which read/write requests should be routed.
     * </pre>
     *
     * <code>string cluster_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getClusterIdBytes();

    /**
     * <pre>
     * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
     * allowed by this app profile. It is unsafe to send these requests to
     * the same table/row/column in multiple clusters.
     * </pre>
     *
     * <code>bool allow_transactional_writes = 2;</code>
     */
    boolean getAllowTransactionalWrites();
  }
  /**
   * <pre>
   * Unconditionally routes all read/write requests to a specific cluster.
   * This option preserves read-your-writes consistency, but does not improve
   * availability.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.AppProfile.SingleClusterRouting}
   */
  public  static final class SingleClusterRouting extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.AppProfile.SingleClusterRouting)
      SingleClusterRoutingOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use SingleClusterRouting.newBuilder() to construct.
    private SingleClusterRouting(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private SingleClusterRouting() {
      clusterId_ = "";
      allowTransactionalWrites_ = false;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private SingleClusterRouting(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              clusterId_ = s;
              break;
            }
            case 16: {

              allowTransactionalWrites_ = input.readBool();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.class, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder.class);
    }

    public static final int CLUSTER_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object clusterId_;
    /**
     * <pre>
     * The cluster to which read/write requests should be routed.
     * </pre>
     *
     * <code>string cluster_id = 1;</code>
     */
    public java.lang.String getClusterId() {
      java.lang.Object ref = clusterId_;
      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();
        clusterId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The cluster to which read/write requests should be routed.
     * </pre>
     *
     * <code>string cluster_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getClusterIdBytes() {
      java.lang.Object ref = clusterId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        clusterId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int ALLOW_TRANSACTIONAL_WRITES_FIELD_NUMBER = 2;
    private boolean allowTransactionalWrites_;
    /**
     * <pre>
     * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
     * allowed by this app profile. It is unsafe to send these requests to
     * the same table/row/column in multiple clusters.
     * </pre>
     *
     * <code>bool allow_transactional_writes = 2;</code>
     */
    public boolean getAllowTransactionalWrites() {
      return allowTransactionalWrites_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getClusterIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterId_);
      }
      if (allowTransactionalWrites_ != false) {
        output.writeBool(2, allowTransactionalWrites_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getClusterIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterId_);
      }
      if (allowTransactionalWrites_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, allowTransactionalWrites_);
      }
      size += unknownFields.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.bigtable.admin.v2.AppProfile.SingleClusterRouting)) {
        return super.equals(obj);
      }
      com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting other = (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) obj;

      boolean result = true;
      result = result && getClusterId()
          .equals(other.getClusterId());
      result = result && (getAllowTransactionalWrites()
          == other.getAllowTransactionalWrites());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER;
      hash = (53 * hash) + getClusterId().hashCode();
      hash = (37 * hash) + ALLOW_TRANSACTIONAL_WRITES_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getAllowTransactionalWrites());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting 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.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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>
     * Unconditionally routes all read/write requests to a specific cluster.
     * This option preserves read-your-writes consistency, but does not improve
     * availability.
     * </pre>
     *
     * Protobuf type {@code google.bigtable.admin.v2.AppProfile.SingleClusterRouting}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.AppProfile.SingleClusterRouting)
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.class, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder.class);
      }

      // Construct using com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        clusterId_ = "";

        allowTransactionalWrites_ = false;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_SingleClusterRouting_descriptor;
      }

      public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getDefaultInstanceForType() {
        return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
      }

      public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting build() {
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting buildPartial() {
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting result = new com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting(this);
        result.clusterId_ = clusterId_;
        result.allowTransactionalWrites_ = allowTransactionalWrites_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) {
          return mergeFrom((com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting other) {
        if (other == com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance()) return this;
        if (!other.getClusterId().isEmpty()) {
          clusterId_ = other.clusterId_;
          onChanged();
        }
        if (other.getAllowTransactionalWrites() != false) {
          setAllowTransactionalWrites(other.getAllowTransactionalWrites());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object clusterId_ = "";
      /**
       * <pre>
       * The cluster to which read/write requests should be routed.
       * </pre>
       *
       * <code>string cluster_id = 1;</code>
       */
      public java.lang.String getClusterId() {
        java.lang.Object ref = clusterId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          clusterId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The cluster to which read/write requests should be routed.
       * </pre>
       *
       * <code>string cluster_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getClusterIdBytes() {
        java.lang.Object ref = clusterId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          clusterId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The cluster to which read/write requests should be routed.
       * </pre>
       *
       * <code>string cluster_id = 1;</code>
       */
      public Builder setClusterId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        clusterId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The cluster to which read/write requests should be routed.
       * </pre>
       *
       * <code>string cluster_id = 1;</code>
       */
      public Builder clearClusterId() {
        
        clusterId_ = getDefaultInstance().getClusterId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The cluster to which read/write requests should be routed.
       * </pre>
       *
       * <code>string cluster_id = 1;</code>
       */
      public Builder setClusterIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        clusterId_ = value;
        onChanged();
        return this;
      }

      private boolean allowTransactionalWrites_ ;
      /**
       * <pre>
       * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
       * allowed by this app profile. It is unsafe to send these requests to
       * the same table/row/column in multiple clusters.
       * </pre>
       *
       * <code>bool allow_transactional_writes = 2;</code>
       */
      public boolean getAllowTransactionalWrites() {
        return allowTransactionalWrites_;
      }
      /**
       * <pre>
       * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
       * allowed by this app profile. It is unsafe to send these requests to
       * the same table/row/column in multiple clusters.
       * </pre>
       *
       * <code>bool allow_transactional_writes = 2;</code>
       */
      public Builder setAllowTransactionalWrites(boolean value) {
        
        allowTransactionalWrites_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
       * allowed by this app profile. It is unsafe to send these requests to
       * the same table/row/column in multiple clusters.
       * </pre>
       *
       * <code>bool allow_transactional_writes = 2;</code>
       */
      public Builder clearAllowTransactionalWrites() {
        
        allowTransactionalWrites_ = false;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile.SingleClusterRouting)
    }

    // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.AppProfile.SingleClusterRouting)
    private static final com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting();
    }

    public static com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<SingleClusterRouting>
        PARSER = new com.google.protobuf.AbstractParser<SingleClusterRouting>() {
      public SingleClusterRouting parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new SingleClusterRouting(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<SingleClusterRouting> parser() {
      return PARSER;
    }

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

    public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int routingPolicyCase_ = 0;
  private java.lang.Object routingPolicy_;
  public enum RoutingPolicyCase
      implements com.google.protobuf.Internal.EnumLite {
    MULTI_CLUSTER_ROUTING_USE_ANY(5),
    SINGLE_CLUSTER_ROUTING(6),
    ROUTINGPOLICY_NOT_SET(0);
    private final int value;
    private RoutingPolicyCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static RoutingPolicyCase valueOf(int value) {
      return forNumber(value);
    }

    public static RoutingPolicyCase forNumber(int value) {
      switch (value) {
        case 5: return MULTI_CLUSTER_ROUTING_USE_ANY;
        case 6: return SINGLE_CLUSTER_ROUTING;
        case 0: return ROUTINGPOLICY_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public RoutingPolicyCase
  getRoutingPolicyCase() {
    return RoutingPolicyCase.forNumber(
        routingPolicyCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The unique name of the app profile. Values are of the form
   * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  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>
   * (`OutputOnly`)
   * The unique name of the app profile. Values are of the form
   * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  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 ETAG_FIELD_NUMBER = 2;
  private volatile java.lang.Object etag_;
  /**
   * <pre>
   * Strongly validated etag for optimistic concurrency control. Preserve the
   * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
   * fail the request if there has been a modification in the mean time. The
   * `update_mask` of the request need not include `etag` for this protection
   * to apply.
   * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
   * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
   * details.
   * </pre>
   *
   * <code>string etag = 2;</code>
   */
  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>
   * Strongly validated etag for optimistic concurrency control. Preserve the
   * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
   * fail the request if there has been a modification in the mean time. The
   * `update_mask` of the request need not include `etag` for this protection
   * to apply.
   * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
   * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
   * details.
   * </pre>
   *
   * <code>string etag = 2;</code>
   */
  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 DESCRIPTION_FIELD_NUMBER = 3;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   * Optional long form description of the use case for this AppProfile.
   * </pre>
   *
   * <code>string description = 3;</code>
   */
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Optional long form description of the use case for this AppProfile.
   * </pre>
   *
   * <code>string description = 3;</code>
   */
  public com.google.protobuf.ByteString
      getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER = 5;
  /**
   * <pre>
   * Use a multi-cluster routing policy that may pick any cluster.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
   */
  public boolean hasMultiClusterRoutingUseAny() {
    return routingPolicyCase_ == 5;
  }
  /**
   * <pre>
   * Use a multi-cluster routing policy that may pick any cluster.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
   */
  public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getMultiClusterRoutingUseAny() {
    if (routingPolicyCase_ == 5) {
       return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_;
    }
    return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
  }
  /**
   * <pre>
   * Use a multi-cluster routing policy that may pick any cluster.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
   */
  public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder getMultiClusterRoutingUseAnyOrBuilder() {
    if (routingPolicyCase_ == 5) {
       return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_;
    }
    return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
  }

  public static final int SINGLE_CLUSTER_ROUTING_FIELD_NUMBER = 6;
  /**
   * <pre>
   * Use a single-cluster routing policy.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
   */
  public boolean hasSingleClusterRouting() {
    return routingPolicyCase_ == 6;
  }
  /**
   * <pre>
   * Use a single-cluster routing policy.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
   */
  public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClusterRouting() {
    if (routingPolicyCase_ == 6) {
       return (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_;
    }
    return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
  }
  /**
   * <pre>
   * Use a single-cluster routing policy.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
   */
  public com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder getSingleClusterRoutingOrBuilder() {
    if (routingPolicyCase_ == 6) {
       return (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_;
    }
    return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!getEtagBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
    }
    if (routingPolicyCase_ == 5) {
      output.writeMessage(5, (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_);
    }
    if (routingPolicyCase_ == 6) {
      output.writeMessage(6, (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_);
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!getEtagBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
    }
    if (routingPolicyCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_);
    }
    if (routingPolicyCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_);
    }
    size += unknownFields.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.bigtable.admin.v2.AppProfile)) {
      return super.equals(obj);
    }
    com.google.bigtable.admin.v2.AppProfile other = (com.google.bigtable.admin.v2.AppProfile) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && getEtag()
        .equals(other.getEtag());
    result = result && getDescription()
        .equals(other.getDescription());
    result = result && getRoutingPolicyCase().equals(
        other.getRoutingPolicyCase());
    if (!result) return false;
    switch (routingPolicyCase_) {
      case 5:
        result = result && getMultiClusterRoutingUseAny()
            .equals(other.getMultiClusterRoutingUseAny());
        break;
      case 6:
        result = result && getSingleClusterRouting()
            .equals(other.getSingleClusterRouting());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @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) + ETAG_FIELD_NUMBER;
    hash = (53 * hash) + getEtag().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    switch (routingPolicyCase_) {
      case 5:
        hash = (37 * hash) + MULTI_CLUSTER_ROUTING_USE_ANY_FIELD_NUMBER;
        hash = (53 * hash) + getMultiClusterRoutingUseAny().hashCode();
        break;
      case 6:
        hash = (37 * hash) + SINGLE_CLUSTER_ROUTING_FIELD_NUMBER;
        hash = (53 * hash) + getSingleClusterRouting().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.bigtable.admin.v2.AppProfile parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.AppProfile parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.bigtable.admin.v2.AppProfile parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.AppProfile parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.bigtable.admin.v2.AppProfile parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.AppProfile 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.bigtable.admin.v2.AppProfile parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.AppProfile parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.bigtable.admin.v2.AppProfile prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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>
   * A configuration object describing how Cloud Bigtable should treat traffic
   * from a particular end user application.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.AppProfile}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.AppProfile)
      com.google.bigtable.admin.v2.AppProfileOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.AppProfile.class, com.google.bigtable.admin.v2.AppProfile.Builder.class);
    }

    // Construct using com.google.bigtable.admin.v2.AppProfile.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      name_ = "";

      etag_ = "";

      description_ = "";

      routingPolicyCase_ = 0;
      routingPolicy_ = null;
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.bigtable.admin.v2.InstanceProto.internal_static_google_bigtable_admin_v2_AppProfile_descriptor;
    }

    public com.google.bigtable.admin.v2.AppProfile getDefaultInstanceForType() {
      return com.google.bigtable.admin.v2.AppProfile.getDefaultInstance();
    }

    public com.google.bigtable.admin.v2.AppProfile build() {
      com.google.bigtable.admin.v2.AppProfile result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.bigtable.admin.v2.AppProfile buildPartial() {
      com.google.bigtable.admin.v2.AppProfile result = new com.google.bigtable.admin.v2.AppProfile(this);
      result.name_ = name_;
      result.etag_ = etag_;
      result.description_ = description_;
      if (routingPolicyCase_ == 5) {
        if (multiClusterRoutingUseAnyBuilder_ == null) {
          result.routingPolicy_ = routingPolicy_;
        } else {
          result.routingPolicy_ = multiClusterRoutingUseAnyBuilder_.build();
        }
      }
      if (routingPolicyCase_ == 6) {
        if (singleClusterRoutingBuilder_ == null) {
          result.routingPolicy_ = routingPolicy_;
        } else {
          result.routingPolicy_ = singleClusterRoutingBuilder_.build();
        }
      }
      result.routingPolicyCase_ = routingPolicyCase_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.bigtable.admin.v2.AppProfile) {
        return mergeFrom((com.google.bigtable.admin.v2.AppProfile)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.bigtable.admin.v2.AppProfile other) {
      if (other == com.google.bigtable.admin.v2.AppProfile.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getEtag().isEmpty()) {
        etag_ = other.etag_;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      switch (other.getRoutingPolicyCase()) {
        case MULTI_CLUSTER_ROUTING_USE_ANY: {
          mergeMultiClusterRoutingUseAny(other.getMultiClusterRoutingUseAny());
          break;
        }
        case SINGLE_CLUSTER_ROUTING: {
          mergeSingleClusterRouting(other.getSingleClusterRouting());
          break;
        }
        case ROUTINGPOLICY_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.bigtable.admin.v2.AppProfile parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.bigtable.admin.v2.AppProfile) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int routingPolicyCase_ = 0;
    private java.lang.Object routingPolicy_;
    public RoutingPolicyCase
        getRoutingPolicyCase() {
      return RoutingPolicyCase.forNumber(
          routingPolicyCase_);
    }

    public Builder clearRoutingPolicy() {
      routingPolicyCase_ = 0;
      routingPolicy_ = null;
      onChanged();
      return this;
    }


    private java.lang.Object name_ = "";
    /**
     * <pre>
     * (`OutputOnly`)
     * The unique name of the app profile. Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    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>
     * (`OutputOnly`)
     * The unique name of the app profile. Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    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>
     * (`OutputOnly`)
     * The unique name of the app profile. Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The unique name of the app profile. Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The unique name of the app profile. Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object etag_ = "";
    /**
     * <pre>
     * Strongly validated etag for optimistic concurrency control. Preserve the
     * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
     * fail the request if there has been a modification in the mean time. The
     * `update_mask` of the request need not include `etag` for this protection
     * to apply.
     * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
     * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
     * details.
     * </pre>
     *
     * <code>string etag = 2;</code>
     */
    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>
     * Strongly validated etag for optimistic concurrency control. Preserve the
     * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
     * fail the request if there has been a modification in the mean time. The
     * `update_mask` of the request need not include `etag` for this protection
     * to apply.
     * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
     * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
     * details.
     * </pre>
     *
     * <code>string etag = 2;</code>
     */
    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>
     * Strongly validated etag for optimistic concurrency control. Preserve the
     * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
     * fail the request if there has been a modification in the mean time. The
     * `update_mask` of the request need not include `etag` for this protection
     * to apply.
     * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
     * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
     * details.
     * </pre>
     *
     * <code>string etag = 2;</code>
     */
    public Builder setEtag(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      etag_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Strongly validated etag for optimistic concurrency control. Preserve the
     * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
     * fail the request if there has been a modification in the mean time. The
     * `update_mask` of the request need not include `etag` for this protection
     * to apply.
     * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
     * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
     * details.
     * </pre>
     *
     * <code>string etag = 2;</code>
     */
    public Builder clearEtag() {
      
      etag_ = getDefaultInstance().getEtag();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Strongly validated etag for optimistic concurrency control. Preserve the
     * value returned from `GetAppProfile` when calling `UpdateAppProfile` to
     * fail the request if there has been a modification in the mean time. The
     * `update_mask` of the request need not include `etag` for this protection
     * to apply.
     * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
     * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
     * details.
     * </pre>
     *
     * <code>string etag = 2;</code>
     */
    public Builder setEtagBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      etag_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     * <pre>
     * Optional long form description of the use case for this AppProfile.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Optional long form description of the use case for this AppProfile.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public com.google.protobuf.ByteString
        getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Optional long form description of the use case for this AppProfile.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional long form description of the use case for this AppProfile.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public Builder clearDescription() {
      
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional long form description of the use case for this AppProfile.
     * </pre>
     *
     * <code>string description = 3;</code>
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      description_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder> multiClusterRoutingUseAnyBuilder_;
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public boolean hasMultiClusterRoutingUseAny() {
      return routingPolicyCase_ == 5;
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny getMultiClusterRoutingUseAny() {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        if (routingPolicyCase_ == 5) {
          return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_;
        }
        return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
      } else {
        if (routingPolicyCase_ == 5) {
          return multiClusterRoutingUseAnyBuilder_.getMessage();
        }
        return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public Builder setMultiClusterRoutingUseAny(com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny value) {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        routingPolicy_ = value;
        onChanged();
      } else {
        multiClusterRoutingUseAnyBuilder_.setMessage(value);
      }
      routingPolicyCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public Builder setMultiClusterRoutingUseAny(
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder builderForValue) {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        routingPolicy_ = builderForValue.build();
        onChanged();
      } else {
        multiClusterRoutingUseAnyBuilder_.setMessage(builderForValue.build());
      }
      routingPolicyCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public Builder mergeMultiClusterRoutingUseAny(com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny value) {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        if (routingPolicyCase_ == 5 &&
            routingPolicy_ != com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance()) {
          routingPolicy_ = com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.newBuilder((com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_)
              .mergeFrom(value).buildPartial();
        } else {
          routingPolicy_ = value;
        }
        onChanged();
      } else {
        if (routingPolicyCase_ == 5) {
          multiClusterRoutingUseAnyBuilder_.mergeFrom(value);
        }
        multiClusterRoutingUseAnyBuilder_.setMessage(value);
      }
      routingPolicyCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public Builder clearMultiClusterRoutingUseAny() {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        if (routingPolicyCase_ == 5) {
          routingPolicyCase_ = 0;
          routingPolicy_ = null;
          onChanged();
        }
      } else {
        if (routingPolicyCase_ == 5) {
          routingPolicyCase_ = 0;
          routingPolicy_ = null;
        }
        multiClusterRoutingUseAnyBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder getMultiClusterRoutingUseAnyBuilder() {
      return getMultiClusterRoutingUseAnyFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder getMultiClusterRoutingUseAnyOrBuilder() {
      if ((routingPolicyCase_ == 5) && (multiClusterRoutingUseAnyBuilder_ != null)) {
        return multiClusterRoutingUseAnyBuilder_.getMessageOrBuilder();
      } else {
        if (routingPolicyCase_ == 5) {
          return (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_;
        }
        return com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Use a multi-cluster routing policy that may pick any cluster.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder> 
        getMultiClusterRoutingUseAnyFieldBuilder() {
      if (multiClusterRoutingUseAnyBuilder_ == null) {
        if (!(routingPolicyCase_ == 5)) {
          routingPolicy_ = com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.getDefaultInstance();
        }
        multiClusterRoutingUseAnyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny.Builder, com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAnyOrBuilder>(
                (com.google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny) routingPolicy_,
                getParentForChildren(),
                isClean());
        routingPolicy_ = null;
      }
      routingPolicyCase_ = 5;
      onChanged();;
      return multiClusterRoutingUseAnyBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder> singleClusterRoutingBuilder_;
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public boolean hasSingleClusterRouting() {
      return routingPolicyCase_ == 6;
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting getSingleClusterRouting() {
      if (singleClusterRoutingBuilder_ == null) {
        if (routingPolicyCase_ == 6) {
          return (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_;
        }
        return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
      } else {
        if (routingPolicyCase_ == 6) {
          return singleClusterRoutingBuilder_.getMessage();
        }
        return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public Builder setSingleClusterRouting(com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting value) {
      if (singleClusterRoutingBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        routingPolicy_ = value;
        onChanged();
      } else {
        singleClusterRoutingBuilder_.setMessage(value);
      }
      routingPolicyCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public Builder setSingleClusterRouting(
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder builderForValue) {
      if (singleClusterRoutingBuilder_ == null) {
        routingPolicy_ = builderForValue.build();
        onChanged();
      } else {
        singleClusterRoutingBuilder_.setMessage(builderForValue.build());
      }
      routingPolicyCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public Builder mergeSingleClusterRouting(com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting value) {
      if (singleClusterRoutingBuilder_ == null) {
        if (routingPolicyCase_ == 6 &&
            routingPolicy_ != com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance()) {
          routingPolicy_ = com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.newBuilder((com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_)
              .mergeFrom(value).buildPartial();
        } else {
          routingPolicy_ = value;
        }
        onChanged();
      } else {
        if (routingPolicyCase_ == 6) {
          singleClusterRoutingBuilder_.mergeFrom(value);
        }
        singleClusterRoutingBuilder_.setMessage(value);
      }
      routingPolicyCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public Builder clearSingleClusterRouting() {
      if (singleClusterRoutingBuilder_ == null) {
        if (routingPolicyCase_ == 6) {
          routingPolicyCase_ = 0;
          routingPolicy_ = null;
          onChanged();
        }
      } else {
        if (routingPolicyCase_ == 6) {
          routingPolicyCase_ = 0;
          routingPolicy_ = null;
        }
        singleClusterRoutingBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder getSingleClusterRoutingBuilder() {
      return getSingleClusterRoutingFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    public com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder getSingleClusterRoutingOrBuilder() {
      if ((routingPolicyCase_ == 6) && (singleClusterRoutingBuilder_ != null)) {
        return singleClusterRoutingBuilder_.getMessageOrBuilder();
      } else {
        if (routingPolicyCase_ == 6) {
          return (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_;
        }
        return com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Use a single-cluster routing policy.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder> 
        getSingleClusterRoutingFieldBuilder() {
      if (singleClusterRoutingBuilder_ == null) {
        if (!(routingPolicyCase_ == 6)) {
          routingPolicy_ = com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.getDefaultInstance();
        }
        singleClusterRoutingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting, com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting.Builder, com.google.bigtable.admin.v2.AppProfile.SingleClusterRoutingOrBuilder>(
                (com.google.bigtable.admin.v2.AppProfile.SingleClusterRouting) routingPolicy_,
                getParentForChildren(),
                isClean());
        routingPolicy_ = null;
      }
      routingPolicyCase_ = 6;
      onChanged();;
      return singleClusterRoutingBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.bigtable.admin.v2.AppProfile)
  }

  // @@protoc_insertion_point(class_scope:google.bigtable.admin.v2.AppProfile)
  private static final com.google.bigtable.admin.v2.AppProfile DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.bigtable.admin.v2.AppProfile();
  }

  public static com.google.bigtable.admin.v2.AppProfile getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<AppProfile>
      PARSER = new com.google.protobuf.AbstractParser<AppProfile>() {
    public AppProfile parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new AppProfile(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<AppProfile> parser() {
    return PARSER;
  }

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

  public com.google.bigtable.admin.v2.AppProfile getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

