// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dataproc/v1/jobs.proto

package com.google.cloud.dataproc.v1;

/**
 * <pre>
 * A Cloud Dataproc job for running
 * [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
 * jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
 * </pre>
 *
 * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob}
 */
public  final class HadoopJob extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.HadoopJob)
    HadoopJobOrBuilder {
private static final long serialVersionUID = 0L;
  // Use HadoopJob.newBuilder() to construct.
  private HadoopJob(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private HadoopJob() {
    args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private HadoopJob(
      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;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();
            driverCase_ = 1;
            driver_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            driverCase_ = 2;
            driver_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              args_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000004;
            }
            args_.add(s);
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
              jarFileUris_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000008;
            }
            jarFileUris_.add(s);
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              fileUris_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000010;
            }
            fileUris_.add(s);
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
              archiveUris_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000020;
            }
            archiveUris_.add(s);
            break;
          }
          case 58: {
            if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
              properties_ = com.google.protobuf.MapField.newMapField(
                  PropertiesDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000040;
            }
            com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
            properties__ = input.readMessage(
                PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            properties_.getMutableMap().put(
                properties__.getKey(), properties__.getValue());
            break;
          }
          case 66: {
            com.google.cloud.dataproc.v1.LoggingConfig.Builder subBuilder = null;
            if (loggingConfig_ != null) {
              subBuilder = loggingConfig_.toBuilder();
            }
            loggingConfig_ = input.readMessage(com.google.cloud.dataproc.v1.LoggingConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(loggingConfig_);
              loggingConfig_ = subBuilder.buildPartial();
            }

            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = args_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
        jarFileUris_ = jarFileUris_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
        fileUris_ = fileUris_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
        archiveUris_ = archiveUris_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 7:
        return internalGetProperties();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.dataproc.v1.HadoopJob.class, com.google.cloud.dataproc.v1.HadoopJob.Builder.class);
  }

  private int bitField0_;
  private int driverCase_ = 0;
  private java.lang.Object driver_;
  public enum DriverCase
      implements com.google.protobuf.Internal.EnumLite {
    MAIN_JAR_FILE_URI(1),
    MAIN_CLASS(2),
    DRIVER_NOT_SET(0);
    private final int value;
    private DriverCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DriverCase valueOf(int value) {
      return forNumber(value);
    }

    public static DriverCase forNumber(int value) {
      switch (value) {
        case 1: return MAIN_JAR_FILE_URI;
        case 2: return MAIN_CLASS;
        case 0: return DRIVER_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DriverCase
  getDriverCase() {
    return DriverCase.forNumber(
        driverCase_);
  }

  public static final int MAIN_JAR_FILE_URI_FIELD_NUMBER = 1;
  /**
   * <pre>
   * The HCFS URI of the jar file containing the main class.
   * Examples:
   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
   * </pre>
   *
   * <code>string main_jar_file_uri = 1;</code>
   */
  public java.lang.String getMainJarFileUri() {
    java.lang.Object ref = "";
    if (driverCase_ == 1) {
      ref = driver_;
    }
    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();
      if (driverCase_ == 1) {
        driver_ = s;
      }
      return s;
    }
  }
  /**
   * <pre>
   * The HCFS URI of the jar file containing the main class.
   * Examples:
   *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
   *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
   *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
   * </pre>
   *
   * <code>string main_jar_file_uri = 1;</code>
   */
  public com.google.protobuf.ByteString
      getMainJarFileUriBytes() {
    java.lang.Object ref = "";
    if (driverCase_ == 1) {
      ref = driver_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (driverCase_ == 1) {
        driver_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MAIN_CLASS_FIELD_NUMBER = 2;
  /**
   * <pre>
   * The name of the driver's main class. The jar file containing the class
   * must be in the default CLASSPATH or specified in `jar_file_uris`.
   * </pre>
   *
   * <code>string main_class = 2;</code>
   */
  public java.lang.String getMainClass() {
    java.lang.Object ref = "";
    if (driverCase_ == 2) {
      ref = driver_;
    }
    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();
      if (driverCase_ == 2) {
        driver_ = s;
      }
      return s;
    }
  }
  /**
   * <pre>
   * The name of the driver's main class. The jar file containing the class
   * must be in the default CLASSPATH or specified in `jar_file_uris`.
   * </pre>
   *
   * <code>string main_class = 2;</code>
   */
  public com.google.protobuf.ByteString
      getMainClassBytes() {
    java.lang.Object ref = "";
    if (driverCase_ == 2) {
      ref = driver_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (driverCase_ == 2) {
        driver_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ARGS_FIELD_NUMBER = 3;
  private com.google.protobuf.LazyStringList args_;
  /**
   * <pre>
   * Optional. The arguments to pass to the driver. Do not
   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
   * properties, since a collision may occur that causes an incorrect job
   * submission.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getArgsList() {
    return args_;
  }
  /**
   * <pre>
   * Optional. The arguments to pass to the driver. Do not
   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
   * properties, since a collision may occur that causes an incorrect job
   * submission.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public int getArgsCount() {
    return args_.size();
  }
  /**
   * <pre>
   * Optional. The arguments to pass to the driver. Do not
   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
   * properties, since a collision may occur that causes an incorrect job
   * submission.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public java.lang.String getArgs(int index) {
    return args_.get(index);
  }
  /**
   * <pre>
   * Optional. The arguments to pass to the driver. Do not
   * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
   * properties, since a collision may occur that causes an incorrect job
   * submission.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public com.google.protobuf.ByteString
      getArgsBytes(int index) {
    return args_.getByteString(index);
  }

  public static final int JAR_FILE_URIS_FIELD_NUMBER = 4;
  private com.google.protobuf.LazyStringList jarFileUris_;
  /**
   * <pre>
   * Optional. Jar file URIs to add to the CLASSPATHs of the
   * Hadoop driver and tasks.
   * </pre>
   *
   * <code>repeated string jar_file_uris = 4;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getJarFileUrisList() {
    return jarFileUris_;
  }
  /**
   * <pre>
   * Optional. Jar file URIs to add to the CLASSPATHs of the
   * Hadoop driver and tasks.
   * </pre>
   *
   * <code>repeated string jar_file_uris = 4;</code>
   */
  public int getJarFileUrisCount() {
    return jarFileUris_.size();
  }
  /**
   * <pre>
   * Optional. Jar file URIs to add to the CLASSPATHs of the
   * Hadoop driver and tasks.
   * </pre>
   *
   * <code>repeated string jar_file_uris = 4;</code>
   */
  public java.lang.String getJarFileUris(int index) {
    return jarFileUris_.get(index);
  }
  /**
   * <pre>
   * Optional. Jar file URIs to add to the CLASSPATHs of the
   * Hadoop driver and tasks.
   * </pre>
   *
   * <code>repeated string jar_file_uris = 4;</code>
   */
  public com.google.protobuf.ByteString
      getJarFileUrisBytes(int index) {
    return jarFileUris_.getByteString(index);
  }

  public static final int FILE_URIS_FIELD_NUMBER = 5;
  private com.google.protobuf.LazyStringList fileUris_;
  /**
   * <pre>
   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
   * to the working directory of Hadoop drivers and distributed tasks. Useful
   * for naively parallel tasks.
   * </pre>
   *
   * <code>repeated string file_uris = 5;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getFileUrisList() {
    return fileUris_;
  }
  /**
   * <pre>
   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
   * to the working directory of Hadoop drivers and distributed tasks. Useful
   * for naively parallel tasks.
   * </pre>
   *
   * <code>repeated string file_uris = 5;</code>
   */
  public int getFileUrisCount() {
    return fileUris_.size();
  }
  /**
   * <pre>
   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
   * to the working directory of Hadoop drivers and distributed tasks. Useful
   * for naively parallel tasks.
   * </pre>
   *
   * <code>repeated string file_uris = 5;</code>
   */
  public java.lang.String getFileUris(int index) {
    return fileUris_.get(index);
  }
  /**
   * <pre>
   * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
   * to the working directory of Hadoop drivers and distributed tasks. Useful
   * for naively parallel tasks.
   * </pre>
   *
   * <code>repeated string file_uris = 5;</code>
   */
  public com.google.protobuf.ByteString
      getFileUrisBytes(int index) {
    return fileUris_.getByteString(index);
  }

  public static final int ARCHIVE_URIS_FIELD_NUMBER = 6;
  private com.google.protobuf.LazyStringList archiveUris_;
  /**
   * <pre>
   * Optional. HCFS URIs of archives to be extracted in the working directory of
   * Hadoop drivers and tasks. Supported file types:
   * .jar, .tar, .tar.gz, .tgz, or .zip.
   * </pre>
   *
   * <code>repeated string archive_uris = 6;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getArchiveUrisList() {
    return archiveUris_;
  }
  /**
   * <pre>
   * Optional. HCFS URIs of archives to be extracted in the working directory of
   * Hadoop drivers and tasks. Supported file types:
   * .jar, .tar, .tar.gz, .tgz, or .zip.
   * </pre>
   *
   * <code>repeated string archive_uris = 6;</code>
   */
  public int getArchiveUrisCount() {
    return archiveUris_.size();
  }
  /**
   * <pre>
   * Optional. HCFS URIs of archives to be extracted in the working directory of
   * Hadoop drivers and tasks. Supported file types:
   * .jar, .tar, .tar.gz, .tgz, or .zip.
   * </pre>
   *
   * <code>repeated string archive_uris = 6;</code>
   */
  public java.lang.String getArchiveUris(int index) {
    return archiveUris_.get(index);
  }
  /**
   * <pre>
   * Optional. HCFS URIs of archives to be extracted in the working directory of
   * Hadoop drivers and tasks. Supported file types:
   * .jar, .tar, .tar.gz, .tgz, or .zip.
   * </pre>
   *
   * <code>repeated string archive_uris = 6;</code>
   */
  public com.google.protobuf.ByteString
      getArchiveUrisBytes(int index) {
    return archiveUris_.getByteString(index);
  }

  public static final int PROPERTIES_FIELD_NUMBER = 7;
  private static final class PropertiesDefaultEntryHolder {
    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.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_PropertiesEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> properties_;
  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
  internalGetProperties() {
    if (properties_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          PropertiesDefaultEntryHolder.defaultEntry);
    }
    return properties_;
  }

  public int getPropertiesCount() {
    return internalGetProperties().getMap().size();
  }
  /**
   * <pre>
   * Optional. A mapping of property names to values, used to configure Hadoop.
   * Properties that conflict with values set by the Cloud Dataproc API may be
   * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
   * classes in user code.
   * </pre>
   *
   * <code>map&lt;string, string&gt; properties = 7;</code>
   */

  public boolean containsProperties(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetProperties().getMap().containsKey(key);
  }
  /**
   * Use {@link #getPropertiesMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getProperties() {
    return getPropertiesMap();
  }
  /**
   * <pre>
   * Optional. A mapping of property names to values, used to configure Hadoop.
   * Properties that conflict with values set by the Cloud Dataproc API may be
   * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
   * classes in user code.
   * </pre>
   *
   * <code>map&lt;string, string&gt; properties = 7;</code>
   */

  public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() {
    return internalGetProperties().getMap();
  }
  /**
   * <pre>
   * Optional. A mapping of property names to values, used to configure Hadoop.
   * Properties that conflict with values set by the Cloud Dataproc API may be
   * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
   * classes in user code.
   * </pre>
   *
   * <code>map&lt;string, string&gt; properties = 7;</code>
   */

  public java.lang.String getPropertiesOrDefault(
      java.lang.String key,
      java.lang.String defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetProperties().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   * Optional. A mapping of property names to values, used to configure Hadoop.
   * Properties that conflict with values set by the Cloud Dataproc API may be
   * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
   * classes in user code.
   * </pre>
   *
   * <code>map&lt;string, string&gt; properties = 7;</code>
   */

  public java.lang.String getPropertiesOrThrow(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, java.lang.String> map =
        internalGetProperties().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int LOGGING_CONFIG_FIELD_NUMBER = 8;
  private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_;
  /**
   * <pre>
   * Optional. The runtime log config for job execution.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
   */
  public boolean hasLoggingConfig() {
    return loggingConfig_ != null;
  }
  /**
   * <pre>
   * Optional. The runtime log config for job execution.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
   */
  public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() {
    return loggingConfig_ == null ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() : loggingConfig_;
  }
  /**
   * <pre>
   * Optional. The runtime log config for job execution.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
   */
  public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() {
    return getLoggingConfig();
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (driverCase_ == 1) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, driver_);
    }
    if (driverCase_ == 2) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, driver_);
    }
    for (int i = 0; i < args_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i));
    }
    for (int i = 0; i < jarFileUris_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jarFileUris_.getRaw(i));
    }
    for (int i = 0; i < fileUris_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, fileUris_.getRaw(i));
    }
    for (int i = 0; i < archiveUris_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, archiveUris_.getRaw(i));
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetProperties(),
        PropertiesDefaultEntryHolder.defaultEntry,
        7);
    if (loggingConfig_ != null) {
      output.writeMessage(8, getLoggingConfig());
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (driverCase_ == 1) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, driver_);
    }
    if (driverCase_ == 2) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, driver_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < args_.size(); i++) {
        dataSize += computeStringSizeNoTag(args_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getArgsList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < jarFileUris_.size(); i++) {
        dataSize += computeStringSizeNoTag(jarFileUris_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getJarFileUrisList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < fileUris_.size(); i++) {
        dataSize += computeStringSizeNoTag(fileUris_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getFileUrisList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < archiveUris_.size(); i++) {
        dataSize += computeStringSizeNoTag(archiveUris_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getArchiveUrisList().size();
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
         : internalGetProperties().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
      properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(7, properties__);
    }
    if (loggingConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getLoggingConfig());
    }
    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.cloud.dataproc.v1.HadoopJob)) {
      return super.equals(obj);
    }
    com.google.cloud.dataproc.v1.HadoopJob other = (com.google.cloud.dataproc.v1.HadoopJob) obj;

    boolean result = true;
    result = result && getArgsList()
        .equals(other.getArgsList());
    result = result && getJarFileUrisList()
        .equals(other.getJarFileUrisList());
    result = result && getFileUrisList()
        .equals(other.getFileUrisList());
    result = result && getArchiveUrisList()
        .equals(other.getArchiveUrisList());
    result = result && internalGetProperties().equals(
        other.internalGetProperties());
    result = result && (hasLoggingConfig() == other.hasLoggingConfig());
    if (hasLoggingConfig()) {
      result = result && getLoggingConfig()
          .equals(other.getLoggingConfig());
    }
    result = result && getDriverCase().equals(
        other.getDriverCase());
    if (!result) return false;
    switch (driverCase_) {
      case 1:
        result = result && getMainJarFileUri()
            .equals(other.getMainJarFileUri());
        break;
      case 2:
        result = result && getMainClass()
            .equals(other.getMainClass());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getArgsCount() > 0) {
      hash = (37 * hash) + ARGS_FIELD_NUMBER;
      hash = (53 * hash) + getArgsList().hashCode();
    }
    if (getJarFileUrisCount() > 0) {
      hash = (37 * hash) + JAR_FILE_URIS_FIELD_NUMBER;
      hash = (53 * hash) + getJarFileUrisList().hashCode();
    }
    if (getFileUrisCount() > 0) {
      hash = (37 * hash) + FILE_URIS_FIELD_NUMBER;
      hash = (53 * hash) + getFileUrisList().hashCode();
    }
    if (getArchiveUrisCount() > 0) {
      hash = (37 * hash) + ARCHIVE_URIS_FIELD_NUMBER;
      hash = (53 * hash) + getArchiveUrisList().hashCode();
    }
    if (!internalGetProperties().getMap().isEmpty()) {
      hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
      hash = (53 * hash) + internalGetProperties().hashCode();
    }
    if (hasLoggingConfig()) {
      hash = (37 * hash) + LOGGING_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getLoggingConfig().hashCode();
    }
    switch (driverCase_) {
      case 1:
        hash = (37 * hash) + MAIN_JAR_FILE_URI_FIELD_NUMBER;
        hash = (53 * hash) + getMainJarFileUri().hashCode();
        break;
      case 2:
        hash = (37 * hash) + MAIN_CLASS_FIELD_NUMBER;
        hash = (53 * hash) + getMainClass().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob 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.cloud.dataproc.v1.HadoopJob parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob 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.cloud.dataproc.v1.HadoopJob parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob 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.cloud.dataproc.v1.HadoopJob parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.dataproc.v1.HadoopJob parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.cloud.dataproc.v1.HadoopJob prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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>
   * A Cloud Dataproc job for running
   * [Apache Hadoop MapReduce](https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
   * jobs on [Apache Hadoop YARN](https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
   * </pre>
   *
   * Protobuf type {@code google.cloud.dataproc.v1.HadoopJob}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.HadoopJob)
      com.google.cloud.dataproc.v1.HadoopJobOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 7:
          return internalGetProperties();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 7:
          return internalGetMutableProperties();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dataproc.v1.HadoopJob.class, com.google.cloud.dataproc.v1.HadoopJob.Builder.class);
    }

    // Construct using com.google.cloud.dataproc.v1.HadoopJob.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      internalGetMutableProperties().clear();
      if (loggingConfigBuilder_ == null) {
        loggingConfig_ = null;
      } else {
        loggingConfig_ = null;
        loggingConfigBuilder_ = null;
      }
      driverCase_ = 0;
      driver_ = null;
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_HadoopJob_descriptor;
    }

    public com.google.cloud.dataproc.v1.HadoopJob getDefaultInstanceForType() {
      return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
    }

    public com.google.cloud.dataproc.v1.HadoopJob build() {
      com.google.cloud.dataproc.v1.HadoopJob result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.cloud.dataproc.v1.HadoopJob buildPartial() {
      com.google.cloud.dataproc.v1.HadoopJob result = new com.google.cloud.dataproc.v1.HadoopJob(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (driverCase_ == 1) {
        result.driver_ = driver_;
      }
      if (driverCase_ == 2) {
        result.driver_ = driver_;
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = args_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.args_ = args_;
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        jarFileUris_ = jarFileUris_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000008);
      }
      result.jarFileUris_ = jarFileUris_;
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        fileUris_ = fileUris_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000010);
      }
      result.fileUris_ = fileUris_;
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        archiveUris_ = archiveUris_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000020);
      }
      result.archiveUris_ = archiveUris_;
      result.properties_ = internalGetProperties();
      result.properties_.makeImmutable();
      if (loggingConfigBuilder_ == null) {
        result.loggingConfig_ = loggingConfig_;
      } else {
        result.loggingConfig_ = loggingConfigBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      result.driverCase_ = driverCase_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.dataproc.v1.HadoopJob) {
        return mergeFrom((com.google.cloud.dataproc.v1.HadoopJob)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.dataproc.v1.HadoopJob other) {
      if (other == com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) return this;
      if (!other.args_.isEmpty()) {
        if (args_.isEmpty()) {
          args_ = other.args_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureArgsIsMutable();
          args_.addAll(other.args_);
        }
        onChanged();
      }
      if (!other.jarFileUris_.isEmpty()) {
        if (jarFileUris_.isEmpty()) {
          jarFileUris_ = other.jarFileUris_;
          bitField0_ = (bitField0_ & ~0x00000008);
        } else {
          ensureJarFileUrisIsMutable();
          jarFileUris_.addAll(other.jarFileUris_);
        }
        onChanged();
      }
      if (!other.fileUris_.isEmpty()) {
        if (fileUris_.isEmpty()) {
          fileUris_ = other.fileUris_;
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          ensureFileUrisIsMutable();
          fileUris_.addAll(other.fileUris_);
        }
        onChanged();
      }
      if (!other.archiveUris_.isEmpty()) {
        if (archiveUris_.isEmpty()) {
          archiveUris_ = other.archiveUris_;
          bitField0_ = (bitField0_ & ~0x00000020);
        } else {
          ensureArchiveUrisIsMutable();
          archiveUris_.addAll(other.archiveUris_);
        }
        onChanged();
      }
      internalGetMutableProperties().mergeFrom(
          other.internalGetProperties());
      if (other.hasLoggingConfig()) {
        mergeLoggingConfig(other.getLoggingConfig());
      }
      switch (other.getDriverCase()) {
        case MAIN_JAR_FILE_URI: {
          driverCase_ = 1;
          driver_ = other.driver_;
          onChanged();
          break;
        }
        case MAIN_CLASS: {
          driverCase_ = 2;
          driver_ = other.driver_;
          onChanged();
          break;
        }
        case DRIVER_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.dataproc.v1.HadoopJob parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.dataproc.v1.HadoopJob) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int driverCase_ = 0;
    private java.lang.Object driver_;
    public DriverCase
        getDriverCase() {
      return DriverCase.forNumber(
          driverCase_);
    }

    public Builder clearDriver() {
      driverCase_ = 0;
      driver_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    /**
     * <pre>
     * The HCFS URI of the jar file containing the main class.
     * Examples:
     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
     * </pre>
     *
     * <code>string main_jar_file_uri = 1;</code>
     */
    public java.lang.String getMainJarFileUri() {
      java.lang.Object ref = "";
      if (driverCase_ == 1) {
        ref = driver_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (driverCase_ == 1) {
          driver_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The HCFS URI of the jar file containing the main class.
     * Examples:
     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
     * </pre>
     *
     * <code>string main_jar_file_uri = 1;</code>
     */
    public com.google.protobuf.ByteString
        getMainJarFileUriBytes() {
      java.lang.Object ref = "";
      if (driverCase_ == 1) {
        ref = driver_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (driverCase_ == 1) {
          driver_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The HCFS URI of the jar file containing the main class.
     * Examples:
     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
     * </pre>
     *
     * <code>string main_jar_file_uri = 1;</code>
     */
    public Builder setMainJarFileUri(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  driverCase_ = 1;
      driver_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The HCFS URI of the jar file containing the main class.
     * Examples:
     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
     * </pre>
     *
     * <code>string main_jar_file_uri = 1;</code>
     */
    public Builder clearMainJarFileUri() {
      if (driverCase_ == 1) {
        driverCase_ = 0;
        driver_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The HCFS URI of the jar file containing the main class.
     * Examples:
     *     'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
     *     'hdfs:/tmp/test-samples/custom-wordcount.jar'
     *     'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
     * </pre>
     *
     * <code>string main_jar_file_uri = 1;</code>
     */
    public Builder setMainJarFileUriBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      driverCase_ = 1;
      driver_ = value;
      onChanged();
      return this;
    }

    /**
     * <pre>
     * The name of the driver's main class. The jar file containing the class
     * must be in the default CLASSPATH or specified in `jar_file_uris`.
     * </pre>
     *
     * <code>string main_class = 2;</code>
     */
    public java.lang.String getMainClass() {
      java.lang.Object ref = "";
      if (driverCase_ == 2) {
        ref = driver_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (driverCase_ == 2) {
          driver_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The name of the driver's main class. The jar file containing the class
     * must be in the default CLASSPATH or specified in `jar_file_uris`.
     * </pre>
     *
     * <code>string main_class = 2;</code>
     */
    public com.google.protobuf.ByteString
        getMainClassBytes() {
      java.lang.Object ref = "";
      if (driverCase_ == 2) {
        ref = driver_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (driverCase_ == 2) {
          driver_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The name of the driver's main class. The jar file containing the class
     * must be in the default CLASSPATH or specified in `jar_file_uris`.
     * </pre>
     *
     * <code>string main_class = 2;</code>
     */
    public Builder setMainClass(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  driverCase_ = 2;
      driver_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The name of the driver's main class. The jar file containing the class
     * must be in the default CLASSPATH or specified in `jar_file_uris`.
     * </pre>
     *
     * <code>string main_class = 2;</code>
     */
    public Builder clearMainClass() {
      if (driverCase_ == 2) {
        driverCase_ = 0;
        driver_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * <pre>
     * The name of the driver's main class. The jar file containing the class
     * must be in the default CLASSPATH or specified in `jar_file_uris`.
     * </pre>
     *
     * <code>string main_class = 2;</code>
     */
    public Builder setMainClassBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      driverCase_ = 2;
      driver_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureArgsIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = new com.google.protobuf.LazyStringArrayList(args_);
        bitField0_ |= 0x00000004;
       }
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getArgsList() {
      return args_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public int getArgsCount() {
      return args_.size();
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public java.lang.String getArgs(int index) {
      return args_.get(index);
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public com.google.protobuf.ByteString
        getArgsBytes(int index) {
      return args_.getByteString(index);
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder setArgs(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgsIsMutable();
      args_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addArgs(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgsIsMutable();
      args_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addAllArgs(
        java.lang.Iterable<java.lang.String> values) {
      ensureArgsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, args_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder clearArgs() {
      args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. The arguments to pass to the driver. Do not
     * include arguments, such as `-libjars` or `-Dfoo=bar`, that can be set as job
     * properties, since a collision may occur that causes an incorrect job
     * submission.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addArgsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureArgsIsMutable();
      args_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureJarFileUrisIsMutable() {
      if (!((bitField0_ & 0x00000008) == 0x00000008)) {
        jarFileUris_ = new com.google.protobuf.LazyStringArrayList(jarFileUris_);
        bitField0_ |= 0x00000008;
       }
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getJarFileUrisList() {
      return jarFileUris_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public int getJarFileUrisCount() {
      return jarFileUris_.size();
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public java.lang.String getJarFileUris(int index) {
      return jarFileUris_.get(index);
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public com.google.protobuf.ByteString
        getJarFileUrisBytes(int index) {
      return jarFileUris_.getByteString(index);
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public Builder setJarFileUris(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureJarFileUrisIsMutable();
      jarFileUris_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public Builder addJarFileUris(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureJarFileUrisIsMutable();
      jarFileUris_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public Builder addAllJarFileUris(
        java.lang.Iterable<java.lang.String> values) {
      ensureJarFileUrisIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, jarFileUris_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public Builder clearJarFileUris() {
      jarFileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. Jar file URIs to add to the CLASSPATHs of the
     * Hadoop driver and tasks.
     * </pre>
     *
     * <code>repeated string jar_file_uris = 4;</code>
     */
    public Builder addJarFileUrisBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureJarFileUrisIsMutable();
      jarFileUris_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureFileUrisIsMutable() {
      if (!((bitField0_ & 0x00000010) == 0x00000010)) {
        fileUris_ = new com.google.protobuf.LazyStringArrayList(fileUris_);
        bitField0_ |= 0x00000010;
       }
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getFileUrisList() {
      return fileUris_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public int getFileUrisCount() {
      return fileUris_.size();
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public java.lang.String getFileUris(int index) {
      return fileUris_.get(index);
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public com.google.protobuf.ByteString
        getFileUrisBytes(int index) {
      return fileUris_.getByteString(index);
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public Builder setFileUris(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureFileUrisIsMutable();
      fileUris_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public Builder addFileUris(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureFileUrisIsMutable();
      fileUris_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public Builder addAllFileUris(
        java.lang.Iterable<java.lang.String> values) {
      ensureFileUrisIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, fileUris_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public Builder clearFileUris() {
      fileUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
     * to the working directory of Hadoop drivers and distributed tasks. Useful
     * for naively parallel tasks.
     * </pre>
     *
     * <code>repeated string file_uris = 5;</code>
     */
    public Builder addFileUrisBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureFileUrisIsMutable();
      fileUris_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureArchiveUrisIsMutable() {
      if (!((bitField0_ & 0x00000020) == 0x00000020)) {
        archiveUris_ = new com.google.protobuf.LazyStringArrayList(archiveUris_);
        bitField0_ |= 0x00000020;
       }
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getArchiveUrisList() {
      return archiveUris_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public int getArchiveUrisCount() {
      return archiveUris_.size();
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public java.lang.String getArchiveUris(int index) {
      return archiveUris_.get(index);
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public com.google.protobuf.ByteString
        getArchiveUrisBytes(int index) {
      return archiveUris_.getByteString(index);
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public Builder setArchiveUris(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArchiveUrisIsMutable();
      archiveUris_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public Builder addArchiveUris(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArchiveUrisIsMutable();
      archiveUris_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public Builder addAllArchiveUris(
        java.lang.Iterable<java.lang.String> values) {
      ensureArchiveUrisIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, archiveUris_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public Builder clearArchiveUris() {
      archiveUris_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional. HCFS URIs of archives to be extracted in the working directory of
     * Hadoop drivers and tasks. Supported file types:
     * .jar, .tar, .tar.gz, .tgz, or .zip.
     * </pre>
     *
     * <code>repeated string archive_uris = 6;</code>
     */
    public Builder addArchiveUrisBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureArchiveUrisIsMutable();
      archiveUris_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> properties_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetProperties() {
      if (properties_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            PropertiesDefaultEntryHolder.defaultEntry);
      }
      return properties_;
    }
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetMutableProperties() {
      onChanged();;
      if (properties_ == null) {
        properties_ = com.google.protobuf.MapField.newMapField(
            PropertiesDefaultEntryHolder.defaultEntry);
      }
      if (!properties_.isMutable()) {
        properties_ = properties_.copy();
      }
      return properties_;
    }

    public int getPropertiesCount() {
      return internalGetProperties().getMap().size();
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public boolean containsProperties(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetProperties().getMap().containsKey(key);
    }
    /**
     * Use {@link #getPropertiesMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getProperties() {
      return getPropertiesMap();
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public java.util.Map<java.lang.String, java.lang.String> getPropertiesMap() {
      return internalGetProperties().getMap();
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public java.lang.String getPropertiesOrDefault(
        java.lang.String key,
        java.lang.String defaultValue) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetProperties().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public java.lang.String getPropertiesOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetProperties().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearProperties() {
      internalGetMutableProperties().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public Builder removeProperties(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableProperties().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String>
    getMutableProperties() {
      return internalGetMutableProperties().getMutableMap();
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */
    public Builder putProperties(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      if (value == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableProperties().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <pre>
     * Optional. A mapping of property names to values, used to configure Hadoop.
     * Properties that conflict with values set by the Cloud Dataproc API may be
     * overwritten. Can include properties set in /etc/hadoop/conf/&#42;-site and
     * classes in user code.
     * </pre>
     *
     * <code>map&lt;string, string&gt; properties = 7;</code>
     */

    public Builder putAllProperties(
        java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableProperties().getMutableMap()
          .putAll(values);
      return this;
    }

    private com.google.cloud.dataproc.v1.LoggingConfig loggingConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.LoggingConfig, com.google.cloud.dataproc.v1.LoggingConfig.Builder, com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> loggingConfigBuilder_;
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public boolean hasLoggingConfig() {
      return loggingConfigBuilder_ != null || loggingConfig_ != null;
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public com.google.cloud.dataproc.v1.LoggingConfig getLoggingConfig() {
      if (loggingConfigBuilder_ == null) {
        return loggingConfig_ == null ? com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() : loggingConfig_;
      } else {
        return loggingConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public Builder setLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) {
      if (loggingConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        loggingConfig_ = value;
        onChanged();
      } else {
        loggingConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public Builder setLoggingConfig(
        com.google.cloud.dataproc.v1.LoggingConfig.Builder builderForValue) {
      if (loggingConfigBuilder_ == null) {
        loggingConfig_ = builderForValue.build();
        onChanged();
      } else {
        loggingConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public Builder mergeLoggingConfig(com.google.cloud.dataproc.v1.LoggingConfig value) {
      if (loggingConfigBuilder_ == null) {
        if (loggingConfig_ != null) {
          loggingConfig_ =
            com.google.cloud.dataproc.v1.LoggingConfig.newBuilder(loggingConfig_).mergeFrom(value).buildPartial();
        } else {
          loggingConfig_ = value;
        }
        onChanged();
      } else {
        loggingConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public Builder clearLoggingConfig() {
      if (loggingConfigBuilder_ == null) {
        loggingConfig_ = null;
        onChanged();
      } else {
        loggingConfig_ = null;
        loggingConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public com.google.cloud.dataproc.v1.LoggingConfig.Builder getLoggingConfigBuilder() {
      
      onChanged();
      return getLoggingConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    public com.google.cloud.dataproc.v1.LoggingConfigOrBuilder getLoggingConfigOrBuilder() {
      if (loggingConfigBuilder_ != null) {
        return loggingConfigBuilder_.getMessageOrBuilder();
      } else {
        return loggingConfig_ == null ?
            com.google.cloud.dataproc.v1.LoggingConfig.getDefaultInstance() : loggingConfig_;
      }
    }
    /**
     * <pre>
     * Optional. The runtime log config for job execution.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.LoggingConfig logging_config = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.LoggingConfig, com.google.cloud.dataproc.v1.LoggingConfig.Builder, com.google.cloud.dataproc.v1.LoggingConfigOrBuilder> 
        getLoggingConfigFieldBuilder() {
      if (loggingConfigBuilder_ == null) {
        loggingConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.LoggingConfig, com.google.cloud.dataproc.v1.LoggingConfig.Builder, com.google.cloud.dataproc.v1.LoggingConfigOrBuilder>(
                getLoggingConfig(),
                getParentForChildren(),
                isClean());
        loggingConfig_ = null;
      }
      return loggingConfigBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.HadoopJob)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.HadoopJob)
  private static final com.google.cloud.dataproc.v1.HadoopJob DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.HadoopJob();
  }

  public static com.google.cloud.dataproc.v1.HadoopJob getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.google.cloud.dataproc.v1.HadoopJob getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

