// 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 resource.
 * </pre>
 *
 * Protobuf type {@code google.cloud.dataproc.v1.Job}
 */
public  final class Job extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.Job)
    JobOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Job.newBuilder() to construct.
  private Job(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Job() {
    statusHistory_ = java.util.Collections.emptyList();
    yarnApplications_ = java.util.Collections.emptyList();
    driverOutputResourceUri_ = "";
    driverControlFilesUri_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Job(
      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: {
            com.google.cloud.dataproc.v1.JobReference.Builder subBuilder = null;
            if (reference_ != null) {
              subBuilder = reference_.toBuilder();
            }
            reference_ = input.readMessage(com.google.cloud.dataproc.v1.JobReference.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(reference_);
              reference_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            com.google.cloud.dataproc.v1.JobPlacement.Builder subBuilder = null;
            if (placement_ != null) {
              subBuilder = placement_.toBuilder();
            }
            placement_ = input.readMessage(com.google.cloud.dataproc.v1.JobPlacement.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(placement_);
              placement_ = subBuilder.buildPartial();
            }

            break;
          }
          case 26: {
            com.google.cloud.dataproc.v1.HadoopJob.Builder subBuilder = null;
            if (typeJobCase_ == 3) {
              subBuilder = ((com.google.cloud.dataproc.v1.HadoopJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.HadoopJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HadoopJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 3;
            break;
          }
          case 34: {
            com.google.cloud.dataproc.v1.SparkJob.Builder subBuilder = null;
            if (typeJobCase_ == 4) {
              subBuilder = ((com.google.cloud.dataproc.v1.SparkJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.SparkJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 4;
            break;
          }
          case 42: {
            com.google.cloud.dataproc.v1.PySparkJob.Builder subBuilder = null;
            if (typeJobCase_ == 5) {
              subBuilder = ((com.google.cloud.dataproc.v1.PySparkJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.PySparkJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PySparkJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 5;
            break;
          }
          case 50: {
            com.google.cloud.dataproc.v1.HiveJob.Builder subBuilder = null;
            if (typeJobCase_ == 6) {
              subBuilder = ((com.google.cloud.dataproc.v1.HiveJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.HiveJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.HiveJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 6;
            break;
          }
          case 58: {
            com.google.cloud.dataproc.v1.PigJob.Builder subBuilder = null;
            if (typeJobCase_ == 7) {
              subBuilder = ((com.google.cloud.dataproc.v1.PigJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.PigJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.PigJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 7;
            break;
          }
          case 66: {
            com.google.cloud.dataproc.v1.JobStatus.Builder subBuilder = null;
            if (status_ != null) {
              subBuilder = status_.toBuilder();
            }
            status_ = input.readMessage(com.google.cloud.dataproc.v1.JobStatus.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(status_);
              status_ = subBuilder.buildPartial();
            }

            break;
          }
          case 74: {
            if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
              yarnApplications_ = new java.util.ArrayList<com.google.cloud.dataproc.v1.YarnApplication>();
              mutable_bitField0_ |= 0x00000400;
            }
            yarnApplications_.add(
                input.readMessage(com.google.cloud.dataproc.v1.YarnApplication.parser(), extensionRegistry));
            break;
          }
          case 98: {
            com.google.cloud.dataproc.v1.SparkSqlJob.Builder subBuilder = null;
            if (typeJobCase_ == 12) {
              subBuilder = ((com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_).toBuilder();
            }
            typeJob_ =
                input.readMessage(com.google.cloud.dataproc.v1.SparkSqlJob.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_);
              typeJob_ = subBuilder.buildPartial();
            }
            typeJobCase_ = 12;
            break;
          }
          case 106: {
            if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
              statusHistory_ = new java.util.ArrayList<com.google.cloud.dataproc.v1.JobStatus>();
              mutable_bitField0_ |= 0x00000200;
            }
            statusHistory_.add(
                input.readMessage(com.google.cloud.dataproc.v1.JobStatus.parser(), extensionRegistry));
            break;
          }
          case 122: {
            java.lang.String s = input.readStringRequireUtf8();

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

            driverOutputResourceUri_ = s;
            break;
          }
          case 146: {
            if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) {
              labels_ = com.google.protobuf.MapField.newMapField(
                  LabelsDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00002000;
            }
            com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
            labels__ = input.readMessage(
                LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            labels_.getMutableMap().put(
                labels__.getKey(), labels__.getValue());
            break;
          }
          case 162: {
            com.google.cloud.dataproc.v1.JobScheduling.Builder subBuilder = null;
            if (scheduling_ != null) {
              subBuilder = scheduling_.toBuilder();
            }
            scheduling_ = input.readMessage(com.google.cloud.dataproc.v1.JobScheduling.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(scheduling_);
              scheduling_ = 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_ & 0x00000400) == 0x00000400)) {
        yarnApplications_ = java.util.Collections.unmodifiableList(yarnApplications_);
      }
      if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
        statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_);
      }
      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_Job_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 18:
        return internalGetLabels();
      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_Job_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.dataproc.v1.Job.class, com.google.cloud.dataproc.v1.Job.Builder.class);
  }

  private int bitField0_;
  private int typeJobCase_ = 0;
  private java.lang.Object typeJob_;
  public enum TypeJobCase
      implements com.google.protobuf.Internal.EnumLite {
    HADOOP_JOB(3),
    SPARK_JOB(4),
    PYSPARK_JOB(5),
    HIVE_JOB(6),
    PIG_JOB(7),
    SPARK_SQL_JOB(12),
    TYPEJOB_NOT_SET(0);
    private final int value;
    private TypeJobCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static TypeJobCase valueOf(int value) {
      return forNumber(value);
    }

    public static TypeJobCase forNumber(int value) {
      switch (value) {
        case 3: return HADOOP_JOB;
        case 4: return SPARK_JOB;
        case 5: return PYSPARK_JOB;
        case 6: return HIVE_JOB;
        case 7: return PIG_JOB;
        case 12: return SPARK_SQL_JOB;
        case 0: return TYPEJOB_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public TypeJobCase
  getTypeJobCase() {
    return TypeJobCase.forNumber(
        typeJobCase_);
  }

  public static final int REFERENCE_FIELD_NUMBER = 1;
  private com.google.cloud.dataproc.v1.JobReference reference_;
  /**
   * <pre>
   * Optional. The fully qualified reference to the job, which can be used to
   * obtain the equivalent REST path of the job resource. If this property
   * is not specified when a job is created, the server generates a
   * &lt;code&gt;job_id&lt;/code&gt;.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
   */
  public boolean hasReference() {
    return reference_ != null;
  }
  /**
   * <pre>
   * Optional. The fully qualified reference to the job, which can be used to
   * obtain the equivalent REST path of the job resource. If this property
   * is not specified when a job is created, the server generates a
   * &lt;code&gt;job_id&lt;/code&gt;.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
   */
  public com.google.cloud.dataproc.v1.JobReference getReference() {
    return reference_ == null ? com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() : reference_;
  }
  /**
   * <pre>
   * Optional. The fully qualified reference to the job, which can be used to
   * obtain the equivalent REST path of the job resource. If this property
   * is not specified when a job is created, the server generates a
   * &lt;code&gt;job_id&lt;/code&gt;.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
   */
  public com.google.cloud.dataproc.v1.JobReferenceOrBuilder getReferenceOrBuilder() {
    return getReference();
  }

  public static final int PLACEMENT_FIELD_NUMBER = 2;
  private com.google.cloud.dataproc.v1.JobPlacement placement_;
  /**
   * <pre>
   * Required. Job information, including how, when, and where to
   * run the job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
   */
  public boolean hasPlacement() {
    return placement_ != null;
  }
  /**
   * <pre>
   * Required. Job information, including how, when, and where to
   * run the job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
   */
  public com.google.cloud.dataproc.v1.JobPlacement getPlacement() {
    return placement_ == null ? com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() : placement_;
  }
  /**
   * <pre>
   * Required. Job information, including how, when, and where to
   * run the job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
   */
  public com.google.cloud.dataproc.v1.JobPlacementOrBuilder getPlacementOrBuilder() {
    return getPlacement();
  }

  public static final int HADOOP_JOB_FIELD_NUMBER = 3;
  /**
   * <pre>
   * Job is a Hadoop job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
   */
  public boolean hasHadoopJob() {
    return typeJobCase_ == 3;
  }
  /**
   * <pre>
   * Job is a Hadoop job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
   */
  public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() {
    if (typeJobCase_ == 3) {
       return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a Hadoop job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
   */
  public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() {
    if (typeJobCase_ == 3) {
       return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
  }

  public static final int SPARK_JOB_FIELD_NUMBER = 4;
  /**
   * <pre>
   * Job is a Spark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
   */
  public boolean hasSparkJob() {
    return typeJobCase_ == 4;
  }
  /**
   * <pre>
   * Job is a Spark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
   */
  public com.google.cloud.dataproc.v1.SparkJob getSparkJob() {
    if (typeJobCase_ == 4) {
       return (com.google.cloud.dataproc.v1.SparkJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a Spark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
   */
  public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() {
    if (typeJobCase_ == 4) {
       return (com.google.cloud.dataproc.v1.SparkJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
  }

  public static final int PYSPARK_JOB_FIELD_NUMBER = 5;
  /**
   * <pre>
   * Job is a Pyspark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
   */
  public boolean hasPysparkJob() {
    return typeJobCase_ == 5;
  }
  /**
   * <pre>
   * Job is a Pyspark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
   */
  public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() {
    if (typeJobCase_ == 5) {
       return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a Pyspark job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
   */
  public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() {
    if (typeJobCase_ == 5) {
       return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
  }

  public static final int HIVE_JOB_FIELD_NUMBER = 6;
  /**
   * <pre>
   * Job is a Hive job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
   */
  public boolean hasHiveJob() {
    return typeJobCase_ == 6;
  }
  /**
   * <pre>
   * Job is a Hive job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
   */
  public com.google.cloud.dataproc.v1.HiveJob getHiveJob() {
    if (typeJobCase_ == 6) {
       return (com.google.cloud.dataproc.v1.HiveJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a Hive job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
   */
  public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() {
    if (typeJobCase_ == 6) {
       return (com.google.cloud.dataproc.v1.HiveJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
  }

  public static final int PIG_JOB_FIELD_NUMBER = 7;
  /**
   * <pre>
   * Job is a Pig job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
   */
  public boolean hasPigJob() {
    return typeJobCase_ == 7;
  }
  /**
   * <pre>
   * Job is a Pig job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
   */
  public com.google.cloud.dataproc.v1.PigJob getPigJob() {
    if (typeJobCase_ == 7) {
       return (com.google.cloud.dataproc.v1.PigJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a Pig job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
   */
  public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() {
    if (typeJobCase_ == 7) {
       return (com.google.cloud.dataproc.v1.PigJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
  }

  public static final int SPARK_SQL_JOB_FIELD_NUMBER = 12;
  /**
   * <pre>
   * Job is a SparkSql job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
   */
  public boolean hasSparkSqlJob() {
    return typeJobCase_ == 12;
  }
  /**
   * <pre>
   * Job is a SparkSql job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
   */
  public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() {
    if (typeJobCase_ == 12) {
       return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
  }
  /**
   * <pre>
   * Job is a SparkSql job.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
   */
  public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() {
    if (typeJobCase_ == 12) {
       return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_;
    }
    return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
  }

  public static final int STATUS_FIELD_NUMBER = 8;
  private com.google.cloud.dataproc.v1.JobStatus status_;
  /**
   * <pre>
   * Output-only. The job status. Additional application-specific
   * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
   * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
   */
  public boolean hasStatus() {
    return status_ != null;
  }
  /**
   * <pre>
   * Output-only. The job status. Additional application-specific
   * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
   * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
   */
  public com.google.cloud.dataproc.v1.JobStatus getStatus() {
    return status_ == null ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() : status_;
  }
  /**
   * <pre>
   * Output-only. The job status. Additional application-specific
   * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
   * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
   */
  public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() {
    return getStatus();
  }

  public static final int STATUS_HISTORY_FIELD_NUMBER = 13;
  private java.util.List<com.google.cloud.dataproc.v1.JobStatus> statusHistory_;
  /**
   * <pre>
   * Output-only. The previous job status.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
   */
  public java.util.List<com.google.cloud.dataproc.v1.JobStatus> getStatusHistoryList() {
    return statusHistory_;
  }
  /**
   * <pre>
   * Output-only. The previous job status.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
   */
  public java.util.List<? extends com.google.cloud.dataproc.v1.JobStatusOrBuilder> 
      getStatusHistoryOrBuilderList() {
    return statusHistory_;
  }
  /**
   * <pre>
   * Output-only. The previous job status.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
   */
  public int getStatusHistoryCount() {
    return statusHistory_.size();
  }
  /**
   * <pre>
   * Output-only. The previous job status.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
   */
  public com.google.cloud.dataproc.v1.JobStatus getStatusHistory(int index) {
    return statusHistory_.get(index);
  }
  /**
   * <pre>
   * Output-only. The previous job status.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
   */
  public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusHistoryOrBuilder(
      int index) {
    return statusHistory_.get(index);
  }

  public static final int YARN_APPLICATIONS_FIELD_NUMBER = 9;
  private java.util.List<com.google.cloud.dataproc.v1.YarnApplication> yarnApplications_;
  /**
   * <pre>
   * Output-only. The collection of YARN applications spun up by this job.
   * **Beta** Feature: This report is available for testing purposes only. It may
   * be changed before final release.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
   */
  public java.util.List<com.google.cloud.dataproc.v1.YarnApplication> getYarnApplicationsList() {
    return yarnApplications_;
  }
  /**
   * <pre>
   * Output-only. The collection of YARN applications spun up by this job.
   * **Beta** Feature: This report is available for testing purposes only. It may
   * be changed before final release.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
   */
  public java.util.List<? extends com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> 
      getYarnApplicationsOrBuilderList() {
    return yarnApplications_;
  }
  /**
   * <pre>
   * Output-only. The collection of YARN applications spun up by this job.
   * **Beta** Feature: This report is available for testing purposes only. It may
   * be changed before final release.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
   */
  public int getYarnApplicationsCount() {
    return yarnApplications_.size();
  }
  /**
   * <pre>
   * Output-only. The collection of YARN applications spun up by this job.
   * **Beta** Feature: This report is available for testing purposes only. It may
   * be changed before final release.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
   */
  public com.google.cloud.dataproc.v1.YarnApplication getYarnApplications(int index) {
    return yarnApplications_.get(index);
  }
  /**
   * <pre>
   * Output-only. The collection of YARN applications spun up by this job.
   * **Beta** Feature: This report is available for testing purposes only. It may
   * be changed before final release.
   * </pre>
   *
   * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
   */
  public com.google.cloud.dataproc.v1.YarnApplicationOrBuilder getYarnApplicationsOrBuilder(
      int index) {
    return yarnApplications_.get(index);
  }

  public static final int DRIVER_OUTPUT_RESOURCE_URI_FIELD_NUMBER = 17;
  private volatile java.lang.Object driverOutputResourceUri_;
  /**
   * <pre>
   * Output-only. A URI pointing to the location of the stdout of the job's
   * driver program.
   * </pre>
   *
   * <code>string driver_output_resource_uri = 17;</code>
   */
  public java.lang.String getDriverOutputResourceUri() {
    java.lang.Object ref = driverOutputResourceUri_;
    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();
      driverOutputResourceUri_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Output-only. A URI pointing to the location of the stdout of the job's
   * driver program.
   * </pre>
   *
   * <code>string driver_output_resource_uri = 17;</code>
   */
  public com.google.protobuf.ByteString
      getDriverOutputResourceUriBytes() {
    java.lang.Object ref = driverOutputResourceUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      driverOutputResourceUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DRIVER_CONTROL_FILES_URI_FIELD_NUMBER = 15;
  private volatile java.lang.Object driverControlFilesUri_;
  /**
   * <pre>
   * Output-only. If present, the location of miscellaneous control files
   * which may be used as part of job setup and handling. If not present,
   * control files may be placed in the same location as `driver_output_uri`.
   * </pre>
   *
   * <code>string driver_control_files_uri = 15;</code>
   */
  public java.lang.String getDriverControlFilesUri() {
    java.lang.Object ref = driverControlFilesUri_;
    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();
      driverControlFilesUri_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Output-only. If present, the location of miscellaneous control files
   * which may be used as part of job setup and handling. If not present,
   * control files may be placed in the same location as `driver_output_uri`.
   * </pre>
   *
   * <code>string driver_control_files_uri = 15;</code>
   */
  public com.google.protobuf.ByteString
      getDriverControlFilesUriBytes() {
    java.lang.Object ref = driverControlFilesUri_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      driverControlFilesUri_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int LABELS_FIELD_NUMBER = 18;
  private static final class LabelsDefaultEntryHolder {
    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_Job_LabelsEntry_descriptor, 
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  private com.google.protobuf.MapField<
      java.lang.String, java.lang.String> labels_;
  private com.google.protobuf.MapField<java.lang.String, java.lang.String>
  internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   * <pre>
   * Optional. The labels to associate with this job.
   * Label **keys** must contain 1 to 63 characters, and must conform to
   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * Label **values** may be empty, but, if present, must contain 1 to 63
   * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * No more than 32 labels can be associated with a job.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 18;</code>
   */

  public boolean containsLabels(
      java.lang.String key) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    return internalGetLabels().getMap().containsKey(key);
  }
  /**
   * Use {@link #getLabelsMap()} instead.
   */
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   * <pre>
   * Optional. The labels to associate with this job.
   * Label **keys** must contain 1 to 63 characters, and must conform to
   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * Label **values** may be empty, but, if present, must contain 1 to 63
   * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * No more than 32 labels can be associated with a job.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 18;</code>
   */

  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   * <pre>
   * Optional. The labels to associate with this job.
   * Label **keys** must contain 1 to 63 characters, and must conform to
   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * Label **values** may be empty, but, if present, must contain 1 to 63
   * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * No more than 32 labels can be associated with a job.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 18;</code>
   */

  public java.lang.String getLabelsOrDefault(
      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 =
        internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <pre>
   * Optional. The labels to associate with this job.
   * Label **keys** must contain 1 to 63 characters, and must conform to
   * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * Label **values** may be empty, but, if present, must contain 1 to 63
   * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
   * No more than 32 labels can be associated with a job.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 18;</code>
   */

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

  public static final int SCHEDULING_FIELD_NUMBER = 20;
  private com.google.cloud.dataproc.v1.JobScheduling scheduling_;
  /**
   * <pre>
   * Optional. Job scheduling configuration.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
   */
  public boolean hasScheduling() {
    return scheduling_ != null;
  }
  /**
   * <pre>
   * Optional. Job scheduling configuration.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
   */
  public com.google.cloud.dataproc.v1.JobScheduling getScheduling() {
    return scheduling_ == null ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() : scheduling_;
  }
  /**
   * <pre>
   * Optional. Job scheduling configuration.
   * </pre>
   *
   * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
   */
  public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() {
    return getScheduling();
  }

  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 (reference_ != null) {
      output.writeMessage(1, getReference());
    }
    if (placement_ != null) {
      output.writeMessage(2, getPlacement());
    }
    if (typeJobCase_ == 3) {
      output.writeMessage(3, (com.google.cloud.dataproc.v1.HadoopJob) typeJob_);
    }
    if (typeJobCase_ == 4) {
      output.writeMessage(4, (com.google.cloud.dataproc.v1.SparkJob) typeJob_);
    }
    if (typeJobCase_ == 5) {
      output.writeMessage(5, (com.google.cloud.dataproc.v1.PySparkJob) typeJob_);
    }
    if (typeJobCase_ == 6) {
      output.writeMessage(6, (com.google.cloud.dataproc.v1.HiveJob) typeJob_);
    }
    if (typeJobCase_ == 7) {
      output.writeMessage(7, (com.google.cloud.dataproc.v1.PigJob) typeJob_);
    }
    if (status_ != null) {
      output.writeMessage(8, getStatus());
    }
    for (int i = 0; i < yarnApplications_.size(); i++) {
      output.writeMessage(9, yarnApplications_.get(i));
    }
    if (typeJobCase_ == 12) {
      output.writeMessage(12, (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_);
    }
    for (int i = 0; i < statusHistory_.size(); i++) {
      output.writeMessage(13, statusHistory_.get(i));
    }
    if (!getDriverControlFilesUriBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, driverControlFilesUri_);
    }
    if (!getDriverOutputResourceUriBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 17, driverOutputResourceUri_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetLabels(),
        LabelsDefaultEntryHolder.defaultEntry,
        18);
    if (scheduling_ != null) {
      output.writeMessage(20, getScheduling());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (reference_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getReference());
    }
    if (placement_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getPlacement());
    }
    if (typeJobCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.google.cloud.dataproc.v1.HadoopJob) typeJob_);
    }
    if (typeJobCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (com.google.cloud.dataproc.v1.SparkJob) typeJob_);
    }
    if (typeJobCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (com.google.cloud.dataproc.v1.PySparkJob) typeJob_);
    }
    if (typeJobCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, (com.google.cloud.dataproc.v1.HiveJob) typeJob_);
    }
    if (typeJobCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, (com.google.cloud.dataproc.v1.PigJob) typeJob_);
    }
    if (status_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getStatus());
    }
    for (int i = 0; i < yarnApplications_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, yarnApplications_.get(i));
    }
    if (typeJobCase_ == 12) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(12, (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_);
    }
    for (int i = 0; i < statusHistory_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(13, statusHistory_.get(i));
    }
    if (!getDriverControlFilesUriBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, driverControlFilesUri_);
    }
    if (!getDriverOutputResourceUriBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, driverOutputResourceUri_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
         : internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
      labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(18, labels__);
    }
    if (scheduling_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(20, getScheduling());
    }
    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.Job)) {
      return super.equals(obj);
    }
    com.google.cloud.dataproc.v1.Job other = (com.google.cloud.dataproc.v1.Job) obj;

    boolean result = true;
    result = result && (hasReference() == other.hasReference());
    if (hasReference()) {
      result = result && getReference()
          .equals(other.getReference());
    }
    result = result && (hasPlacement() == other.hasPlacement());
    if (hasPlacement()) {
      result = result && getPlacement()
          .equals(other.getPlacement());
    }
    result = result && (hasStatus() == other.hasStatus());
    if (hasStatus()) {
      result = result && getStatus()
          .equals(other.getStatus());
    }
    result = result && getStatusHistoryList()
        .equals(other.getStatusHistoryList());
    result = result && getYarnApplicationsList()
        .equals(other.getYarnApplicationsList());
    result = result && getDriverOutputResourceUri()
        .equals(other.getDriverOutputResourceUri());
    result = result && getDriverControlFilesUri()
        .equals(other.getDriverControlFilesUri());
    result = result && internalGetLabels().equals(
        other.internalGetLabels());
    result = result && (hasScheduling() == other.hasScheduling());
    if (hasScheduling()) {
      result = result && getScheduling()
          .equals(other.getScheduling());
    }
    result = result && getTypeJobCase().equals(
        other.getTypeJobCase());
    if (!result) return false;
    switch (typeJobCase_) {
      case 3:
        result = result && getHadoopJob()
            .equals(other.getHadoopJob());
        break;
      case 4:
        result = result && getSparkJob()
            .equals(other.getSparkJob());
        break;
      case 5:
        result = result && getPysparkJob()
            .equals(other.getPysparkJob());
        break;
      case 6:
        result = result && getHiveJob()
            .equals(other.getHiveJob());
        break;
      case 7:
        result = result && getPigJob()
            .equals(other.getPigJob());
        break;
      case 12:
        result = result && getSparkSqlJob()
            .equals(other.getSparkSqlJob());
        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 (hasReference()) {
      hash = (37 * hash) + REFERENCE_FIELD_NUMBER;
      hash = (53 * hash) + getReference().hashCode();
    }
    if (hasPlacement()) {
      hash = (37 * hash) + PLACEMENT_FIELD_NUMBER;
      hash = (53 * hash) + getPlacement().hashCode();
    }
    if (hasStatus()) {
      hash = (37 * hash) + STATUS_FIELD_NUMBER;
      hash = (53 * hash) + getStatus().hashCode();
    }
    if (getStatusHistoryCount() > 0) {
      hash = (37 * hash) + STATUS_HISTORY_FIELD_NUMBER;
      hash = (53 * hash) + getStatusHistoryList().hashCode();
    }
    if (getYarnApplicationsCount() > 0) {
      hash = (37 * hash) + YARN_APPLICATIONS_FIELD_NUMBER;
      hash = (53 * hash) + getYarnApplicationsList().hashCode();
    }
    hash = (37 * hash) + DRIVER_OUTPUT_RESOURCE_URI_FIELD_NUMBER;
    hash = (53 * hash) + getDriverOutputResourceUri().hashCode();
    hash = (37 * hash) + DRIVER_CONTROL_FILES_URI_FIELD_NUMBER;
    hash = (53 * hash) + getDriverControlFilesUri().hashCode();
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    if (hasScheduling()) {
      hash = (37 * hash) + SCHEDULING_FIELD_NUMBER;
      hash = (53 * hash) + getScheduling().hashCode();
    }
    switch (typeJobCase_) {
      case 3:
        hash = (37 * hash) + HADOOP_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getHadoopJob().hashCode();
        break;
      case 4:
        hash = (37 * hash) + SPARK_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getSparkJob().hashCode();
        break;
      case 5:
        hash = (37 * hash) + PYSPARK_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getPysparkJob().hashCode();
        break;
      case 6:
        hash = (37 * hash) + HIVE_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getHiveJob().hashCode();
        break;
      case 7:
        hash = (37 * hash) + PIG_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getPigJob().hashCode();
        break;
      case 12:
        hash = (37 * hash) + SPARK_SQL_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getSparkSqlJob().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.dataproc.v1.Job parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.Job 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.Job parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.Job 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.Job parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.dataproc.v1.Job 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.Job parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.dataproc.v1.Job 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.Job parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.cloud.dataproc.v1.Job 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.Job 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.Job 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.Job 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 resource.
   * </pre>
   *
   * Protobuf type {@code google.cloud.dataproc.v1.Job}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.Job)
      com.google.cloud.dataproc.v1.JobOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.dataproc.v1.JobsProto.internal_static_google_cloud_dataproc_v1_Job_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 18:
          return internalGetLabels();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(
        int number) {
      switch (number) {
        case 18:
          return internalGetMutableLabels();
        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_Job_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.dataproc.v1.Job.class, com.google.cloud.dataproc.v1.Job.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getStatusHistoryFieldBuilder();
        getYarnApplicationsFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      if (referenceBuilder_ == null) {
        reference_ = null;
      } else {
        reference_ = null;
        referenceBuilder_ = null;
      }
      if (placementBuilder_ == null) {
        placement_ = null;
      } else {
        placement_ = null;
        placementBuilder_ = null;
      }
      if (statusBuilder_ == null) {
        status_ = null;
      } else {
        status_ = null;
        statusBuilder_ = null;
      }
      if (statusHistoryBuilder_ == null) {
        statusHistory_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
      } else {
        statusHistoryBuilder_.clear();
      }
      if (yarnApplicationsBuilder_ == null) {
        yarnApplications_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
      } else {
        yarnApplicationsBuilder_.clear();
      }
      driverOutputResourceUri_ = "";

      driverControlFilesUri_ = "";

      internalGetMutableLabels().clear();
      if (schedulingBuilder_ == null) {
        scheduling_ = null;
      } else {
        scheduling_ = null;
        schedulingBuilder_ = null;
      }
      typeJobCase_ = 0;
      typeJob_ = null;
      return this;
    }

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

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

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

    public com.google.cloud.dataproc.v1.Job buildPartial() {
      com.google.cloud.dataproc.v1.Job result = new com.google.cloud.dataproc.v1.Job(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (referenceBuilder_ == null) {
        result.reference_ = reference_;
      } else {
        result.reference_ = referenceBuilder_.build();
      }
      if (placementBuilder_ == null) {
        result.placement_ = placement_;
      } else {
        result.placement_ = placementBuilder_.build();
      }
      if (typeJobCase_ == 3) {
        if (hadoopJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = hadoopJobBuilder_.build();
        }
      }
      if (typeJobCase_ == 4) {
        if (sparkJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = sparkJobBuilder_.build();
        }
      }
      if (typeJobCase_ == 5) {
        if (pysparkJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = pysparkJobBuilder_.build();
        }
      }
      if (typeJobCase_ == 6) {
        if (hiveJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = hiveJobBuilder_.build();
        }
      }
      if (typeJobCase_ == 7) {
        if (pigJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = pigJobBuilder_.build();
        }
      }
      if (typeJobCase_ == 12) {
        if (sparkSqlJobBuilder_ == null) {
          result.typeJob_ = typeJob_;
        } else {
          result.typeJob_ = sparkSqlJobBuilder_.build();
        }
      }
      if (statusBuilder_ == null) {
        result.status_ = status_;
      } else {
        result.status_ = statusBuilder_.build();
      }
      if (statusHistoryBuilder_ == null) {
        if (((bitField0_ & 0x00000200) == 0x00000200)) {
          statusHistory_ = java.util.Collections.unmodifiableList(statusHistory_);
          bitField0_ = (bitField0_ & ~0x00000200);
        }
        result.statusHistory_ = statusHistory_;
      } else {
        result.statusHistory_ = statusHistoryBuilder_.build();
      }
      if (yarnApplicationsBuilder_ == null) {
        if (((bitField0_ & 0x00000400) == 0x00000400)) {
          yarnApplications_ = java.util.Collections.unmodifiableList(yarnApplications_);
          bitField0_ = (bitField0_ & ~0x00000400);
        }
        result.yarnApplications_ = yarnApplications_;
      } else {
        result.yarnApplications_ = yarnApplicationsBuilder_.build();
      }
      result.driverOutputResourceUri_ = driverOutputResourceUri_;
      result.driverControlFilesUri_ = driverControlFilesUri_;
      result.labels_ = internalGetLabels();
      result.labels_.makeImmutable();
      if (schedulingBuilder_ == null) {
        result.scheduling_ = scheduling_;
      } else {
        result.scheduling_ = schedulingBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      result.typeJobCase_ = typeJobCase_;
      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.Job) {
        return mergeFrom((com.google.cloud.dataproc.v1.Job)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.dataproc.v1.Job other) {
      if (other == com.google.cloud.dataproc.v1.Job.getDefaultInstance()) return this;
      if (other.hasReference()) {
        mergeReference(other.getReference());
      }
      if (other.hasPlacement()) {
        mergePlacement(other.getPlacement());
      }
      if (other.hasStatus()) {
        mergeStatus(other.getStatus());
      }
      if (statusHistoryBuilder_ == null) {
        if (!other.statusHistory_.isEmpty()) {
          if (statusHistory_.isEmpty()) {
            statusHistory_ = other.statusHistory_;
            bitField0_ = (bitField0_ & ~0x00000200);
          } else {
            ensureStatusHistoryIsMutable();
            statusHistory_.addAll(other.statusHistory_);
          }
          onChanged();
        }
      } else {
        if (!other.statusHistory_.isEmpty()) {
          if (statusHistoryBuilder_.isEmpty()) {
            statusHistoryBuilder_.dispose();
            statusHistoryBuilder_ = null;
            statusHistory_ = other.statusHistory_;
            bitField0_ = (bitField0_ & ~0x00000200);
            statusHistoryBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getStatusHistoryFieldBuilder() : null;
          } else {
            statusHistoryBuilder_.addAllMessages(other.statusHistory_);
          }
        }
      }
      if (yarnApplicationsBuilder_ == null) {
        if (!other.yarnApplications_.isEmpty()) {
          if (yarnApplications_.isEmpty()) {
            yarnApplications_ = other.yarnApplications_;
            bitField0_ = (bitField0_ & ~0x00000400);
          } else {
            ensureYarnApplicationsIsMutable();
            yarnApplications_.addAll(other.yarnApplications_);
          }
          onChanged();
        }
      } else {
        if (!other.yarnApplications_.isEmpty()) {
          if (yarnApplicationsBuilder_.isEmpty()) {
            yarnApplicationsBuilder_.dispose();
            yarnApplicationsBuilder_ = null;
            yarnApplications_ = other.yarnApplications_;
            bitField0_ = (bitField0_ & ~0x00000400);
            yarnApplicationsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getYarnApplicationsFieldBuilder() : null;
          } else {
            yarnApplicationsBuilder_.addAllMessages(other.yarnApplications_);
          }
        }
      }
      if (!other.getDriverOutputResourceUri().isEmpty()) {
        driverOutputResourceUri_ = other.driverOutputResourceUri_;
        onChanged();
      }
      if (!other.getDriverControlFilesUri().isEmpty()) {
        driverControlFilesUri_ = other.driverControlFilesUri_;
        onChanged();
      }
      internalGetMutableLabels().mergeFrom(
          other.internalGetLabels());
      if (other.hasScheduling()) {
        mergeScheduling(other.getScheduling());
      }
      switch (other.getTypeJobCase()) {
        case HADOOP_JOB: {
          mergeHadoopJob(other.getHadoopJob());
          break;
        }
        case SPARK_JOB: {
          mergeSparkJob(other.getSparkJob());
          break;
        }
        case PYSPARK_JOB: {
          mergePysparkJob(other.getPysparkJob());
          break;
        }
        case HIVE_JOB: {
          mergeHiveJob(other.getHiveJob());
          break;
        }
        case PIG_JOB: {
          mergePigJob(other.getPigJob());
          break;
        }
        case SPARK_SQL_JOB: {
          mergeSparkSqlJob(other.getSparkSqlJob());
          break;
        }
        case TYPEJOB_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.Job parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.dataproc.v1.Job) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int typeJobCase_ = 0;
    private java.lang.Object typeJob_;
    public TypeJobCase
        getTypeJobCase() {
      return TypeJobCase.forNumber(
          typeJobCase_);
    }

    public Builder clearTypeJob() {
      typeJobCase_ = 0;
      typeJob_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.cloud.dataproc.v1.JobReference reference_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobReference, com.google.cloud.dataproc.v1.JobReference.Builder, com.google.cloud.dataproc.v1.JobReferenceOrBuilder> referenceBuilder_;
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public boolean hasReference() {
      return referenceBuilder_ != null || reference_ != null;
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public com.google.cloud.dataproc.v1.JobReference getReference() {
      if (referenceBuilder_ == null) {
        return reference_ == null ? com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() : reference_;
      } else {
        return referenceBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public Builder setReference(com.google.cloud.dataproc.v1.JobReference value) {
      if (referenceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        reference_ = value;
        onChanged();
      } else {
        referenceBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public Builder setReference(
        com.google.cloud.dataproc.v1.JobReference.Builder builderForValue) {
      if (referenceBuilder_ == null) {
        reference_ = builderForValue.build();
        onChanged();
      } else {
        referenceBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public Builder mergeReference(com.google.cloud.dataproc.v1.JobReference value) {
      if (referenceBuilder_ == null) {
        if (reference_ != null) {
          reference_ =
            com.google.cloud.dataproc.v1.JobReference.newBuilder(reference_).mergeFrom(value).buildPartial();
        } else {
          reference_ = value;
        }
        onChanged();
      } else {
        referenceBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public Builder clearReference() {
      if (referenceBuilder_ == null) {
        reference_ = null;
        onChanged();
      } else {
        reference_ = null;
        referenceBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public com.google.cloud.dataproc.v1.JobReference.Builder getReferenceBuilder() {
      
      onChanged();
      return getReferenceFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    public com.google.cloud.dataproc.v1.JobReferenceOrBuilder getReferenceOrBuilder() {
      if (referenceBuilder_ != null) {
        return referenceBuilder_.getMessageOrBuilder();
      } else {
        return reference_ == null ?
            com.google.cloud.dataproc.v1.JobReference.getDefaultInstance() : reference_;
      }
    }
    /**
     * <pre>
     * Optional. The fully qualified reference to the job, which can be used to
     * obtain the equivalent REST path of the job resource. If this property
     * is not specified when a job is created, the server generates a
     * &lt;code&gt;job_id&lt;/code&gt;.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobReference reference = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobReference, com.google.cloud.dataproc.v1.JobReference.Builder, com.google.cloud.dataproc.v1.JobReferenceOrBuilder> 
        getReferenceFieldBuilder() {
      if (referenceBuilder_ == null) {
        referenceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.JobReference, com.google.cloud.dataproc.v1.JobReference.Builder, com.google.cloud.dataproc.v1.JobReferenceOrBuilder>(
                getReference(),
                getParentForChildren(),
                isClean());
        reference_ = null;
      }
      return referenceBuilder_;
    }

    private com.google.cloud.dataproc.v1.JobPlacement placement_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobPlacement, com.google.cloud.dataproc.v1.JobPlacement.Builder, com.google.cloud.dataproc.v1.JobPlacementOrBuilder> placementBuilder_;
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public boolean hasPlacement() {
      return placementBuilder_ != null || placement_ != null;
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public com.google.cloud.dataproc.v1.JobPlacement getPlacement() {
      if (placementBuilder_ == null) {
        return placement_ == null ? com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() : placement_;
      } else {
        return placementBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public Builder setPlacement(com.google.cloud.dataproc.v1.JobPlacement value) {
      if (placementBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        placement_ = value;
        onChanged();
      } else {
        placementBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public Builder setPlacement(
        com.google.cloud.dataproc.v1.JobPlacement.Builder builderForValue) {
      if (placementBuilder_ == null) {
        placement_ = builderForValue.build();
        onChanged();
      } else {
        placementBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public Builder mergePlacement(com.google.cloud.dataproc.v1.JobPlacement value) {
      if (placementBuilder_ == null) {
        if (placement_ != null) {
          placement_ =
            com.google.cloud.dataproc.v1.JobPlacement.newBuilder(placement_).mergeFrom(value).buildPartial();
        } else {
          placement_ = value;
        }
        onChanged();
      } else {
        placementBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public Builder clearPlacement() {
      if (placementBuilder_ == null) {
        placement_ = null;
        onChanged();
      } else {
        placement_ = null;
        placementBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public com.google.cloud.dataproc.v1.JobPlacement.Builder getPlacementBuilder() {
      
      onChanged();
      return getPlacementFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    public com.google.cloud.dataproc.v1.JobPlacementOrBuilder getPlacementOrBuilder() {
      if (placementBuilder_ != null) {
        return placementBuilder_.getMessageOrBuilder();
      } else {
        return placement_ == null ?
            com.google.cloud.dataproc.v1.JobPlacement.getDefaultInstance() : placement_;
      }
    }
    /**
     * <pre>
     * Required. Job information, including how, when, and where to
     * run the job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobPlacement placement = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobPlacement, com.google.cloud.dataproc.v1.JobPlacement.Builder, com.google.cloud.dataproc.v1.JobPlacementOrBuilder> 
        getPlacementFieldBuilder() {
      if (placementBuilder_ == null) {
        placementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.JobPlacement, com.google.cloud.dataproc.v1.JobPlacement.Builder, com.google.cloud.dataproc.v1.JobPlacementOrBuilder>(
                getPlacement(),
                getParentForChildren(),
                isClean());
        placement_ = null;
      }
      return placementBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.HadoopJob, com.google.cloud.dataproc.v1.HadoopJob.Builder, com.google.cloud.dataproc.v1.HadoopJobOrBuilder> hadoopJobBuilder_;
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public boolean hasHadoopJob() {
      return typeJobCase_ == 3;
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public com.google.cloud.dataproc.v1.HadoopJob getHadoopJob() {
      if (hadoopJobBuilder_ == null) {
        if (typeJobCase_ == 3) {
          return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 3) {
          return hadoopJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public Builder setHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) {
      if (hadoopJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        hadoopJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public Builder setHadoopJob(
        com.google.cloud.dataproc.v1.HadoopJob.Builder builderForValue) {
      if (hadoopJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        hadoopJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public Builder mergeHadoopJob(com.google.cloud.dataproc.v1.HadoopJob value) {
      if (hadoopJobBuilder_ == null) {
        if (typeJobCase_ == 3 &&
            typeJob_ != com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.HadoopJob.newBuilder((com.google.cloud.dataproc.v1.HadoopJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 3) {
          hadoopJobBuilder_.mergeFrom(value);
        }
        hadoopJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public Builder clearHadoopJob() {
      if (hadoopJobBuilder_ == null) {
        if (typeJobCase_ == 3) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 3) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        hadoopJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public com.google.cloud.dataproc.v1.HadoopJob.Builder getHadoopJobBuilder() {
      return getHadoopJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    public com.google.cloud.dataproc.v1.HadoopJobOrBuilder getHadoopJobOrBuilder() {
      if ((typeJobCase_ == 3) && (hadoopJobBuilder_ != null)) {
        return hadoopJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 3) {
          return (com.google.cloud.dataproc.v1.HadoopJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Hadoop job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HadoopJob hadoop_job = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.HadoopJob, com.google.cloud.dataproc.v1.HadoopJob.Builder, com.google.cloud.dataproc.v1.HadoopJobOrBuilder> 
        getHadoopJobFieldBuilder() {
      if (hadoopJobBuilder_ == null) {
        if (!(typeJobCase_ == 3)) {
          typeJob_ = com.google.cloud.dataproc.v1.HadoopJob.getDefaultInstance();
        }
        hadoopJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.HadoopJob, com.google.cloud.dataproc.v1.HadoopJob.Builder, com.google.cloud.dataproc.v1.HadoopJobOrBuilder>(
                (com.google.cloud.dataproc.v1.HadoopJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 3;
      onChanged();;
      return hadoopJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.SparkJob, com.google.cloud.dataproc.v1.SparkJob.Builder, com.google.cloud.dataproc.v1.SparkJobOrBuilder> sparkJobBuilder_;
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public boolean hasSparkJob() {
      return typeJobCase_ == 4;
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public com.google.cloud.dataproc.v1.SparkJob getSparkJob() {
      if (sparkJobBuilder_ == null) {
        if (typeJobCase_ == 4) {
          return (com.google.cloud.dataproc.v1.SparkJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 4) {
          return sparkJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public Builder setSparkJob(com.google.cloud.dataproc.v1.SparkJob value) {
      if (sparkJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        sparkJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public Builder setSparkJob(
        com.google.cloud.dataproc.v1.SparkJob.Builder builderForValue) {
      if (sparkJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        sparkJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public Builder mergeSparkJob(com.google.cloud.dataproc.v1.SparkJob value) {
      if (sparkJobBuilder_ == null) {
        if (typeJobCase_ == 4 &&
            typeJob_ != com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.SparkJob.newBuilder((com.google.cloud.dataproc.v1.SparkJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 4) {
          sparkJobBuilder_.mergeFrom(value);
        }
        sparkJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public Builder clearSparkJob() {
      if (sparkJobBuilder_ == null) {
        if (typeJobCase_ == 4) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 4) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        sparkJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public com.google.cloud.dataproc.v1.SparkJob.Builder getSparkJobBuilder() {
      return getSparkJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    public com.google.cloud.dataproc.v1.SparkJobOrBuilder getSparkJobOrBuilder() {
      if ((typeJobCase_ == 4) && (sparkJobBuilder_ != null)) {
        return sparkJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 4) {
          return (com.google.cloud.dataproc.v1.SparkJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Spark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkJob spark_job = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.SparkJob, com.google.cloud.dataproc.v1.SparkJob.Builder, com.google.cloud.dataproc.v1.SparkJobOrBuilder> 
        getSparkJobFieldBuilder() {
      if (sparkJobBuilder_ == null) {
        if (!(typeJobCase_ == 4)) {
          typeJob_ = com.google.cloud.dataproc.v1.SparkJob.getDefaultInstance();
        }
        sparkJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.SparkJob, com.google.cloud.dataproc.v1.SparkJob.Builder, com.google.cloud.dataproc.v1.SparkJobOrBuilder>(
                (com.google.cloud.dataproc.v1.SparkJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 4;
      onChanged();;
      return sparkJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.PySparkJob, com.google.cloud.dataproc.v1.PySparkJob.Builder, com.google.cloud.dataproc.v1.PySparkJobOrBuilder> pysparkJobBuilder_;
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public boolean hasPysparkJob() {
      return typeJobCase_ == 5;
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public com.google.cloud.dataproc.v1.PySparkJob getPysparkJob() {
      if (pysparkJobBuilder_ == null) {
        if (typeJobCase_ == 5) {
          return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 5) {
          return pysparkJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public Builder setPysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) {
      if (pysparkJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        pysparkJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public Builder setPysparkJob(
        com.google.cloud.dataproc.v1.PySparkJob.Builder builderForValue) {
      if (pysparkJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        pysparkJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public Builder mergePysparkJob(com.google.cloud.dataproc.v1.PySparkJob value) {
      if (pysparkJobBuilder_ == null) {
        if (typeJobCase_ == 5 &&
            typeJob_ != com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.PySparkJob.newBuilder((com.google.cloud.dataproc.v1.PySparkJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 5) {
          pysparkJobBuilder_.mergeFrom(value);
        }
        pysparkJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public Builder clearPysparkJob() {
      if (pysparkJobBuilder_ == null) {
        if (typeJobCase_ == 5) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 5) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        pysparkJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public com.google.cloud.dataproc.v1.PySparkJob.Builder getPysparkJobBuilder() {
      return getPysparkJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    public com.google.cloud.dataproc.v1.PySparkJobOrBuilder getPysparkJobOrBuilder() {
      if ((typeJobCase_ == 5) && (pysparkJobBuilder_ != null)) {
        return pysparkJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 5) {
          return (com.google.cloud.dataproc.v1.PySparkJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Pyspark job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PySparkJob pyspark_job = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.PySparkJob, com.google.cloud.dataproc.v1.PySparkJob.Builder, com.google.cloud.dataproc.v1.PySparkJobOrBuilder> 
        getPysparkJobFieldBuilder() {
      if (pysparkJobBuilder_ == null) {
        if (!(typeJobCase_ == 5)) {
          typeJob_ = com.google.cloud.dataproc.v1.PySparkJob.getDefaultInstance();
        }
        pysparkJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.PySparkJob, com.google.cloud.dataproc.v1.PySparkJob.Builder, com.google.cloud.dataproc.v1.PySparkJobOrBuilder>(
                (com.google.cloud.dataproc.v1.PySparkJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 5;
      onChanged();;
      return pysparkJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.HiveJob, com.google.cloud.dataproc.v1.HiveJob.Builder, com.google.cloud.dataproc.v1.HiveJobOrBuilder> hiveJobBuilder_;
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public boolean hasHiveJob() {
      return typeJobCase_ == 6;
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public com.google.cloud.dataproc.v1.HiveJob getHiveJob() {
      if (hiveJobBuilder_ == null) {
        if (typeJobCase_ == 6) {
          return (com.google.cloud.dataproc.v1.HiveJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 6) {
          return hiveJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public Builder setHiveJob(com.google.cloud.dataproc.v1.HiveJob value) {
      if (hiveJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        hiveJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public Builder setHiveJob(
        com.google.cloud.dataproc.v1.HiveJob.Builder builderForValue) {
      if (hiveJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        hiveJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public Builder mergeHiveJob(com.google.cloud.dataproc.v1.HiveJob value) {
      if (hiveJobBuilder_ == null) {
        if (typeJobCase_ == 6 &&
            typeJob_ != com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.HiveJob.newBuilder((com.google.cloud.dataproc.v1.HiveJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 6) {
          hiveJobBuilder_.mergeFrom(value);
        }
        hiveJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public Builder clearHiveJob() {
      if (hiveJobBuilder_ == null) {
        if (typeJobCase_ == 6) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 6) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        hiveJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public com.google.cloud.dataproc.v1.HiveJob.Builder getHiveJobBuilder() {
      return getHiveJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    public com.google.cloud.dataproc.v1.HiveJobOrBuilder getHiveJobOrBuilder() {
      if ((typeJobCase_ == 6) && (hiveJobBuilder_ != null)) {
        return hiveJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 6) {
          return (com.google.cloud.dataproc.v1.HiveJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Hive job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.HiveJob hive_job = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.HiveJob, com.google.cloud.dataproc.v1.HiveJob.Builder, com.google.cloud.dataproc.v1.HiveJobOrBuilder> 
        getHiveJobFieldBuilder() {
      if (hiveJobBuilder_ == null) {
        if (!(typeJobCase_ == 6)) {
          typeJob_ = com.google.cloud.dataproc.v1.HiveJob.getDefaultInstance();
        }
        hiveJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.HiveJob, com.google.cloud.dataproc.v1.HiveJob.Builder, com.google.cloud.dataproc.v1.HiveJobOrBuilder>(
                (com.google.cloud.dataproc.v1.HiveJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 6;
      onChanged();;
      return hiveJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.PigJob, com.google.cloud.dataproc.v1.PigJob.Builder, com.google.cloud.dataproc.v1.PigJobOrBuilder> pigJobBuilder_;
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public boolean hasPigJob() {
      return typeJobCase_ == 7;
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public com.google.cloud.dataproc.v1.PigJob getPigJob() {
      if (pigJobBuilder_ == null) {
        if (typeJobCase_ == 7) {
          return (com.google.cloud.dataproc.v1.PigJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 7) {
          return pigJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public Builder setPigJob(com.google.cloud.dataproc.v1.PigJob value) {
      if (pigJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        pigJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public Builder setPigJob(
        com.google.cloud.dataproc.v1.PigJob.Builder builderForValue) {
      if (pigJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        pigJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public Builder mergePigJob(com.google.cloud.dataproc.v1.PigJob value) {
      if (pigJobBuilder_ == null) {
        if (typeJobCase_ == 7 &&
            typeJob_ != com.google.cloud.dataproc.v1.PigJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.PigJob.newBuilder((com.google.cloud.dataproc.v1.PigJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 7) {
          pigJobBuilder_.mergeFrom(value);
        }
        pigJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 7;
      return this;
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public Builder clearPigJob() {
      if (pigJobBuilder_ == null) {
        if (typeJobCase_ == 7) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 7) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        pigJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public com.google.cloud.dataproc.v1.PigJob.Builder getPigJobBuilder() {
      return getPigJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    public com.google.cloud.dataproc.v1.PigJobOrBuilder getPigJobOrBuilder() {
      if ((typeJobCase_ == 7) && (pigJobBuilder_ != null)) {
        return pigJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 7) {
          return (com.google.cloud.dataproc.v1.PigJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a Pig job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.PigJob pig_job = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.PigJob, com.google.cloud.dataproc.v1.PigJob.Builder, com.google.cloud.dataproc.v1.PigJobOrBuilder> 
        getPigJobFieldBuilder() {
      if (pigJobBuilder_ == null) {
        if (!(typeJobCase_ == 7)) {
          typeJob_ = com.google.cloud.dataproc.v1.PigJob.getDefaultInstance();
        }
        pigJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.PigJob, com.google.cloud.dataproc.v1.PigJob.Builder, com.google.cloud.dataproc.v1.PigJobOrBuilder>(
                (com.google.cloud.dataproc.v1.PigJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 7;
      onChanged();;
      return pigJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.SparkSqlJob, com.google.cloud.dataproc.v1.SparkSqlJob.Builder, com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> sparkSqlJobBuilder_;
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public boolean hasSparkSqlJob() {
      return typeJobCase_ == 12;
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public com.google.cloud.dataproc.v1.SparkSqlJob getSparkSqlJob() {
      if (sparkSqlJobBuilder_ == null) {
        if (typeJobCase_ == 12) {
          return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
      } else {
        if (typeJobCase_ == 12) {
          return sparkSqlJobBuilder_.getMessage();
        }
        return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public Builder setSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) {
      if (sparkSqlJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        typeJob_ = value;
        onChanged();
      } else {
        sparkSqlJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public Builder setSparkSqlJob(
        com.google.cloud.dataproc.v1.SparkSqlJob.Builder builderForValue) {
      if (sparkSqlJobBuilder_ == null) {
        typeJob_ = builderForValue.build();
        onChanged();
      } else {
        sparkSqlJobBuilder_.setMessage(builderForValue.build());
      }
      typeJobCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public Builder mergeSparkSqlJob(com.google.cloud.dataproc.v1.SparkSqlJob value) {
      if (sparkSqlJobBuilder_ == null) {
        if (typeJobCase_ == 12 &&
            typeJob_ != com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance()) {
          typeJob_ = com.google.cloud.dataproc.v1.SparkSqlJob.newBuilder((com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_)
              .mergeFrom(value).buildPartial();
        } else {
          typeJob_ = value;
        }
        onChanged();
      } else {
        if (typeJobCase_ == 12) {
          sparkSqlJobBuilder_.mergeFrom(value);
        }
        sparkSqlJobBuilder_.setMessage(value);
      }
      typeJobCase_ = 12;
      return this;
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public Builder clearSparkSqlJob() {
      if (sparkSqlJobBuilder_ == null) {
        if (typeJobCase_ == 12) {
          typeJobCase_ = 0;
          typeJob_ = null;
          onChanged();
        }
      } else {
        if (typeJobCase_ == 12) {
          typeJobCase_ = 0;
          typeJob_ = null;
        }
        sparkSqlJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public com.google.cloud.dataproc.v1.SparkSqlJob.Builder getSparkSqlJobBuilder() {
      return getSparkSqlJobFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    public com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder getSparkSqlJobOrBuilder() {
      if ((typeJobCase_ == 12) && (sparkSqlJobBuilder_ != null)) {
        return sparkSqlJobBuilder_.getMessageOrBuilder();
      } else {
        if (typeJobCase_ == 12) {
          return (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_;
        }
        return com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Job is a SparkSql job.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.SparkSqlJob spark_sql_job = 12;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.SparkSqlJob, com.google.cloud.dataproc.v1.SparkSqlJob.Builder, com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder> 
        getSparkSqlJobFieldBuilder() {
      if (sparkSqlJobBuilder_ == null) {
        if (!(typeJobCase_ == 12)) {
          typeJob_ = com.google.cloud.dataproc.v1.SparkSqlJob.getDefaultInstance();
        }
        sparkSqlJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.SparkSqlJob, com.google.cloud.dataproc.v1.SparkSqlJob.Builder, com.google.cloud.dataproc.v1.SparkSqlJobOrBuilder>(
                (com.google.cloud.dataproc.v1.SparkSqlJob) typeJob_,
                getParentForChildren(),
                isClean());
        typeJob_ = null;
      }
      typeJobCase_ = 12;
      onChanged();;
      return sparkSqlJobBuilder_;
    }

    private com.google.cloud.dataproc.v1.JobStatus status_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder> statusBuilder_;
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public boolean hasStatus() {
      return statusBuilder_ != null || status_ != null;
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus getStatus() {
      if (statusBuilder_ == null) {
        return status_ == null ? com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() : status_;
      } else {
        return statusBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public Builder setStatus(com.google.cloud.dataproc.v1.JobStatus value) {
      if (statusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        status_ = value;
        onChanged();
      } else {
        statusBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public Builder setStatus(
        com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) {
      if (statusBuilder_ == null) {
        status_ = builderForValue.build();
        onChanged();
      } else {
        statusBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public Builder mergeStatus(com.google.cloud.dataproc.v1.JobStatus value) {
      if (statusBuilder_ == null) {
        if (status_ != null) {
          status_ =
            com.google.cloud.dataproc.v1.JobStatus.newBuilder(status_).mergeFrom(value).buildPartial();
        } else {
          status_ = value;
        }
        onChanged();
      } else {
        statusBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public Builder clearStatus() {
      if (statusBuilder_ == null) {
        status_ = null;
        onChanged();
      } else {
        status_ = null;
        statusBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus.Builder getStatusBuilder() {
      
      onChanged();
      return getStatusFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusOrBuilder() {
      if (statusBuilder_ != null) {
        return statusBuilder_.getMessageOrBuilder();
      } else {
        return status_ == null ?
            com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance() : status_;
      }
    }
    /**
     * <pre>
     * Output-only. The job status. Additional application-specific
     * status information may be contained in the &lt;code&gt;type_job&lt;/code&gt;
     * and &lt;code&gt;yarn_applications&lt;/code&gt; fields.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobStatus status = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder> 
        getStatusFieldBuilder() {
      if (statusBuilder_ == null) {
        statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder>(
                getStatus(),
                getParentForChildren(),
                isClean());
        status_ = null;
      }
      return statusBuilder_;
    }

    private java.util.List<com.google.cloud.dataproc.v1.JobStatus> statusHistory_ =
      java.util.Collections.emptyList();
    private void ensureStatusHistoryIsMutable() {
      if (!((bitField0_ & 0x00000200) == 0x00000200)) {
        statusHistory_ = new java.util.ArrayList<com.google.cloud.dataproc.v1.JobStatus>(statusHistory_);
        bitField0_ |= 0x00000200;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder> statusHistoryBuilder_;

    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public java.util.List<com.google.cloud.dataproc.v1.JobStatus> getStatusHistoryList() {
      if (statusHistoryBuilder_ == null) {
        return java.util.Collections.unmodifiableList(statusHistory_);
      } else {
        return statusHistoryBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public int getStatusHistoryCount() {
      if (statusHistoryBuilder_ == null) {
        return statusHistory_.size();
      } else {
        return statusHistoryBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus getStatusHistory(int index) {
      if (statusHistoryBuilder_ == null) {
        return statusHistory_.get(index);
      } else {
        return statusHistoryBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder setStatusHistory(
        int index, com.google.cloud.dataproc.v1.JobStatus value) {
      if (statusHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStatusHistoryIsMutable();
        statusHistory_.set(index, value);
        onChanged();
      } else {
        statusHistoryBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder setStatusHistory(
        int index, com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) {
      if (statusHistoryBuilder_ == null) {
        ensureStatusHistoryIsMutable();
        statusHistory_.set(index, builderForValue.build());
        onChanged();
      } else {
        statusHistoryBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder addStatusHistory(com.google.cloud.dataproc.v1.JobStatus value) {
      if (statusHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStatusHistoryIsMutable();
        statusHistory_.add(value);
        onChanged();
      } else {
        statusHistoryBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder addStatusHistory(
        int index, com.google.cloud.dataproc.v1.JobStatus value) {
      if (statusHistoryBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureStatusHistoryIsMutable();
        statusHistory_.add(index, value);
        onChanged();
      } else {
        statusHistoryBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder addStatusHistory(
        com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) {
      if (statusHistoryBuilder_ == null) {
        ensureStatusHistoryIsMutable();
        statusHistory_.add(builderForValue.build());
        onChanged();
      } else {
        statusHistoryBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder addStatusHistory(
        int index, com.google.cloud.dataproc.v1.JobStatus.Builder builderForValue) {
      if (statusHistoryBuilder_ == null) {
        ensureStatusHistoryIsMutable();
        statusHistory_.add(index, builderForValue.build());
        onChanged();
      } else {
        statusHistoryBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder addAllStatusHistory(
        java.lang.Iterable<? extends com.google.cloud.dataproc.v1.JobStatus> values) {
      if (statusHistoryBuilder_ == null) {
        ensureStatusHistoryIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, statusHistory_);
        onChanged();
      } else {
        statusHistoryBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder clearStatusHistory() {
      if (statusHistoryBuilder_ == null) {
        statusHistory_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000200);
        onChanged();
      } else {
        statusHistoryBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public Builder removeStatusHistory(int index) {
      if (statusHistoryBuilder_ == null) {
        ensureStatusHistoryIsMutable();
        statusHistory_.remove(index);
        onChanged();
      } else {
        statusHistoryBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus.Builder getStatusHistoryBuilder(
        int index) {
      return getStatusHistoryFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatusOrBuilder getStatusHistoryOrBuilder(
        int index) {
      if (statusHistoryBuilder_ == null) {
        return statusHistory_.get(index);  } else {
        return statusHistoryBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public java.util.List<? extends com.google.cloud.dataproc.v1.JobStatusOrBuilder> 
         getStatusHistoryOrBuilderList() {
      if (statusHistoryBuilder_ != null) {
        return statusHistoryBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(statusHistory_);
      }
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus.Builder addStatusHistoryBuilder() {
      return getStatusHistoryFieldBuilder().addBuilder(
          com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance());
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public com.google.cloud.dataproc.v1.JobStatus.Builder addStatusHistoryBuilder(
        int index) {
      return getStatusHistoryFieldBuilder().addBuilder(
          index, com.google.cloud.dataproc.v1.JobStatus.getDefaultInstance());
    }
    /**
     * <pre>
     * Output-only. The previous job status.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.JobStatus status_history = 13;</code>
     */
    public java.util.List<com.google.cloud.dataproc.v1.JobStatus.Builder> 
         getStatusHistoryBuilderList() {
      return getStatusHistoryFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder> 
        getStatusHistoryFieldBuilder() {
      if (statusHistoryBuilder_ == null) {
        statusHistoryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.dataproc.v1.JobStatus, com.google.cloud.dataproc.v1.JobStatus.Builder, com.google.cloud.dataproc.v1.JobStatusOrBuilder>(
                statusHistory_,
                ((bitField0_ & 0x00000200) == 0x00000200),
                getParentForChildren(),
                isClean());
        statusHistory_ = null;
      }
      return statusHistoryBuilder_;
    }

    private java.util.List<com.google.cloud.dataproc.v1.YarnApplication> yarnApplications_ =
      java.util.Collections.emptyList();
    private void ensureYarnApplicationsIsMutable() {
      if (!((bitField0_ & 0x00000400) == 0x00000400)) {
        yarnApplications_ = new java.util.ArrayList<com.google.cloud.dataproc.v1.YarnApplication>(yarnApplications_);
        bitField0_ |= 0x00000400;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.dataproc.v1.YarnApplication, com.google.cloud.dataproc.v1.YarnApplication.Builder, com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> yarnApplicationsBuilder_;

    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public java.util.List<com.google.cloud.dataproc.v1.YarnApplication> getYarnApplicationsList() {
      if (yarnApplicationsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(yarnApplications_);
      } else {
        return yarnApplicationsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public int getYarnApplicationsCount() {
      if (yarnApplicationsBuilder_ == null) {
        return yarnApplications_.size();
      } else {
        return yarnApplicationsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public com.google.cloud.dataproc.v1.YarnApplication getYarnApplications(int index) {
      if (yarnApplicationsBuilder_ == null) {
        return yarnApplications_.get(index);
      } else {
        return yarnApplicationsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder setYarnApplications(
        int index, com.google.cloud.dataproc.v1.YarnApplication value) {
      if (yarnApplicationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureYarnApplicationsIsMutable();
        yarnApplications_.set(index, value);
        onChanged();
      } else {
        yarnApplicationsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder setYarnApplications(
        int index, com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) {
      if (yarnApplicationsBuilder_ == null) {
        ensureYarnApplicationsIsMutable();
        yarnApplications_.set(index, builderForValue.build());
        onChanged();
      } else {
        yarnApplicationsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder addYarnApplications(com.google.cloud.dataproc.v1.YarnApplication value) {
      if (yarnApplicationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureYarnApplicationsIsMutable();
        yarnApplications_.add(value);
        onChanged();
      } else {
        yarnApplicationsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder addYarnApplications(
        int index, com.google.cloud.dataproc.v1.YarnApplication value) {
      if (yarnApplicationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureYarnApplicationsIsMutable();
        yarnApplications_.add(index, value);
        onChanged();
      } else {
        yarnApplicationsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder addYarnApplications(
        com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) {
      if (yarnApplicationsBuilder_ == null) {
        ensureYarnApplicationsIsMutable();
        yarnApplications_.add(builderForValue.build());
        onChanged();
      } else {
        yarnApplicationsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder addYarnApplications(
        int index, com.google.cloud.dataproc.v1.YarnApplication.Builder builderForValue) {
      if (yarnApplicationsBuilder_ == null) {
        ensureYarnApplicationsIsMutable();
        yarnApplications_.add(index, builderForValue.build());
        onChanged();
      } else {
        yarnApplicationsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder addAllYarnApplications(
        java.lang.Iterable<? extends com.google.cloud.dataproc.v1.YarnApplication> values) {
      if (yarnApplicationsBuilder_ == null) {
        ensureYarnApplicationsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, yarnApplications_);
        onChanged();
      } else {
        yarnApplicationsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder clearYarnApplications() {
      if (yarnApplicationsBuilder_ == null) {
        yarnApplications_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
      } else {
        yarnApplicationsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public Builder removeYarnApplications(int index) {
      if (yarnApplicationsBuilder_ == null) {
        ensureYarnApplicationsIsMutable();
        yarnApplications_.remove(index);
        onChanged();
      } else {
        yarnApplicationsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public com.google.cloud.dataproc.v1.YarnApplication.Builder getYarnApplicationsBuilder(
        int index) {
      return getYarnApplicationsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public com.google.cloud.dataproc.v1.YarnApplicationOrBuilder getYarnApplicationsOrBuilder(
        int index) {
      if (yarnApplicationsBuilder_ == null) {
        return yarnApplications_.get(index);  } else {
        return yarnApplicationsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public java.util.List<? extends com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> 
         getYarnApplicationsOrBuilderList() {
      if (yarnApplicationsBuilder_ != null) {
        return yarnApplicationsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(yarnApplications_);
      }
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public com.google.cloud.dataproc.v1.YarnApplication.Builder addYarnApplicationsBuilder() {
      return getYarnApplicationsFieldBuilder().addBuilder(
          com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance());
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public com.google.cloud.dataproc.v1.YarnApplication.Builder addYarnApplicationsBuilder(
        int index) {
      return getYarnApplicationsFieldBuilder().addBuilder(
          index, com.google.cloud.dataproc.v1.YarnApplication.getDefaultInstance());
    }
    /**
     * <pre>
     * Output-only. The collection of YARN applications spun up by this job.
     * **Beta** Feature: This report is available for testing purposes only. It may
     * be changed before final release.
     * </pre>
     *
     * <code>repeated .google.cloud.dataproc.v1.YarnApplication yarn_applications = 9;</code>
     */
    public java.util.List<com.google.cloud.dataproc.v1.YarnApplication.Builder> 
         getYarnApplicationsBuilderList() {
      return getYarnApplicationsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.dataproc.v1.YarnApplication, com.google.cloud.dataproc.v1.YarnApplication.Builder, com.google.cloud.dataproc.v1.YarnApplicationOrBuilder> 
        getYarnApplicationsFieldBuilder() {
      if (yarnApplicationsBuilder_ == null) {
        yarnApplicationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.dataproc.v1.YarnApplication, com.google.cloud.dataproc.v1.YarnApplication.Builder, com.google.cloud.dataproc.v1.YarnApplicationOrBuilder>(
                yarnApplications_,
                ((bitField0_ & 0x00000400) == 0x00000400),
                getParentForChildren(),
                isClean());
        yarnApplications_ = null;
      }
      return yarnApplicationsBuilder_;
    }

    private java.lang.Object driverOutputResourceUri_ = "";
    /**
     * <pre>
     * Output-only. A URI pointing to the location of the stdout of the job's
     * driver program.
     * </pre>
     *
     * <code>string driver_output_resource_uri = 17;</code>
     */
    public java.lang.String getDriverOutputResourceUri() {
      java.lang.Object ref = driverOutputResourceUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        driverOutputResourceUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Output-only. A URI pointing to the location of the stdout of the job's
     * driver program.
     * </pre>
     *
     * <code>string driver_output_resource_uri = 17;</code>
     */
    public com.google.protobuf.ByteString
        getDriverOutputResourceUriBytes() {
      java.lang.Object ref = driverOutputResourceUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        driverOutputResourceUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Output-only. A URI pointing to the location of the stdout of the job's
     * driver program.
     * </pre>
     *
     * <code>string driver_output_resource_uri = 17;</code>
     */
    public Builder setDriverOutputResourceUri(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      driverOutputResourceUri_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output-only. A URI pointing to the location of the stdout of the job's
     * driver program.
     * </pre>
     *
     * <code>string driver_output_resource_uri = 17;</code>
     */
    public Builder clearDriverOutputResourceUri() {
      
      driverOutputResourceUri_ = getDefaultInstance().getDriverOutputResourceUri();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output-only. A URI pointing to the location of the stdout of the job's
     * driver program.
     * </pre>
     *
     * <code>string driver_output_resource_uri = 17;</code>
     */
    public Builder setDriverOutputResourceUriBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      driverOutputResourceUri_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object driverControlFilesUri_ = "";
    /**
     * <pre>
     * Output-only. If present, the location of miscellaneous control files
     * which may be used as part of job setup and handling. If not present,
     * control files may be placed in the same location as `driver_output_uri`.
     * </pre>
     *
     * <code>string driver_control_files_uri = 15;</code>
     */
    public java.lang.String getDriverControlFilesUri() {
      java.lang.Object ref = driverControlFilesUri_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        driverControlFilesUri_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Output-only. If present, the location of miscellaneous control files
     * which may be used as part of job setup and handling. If not present,
     * control files may be placed in the same location as `driver_output_uri`.
     * </pre>
     *
     * <code>string driver_control_files_uri = 15;</code>
     */
    public com.google.protobuf.ByteString
        getDriverControlFilesUriBytes() {
      java.lang.Object ref = driverControlFilesUri_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        driverControlFilesUri_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Output-only. If present, the location of miscellaneous control files
     * which may be used as part of job setup and handling. If not present,
     * control files may be placed in the same location as `driver_output_uri`.
     * </pre>
     *
     * <code>string driver_control_files_uri = 15;</code>
     */
    public Builder setDriverControlFilesUri(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      driverControlFilesUri_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output-only. If present, the location of miscellaneous control files
     * which may be used as part of job setup and handling. If not present,
     * control files may be placed in the same location as `driver_output_uri`.
     * </pre>
     *
     * <code>string driver_control_files_uri = 15;</code>
     */
    public Builder clearDriverControlFilesUri() {
      
      driverControlFilesUri_ = getDefaultInstance().getDriverControlFilesUri();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output-only. If present, the location of miscellaneous control files
     * which may be used as part of job setup and handling. If not present,
     * control files may be placed in the same location as `driver_output_uri`.
     * </pre>
     *
     * <code>string driver_control_files_uri = 15;</code>
     */
    public Builder setDriverControlFilesUriBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      driverControlFilesUri_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> labels_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetMutableLabels() {
      onChanged();;
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(
            LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

    public boolean containsLabels(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetLabels().getMap().containsKey(key);
    }
    /**
     * Use {@link #getLabelsMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

    public java.lang.String getLabelsOrDefault(
        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 =
          internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

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

    public Builder clearLabels() {
      internalGetMutableLabels().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

    public Builder removeLabels(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableLabels().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String>
    getMutableLabels() {
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */
    public Builder putLabels(
        java.lang.String key,
        java.lang.String value) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      if (value == null) { throw new java.lang.NullPointerException(); }
      internalGetMutableLabels().getMutableMap()
          .put(key, value);
      return this;
    }
    /**
     * <pre>
     * Optional. The labels to associate with this job.
     * Label **keys** must contain 1 to 63 characters, and must conform to
     * [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * Label **values** may be empty, but, if present, must contain 1 to 63
     * characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt).
     * No more than 32 labels can be associated with a job.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 18;</code>
     */

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

    private com.google.cloud.dataproc.v1.JobScheduling scheduling_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobScheduling, com.google.cloud.dataproc.v1.JobScheduling.Builder, com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> schedulingBuilder_;
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public boolean hasScheduling() {
      return schedulingBuilder_ != null || scheduling_ != null;
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public com.google.cloud.dataproc.v1.JobScheduling getScheduling() {
      if (schedulingBuilder_ == null) {
        return scheduling_ == null ? com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() : scheduling_;
      } else {
        return schedulingBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public Builder setScheduling(com.google.cloud.dataproc.v1.JobScheduling value) {
      if (schedulingBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        scheduling_ = value;
        onChanged();
      } else {
        schedulingBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public Builder setScheduling(
        com.google.cloud.dataproc.v1.JobScheduling.Builder builderForValue) {
      if (schedulingBuilder_ == null) {
        scheduling_ = builderForValue.build();
        onChanged();
      } else {
        schedulingBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public Builder mergeScheduling(com.google.cloud.dataproc.v1.JobScheduling value) {
      if (schedulingBuilder_ == null) {
        if (scheduling_ != null) {
          scheduling_ =
            com.google.cloud.dataproc.v1.JobScheduling.newBuilder(scheduling_).mergeFrom(value).buildPartial();
        } else {
          scheduling_ = value;
        }
        onChanged();
      } else {
        schedulingBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public Builder clearScheduling() {
      if (schedulingBuilder_ == null) {
        scheduling_ = null;
        onChanged();
      } else {
        scheduling_ = null;
        schedulingBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public com.google.cloud.dataproc.v1.JobScheduling.Builder getSchedulingBuilder() {
      
      onChanged();
      return getSchedulingFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    public com.google.cloud.dataproc.v1.JobSchedulingOrBuilder getSchedulingOrBuilder() {
      if (schedulingBuilder_ != null) {
        return schedulingBuilder_.getMessageOrBuilder();
      } else {
        return scheduling_ == null ?
            com.google.cloud.dataproc.v1.JobScheduling.getDefaultInstance() : scheduling_;
      }
    }
    /**
     * <pre>
     * Optional. Job scheduling configuration.
     * </pre>
     *
     * <code>.google.cloud.dataproc.v1.JobScheduling scheduling = 20;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.dataproc.v1.JobScheduling, com.google.cloud.dataproc.v1.JobScheduling.Builder, com.google.cloud.dataproc.v1.JobSchedulingOrBuilder> 
        getSchedulingFieldBuilder() {
      if (schedulingBuilder_ == null) {
        schedulingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.dataproc.v1.JobScheduling, com.google.cloud.dataproc.v1.JobScheduling.Builder, com.google.cloud.dataproc.v1.JobSchedulingOrBuilder>(
                getScheduling(),
                getParentForChildren(),
                isClean());
        scheduling_ = null;
      }
      return schedulingBuilder_;
    }
    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.Job)
  }

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

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

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

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

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

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

}

