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

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * Provides data to pass through to the worker harness.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.WorkerSettings}
 */
public final class WorkerSettings extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.WorkerSettings)
    WorkerSettingsOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use WorkerSettings.newBuilder() to construct.
  private WorkerSettings(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private WorkerSettings() {
    baseUrl_ = "";
    servicePath_ = "";
    shuffleServicePath_ = "";
    workerId_ = "";
    tempStoragePrefix_ = "";
  }

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

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

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

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

  public static final int BASE_URL_FIELD_NUMBER = 1;
  private volatile java.lang.Object baseUrl_;
  /**
   *
   *
   * <pre>
   * The base URL for accessing Google Cloud APIs.
   * When workers access Google Cloud APIs, they logically do so via
   * relative URLs.  If this field is specified, it supplies the base
   * URL to use for resolving these relative URLs.  The normative
   * algorithm used is defined by RFC 1808, "Relative Uniform Resource
   * Locators".
   * If not specified, the default value is "http://www.googleapis.com/"
   * </pre>
   *
   * <code>string base_url = 1;</code>
   *
   * @return The baseUrl.
   */
  @java.lang.Override
  public java.lang.String getBaseUrl() {
    java.lang.Object ref = baseUrl_;
    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();
      baseUrl_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The base URL for accessing Google Cloud APIs.
   * When workers access Google Cloud APIs, they logically do so via
   * relative URLs.  If this field is specified, it supplies the base
   * URL to use for resolving these relative URLs.  The normative
   * algorithm used is defined by RFC 1808, "Relative Uniform Resource
   * Locators".
   * If not specified, the default value is "http://www.googleapis.com/"
   * </pre>
   *
   * <code>string base_url = 1;</code>
   *
   * @return The bytes for baseUrl.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getBaseUrlBytes() {
    java.lang.Object ref = baseUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      baseUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REPORTING_ENABLED_FIELD_NUMBER = 2;
  private boolean reportingEnabled_;
  /**
   *
   *
   * <pre>
   * Whether to send work progress updates to the service.
   * </pre>
   *
   * <code>bool reporting_enabled = 2;</code>
   *
   * @return The reportingEnabled.
   */
  @java.lang.Override
  public boolean getReportingEnabled() {
    return reportingEnabled_;
  }

  public static final int SERVICE_PATH_FIELD_NUMBER = 3;
  private volatile java.lang.Object servicePath_;
  /**
   *
   *
   * <pre>
   * The Cloud Dataflow service path relative to the root URL, for example,
   * "dataflow/v1b3/projects".
   * </pre>
   *
   * <code>string service_path = 3;</code>
   *
   * @return The servicePath.
   */
  @java.lang.Override
  public java.lang.String getServicePath() {
    java.lang.Object ref = servicePath_;
    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();
      servicePath_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Cloud Dataflow service path relative to the root URL, for example,
   * "dataflow/v1b3/projects".
   * </pre>
   *
   * <code>string service_path = 3;</code>
   *
   * @return The bytes for servicePath.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getServicePathBytes() {
    java.lang.Object ref = servicePath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      servicePath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SHUFFLE_SERVICE_PATH_FIELD_NUMBER = 4;
  private volatile java.lang.Object shuffleServicePath_;
  /**
   *
   *
   * <pre>
   * The Shuffle service path relative to the root URL, for example,
   * "shuffle/v1beta1".
   * </pre>
   *
   * <code>string shuffle_service_path = 4;</code>
   *
   * @return The shuffleServicePath.
   */
  @java.lang.Override
  public java.lang.String getShuffleServicePath() {
    java.lang.Object ref = shuffleServicePath_;
    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();
      shuffleServicePath_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Shuffle service path relative to the root URL, for example,
   * "shuffle/v1beta1".
   * </pre>
   *
   * <code>string shuffle_service_path = 4;</code>
   *
   * @return The bytes for shuffleServicePath.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getShuffleServicePathBytes() {
    java.lang.Object ref = shuffleServicePath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      shuffleServicePath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int WORKER_ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object workerId_;
  /**
   *
   *
   * <pre>
   * The ID of the worker running this pipeline.
   * </pre>
   *
   * <code>string worker_id = 5;</code>
   *
   * @return The workerId.
   */
  @java.lang.Override
  public java.lang.String getWorkerId() {
    java.lang.Object ref = workerId_;
    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();
      workerId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The ID of the worker running this pipeline.
   * </pre>
   *
   * <code>string worker_id = 5;</code>
   *
   * @return The bytes for workerId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWorkerIdBytes() {
    java.lang.Object ref = workerId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      workerId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEMP_STORAGE_PREFIX_FIELD_NUMBER = 6;
  private volatile java.lang.Object tempStoragePrefix_;
  /**
   *
   *
   * <pre>
   * The prefix of the resources the system should use for temporary
   * storage.
   * The supported resource type is:
   * Google Cloud Storage:
   *   storage.googleapis.com/{bucket}/{object}
   *   bucket.storage.googleapis.com/{object}
   * </pre>
   *
   * <code>string temp_storage_prefix = 6;</code>
   *
   * @return The tempStoragePrefix.
   */
  @java.lang.Override
  public java.lang.String getTempStoragePrefix() {
    java.lang.Object ref = tempStoragePrefix_;
    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();
      tempStoragePrefix_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The prefix of the resources the system should use for temporary
   * storage.
   * The supported resource type is:
   * Google Cloud Storage:
   *   storage.googleapis.com/{bucket}/{object}
   *   bucket.storage.googleapis.com/{object}
   * </pre>
   *
   * <code>string temp_storage_prefix = 6;</code>
   *
   * @return The bytes for tempStoragePrefix.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getTempStoragePrefixBytes() {
    java.lang.Object ref = tempStoragePrefix_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      tempStoragePrefix_ = 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(baseUrl_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseUrl_);
    }
    if (reportingEnabled_ != false) {
      output.writeBool(2, reportingEnabled_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicePath_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servicePath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shuffleServicePath_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, shuffleServicePath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, workerId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempStoragePrefix_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, tempStoragePrefix_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(baseUrl_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseUrl_);
    }
    if (reportingEnabled_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, reportingEnabled_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicePath_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servicePath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shuffleServicePath_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, shuffleServicePath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, workerId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempStoragePrefix_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, tempStoragePrefix_);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.dataflow.v1beta3.WorkerSettings)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.WorkerSettings other =
        (com.google.dataflow.v1beta3.WorkerSettings) obj;

    if (!getBaseUrl().equals(other.getBaseUrl())) return false;
    if (getReportingEnabled() != other.getReportingEnabled()) return false;
    if (!getServicePath().equals(other.getServicePath())) return false;
    if (!getShuffleServicePath().equals(other.getShuffleServicePath())) return false;
    if (!getWorkerId().equals(other.getWorkerId())) return false;
    if (!getTempStoragePrefix().equals(other.getTempStoragePrefix())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + BASE_URL_FIELD_NUMBER;
    hash = (53 * hash) + getBaseUrl().hashCode();
    hash = (37 * hash) + REPORTING_ENABLED_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReportingEnabled());
    hash = (37 * hash) + SERVICE_PATH_FIELD_NUMBER;
    hash = (53 * hash) + getServicePath().hashCode();
    hash = (37 * hash) + SHUFFLE_SERVICE_PATH_FIELD_NUMBER;
    hash = (53 * hash) + getShuffleServicePath().hashCode();
    hash = (37 * hash) + WORKER_ID_FIELD_NUMBER;
    hash = (53 * hash) + getWorkerId().hashCode();
    hash = (37 * hash) + TEMP_STORAGE_PREFIX_FIELD_NUMBER;
    hash = (53 * hash) + getTempStoragePrefix().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.WorkerSettings 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.WorkerSettings 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>
   * Provides data to pass through to the worker harness.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.WorkerSettings}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.WorkerSettings)
      com.google.dataflow.v1beta3.WorkerSettingsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.EnvironmentProto
          .internal_static_google_dataflow_v1beta3_WorkerSettings_descriptor;
    }

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

    // Construct using com.google.dataflow.v1beta3.WorkerSettings.newBuilder()
    private Builder() {}

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

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

      reportingEnabled_ = false;

      servicePath_ = "";

      shuffleServicePath_ = "";

      workerId_ = "";

      tempStoragePrefix_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.WorkerSettings buildPartial() {
      com.google.dataflow.v1beta3.WorkerSettings result =
          new com.google.dataflow.v1beta3.WorkerSettings(this);
      result.baseUrl_ = baseUrl_;
      result.reportingEnabled_ = reportingEnabled_;
      result.servicePath_ = servicePath_;
      result.shuffleServicePath_ = shuffleServicePath_;
      result.workerId_ = workerId_;
      result.tempStoragePrefix_ = tempStoragePrefix_;
      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.WorkerSettings) {
        return mergeFrom((com.google.dataflow.v1beta3.WorkerSettings) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.WorkerSettings other) {
      if (other == com.google.dataflow.v1beta3.WorkerSettings.getDefaultInstance()) return this;
      if (!other.getBaseUrl().isEmpty()) {
        baseUrl_ = other.baseUrl_;
        onChanged();
      }
      if (other.getReportingEnabled() != false) {
        setReportingEnabled(other.getReportingEnabled());
      }
      if (!other.getServicePath().isEmpty()) {
        servicePath_ = other.servicePath_;
        onChanged();
      }
      if (!other.getShuffleServicePath().isEmpty()) {
        shuffleServicePath_ = other.shuffleServicePath_;
        onChanged();
      }
      if (!other.getWorkerId().isEmpty()) {
        workerId_ = other.workerId_;
        onChanged();
      }
      if (!other.getTempStoragePrefix().isEmpty()) {
        tempStoragePrefix_ = other.tempStoragePrefix_;
        onChanged();
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                baseUrl_ = input.readStringRequireUtf8();

                break;
              } // case 10
            case 16:
              {
                reportingEnabled_ = input.readBool();

                break;
              } // case 16
            case 26:
              {
                servicePath_ = input.readStringRequireUtf8();

                break;
              } // case 26
            case 34:
              {
                shuffleServicePath_ = input.readStringRequireUtf8();

                break;
              } // case 34
            case 42:
              {
                workerId_ = input.readStringRequireUtf8();

                break;
              } // case 42
            case 50:
              {
                tempStoragePrefix_ = input.readStringRequireUtf8();

                break;
              } // case 50
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private java.lang.Object baseUrl_ = "";
    /**
     *
     *
     * <pre>
     * The base URL for accessing Google Cloud APIs.
     * When workers access Google Cloud APIs, they logically do so via
     * relative URLs.  If this field is specified, it supplies the base
     * URL to use for resolving these relative URLs.  The normative
     * algorithm used is defined by RFC 1808, "Relative Uniform Resource
     * Locators".
     * If not specified, the default value is "http://www.googleapis.com/"
     * </pre>
     *
     * <code>string base_url = 1;</code>
     *
     * @return The baseUrl.
     */
    public java.lang.String getBaseUrl() {
      java.lang.Object ref = baseUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        baseUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The base URL for accessing Google Cloud APIs.
     * When workers access Google Cloud APIs, they logically do so via
     * relative URLs.  If this field is specified, it supplies the base
     * URL to use for resolving these relative URLs.  The normative
     * algorithm used is defined by RFC 1808, "Relative Uniform Resource
     * Locators".
     * If not specified, the default value is "http://www.googleapis.com/"
     * </pre>
     *
     * <code>string base_url = 1;</code>
     *
     * @return The bytes for baseUrl.
     */
    public com.google.protobuf.ByteString getBaseUrlBytes() {
      java.lang.Object ref = baseUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        baseUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The base URL for accessing Google Cloud APIs.
     * When workers access Google Cloud APIs, they logically do so via
     * relative URLs.  If this field is specified, it supplies the base
     * URL to use for resolving these relative URLs.  The normative
     * algorithm used is defined by RFC 1808, "Relative Uniform Resource
     * Locators".
     * If not specified, the default value is "http://www.googleapis.com/"
     * </pre>
     *
     * <code>string base_url = 1;</code>
     *
     * @param value The baseUrl to set.
     * @return This builder for chaining.
     */
    public Builder setBaseUrl(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      baseUrl_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The base URL for accessing Google Cloud APIs.
     * When workers access Google Cloud APIs, they logically do so via
     * relative URLs.  If this field is specified, it supplies the base
     * URL to use for resolving these relative URLs.  The normative
     * algorithm used is defined by RFC 1808, "Relative Uniform Resource
     * Locators".
     * If not specified, the default value is "http://www.googleapis.com/"
     * </pre>
     *
     * <code>string base_url = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearBaseUrl() {

      baseUrl_ = getDefaultInstance().getBaseUrl();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The base URL for accessing Google Cloud APIs.
     * When workers access Google Cloud APIs, they logically do so via
     * relative URLs.  If this field is specified, it supplies the base
     * URL to use for resolving these relative URLs.  The normative
     * algorithm used is defined by RFC 1808, "Relative Uniform Resource
     * Locators".
     * If not specified, the default value is "http://www.googleapis.com/"
     * </pre>
     *
     * <code>string base_url = 1;</code>
     *
     * @param value The bytes for baseUrl to set.
     * @return This builder for chaining.
     */
    public Builder setBaseUrlBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private boolean reportingEnabled_;
    /**
     *
     *
     * <pre>
     * Whether to send work progress updates to the service.
     * </pre>
     *
     * <code>bool reporting_enabled = 2;</code>
     *
     * @return The reportingEnabled.
     */
    @java.lang.Override
    public boolean getReportingEnabled() {
      return reportingEnabled_;
    }
    /**
     *
     *
     * <pre>
     * Whether to send work progress updates to the service.
     * </pre>
     *
     * <code>bool reporting_enabled = 2;</code>
     *
     * @param value The reportingEnabled to set.
     * @return This builder for chaining.
     */
    public Builder setReportingEnabled(boolean value) {

      reportingEnabled_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether to send work progress updates to the service.
     * </pre>
     *
     * <code>bool reporting_enabled = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearReportingEnabled() {

      reportingEnabled_ = false;
      onChanged();
      return this;
    }

    private java.lang.Object servicePath_ = "";
    /**
     *
     *
     * <pre>
     * The Cloud Dataflow service path relative to the root URL, for example,
     * "dataflow/v1b3/projects".
     * </pre>
     *
     * <code>string service_path = 3;</code>
     *
     * @return The servicePath.
     */
    public java.lang.String getServicePath() {
      java.lang.Object ref = servicePath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        servicePath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Dataflow service path relative to the root URL, for example,
     * "dataflow/v1b3/projects".
     * </pre>
     *
     * <code>string service_path = 3;</code>
     *
     * @return The bytes for servicePath.
     */
    public com.google.protobuf.ByteString getServicePathBytes() {
      java.lang.Object ref = servicePath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        servicePath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Dataflow service path relative to the root URL, for example,
     * "dataflow/v1b3/projects".
     * </pre>
     *
     * <code>string service_path = 3;</code>
     *
     * @param value The servicePath to set.
     * @return This builder for chaining.
     */
    public Builder setServicePath(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      servicePath_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Dataflow service path relative to the root URL, for example,
     * "dataflow/v1b3/projects".
     * </pre>
     *
     * <code>string service_path = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServicePath() {

      servicePath_ = getDefaultInstance().getServicePath();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Dataflow service path relative to the root URL, for example,
     * "dataflow/v1b3/projects".
     * </pre>
     *
     * <code>string service_path = 3;</code>
     *
     * @param value The bytes for servicePath to set.
     * @return This builder for chaining.
     */
    public Builder setServicePathBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object shuffleServicePath_ = "";
    /**
     *
     *
     * <pre>
     * The Shuffle service path relative to the root URL, for example,
     * "shuffle/v1beta1".
     * </pre>
     *
     * <code>string shuffle_service_path = 4;</code>
     *
     * @return The shuffleServicePath.
     */
    public java.lang.String getShuffleServicePath() {
      java.lang.Object ref = shuffleServicePath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        shuffleServicePath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Shuffle service path relative to the root URL, for example,
     * "shuffle/v1beta1".
     * </pre>
     *
     * <code>string shuffle_service_path = 4;</code>
     *
     * @return The bytes for shuffleServicePath.
     */
    public com.google.protobuf.ByteString getShuffleServicePathBytes() {
      java.lang.Object ref = shuffleServicePath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        shuffleServicePath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Shuffle service path relative to the root URL, for example,
     * "shuffle/v1beta1".
     * </pre>
     *
     * <code>string shuffle_service_path = 4;</code>
     *
     * @param value The shuffleServicePath to set.
     * @return This builder for chaining.
     */
    public Builder setShuffleServicePath(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      shuffleServicePath_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Shuffle service path relative to the root URL, for example,
     * "shuffle/v1beta1".
     * </pre>
     *
     * <code>string shuffle_service_path = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearShuffleServicePath() {

      shuffleServicePath_ = getDefaultInstance().getShuffleServicePath();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Shuffle service path relative to the root URL, for example,
     * "shuffle/v1beta1".
     * </pre>
     *
     * <code>string shuffle_service_path = 4;</code>
     *
     * @param value The bytes for shuffleServicePath to set.
     * @return This builder for chaining.
     */
    public Builder setShuffleServicePathBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object workerId_ = "";
    /**
     *
     *
     * <pre>
     * The ID of the worker running this pipeline.
     * </pre>
     *
     * <code>string worker_id = 5;</code>
     *
     * @return The workerId.
     */
    public java.lang.String getWorkerId() {
      java.lang.Object ref = workerId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        workerId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The ID of the worker running this pipeline.
     * </pre>
     *
     * <code>string worker_id = 5;</code>
     *
     * @return The bytes for workerId.
     */
    public com.google.protobuf.ByteString getWorkerIdBytes() {
      java.lang.Object ref = workerId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        workerId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The ID of the worker running this pipeline.
     * </pre>
     *
     * <code>string worker_id = 5;</code>
     *
     * @param value The workerId to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      workerId_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The ID of the worker running this pipeline.
     * </pre>
     *
     * <code>string worker_id = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWorkerId() {

      workerId_ = getDefaultInstance().getWorkerId();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The ID of the worker running this pipeline.
     * </pre>
     *
     * <code>string worker_id = 5;</code>
     *
     * @param value The bytes for workerId to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object tempStoragePrefix_ = "";
    /**
     *
     *
     * <pre>
     * The prefix of the resources the system should use for temporary
     * storage.
     * The supported resource type is:
     * Google Cloud Storage:
     *   storage.googleapis.com/{bucket}/{object}
     *   bucket.storage.googleapis.com/{object}
     * </pre>
     *
     * <code>string temp_storage_prefix = 6;</code>
     *
     * @return The tempStoragePrefix.
     */
    public java.lang.String getTempStoragePrefix() {
      java.lang.Object ref = tempStoragePrefix_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        tempStoragePrefix_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The prefix of the resources the system should use for temporary
     * storage.
     * The supported resource type is:
     * Google Cloud Storage:
     *   storage.googleapis.com/{bucket}/{object}
     *   bucket.storage.googleapis.com/{object}
     * </pre>
     *
     * <code>string temp_storage_prefix = 6;</code>
     *
     * @return The bytes for tempStoragePrefix.
     */
    public com.google.protobuf.ByteString getTempStoragePrefixBytes() {
      java.lang.Object ref = tempStoragePrefix_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        tempStoragePrefix_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The prefix of the resources the system should use for temporary
     * storage.
     * The supported resource type is:
     * Google Cloud Storage:
     *   storage.googleapis.com/{bucket}/{object}
     *   bucket.storage.googleapis.com/{object}
     * </pre>
     *
     * <code>string temp_storage_prefix = 6;</code>
     *
     * @param value The tempStoragePrefix to set.
     * @return This builder for chaining.
     */
    public Builder setTempStoragePrefix(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      tempStoragePrefix_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The prefix of the resources the system should use for temporary
     * storage.
     * The supported resource type is:
     * Google Cloud Storage:
     *   storage.googleapis.com/{bucket}/{object}
     *   bucket.storage.googleapis.com/{object}
     * </pre>
     *
     * <code>string temp_storage_prefix = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTempStoragePrefix() {

      tempStoragePrefix_ = getDefaultInstance().getTempStoragePrefix();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The prefix of the resources the system should use for temporary
     * storage.
     * The supported resource type is:
     * Google Cloud Storage:
     *   storage.googleapis.com/{bucket}/{object}
     *   bucket.storage.googleapis.com/{object}
     * </pre>
     *
     * <code>string temp_storage_prefix = 6;</code>
     *
     * @param value The bytes for tempStoragePrefix to set.
     * @return This builder for chaining.
     */
    public Builder setTempStoragePrefixBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      tempStoragePrefix_ = 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.WorkerSettings)
  }

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

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

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

  private static final com.google.protobuf.Parser<WorkerSettings> PARSER =
      new com.google.protobuf.AbstractParser<WorkerSettings>() {
        @java.lang.Override
        public WorkerSettings parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

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

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

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