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

package com.google.bigtable.admin.v2;

/**
 * <pre>
 * This is a private alpha release of Cloud Bigtable snapshots. This feature
 * is not currently available to most Cloud Bigtable customers. This feature
 * might be changed in backward-incompatible ways and is not recommended for
 * production use. It is not subject to any SLA or deprecation policy.
 * A snapshot of a table at a particular time. A snapshot can be used as a
 * checkpoint for data restoration or a data source for a new table.
 * </pre>
 *
 * Protobuf type {@code google.bigtable.admin.v2.Snapshot}
 */
public  final class Snapshot extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.bigtable.admin.v2.Snapshot)
    SnapshotOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Snapshot.newBuilder() to construct.
  private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Snapshot() {
    name_ = "";
    dataSizeBytes_ = 0L;
    state_ = 0;
    description_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Snapshot(
      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: {
            com.google.bigtable.admin.v2.Table.Builder subBuilder = null;
            if (sourceTable_ != null) {
              subBuilder = sourceTable_.toBuilder();
            }
            sourceTable_ = input.readMessage(com.google.bigtable.admin.v2.Table.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(sourceTable_);
              sourceTable_ = subBuilder.buildPartial();
            }

            break;
          }
          case 24: {

            dataSizeBytes_ = input.readInt64();
            break;
          }
          case 34: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (createTime_ != null) {
              subBuilder = createTime_.toBuilder();
            }
            createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(createTime_);
              createTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (deleteTime_ != null) {
              subBuilder = deleteTime_.toBuilder();
            }
            deleteTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(deleteTime_);
              deleteTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 48: {
            int rawValue = input.readEnum();

            state_ = rawValue;
            break;
          }
          case 58: {
            java.lang.String s = input.readStringRequireUtf8();

            description_ = s;
            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.TableProto.internal_static_google_bigtable_admin_v2_Snapshot_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.bigtable.admin.v2.Snapshot.class, com.google.bigtable.admin.v2.Snapshot.Builder.class);
  }

  /**
   * <pre>
   * Possible states of a snapshot.
   * </pre>
   *
   * Protobuf enum {@code google.bigtable.admin.v2.Snapshot.State}
   */
  public enum State
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <pre>
     * The state of the snapshot could not be determined.
     * </pre>
     *
     * <code>STATE_NOT_KNOWN = 0;</code>
     */
    STATE_NOT_KNOWN(0),
    /**
     * <pre>
     * The snapshot has been successfully created and can serve all requests.
     * </pre>
     *
     * <code>READY = 1;</code>
     */
    READY(1),
    /**
     * <pre>
     * The snapshot is currently being created, and may be destroyed if the
     * creation process encounters an error. A snapshot may not be restored to a
     * table while it is being created.
     * </pre>
     *
     * <code>CREATING = 2;</code>
     */
    CREATING(2),
    UNRECOGNIZED(-1),
    ;

    /**
     * <pre>
     * The state of the snapshot could not be determined.
     * </pre>
     *
     * <code>STATE_NOT_KNOWN = 0;</code>
     */
    public static final int STATE_NOT_KNOWN_VALUE = 0;
    /**
     * <pre>
     * The snapshot has been successfully created and can serve all requests.
     * </pre>
     *
     * <code>READY = 1;</code>
     */
    public static final int READY_VALUE = 1;
    /**
     * <pre>
     * The snapshot is currently being created, and may be destroyed if the
     * creation process encounters an error. A snapshot may not be restored to a
     * table while it is being created.
     * </pre>
     *
     * <code>CREATING = 2;</code>
     */
    public static final int CREATING_VALUE = 2;


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

    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static State valueOf(int value) {
      return forNumber(value);
    }

    public static State forNumber(int value) {
      switch (value) {
        case 0: return STATE_NOT_KNOWN;
        case 1: return READY;
        case 2: return CREATING;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<State>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        State> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<State>() {
            public State findValueByNumber(int number) {
              return State.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.Snapshot.getDescriptor().getEnumTypes().get(0);
    }

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

    public static State valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.bigtable.admin.v2.Snapshot.State)
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The unique name of the snapshot.
   * Values are of the form
   * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
   * </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 snapshot.
   * Values are of the form
   * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
   * </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 SOURCE_TABLE_FIELD_NUMBER = 2;
  private com.google.bigtable.admin.v2.Table sourceTable_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The source table at the time the snapshot was taken.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
   */
  public boolean hasSourceTable() {
    return sourceTable_ != null;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The source table at the time the snapshot was taken.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
   */
  public com.google.bigtable.admin.v2.Table getSourceTable() {
    return sourceTable_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : sourceTable_;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The source table at the time the snapshot was taken.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
   */
  public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() {
    return getSourceTable();
  }

  public static final int DATA_SIZE_BYTES_FIELD_NUMBER = 3;
  private long dataSizeBytes_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The size of the data in the source table at the time the snapshot was
   * taken. In some cases, this value may be computed asynchronously via a
   * background process and a placeholder of 0 will be used in the meantime.
   * </pre>
   *
   * <code>int64 data_size_bytes = 3;</code>
   */
  public long getDataSizeBytes() {
    return dataSizeBytes_;
  }

  public static final int CREATE_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp createTime_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot is created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4;</code>
   */
  public boolean hasCreateTime() {
    return createTime_ != null;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot is created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4;</code>
   */
  public com.google.protobuf.Timestamp getCreateTime() {
    return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot is created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp create_time = 4;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
    return getCreateTime();
  }

  public static final int DELETE_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp deleteTime_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot will be deleted. The maximum amount of time a
   * snapshot can stay active is 365 days. If 'ttl' is not specified,
   * the default maximum of 365 days will be used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 5;</code>
   */
  public boolean hasDeleteTime() {
    return deleteTime_ != null;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot will be deleted. The maximum amount of time a
   * snapshot can stay active is 365 days. If 'ttl' is not specified,
   * the default maximum of 365 days will be used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 5;</code>
   */
  public com.google.protobuf.Timestamp getDeleteTime() {
    return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The time when the snapshot will be deleted. The maximum amount of time a
   * snapshot can stay active is 365 days. If 'ttl' is not specified,
   * the default maximum of 365 days will be used.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp delete_time = 5;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
    return getDeleteTime();
  }

  public static final int STATE_FIELD_NUMBER = 6;
  private int state_;
  /**
   * <pre>
   * (`OutputOnly`)
   * The current state of the snapshot.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
   */
  public int getStateValue() {
    return state_;
  }
  /**
   * <pre>
   * (`OutputOnly`)
   * The current state of the snapshot.
   * </pre>
   *
   * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
   */
  public com.google.bigtable.admin.v2.Snapshot.State getState() {
    com.google.bigtable.admin.v2.Snapshot.State result = com.google.bigtable.admin.v2.Snapshot.State.valueOf(state_);
    return result == null ? com.google.bigtable.admin.v2.Snapshot.State.UNRECOGNIZED : result;
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 7;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   * (`OutputOnly`)
   * Description of the snapshot.
   * </pre>
   *
   * <code>string description = 7;</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>
   * (`OutputOnly`)
   * Description of the snapshot.
   * </pre>
   *
   * <code>string description = 7;</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;
    }
  }

  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 (sourceTable_ != null) {
      output.writeMessage(2, getSourceTable());
    }
    if (dataSizeBytes_ != 0L) {
      output.writeInt64(3, dataSizeBytes_);
    }
    if (createTime_ != null) {
      output.writeMessage(4, getCreateTime());
    }
    if (deleteTime_ != null) {
      output.writeMessage(5, getDeleteTime());
    }
    if (state_ != com.google.bigtable.admin.v2.Snapshot.State.STATE_NOT_KNOWN.getNumber()) {
      output.writeEnum(6, state_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, description_);
    }
    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 (sourceTable_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getSourceTable());
    }
    if (dataSizeBytes_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(3, dataSizeBytes_);
    }
    if (createTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getCreateTime());
    }
    if (deleteTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getDeleteTime());
    }
    if (state_ != com.google.bigtable.admin.v2.Snapshot.State.STATE_NOT_KNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(6, state_);
    }
    if (!getDescriptionBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, description_);
    }
    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.Snapshot)) {
      return super.equals(obj);
    }
    com.google.bigtable.admin.v2.Snapshot other = (com.google.bigtable.admin.v2.Snapshot) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && (hasSourceTable() == other.hasSourceTable());
    if (hasSourceTable()) {
      result = result && getSourceTable()
          .equals(other.getSourceTable());
    }
    result = result && (getDataSizeBytes()
        == other.getDataSizeBytes());
    result = result && (hasCreateTime() == other.hasCreateTime());
    if (hasCreateTime()) {
      result = result && getCreateTime()
          .equals(other.getCreateTime());
    }
    result = result && (hasDeleteTime() == other.hasDeleteTime());
    if (hasDeleteTime()) {
      result = result && getDeleteTime()
          .equals(other.getDeleteTime());
    }
    result = result && state_ == other.state_;
    result = result && getDescription()
        .equals(other.getDescription());
    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();
    if (hasSourceTable()) {
      hash = (37 * hash) + SOURCE_TABLE_FIELD_NUMBER;
      hash = (53 * hash) + getSourceTable().hashCode();
    }
    hash = (37 * hash) + DATA_SIZE_BYTES_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getDataSizeBytes());
    if (hasCreateTime()) {
      hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreateTime().hashCode();
    }
    if (hasDeleteTime()) {
      hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getDeleteTime().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.bigtable.admin.v2.Snapshot parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.Snapshot 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.Snapshot parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.Snapshot 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.Snapshot parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.bigtable.admin.v2.Snapshot 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.Snapshot parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.Snapshot 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.Snapshot parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.bigtable.admin.v2.Snapshot 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.Snapshot 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.Snapshot 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.Snapshot 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>
   * This is a private alpha release of Cloud Bigtable snapshots. This feature
   * is not currently available to most Cloud Bigtable customers. This feature
   * might be changed in backward-incompatible ways and is not recommended for
   * production use. It is not subject to any SLA or deprecation policy.
   * A snapshot of a table at a particular time. A snapshot can be used as a
   * checkpoint for data restoration or a data source for a new table.
   * </pre>
   *
   * Protobuf type {@code google.bigtable.admin.v2.Snapshot}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.bigtable.admin.v2.Snapshot)
      com.google.bigtable.admin.v2.SnapshotOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_Snapshot_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.bigtable.admin.v2.TableProto.internal_static_google_bigtable_admin_v2_Snapshot_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.bigtable.admin.v2.Snapshot.class, com.google.bigtable.admin.v2.Snapshot.Builder.class);
    }

    // Construct using com.google.bigtable.admin.v2.Snapshot.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_ = "";

      if (sourceTableBuilder_ == null) {
        sourceTable_ = null;
      } else {
        sourceTable_ = null;
        sourceTableBuilder_ = null;
      }
      dataSizeBytes_ = 0L;

      if (createTimeBuilder_ == null) {
        createTime_ = null;
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }
      if (deleteTimeBuilder_ == null) {
        deleteTime_ = null;
      } else {
        deleteTime_ = null;
        deleteTimeBuilder_ = null;
      }
      state_ = 0;

      description_ = "";

      return this;
    }

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

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

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

    public com.google.bigtable.admin.v2.Snapshot buildPartial() {
      com.google.bigtable.admin.v2.Snapshot result = new com.google.bigtable.admin.v2.Snapshot(this);
      result.name_ = name_;
      if (sourceTableBuilder_ == null) {
        result.sourceTable_ = sourceTable_;
      } else {
        result.sourceTable_ = sourceTableBuilder_.build();
      }
      result.dataSizeBytes_ = dataSizeBytes_;
      if (createTimeBuilder_ == null) {
        result.createTime_ = createTime_;
      } else {
        result.createTime_ = createTimeBuilder_.build();
      }
      if (deleteTimeBuilder_ == null) {
        result.deleteTime_ = deleteTime_;
      } else {
        result.deleteTime_ = deleteTimeBuilder_.build();
      }
      result.state_ = state_;
      result.description_ = description_;
      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.Snapshot) {
        return mergeFrom((com.google.bigtable.admin.v2.Snapshot)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.bigtable.admin.v2.Snapshot other) {
      if (other == com.google.bigtable.admin.v2.Snapshot.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.hasSourceTable()) {
        mergeSourceTable(other.getSourceTable());
      }
      if (other.getDataSizeBytes() != 0L) {
        setDataSizeBytes(other.getDataSizeBytes());
      }
      if (other.hasCreateTime()) {
        mergeCreateTime(other.getCreateTime());
      }
      if (other.hasDeleteTime()) {
        mergeDeleteTime(other.getDeleteTime());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      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.Snapshot parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.bigtable.admin.v2.Snapshot) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object name_ = "";
    /**
     * <pre>
     * (`OutputOnly`)
     * The unique name of the snapshot.
     * Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
     * </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 snapshot.
     * Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
     * </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 snapshot.
     * Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
     * </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 snapshot.
     * Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The unique name of the snapshot.
     * Values are of the form
     * `projects/&lt;project&gt;/instances/&lt;instance&gt;/clusters/&lt;cluster&gt;/snapshots/&lt;snapshot&gt;`.
     * </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 com.google.bigtable.admin.v2.Table sourceTable_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> sourceTableBuilder_;
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public boolean hasSourceTable() {
      return sourceTableBuilder_ != null || sourceTable_ != null;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public com.google.bigtable.admin.v2.Table getSourceTable() {
      if (sourceTableBuilder_ == null) {
        return sourceTable_ == null ? com.google.bigtable.admin.v2.Table.getDefaultInstance() : sourceTable_;
      } else {
        return sourceTableBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public Builder setSourceTable(com.google.bigtable.admin.v2.Table value) {
      if (sourceTableBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        sourceTable_ = value;
        onChanged();
      } else {
        sourceTableBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public Builder setSourceTable(
        com.google.bigtable.admin.v2.Table.Builder builderForValue) {
      if (sourceTableBuilder_ == null) {
        sourceTable_ = builderForValue.build();
        onChanged();
      } else {
        sourceTableBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public Builder mergeSourceTable(com.google.bigtable.admin.v2.Table value) {
      if (sourceTableBuilder_ == null) {
        if (sourceTable_ != null) {
          sourceTable_ =
            com.google.bigtable.admin.v2.Table.newBuilder(sourceTable_).mergeFrom(value).buildPartial();
        } else {
          sourceTable_ = value;
        }
        onChanged();
      } else {
        sourceTableBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public Builder clearSourceTable() {
      if (sourceTableBuilder_ == null) {
        sourceTable_ = null;
        onChanged();
      } else {
        sourceTable_ = null;
        sourceTableBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public com.google.bigtable.admin.v2.Table.Builder getSourceTableBuilder() {
      
      onChanged();
      return getSourceTableFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    public com.google.bigtable.admin.v2.TableOrBuilder getSourceTableOrBuilder() {
      if (sourceTableBuilder_ != null) {
        return sourceTableBuilder_.getMessageOrBuilder();
      } else {
        return sourceTable_ == null ?
            com.google.bigtable.admin.v2.Table.getDefaultInstance() : sourceTable_;
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The source table at the time the snapshot was taken.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Table source_table = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder> 
        getSourceTableFieldBuilder() {
      if (sourceTableBuilder_ == null) {
        sourceTableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.bigtable.admin.v2.Table, com.google.bigtable.admin.v2.Table.Builder, com.google.bigtable.admin.v2.TableOrBuilder>(
                getSourceTable(),
                getParentForChildren(),
                isClean());
        sourceTable_ = null;
      }
      return sourceTableBuilder_;
    }

    private long dataSizeBytes_ ;
    /**
     * <pre>
     * (`OutputOnly`)
     * The size of the data in the source table at the time the snapshot was
     * taken. In some cases, this value may be computed asynchronously via a
     * background process and a placeholder of 0 will be used in the meantime.
     * </pre>
     *
     * <code>int64 data_size_bytes = 3;</code>
     */
    public long getDataSizeBytes() {
      return dataSizeBytes_;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The size of the data in the source table at the time the snapshot was
     * taken. In some cases, this value may be computed asynchronously via a
     * background process and a placeholder of 0 will be used in the meantime.
     * </pre>
     *
     * <code>int64 data_size_bytes = 3;</code>
     */
    public Builder setDataSizeBytes(long value) {
      
      dataSizeBytes_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The size of the data in the source table at the time the snapshot was
     * taken. In some cases, this value may be computed asynchronously via a
     * background process and a placeholder of 0 will be used in the meantime.
     * </pre>
     *
     * <code>int64 data_size_bytes = 3;</code>
     */
    public Builder clearDataSizeBytes() {
      
      dataSizeBytes_ = 0L;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp createTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_;
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public boolean hasCreateTime() {
      return createTimeBuilder_ != null || createTime_ != null;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public com.google.protobuf.Timestamp getCreateTime() {
      if (createTimeBuilder_ == null) {
        return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
      } else {
        return createTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public Builder setCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        createTime_ = value;
        onChanged();
      } else {
        createTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public Builder setCreateTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (createTimeBuilder_ == null) {
        createTime_ = builderForValue.build();
        onChanged();
      } else {
        createTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
      if (createTimeBuilder_ == null) {
        if (createTime_ != null) {
          createTime_ =
            com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
        } else {
          createTime_ = value;
        }
        onChanged();
      } else {
        createTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public Builder clearCreateTime() {
      if (createTimeBuilder_ == null) {
        createTime_ = null;
        onChanged();
      } else {
        createTime_ = null;
        createTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
      
      onChanged();
      return getCreateTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
      if (createTimeBuilder_ != null) {
        return createTimeBuilder_.getMessageOrBuilder();
      } else {
        return createTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot is created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp create_time = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getCreateTimeFieldBuilder() {
      if (createTimeBuilder_ == null) {
        createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getCreateTime(),
                getParentForChildren(),
                isClean());
        createTime_ = null;
      }
      return createTimeBuilder_;
    }

    private com.google.protobuf.Timestamp deleteTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> deleteTimeBuilder_;
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public boolean hasDeleteTime() {
      return deleteTimeBuilder_ != null || deleteTime_ != null;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public com.google.protobuf.Timestamp getDeleteTime() {
      if (deleteTimeBuilder_ == null) {
        return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
      } else {
        return deleteTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public Builder setDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        deleteTime_ = value;
        onChanged();
      } else {
        deleteTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public Builder setDeleteTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (deleteTimeBuilder_ == null) {
        deleteTime_ = builderForValue.build();
        onChanged();
      } else {
        deleteTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) {
      if (deleteTimeBuilder_ == null) {
        if (deleteTime_ != null) {
          deleteTime_ =
            com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial();
        } else {
          deleteTime_ = value;
        }
        onChanged();
      } else {
        deleteTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public Builder clearDeleteTime() {
      if (deleteTimeBuilder_ == null) {
        deleteTime_ = null;
        onChanged();
      } else {
        deleteTime_ = null;
        deleteTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() {
      
      onChanged();
      return getDeleteTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
      if (deleteTimeBuilder_ != null) {
        return deleteTimeBuilder_.getMessageOrBuilder();
      } else {
        return deleteTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
      }
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The time when the snapshot will be deleted. The maximum amount of time a
     * snapshot can stay active is 365 days. If 'ttl' is not specified,
     * the default maximum of 365 days will be used.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp delete_time = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getDeleteTimeFieldBuilder() {
      if (deleteTimeBuilder_ == null) {
        deleteTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getDeleteTime(),
                getParentForChildren(),
                isClean());
        deleteTime_ = null;
      }
      return deleteTimeBuilder_;
    }

    private int state_ = 0;
    /**
     * <pre>
     * (`OutputOnly`)
     * The current state of the snapshot.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
     */
    public int getStateValue() {
      return state_;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The current state of the snapshot.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
     */
    public Builder setStateValue(int value) {
      state_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The current state of the snapshot.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
     */
    public com.google.bigtable.admin.v2.Snapshot.State getState() {
      com.google.bigtable.admin.v2.Snapshot.State result = com.google.bigtable.admin.v2.Snapshot.State.valueOf(state_);
      return result == null ? com.google.bigtable.admin.v2.Snapshot.State.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The current state of the snapshot.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
     */
    public Builder setState(com.google.bigtable.admin.v2.Snapshot.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * The current state of the snapshot.
     * </pre>
     *
     * <code>.google.bigtable.admin.v2.Snapshot.State state = 6;</code>
     */
    public Builder clearState() {
      
      state_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     * <pre>
     * (`OutputOnly`)
     * Description of the snapshot.
     * </pre>
     *
     * <code>string description = 7;</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>
     * (`OutputOnly`)
     * Description of the snapshot.
     * </pre>
     *
     * <code>string description = 7;</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>
     * (`OutputOnly`)
     * Description of the snapshot.
     * </pre>
     *
     * <code>string description = 7;</code>
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * Description of the snapshot.
     * </pre>
     *
     * <code>string description = 7;</code>
     */
    public Builder clearDescription() {
      
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * (`OutputOnly`)
     * Description of the snapshot.
     * </pre>
     *
     * <code>string description = 7;</code>
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      description_ = value;
      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.Snapshot)
  }

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

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

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

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

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

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

}

