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

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * Represents a snapshot of a job.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.Snapshot}
 */
public final class Snapshot extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.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() {
    id_ = "";
    projectId_ = "";
    sourceJobId_ = "";
    state_ = 0;
    pubsubMetadata_ = java.util.Collections.emptyList();
    description_ = "";
    region_ = "";
  }

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

  @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;
          case 10:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

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

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

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

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

              state_ = rawValue;
              break;
            }
          case 58:
            {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                pubsubMetadata_ =
                    new java.util.ArrayList<com.google.dataflow.v1beta3.PubsubSnapshotMetadata>();
                mutable_bitField0_ |= 0x00000001;
              }
              pubsubMetadata_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.PubsubSnapshotMetadata.parser(),
                      extensionRegistry));
              break;
            }
          case 66:
            {
              java.lang.String s = input.readStringRequireUtf8();

              description_ = s;
              break;
            }
          case 72:
            {
              diskSizeBytes_ = input.readInt64();
              break;
            }
          case 82:
            {
              java.lang.String s = input.readStringRequireUtf8();

              region_ = s;
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        pubsubMetadata_ = java.util.Collections.unmodifiableList(pubsubMetadata_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.dataflow.v1beta3.SnapshotsProto
        .internal_static_google_dataflow_v1beta3_Snapshot_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.dataflow.v1beta3.SnapshotsProto
        .internal_static_google_dataflow_v1beta3_Snapshot_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.dataflow.v1beta3.Snapshot.class,
            com.google.dataflow.v1beta3.Snapshot.Builder.class);
  }

  public static final int ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object id_;
  /**
   *
   *
   * <pre>
   * The unique ID of this snapshot.
   * </pre>
   *
   * <code>string id = 1;</code>
   *
   * @return The id.
   */
  @java.lang.Override
  public java.lang.String getId() {
    java.lang.Object ref = id_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      id_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The unique ID of this snapshot.
   * </pre>
   *
   * <code>string id = 1;</code>
   *
   * @return The bytes for id.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getIdBytes() {
    java.lang.Object ref = id_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      id_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PROJECT_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object projectId_;
  /**
   *
   *
   * <pre>
   * The project this snapshot belongs to.
   * </pre>
   *
   * <code>string project_id = 2;</code>
   *
   * @return The projectId.
   */
  @java.lang.Override
  public java.lang.String getProjectId() {
    java.lang.Object ref = projectId_;
    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();
      projectId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The project this snapshot belongs to.
   * </pre>
   *
   * <code>string project_id = 2;</code>
   *
   * @return The bytes for projectId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getProjectIdBytes() {
    java.lang.Object ref = projectId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      projectId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SOURCE_JOB_ID_FIELD_NUMBER = 3;
  private volatile java.lang.Object sourceJobId_;
  /**
   *
   *
   * <pre>
   * The job this snapshot was created from.
   * </pre>
   *
   * <code>string source_job_id = 3;</code>
   *
   * @return The sourceJobId.
   */
  @java.lang.Override
  public java.lang.String getSourceJobId() {
    java.lang.Object ref = sourceJobId_;
    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();
      sourceJobId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The job this snapshot was created from.
   * </pre>
   *
   * <code>string source_job_id = 3;</code>
   *
   * @return The bytes for sourceJobId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSourceJobIdBytes() {
    java.lang.Object ref = sourceJobId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      sourceJobId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CREATION_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp creationTime_;
  /**
   *
   *
   * <pre>
   * The time this snapshot was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp creation_time = 4;</code>
   *
   * @return Whether the creationTime field is set.
   */
  @java.lang.Override
  public boolean hasCreationTime() {
    return creationTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time this snapshot was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp creation_time = 4;</code>
   *
   * @return The creationTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getCreationTime() {
    return creationTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : creationTime_;
  }
  /**
   *
   *
   * <pre>
   * The time this snapshot was created.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp creation_time = 4;</code>
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() {
    return getCreationTime();
  }

  public static final int TTL_FIELD_NUMBER = 5;
  private com.google.protobuf.Duration ttl_;
  /**
   *
   *
   * <pre>
   * The time after which this snapshot will be automatically deleted.
   * </pre>
   *
   * <code>.google.protobuf.Duration ttl = 5;</code>
   *
   * @return Whether the ttl field is set.
   */
  @java.lang.Override
  public boolean hasTtl() {
    return ttl_ != null;
  }
  /**
   *
   *
   * <pre>
   * The time after which this snapshot will be automatically deleted.
   * </pre>
   *
   * <code>.google.protobuf.Duration ttl = 5;</code>
   *
   * @return The ttl.
   */
  @java.lang.Override
  public com.google.protobuf.Duration getTtl() {
    return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
  }
  /**
   *
   *
   * <pre>
   * The time after which this snapshot will be automatically deleted.
   * </pre>
   *
   * <code>.google.protobuf.Duration ttl = 5;</code>
   */
  @java.lang.Override
  public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
    return getTtl();
  }

  public static final int STATE_FIELD_NUMBER = 6;
  private int state_;
  /**
   *
   *
   * <pre>
   * State of the snapshot.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * State of the snapshot.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.SnapshotState getState() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.SnapshotState result =
        com.google.dataflow.v1beta3.SnapshotState.valueOf(state_);
    return result == null ? com.google.dataflow.v1beta3.SnapshotState.UNRECOGNIZED : result;
  }

  public static final int PUBSUB_METADATA_FIELD_NUMBER = 7;
  private java.util.List<com.google.dataflow.v1beta3.PubsubSnapshotMetadata> pubsubMetadata_;
  /**
   *
   *
   * <pre>
   * Pub/Sub snapshot metadata.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.PubsubSnapshotMetadata>
      getPubsubMetadataList() {
    return pubsubMetadata_;
  }
  /**
   *
   *
   * <pre>
   * Pub/Sub snapshot metadata.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder>
      getPubsubMetadataOrBuilderList() {
    return pubsubMetadata_;
  }
  /**
   *
   *
   * <pre>
   * Pub/Sub snapshot metadata.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
   */
  @java.lang.Override
  public int getPubsubMetadataCount() {
    return pubsubMetadata_.size();
  }
  /**
   *
   *
   * <pre>
   * Pub/Sub snapshot metadata.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.PubsubSnapshotMetadata getPubsubMetadata(int index) {
    return pubsubMetadata_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Pub/Sub snapshot metadata.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder getPubsubMetadataOrBuilder(
      int index) {
    return pubsubMetadata_.get(index);
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 8;
  private volatile java.lang.Object description_;
  /**
   *
   *
   * <pre>
   * User specified description of the snapshot. Maybe empty.
   * </pre>
   *
   * <code>string description = 8;</code>
   *
   * @return The description.
   */
  @java.lang.Override
  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>
   * User specified description of the snapshot. Maybe empty.
   * </pre>
   *
   * <code>string description = 8;</code>
   *
   * @return The bytes for description.
   */
  @java.lang.Override
  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 DISK_SIZE_BYTES_FIELD_NUMBER = 9;
  private long diskSizeBytes_;
  /**
   *
   *
   * <pre>
   * The disk byte size of the snapshot. Only available for snapshots in READY
   * state.
   * </pre>
   *
   * <code>int64 disk_size_bytes = 9;</code>
   *
   * @return The diskSizeBytes.
   */
  @java.lang.Override
  public long getDiskSizeBytes() {
    return diskSizeBytes_;
  }

  public static final int REGION_FIELD_NUMBER = 10;
  private volatile java.lang.Object region_;
  /**
   *
   *
   * <pre>
   * Cloud region where this snapshot lives in, e.g., "us-central1".
   * </pre>
   *
   * <code>string region = 10;</code>
   *
   * @return The region.
   */
  @java.lang.Override
  public java.lang.String getRegion() {
    java.lang.Object ref = region_;
    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();
      region_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Cloud region where this snapshot lives in, e.g., "us-central1".
   * </pre>
   *
   * <code>string region = 10;</code>
   *
   * @return The bytes for region.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getRegionBytes() {
    java.lang.Object ref = region_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      region_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceJobId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sourceJobId_);
    }
    if (creationTime_ != null) {
      output.writeMessage(4, getCreationTime());
    }
    if (ttl_ != null) {
      output.writeMessage(5, getTtl());
    }
    if (state_ != com.google.dataflow.v1beta3.SnapshotState.UNKNOWN_SNAPSHOT_STATE.getNumber()) {
      output.writeEnum(6, state_);
    }
    for (int i = 0; i < pubsubMetadata_.size(); i++) {
      output.writeMessage(7, pubsubMetadata_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_);
    }
    if (diskSizeBytes_ != 0L) {
      output.writeInt64(9, diskSizeBytes_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, region_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(projectId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceJobId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sourceJobId_);
    }
    if (creationTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCreationTime());
    }
    if (ttl_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getTtl());
    }
    if (state_ != com.google.dataflow.v1beta3.SnapshotState.UNKNOWN_SNAPSHOT_STATE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
    }
    for (int i = 0; i < pubsubMetadata_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, pubsubMetadata_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_);
    }
    if (diskSizeBytes_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, diskSizeBytes_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, region_);
    }
    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.dataflow.v1beta3.Snapshot)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.Snapshot other = (com.google.dataflow.v1beta3.Snapshot) obj;

    if (!getId().equals(other.getId())) return false;
    if (!getProjectId().equals(other.getProjectId())) return false;
    if (!getSourceJobId().equals(other.getSourceJobId())) return false;
    if (hasCreationTime() != other.hasCreationTime()) return false;
    if (hasCreationTime()) {
      if (!getCreationTime().equals(other.getCreationTime())) return false;
    }
    if (hasTtl() != other.hasTtl()) return false;
    if (hasTtl()) {
      if (!getTtl().equals(other.getTtl())) return false;
    }
    if (state_ != other.state_) return false;
    if (!getPubsubMetadataList().equals(other.getPubsubMetadataList())) return false;
    if (!getDescription().equals(other.getDescription())) return false;
    if (getDiskSizeBytes() != other.getDiskSizeBytes()) return false;
    if (!getRegion().equals(other.getRegion())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER;
    hash = (53 * hash) + getProjectId().hashCode();
    hash = (37 * hash) + SOURCE_JOB_ID_FIELD_NUMBER;
    hash = (53 * hash) + getSourceJobId().hashCode();
    if (hasCreationTime()) {
      hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getCreationTime().hashCode();
    }
    if (hasTtl()) {
      hash = (37 * hash) + TTL_FIELD_NUMBER;
      hash = (53 * hash) + getTtl().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    if (getPubsubMetadataCount() > 0) {
      hash = (37 * hash) + PUBSUB_METADATA_FIELD_NUMBER;
      hash = (53 * hash) + getPubsubMetadataList().hashCode();
    }
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    hash = (37 * hash) + DISK_SIZE_BYTES_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDiskSizeBytes());
    hash = (37 * hash) + REGION_FIELD_NUMBER;
    hash = (53 * hash) + getRegion().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.dataflow.v1beta3.Snapshot parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.dataflow.v1beta3.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.dataflow.v1beta3.Snapshot parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.dataflow.v1beta3.Snapshot parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.dataflow.v1beta3.Snapshot parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.dataflow.v1beta3.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);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.dataflow.v1beta3.Snapshot prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

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

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * Represents a snapshot of a job.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.Snapshot}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.Snapshot)
      com.google.dataflow.v1beta3.SnapshotOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.SnapshotsProto
          .internal_static_google_dataflow_v1beta3_Snapshot_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.dataflow.v1beta3.SnapshotsProto
          .internal_static_google_dataflow_v1beta3_Snapshot_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.dataflow.v1beta3.Snapshot.class,
              com.google.dataflow.v1beta3.Snapshot.Builder.class);
    }

    // Construct using com.google.dataflow.v1beta3.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) {
        getPubsubMetadataFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      id_ = "";

      projectId_ = "";

      sourceJobId_ = "";

      if (creationTimeBuilder_ == null) {
        creationTime_ = null;
      } else {
        creationTime_ = null;
        creationTimeBuilder_ = null;
      }
      if (ttlBuilder_ == null) {
        ttl_ = null;
      } else {
        ttl_ = null;
        ttlBuilder_ = null;
      }
      state_ = 0;

      if (pubsubMetadataBuilder_ == null) {
        pubsubMetadata_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        pubsubMetadataBuilder_.clear();
      }
      description_ = "";

      diskSizeBytes_ = 0L;

      region_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.dataflow.v1beta3.SnapshotsProto
          .internal_static_google_dataflow_v1beta3_Snapshot_descriptor;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.Snapshot getDefaultInstanceForType() {
      return com.google.dataflow.v1beta3.Snapshot.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.Snapshot build() {
      com.google.dataflow.v1beta3.Snapshot result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.dataflow.v1beta3.Snapshot buildPartial() {
      com.google.dataflow.v1beta3.Snapshot result = new com.google.dataflow.v1beta3.Snapshot(this);
      int from_bitField0_ = bitField0_;
      result.id_ = id_;
      result.projectId_ = projectId_;
      result.sourceJobId_ = sourceJobId_;
      if (creationTimeBuilder_ == null) {
        result.creationTime_ = creationTime_;
      } else {
        result.creationTime_ = creationTimeBuilder_.build();
      }
      if (ttlBuilder_ == null) {
        result.ttl_ = ttl_;
      } else {
        result.ttl_ = ttlBuilder_.build();
      }
      result.state_ = state_;
      if (pubsubMetadataBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          pubsubMetadata_ = java.util.Collections.unmodifiableList(pubsubMetadata_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.pubsubMetadata_ = pubsubMetadata_;
      } else {
        result.pubsubMetadata_ = pubsubMetadataBuilder_.build();
      }
      result.description_ = description_;
      result.diskSizeBytes_ = diskSizeBytes_;
      result.region_ = region_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.dataflow.v1beta3.Snapshot) {
        return mergeFrom((com.google.dataflow.v1beta3.Snapshot) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.Snapshot other) {
      if (other == com.google.dataflow.v1beta3.Snapshot.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        onChanged();
      }
      if (!other.getProjectId().isEmpty()) {
        projectId_ = other.projectId_;
        onChanged();
      }
      if (!other.getSourceJobId().isEmpty()) {
        sourceJobId_ = other.sourceJobId_;
        onChanged();
      }
      if (other.hasCreationTime()) {
        mergeCreationTime(other.getCreationTime());
      }
      if (other.hasTtl()) {
        mergeTtl(other.getTtl());
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (pubsubMetadataBuilder_ == null) {
        if (!other.pubsubMetadata_.isEmpty()) {
          if (pubsubMetadata_.isEmpty()) {
            pubsubMetadata_ = other.pubsubMetadata_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensurePubsubMetadataIsMutable();
            pubsubMetadata_.addAll(other.pubsubMetadata_);
          }
          onChanged();
        }
      } else {
        if (!other.pubsubMetadata_.isEmpty()) {
          if (pubsubMetadataBuilder_.isEmpty()) {
            pubsubMetadataBuilder_.dispose();
            pubsubMetadataBuilder_ = null;
            pubsubMetadata_ = other.pubsubMetadata_;
            bitField0_ = (bitField0_ & ~0x00000001);
            pubsubMetadataBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getPubsubMetadataFieldBuilder()
                    : null;
          } else {
            pubsubMetadataBuilder_.addAllMessages(other.pubsubMetadata_);
          }
        }
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      if (other.getDiskSizeBytes() != 0L) {
        setDiskSizeBytes(other.getDiskSizeBytes());
      }
      if (!other.getRegion().isEmpty()) {
        region_ = other.region_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.dataflow.v1beta3.Snapshot parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.dataflow.v1beta3.Snapshot) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object id_ = "";
    /**
     *
     *
     * <pre>
     * The unique ID of this snapshot.
     * </pre>
     *
     * <code>string id = 1;</code>
     *
     * @return The id.
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The unique ID of this snapshot.
     * </pre>
     *
     * <code>string id = 1;</code>
     *
     * @return The bytes for id.
     */
    public com.google.protobuf.ByteString getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The unique ID of this snapshot.
     * </pre>
     *
     * <code>string id = 1;</code>
     *
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      id_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The unique ID of this snapshot.
     * </pre>
     *
     * <code>string id = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearId() {

      id_ = getDefaultInstance().getId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The unique ID of this snapshot.
     * </pre>
     *
     * <code>string id = 1;</code>
     *
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      id_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object projectId_ = "";
    /**
     *
     *
     * <pre>
     * The project this snapshot belongs to.
     * </pre>
     *
     * <code>string project_id = 2;</code>
     *
     * @return The projectId.
     */
    public java.lang.String getProjectId() {
      java.lang.Object ref = projectId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        projectId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The project this snapshot belongs to.
     * </pre>
     *
     * <code>string project_id = 2;</code>
     *
     * @return The bytes for projectId.
     */
    public com.google.protobuf.ByteString getProjectIdBytes() {
      java.lang.Object ref = projectId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        projectId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The project this snapshot belongs to.
     * </pre>
     *
     * <code>string project_id = 2;</code>
     *
     * @param value The projectId to set.
     * @return This builder for chaining.
     */
    public Builder setProjectId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      projectId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The project this snapshot belongs to.
     * </pre>
     *
     * <code>string project_id = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearProjectId() {

      projectId_ = getDefaultInstance().getProjectId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The project this snapshot belongs to.
     * </pre>
     *
     * <code>string project_id = 2;</code>
     *
     * @param value The bytes for projectId to set.
     * @return This builder for chaining.
     */
    public Builder setProjectIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      projectId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object sourceJobId_ = "";
    /**
     *
     *
     * <pre>
     * The job this snapshot was created from.
     * </pre>
     *
     * <code>string source_job_id = 3;</code>
     *
     * @return The sourceJobId.
     */
    public java.lang.String getSourceJobId() {
      java.lang.Object ref = sourceJobId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sourceJobId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The job this snapshot was created from.
     * </pre>
     *
     * <code>string source_job_id = 3;</code>
     *
     * @return The bytes for sourceJobId.
     */
    public com.google.protobuf.ByteString getSourceJobIdBytes() {
      java.lang.Object ref = sourceJobId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        sourceJobId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The job this snapshot was created from.
     * </pre>
     *
     * <code>string source_job_id = 3;</code>
     *
     * @param value The sourceJobId to set.
     * @return This builder for chaining.
     */
    public Builder setSourceJobId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      sourceJobId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The job this snapshot was created from.
     * </pre>
     *
     * <code>string source_job_id = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSourceJobId() {

      sourceJobId_ = getDefaultInstance().getSourceJobId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The job this snapshot was created from.
     * </pre>
     *
     * <code>string source_job_id = 3;</code>
     *
     * @param value The bytes for sourceJobId to set.
     * @return This builder for chaining.
     */
    public Builder setSourceJobIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      sourceJobId_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp creationTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        creationTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     *
     * @return Whether the creationTime field is set.
     */
    public boolean hasCreationTime() {
      return creationTimeBuilder_ != null || creationTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     *
     * @return The creationTime.
     */
    public com.google.protobuf.Timestamp getCreationTime() {
      if (creationTimeBuilder_ == null) {
        return creationTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : creationTime_;
      } else {
        return creationTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public Builder setCreationTime(com.google.protobuf.Timestamp value) {
      if (creationTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        creationTime_ = value;
        onChanged();
      } else {
        creationTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (creationTimeBuilder_ == null) {
        creationTime_ = builderForValue.build();
        onChanged();
      } else {
        creationTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public Builder mergeCreationTime(com.google.protobuf.Timestamp value) {
      if (creationTimeBuilder_ == null) {
        if (creationTime_ != null) {
          creationTime_ =
              com.google.protobuf.Timestamp.newBuilder(creationTime_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          creationTime_ = value;
        }
        onChanged();
      } else {
        creationTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public Builder clearCreationTime() {
      if (creationTimeBuilder_ == null) {
        creationTime_ = null;
        onChanged();
      } else {
        creationTime_ = null;
        creationTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() {

      onChanged();
      return getCreationTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() {
      if (creationTimeBuilder_ != null) {
        return creationTimeBuilder_.getMessageOrBuilder();
      } else {
        return creationTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : creationTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time this snapshot was created.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp creation_time = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getCreationTimeFieldBuilder() {
      if (creationTimeBuilder_ == null) {
        creationTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getCreationTime(), getParentForChildren(), isClean());
        creationTime_ = null;
      }
      return creationTimeBuilder_;
    }

    private com.google.protobuf.Duration ttl_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        ttlBuilder_;
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     *
     * @return Whether the ttl field is set.
     */
    public boolean hasTtl() {
      return ttlBuilder_ != null || ttl_ != null;
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     *
     * @return The ttl.
     */
    public com.google.protobuf.Duration getTtl() {
      if (ttlBuilder_ == null) {
        return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
      } else {
        return ttlBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public Builder setTtl(com.google.protobuf.Duration value) {
      if (ttlBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ttl_ = value;
        onChanged();
      } else {
        ttlBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) {
      if (ttlBuilder_ == null) {
        ttl_ = builderForValue.build();
        onChanged();
      } else {
        ttlBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public Builder mergeTtl(com.google.protobuf.Duration value) {
      if (ttlBuilder_ == null) {
        if (ttl_ != null) {
          ttl_ = com.google.protobuf.Duration.newBuilder(ttl_).mergeFrom(value).buildPartial();
        } else {
          ttl_ = value;
        }
        onChanged();
      } else {
        ttlBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public Builder clearTtl() {
      if (ttlBuilder_ == null) {
        ttl_ = null;
        onChanged();
      } else {
        ttl_ = null;
        ttlBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public com.google.protobuf.Duration.Builder getTtlBuilder() {

      onChanged();
      return getTtlFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
      if (ttlBuilder_ != null) {
        return ttlBuilder_.getMessageOrBuilder();
      } else {
        return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
      }
    }
    /**
     *
     *
     * <pre>
     * The time after which this snapshot will be automatically deleted.
     * </pre>
     *
     * <code>.google.protobuf.Duration ttl = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration,
            com.google.protobuf.Duration.Builder,
            com.google.protobuf.DurationOrBuilder>
        getTtlFieldBuilder() {
      if (ttlBuilder_ == null) {
        ttlBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Duration,
                com.google.protobuf.Duration.Builder,
                com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean());
        ttl_ = null;
      }
      return ttlBuilder_;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * State of the snapshot.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * State of the snapshot.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {

      state_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * State of the snapshot.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.SnapshotState getState() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.SnapshotState result =
          com.google.dataflow.v1beta3.SnapshotState.valueOf(state_);
      return result == null ? com.google.dataflow.v1beta3.SnapshotState.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * State of the snapshot.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.dataflow.v1beta3.SnapshotState value) {
      if (value == null) {
        throw new NullPointerException();
      }

      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * State of the snapshot.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.SnapshotState state = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {

      state_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<com.google.dataflow.v1beta3.PubsubSnapshotMetadata> pubsubMetadata_ =
        java.util.Collections.emptyList();

    private void ensurePubsubMetadataIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        pubsubMetadata_ =
            new java.util.ArrayList<com.google.dataflow.v1beta3.PubsubSnapshotMetadata>(
                pubsubMetadata_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.PubsubSnapshotMetadata,
            com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder,
            com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder>
        pubsubMetadataBuilder_;

    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.PubsubSnapshotMetadata>
        getPubsubMetadataList() {
      if (pubsubMetadataBuilder_ == null) {
        return java.util.Collections.unmodifiableList(pubsubMetadata_);
      } else {
        return pubsubMetadataBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public int getPubsubMetadataCount() {
      if (pubsubMetadataBuilder_ == null) {
        return pubsubMetadata_.size();
      } else {
        return pubsubMetadataBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public com.google.dataflow.v1beta3.PubsubSnapshotMetadata getPubsubMetadata(int index) {
      if (pubsubMetadataBuilder_ == null) {
        return pubsubMetadata_.get(index);
      } else {
        return pubsubMetadataBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder setPubsubMetadata(
        int index, com.google.dataflow.v1beta3.PubsubSnapshotMetadata value) {
      if (pubsubMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.set(index, value);
        onChanged();
      } else {
        pubsubMetadataBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder setPubsubMetadata(
        int index, com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder builderForValue) {
      if (pubsubMetadataBuilder_ == null) {
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.set(index, builderForValue.build());
        onChanged();
      } else {
        pubsubMetadataBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder addPubsubMetadata(com.google.dataflow.v1beta3.PubsubSnapshotMetadata value) {
      if (pubsubMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.add(value);
        onChanged();
      } else {
        pubsubMetadataBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder addPubsubMetadata(
        int index, com.google.dataflow.v1beta3.PubsubSnapshotMetadata value) {
      if (pubsubMetadataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.add(index, value);
        onChanged();
      } else {
        pubsubMetadataBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder addPubsubMetadata(
        com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder builderForValue) {
      if (pubsubMetadataBuilder_ == null) {
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.add(builderForValue.build());
        onChanged();
      } else {
        pubsubMetadataBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder addPubsubMetadata(
        int index, com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder builderForValue) {
      if (pubsubMetadataBuilder_ == null) {
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.add(index, builderForValue.build());
        onChanged();
      } else {
        pubsubMetadataBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder addAllPubsubMetadata(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.PubsubSnapshotMetadata> values) {
      if (pubsubMetadataBuilder_ == null) {
        ensurePubsubMetadataIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pubsubMetadata_);
        onChanged();
      } else {
        pubsubMetadataBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder clearPubsubMetadata() {
      if (pubsubMetadataBuilder_ == null) {
        pubsubMetadata_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        pubsubMetadataBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public Builder removePubsubMetadata(int index) {
      if (pubsubMetadataBuilder_ == null) {
        ensurePubsubMetadataIsMutable();
        pubsubMetadata_.remove(index);
        onChanged();
      } else {
        pubsubMetadataBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder getPubsubMetadataBuilder(
        int index) {
      return getPubsubMetadataFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder getPubsubMetadataOrBuilder(
        int index) {
      if (pubsubMetadataBuilder_ == null) {
        return pubsubMetadata_.get(index);
      } else {
        return pubsubMetadataBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder>
        getPubsubMetadataOrBuilderList() {
      if (pubsubMetadataBuilder_ != null) {
        return pubsubMetadataBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(pubsubMetadata_);
      }
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder addPubsubMetadataBuilder() {
      return getPubsubMetadataFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.PubsubSnapshotMetadata.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder addPubsubMetadataBuilder(
        int index) {
      return getPubsubMetadataFieldBuilder()
          .addBuilder(
              index, com.google.dataflow.v1beta3.PubsubSnapshotMetadata.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Pub/Sub snapshot metadata.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.PubsubSnapshotMetadata pubsub_metadata = 7;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder>
        getPubsubMetadataBuilderList() {
      return getPubsubMetadataFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.PubsubSnapshotMetadata,
            com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder,
            com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder>
        getPubsubMetadataFieldBuilder() {
      if (pubsubMetadataBuilder_ == null) {
        pubsubMetadataBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.PubsubSnapshotMetadata,
                com.google.dataflow.v1beta3.PubsubSnapshotMetadata.Builder,
                com.google.dataflow.v1beta3.PubsubSnapshotMetadataOrBuilder>(
                pubsubMetadata_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        pubsubMetadata_ = null;
      }
      return pubsubMetadataBuilder_;
    }

    private java.lang.Object description_ = "";
    /**
     *
     *
     * <pre>
     * User specified description of the snapshot. Maybe empty.
     * </pre>
     *
     * <code>string description = 8;</code>
     *
     * @return The description.
     */
    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>
     * User specified description of the snapshot. Maybe empty.
     * </pre>
     *
     * <code>string description = 8;</code>
     *
     * @return The bytes for description.
     */
    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>
     * User specified description of the snapshot. Maybe empty.
     * </pre>
     *
     * <code>string description = 8;</code>
     *
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      description_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User specified description of the snapshot. Maybe empty.
     * </pre>
     *
     * <code>string description = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDescription() {

      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * User specified description of the snapshot. Maybe empty.
     * </pre>
     *
     * <code>string description = 8;</code>
     *
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      description_ = value;
      onChanged();
      return this;
    }

    private long diskSizeBytes_;
    /**
     *
     *
     * <pre>
     * The disk byte size of the snapshot. Only available for snapshots in READY
     * state.
     * </pre>
     *
     * <code>int64 disk_size_bytes = 9;</code>
     *
     * @return The diskSizeBytes.
     */
    @java.lang.Override
    public long getDiskSizeBytes() {
      return diskSizeBytes_;
    }
    /**
     *
     *
     * <pre>
     * The disk byte size of the snapshot. Only available for snapshots in READY
     * state.
     * </pre>
     *
     * <code>int64 disk_size_bytes = 9;</code>
     *
     * @param value The diskSizeBytes to set.
     * @return This builder for chaining.
     */
    public Builder setDiskSizeBytes(long value) {

      diskSizeBytes_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The disk byte size of the snapshot. Only available for snapshots in READY
     * state.
     * </pre>
     *
     * <code>int64 disk_size_bytes = 9;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskSizeBytes() {

      diskSizeBytes_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object region_ = "";
    /**
     *
     *
     * <pre>
     * Cloud region where this snapshot lives in, e.g., "us-central1".
     * </pre>
     *
     * <code>string region = 10;</code>
     *
     * @return The region.
     */
    public java.lang.String getRegion() {
      java.lang.Object ref = region_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        region_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Cloud region where this snapshot lives in, e.g., "us-central1".
     * </pre>
     *
     * <code>string region = 10;</code>
     *
     * @return The bytes for region.
     */
    public com.google.protobuf.ByteString getRegionBytes() {
      java.lang.Object ref = region_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        region_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Cloud region where this snapshot lives in, e.g., "us-central1".
     * </pre>
     *
     * <code>string region = 10;</code>
     *
     * @param value The region to set.
     * @return This builder for chaining.
     */
    public Builder setRegion(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      region_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Cloud region where this snapshot lives in, e.g., "us-central1".
     * </pre>
     *
     * <code>string region = 10;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearRegion() {

      region_ = getDefaultInstance().getRegion();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Cloud region where this snapshot lives in, e.g., "us-central1".
     * </pre>
     *
     * <code>string region = 10;</code>
     *
     * @param value The bytes for region to set.
     * @return This builder for chaining.
     */
    public Builder setRegionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      region_ = value;
      onChanged();
      return this;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.dataflow.v1beta3.Snapshot)
  }

  // @@protoc_insertion_point(class_scope:google.dataflow.v1beta3.Snapshot)
  private static final com.google.dataflow.v1beta3.Snapshot DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.dataflow.v1beta3.Snapshot();
  }

  public static com.google.dataflow.v1beta3.Snapshot getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

  @java.lang.Override
  public com.google.dataflow.v1beta3.Snapshot getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
