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

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * Location information for a specific key-range of a sharded computation.
 * Currently we only support UTF-8 character splits to simplify encoding into
 * JSON.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.KeyRangeLocation}
 */
public final class KeyRangeLocation extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.KeyRangeLocation)
    KeyRangeLocationOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use KeyRangeLocation.newBuilder() to construct.
  private KeyRangeLocation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private KeyRangeLocation() {
    start_ = "";
    end_ = "";
    deliveryEndpoint_ = "";
    dataDisk_ = "";
    deprecatedPersistentDirectory_ = "";
  }

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

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

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

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

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

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

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

              dataDisk_ = 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 {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

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

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

  public static final int START_FIELD_NUMBER = 1;
  private volatile java.lang.Object start_;
  /**
   *
   *
   * <pre>
   * The start (inclusive) of the key range.
   * </pre>
   *
   * <code>string start = 1;</code>
   *
   * @return The start.
   */
  @java.lang.Override
  public java.lang.String getStart() {
    java.lang.Object ref = start_;
    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();
      start_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The start (inclusive) of the key range.
   * </pre>
   *
   * <code>string start = 1;</code>
   *
   * @return The bytes for start.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getStartBytes() {
    java.lang.Object ref = start_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      start_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int END_FIELD_NUMBER = 2;
  private volatile java.lang.Object end_;
  /**
   *
   *
   * <pre>
   * The end (exclusive) of the key range.
   * </pre>
   *
   * <code>string end = 2;</code>
   *
   * @return The end.
   */
  @java.lang.Override
  public java.lang.String getEnd() {
    java.lang.Object ref = end_;
    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();
      end_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The end (exclusive) of the key range.
   * </pre>
   *
   * <code>string end = 2;</code>
   *
   * @return The bytes for end.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getEndBytes() {
    java.lang.Object ref = end_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      end_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DELIVERY_ENDPOINT_FIELD_NUMBER = 3;
  private volatile java.lang.Object deliveryEndpoint_;
  /**
   *
   *
   * <pre>
   * The physical location of this range assignment to be used for
   * streaming computation cross-worker message delivery.
   * </pre>
   *
   * <code>string delivery_endpoint = 3;</code>
   *
   * @return The deliveryEndpoint.
   */
  @java.lang.Override
  public java.lang.String getDeliveryEndpoint() {
    java.lang.Object ref = deliveryEndpoint_;
    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();
      deliveryEndpoint_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The physical location of this range assignment to be used for
   * streaming computation cross-worker message delivery.
   * </pre>
   *
   * <code>string delivery_endpoint = 3;</code>
   *
   * @return The bytes for deliveryEndpoint.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDeliveryEndpointBytes() {
    java.lang.Object ref = deliveryEndpoint_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      deliveryEndpoint_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_DISK_FIELD_NUMBER = 5;
  private volatile java.lang.Object dataDisk_;
  /**
   *
   *
   * <pre>
   * The name of the data disk where data for this range is stored.
   * This name is local to the Google Cloud Platform project and uniquely
   * identifies the disk within that project, for example
   * "myproject-1014-104817-4c2-harness-0-disk-1".
   * </pre>
   *
   * <code>string data_disk = 5;</code>
   *
   * @return The dataDisk.
   */
  @java.lang.Override
  public java.lang.String getDataDisk() {
    java.lang.Object ref = dataDisk_;
    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();
      dataDisk_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The name of the data disk where data for this range is stored.
   * This name is local to the Google Cloud Platform project and uniquely
   * identifies the disk within that project, for example
   * "myproject-1014-104817-4c2-harness-0-disk-1".
   * </pre>
   *
   * <code>string data_disk = 5;</code>
   *
   * @return The bytes for dataDisk.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDataDiskBytes() {
    java.lang.Object ref = dataDisk_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      dataDisk_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPRECATED_PERSISTENT_DIRECTORY_FIELD_NUMBER = 4;
  private volatile java.lang.Object deprecatedPersistentDirectory_;
  /**
   *
   *
   * <pre>
   * DEPRECATED. The location of the persistent state for this range, as a
   * persistent directory in the worker local filesystem.
   * </pre>
   *
   * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
   *
   * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
   *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
   * @return The deprecatedPersistentDirectory.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public java.lang.String getDeprecatedPersistentDirectory() {
    java.lang.Object ref = deprecatedPersistentDirectory_;
    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();
      deprecatedPersistentDirectory_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * DEPRECATED. The location of the persistent state for this range, as a
   * persistent directory in the worker local filesystem.
   * </pre>
   *
   * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
   *
   * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
   *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
   * @return The bytes for deprecatedPersistentDirectory.
   */
  @java.lang.Override
  @java.lang.Deprecated
  public com.google.protobuf.ByteString getDeprecatedPersistentDirectoryBytes() {
    java.lang.Object ref = deprecatedPersistentDirectory_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      deprecatedPersistentDirectory_ = 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(start_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, start_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(end_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, end_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deliveryEndpoint_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deliveryEndpoint_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecatedPersistentDirectory_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deprecatedPersistentDirectory_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataDisk_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, dataDisk_);
    }
    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(start_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, start_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(end_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, end_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deliveryEndpoint_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deliveryEndpoint_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deprecatedPersistentDirectory_)) {
      size +=
          com.google.protobuf.GeneratedMessageV3.computeStringSize(
              4, deprecatedPersistentDirectory_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataDisk_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, dataDisk_);
    }
    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.KeyRangeLocation)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.KeyRangeLocation other =
        (com.google.dataflow.v1beta3.KeyRangeLocation) obj;

    if (!getStart().equals(other.getStart())) return false;
    if (!getEnd().equals(other.getEnd())) return false;
    if (!getDeliveryEndpoint().equals(other.getDeliveryEndpoint())) return false;
    if (!getDataDisk().equals(other.getDataDisk())) return false;
    if (!getDeprecatedPersistentDirectory().equals(other.getDeprecatedPersistentDirectory()))
      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) + START_FIELD_NUMBER;
    hash = (53 * hash) + getStart().hashCode();
    hash = (37 * hash) + END_FIELD_NUMBER;
    hash = (53 * hash) + getEnd().hashCode();
    hash = (37 * hash) + DELIVERY_ENDPOINT_FIELD_NUMBER;
    hash = (53 * hash) + getDeliveryEndpoint().hashCode();
    hash = (37 * hash) + DATA_DISK_FIELD_NUMBER;
    hash = (53 * hash) + getDataDisk().hashCode();
    hash = (37 * hash) + DEPRECATED_PERSISTENT_DIRECTORY_FIELD_NUMBER;
    hash = (53 * hash) + getDeprecatedPersistentDirectory().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.KeyRangeLocation 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.KeyRangeLocation 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>
   * Location information for a specific key-range of a sharded computation.
   * Currently we only support UTF-8 character splits to simplify encoding into
   * JSON.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.KeyRangeLocation}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.KeyRangeLocation)
      com.google.dataflow.v1beta3.KeyRangeLocationOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.StreamingProto
          .internal_static_google_dataflow_v1beta3_KeyRangeLocation_descriptor;
    }

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

    // Construct using com.google.dataflow.v1beta3.KeyRangeLocation.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
    }

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

      end_ = "";

      deliveryEndpoint_ = "";

      dataDisk_ = "";

      deprecatedPersistentDirectory_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.KeyRangeLocation buildPartial() {
      com.google.dataflow.v1beta3.KeyRangeLocation result =
          new com.google.dataflow.v1beta3.KeyRangeLocation(this);
      result.start_ = start_;
      result.end_ = end_;
      result.deliveryEndpoint_ = deliveryEndpoint_;
      result.dataDisk_ = dataDisk_;
      result.deprecatedPersistentDirectory_ = deprecatedPersistentDirectory_;
      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.KeyRangeLocation) {
        return mergeFrom((com.google.dataflow.v1beta3.KeyRangeLocation) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.KeyRangeLocation other) {
      if (other == com.google.dataflow.v1beta3.KeyRangeLocation.getDefaultInstance()) return this;
      if (!other.getStart().isEmpty()) {
        start_ = other.start_;
        onChanged();
      }
      if (!other.getEnd().isEmpty()) {
        end_ = other.end_;
        onChanged();
      }
      if (!other.getDeliveryEndpoint().isEmpty()) {
        deliveryEndpoint_ = other.deliveryEndpoint_;
        onChanged();
      }
      if (!other.getDataDisk().isEmpty()) {
        dataDisk_ = other.dataDisk_;
        onChanged();
      }
      if (!other.getDeprecatedPersistentDirectory().isEmpty()) {
        deprecatedPersistentDirectory_ = other.deprecatedPersistentDirectory_;
        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.KeyRangeLocation parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.dataflow.v1beta3.KeyRangeLocation) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object start_ = "";
    /**
     *
     *
     * <pre>
     * The start (inclusive) of the key range.
     * </pre>
     *
     * <code>string start = 1;</code>
     *
     * @return The start.
     */
    public java.lang.String getStart() {
      java.lang.Object ref = start_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        start_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The start (inclusive) of the key range.
     * </pre>
     *
     * <code>string start = 1;</code>
     *
     * @return The bytes for start.
     */
    public com.google.protobuf.ByteString getStartBytes() {
      java.lang.Object ref = start_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        start_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The start (inclusive) of the key range.
     * </pre>
     *
     * <code>string start = 1;</code>
     *
     * @param value The start to set.
     * @return This builder for chaining.
     */
    public Builder setStart(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      start_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The start (inclusive) of the key range.
     * </pre>
     *
     * <code>string start = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStart() {

      start_ = getDefaultInstance().getStart();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The start (inclusive) of the key range.
     * </pre>
     *
     * <code>string start = 1;</code>
     *
     * @param value The bytes for start to set.
     * @return This builder for chaining.
     */
    public Builder setStartBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object end_ = "";
    /**
     *
     *
     * <pre>
     * The end (exclusive) of the key range.
     * </pre>
     *
     * <code>string end = 2;</code>
     *
     * @return The end.
     */
    public java.lang.String getEnd() {
      java.lang.Object ref = end_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        end_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The end (exclusive) of the key range.
     * </pre>
     *
     * <code>string end = 2;</code>
     *
     * @return The bytes for end.
     */
    public com.google.protobuf.ByteString getEndBytes() {
      java.lang.Object ref = end_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        end_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The end (exclusive) of the key range.
     * </pre>
     *
     * <code>string end = 2;</code>
     *
     * @param value The end to set.
     * @return This builder for chaining.
     */
    public Builder setEnd(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      end_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The end (exclusive) of the key range.
     * </pre>
     *
     * <code>string end = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEnd() {

      end_ = getDefaultInstance().getEnd();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The end (exclusive) of the key range.
     * </pre>
     *
     * <code>string end = 2;</code>
     *
     * @param value The bytes for end to set.
     * @return This builder for chaining.
     */
    public Builder setEndBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object deliveryEndpoint_ = "";
    /**
     *
     *
     * <pre>
     * The physical location of this range assignment to be used for
     * streaming computation cross-worker message delivery.
     * </pre>
     *
     * <code>string delivery_endpoint = 3;</code>
     *
     * @return The deliveryEndpoint.
     */
    public java.lang.String getDeliveryEndpoint() {
      java.lang.Object ref = deliveryEndpoint_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deliveryEndpoint_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The physical location of this range assignment to be used for
     * streaming computation cross-worker message delivery.
     * </pre>
     *
     * <code>string delivery_endpoint = 3;</code>
     *
     * @return The bytes for deliveryEndpoint.
     */
    public com.google.protobuf.ByteString getDeliveryEndpointBytes() {
      java.lang.Object ref = deliveryEndpoint_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        deliveryEndpoint_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The physical location of this range assignment to be used for
     * streaming computation cross-worker message delivery.
     * </pre>
     *
     * <code>string delivery_endpoint = 3;</code>
     *
     * @param value The deliveryEndpoint to set.
     * @return This builder for chaining.
     */
    public Builder setDeliveryEndpoint(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      deliveryEndpoint_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The physical location of this range assignment to be used for
     * streaming computation cross-worker message delivery.
     * </pre>
     *
     * <code>string delivery_endpoint = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDeliveryEndpoint() {

      deliveryEndpoint_ = getDefaultInstance().getDeliveryEndpoint();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The physical location of this range assignment to be used for
     * streaming computation cross-worker message delivery.
     * </pre>
     *
     * <code>string delivery_endpoint = 3;</code>
     *
     * @param value The bytes for deliveryEndpoint to set.
     * @return This builder for chaining.
     */
    public Builder setDeliveryEndpointBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object dataDisk_ = "";
    /**
     *
     *
     * <pre>
     * The name of the data disk where data for this range is stored.
     * This name is local to the Google Cloud Platform project and uniquely
     * identifies the disk within that project, for example
     * "myproject-1014-104817-4c2-harness-0-disk-1".
     * </pre>
     *
     * <code>string data_disk = 5;</code>
     *
     * @return The dataDisk.
     */
    public java.lang.String getDataDisk() {
      java.lang.Object ref = dataDisk_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        dataDisk_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the data disk where data for this range is stored.
     * This name is local to the Google Cloud Platform project and uniquely
     * identifies the disk within that project, for example
     * "myproject-1014-104817-4c2-harness-0-disk-1".
     * </pre>
     *
     * <code>string data_disk = 5;</code>
     *
     * @return The bytes for dataDisk.
     */
    public com.google.protobuf.ByteString getDataDiskBytes() {
      java.lang.Object ref = dataDisk_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        dataDisk_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The name of the data disk where data for this range is stored.
     * This name is local to the Google Cloud Platform project and uniquely
     * identifies the disk within that project, for example
     * "myproject-1014-104817-4c2-harness-0-disk-1".
     * </pre>
     *
     * <code>string data_disk = 5;</code>
     *
     * @param value The dataDisk to set.
     * @return This builder for chaining.
     */
    public Builder setDataDisk(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      dataDisk_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the data disk where data for this range is stored.
     * This name is local to the Google Cloud Platform project and uniquely
     * identifies the disk within that project, for example
     * "myproject-1014-104817-4c2-harness-0-disk-1".
     * </pre>
     *
     * <code>string data_disk = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDataDisk() {

      dataDisk_ = getDefaultInstance().getDataDisk();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The name of the data disk where data for this range is stored.
     * This name is local to the Google Cloud Platform project and uniquely
     * identifies the disk within that project, for example
     * "myproject-1014-104817-4c2-harness-0-disk-1".
     * </pre>
     *
     * <code>string data_disk = 5;</code>
     *
     * @param value The bytes for dataDisk to set.
     * @return This builder for chaining.
     */
    public Builder setDataDiskBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object deprecatedPersistentDirectory_ = "";
    /**
     *
     *
     * <pre>
     * DEPRECATED. The location of the persistent state for this range, as a
     * persistent directory in the worker local filesystem.
     * </pre>
     *
     * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
     *
     * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
     *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
     * @return The deprecatedPersistentDirectory.
     */
    @java.lang.Deprecated
    public java.lang.String getDeprecatedPersistentDirectory() {
      java.lang.Object ref = deprecatedPersistentDirectory_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deprecatedPersistentDirectory_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * DEPRECATED. The location of the persistent state for this range, as a
     * persistent directory in the worker local filesystem.
     * </pre>
     *
     * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
     *
     * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
     *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
     * @return The bytes for deprecatedPersistentDirectory.
     */
    @java.lang.Deprecated
    public com.google.protobuf.ByteString getDeprecatedPersistentDirectoryBytes() {
      java.lang.Object ref = deprecatedPersistentDirectory_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        deprecatedPersistentDirectory_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * DEPRECATED. The location of the persistent state for this range, as a
     * persistent directory in the worker local filesystem.
     * </pre>
     *
     * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
     *
     * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
     *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
     * @param value The deprecatedPersistentDirectory to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setDeprecatedPersistentDirectory(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      deprecatedPersistentDirectory_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * DEPRECATED. The location of the persistent state for this range, as a
     * persistent directory in the worker local filesystem.
     * </pre>
     *
     * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
     *
     * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
     *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder clearDeprecatedPersistentDirectory() {

      deprecatedPersistentDirectory_ = getDefaultInstance().getDeprecatedPersistentDirectory();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * DEPRECATED. The location of the persistent state for this range, as a
     * persistent directory in the worker local filesystem.
     * </pre>
     *
     * <code>string deprecated_persistent_directory = 4 [deprecated = true];</code>
     *
     * @deprecated google.dataflow.v1beta3.KeyRangeLocation.deprecated_persistent_directory is
     *     deprecated. See google/dataflow/v1beta3/streaming.proto;l=170
     * @param value The bytes for deprecatedPersistentDirectory to set.
     * @return This builder for chaining.
     */
    @java.lang.Deprecated
    public Builder setDeprecatedPersistentDirectoryBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      deprecatedPersistentDirectory_ = 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.KeyRangeLocation)
  }

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

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

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

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

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

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

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