/*
 * 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>
 * Describes one particular pool of Cloud Dataflow workers to be
 * instantiated by the Cloud Dataflow service in order to perform the
 * computations required by a job.  Note that a workflow job may use
 * multiple pools, in order to match the various computational
 * requirements of the various stages of the job.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.WorkerPool}
 */
public final class WorkerPool extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.WorkerPool)
    WorkerPoolOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use WorkerPool.newBuilder() to construct.
  private WorkerPool(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private WorkerPool() {
    kind_ = "";
    packages_ = java.util.Collections.emptyList();
    defaultPackageSet_ = 0;
    machineType_ = "";
    teardownPolicy_ = 0;
    diskType_ = "";
    diskSourceImage_ = "";
    zone_ = "";
    onHostMaintenance_ = "";
    dataDisks_ = java.util.Collections.emptyList();
    network_ = "";
    subnetwork_ = "";
    workerHarnessContainerImage_ = "";
    ipConfiguration_ = 0;
    sdkHarnessContainerImages_ = java.util.Collections.emptyList();
  }

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

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

  private WorkerPool(
      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();

              kind_ = s;
              break;
            }
          case 16:
            {
              numWorkers_ = input.readInt32();
              break;
            }
          case 26:
            {
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                packages_ = new java.util.ArrayList<com.google.dataflow.v1beta3.Package>();
                mutable_bitField0_ |= 0x00000001;
              }
              packages_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.Package.parser(), extensionRegistry));
              break;
            }
          case 32:
            {
              int rawValue = input.readEnum();

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

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

              teardownPolicy_ = rawValue;
              break;
            }
          case 56:
            {
              diskSizeGb_ = input.readInt32();
              break;
            }
          case 66:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

              zone_ = s;
              break;
            }
          case 82:
            {
              com.google.dataflow.v1beta3.TaskRunnerSettings.Builder subBuilder = null;
              if (taskrunnerSettings_ != null) {
                subBuilder = taskrunnerSettings_.toBuilder();
              }
              taskrunnerSettings_ =
                  input.readMessage(
                      com.google.dataflow.v1beta3.TaskRunnerSettings.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(taskrunnerSettings_);
                taskrunnerSettings_ = subBuilder.buildPartial();
              }

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

              onHostMaintenance_ = s;
              break;
            }
          case 98:
            {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                dataDisks_ = new java.util.ArrayList<com.google.dataflow.v1beta3.Disk>();
                mutable_bitField0_ |= 0x00000002;
              }
              dataDisks_.add(
                  input.readMessage(com.google.dataflow.v1beta3.Disk.parser(), extensionRegistry));
              break;
            }
          case 106:
            {
              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
                metadata_ =
                    com.google.protobuf.MapField.newMapField(
                        MetadataDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000004;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ =
                  input.readMessage(
                      MetadataDefaultEntryHolder.defaultEntry.getParserForType(),
                      extensionRegistry);
              metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue());
              break;
            }
          case 114:
            {
              com.google.dataflow.v1beta3.AutoscalingSettings.Builder subBuilder = null;
              if (autoscalingSettings_ != null) {
                subBuilder = autoscalingSettings_.toBuilder();
              }
              autoscalingSettings_ =
                  input.readMessage(
                      com.google.dataflow.v1beta3.AutoscalingSettings.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(autoscalingSettings_);
                autoscalingSettings_ = subBuilder.buildPartial();
              }

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

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

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

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

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

              subnetwork_ = s;
              break;
            }
          case 160:
            {
              numThreadsPerWorker_ = input.readInt32();
              break;
            }
          case 168:
            {
              int rawValue = input.readEnum();

              ipConfiguration_ = rawValue;
              break;
            }
          case 178:
            {
              if (!((mutable_bitField0_ & 0x00000008) != 0)) {
                sdkHarnessContainerImages_ =
                    new java.util.ArrayList<com.google.dataflow.v1beta3.SdkHarnessContainerImage>();
                mutable_bitField0_ |= 0x00000008;
              }
              sdkHarnessContainerImages_.add(
                  input.readMessage(
                      com.google.dataflow.v1beta3.SdkHarnessContainerImage.parser(),
                      extensionRegistry));
              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)) {
        packages_ = java.util.Collections.unmodifiableList(packages_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        dataDisks_ = java.util.Collections.unmodifiableList(dataDisks_);
      }
      if (((mutable_bitField0_ & 0x00000008) != 0)) {
        sdkHarnessContainerImages_ =
            java.util.Collections.unmodifiableList(sdkHarnessContainerImages_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

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

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 13:
        return internalGetMetadata();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

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

  public static final int KIND_FIELD_NUMBER = 1;
  private volatile java.lang.Object kind_;
  /**
   *
   *
   * <pre>
   * The kind of the worker pool; currently only `harness` and `shuffle`
   * are supported.
   * </pre>
   *
   * <code>string kind = 1;</code>
   *
   * @return The kind.
   */
  @java.lang.Override
  public java.lang.String getKind() {
    java.lang.Object ref = kind_;
    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();
      kind_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The kind of the worker pool; currently only `harness` and `shuffle`
   * are supported.
   * </pre>
   *
   * <code>string kind = 1;</code>
   *
   * @return The bytes for kind.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getKindBytes() {
    java.lang.Object ref = kind_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      kind_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NUM_WORKERS_FIELD_NUMBER = 2;
  private int numWorkers_;
  /**
   *
   *
   * <pre>
   * Number of Google Compute Engine workers in this pool needed to
   * execute the job.  If zero or unspecified, the service will
   * attempt to choose a reasonable default.
   * </pre>
   *
   * <code>int32 num_workers = 2;</code>
   *
   * @return The numWorkers.
   */
  @java.lang.Override
  public int getNumWorkers() {
    return numWorkers_;
  }

  public static final int PACKAGES_FIELD_NUMBER = 3;
  private java.util.List<com.google.dataflow.v1beta3.Package> packages_;
  /**
   *
   *
   * <pre>
   * Packages to be installed on workers.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.Package> getPackagesList() {
    return packages_;
  }
  /**
   *
   *
   * <pre>
   * Packages to be installed on workers.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.PackageOrBuilder>
      getPackagesOrBuilderList() {
    return packages_;
  }
  /**
   *
   *
   * <pre>
   * Packages to be installed on workers.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
   */
  @java.lang.Override
  public int getPackagesCount() {
    return packages_.size();
  }
  /**
   *
   *
   * <pre>
   * Packages to be installed on workers.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.Package getPackages(int index) {
    return packages_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Packages to be installed on workers.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.PackageOrBuilder getPackagesOrBuilder(int index) {
    return packages_.get(index);
  }

  public static final int DEFAULT_PACKAGE_SET_FIELD_NUMBER = 4;
  private int defaultPackageSet_;
  /**
   *
   *
   * <pre>
   * The default package set to install.  This allows the service to
   * select a default set of packages which are useful to worker
   * harnesses written in a particular language.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
   *
   * @return The enum numeric value on the wire for defaultPackageSet.
   */
  @java.lang.Override
  public int getDefaultPackageSetValue() {
    return defaultPackageSet_;
  }
  /**
   *
   *
   * <pre>
   * The default package set to install.  This allows the service to
   * select a default set of packages which are useful to worker
   * harnesses written in a particular language.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
   *
   * @return The defaultPackageSet.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.DefaultPackageSet getDefaultPackageSet() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.DefaultPackageSet result =
        com.google.dataflow.v1beta3.DefaultPackageSet.valueOf(defaultPackageSet_);
    return result == null ? com.google.dataflow.v1beta3.DefaultPackageSet.UNRECOGNIZED : result;
  }

  public static final int MACHINE_TYPE_FIELD_NUMBER = 5;
  private volatile java.lang.Object machineType_;
  /**
   *
   *
   * <pre>
   * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
   * service will attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string machine_type = 5;</code>
   *
   * @return The machineType.
   */
  @java.lang.Override
  public java.lang.String getMachineType() {
    java.lang.Object ref = machineType_;
    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();
      machineType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
   * service will attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string machine_type = 5;</code>
   *
   * @return The bytes for machineType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getMachineTypeBytes() {
    java.lang.Object ref = machineType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      machineType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEARDOWN_POLICY_FIELD_NUMBER = 6;
  private int teardownPolicy_;
  /**
   *
   *
   * <pre>
   * Sets the policy for determining when to turndown worker pool.
   * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
   * `TEARDOWN_NEVER`.
   * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
   * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
   * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
   * down.
   * If the workers are not torn down by the service, they will
   * continue to run and use Google Compute Engine VM resources in the
   * user's project until they are explicitly terminated by the user.
   * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
   * policy except for small, manually supervised test jobs.
   * If unknown or unspecified, the service will attempt to choose a reasonable
   * default.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
   *
   * @return The enum numeric value on the wire for teardownPolicy.
   */
  @java.lang.Override
  public int getTeardownPolicyValue() {
    return teardownPolicy_;
  }
  /**
   *
   *
   * <pre>
   * Sets the policy for determining when to turndown worker pool.
   * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
   * `TEARDOWN_NEVER`.
   * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
   * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
   * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
   * down.
   * If the workers are not torn down by the service, they will
   * continue to run and use Google Compute Engine VM resources in the
   * user's project until they are explicitly terminated by the user.
   * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
   * policy except for small, manually supervised test jobs.
   * If unknown or unspecified, the service will attempt to choose a reasonable
   * default.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
   *
   * @return The teardownPolicy.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.TeardownPolicy getTeardownPolicy() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.TeardownPolicy result =
        com.google.dataflow.v1beta3.TeardownPolicy.valueOf(teardownPolicy_);
    return result == null ? com.google.dataflow.v1beta3.TeardownPolicy.UNRECOGNIZED : result;
  }

  public static final int DISK_SIZE_GB_FIELD_NUMBER = 7;
  private int diskSizeGb_;
  /**
   *
   *
   * <pre>
   * Size of root disk for VMs, in GB.  If zero or unspecified, the service will
   * attempt to choose a reasonable default.
   * </pre>
   *
   * <code>int32 disk_size_gb = 7;</code>
   *
   * @return The diskSizeGb.
   */
  @java.lang.Override
  public int getDiskSizeGb() {
    return diskSizeGb_;
  }

  public static final int DISK_TYPE_FIELD_NUMBER = 16;
  private volatile java.lang.Object diskType_;
  /**
   *
   *
   * <pre>
   * Type of root disk for VMs.  If empty or unspecified, the service will
   * attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string disk_type = 16;</code>
   *
   * @return The diskType.
   */
  @java.lang.Override
  public java.lang.String getDiskType() {
    java.lang.Object ref = diskType_;
    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();
      diskType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Type of root disk for VMs.  If empty or unspecified, the service will
   * attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string disk_type = 16;</code>
   *
   * @return The bytes for diskType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDiskTypeBytes() {
    java.lang.Object ref = diskType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      diskType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISK_SOURCE_IMAGE_FIELD_NUMBER = 8;
  private volatile java.lang.Object diskSourceImage_;
  /**
   *
   *
   * <pre>
   * Fully qualified source image for disks.
   * </pre>
   *
   * <code>string disk_source_image = 8;</code>
   *
   * @return The diskSourceImage.
   */
  @java.lang.Override
  public java.lang.String getDiskSourceImage() {
    java.lang.Object ref = diskSourceImage_;
    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();
      diskSourceImage_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Fully qualified source image for disks.
   * </pre>
   *
   * <code>string disk_source_image = 8;</code>
   *
   * @return The bytes for diskSourceImage.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDiskSourceImageBytes() {
    java.lang.Object ref = diskSourceImage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      diskSourceImage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ZONE_FIELD_NUMBER = 9;
  private volatile java.lang.Object zone_;
  /**
   *
   *
   * <pre>
   * Zone to run the worker pools in.  If empty or unspecified, the service
   * will attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string zone = 9;</code>
   *
   * @return The zone.
   */
  @java.lang.Override
  public java.lang.String getZone() {
    java.lang.Object ref = zone_;
    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();
      zone_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Zone to run the worker pools in.  If empty or unspecified, the service
   * will attempt to choose a reasonable default.
   * </pre>
   *
   * <code>string zone = 9;</code>
   *
   * @return The bytes for zone.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getZoneBytes() {
    java.lang.Object ref = zone_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      zone_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TASKRUNNER_SETTINGS_FIELD_NUMBER = 10;
  private com.google.dataflow.v1beta3.TaskRunnerSettings taskrunnerSettings_;
  /**
   *
   *
   * <pre>
   * Settings passed through to Google Compute Engine workers when
   * using the standard Dataflow task runner.  Users should ignore
   * this field.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
   *
   * @return Whether the taskrunnerSettings field is set.
   */
  @java.lang.Override
  public boolean hasTaskrunnerSettings() {
    return taskrunnerSettings_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings passed through to Google Compute Engine workers when
   * using the standard Dataflow task runner.  Users should ignore
   * this field.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
   *
   * @return The taskrunnerSettings.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.TaskRunnerSettings getTaskrunnerSettings() {
    return taskrunnerSettings_ == null
        ? com.google.dataflow.v1beta3.TaskRunnerSettings.getDefaultInstance()
        : taskrunnerSettings_;
  }
  /**
   *
   *
   * <pre>
   * Settings passed through to Google Compute Engine workers when
   * using the standard Dataflow task runner.  Users should ignore
   * this field.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.TaskRunnerSettingsOrBuilder getTaskrunnerSettingsOrBuilder() {
    return getTaskrunnerSettings();
  }

  public static final int ON_HOST_MAINTENANCE_FIELD_NUMBER = 11;
  private volatile java.lang.Object onHostMaintenance_;
  /**
   *
   *
   * <pre>
   * The action to take on host maintenance, as defined by the Google
   * Compute Engine API.
   * </pre>
   *
   * <code>string on_host_maintenance = 11;</code>
   *
   * @return The onHostMaintenance.
   */
  @java.lang.Override
  public java.lang.String getOnHostMaintenance() {
    java.lang.Object ref = onHostMaintenance_;
    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();
      onHostMaintenance_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The action to take on host maintenance, as defined by the Google
   * Compute Engine API.
   * </pre>
   *
   * <code>string on_host_maintenance = 11;</code>
   *
   * @return The bytes for onHostMaintenance.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getOnHostMaintenanceBytes() {
    java.lang.Object ref = onHostMaintenance_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      onHostMaintenance_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_DISKS_FIELD_NUMBER = 12;
  private java.util.List<com.google.dataflow.v1beta3.Disk> dataDisks_;
  /**
   *
   *
   * <pre>
   * Data disks that are used by a VM in this workflow.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.Disk> getDataDisksList() {
    return dataDisks_;
  }
  /**
   *
   *
   * <pre>
   * Data disks that are used by a VM in this workflow.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.DiskOrBuilder>
      getDataDisksOrBuilderList() {
    return dataDisks_;
  }
  /**
   *
   *
   * <pre>
   * Data disks that are used by a VM in this workflow.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
   */
  @java.lang.Override
  public int getDataDisksCount() {
    return dataDisks_.size();
  }
  /**
   *
   *
   * <pre>
   * Data disks that are used by a VM in this workflow.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.Disk getDataDisks(int index) {
    return dataDisks_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Data disks that are used by a VM in this workflow.
   * </pre>
   *
   * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.DiskOrBuilder getDataDisksOrBuilder(int index) {
    return dataDisks_.get(index);
  }

  public static final int METADATA_FIELD_NUMBER = 13;

  private static final class MetadataDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.dataflow.v1beta3.EnvironmentProto
                .internal_static_google_dataflow_v1beta3_WorkerPool_MetadataEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() {
    if (metadata_ == null) {
      return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
    }
    return metadata_;
  }

  public int getMetadataCount() {
    return internalGetMetadata().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Metadata to set on the Google Compute Engine VMs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 13;</code>
   */
  @java.lang.Override
  public boolean containsMetadata(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetMetadata().getMap().containsKey(key);
  }
  /** Use {@link #getMetadataMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getMetadata() {
    return getMetadataMap();
  }
  /**
   *
   *
   * <pre>
   * Metadata to set on the Google Compute Engine VMs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 13;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
    return internalGetMetadata().getMap();
  }
  /**
   *
   *
   * <pre>
   * Metadata to set on the Google Compute Engine VMs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 13;</code>
   */
  @java.lang.Override
  public java.lang.String getMetadataOrDefault(
      java.lang.String key, java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Metadata to set on the Google Compute Engine VMs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; metadata = 13;</code>
   */
  @java.lang.Override
  public java.lang.String getMetadataOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int AUTOSCALING_SETTINGS_FIELD_NUMBER = 14;
  private com.google.dataflow.v1beta3.AutoscalingSettings autoscalingSettings_;
  /**
   *
   *
   * <pre>
   * Settings for autoscaling of this WorkerPool.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
   *
   * @return Whether the autoscalingSettings field is set.
   */
  @java.lang.Override
  public boolean hasAutoscalingSettings() {
    return autoscalingSettings_ != null;
  }
  /**
   *
   *
   * <pre>
   * Settings for autoscaling of this WorkerPool.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
   *
   * @return The autoscalingSettings.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.AutoscalingSettings getAutoscalingSettings() {
    return autoscalingSettings_ == null
        ? com.google.dataflow.v1beta3.AutoscalingSettings.getDefaultInstance()
        : autoscalingSettings_;
  }
  /**
   *
   *
   * <pre>
   * Settings for autoscaling of this WorkerPool.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.AutoscalingSettingsOrBuilder
      getAutoscalingSettingsOrBuilder() {
    return getAutoscalingSettings();
  }

  public static final int POOL_ARGS_FIELD_NUMBER = 15;
  private com.google.protobuf.Any poolArgs_;
  /**
   *
   *
   * <pre>
   * Extra arguments for this worker pool.
   * </pre>
   *
   * <code>.google.protobuf.Any pool_args = 15;</code>
   *
   * @return Whether the poolArgs field is set.
   */
  @java.lang.Override
  public boolean hasPoolArgs() {
    return poolArgs_ != null;
  }
  /**
   *
   *
   * <pre>
   * Extra arguments for this worker pool.
   * </pre>
   *
   * <code>.google.protobuf.Any pool_args = 15;</code>
   *
   * @return The poolArgs.
   */
  @java.lang.Override
  public com.google.protobuf.Any getPoolArgs() {
    return poolArgs_ == null ? com.google.protobuf.Any.getDefaultInstance() : poolArgs_;
  }
  /**
   *
   *
   * <pre>
   * Extra arguments for this worker pool.
   * </pre>
   *
   * <code>.google.protobuf.Any pool_args = 15;</code>
   */
  @java.lang.Override
  public com.google.protobuf.AnyOrBuilder getPoolArgsOrBuilder() {
    return getPoolArgs();
  }

  public static final int NETWORK_FIELD_NUMBER = 17;
  private volatile java.lang.Object network_;
  /**
   *
   *
   * <pre>
   * Network to which VMs will be assigned.  If empty or unspecified,
   * the service will use the network "default".
   * </pre>
   *
   * <code>string network = 17;</code>
   *
   * @return The network.
   */
  @java.lang.Override
  public java.lang.String getNetwork() {
    java.lang.Object ref = network_;
    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();
      network_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Network to which VMs will be assigned.  If empty or unspecified,
   * the service will use the network "default".
   * </pre>
   *
   * <code>string network = 17;</code>
   *
   * @return The bytes for network.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNetworkBytes() {
    java.lang.Object ref = network_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      network_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SUBNETWORK_FIELD_NUMBER = 19;
  private volatile java.lang.Object subnetwork_;
  /**
   *
   *
   * <pre>
   * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
   * the form "regions/REGION/subnetworks/SUBNETWORK".
   * </pre>
   *
   * <code>string subnetwork = 19;</code>
   *
   * @return The subnetwork.
   */
  @java.lang.Override
  public java.lang.String getSubnetwork() {
    java.lang.Object ref = subnetwork_;
    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();
      subnetwork_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
   * the form "regions/REGION/subnetworks/SUBNETWORK".
   * </pre>
   *
   * <code>string subnetwork = 19;</code>
   *
   * @return The bytes for subnetwork.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSubnetworkBytes() {
    java.lang.Object ref = subnetwork_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      subnetwork_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int WORKER_HARNESS_CONTAINER_IMAGE_FIELD_NUMBER = 18;
  private volatile java.lang.Object workerHarnessContainerImage_;
  /**
   *
   *
   * <pre>
   * Required. Docker container image that executes the Cloud Dataflow worker
   * harness, residing in Google Container Registry.
   * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
   * </pre>
   *
   * <code>string worker_harness_container_image = 18;</code>
   *
   * @return The workerHarnessContainerImage.
   */
  @java.lang.Override
  public java.lang.String getWorkerHarnessContainerImage() {
    java.lang.Object ref = workerHarnessContainerImage_;
    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();
      workerHarnessContainerImage_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Required. Docker container image that executes the Cloud Dataflow worker
   * harness, residing in Google Container Registry.
   * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
   * </pre>
   *
   * <code>string worker_harness_container_image = 18;</code>
   *
   * @return The bytes for workerHarnessContainerImage.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWorkerHarnessContainerImageBytes() {
    java.lang.Object ref = workerHarnessContainerImage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      workerHarnessContainerImage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NUM_THREADS_PER_WORKER_FIELD_NUMBER = 20;
  private int numThreadsPerWorker_;
  /**
   *
   *
   * <pre>
   * The number of threads per worker harness. If empty or unspecified, the
   * service will choose a number of threads (according to the number of cores
   * on the selected machine type for batch, or 1 by convention for streaming).
   * </pre>
   *
   * <code>int32 num_threads_per_worker = 20;</code>
   *
   * @return The numThreadsPerWorker.
   */
  @java.lang.Override
  public int getNumThreadsPerWorker() {
    return numThreadsPerWorker_;
  }

  public static final int IP_CONFIGURATION_FIELD_NUMBER = 21;
  private int ipConfiguration_;
  /**
   *
   *
   * <pre>
   * Configuration for VM IPs.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
   *
   * @return The enum numeric value on the wire for ipConfiguration.
   */
  @java.lang.Override
  public int getIpConfigurationValue() {
    return ipConfiguration_;
  }
  /**
   *
   *
   * <pre>
   * Configuration for VM IPs.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
   *
   * @return The ipConfiguration.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.WorkerIPAddressConfiguration getIpConfiguration() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.WorkerIPAddressConfiguration result =
        com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.valueOf(ipConfiguration_);
    return result == null
        ? com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.UNRECOGNIZED
        : result;
  }

  public static final int SDK_HARNESS_CONTAINER_IMAGES_FIELD_NUMBER = 22;
  private java.util.List<com.google.dataflow.v1beta3.SdkHarnessContainerImage>
      sdkHarnessContainerImages_;
  /**
   *
   *
   * <pre>
   * Set of SDK harness containers needed to execute this pipeline. This will
   * only be set in the Fn API path. For non-cross-language pipelines this
   * should have only one entry. Cross-language pipelines will have two or more
   * entries.
   * </pre>
   *
   * <code>
   * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.dataflow.v1beta3.SdkHarnessContainerImage>
      getSdkHarnessContainerImagesList() {
    return sdkHarnessContainerImages_;
  }
  /**
   *
   *
   * <pre>
   * Set of SDK harness containers needed to execute this pipeline. This will
   * only be set in the Fn API path. For non-cross-language pipelines this
   * should have only one entry. Cross-language pipelines will have two or more
   * entries.
   * </pre>
   *
   * <code>
   * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
   * </code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder>
      getSdkHarnessContainerImagesOrBuilderList() {
    return sdkHarnessContainerImages_;
  }
  /**
   *
   *
   * <pre>
   * Set of SDK harness containers needed to execute this pipeline. This will
   * only be set in the Fn API path. For non-cross-language pipelines this
   * should have only one entry. Cross-language pipelines will have two or more
   * entries.
   * </pre>
   *
   * <code>
   * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
   * </code>
   */
  @java.lang.Override
  public int getSdkHarnessContainerImagesCount() {
    return sdkHarnessContainerImages_.size();
  }
  /**
   *
   *
   * <pre>
   * Set of SDK harness containers needed to execute this pipeline. This will
   * only be set in the Fn API path. For non-cross-language pipelines this
   * should have only one entry. Cross-language pipelines will have two or more
   * entries.
   * </pre>
   *
   * <code>
   * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
   * </code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.SdkHarnessContainerImage getSdkHarnessContainerImages(
      int index) {
    return sdkHarnessContainerImages_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Set of SDK harness containers needed to execute this pipeline. This will
   * only be set in the Fn API path. For non-cross-language pipelines this
   * should have only one entry. Cross-language pipelines will have two or more
   * entries.
   * </pre>
   *
   * <code>
   * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
   * </code>
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder
      getSdkHarnessContainerImagesOrBuilder(int index) {
    return sdkHarnessContainerImages_.get(index);
  }

  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(kind_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kind_);
    }
    if (numWorkers_ != 0) {
      output.writeInt32(2, numWorkers_);
    }
    for (int i = 0; i < packages_.size(); i++) {
      output.writeMessage(3, packages_.get(i));
    }
    if (defaultPackageSet_
        != com.google.dataflow.v1beta3.DefaultPackageSet.DEFAULT_PACKAGE_SET_UNKNOWN.getNumber()) {
      output.writeEnum(4, defaultPackageSet_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, machineType_);
    }
    if (teardownPolicy_
        != com.google.dataflow.v1beta3.TeardownPolicy.TEARDOWN_POLICY_UNKNOWN.getNumber()) {
      output.writeEnum(6, teardownPolicy_);
    }
    if (diskSizeGb_ != 0) {
      output.writeInt32(7, diskSizeGb_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskSourceImage_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, diskSourceImage_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, zone_);
    }
    if (taskrunnerSettings_ != null) {
      output.writeMessage(10, getTaskrunnerSettings());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(onHostMaintenance_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, onHostMaintenance_);
    }
    for (int i = 0; i < dataDisks_.size(); i++) {
      output.writeMessage(12, dataDisks_.get(i));
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 13);
    if (autoscalingSettings_ != null) {
      output.writeMessage(14, getAutoscalingSettings());
    }
    if (poolArgs_ != null) {
      output.writeMessage(15, getPoolArgs());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, diskType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerHarnessContainerImage_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, workerHarnessContainerImage_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, subnetwork_);
    }
    if (numThreadsPerWorker_ != 0) {
      output.writeInt32(20, numThreadsPerWorker_);
    }
    if (ipConfiguration_
        != com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.WORKER_IP_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(21, ipConfiguration_);
    }
    for (int i = 0; i < sdkHarnessContainerImages_.size(); i++) {
      output.writeMessage(22, sdkHarnessContainerImages_.get(i));
    }
    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(kind_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kind_);
    }
    if (numWorkers_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, numWorkers_);
    }
    for (int i = 0; i < packages_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, packages_.get(i));
    }
    if (defaultPackageSet_
        != com.google.dataflow.v1beta3.DefaultPackageSet.DEFAULT_PACKAGE_SET_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, defaultPackageSet_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, machineType_);
    }
    if (teardownPolicy_
        != com.google.dataflow.v1beta3.TeardownPolicy.TEARDOWN_POLICY_UNKNOWN.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, teardownPolicy_);
    }
    if (diskSizeGb_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, diskSizeGb_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskSourceImage_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, diskSourceImage_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, zone_);
    }
    if (taskrunnerSettings_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTaskrunnerSettings());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(onHostMaintenance_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, onHostMaintenance_);
    }
    for (int i = 0; i < dataDisks_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, dataDisks_.get(i));
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetMetadata().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ =
          MetadataDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, metadata__);
    }
    if (autoscalingSettings_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAutoscalingSettings());
    }
    if (poolArgs_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getPoolArgs());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diskType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, diskType_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerHarnessContainerImage_)) {
      size +=
          com.google.protobuf.GeneratedMessageV3.computeStringSize(
              18, workerHarnessContainerImage_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, subnetwork_);
    }
    if (numThreadsPerWorker_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(20, numThreadsPerWorker_);
    }
    if (ipConfiguration_
        != com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.WORKER_IP_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, ipConfiguration_);
    }
    for (int i = 0; i < sdkHarnessContainerImages_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              22, sdkHarnessContainerImages_.get(i));
    }
    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.WorkerPool)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.WorkerPool other = (com.google.dataflow.v1beta3.WorkerPool) obj;

    if (!getKind().equals(other.getKind())) return false;
    if (getNumWorkers() != other.getNumWorkers()) return false;
    if (!getPackagesList().equals(other.getPackagesList())) return false;
    if (defaultPackageSet_ != other.defaultPackageSet_) return false;
    if (!getMachineType().equals(other.getMachineType())) return false;
    if (teardownPolicy_ != other.teardownPolicy_) return false;
    if (getDiskSizeGb() != other.getDiskSizeGb()) return false;
    if (!getDiskType().equals(other.getDiskType())) return false;
    if (!getDiskSourceImage().equals(other.getDiskSourceImage())) return false;
    if (!getZone().equals(other.getZone())) return false;
    if (hasTaskrunnerSettings() != other.hasTaskrunnerSettings()) return false;
    if (hasTaskrunnerSettings()) {
      if (!getTaskrunnerSettings().equals(other.getTaskrunnerSettings())) return false;
    }
    if (!getOnHostMaintenance().equals(other.getOnHostMaintenance())) return false;
    if (!getDataDisksList().equals(other.getDataDisksList())) return false;
    if (!internalGetMetadata().equals(other.internalGetMetadata())) return false;
    if (hasAutoscalingSettings() != other.hasAutoscalingSettings()) return false;
    if (hasAutoscalingSettings()) {
      if (!getAutoscalingSettings().equals(other.getAutoscalingSettings())) return false;
    }
    if (hasPoolArgs() != other.hasPoolArgs()) return false;
    if (hasPoolArgs()) {
      if (!getPoolArgs().equals(other.getPoolArgs())) return false;
    }
    if (!getNetwork().equals(other.getNetwork())) return false;
    if (!getSubnetwork().equals(other.getSubnetwork())) return false;
    if (!getWorkerHarnessContainerImage().equals(other.getWorkerHarnessContainerImage()))
      return false;
    if (getNumThreadsPerWorker() != other.getNumThreadsPerWorker()) return false;
    if (ipConfiguration_ != other.ipConfiguration_) return false;
    if (!getSdkHarnessContainerImagesList().equals(other.getSdkHarnessContainerImagesList()))
      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) + KIND_FIELD_NUMBER;
    hash = (53 * hash) + getKind().hashCode();
    hash = (37 * hash) + NUM_WORKERS_FIELD_NUMBER;
    hash = (53 * hash) + getNumWorkers();
    if (getPackagesCount() > 0) {
      hash = (37 * hash) + PACKAGES_FIELD_NUMBER;
      hash = (53 * hash) + getPackagesList().hashCode();
    }
    hash = (37 * hash) + DEFAULT_PACKAGE_SET_FIELD_NUMBER;
    hash = (53 * hash) + defaultPackageSet_;
    hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMachineType().hashCode();
    hash = (37 * hash) + TEARDOWN_POLICY_FIELD_NUMBER;
    hash = (53 * hash) + teardownPolicy_;
    hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER;
    hash = (53 * hash) + getDiskSizeGb();
    hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getDiskType().hashCode();
    hash = (37 * hash) + DISK_SOURCE_IMAGE_FIELD_NUMBER;
    hash = (53 * hash) + getDiskSourceImage().hashCode();
    hash = (37 * hash) + ZONE_FIELD_NUMBER;
    hash = (53 * hash) + getZone().hashCode();
    if (hasTaskrunnerSettings()) {
      hash = (37 * hash) + TASKRUNNER_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + getTaskrunnerSettings().hashCode();
    }
    hash = (37 * hash) + ON_HOST_MAINTENANCE_FIELD_NUMBER;
    hash = (53 * hash) + getOnHostMaintenance().hashCode();
    if (getDataDisksCount() > 0) {
      hash = (37 * hash) + DATA_DISKS_FIELD_NUMBER;
      hash = (53 * hash) + getDataDisksList().hashCode();
    }
    if (!internalGetMetadata().getMap().isEmpty()) {
      hash = (37 * hash) + METADATA_FIELD_NUMBER;
      hash = (53 * hash) + internalGetMetadata().hashCode();
    }
    if (hasAutoscalingSettings()) {
      hash = (37 * hash) + AUTOSCALING_SETTINGS_FIELD_NUMBER;
      hash = (53 * hash) + getAutoscalingSettings().hashCode();
    }
    if (hasPoolArgs()) {
      hash = (37 * hash) + POOL_ARGS_FIELD_NUMBER;
      hash = (53 * hash) + getPoolArgs().hashCode();
    }
    hash = (37 * hash) + NETWORK_FIELD_NUMBER;
    hash = (53 * hash) + getNetwork().hashCode();
    hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
    hash = (53 * hash) + getSubnetwork().hashCode();
    hash = (37 * hash) + WORKER_HARNESS_CONTAINER_IMAGE_FIELD_NUMBER;
    hash = (53 * hash) + getWorkerHarnessContainerImage().hashCode();
    hash = (37 * hash) + NUM_THREADS_PER_WORKER_FIELD_NUMBER;
    hash = (53 * hash) + getNumThreadsPerWorker();
    hash = (37 * hash) + IP_CONFIGURATION_FIELD_NUMBER;
    hash = (53 * hash) + ipConfiguration_;
    if (getSdkHarnessContainerImagesCount() > 0) {
      hash = (37 * hash) + SDK_HARNESS_CONTAINER_IMAGES_FIELD_NUMBER;
      hash = (53 * hash) + getSdkHarnessContainerImagesList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.WorkerPool 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.WorkerPool 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>
   * Describes one particular pool of Cloud Dataflow workers to be
   * instantiated by the Cloud Dataflow service in order to perform the
   * computations required by a job.  Note that a workflow job may use
   * multiple pools, in order to match the various computational
   * requirements of the various stages of the job.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.WorkerPool}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.WorkerPool)
      com.google.dataflow.v1beta3.WorkerPoolOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.EnvironmentProto
          .internal_static_google_dataflow_v1beta3_WorkerPool_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 13:
          return internalGetMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 13:
          return internalGetMutableMetadata();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

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

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

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

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getPackagesFieldBuilder();
        getDataDisksFieldBuilder();
        getSdkHarnessContainerImagesFieldBuilder();
      }
    }

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

      numWorkers_ = 0;

      if (packagesBuilder_ == null) {
        packages_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        packagesBuilder_.clear();
      }
      defaultPackageSet_ = 0;

      machineType_ = "";

      teardownPolicy_ = 0;

      diskSizeGb_ = 0;

      diskType_ = "";

      diskSourceImage_ = "";

      zone_ = "";

      if (taskrunnerSettingsBuilder_ == null) {
        taskrunnerSettings_ = null;
      } else {
        taskrunnerSettings_ = null;
        taskrunnerSettingsBuilder_ = null;
      }
      onHostMaintenance_ = "";

      if (dataDisksBuilder_ == null) {
        dataDisks_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        dataDisksBuilder_.clear();
      }
      internalGetMutableMetadata().clear();
      if (autoscalingSettingsBuilder_ == null) {
        autoscalingSettings_ = null;
      } else {
        autoscalingSettings_ = null;
        autoscalingSettingsBuilder_ = null;
      }
      if (poolArgsBuilder_ == null) {
        poolArgs_ = null;
      } else {
        poolArgs_ = null;
        poolArgsBuilder_ = null;
      }
      network_ = "";

      subnetwork_ = "";

      workerHarnessContainerImage_ = "";

      numThreadsPerWorker_ = 0;

      ipConfiguration_ = 0;

      if (sdkHarnessContainerImagesBuilder_ == null) {
        sdkHarnessContainerImages_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
      } else {
        sdkHarnessContainerImagesBuilder_.clear();
      }
      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.WorkerPool buildPartial() {
      com.google.dataflow.v1beta3.WorkerPool result =
          new com.google.dataflow.v1beta3.WorkerPool(this);
      int from_bitField0_ = bitField0_;
      result.kind_ = kind_;
      result.numWorkers_ = numWorkers_;
      if (packagesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          packages_ = java.util.Collections.unmodifiableList(packages_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.packages_ = packages_;
      } else {
        result.packages_ = packagesBuilder_.build();
      }
      result.defaultPackageSet_ = defaultPackageSet_;
      result.machineType_ = machineType_;
      result.teardownPolicy_ = teardownPolicy_;
      result.diskSizeGb_ = diskSizeGb_;
      result.diskType_ = diskType_;
      result.diskSourceImage_ = diskSourceImage_;
      result.zone_ = zone_;
      if (taskrunnerSettingsBuilder_ == null) {
        result.taskrunnerSettings_ = taskrunnerSettings_;
      } else {
        result.taskrunnerSettings_ = taskrunnerSettingsBuilder_.build();
      }
      result.onHostMaintenance_ = onHostMaintenance_;
      if (dataDisksBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          dataDisks_ = java.util.Collections.unmodifiableList(dataDisks_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.dataDisks_ = dataDisks_;
      } else {
        result.dataDisks_ = dataDisksBuilder_.build();
      }
      result.metadata_ = internalGetMetadata();
      result.metadata_.makeImmutable();
      if (autoscalingSettingsBuilder_ == null) {
        result.autoscalingSettings_ = autoscalingSettings_;
      } else {
        result.autoscalingSettings_ = autoscalingSettingsBuilder_.build();
      }
      if (poolArgsBuilder_ == null) {
        result.poolArgs_ = poolArgs_;
      } else {
        result.poolArgs_ = poolArgsBuilder_.build();
      }
      result.network_ = network_;
      result.subnetwork_ = subnetwork_;
      result.workerHarnessContainerImage_ = workerHarnessContainerImage_;
      result.numThreadsPerWorker_ = numThreadsPerWorker_;
      result.ipConfiguration_ = ipConfiguration_;
      if (sdkHarnessContainerImagesBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          sdkHarnessContainerImages_ =
              java.util.Collections.unmodifiableList(sdkHarnessContainerImages_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.sdkHarnessContainerImages_ = sdkHarnessContainerImages_;
      } else {
        result.sdkHarnessContainerImages_ = sdkHarnessContainerImagesBuilder_.build();
      }
      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.WorkerPool) {
        return mergeFrom((com.google.dataflow.v1beta3.WorkerPool) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.WorkerPool other) {
      if (other == com.google.dataflow.v1beta3.WorkerPool.getDefaultInstance()) return this;
      if (!other.getKind().isEmpty()) {
        kind_ = other.kind_;
        onChanged();
      }
      if (other.getNumWorkers() != 0) {
        setNumWorkers(other.getNumWorkers());
      }
      if (packagesBuilder_ == null) {
        if (!other.packages_.isEmpty()) {
          if (packages_.isEmpty()) {
            packages_ = other.packages_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensurePackagesIsMutable();
            packages_.addAll(other.packages_);
          }
          onChanged();
        }
      } else {
        if (!other.packages_.isEmpty()) {
          if (packagesBuilder_.isEmpty()) {
            packagesBuilder_.dispose();
            packagesBuilder_ = null;
            packages_ = other.packages_;
            bitField0_ = (bitField0_ & ~0x00000001);
            packagesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getPackagesFieldBuilder()
                    : null;
          } else {
            packagesBuilder_.addAllMessages(other.packages_);
          }
        }
      }
      if (other.defaultPackageSet_ != 0) {
        setDefaultPackageSetValue(other.getDefaultPackageSetValue());
      }
      if (!other.getMachineType().isEmpty()) {
        machineType_ = other.machineType_;
        onChanged();
      }
      if (other.teardownPolicy_ != 0) {
        setTeardownPolicyValue(other.getTeardownPolicyValue());
      }
      if (other.getDiskSizeGb() != 0) {
        setDiskSizeGb(other.getDiskSizeGb());
      }
      if (!other.getDiskType().isEmpty()) {
        diskType_ = other.diskType_;
        onChanged();
      }
      if (!other.getDiskSourceImage().isEmpty()) {
        diskSourceImage_ = other.diskSourceImage_;
        onChanged();
      }
      if (!other.getZone().isEmpty()) {
        zone_ = other.zone_;
        onChanged();
      }
      if (other.hasTaskrunnerSettings()) {
        mergeTaskrunnerSettings(other.getTaskrunnerSettings());
      }
      if (!other.getOnHostMaintenance().isEmpty()) {
        onHostMaintenance_ = other.onHostMaintenance_;
        onChanged();
      }
      if (dataDisksBuilder_ == null) {
        if (!other.dataDisks_.isEmpty()) {
          if (dataDisks_.isEmpty()) {
            dataDisks_ = other.dataDisks_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureDataDisksIsMutable();
            dataDisks_.addAll(other.dataDisks_);
          }
          onChanged();
        }
      } else {
        if (!other.dataDisks_.isEmpty()) {
          if (dataDisksBuilder_.isEmpty()) {
            dataDisksBuilder_.dispose();
            dataDisksBuilder_ = null;
            dataDisks_ = other.dataDisks_;
            bitField0_ = (bitField0_ & ~0x00000002);
            dataDisksBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDataDisksFieldBuilder()
                    : null;
          } else {
            dataDisksBuilder_.addAllMessages(other.dataDisks_);
          }
        }
      }
      internalGetMutableMetadata().mergeFrom(other.internalGetMetadata());
      if (other.hasAutoscalingSettings()) {
        mergeAutoscalingSettings(other.getAutoscalingSettings());
      }
      if (other.hasPoolArgs()) {
        mergePoolArgs(other.getPoolArgs());
      }
      if (!other.getNetwork().isEmpty()) {
        network_ = other.network_;
        onChanged();
      }
      if (!other.getSubnetwork().isEmpty()) {
        subnetwork_ = other.subnetwork_;
        onChanged();
      }
      if (!other.getWorkerHarnessContainerImage().isEmpty()) {
        workerHarnessContainerImage_ = other.workerHarnessContainerImage_;
        onChanged();
      }
      if (other.getNumThreadsPerWorker() != 0) {
        setNumThreadsPerWorker(other.getNumThreadsPerWorker());
      }
      if (other.ipConfiguration_ != 0) {
        setIpConfigurationValue(other.getIpConfigurationValue());
      }
      if (sdkHarnessContainerImagesBuilder_ == null) {
        if (!other.sdkHarnessContainerImages_.isEmpty()) {
          if (sdkHarnessContainerImages_.isEmpty()) {
            sdkHarnessContainerImages_ = other.sdkHarnessContainerImages_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureSdkHarnessContainerImagesIsMutable();
            sdkHarnessContainerImages_.addAll(other.sdkHarnessContainerImages_);
          }
          onChanged();
        }
      } else {
        if (!other.sdkHarnessContainerImages_.isEmpty()) {
          if (sdkHarnessContainerImagesBuilder_.isEmpty()) {
            sdkHarnessContainerImagesBuilder_.dispose();
            sdkHarnessContainerImagesBuilder_ = null;
            sdkHarnessContainerImages_ = other.sdkHarnessContainerImages_;
            bitField0_ = (bitField0_ & ~0x00000008);
            sdkHarnessContainerImagesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getSdkHarnessContainerImagesFieldBuilder()
                    : null;
          } else {
            sdkHarnessContainerImagesBuilder_.addAllMessages(other.sdkHarnessContainerImages_);
          }
        }
      }
      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.WorkerPool parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.dataflow.v1beta3.WorkerPool) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object kind_ = "";
    /**
     *
     *
     * <pre>
     * The kind of the worker pool; currently only `harness` and `shuffle`
     * are supported.
     * </pre>
     *
     * <code>string kind = 1;</code>
     *
     * @return The kind.
     */
    public java.lang.String getKind() {
      java.lang.Object ref = kind_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        kind_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The kind of the worker pool; currently only `harness` and `shuffle`
     * are supported.
     * </pre>
     *
     * <code>string kind = 1;</code>
     *
     * @return The bytes for kind.
     */
    public com.google.protobuf.ByteString getKindBytes() {
      java.lang.Object ref = kind_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        kind_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The kind of the worker pool; currently only `harness` and `shuffle`
     * are supported.
     * </pre>
     *
     * <code>string kind = 1;</code>
     *
     * @param value The kind to set.
     * @return This builder for chaining.
     */
    public Builder setKind(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      kind_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The kind of the worker pool; currently only `harness` and `shuffle`
     * are supported.
     * </pre>
     *
     * <code>string kind = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearKind() {

      kind_ = getDefaultInstance().getKind();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The kind of the worker pool; currently only `harness` and `shuffle`
     * are supported.
     * </pre>
     *
     * <code>string kind = 1;</code>
     *
     * @param value The bytes for kind to set.
     * @return This builder for chaining.
     */
    public Builder setKindBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private int numWorkers_;
    /**
     *
     *
     * <pre>
     * Number of Google Compute Engine workers in this pool needed to
     * execute the job.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 num_workers = 2;</code>
     *
     * @return The numWorkers.
     */
    @java.lang.Override
    public int getNumWorkers() {
      return numWorkers_;
    }
    /**
     *
     *
     * <pre>
     * Number of Google Compute Engine workers in this pool needed to
     * execute the job.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 num_workers = 2;</code>
     *
     * @param value The numWorkers to set.
     * @return This builder for chaining.
     */
    public Builder setNumWorkers(int value) {

      numWorkers_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Number of Google Compute Engine workers in this pool needed to
     * execute the job.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 num_workers = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNumWorkers() {

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

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

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

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.Package,
            com.google.dataflow.v1beta3.Package.Builder,
            com.google.dataflow.v1beta3.PackageOrBuilder>
        packagesBuilder_;

    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.Package> getPackagesList() {
      if (packagesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(packages_);
      } else {
        return packagesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public int getPackagesCount() {
      if (packagesBuilder_ == null) {
        return packages_.size();
      } else {
        return packagesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public com.google.dataflow.v1beta3.Package getPackages(int index) {
      if (packagesBuilder_ == null) {
        return packages_.get(index);
      } else {
        return packagesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder setPackages(int index, com.google.dataflow.v1beta3.Package value) {
      if (packagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePackagesIsMutable();
        packages_.set(index, value);
        onChanged();
      } else {
        packagesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder setPackages(
        int index, com.google.dataflow.v1beta3.Package.Builder builderForValue) {
      if (packagesBuilder_ == null) {
        ensurePackagesIsMutable();
        packages_.set(index, builderForValue.build());
        onChanged();
      } else {
        packagesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder addPackages(com.google.dataflow.v1beta3.Package value) {
      if (packagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePackagesIsMutable();
        packages_.add(value);
        onChanged();
      } else {
        packagesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder addPackages(int index, com.google.dataflow.v1beta3.Package value) {
      if (packagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePackagesIsMutable();
        packages_.add(index, value);
        onChanged();
      } else {
        packagesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder addPackages(com.google.dataflow.v1beta3.Package.Builder builderForValue) {
      if (packagesBuilder_ == null) {
        ensurePackagesIsMutable();
        packages_.add(builderForValue.build());
        onChanged();
      } else {
        packagesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder addPackages(
        int index, com.google.dataflow.v1beta3.Package.Builder builderForValue) {
      if (packagesBuilder_ == null) {
        ensurePackagesIsMutable();
        packages_.add(index, builderForValue.build());
        onChanged();
      } else {
        packagesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder addAllPackages(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.Package> values) {
      if (packagesBuilder_ == null) {
        ensurePackagesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, packages_);
        onChanged();
      } else {
        packagesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder clearPackages() {
      if (packagesBuilder_ == null) {
        packages_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        packagesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public Builder removePackages(int index) {
      if (packagesBuilder_ == null) {
        ensurePackagesIsMutable();
        packages_.remove(index);
        onChanged();
      } else {
        packagesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public com.google.dataflow.v1beta3.Package.Builder getPackagesBuilder(int index) {
      return getPackagesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public com.google.dataflow.v1beta3.PackageOrBuilder getPackagesOrBuilder(int index) {
      if (packagesBuilder_ == null) {
        return packages_.get(index);
      } else {
        return packagesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.PackageOrBuilder>
        getPackagesOrBuilderList() {
      if (packagesBuilder_ != null) {
        return packagesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(packages_);
      }
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public com.google.dataflow.v1beta3.Package.Builder addPackagesBuilder() {
      return getPackagesFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.Package.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public com.google.dataflow.v1beta3.Package.Builder addPackagesBuilder(int index) {
      return getPackagesFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.Package.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Packages to be installed on workers.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Package packages = 3;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.Package.Builder> getPackagesBuilderList() {
      return getPackagesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.Package,
            com.google.dataflow.v1beta3.Package.Builder,
            com.google.dataflow.v1beta3.PackageOrBuilder>
        getPackagesFieldBuilder() {
      if (packagesBuilder_ == null) {
        packagesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.Package,
                com.google.dataflow.v1beta3.Package.Builder,
                com.google.dataflow.v1beta3.PackageOrBuilder>(
                packages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        packages_ = null;
      }
      return packagesBuilder_;
    }

    private int defaultPackageSet_ = 0;
    /**
     *
     *
     * <pre>
     * The default package set to install.  This allows the service to
     * select a default set of packages which are useful to worker
     * harnesses written in a particular language.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
     *
     * @return The enum numeric value on the wire for defaultPackageSet.
     */
    @java.lang.Override
    public int getDefaultPackageSetValue() {
      return defaultPackageSet_;
    }
    /**
     *
     *
     * <pre>
     * The default package set to install.  This allows the service to
     * select a default set of packages which are useful to worker
     * harnesses written in a particular language.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
     *
     * @param value The enum numeric value on the wire for defaultPackageSet to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultPackageSetValue(int value) {

      defaultPackageSet_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default package set to install.  This allows the service to
     * select a default set of packages which are useful to worker
     * harnesses written in a particular language.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
     *
     * @return The defaultPackageSet.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.DefaultPackageSet getDefaultPackageSet() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.DefaultPackageSet result =
          com.google.dataflow.v1beta3.DefaultPackageSet.valueOf(defaultPackageSet_);
      return result == null ? com.google.dataflow.v1beta3.DefaultPackageSet.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * The default package set to install.  This allows the service to
     * select a default set of packages which are useful to worker
     * harnesses written in a particular language.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
     *
     * @param value The defaultPackageSet to set.
     * @return This builder for chaining.
     */
    public Builder setDefaultPackageSet(com.google.dataflow.v1beta3.DefaultPackageSet value) {
      if (value == null) {
        throw new NullPointerException();
      }

      defaultPackageSet_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The default package set to install.  This allows the service to
     * select a default set of packages which are useful to worker
     * harnesses written in a particular language.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.DefaultPackageSet default_package_set = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDefaultPackageSet() {

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

    private java.lang.Object machineType_ = "";
    /**
     *
     *
     * <pre>
     * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
     * service will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string machine_type = 5;</code>
     *
     * @return The machineType.
     */
    public java.lang.String getMachineType() {
      java.lang.Object ref = machineType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        machineType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
     * service will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string machine_type = 5;</code>
     *
     * @return The bytes for machineType.
     */
    public com.google.protobuf.ByteString getMachineTypeBytes() {
      java.lang.Object ref = machineType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        machineType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
     * service will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string machine_type = 5;</code>
     *
     * @param value The machineType to set.
     * @return This builder for chaining.
     */
    public Builder setMachineType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      machineType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
     * service will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string machine_type = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMachineType() {

      machineType_ = getDefaultInstance().getMachineType();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Machine type (e.g. "n1-standard-1").  If empty or unspecified, the
     * service will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string machine_type = 5;</code>
     *
     * @param value The bytes for machineType to set.
     * @return This builder for chaining.
     */
    public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private int teardownPolicy_ = 0;
    /**
     *
     *
     * <pre>
     * Sets the policy for determining when to turndown worker pool.
     * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
     * `TEARDOWN_NEVER`.
     * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
     * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
     * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
     * down.
     * If the workers are not torn down by the service, they will
     * continue to run and use Google Compute Engine VM resources in the
     * user's project until they are explicitly terminated by the user.
     * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
     * policy except for small, manually supervised test jobs.
     * If unknown or unspecified, the service will attempt to choose a reasonable
     * default.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
     *
     * @return The enum numeric value on the wire for teardownPolicy.
     */
    @java.lang.Override
    public int getTeardownPolicyValue() {
      return teardownPolicy_;
    }
    /**
     *
     *
     * <pre>
     * Sets the policy for determining when to turndown worker pool.
     * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
     * `TEARDOWN_NEVER`.
     * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
     * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
     * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
     * down.
     * If the workers are not torn down by the service, they will
     * continue to run and use Google Compute Engine VM resources in the
     * user's project until they are explicitly terminated by the user.
     * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
     * policy except for small, manually supervised test jobs.
     * If unknown or unspecified, the service will attempt to choose a reasonable
     * default.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
     *
     * @param value The enum numeric value on the wire for teardownPolicy to set.
     * @return This builder for chaining.
     */
    public Builder setTeardownPolicyValue(int value) {

      teardownPolicy_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Sets the policy for determining when to turndown worker pool.
     * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
     * `TEARDOWN_NEVER`.
     * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
     * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
     * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
     * down.
     * If the workers are not torn down by the service, they will
     * continue to run and use Google Compute Engine VM resources in the
     * user's project until they are explicitly terminated by the user.
     * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
     * policy except for small, manually supervised test jobs.
     * If unknown or unspecified, the service will attempt to choose a reasonable
     * default.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
     *
     * @return The teardownPolicy.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.TeardownPolicy getTeardownPolicy() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.TeardownPolicy result =
          com.google.dataflow.v1beta3.TeardownPolicy.valueOf(teardownPolicy_);
      return result == null ? com.google.dataflow.v1beta3.TeardownPolicy.UNRECOGNIZED : result;
    }
    /**
     *
     *
     * <pre>
     * Sets the policy for determining when to turndown worker pool.
     * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
     * `TEARDOWN_NEVER`.
     * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
     * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
     * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
     * down.
     * If the workers are not torn down by the service, they will
     * continue to run and use Google Compute Engine VM resources in the
     * user's project until they are explicitly terminated by the user.
     * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
     * policy except for small, manually supervised test jobs.
     * If unknown or unspecified, the service will attempt to choose a reasonable
     * default.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
     *
     * @param value The teardownPolicy to set.
     * @return This builder for chaining.
     */
    public Builder setTeardownPolicy(com.google.dataflow.v1beta3.TeardownPolicy value) {
      if (value == null) {
        throw new NullPointerException();
      }

      teardownPolicy_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Sets the policy for determining when to turndown worker pool.
     * Allowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and
     * `TEARDOWN_NEVER`.
     * `TEARDOWN_ALWAYS` means workers are always torn down regardless of whether
     * the job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down
     * if the job succeeds. `TEARDOWN_NEVER` means the workers are never torn
     * down.
     * If the workers are not torn down by the service, they will
     * continue to run and use Google Compute Engine VM resources in the
     * user's project until they are explicitly terminated by the user.
     * Because of this, Google recommends using the `TEARDOWN_ALWAYS`
     * policy except for small, manually supervised test jobs.
     * If unknown or unspecified, the service will attempt to choose a reasonable
     * default.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TeardownPolicy teardown_policy = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTeardownPolicy() {

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

    private int diskSizeGb_;
    /**
     *
     *
     * <pre>
     * Size of root disk for VMs, in GB.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 disk_size_gb = 7;</code>
     *
     * @return The diskSizeGb.
     */
    @java.lang.Override
    public int getDiskSizeGb() {
      return diskSizeGb_;
    }
    /**
     *
     *
     * <pre>
     * Size of root disk for VMs, in GB.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 disk_size_gb = 7;</code>
     *
     * @param value The diskSizeGb to set.
     * @return This builder for chaining.
     */
    public Builder setDiskSizeGb(int value) {

      diskSizeGb_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Size of root disk for VMs, in GB.  If zero or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>int32 disk_size_gb = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskSizeGb() {

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

    private java.lang.Object diskType_ = "";
    /**
     *
     *
     * <pre>
     * Type of root disk for VMs.  If empty or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string disk_type = 16;</code>
     *
     * @return The diskType.
     */
    public java.lang.String getDiskType() {
      java.lang.Object ref = diskType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        diskType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Type of root disk for VMs.  If empty or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string disk_type = 16;</code>
     *
     * @return The bytes for diskType.
     */
    public com.google.protobuf.ByteString getDiskTypeBytes() {
      java.lang.Object ref = diskType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        diskType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Type of root disk for VMs.  If empty or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string disk_type = 16;</code>
     *
     * @param value The diskType to set.
     * @return This builder for chaining.
     */
    public Builder setDiskType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      diskType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Type of root disk for VMs.  If empty or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string disk_type = 16;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskType() {

      diskType_ = getDefaultInstance().getDiskType();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Type of root disk for VMs.  If empty or unspecified, the service will
     * attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string disk_type = 16;</code>
     *
     * @param value The bytes for diskType to set.
     * @return This builder for chaining.
     */
    public Builder setDiskTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object diskSourceImage_ = "";
    /**
     *
     *
     * <pre>
     * Fully qualified source image for disks.
     * </pre>
     *
     * <code>string disk_source_image = 8;</code>
     *
     * @return The diskSourceImage.
     */
    public java.lang.String getDiskSourceImage() {
      java.lang.Object ref = diskSourceImage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        diskSourceImage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Fully qualified source image for disks.
     * </pre>
     *
     * <code>string disk_source_image = 8;</code>
     *
     * @return The bytes for diskSourceImage.
     */
    public com.google.protobuf.ByteString getDiskSourceImageBytes() {
      java.lang.Object ref = diskSourceImage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        diskSourceImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Fully qualified source image for disks.
     * </pre>
     *
     * <code>string disk_source_image = 8;</code>
     *
     * @param value The diskSourceImage to set.
     * @return This builder for chaining.
     */
    public Builder setDiskSourceImage(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      diskSourceImage_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Fully qualified source image for disks.
     * </pre>
     *
     * <code>string disk_source_image = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskSourceImage() {

      diskSourceImage_ = getDefaultInstance().getDiskSourceImage();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Fully qualified source image for disks.
     * </pre>
     *
     * <code>string disk_source_image = 8;</code>
     *
     * @param value The bytes for diskSourceImage to set.
     * @return This builder for chaining.
     */
    public Builder setDiskSourceImageBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object zone_ = "";
    /**
     *
     *
     * <pre>
     * Zone to run the worker pools in.  If empty or unspecified, the service
     * will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string zone = 9;</code>
     *
     * @return The zone.
     */
    public java.lang.String getZone() {
      java.lang.Object ref = zone_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        zone_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Zone to run the worker pools in.  If empty or unspecified, the service
     * will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string zone = 9;</code>
     *
     * @return The bytes for zone.
     */
    public com.google.protobuf.ByteString getZoneBytes() {
      java.lang.Object ref = zone_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        zone_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Zone to run the worker pools in.  If empty or unspecified, the service
     * will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string zone = 9;</code>
     *
     * @param value The zone to set.
     * @return This builder for chaining.
     */
    public Builder setZone(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      zone_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Zone to run the worker pools in.  If empty or unspecified, the service
     * will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string zone = 9;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearZone() {

      zone_ = getDefaultInstance().getZone();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Zone to run the worker pools in.  If empty or unspecified, the service
     * will attempt to choose a reasonable default.
     * </pre>
     *
     * <code>string zone = 9;</code>
     *
     * @param value The bytes for zone to set.
     * @return This builder for chaining.
     */
    public Builder setZoneBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private com.google.dataflow.v1beta3.TaskRunnerSettings taskrunnerSettings_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.TaskRunnerSettings,
            com.google.dataflow.v1beta3.TaskRunnerSettings.Builder,
            com.google.dataflow.v1beta3.TaskRunnerSettingsOrBuilder>
        taskrunnerSettingsBuilder_;
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     *
     * @return Whether the taskrunnerSettings field is set.
     */
    public boolean hasTaskrunnerSettings() {
      return taskrunnerSettingsBuilder_ != null || taskrunnerSettings_ != null;
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     *
     * @return The taskrunnerSettings.
     */
    public com.google.dataflow.v1beta3.TaskRunnerSettings getTaskrunnerSettings() {
      if (taskrunnerSettingsBuilder_ == null) {
        return taskrunnerSettings_ == null
            ? com.google.dataflow.v1beta3.TaskRunnerSettings.getDefaultInstance()
            : taskrunnerSettings_;
      } else {
        return taskrunnerSettingsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public Builder setTaskrunnerSettings(com.google.dataflow.v1beta3.TaskRunnerSettings value) {
      if (taskrunnerSettingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        taskrunnerSettings_ = value;
        onChanged();
      } else {
        taskrunnerSettingsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public Builder setTaskrunnerSettings(
        com.google.dataflow.v1beta3.TaskRunnerSettings.Builder builderForValue) {
      if (taskrunnerSettingsBuilder_ == null) {
        taskrunnerSettings_ = builderForValue.build();
        onChanged();
      } else {
        taskrunnerSettingsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public Builder mergeTaskrunnerSettings(com.google.dataflow.v1beta3.TaskRunnerSettings value) {
      if (taskrunnerSettingsBuilder_ == null) {
        if (taskrunnerSettings_ != null) {
          taskrunnerSettings_ =
              com.google.dataflow.v1beta3.TaskRunnerSettings.newBuilder(taskrunnerSettings_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          taskrunnerSettings_ = value;
        }
        onChanged();
      } else {
        taskrunnerSettingsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public Builder clearTaskrunnerSettings() {
      if (taskrunnerSettingsBuilder_ == null) {
        taskrunnerSettings_ = null;
        onChanged();
      } else {
        taskrunnerSettings_ = null;
        taskrunnerSettingsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public com.google.dataflow.v1beta3.TaskRunnerSettings.Builder getTaskrunnerSettingsBuilder() {

      onChanged();
      return getTaskrunnerSettingsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    public com.google.dataflow.v1beta3.TaskRunnerSettingsOrBuilder
        getTaskrunnerSettingsOrBuilder() {
      if (taskrunnerSettingsBuilder_ != null) {
        return taskrunnerSettingsBuilder_.getMessageOrBuilder();
      } else {
        return taskrunnerSettings_ == null
            ? com.google.dataflow.v1beta3.TaskRunnerSettings.getDefaultInstance()
            : taskrunnerSettings_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings passed through to Google Compute Engine workers when
     * using the standard Dataflow task runner.  Users should ignore
     * this field.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.TaskRunnerSettings taskrunner_settings = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.TaskRunnerSettings,
            com.google.dataflow.v1beta3.TaskRunnerSettings.Builder,
            com.google.dataflow.v1beta3.TaskRunnerSettingsOrBuilder>
        getTaskrunnerSettingsFieldBuilder() {
      if (taskrunnerSettingsBuilder_ == null) {
        taskrunnerSettingsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.TaskRunnerSettings,
                com.google.dataflow.v1beta3.TaskRunnerSettings.Builder,
                com.google.dataflow.v1beta3.TaskRunnerSettingsOrBuilder>(
                getTaskrunnerSettings(), getParentForChildren(), isClean());
        taskrunnerSettings_ = null;
      }
      return taskrunnerSettingsBuilder_;
    }

    private java.lang.Object onHostMaintenance_ = "";
    /**
     *
     *
     * <pre>
     * The action to take on host maintenance, as defined by the Google
     * Compute Engine API.
     * </pre>
     *
     * <code>string on_host_maintenance = 11;</code>
     *
     * @return The onHostMaintenance.
     */
    public java.lang.String getOnHostMaintenance() {
      java.lang.Object ref = onHostMaintenance_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        onHostMaintenance_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The action to take on host maintenance, as defined by the Google
     * Compute Engine API.
     * </pre>
     *
     * <code>string on_host_maintenance = 11;</code>
     *
     * @return The bytes for onHostMaintenance.
     */
    public com.google.protobuf.ByteString getOnHostMaintenanceBytes() {
      java.lang.Object ref = onHostMaintenance_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        onHostMaintenance_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The action to take on host maintenance, as defined by the Google
     * Compute Engine API.
     * </pre>
     *
     * <code>string on_host_maintenance = 11;</code>
     *
     * @param value The onHostMaintenance to set.
     * @return This builder for chaining.
     */
    public Builder setOnHostMaintenance(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      onHostMaintenance_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The action to take on host maintenance, as defined by the Google
     * Compute Engine API.
     * </pre>
     *
     * <code>string on_host_maintenance = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearOnHostMaintenance() {

      onHostMaintenance_ = getDefaultInstance().getOnHostMaintenance();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The action to take on host maintenance, as defined by the Google
     * Compute Engine API.
     * </pre>
     *
     * <code>string on_host_maintenance = 11;</code>
     *
     * @param value The bytes for onHostMaintenance to set.
     * @return This builder for chaining.
     */
    public Builder setOnHostMaintenanceBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

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

    private void ensureDataDisksIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        dataDisks_ = new java.util.ArrayList<com.google.dataflow.v1beta3.Disk>(dataDisks_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.Disk,
            com.google.dataflow.v1beta3.Disk.Builder,
            com.google.dataflow.v1beta3.DiskOrBuilder>
        dataDisksBuilder_;

    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.Disk> getDataDisksList() {
      if (dataDisksBuilder_ == null) {
        return java.util.Collections.unmodifiableList(dataDisks_);
      } else {
        return dataDisksBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public int getDataDisksCount() {
      if (dataDisksBuilder_ == null) {
        return dataDisks_.size();
      } else {
        return dataDisksBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public com.google.dataflow.v1beta3.Disk getDataDisks(int index) {
      if (dataDisksBuilder_ == null) {
        return dataDisks_.get(index);
      } else {
        return dataDisksBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder setDataDisks(int index, com.google.dataflow.v1beta3.Disk value) {
      if (dataDisksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDataDisksIsMutable();
        dataDisks_.set(index, value);
        onChanged();
      } else {
        dataDisksBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder setDataDisks(
        int index, com.google.dataflow.v1beta3.Disk.Builder builderForValue) {
      if (dataDisksBuilder_ == null) {
        ensureDataDisksIsMutable();
        dataDisks_.set(index, builderForValue.build());
        onChanged();
      } else {
        dataDisksBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder addDataDisks(com.google.dataflow.v1beta3.Disk value) {
      if (dataDisksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDataDisksIsMutable();
        dataDisks_.add(value);
        onChanged();
      } else {
        dataDisksBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder addDataDisks(int index, com.google.dataflow.v1beta3.Disk value) {
      if (dataDisksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDataDisksIsMutable();
        dataDisks_.add(index, value);
        onChanged();
      } else {
        dataDisksBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder addDataDisks(com.google.dataflow.v1beta3.Disk.Builder builderForValue) {
      if (dataDisksBuilder_ == null) {
        ensureDataDisksIsMutable();
        dataDisks_.add(builderForValue.build());
        onChanged();
      } else {
        dataDisksBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder addDataDisks(
        int index, com.google.dataflow.v1beta3.Disk.Builder builderForValue) {
      if (dataDisksBuilder_ == null) {
        ensureDataDisksIsMutable();
        dataDisks_.add(index, builderForValue.build());
        onChanged();
      } else {
        dataDisksBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder addAllDataDisks(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.Disk> values) {
      if (dataDisksBuilder_ == null) {
        ensureDataDisksIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataDisks_);
        onChanged();
      } else {
        dataDisksBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder clearDataDisks() {
      if (dataDisksBuilder_ == null) {
        dataDisks_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        dataDisksBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public Builder removeDataDisks(int index) {
      if (dataDisksBuilder_ == null) {
        ensureDataDisksIsMutable();
        dataDisks_.remove(index);
        onChanged();
      } else {
        dataDisksBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public com.google.dataflow.v1beta3.Disk.Builder getDataDisksBuilder(int index) {
      return getDataDisksFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public com.google.dataflow.v1beta3.DiskOrBuilder getDataDisksOrBuilder(int index) {
      if (dataDisksBuilder_ == null) {
        return dataDisks_.get(index);
      } else {
        return dataDisksBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.DiskOrBuilder>
        getDataDisksOrBuilderList() {
      if (dataDisksBuilder_ != null) {
        return dataDisksBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(dataDisks_);
      }
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public com.google.dataflow.v1beta3.Disk.Builder addDataDisksBuilder() {
      return getDataDisksFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.Disk.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public com.google.dataflow.v1beta3.Disk.Builder addDataDisksBuilder(int index) {
      return getDataDisksFieldBuilder()
          .addBuilder(index, com.google.dataflow.v1beta3.Disk.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Data disks that are used by a VM in this workflow.
     * </pre>
     *
     * <code>repeated .google.dataflow.v1beta3.Disk data_disks = 12;</code>
     */
    public java.util.List<com.google.dataflow.v1beta3.Disk.Builder> getDataDisksBuilderList() {
      return getDataDisksFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.Disk,
            com.google.dataflow.v1beta3.Disk.Builder,
            com.google.dataflow.v1beta3.DiskOrBuilder>
        getDataDisksFieldBuilder() {
      if (dataDisksBuilder_ == null) {
        dataDisksBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.Disk,
                com.google.dataflow.v1beta3.Disk.Builder,
                com.google.dataflow.v1beta3.DiskOrBuilder>(
                dataDisks_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
        dataDisks_ = null;
      }
      return dataDisksBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> metadata_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() {
      if (metadata_ == null) {
        return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
      }
      return metadata_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableMetadata() {
      onChanged();
      ;
      if (metadata_ == null) {
        metadata_ =
            com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry);
      }
      if (!metadata_.isMutable()) {
        metadata_ = metadata_.copy();
      }
      return metadata_;
    }

    public int getMetadataCount() {
      return internalGetMetadata().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    @java.lang.Override
    public boolean containsMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetMetadata().getMap().containsKey(key);
    }
    /** Use {@link #getMetadataMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMetadata() {
      return getMetadataMap();
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() {
      return internalGetMetadata().getMap();
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    @java.lang.Override
    public java.lang.String getMetadataOrDefault(
        java.lang.String key, java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    @java.lang.Override
    public java.lang.String getMetadataOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearMetadata() {
      internalGetMutableMetadata().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    public Builder removeMetadata(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableMetadata().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() {
      return internalGetMutableMetadata().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    public Builder putMetadata(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }

      internalGetMutableMetadata().getMutableMap().put(key, value);
      return this;
    }
    /**
     *
     *
     * <pre>
     * Metadata to set on the Google Compute Engine VMs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; metadata = 13;</code>
     */
    public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableMetadata().getMutableMap().putAll(values);
      return this;
    }

    private com.google.dataflow.v1beta3.AutoscalingSettings autoscalingSettings_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.AutoscalingSettings,
            com.google.dataflow.v1beta3.AutoscalingSettings.Builder,
            com.google.dataflow.v1beta3.AutoscalingSettingsOrBuilder>
        autoscalingSettingsBuilder_;
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     *
     * @return Whether the autoscalingSettings field is set.
     */
    public boolean hasAutoscalingSettings() {
      return autoscalingSettingsBuilder_ != null || autoscalingSettings_ != null;
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     *
     * @return The autoscalingSettings.
     */
    public com.google.dataflow.v1beta3.AutoscalingSettings getAutoscalingSettings() {
      if (autoscalingSettingsBuilder_ == null) {
        return autoscalingSettings_ == null
            ? com.google.dataflow.v1beta3.AutoscalingSettings.getDefaultInstance()
            : autoscalingSettings_;
      } else {
        return autoscalingSettingsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public Builder setAutoscalingSettings(com.google.dataflow.v1beta3.AutoscalingSettings value) {
      if (autoscalingSettingsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        autoscalingSettings_ = value;
        onChanged();
      } else {
        autoscalingSettingsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public Builder setAutoscalingSettings(
        com.google.dataflow.v1beta3.AutoscalingSettings.Builder builderForValue) {
      if (autoscalingSettingsBuilder_ == null) {
        autoscalingSettings_ = builderForValue.build();
        onChanged();
      } else {
        autoscalingSettingsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public Builder mergeAutoscalingSettings(com.google.dataflow.v1beta3.AutoscalingSettings value) {
      if (autoscalingSettingsBuilder_ == null) {
        if (autoscalingSettings_ != null) {
          autoscalingSettings_ =
              com.google.dataflow.v1beta3.AutoscalingSettings.newBuilder(autoscalingSettings_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          autoscalingSettings_ = value;
        }
        onChanged();
      } else {
        autoscalingSettingsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public Builder clearAutoscalingSettings() {
      if (autoscalingSettingsBuilder_ == null) {
        autoscalingSettings_ = null;
        onChanged();
      } else {
        autoscalingSettings_ = null;
        autoscalingSettingsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public com.google.dataflow.v1beta3.AutoscalingSettings.Builder getAutoscalingSettingsBuilder() {

      onChanged();
      return getAutoscalingSettingsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    public com.google.dataflow.v1beta3.AutoscalingSettingsOrBuilder
        getAutoscalingSettingsOrBuilder() {
      if (autoscalingSettingsBuilder_ != null) {
        return autoscalingSettingsBuilder_.getMessageOrBuilder();
      } else {
        return autoscalingSettings_ == null
            ? com.google.dataflow.v1beta3.AutoscalingSettings.getDefaultInstance()
            : autoscalingSettings_;
      }
    }
    /**
     *
     *
     * <pre>
     * Settings for autoscaling of this WorkerPool.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingSettings autoscaling_settings = 14;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.dataflow.v1beta3.AutoscalingSettings,
            com.google.dataflow.v1beta3.AutoscalingSettings.Builder,
            com.google.dataflow.v1beta3.AutoscalingSettingsOrBuilder>
        getAutoscalingSettingsFieldBuilder() {
      if (autoscalingSettingsBuilder_ == null) {
        autoscalingSettingsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.dataflow.v1beta3.AutoscalingSettings,
                com.google.dataflow.v1beta3.AutoscalingSettings.Builder,
                com.google.dataflow.v1beta3.AutoscalingSettingsOrBuilder>(
                getAutoscalingSettings(), getParentForChildren(), isClean());
        autoscalingSettings_ = null;
      }
      return autoscalingSettingsBuilder_;
    }

    private com.google.protobuf.Any poolArgs_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any,
            com.google.protobuf.Any.Builder,
            com.google.protobuf.AnyOrBuilder>
        poolArgsBuilder_;
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     *
     * @return Whether the poolArgs field is set.
     */
    public boolean hasPoolArgs() {
      return poolArgsBuilder_ != null || poolArgs_ != null;
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     *
     * @return The poolArgs.
     */
    public com.google.protobuf.Any getPoolArgs() {
      if (poolArgsBuilder_ == null) {
        return poolArgs_ == null ? com.google.protobuf.Any.getDefaultInstance() : poolArgs_;
      } else {
        return poolArgsBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public Builder setPoolArgs(com.google.protobuf.Any value) {
      if (poolArgsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        poolArgs_ = value;
        onChanged();
      } else {
        poolArgsBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public Builder setPoolArgs(com.google.protobuf.Any.Builder builderForValue) {
      if (poolArgsBuilder_ == null) {
        poolArgs_ = builderForValue.build();
        onChanged();
      } else {
        poolArgsBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public Builder mergePoolArgs(com.google.protobuf.Any value) {
      if (poolArgsBuilder_ == null) {
        if (poolArgs_ != null) {
          poolArgs_ = com.google.protobuf.Any.newBuilder(poolArgs_).mergeFrom(value).buildPartial();
        } else {
          poolArgs_ = value;
        }
        onChanged();
      } else {
        poolArgsBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public Builder clearPoolArgs() {
      if (poolArgsBuilder_ == null) {
        poolArgs_ = null;
        onChanged();
      } else {
        poolArgs_ = null;
        poolArgsBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public com.google.protobuf.Any.Builder getPoolArgsBuilder() {

      onChanged();
      return getPoolArgsFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    public com.google.protobuf.AnyOrBuilder getPoolArgsOrBuilder() {
      if (poolArgsBuilder_ != null) {
        return poolArgsBuilder_.getMessageOrBuilder();
      } else {
        return poolArgs_ == null ? com.google.protobuf.Any.getDefaultInstance() : poolArgs_;
      }
    }
    /**
     *
     *
     * <pre>
     * Extra arguments for this worker pool.
     * </pre>
     *
     * <code>.google.protobuf.Any pool_args = 15;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any,
            com.google.protobuf.Any.Builder,
            com.google.protobuf.AnyOrBuilder>
        getPoolArgsFieldBuilder() {
      if (poolArgsBuilder_ == null) {
        poolArgsBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Any,
                com.google.protobuf.Any.Builder,
                com.google.protobuf.AnyOrBuilder>(getPoolArgs(), getParentForChildren(), isClean());
        poolArgs_ = null;
      }
      return poolArgsBuilder_;
    }

    private java.lang.Object network_ = "";
    /**
     *
     *
     * <pre>
     * Network to which VMs will be assigned.  If empty or unspecified,
     * the service will use the network "default".
     * </pre>
     *
     * <code>string network = 17;</code>
     *
     * @return The network.
     */
    public java.lang.String getNetwork() {
      java.lang.Object ref = network_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        network_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Network to which VMs will be assigned.  If empty or unspecified,
     * the service will use the network "default".
     * </pre>
     *
     * <code>string network = 17;</code>
     *
     * @return The bytes for network.
     */
    public com.google.protobuf.ByteString getNetworkBytes() {
      java.lang.Object ref = network_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        network_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Network to which VMs will be assigned.  If empty or unspecified,
     * the service will use the network "default".
     * </pre>
     *
     * <code>string network = 17;</code>
     *
     * @param value The network to set.
     * @return This builder for chaining.
     */
    public Builder setNetwork(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      network_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network to which VMs will be assigned.  If empty or unspecified,
     * the service will use the network "default".
     * </pre>
     *
     * <code>string network = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNetwork() {

      network_ = getDefaultInstance().getNetwork();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Network to which VMs will be assigned.  If empty or unspecified,
     * the service will use the network "default".
     * </pre>
     *
     * <code>string network = 17;</code>
     *
     * @param value The bytes for network to set.
     * @return This builder for chaining.
     */
    public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object subnetwork_ = "";
    /**
     *
     *
     * <pre>
     * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
     * the form "regions/REGION/subnetworks/SUBNETWORK".
     * </pre>
     *
     * <code>string subnetwork = 19;</code>
     *
     * @return The subnetwork.
     */
    public java.lang.String getSubnetwork() {
      java.lang.Object ref = subnetwork_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        subnetwork_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
     * the form "regions/REGION/subnetworks/SUBNETWORK".
     * </pre>
     *
     * <code>string subnetwork = 19;</code>
     *
     * @return The bytes for subnetwork.
     */
    public com.google.protobuf.ByteString getSubnetworkBytes() {
      java.lang.Object ref = subnetwork_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        subnetwork_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
     * the form "regions/REGION/subnetworks/SUBNETWORK".
     * </pre>
     *
     * <code>string subnetwork = 19;</code>
     *
     * @param value The subnetwork to set.
     * @return This builder for chaining.
     */
    public Builder setSubnetwork(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      subnetwork_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
     * the form "regions/REGION/subnetworks/SUBNETWORK".
     * </pre>
     *
     * <code>string subnetwork = 19;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSubnetwork() {

      subnetwork_ = getDefaultInstance().getSubnetwork();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Subnetwork to which VMs will be assigned, if desired.  Expected to be of
     * the form "regions/REGION/subnetworks/SUBNETWORK".
     * </pre>
     *
     * <code>string subnetwork = 19;</code>
     *
     * @param value The bytes for subnetwork to set.
     * @return This builder for chaining.
     */
    public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object workerHarnessContainerImage_ = "";
    /**
     *
     *
     * <pre>
     * Required. Docker container image that executes the Cloud Dataflow worker
     * harness, residing in Google Container Registry.
     * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
     * </pre>
     *
     * <code>string worker_harness_container_image = 18;</code>
     *
     * @return The workerHarnessContainerImage.
     */
    public java.lang.String getWorkerHarnessContainerImage() {
      java.lang.Object ref = workerHarnessContainerImage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        workerHarnessContainerImage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Docker container image that executes the Cloud Dataflow worker
     * harness, residing in Google Container Registry.
     * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
     * </pre>
     *
     * <code>string worker_harness_container_image = 18;</code>
     *
     * @return The bytes for workerHarnessContainerImage.
     */
    public com.google.protobuf.ByteString getWorkerHarnessContainerImageBytes() {
      java.lang.Object ref = workerHarnessContainerImage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        workerHarnessContainerImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Required. Docker container image that executes the Cloud Dataflow worker
     * harness, residing in Google Container Registry.
     * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
     * </pre>
     *
     * <code>string worker_harness_container_image = 18;</code>
     *
     * @param value The workerHarnessContainerImage to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerHarnessContainerImage(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      workerHarnessContainerImage_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Docker container image that executes the Cloud Dataflow worker
     * harness, residing in Google Container Registry.
     * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
     * </pre>
     *
     * <code>string worker_harness_container_image = 18;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWorkerHarnessContainerImage() {

      workerHarnessContainerImage_ = getDefaultInstance().getWorkerHarnessContainerImage();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required. Docker container image that executes the Cloud Dataflow worker
     * harness, residing in Google Container Registry.
     * Deprecated for the Fn API path. Use sdk_harness_container_images instead.
     * </pre>
     *
     * <code>string worker_harness_container_image = 18;</code>
     *
     * @param value The bytes for workerHarnessContainerImage to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerHarnessContainerImageBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private int numThreadsPerWorker_;
    /**
     *
     *
     * <pre>
     * The number of threads per worker harness. If empty or unspecified, the
     * service will choose a number of threads (according to the number of cores
     * on the selected machine type for batch, or 1 by convention for streaming).
     * </pre>
     *
     * <code>int32 num_threads_per_worker = 20;</code>
     *
     * @return The numThreadsPerWorker.
     */
    @java.lang.Override
    public int getNumThreadsPerWorker() {
      return numThreadsPerWorker_;
    }
    /**
     *
     *
     * <pre>
     * The number of threads per worker harness. If empty or unspecified, the
     * service will choose a number of threads (according to the number of cores
     * on the selected machine type for batch, or 1 by convention for streaming).
     * </pre>
     *
     * <code>int32 num_threads_per_worker = 20;</code>
     *
     * @param value The numThreadsPerWorker to set.
     * @return This builder for chaining.
     */
    public Builder setNumThreadsPerWorker(int value) {

      numThreadsPerWorker_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The number of threads per worker harness. If empty or unspecified, the
     * service will choose a number of threads (according to the number of cores
     * on the selected machine type for batch, or 1 by convention for streaming).
     * </pre>
     *
     * <code>int32 num_threads_per_worker = 20;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNumThreadsPerWorker() {

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

    private int ipConfiguration_ = 0;
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
     *
     * @return The enum numeric value on the wire for ipConfiguration.
     */
    @java.lang.Override
    public int getIpConfigurationValue() {
      return ipConfiguration_;
    }
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
     *
     * @param value The enum numeric value on the wire for ipConfiguration to set.
     * @return This builder for chaining.
     */
    public Builder setIpConfigurationValue(int value) {

      ipConfiguration_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
     *
     * @return The ipConfiguration.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.WorkerIPAddressConfiguration getIpConfiguration() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.WorkerIPAddressConfiguration result =
          com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.valueOf(ipConfiguration_);
      return result == null
          ? com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
     *
     * @param value The ipConfiguration to set.
     * @return This builder for chaining.
     */
    public Builder setIpConfiguration(
        com.google.dataflow.v1beta3.WorkerIPAddressConfiguration value) {
      if (value == null) {
        throw new NullPointerException();
      }

      ipConfiguration_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 21;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIpConfiguration() {

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

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

    private void ensureSdkHarnessContainerImagesIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        sdkHarnessContainerImages_ =
            new java.util.ArrayList<com.google.dataflow.v1beta3.SdkHarnessContainerImage>(
                sdkHarnessContainerImages_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.SdkHarnessContainerImage,
            com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder,
            com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder>
        sdkHarnessContainerImagesBuilder_;

    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public java.util.List<com.google.dataflow.v1beta3.SdkHarnessContainerImage>
        getSdkHarnessContainerImagesList() {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(sdkHarnessContainerImages_);
      } else {
        return sdkHarnessContainerImagesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public int getSdkHarnessContainerImagesCount() {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        return sdkHarnessContainerImages_.size();
      } else {
        return sdkHarnessContainerImagesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public com.google.dataflow.v1beta3.SdkHarnessContainerImage getSdkHarnessContainerImages(
        int index) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        return sdkHarnessContainerImages_.get(index);
      } else {
        return sdkHarnessContainerImagesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder setSdkHarnessContainerImages(
        int index, com.google.dataflow.v1beta3.SdkHarnessContainerImage value) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.set(index, value);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder setSdkHarnessContainerImages(
        int index, com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder builderForValue) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.set(index, builderForValue.build());
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder addSdkHarnessContainerImages(
        com.google.dataflow.v1beta3.SdkHarnessContainerImage value) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.add(value);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder addSdkHarnessContainerImages(
        int index, com.google.dataflow.v1beta3.SdkHarnessContainerImage value) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.add(index, value);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder addSdkHarnessContainerImages(
        com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder builderForValue) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.add(builderForValue.build());
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder addSdkHarnessContainerImages(
        int index, com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder builderForValue) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.add(index, builderForValue.build());
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder addAllSdkHarnessContainerImages(
        java.lang.Iterable<? extends com.google.dataflow.v1beta3.SdkHarnessContainerImage> values) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        ensureSdkHarnessContainerImagesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sdkHarnessContainerImages_);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder clearSdkHarnessContainerImages() {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        sdkHarnessContainerImages_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public Builder removeSdkHarnessContainerImages(int index) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        ensureSdkHarnessContainerImagesIsMutable();
        sdkHarnessContainerImages_.remove(index);
        onChanged();
      } else {
        sdkHarnessContainerImagesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder
        getSdkHarnessContainerImagesBuilder(int index) {
      return getSdkHarnessContainerImagesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder
        getSdkHarnessContainerImagesOrBuilder(int index) {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        return sdkHarnessContainerImages_.get(index);
      } else {
        return sdkHarnessContainerImagesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public java.util.List<? extends com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder>
        getSdkHarnessContainerImagesOrBuilderList() {
      if (sdkHarnessContainerImagesBuilder_ != null) {
        return sdkHarnessContainerImagesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(sdkHarnessContainerImages_);
      }
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder
        addSdkHarnessContainerImagesBuilder() {
      return getSdkHarnessContainerImagesFieldBuilder()
          .addBuilder(com.google.dataflow.v1beta3.SdkHarnessContainerImage.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder
        addSdkHarnessContainerImagesBuilder(int index) {
      return getSdkHarnessContainerImagesFieldBuilder()
          .addBuilder(
              index, com.google.dataflow.v1beta3.SdkHarnessContainerImage.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Set of SDK harness containers needed to execute this pipeline. This will
     * only be set in the Fn API path. For non-cross-language pipelines this
     * should have only one entry. Cross-language pipelines will have two or more
     * entries.
     * </pre>
     *
     * <code>
     * repeated .google.dataflow.v1beta3.SdkHarnessContainerImage sdk_harness_container_images = 22;
     * </code>
     */
    public java.util.List<com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder>
        getSdkHarnessContainerImagesBuilderList() {
      return getSdkHarnessContainerImagesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.dataflow.v1beta3.SdkHarnessContainerImage,
            com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder,
            com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder>
        getSdkHarnessContainerImagesFieldBuilder() {
      if (sdkHarnessContainerImagesBuilder_ == null) {
        sdkHarnessContainerImagesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.dataflow.v1beta3.SdkHarnessContainerImage,
                com.google.dataflow.v1beta3.SdkHarnessContainerImage.Builder,
                com.google.dataflow.v1beta3.SdkHarnessContainerImageOrBuilder>(
                sdkHarnessContainerImages_,
                ((bitField0_ & 0x00000008) != 0),
                getParentForChildren(),
                isClean());
        sdkHarnessContainerImages_ = null;
      }
      return sdkHarnessContainerImagesBuilder_;
    }

    @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.WorkerPool)
  }

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

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

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

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

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

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

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