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

package com.google.dataflow.v1beta3;

/**
 *
 *
 * <pre>
 * The environment values to be set at runtime for flex template.
 * </pre>
 *
 * Protobuf type {@code google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment}
 */
public final class FlexTemplateRuntimeEnvironment extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment)
    FlexTemplateRuntimeEnvironmentOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use FlexTemplateRuntimeEnvironment.newBuilder() to construct.
  private FlexTemplateRuntimeEnvironment(
      com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private FlexTemplateRuntimeEnvironment() {
    zone_ = "";
    serviceAccountEmail_ = "";
    tempLocation_ = "";
    machineType_ = "";
    additionalExperiments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    network_ = "";
    subnetwork_ = "";
    kmsKeyName_ = "";
    ipConfiguration_ = 0;
    workerRegion_ = "";
    workerZone_ = "";
    flexrsGoal_ = 0;
    stagingLocation_ = "";
    sdkContainerImage_ = "";
    autoscalingAlgorithm_ = 0;
    saveHeapDumpsToGcsPath_ = "";
    launcherMachineType_ = "";
  }

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

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

  private FlexTemplateRuntimeEnvironment(
      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 8:
            {
              numWorkers_ = input.readInt32();
              break;
            }
          case 16:
            {
              maxWorkers_ = input.readInt32();
              break;
            }
          case 26:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

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

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

              machineType_ = s;
              break;
            }
          case 58:
            {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
                additionalExperiments_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000001;
              }
              additionalExperiments_.add(s);
              break;
            }
          case 66:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

              subnetwork_ = s;
              break;
            }
          case 82:
            {
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                additionalUserLabels_ =
                    com.google.protobuf.MapField.newMapField(
                        AdditionalUserLabelsDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000002;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
                  additionalUserLabels__ =
                      input.readMessage(
                          AdditionalUserLabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                          extensionRegistry);
              additionalUserLabels_
                  .getMutableMap()
                  .put(additionalUserLabels__.getKey(), additionalUserLabels__.getValue());
              break;
            }
          case 90:
            {
              java.lang.String s = input.readStringRequireUtf8();

              kmsKeyName_ = s;
              break;
            }
          case 96:
            {
              int rawValue = input.readEnum();

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

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

              workerZone_ = s;
              break;
            }
          case 120:
            {
              enableStreamingEngine_ = input.readBool();
              break;
            }
          case 128:
            {
              int rawValue = input.readEnum();

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

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

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

              autoscalingAlgorithm_ = rawValue;
              break;
            }
          case 176:
            {
              dumpHeapOnOom_ = input.readBool();
              break;
            }
          case 186:
            {
              java.lang.String s = input.readStringRequireUtf8();

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

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

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

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

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

  public static final int NUM_WORKERS_FIELD_NUMBER = 1;
  private int numWorkers_;
  /**
   *
   *
   * <pre>
   * The initial number of Google Compute Engine instances for the job.
   * </pre>
   *
   * <code>int32 num_workers = 1;</code>
   *
   * @return The numWorkers.
   */
  @java.lang.Override
  public int getNumWorkers() {
    return numWorkers_;
  }

  public static final int MAX_WORKERS_FIELD_NUMBER = 2;
  private int maxWorkers_;
  /**
   *
   *
   * <pre>
   * The maximum number of Google Compute Engine instances to be made
   * available to your pipeline during execution, from 1 to 1000.
   * </pre>
   *
   * <code>int32 max_workers = 2;</code>
   *
   * @return The maxWorkers.
   */
  @java.lang.Override
  public int getMaxWorkers() {
    return maxWorkers_;
  }

  public static final int ZONE_FIELD_NUMBER = 3;
  private volatile java.lang.Object zone_;
  /**
   *
   *
   * <pre>
   * The Compute Engine [availability
   * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
   * for launching worker instances to run your pipeline.
   * In the future, worker_zone will take precedence.
   * </pre>
   *
   * <code>string zone = 3;</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>
   * The Compute Engine [availability
   * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
   * for launching worker instances to run your pipeline.
   * In the future, worker_zone will take precedence.
   * </pre>
   *
   * <code>string zone = 3;</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 SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4;
  private volatile java.lang.Object serviceAccountEmail_;
  /**
   *
   *
   * <pre>
   * The email address of the service account to run the job as.
   * </pre>
   *
   * <code>string service_account_email = 4;</code>
   *
   * @return The serviceAccountEmail.
   */
  @java.lang.Override
  public java.lang.String getServiceAccountEmail() {
    java.lang.Object ref = serviceAccountEmail_;
    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();
      serviceAccountEmail_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The email address of the service account to run the job as.
   * </pre>
   *
   * <code>string service_account_email = 4;</code>
   *
   * @return The bytes for serviceAccountEmail.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
    java.lang.Object ref = serviceAccountEmail_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      serviceAccountEmail_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEMP_LOCATION_FIELD_NUMBER = 5;
  private volatile java.lang.Object tempLocation_;
  /**
   *
   *
   * <pre>
   * The Cloud Storage path to use for temporary files.
   * Must be a valid Cloud Storage URL, beginning with `gs://`.
   * </pre>
   *
   * <code>string temp_location = 5;</code>
   *
   * @return The tempLocation.
   */
  @java.lang.Override
  public java.lang.String getTempLocation() {
    java.lang.Object ref = tempLocation_;
    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();
      tempLocation_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Cloud Storage path to use for temporary files.
   * Must be a valid Cloud Storage URL, beginning with `gs://`.
   * </pre>
   *
   * <code>string temp_location = 5;</code>
   *
   * @return The bytes for tempLocation.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getTempLocationBytes() {
    java.lang.Object ref = tempLocation_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      tempLocation_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MACHINE_TYPE_FIELD_NUMBER = 6;
  private volatile java.lang.Object machineType_;
  /**
   *
   *
   * <pre>
   * The machine type to use for the job. Defaults to the value from the
   * template if not specified.
   * </pre>
   *
   * <code>string machine_type = 6;</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>
   * The machine type to use for the job. Defaults to the value from the
   * template if not specified.
   * </pre>
   *
   * <code>string machine_type = 6;</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 ADDITIONAL_EXPERIMENTS_FIELD_NUMBER = 7;
  private com.google.protobuf.LazyStringList additionalExperiments_;
  /**
   *
   *
   * <pre>
   * Additional experiment flags for the job.
   * </pre>
   *
   * <code>repeated string additional_experiments = 7;</code>
   *
   * @return A list containing the additionalExperiments.
   */
  public com.google.protobuf.ProtocolStringList getAdditionalExperimentsList() {
    return additionalExperiments_;
  }
  /**
   *
   *
   * <pre>
   * Additional experiment flags for the job.
   * </pre>
   *
   * <code>repeated string additional_experiments = 7;</code>
   *
   * @return The count of additionalExperiments.
   */
  public int getAdditionalExperimentsCount() {
    return additionalExperiments_.size();
  }
  /**
   *
   *
   * <pre>
   * Additional experiment flags for the job.
   * </pre>
   *
   * <code>repeated string additional_experiments = 7;</code>
   *
   * @param index The index of the element to return.
   * @return The additionalExperiments at the given index.
   */
  public java.lang.String getAdditionalExperiments(int index) {
    return additionalExperiments_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Additional experiment flags for the job.
   * </pre>
   *
   * <code>repeated string additional_experiments = 7;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the additionalExperiments at the given index.
   */
  public com.google.protobuf.ByteString getAdditionalExperimentsBytes(int index) {
    return additionalExperiments_.getByteString(index);
  }

  public static final int NETWORK_FIELD_NUMBER = 8;
  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 = 8;</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 = 8;</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 = 9;
  private volatile java.lang.Object subnetwork_;
  /**
   *
   *
   * <pre>
   * Subnetwork to which VMs will be assigned, if desired. You can specify a
   * subnetwork using either a complete URL or an abbreviated path. Expected to
   * be of the form
   * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
   * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
   * a Shared VPC network, you must use the complete URL.
   * </pre>
   *
   * <code>string subnetwork = 9;</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. You can specify a
   * subnetwork using either a complete URL or an abbreviated path. Expected to
   * be of the form
   * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
   * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
   * a Shared VPC network, you must use the complete URL.
   * </pre>
   *
   * <code>string subnetwork = 9;</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 ADDITIONAL_USER_LABELS_FIELD_NUMBER = 10;

  private static final class AdditionalUserLabelsDefaultEntryHolder {
    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.TemplatesProto
                .internal_static_google_dataflow_v1beta3_FlexTemplateRuntimeEnvironment_AdditionalUserLabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

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

  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetAdditionalUserLabels() {
    if (additionalUserLabels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          AdditionalUserLabelsDefaultEntryHolder.defaultEntry);
    }
    return additionalUserLabels_;
  }

  public int getAdditionalUserLabelsCount() {
    return internalGetAdditionalUserLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Additional user labels to be specified for the job.
   * Keys and values must follow the restrictions specified in the [labeling
   * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
   * page.
   * An object containing a list of "key": value pairs.
   * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
   * </pre>
   *
   * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
   */
  @java.lang.Override
  public boolean containsAdditionalUserLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetAdditionalUserLabels().getMap().containsKey(key);
  }
  /** Use {@link #getAdditionalUserLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getAdditionalUserLabels() {
    return getAdditionalUserLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Additional user labels to be specified for the job.
   * Keys and values must follow the restrictions specified in the [labeling
   * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
   * page.
   * An object containing a list of "key": value pairs.
   * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
   * </pre>
   *
   * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getAdditionalUserLabelsMap() {
    return internalGetAdditionalUserLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Additional user labels to be specified for the job.
   * Keys and values must follow the restrictions specified in the [labeling
   * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
   * page.
   * An object containing a list of "key": value pairs.
   * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
   * </pre>
   *
   * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
   */
  @java.lang.Override
  public java.lang.String getAdditionalUserLabelsOrDefault(
      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 =
        internalGetAdditionalUserLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Additional user labels to be specified for the job.
   * Keys and values must follow the restrictions specified in the [labeling
   * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
   * page.
   * An object containing a list of "key": value pairs.
   * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
   * </pre>
   *
   * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
   */
  @java.lang.Override
  public java.lang.String getAdditionalUserLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetAdditionalUserLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int KMS_KEY_NAME_FIELD_NUMBER = 11;
  private volatile java.lang.Object kmsKeyName_;
  /**
   *
   *
   * <pre>
   * Name for the Cloud KMS key for the job.
   * Key format is:
   * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
   * </pre>
   *
   * <code>string kms_key_name = 11;</code>
   *
   * @return The kmsKeyName.
   */
  @java.lang.Override
  public java.lang.String getKmsKeyName() {
    java.lang.Object ref = kmsKeyName_;
    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();
      kmsKeyName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Name for the Cloud KMS key for the job.
   * Key format is:
   * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
   * </pre>
   *
   * <code>string kms_key_name = 11;</code>
   *
   * @return The bytes for kmsKeyName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getKmsKeyNameBytes() {
    java.lang.Object ref = kmsKeyName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      kmsKeyName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int IP_CONFIGURATION_FIELD_NUMBER = 12;
  private int ipConfiguration_;
  /**
   *
   *
   * <pre>
   * Configuration for VM IPs.
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 12;</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 = 12;</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 WORKER_REGION_FIELD_NUMBER = 13;
  private volatile java.lang.Object workerRegion_;
  /**
   *
   *
   * <pre>
   * The Compute Engine region
   * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
   * which worker processing should occur, e.g. "us-west1". Mutually exclusive
   * with worker_zone. If neither worker_region nor worker_zone is specified,
   * default to the control plane's region.
   * </pre>
   *
   * <code>string worker_region = 13;</code>
   *
   * @return The workerRegion.
   */
  @java.lang.Override
  public java.lang.String getWorkerRegion() {
    java.lang.Object ref = workerRegion_;
    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();
      workerRegion_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Compute Engine region
   * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
   * which worker processing should occur, e.g. "us-west1". Mutually exclusive
   * with worker_zone. If neither worker_region nor worker_zone is specified,
   * default to the control plane's region.
   * </pre>
   *
   * <code>string worker_region = 13;</code>
   *
   * @return The bytes for workerRegion.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWorkerRegionBytes() {
    java.lang.Object ref = workerRegion_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      workerRegion_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int WORKER_ZONE_FIELD_NUMBER = 14;
  private volatile java.lang.Object workerZone_;
  /**
   *
   *
   * <pre>
   * The Compute Engine zone
   * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
   * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
   * with worker_region. If neither worker_region nor worker_zone is specified,
   * a zone in the control plane's region is chosen based on available capacity.
   * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
   * </pre>
   *
   * <code>string worker_zone = 14;</code>
   *
   * @return The workerZone.
   */
  @java.lang.Override
  public java.lang.String getWorkerZone() {
    java.lang.Object ref = workerZone_;
    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();
      workerZone_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Compute Engine zone
   * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
   * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
   * with worker_region. If neither worker_region nor worker_zone is specified,
   * a zone in the control plane's region is chosen based on available capacity.
   * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
   * </pre>
   *
   * <code>string worker_zone = 14;</code>
   *
   * @return The bytes for workerZone.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getWorkerZoneBytes() {
    java.lang.Object ref = workerZone_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      workerZone_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENABLE_STREAMING_ENGINE_FIELD_NUMBER = 15;
  private boolean enableStreamingEngine_;
  /**
   *
   *
   * <pre>
   * Whether to enable Streaming Engine for the job.
   * </pre>
   *
   * <code>bool enable_streaming_engine = 15;</code>
   *
   * @return The enableStreamingEngine.
   */
  @java.lang.Override
  public boolean getEnableStreamingEngine() {
    return enableStreamingEngine_;
  }

  public static final int FLEXRS_GOAL_FIELD_NUMBER = 16;
  private int flexrsGoal_;
  /**
   *
   *
   * <pre>
   * Set FlexRS goal for the job.
   * https://cloud.google.com/dataflow/docs/guides/flexrs
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
   *
   * @return The enum numeric value on the wire for flexrsGoal.
   */
  @java.lang.Override
  public int getFlexrsGoalValue() {
    return flexrsGoal_;
  }
  /**
   *
   *
   * <pre>
   * Set FlexRS goal for the job.
   * https://cloud.google.com/dataflow/docs/guides/flexrs
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
   *
   * @return The flexrsGoal.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.FlexResourceSchedulingGoal getFlexrsGoal() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.FlexResourceSchedulingGoal result =
        com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.valueOf(flexrsGoal_);
    return result == null
        ? com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.UNRECOGNIZED
        : result;
  }

  public static final int STAGING_LOCATION_FIELD_NUMBER = 17;
  private volatile java.lang.Object stagingLocation_;
  /**
   *
   *
   * <pre>
   * The Cloud Storage path for staging local files.
   * Must be a valid Cloud Storage URL, beginning with `gs://`.
   * </pre>
   *
   * <code>string staging_location = 17;</code>
   *
   * @return The stagingLocation.
   */
  @java.lang.Override
  public java.lang.String getStagingLocation() {
    java.lang.Object ref = stagingLocation_;
    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();
      stagingLocation_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The Cloud Storage path for staging local files.
   * Must be a valid Cloud Storage URL, beginning with `gs://`.
   * </pre>
   *
   * <code>string staging_location = 17;</code>
   *
   * @return The bytes for stagingLocation.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getStagingLocationBytes() {
    java.lang.Object ref = stagingLocation_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      stagingLocation_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SDK_CONTAINER_IMAGE_FIELD_NUMBER = 18;
  private volatile java.lang.Object sdkContainerImage_;
  /**
   *
   *
   * <pre>
   * Docker registry location of container image to use for the 'worker harness.
   * Default is the container for the version of the SDK. Note this field is
   * only valid for portable pipelines.
   * </pre>
   *
   * <code>string sdk_container_image = 18;</code>
   *
   * @return The sdkContainerImage.
   */
  @java.lang.Override
  public java.lang.String getSdkContainerImage() {
    java.lang.Object ref = sdkContainerImage_;
    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();
      sdkContainerImage_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Docker registry location of container image to use for the 'worker harness.
   * Default is the container for the version of the SDK. Note this field is
   * only valid for portable pipelines.
   * </pre>
   *
   * <code>string sdk_container_image = 18;</code>
   *
   * @return The bytes for sdkContainerImage.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSdkContainerImageBytes() {
    java.lang.Object ref = sdkContainerImage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      sdkContainerImage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISK_SIZE_GB_FIELD_NUMBER = 20;
  private int diskSizeGb_;
  /**
   *
   *
   * <pre>
   * Worker disk size, in gigabytes.
   * </pre>
   *
   * <code>int32 disk_size_gb = 20;</code>
   *
   * @return The diskSizeGb.
   */
  @java.lang.Override
  public int getDiskSizeGb() {
    return diskSizeGb_;
  }

  public static final int AUTOSCALING_ALGORITHM_FIELD_NUMBER = 21;
  private int autoscalingAlgorithm_;
  /**
   *
   *
   * <pre>
   * The algorithm to use for autoscaling
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
   *
   * @return The enum numeric value on the wire for autoscalingAlgorithm.
   */
  @java.lang.Override
  public int getAutoscalingAlgorithmValue() {
    return autoscalingAlgorithm_;
  }
  /**
   *
   *
   * <pre>
   * The algorithm to use for autoscaling
   * </pre>
   *
   * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
   *
   * @return The autoscalingAlgorithm.
   */
  @java.lang.Override
  public com.google.dataflow.v1beta3.AutoscalingAlgorithm getAutoscalingAlgorithm() {
    @SuppressWarnings("deprecation")
    com.google.dataflow.v1beta3.AutoscalingAlgorithm result =
        com.google.dataflow.v1beta3.AutoscalingAlgorithm.valueOf(autoscalingAlgorithm_);
    return result == null ? com.google.dataflow.v1beta3.AutoscalingAlgorithm.UNRECOGNIZED : result;
  }

  public static final int DUMP_HEAP_ON_OOM_FIELD_NUMBER = 22;
  private boolean dumpHeapOnOom_;
  /**
   *
   *
   * <pre>
   * If true, save a heap dump before killing a thread or process which is GC
   * thrashing or out of memory. The location of the heap file will either be
   * echoed back to the user, or the user will be given the opportunity to
   * download the heap file.
   * </pre>
   *
   * <code>bool dump_heap_on_oom = 22;</code>
   *
   * @return The dumpHeapOnOom.
   */
  @java.lang.Override
  public boolean getDumpHeapOnOom() {
    return dumpHeapOnOom_;
  }

  public static final int SAVE_HEAP_DUMPS_TO_GCS_PATH_FIELD_NUMBER = 23;
  private volatile java.lang.Object saveHeapDumpsToGcsPath_;
  /**
   *
   *
   * <pre>
   * Cloud Storage bucket (directory) to upload heap dumps to the given
   * location. Enabling this implies that heap dumps should be generated on OOM
   * (dump_heap_on_oom is set to true).
   * </pre>
   *
   * <code>string save_heap_dumps_to_gcs_path = 23;</code>
   *
   * @return The saveHeapDumpsToGcsPath.
   */
  @java.lang.Override
  public java.lang.String getSaveHeapDumpsToGcsPath() {
    java.lang.Object ref = saveHeapDumpsToGcsPath_;
    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();
      saveHeapDumpsToGcsPath_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Cloud Storage bucket (directory) to upload heap dumps to the given
   * location. Enabling this implies that heap dumps should be generated on OOM
   * (dump_heap_on_oom is set to true).
   * </pre>
   *
   * <code>string save_heap_dumps_to_gcs_path = 23;</code>
   *
   * @return The bytes for saveHeapDumpsToGcsPath.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSaveHeapDumpsToGcsPathBytes() {
    java.lang.Object ref = saveHeapDumpsToGcsPath_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      saveHeapDumpsToGcsPath_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LAUNCHER_MACHINE_TYPE_FIELD_NUMBER = 24;
  private volatile java.lang.Object launcherMachineType_;
  /**
   *
   *
   * <pre>
   * The machine type to use for launching the job. The default is
   * n1-standard-1.
   * </pre>
   *
   * <code>string launcher_machine_type = 24;</code>
   *
   * @return The launcherMachineType.
   */
  @java.lang.Override
  public java.lang.String getLauncherMachineType() {
    java.lang.Object ref = launcherMachineType_;
    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();
      launcherMachineType_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The machine type to use for launching the job. The default is
   * n1-standard-1.
   * </pre>
   *
   * <code>string launcher_machine_type = 24;</code>
   *
   * @return The bytes for launcherMachineType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getLauncherMachineTypeBytes() {
    java.lang.Object ref = launcherMachineType_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      launcherMachineType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (numWorkers_ != 0) {
      output.writeInt32(1, numWorkers_);
    }
    if (maxWorkers_ != 0) {
      output.writeInt32(2, maxWorkers_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempLocation_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tempLocation_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, machineType_);
    }
    for (int i = 0; i < additionalExperiments_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(
          output, 7, additionalExperiments_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 9, subnetwork_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output,
        internalGetAdditionalUserLabels(),
        AdditionalUserLabelsDefaultEntryHolder.defaultEntry,
        10);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, kmsKeyName_);
    }
    if (ipConfiguration_
        != com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.WORKER_IP_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(12, ipConfiguration_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerRegion_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 13, workerRegion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerZone_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, workerZone_);
    }
    if (enableStreamingEngine_ != false) {
      output.writeBool(15, enableStreamingEngine_);
    }
    if (flexrsGoal_
        != com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.FLEXRS_UNSPECIFIED.getNumber()) {
      output.writeEnum(16, flexrsGoal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stagingLocation_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, stagingLocation_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkContainerImage_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, sdkContainerImage_);
    }
    if (diskSizeGb_ != 0) {
      output.writeInt32(20, diskSizeGb_);
    }
    if (autoscalingAlgorithm_
        != com.google.dataflow.v1beta3.AutoscalingAlgorithm.AUTOSCALING_ALGORITHM_UNKNOWN
            .getNumber()) {
      output.writeEnum(21, autoscalingAlgorithm_);
    }
    if (dumpHeapOnOom_ != false) {
      output.writeBool(22, dumpHeapOnOom_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(saveHeapDumpsToGcsPath_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 23, saveHeapDumpsToGcsPath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(launcherMachineType_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 24, launcherMachineType_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (numWorkers_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numWorkers_);
    }
    if (maxWorkers_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxWorkers_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tempLocation_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tempLocation_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, machineType_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < additionalExperiments_.size(); i++) {
        dataSize += computeStringSizeNoTag(additionalExperiments_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getAdditionalExperimentsList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, network_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, subnetwork_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetAdditionalUserLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> additionalUserLabels__ =
          AdditionalUserLabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, additionalUserLabels__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, kmsKeyName_);
    }
    if (ipConfiguration_
        != com.google.dataflow.v1beta3.WorkerIPAddressConfiguration.WORKER_IP_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, ipConfiguration_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerRegion_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, workerRegion_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workerZone_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, workerZone_);
    }
    if (enableStreamingEngine_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, enableStreamingEngine_);
    }
    if (flexrsGoal_
        != com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.FLEXRS_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, flexrsGoal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stagingLocation_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, stagingLocation_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sdkContainerImage_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, sdkContainerImage_);
    }
    if (diskSizeGb_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(20, diskSizeGb_);
    }
    if (autoscalingAlgorithm_
        != com.google.dataflow.v1beta3.AutoscalingAlgorithm.AUTOSCALING_ALGORITHM_UNKNOWN
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(21, autoscalingAlgorithm_);
    }
    if (dumpHeapOnOom_ != false) {
      size += com.google.protobuf.CodedOutputStream.computeBoolSize(22, dumpHeapOnOom_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(saveHeapDumpsToGcsPath_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, saveHeapDumpsToGcsPath_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(launcherMachineType_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, launcherMachineType_);
    }
    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.FlexTemplateRuntimeEnvironment)) {
      return super.equals(obj);
    }
    com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment other =
        (com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment) obj;

    if (getNumWorkers() != other.getNumWorkers()) return false;
    if (getMaxWorkers() != other.getMaxWorkers()) return false;
    if (!getZone().equals(other.getZone())) return false;
    if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false;
    if (!getTempLocation().equals(other.getTempLocation())) return false;
    if (!getMachineType().equals(other.getMachineType())) return false;
    if (!getAdditionalExperimentsList().equals(other.getAdditionalExperimentsList())) return false;
    if (!getNetwork().equals(other.getNetwork())) return false;
    if (!getSubnetwork().equals(other.getSubnetwork())) return false;
    if (!internalGetAdditionalUserLabels().equals(other.internalGetAdditionalUserLabels()))
      return false;
    if (!getKmsKeyName().equals(other.getKmsKeyName())) return false;
    if (ipConfiguration_ != other.ipConfiguration_) return false;
    if (!getWorkerRegion().equals(other.getWorkerRegion())) return false;
    if (!getWorkerZone().equals(other.getWorkerZone())) return false;
    if (getEnableStreamingEngine() != other.getEnableStreamingEngine()) return false;
    if (flexrsGoal_ != other.flexrsGoal_) return false;
    if (!getStagingLocation().equals(other.getStagingLocation())) return false;
    if (!getSdkContainerImage().equals(other.getSdkContainerImage())) return false;
    if (getDiskSizeGb() != other.getDiskSizeGb()) return false;
    if (autoscalingAlgorithm_ != other.autoscalingAlgorithm_) return false;
    if (getDumpHeapOnOom() != other.getDumpHeapOnOom()) return false;
    if (!getSaveHeapDumpsToGcsPath().equals(other.getSaveHeapDumpsToGcsPath())) return false;
    if (!getLauncherMachineType().equals(other.getLauncherMachineType())) 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) + NUM_WORKERS_FIELD_NUMBER;
    hash = (53 * hash) + getNumWorkers();
    hash = (37 * hash) + MAX_WORKERS_FIELD_NUMBER;
    hash = (53 * hash) + getMaxWorkers();
    hash = (37 * hash) + ZONE_FIELD_NUMBER;
    hash = (53 * hash) + getZone().hashCode();
    hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER;
    hash = (53 * hash) + getServiceAccountEmail().hashCode();
    hash = (37 * hash) + TEMP_LOCATION_FIELD_NUMBER;
    hash = (53 * hash) + getTempLocation().hashCode();
    hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getMachineType().hashCode();
    if (getAdditionalExperimentsCount() > 0) {
      hash = (37 * hash) + ADDITIONAL_EXPERIMENTS_FIELD_NUMBER;
      hash = (53 * hash) + getAdditionalExperimentsList().hashCode();
    }
    hash = (37 * hash) + NETWORK_FIELD_NUMBER;
    hash = (53 * hash) + getNetwork().hashCode();
    hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
    hash = (53 * hash) + getSubnetwork().hashCode();
    if (!internalGetAdditionalUserLabels().getMap().isEmpty()) {
      hash = (37 * hash) + ADDITIONAL_USER_LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetAdditionalUserLabels().hashCode();
    }
    hash = (37 * hash) + KMS_KEY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getKmsKeyName().hashCode();
    hash = (37 * hash) + IP_CONFIGURATION_FIELD_NUMBER;
    hash = (53 * hash) + ipConfiguration_;
    hash = (37 * hash) + WORKER_REGION_FIELD_NUMBER;
    hash = (53 * hash) + getWorkerRegion().hashCode();
    hash = (37 * hash) + WORKER_ZONE_FIELD_NUMBER;
    hash = (53 * hash) + getWorkerZone().hashCode();
    hash = (37 * hash) + ENABLE_STREAMING_ENGINE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableStreamingEngine());
    hash = (37 * hash) + FLEXRS_GOAL_FIELD_NUMBER;
    hash = (53 * hash) + flexrsGoal_;
    hash = (37 * hash) + STAGING_LOCATION_FIELD_NUMBER;
    hash = (53 * hash) + getStagingLocation().hashCode();
    hash = (37 * hash) + SDK_CONTAINER_IMAGE_FIELD_NUMBER;
    hash = (53 * hash) + getSdkContainerImage().hashCode();
    hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER;
    hash = (53 * hash) + getDiskSizeGb();
    hash = (37 * hash) + AUTOSCALING_ALGORITHM_FIELD_NUMBER;
    hash = (53 * hash) + autoscalingAlgorithm_;
    hash = (37 * hash) + DUMP_HEAP_ON_OOM_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDumpHeapOnOom());
    hash = (37 * hash) + SAVE_HEAP_DUMPS_TO_GCS_PATH_FIELD_NUMBER;
    hash = (53 * hash) + getSaveHeapDumpsToGcsPath().hashCode();
    hash = (37 * hash) + LAUNCHER_MACHINE_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + getLauncherMachineType().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

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

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

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

  public static com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment 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.FlexTemplateRuntimeEnvironment 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>
   * The environment values to be set at runtime for flex template.
   * </pre>
   *
   * Protobuf type {@code google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment)
      com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironmentOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.dataflow.v1beta3.TemplatesProto
          .internal_static_google_dataflow_v1beta3_FlexTemplateRuntimeEnvironment_descriptor;
    }

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

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

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

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

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

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      numWorkers_ = 0;

      maxWorkers_ = 0;

      zone_ = "";

      serviceAccountEmail_ = "";

      tempLocation_ = "";

      machineType_ = "";

      additionalExperiments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      network_ = "";

      subnetwork_ = "";

      internalGetMutableAdditionalUserLabels().clear();
      kmsKeyName_ = "";

      ipConfiguration_ = 0;

      workerRegion_ = "";

      workerZone_ = "";

      enableStreamingEngine_ = false;

      flexrsGoal_ = 0;

      stagingLocation_ = "";

      sdkContainerImage_ = "";

      diskSizeGb_ = 0;

      autoscalingAlgorithm_ = 0;

      dumpHeapOnOom_ = false;

      saveHeapDumpsToGcsPath_ = "";

      launcherMachineType_ = "";

      return this;
    }

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

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

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

    @java.lang.Override
    public com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment buildPartial() {
      com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment result =
          new com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment(this);
      int from_bitField0_ = bitField0_;
      result.numWorkers_ = numWorkers_;
      result.maxWorkers_ = maxWorkers_;
      result.zone_ = zone_;
      result.serviceAccountEmail_ = serviceAccountEmail_;
      result.tempLocation_ = tempLocation_;
      result.machineType_ = machineType_;
      if (((bitField0_ & 0x00000001) != 0)) {
        additionalExperiments_ = additionalExperiments_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.additionalExperiments_ = additionalExperiments_;
      result.network_ = network_;
      result.subnetwork_ = subnetwork_;
      result.additionalUserLabels_ = internalGetAdditionalUserLabels();
      result.additionalUserLabels_.makeImmutable();
      result.kmsKeyName_ = kmsKeyName_;
      result.ipConfiguration_ = ipConfiguration_;
      result.workerRegion_ = workerRegion_;
      result.workerZone_ = workerZone_;
      result.enableStreamingEngine_ = enableStreamingEngine_;
      result.flexrsGoal_ = flexrsGoal_;
      result.stagingLocation_ = stagingLocation_;
      result.sdkContainerImage_ = sdkContainerImage_;
      result.diskSizeGb_ = diskSizeGb_;
      result.autoscalingAlgorithm_ = autoscalingAlgorithm_;
      result.dumpHeapOnOom_ = dumpHeapOnOom_;
      result.saveHeapDumpsToGcsPath_ = saveHeapDumpsToGcsPath_;
      result.launcherMachineType_ = launcherMachineType_;
      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.FlexTemplateRuntimeEnvironment) {
        return mergeFrom((com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment other) {
      if (other == com.google.dataflow.v1beta3.FlexTemplateRuntimeEnvironment.getDefaultInstance())
        return this;
      if (other.getNumWorkers() != 0) {
        setNumWorkers(other.getNumWorkers());
      }
      if (other.getMaxWorkers() != 0) {
        setMaxWorkers(other.getMaxWorkers());
      }
      if (!other.getZone().isEmpty()) {
        zone_ = other.zone_;
        onChanged();
      }
      if (!other.getServiceAccountEmail().isEmpty()) {
        serviceAccountEmail_ = other.serviceAccountEmail_;
        onChanged();
      }
      if (!other.getTempLocation().isEmpty()) {
        tempLocation_ = other.tempLocation_;
        onChanged();
      }
      if (!other.getMachineType().isEmpty()) {
        machineType_ = other.machineType_;
        onChanged();
      }
      if (!other.additionalExperiments_.isEmpty()) {
        if (additionalExperiments_.isEmpty()) {
          additionalExperiments_ = other.additionalExperiments_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureAdditionalExperimentsIsMutable();
          additionalExperiments_.addAll(other.additionalExperiments_);
        }
        onChanged();
      }
      if (!other.getNetwork().isEmpty()) {
        network_ = other.network_;
        onChanged();
      }
      if (!other.getSubnetwork().isEmpty()) {
        subnetwork_ = other.subnetwork_;
        onChanged();
      }
      internalGetMutableAdditionalUserLabels().mergeFrom(other.internalGetAdditionalUserLabels());
      if (!other.getKmsKeyName().isEmpty()) {
        kmsKeyName_ = other.kmsKeyName_;
        onChanged();
      }
      if (other.ipConfiguration_ != 0) {
        setIpConfigurationValue(other.getIpConfigurationValue());
      }
      if (!other.getWorkerRegion().isEmpty()) {
        workerRegion_ = other.workerRegion_;
        onChanged();
      }
      if (!other.getWorkerZone().isEmpty()) {
        workerZone_ = other.workerZone_;
        onChanged();
      }
      if (other.getEnableStreamingEngine() != false) {
        setEnableStreamingEngine(other.getEnableStreamingEngine());
      }
      if (other.flexrsGoal_ != 0) {
        setFlexrsGoalValue(other.getFlexrsGoalValue());
      }
      if (!other.getStagingLocation().isEmpty()) {
        stagingLocation_ = other.stagingLocation_;
        onChanged();
      }
      if (!other.getSdkContainerImage().isEmpty()) {
        sdkContainerImage_ = other.sdkContainerImage_;
        onChanged();
      }
      if (other.getDiskSizeGb() != 0) {
        setDiskSizeGb(other.getDiskSizeGb());
      }
      if (other.autoscalingAlgorithm_ != 0) {
        setAutoscalingAlgorithmValue(other.getAutoscalingAlgorithmValue());
      }
      if (other.getDumpHeapOnOom() != false) {
        setDumpHeapOnOom(other.getDumpHeapOnOom());
      }
      if (!other.getSaveHeapDumpsToGcsPath().isEmpty()) {
        saveHeapDumpsToGcsPath_ = other.saveHeapDumpsToGcsPath_;
        onChanged();
      }
      if (!other.getLauncherMachineType().isEmpty()) {
        launcherMachineType_ = other.launcherMachineType_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private int bitField0_;

    private int numWorkers_;
    /**
     *
     *
     * <pre>
     * The initial number of Google Compute Engine instances for the job.
     * </pre>
     *
     * <code>int32 num_workers = 1;</code>
     *
     * @return The numWorkers.
     */
    @java.lang.Override
    public int getNumWorkers() {
      return numWorkers_;
    }
    /**
     *
     *
     * <pre>
     * The initial number of Google Compute Engine instances for the job.
     * </pre>
     *
     * <code>int32 num_workers = 1;</code>
     *
     * @param value The numWorkers to set.
     * @return This builder for chaining.
     */
    public Builder setNumWorkers(int value) {

      numWorkers_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The initial number of Google Compute Engine instances for the job.
     * </pre>
     *
     * <code>int32 num_workers = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearNumWorkers() {

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

    private int maxWorkers_;
    /**
     *
     *
     * <pre>
     * The maximum number of Google Compute Engine instances to be made
     * available to your pipeline during execution, from 1 to 1000.
     * </pre>
     *
     * <code>int32 max_workers = 2;</code>
     *
     * @return The maxWorkers.
     */
    @java.lang.Override
    public int getMaxWorkers() {
      return maxWorkers_;
    }
    /**
     *
     *
     * <pre>
     * The maximum number of Google Compute Engine instances to be made
     * available to your pipeline during execution, from 1 to 1000.
     * </pre>
     *
     * <code>int32 max_workers = 2;</code>
     *
     * @param value The maxWorkers to set.
     * @return This builder for chaining.
     */
    public Builder setMaxWorkers(int value) {

      maxWorkers_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The maximum number of Google Compute Engine instances to be made
     * available to your pipeline during execution, from 1 to 1000.
     * </pre>
     *
     * <code>int32 max_workers = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMaxWorkers() {

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

    private java.lang.Object zone_ = "";
    /**
     *
     *
     * <pre>
     * The Compute Engine [availability
     * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
     * for launching worker instances to run your pipeline.
     * In the future, worker_zone will take precedence.
     * </pre>
     *
     * <code>string zone = 3;</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>
     * The Compute Engine [availability
     * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
     * for launching worker instances to run your pipeline.
     * In the future, worker_zone will take precedence.
     * </pre>
     *
     * <code>string zone = 3;</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>
     * The Compute Engine [availability
     * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
     * for launching worker instances to run your pipeline.
     * In the future, worker_zone will take precedence.
     * </pre>
     *
     * <code>string zone = 3;</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>
     * The Compute Engine [availability
     * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
     * for launching worker instances to run your pipeline.
     * In the future, worker_zone will take precedence.
     * </pre>
     *
     * <code>string zone = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearZone() {

      zone_ = getDefaultInstance().getZone();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine [availability
     * zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones)
     * for launching worker instances to run your pipeline.
     * In the future, worker_zone will take precedence.
     * </pre>
     *
     * <code>string zone = 3;</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 java.lang.Object serviceAccountEmail_ = "";
    /**
     *
     *
     * <pre>
     * The email address of the service account to run the job as.
     * </pre>
     *
     * <code>string service_account_email = 4;</code>
     *
     * @return The serviceAccountEmail.
     */
    public java.lang.String getServiceAccountEmail() {
      java.lang.Object ref = serviceAccountEmail_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        serviceAccountEmail_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The email address of the service account to run the job as.
     * </pre>
     *
     * <code>string service_account_email = 4;</code>
     *
     * @return The bytes for serviceAccountEmail.
     */
    public com.google.protobuf.ByteString getServiceAccountEmailBytes() {
      java.lang.Object ref = serviceAccountEmail_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        serviceAccountEmail_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The email address of the service account to run the job as.
     * </pre>
     *
     * <code>string service_account_email = 4;</code>
     *
     * @param value The serviceAccountEmail to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccountEmail(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      serviceAccountEmail_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The email address of the service account to run the job as.
     * </pre>
     *
     * <code>string service_account_email = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServiceAccountEmail() {

      serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The email address of the service account to run the job as.
     * </pre>
     *
     * <code>string service_account_email = 4;</code>
     *
     * @param value The bytes for serviceAccountEmail to set.
     * @return This builder for chaining.
     */
    public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object tempLocation_ = "";
    /**
     *
     *
     * <pre>
     * The Cloud Storage path to use for temporary files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string temp_location = 5;</code>
     *
     * @return The tempLocation.
     */
    public java.lang.String getTempLocation() {
      java.lang.Object ref = tempLocation_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        tempLocation_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path to use for temporary files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string temp_location = 5;</code>
     *
     * @return The bytes for tempLocation.
     */
    public com.google.protobuf.ByteString getTempLocationBytes() {
      java.lang.Object ref = tempLocation_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        tempLocation_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path to use for temporary files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string temp_location = 5;</code>
     *
     * @param value The tempLocation to set.
     * @return This builder for chaining.
     */
    public Builder setTempLocation(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      tempLocation_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path to use for temporary files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string temp_location = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearTempLocation() {

      tempLocation_ = getDefaultInstance().getTempLocation();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path to use for temporary files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string temp_location = 5;</code>
     *
     * @param value The bytes for tempLocation to set.
     * @return This builder for chaining.
     */
    public Builder setTempLocationBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object machineType_ = "";
    /**
     *
     *
     * <pre>
     * The machine type to use for the job. Defaults to the value from the
     * template if not specified.
     * </pre>
     *
     * <code>string machine_type = 6;</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>
     * The machine type to use for the job. Defaults to the value from the
     * template if not specified.
     * </pre>
     *
     * <code>string machine_type = 6;</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>
     * The machine type to use for the job. Defaults to the value from the
     * template if not specified.
     * </pre>
     *
     * <code>string machine_type = 6;</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>
     * The machine type to use for the job. Defaults to the value from the
     * template if not specified.
     * </pre>
     *
     * <code>string machine_type = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMachineType() {

      machineType_ = getDefaultInstance().getMachineType();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The machine type to use for the job. Defaults to the value from the
     * template if not specified.
     * </pre>
     *
     * <code>string machine_type = 6;</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 com.google.protobuf.LazyStringList additionalExperiments_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureAdditionalExperimentsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        additionalExperiments_ =
            new com.google.protobuf.LazyStringArrayList(additionalExperiments_);
        bitField0_ |= 0x00000001;
      }
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @return A list containing the additionalExperiments.
     */
    public com.google.protobuf.ProtocolStringList getAdditionalExperimentsList() {
      return additionalExperiments_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @return The count of additionalExperiments.
     */
    public int getAdditionalExperimentsCount() {
      return additionalExperiments_.size();
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param index The index of the element to return.
     * @return The additionalExperiments at the given index.
     */
    public java.lang.String getAdditionalExperiments(int index) {
      return additionalExperiments_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the additionalExperiments at the given index.
     */
    public com.google.protobuf.ByteString getAdditionalExperimentsBytes(int index) {
      return additionalExperiments_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param index The index to set the value at.
     * @param value The additionalExperiments to set.
     * @return This builder for chaining.
     */
    public Builder setAdditionalExperiments(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAdditionalExperimentsIsMutable();
      additionalExperiments_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param value The additionalExperiments to add.
     * @return This builder for chaining.
     */
    public Builder addAdditionalExperiments(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureAdditionalExperimentsIsMutable();
      additionalExperiments_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param values The additionalExperiments to add.
     * @return This builder for chaining.
     */
    public Builder addAllAdditionalExperiments(java.lang.Iterable<java.lang.String> values) {
      ensureAdditionalExperimentsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalExperiments_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAdditionalExperiments() {
      additionalExperiments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional experiment flags for the job.
     * </pre>
     *
     * <code>repeated string additional_experiments = 7;</code>
     *
     * @param value The bytes of the additionalExperiments to add.
     * @return This builder for chaining.
     */
    public Builder addAdditionalExperimentsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureAdditionalExperimentsIsMutable();
      additionalExperiments_.add(value);
      onChanged();
      return this;
    }

    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 = 8;</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 = 8;</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 = 8;</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 = 8;</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 = 8;</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. You can specify a
     * subnetwork using either a complete URL or an abbreviated path. Expected to
     * be of the form
     * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
     * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
     * a Shared VPC network, you must use the complete URL.
     * </pre>
     *
     * <code>string subnetwork = 9;</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. You can specify a
     * subnetwork using either a complete URL or an abbreviated path. Expected to
     * be of the form
     * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
     * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
     * a Shared VPC network, you must use the complete URL.
     * </pre>
     *
     * <code>string subnetwork = 9;</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. You can specify a
     * subnetwork using either a complete URL or an abbreviated path. Expected to
     * be of the form
     * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
     * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
     * a Shared VPC network, you must use the complete URL.
     * </pre>
     *
     * <code>string subnetwork = 9;</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. You can specify a
     * subnetwork using either a complete URL or an abbreviated path. Expected to
     * be of the form
     * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
     * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
     * a Shared VPC network, you must use the complete URL.
     * </pre>
     *
     * <code>string subnetwork = 9;</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. You can specify a
     * subnetwork using either a complete URL or an abbreviated path. Expected to
     * be of the form
     * "https://www.googleapis.com/compute/v1/projects/HOST_PROJECT_ID/regions/REGION/subnetworks/SUBNETWORK"
     * or "regions/REGION/subnetworks/SUBNETWORK". If the subnetwork is located in
     * a Shared VPC network, you must use the complete URL.
     * </pre>
     *
     * <code>string subnetwork = 9;</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 com.google.protobuf.MapField<java.lang.String, java.lang.String> additionalUserLabels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetAdditionalUserLabels() {
      if (additionalUserLabels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            AdditionalUserLabelsDefaultEntryHolder.defaultEntry);
      }
      return additionalUserLabels_;
    }

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

    public int getAdditionalUserLabelsCount() {
      return internalGetAdditionalUserLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    @java.lang.Override
    public boolean containsAdditionalUserLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetAdditionalUserLabels().getMap().containsKey(key);
    }
    /** Use {@link #getAdditionalUserLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getAdditionalUserLabels() {
      return getAdditionalUserLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getAdditionalUserLabelsMap() {
      return internalGetAdditionalUserLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    @java.lang.Override
    public java.lang.String getAdditionalUserLabelsOrDefault(
        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 =
          internalGetAdditionalUserLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    @java.lang.Override
    public java.lang.String getAdditionalUserLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetAdditionalUserLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearAdditionalUserLabels() {
      internalGetMutableAdditionalUserLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    public Builder removeAdditionalUserLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableAdditionalUserLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableAdditionalUserLabels() {
      return internalGetMutableAdditionalUserLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    public Builder putAdditionalUserLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }

      internalGetMutableAdditionalUserLabels().getMutableMap().put(key, value);
      return this;
    }
    /**
     *
     *
     * <pre>
     * Additional user labels to be specified for the job.
     * Keys and values must follow the restrictions specified in the [labeling
     * restrictions](https://cloud.google.com/compute/docs/labeling-resources#restrictions)
     * page.
     * An object containing a list of "key": value pairs.
     * Example: { "name": "wrench", "mass": "1kg", "count": "3" }.
     * </pre>
     *
     * <code>map&lt;string, string&gt; additional_user_labels = 10;</code>
     */
    public Builder putAllAdditionalUserLabels(
        java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableAdditionalUserLabels().getMutableMap().putAll(values);
      return this;
    }

    private java.lang.Object kmsKeyName_ = "";
    /**
     *
     *
     * <pre>
     * Name for the Cloud KMS key for the job.
     * Key format is:
     * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
     * </pre>
     *
     * <code>string kms_key_name = 11;</code>
     *
     * @return The kmsKeyName.
     */
    public java.lang.String getKmsKeyName() {
      java.lang.Object ref = kmsKeyName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        kmsKeyName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Name for the Cloud KMS key for the job.
     * Key format is:
     * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
     * </pre>
     *
     * <code>string kms_key_name = 11;</code>
     *
     * @return The bytes for kmsKeyName.
     */
    public com.google.protobuf.ByteString getKmsKeyNameBytes() {
      java.lang.Object ref = kmsKeyName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        kmsKeyName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Name for the Cloud KMS key for the job.
     * Key format is:
     * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
     * </pre>
     *
     * <code>string kms_key_name = 11;</code>
     *
     * @param value The kmsKeyName to set.
     * @return This builder for chaining.
     */
    public Builder setKmsKeyName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      kmsKeyName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Name for the Cloud KMS key for the job.
     * Key format is:
     * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
     * </pre>
     *
     * <code>string kms_key_name = 11;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearKmsKeyName() {

      kmsKeyName_ = getDefaultInstance().getKmsKeyName();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Name for the Cloud KMS key for the job.
     * Key format is:
     * projects/&lt;project&gt;/locations/&lt;location&gt;/keyRings/&lt;keyring&gt;/cryptoKeys/&lt;key&gt;
     * </pre>
     *
     * <code>string kms_key_name = 11;</code>
     *
     * @param value The bytes for kmsKeyName to set.
     * @return This builder for chaining.
     */
    public Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private int ipConfiguration_ = 0;
    /**
     *
     *
     * <pre>
     * Configuration for VM IPs.
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.WorkerIPAddressConfiguration ip_configuration = 12;</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 = 12;</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 = 12;</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 = 12;</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 = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIpConfiguration() {

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

    private java.lang.Object workerRegion_ = "";
    /**
     *
     *
     * <pre>
     * The Compute Engine region
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1". Mutually exclusive
     * with worker_zone. If neither worker_region nor worker_zone is specified,
     * default to the control plane's region.
     * </pre>
     *
     * <code>string worker_region = 13;</code>
     *
     * @return The workerRegion.
     */
    public java.lang.String getWorkerRegion() {
      java.lang.Object ref = workerRegion_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        workerRegion_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine region
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1". Mutually exclusive
     * with worker_zone. If neither worker_region nor worker_zone is specified,
     * default to the control plane's region.
     * </pre>
     *
     * <code>string worker_region = 13;</code>
     *
     * @return The bytes for workerRegion.
     */
    public com.google.protobuf.ByteString getWorkerRegionBytes() {
      java.lang.Object ref = workerRegion_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        workerRegion_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine region
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1". Mutually exclusive
     * with worker_zone. If neither worker_region nor worker_zone is specified,
     * default to the control plane's region.
     * </pre>
     *
     * <code>string worker_region = 13;</code>
     *
     * @param value The workerRegion to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerRegion(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      workerRegion_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine region
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1". Mutually exclusive
     * with worker_zone. If neither worker_region nor worker_zone is specified,
     * default to the control plane's region.
     * </pre>
     *
     * <code>string worker_region = 13;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWorkerRegion() {

      workerRegion_ = getDefaultInstance().getWorkerRegion();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine region
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1". Mutually exclusive
     * with worker_zone. If neither worker_region nor worker_zone is specified,
     * default to the control plane's region.
     * </pre>
     *
     * <code>string worker_region = 13;</code>
     *
     * @param value The bytes for workerRegion to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerRegionBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object workerZone_ = "";
    /**
     *
     *
     * <pre>
     * The Compute Engine zone
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
     * with worker_region. If neither worker_region nor worker_zone is specified,
     * a zone in the control plane's region is chosen based on available capacity.
     * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
     * </pre>
     *
     * <code>string worker_zone = 14;</code>
     *
     * @return The workerZone.
     */
    public java.lang.String getWorkerZone() {
      java.lang.Object ref = workerZone_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        workerZone_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
     * with worker_region. If neither worker_region nor worker_zone is specified,
     * a zone in the control plane's region is chosen based on available capacity.
     * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
     * </pre>
     *
     * <code>string worker_zone = 14;</code>
     *
     * @return The bytes for workerZone.
     */
    public com.google.protobuf.ByteString getWorkerZoneBytes() {
      java.lang.Object ref = workerZone_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        workerZone_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
     * with worker_region. If neither worker_region nor worker_zone is specified,
     * a zone in the control plane's region is chosen based on available capacity.
     * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
     * </pre>
     *
     * <code>string worker_zone = 14;</code>
     *
     * @param value The workerZone to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerZone(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      workerZone_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
     * with worker_region. If neither worker_region nor worker_zone is specified,
     * a zone in the control plane's region is chosen based on available capacity.
     * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
     * </pre>
     *
     * <code>string worker_zone = 14;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearWorkerZone() {

      workerZone_ = getDefaultInstance().getWorkerZone();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Compute Engine zone
     * (https://cloud.google.com/compute/docs/regions-zones/regions-zones) in
     * which worker processing should occur, e.g. "us-west1-a". Mutually exclusive
     * with worker_region. If neither worker_region nor worker_zone is specified,
     * a zone in the control plane's region is chosen based on available capacity.
     * If both `worker_zone` and `zone` are set, `worker_zone` takes precedence.
     * </pre>
     *
     * <code>string worker_zone = 14;</code>
     *
     * @param value The bytes for workerZone to set.
     * @return This builder for chaining.
     */
    public Builder setWorkerZoneBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private boolean enableStreamingEngine_;
    /**
     *
     *
     * <pre>
     * Whether to enable Streaming Engine for the job.
     * </pre>
     *
     * <code>bool enable_streaming_engine = 15;</code>
     *
     * @return The enableStreamingEngine.
     */
    @java.lang.Override
    public boolean getEnableStreamingEngine() {
      return enableStreamingEngine_;
    }
    /**
     *
     *
     * <pre>
     * Whether to enable Streaming Engine for the job.
     * </pre>
     *
     * <code>bool enable_streaming_engine = 15;</code>
     *
     * @param value The enableStreamingEngine to set.
     * @return This builder for chaining.
     */
    public Builder setEnableStreamingEngine(boolean value) {

      enableStreamingEngine_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Whether to enable Streaming Engine for the job.
     * </pre>
     *
     * <code>bool enable_streaming_engine = 15;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEnableStreamingEngine() {

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

    private int flexrsGoal_ = 0;
    /**
     *
     *
     * <pre>
     * Set FlexRS goal for the job.
     * https://cloud.google.com/dataflow/docs/guides/flexrs
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
     *
     * @return The enum numeric value on the wire for flexrsGoal.
     */
    @java.lang.Override
    public int getFlexrsGoalValue() {
      return flexrsGoal_;
    }
    /**
     *
     *
     * <pre>
     * Set FlexRS goal for the job.
     * https://cloud.google.com/dataflow/docs/guides/flexrs
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
     *
     * @param value The enum numeric value on the wire for flexrsGoal to set.
     * @return This builder for chaining.
     */
    public Builder setFlexrsGoalValue(int value) {

      flexrsGoal_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set FlexRS goal for the job.
     * https://cloud.google.com/dataflow/docs/guides/flexrs
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
     *
     * @return The flexrsGoal.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.FlexResourceSchedulingGoal getFlexrsGoal() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.FlexResourceSchedulingGoal result =
          com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.valueOf(flexrsGoal_);
      return result == null
          ? com.google.dataflow.v1beta3.FlexResourceSchedulingGoal.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Set FlexRS goal for the job.
     * https://cloud.google.com/dataflow/docs/guides/flexrs
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
     *
     * @param value The flexrsGoal to set.
     * @return This builder for chaining.
     */
    public Builder setFlexrsGoal(com.google.dataflow.v1beta3.FlexResourceSchedulingGoal value) {
      if (value == null) {
        throw new NullPointerException();
      }

      flexrsGoal_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Set FlexRS goal for the job.
     * https://cloud.google.com/dataflow/docs/guides/flexrs
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.FlexResourceSchedulingGoal flexrs_goal = 16;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearFlexrsGoal() {

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

    private java.lang.Object stagingLocation_ = "";
    /**
     *
     *
     * <pre>
     * The Cloud Storage path for staging local files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string staging_location = 17;</code>
     *
     * @return The stagingLocation.
     */
    public java.lang.String getStagingLocation() {
      java.lang.Object ref = stagingLocation_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        stagingLocation_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path for staging local files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string staging_location = 17;</code>
     *
     * @return The bytes for stagingLocation.
     */
    public com.google.protobuf.ByteString getStagingLocationBytes() {
      java.lang.Object ref = stagingLocation_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        stagingLocation_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path for staging local files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string staging_location = 17;</code>
     *
     * @param value The stagingLocation to set.
     * @return This builder for chaining.
     */
    public Builder setStagingLocation(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      stagingLocation_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path for staging local files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string staging_location = 17;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearStagingLocation() {

      stagingLocation_ = getDefaultInstance().getStagingLocation();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Cloud Storage path for staging local files.
     * Must be a valid Cloud Storage URL, beginning with `gs://`.
     * </pre>
     *
     * <code>string staging_location = 17;</code>
     *
     * @param value The bytes for stagingLocation to set.
     * @return This builder for chaining.
     */
    public Builder setStagingLocationBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object sdkContainerImage_ = "";
    /**
     *
     *
     * <pre>
     * Docker registry location of container image to use for the 'worker harness.
     * Default is the container for the version of the SDK. Note this field is
     * only valid for portable pipelines.
     * </pre>
     *
     * <code>string sdk_container_image = 18;</code>
     *
     * @return The sdkContainerImage.
     */
    public java.lang.String getSdkContainerImage() {
      java.lang.Object ref = sdkContainerImage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        sdkContainerImage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Docker registry location of container image to use for the 'worker harness.
     * Default is the container for the version of the SDK. Note this field is
     * only valid for portable pipelines.
     * </pre>
     *
     * <code>string sdk_container_image = 18;</code>
     *
     * @return The bytes for sdkContainerImage.
     */
    public com.google.protobuf.ByteString getSdkContainerImageBytes() {
      java.lang.Object ref = sdkContainerImage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        sdkContainerImage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Docker registry location of container image to use for the 'worker harness.
     * Default is the container for the version of the SDK. Note this field is
     * only valid for portable pipelines.
     * </pre>
     *
     * <code>string sdk_container_image = 18;</code>
     *
     * @param value The sdkContainerImage to set.
     * @return This builder for chaining.
     */
    public Builder setSdkContainerImage(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      sdkContainerImage_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Docker registry location of container image to use for the 'worker harness.
     * Default is the container for the version of the SDK. Note this field is
     * only valid for portable pipelines.
     * </pre>
     *
     * <code>string sdk_container_image = 18;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSdkContainerImage() {

      sdkContainerImage_ = getDefaultInstance().getSdkContainerImage();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Docker registry location of container image to use for the 'worker harness.
     * Default is the container for the version of the SDK. Note this field is
     * only valid for portable pipelines.
     * </pre>
     *
     * <code>string sdk_container_image = 18;</code>
     *
     * @param value The bytes for sdkContainerImage to set.
     * @return This builder for chaining.
     */
    public Builder setSdkContainerImageBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private int diskSizeGb_;
    /**
     *
     *
     * <pre>
     * Worker disk size, in gigabytes.
     * </pre>
     *
     * <code>int32 disk_size_gb = 20;</code>
     *
     * @return The diskSizeGb.
     */
    @java.lang.Override
    public int getDiskSizeGb() {
      return diskSizeGb_;
    }
    /**
     *
     *
     * <pre>
     * Worker disk size, in gigabytes.
     * </pre>
     *
     * <code>int32 disk_size_gb = 20;</code>
     *
     * @param value The diskSizeGb to set.
     * @return This builder for chaining.
     */
    public Builder setDiskSizeGb(int value) {

      diskSizeGb_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Worker disk size, in gigabytes.
     * </pre>
     *
     * <code>int32 disk_size_gb = 20;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDiskSizeGb() {

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

    private int autoscalingAlgorithm_ = 0;
    /**
     *
     *
     * <pre>
     * The algorithm to use for autoscaling
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
     *
     * @return The enum numeric value on the wire for autoscalingAlgorithm.
     */
    @java.lang.Override
    public int getAutoscalingAlgorithmValue() {
      return autoscalingAlgorithm_;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for autoscaling
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
     *
     * @param value The enum numeric value on the wire for autoscalingAlgorithm to set.
     * @return This builder for chaining.
     */
    public Builder setAutoscalingAlgorithmValue(int value) {

      autoscalingAlgorithm_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for autoscaling
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
     *
     * @return The autoscalingAlgorithm.
     */
    @java.lang.Override
    public com.google.dataflow.v1beta3.AutoscalingAlgorithm getAutoscalingAlgorithm() {
      @SuppressWarnings("deprecation")
      com.google.dataflow.v1beta3.AutoscalingAlgorithm result =
          com.google.dataflow.v1beta3.AutoscalingAlgorithm.valueOf(autoscalingAlgorithm_);
      return result == null
          ? com.google.dataflow.v1beta3.AutoscalingAlgorithm.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for autoscaling
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
     *
     * @param value The autoscalingAlgorithm to set.
     * @return This builder for chaining.
     */
    public Builder setAutoscalingAlgorithm(com.google.dataflow.v1beta3.AutoscalingAlgorithm value) {
      if (value == null) {
        throw new NullPointerException();
      }

      autoscalingAlgorithm_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The algorithm to use for autoscaling
     * </pre>
     *
     * <code>.google.dataflow.v1beta3.AutoscalingAlgorithm autoscaling_algorithm = 21;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAutoscalingAlgorithm() {

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

    private boolean dumpHeapOnOom_;
    /**
     *
     *
     * <pre>
     * If true, save a heap dump before killing a thread or process which is GC
     * thrashing or out of memory. The location of the heap file will either be
     * echoed back to the user, or the user will be given the opportunity to
     * download the heap file.
     * </pre>
     *
     * <code>bool dump_heap_on_oom = 22;</code>
     *
     * @return The dumpHeapOnOom.
     */
    @java.lang.Override
    public boolean getDumpHeapOnOom() {
      return dumpHeapOnOom_;
    }
    /**
     *
     *
     * <pre>
     * If true, save a heap dump before killing a thread or process which is GC
     * thrashing or out of memory. The location of the heap file will either be
     * echoed back to the user, or the user will be given the opportunity to
     * download the heap file.
     * </pre>
     *
     * <code>bool dump_heap_on_oom = 22;</code>
     *
     * @param value The dumpHeapOnOom to set.
     * @return This builder for chaining.
     */
    public Builder setDumpHeapOnOom(boolean value) {

      dumpHeapOnOom_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * If true, save a heap dump before killing a thread or process which is GC
     * thrashing or out of memory. The location of the heap file will either be
     * echoed back to the user, or the user will be given the opportunity to
     * download the heap file.
     * </pre>
     *
     * <code>bool dump_heap_on_oom = 22;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDumpHeapOnOom() {

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

    private java.lang.Object saveHeapDumpsToGcsPath_ = "";
    /**
     *
     *
     * <pre>
     * Cloud Storage bucket (directory) to upload heap dumps to the given
     * location. Enabling this implies that heap dumps should be generated on OOM
     * (dump_heap_on_oom is set to true).
     * </pre>
     *
     * <code>string save_heap_dumps_to_gcs_path = 23;</code>
     *
     * @return The saveHeapDumpsToGcsPath.
     */
    public java.lang.String getSaveHeapDumpsToGcsPath() {
      java.lang.Object ref = saveHeapDumpsToGcsPath_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        saveHeapDumpsToGcsPath_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Cloud Storage bucket (directory) to upload heap dumps to the given
     * location. Enabling this implies that heap dumps should be generated on OOM
     * (dump_heap_on_oom is set to true).
     * </pre>
     *
     * <code>string save_heap_dumps_to_gcs_path = 23;</code>
     *
     * @return The bytes for saveHeapDumpsToGcsPath.
     */
    public com.google.protobuf.ByteString getSaveHeapDumpsToGcsPathBytes() {
      java.lang.Object ref = saveHeapDumpsToGcsPath_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        saveHeapDumpsToGcsPath_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Cloud Storage bucket (directory) to upload heap dumps to the given
     * location. Enabling this implies that heap dumps should be generated on OOM
     * (dump_heap_on_oom is set to true).
     * </pre>
     *
     * <code>string save_heap_dumps_to_gcs_path = 23;</code>
     *
     * @param value The saveHeapDumpsToGcsPath to set.
     * @return This builder for chaining.
     */
    public Builder setSaveHeapDumpsToGcsPath(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      saveHeapDumpsToGcsPath_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Cloud Storage bucket (directory) to upload heap dumps to the given
     * location. Enabling this implies that heap dumps should be generated on OOM
     * (dump_heap_on_oom is set to true).
     * </pre>
     *
     * <code>string save_heap_dumps_to_gcs_path = 23;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSaveHeapDumpsToGcsPath() {

      saveHeapDumpsToGcsPath_ = getDefaultInstance().getSaveHeapDumpsToGcsPath();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Cloud Storage bucket (directory) to upload heap dumps to the given
     * location. Enabling this implies that heap dumps should be generated on OOM
     * (dump_heap_on_oom is set to true).
     * </pre>
     *
     * <code>string save_heap_dumps_to_gcs_path = 23;</code>
     *
     * @param value The bytes for saveHeapDumpsToGcsPath to set.
     * @return This builder for chaining.
     */
    public Builder setSaveHeapDumpsToGcsPathBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

    private java.lang.Object launcherMachineType_ = "";
    /**
     *
     *
     * <pre>
     * The machine type to use for launching the job. The default is
     * n1-standard-1.
     * </pre>
     *
     * <code>string launcher_machine_type = 24;</code>
     *
     * @return The launcherMachineType.
     */
    public java.lang.String getLauncherMachineType() {
      java.lang.Object ref = launcherMachineType_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        launcherMachineType_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The machine type to use for launching the job. The default is
     * n1-standard-1.
     * </pre>
     *
     * <code>string launcher_machine_type = 24;</code>
     *
     * @return The bytes for launcherMachineType.
     */
    public com.google.protobuf.ByteString getLauncherMachineTypeBytes() {
      java.lang.Object ref = launcherMachineType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        launcherMachineType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The machine type to use for launching the job. The default is
     * n1-standard-1.
     * </pre>
     *
     * <code>string launcher_machine_type = 24;</code>
     *
     * @param value The launcherMachineType to set.
     * @return This builder for chaining.
     */
    public Builder setLauncherMachineType(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      launcherMachineType_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The machine type to use for launching the job. The default is
     * n1-standard-1.
     * </pre>
     *
     * <code>string launcher_machine_type = 24;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearLauncherMachineType() {

      launcherMachineType_ = getDefaultInstance().getLauncherMachineType();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The machine type to use for launching the job. The default is
     * n1-standard-1.
     * </pre>
     *
     * <code>string launcher_machine_type = 24;</code>
     *
     * @param value The bytes for launcherMachineType to set.
     * @return This builder for chaining.
     */
    public Builder setLauncherMachineTypeBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

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

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

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

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

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

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

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

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

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

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

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