// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/privacy/dlp/v2/dlp.proto

package com.google.privacy.dlp.v2;

/**
 * <pre>
 * Request message for CreateDlpJobRequest. Used to initiate long running
 * jobs such as calculating risk metrics or inspecting Google Cloud
 * Storage.
 * </pre>
 *
 * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest}
 */
public  final class CreateDlpJobRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.CreateDlpJobRequest)
    CreateDlpJobRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use CreateDlpJobRequest.newBuilder() to construct.
  private CreateDlpJobRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private CreateDlpJobRequest() {
    parent_ = "";
    jobId_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CreateDlpJobRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            parent_ = s;
            break;
          }
          case 18: {
            com.google.privacy.dlp.v2.InspectJobConfig.Builder subBuilder = null;
            if (jobCase_ == 2) {
              subBuilder = ((com.google.privacy.dlp.v2.InspectJobConfig) job_).toBuilder();
            }
            job_ =
                input.readMessage(com.google.privacy.dlp.v2.InspectJobConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.privacy.dlp.v2.InspectJobConfig) job_);
              job_ = subBuilder.buildPartial();
            }
            jobCase_ = 2;
            break;
          }
          case 26: {
            com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder subBuilder = null;
            if (jobCase_ == 3) {
              subBuilder = ((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_).toBuilder();
            }
            job_ =
                input.readMessage(com.google.privacy.dlp.v2.RiskAnalysisJobConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_);
              job_ = subBuilder.buildPartial();
            }
            jobCase_ = 3;
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            jobId_ = s;
            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 {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class);
  }

  private int jobCase_ = 0;
  private java.lang.Object job_;
  public enum JobCase
      implements com.google.protobuf.Internal.EnumLite {
    INSPECT_JOB(2),
    RISK_JOB(3),
    JOB_NOT_SET(0);
    private final int value;
    private JobCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static JobCase valueOf(int value) {
      return forNumber(value);
    }

    public static JobCase forNumber(int value) {
      switch (value) {
        case 2: return INSPECT_JOB;
        case 3: return RISK_JOB;
        case 0: return JOB_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public JobCase
  getJobCase() {
    return JobCase.forNumber(
        jobCase_);
  }

  public static final int PARENT_FIELD_NUMBER = 1;
  private volatile java.lang.Object parent_;
  /**
   * <pre>
   * The parent resource name, for example projects/my-project-id.
   * </pre>
   *
   * <code>string parent = 1;</code>
   */
  public java.lang.String getParent() {
    java.lang.Object ref = parent_;
    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();
      parent_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The parent resource name, for example projects/my-project-id.
   * </pre>
   *
   * <code>string parent = 1;</code>
   */
  public com.google.protobuf.ByteString
      getParentBytes() {
    java.lang.Object ref = parent_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      parent_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSPECT_JOB_FIELD_NUMBER = 2;
  /**
   * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
   */
  public boolean hasInspectJob() {
    return jobCase_ == 2;
  }
  /**
   * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
   */
  public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() {
    if (jobCase_ == 2) {
       return (com.google.privacy.dlp.v2.InspectJobConfig) job_;
    }
    return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
  }
  /**
   * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
   */
  public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() {
    if (jobCase_ == 2) {
       return (com.google.privacy.dlp.v2.InspectJobConfig) job_;
    }
    return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
  }

  public static final int RISK_JOB_FIELD_NUMBER = 3;
  /**
   * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
   */
  public boolean hasRiskJob() {
    return jobCase_ == 3;
  }
  /**
   * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
   */
  public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() {
    if (jobCase_ == 3) {
       return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_;
    }
    return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
  }
  /**
   * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
   */
  public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() {
    if (jobCase_ == 3) {
       return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_;
    }
    return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
  }

  public static final int JOB_ID_FIELD_NUMBER = 4;
  private volatile java.lang.Object jobId_;
  /**
   * <pre>
   * The job id can contain uppercase and lowercase letters,
   * numbers, and hyphens; that is, it must match the regular
   * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
   * characters. Can be empty to allow the system to generate one.
   * </pre>
   *
   * <code>string job_id = 4;</code>
   */
  public java.lang.String getJobId() {
    java.lang.Object ref = jobId_;
    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();
      jobId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The job id can contain uppercase and lowercase letters,
   * numbers, and hyphens; that is, it must match the regular
   * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
   * characters. Can be empty to allow the system to generate one.
   * </pre>
   *
   * <code>string job_id = 4;</code>
   */
  public com.google.protobuf.ByteString
      getJobIdBytes() {
    java.lang.Object ref = jobId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      jobId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (!getParentBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
    }
    if (jobCase_ == 2) {
      output.writeMessage(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_);
    }
    if (jobCase_ == 3) {
      output.writeMessage(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_);
    }
    if (!getJobIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jobId_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getParentBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
    }
    if (jobCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.google.privacy.dlp.v2.InspectJobConfig) job_);
    }
    if (jobCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_);
    }
    if (!getJobIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, jobId_);
    }
    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.privacy.dlp.v2.CreateDlpJobRequest)) {
      return super.equals(obj);
    }
    com.google.privacy.dlp.v2.CreateDlpJobRequest other = (com.google.privacy.dlp.v2.CreateDlpJobRequest) obj;

    boolean result = true;
    result = result && getParent()
        .equals(other.getParent());
    result = result && getJobId()
        .equals(other.getJobId());
    result = result && getJobCase().equals(
        other.getJobCase());
    if (!result) return false;
    switch (jobCase_) {
      case 2:
        result = result && getInspectJob()
            .equals(other.getInspectJob());
        break;
      case 3:
        result = result && getRiskJob()
            .equals(other.getRiskJob());
        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();
    hash = (37 * hash) + PARENT_FIELD_NUMBER;
    hash = (53 * hash) + getParent().hashCode();
    hash = (37 * hash) + JOB_ID_FIELD_NUMBER;
    hash = (53 * hash) + getJobId().hashCode();
    switch (jobCase_) {
      case 2:
        hash = (37 * hash) + INSPECT_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getInspectJob().hashCode();
        break;
      case 3:
        hash = (37 * hash) + RISK_JOB_FIELD_NUMBER;
        hash = (53 * hash) + getRiskJob().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest 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.privacy.dlp.v2.CreateDlpJobRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest 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.privacy.dlp.v2.CreateDlpJobRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest 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.privacy.dlp.v2.CreateDlpJobRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.privacy.dlp.v2.CreateDlpJobRequest 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.privacy.dlp.v2.CreateDlpJobRequest 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>
   * Request message for CreateDlpJobRequest. Used to initiate long running
   * jobs such as calculating risk metrics or inspecting Google Cloud
   * Storage.
   * </pre>
   *
   * Protobuf type {@code google.privacy.dlp.v2.CreateDlpJobRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.CreateDlpJobRequest)
      com.google.privacy.dlp.v2.CreateDlpJobRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.privacy.dlp.v2.CreateDlpJobRequest.class, com.google.privacy.dlp.v2.CreateDlpJobRequest.Builder.class);
    }

    // Construct using com.google.privacy.dlp.v2.CreateDlpJobRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      parent_ = "";

      jobId_ = "";

      jobCase_ = 0;
      job_ = null;
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor;
    }

    public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() {
      return com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance();
    }

    public com.google.privacy.dlp.v2.CreateDlpJobRequest build() {
      com.google.privacy.dlp.v2.CreateDlpJobRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.privacy.dlp.v2.CreateDlpJobRequest buildPartial() {
      com.google.privacy.dlp.v2.CreateDlpJobRequest result = new com.google.privacy.dlp.v2.CreateDlpJobRequest(this);
      result.parent_ = parent_;
      if (jobCase_ == 2) {
        if (inspectJobBuilder_ == null) {
          result.job_ = job_;
        } else {
          result.job_ = inspectJobBuilder_.build();
        }
      }
      if (jobCase_ == 3) {
        if (riskJobBuilder_ == null) {
          result.job_ = job_;
        } else {
          result.job_ = riskJobBuilder_.build();
        }
      }
      result.jobId_ = jobId_;
      result.jobCase_ = jobCase_;
      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.privacy.dlp.v2.CreateDlpJobRequest) {
        return mergeFrom((com.google.privacy.dlp.v2.CreateDlpJobRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.privacy.dlp.v2.CreateDlpJobRequest other) {
      if (other == com.google.privacy.dlp.v2.CreateDlpJobRequest.getDefaultInstance()) return this;
      if (!other.getParent().isEmpty()) {
        parent_ = other.parent_;
        onChanged();
      }
      if (!other.getJobId().isEmpty()) {
        jobId_ = other.jobId_;
        onChanged();
      }
      switch (other.getJobCase()) {
        case INSPECT_JOB: {
          mergeInspectJob(other.getInspectJob());
          break;
        }
        case RISK_JOB: {
          mergeRiskJob(other.getRiskJob());
          break;
        }
        case JOB_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.privacy.dlp.v2.CreateDlpJobRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.privacy.dlp.v2.CreateDlpJobRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int jobCase_ = 0;
    private java.lang.Object job_;
    public JobCase
        getJobCase() {
      return JobCase.forNumber(
          jobCase_);
    }

    public Builder clearJob() {
      jobCase_ = 0;
      job_ = null;
      onChanged();
      return this;
    }


    private java.lang.Object parent_ = "";
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public java.lang.String getParent() {
      java.lang.Object ref = parent_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parent_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public com.google.protobuf.ByteString
        getParentBytes() {
      java.lang.Object ref = parent_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        parent_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder setParent(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      parent_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder clearParent() {
      
      parent_ = getDefaultInstance().getParent();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The parent resource name, for example projects/my-project-id.
     * </pre>
     *
     * <code>string parent = 1;</code>
     */
    public Builder setParentBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      parent_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> inspectJobBuilder_;
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public boolean hasInspectJob() {
      return jobCase_ == 2;
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectJobConfig getInspectJob() {
      if (inspectJobBuilder_ == null) {
        if (jobCase_ == 2) {
          return (com.google.privacy.dlp.v2.InspectJobConfig) job_;
        }
        return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
      } else {
        if (jobCase_ == 2) {
          return inspectJobBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
      }
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public Builder setInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) {
      if (inspectJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        job_ = value;
        onChanged();
      } else {
        inspectJobBuilder_.setMessage(value);
      }
      jobCase_ = 2;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public Builder setInspectJob(
        com.google.privacy.dlp.v2.InspectJobConfig.Builder builderForValue) {
      if (inspectJobBuilder_ == null) {
        job_ = builderForValue.build();
        onChanged();
      } else {
        inspectJobBuilder_.setMessage(builderForValue.build());
      }
      jobCase_ = 2;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public Builder mergeInspectJob(com.google.privacy.dlp.v2.InspectJobConfig value) {
      if (inspectJobBuilder_ == null) {
        if (jobCase_ == 2 &&
            job_ != com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance()) {
          job_ = com.google.privacy.dlp.v2.InspectJobConfig.newBuilder((com.google.privacy.dlp.v2.InspectJobConfig) job_)
              .mergeFrom(value).buildPartial();
        } else {
          job_ = value;
        }
        onChanged();
      } else {
        if (jobCase_ == 2) {
          inspectJobBuilder_.mergeFrom(value);
        }
        inspectJobBuilder_.setMessage(value);
      }
      jobCase_ = 2;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public Builder clearInspectJob() {
      if (inspectJobBuilder_ == null) {
        if (jobCase_ == 2) {
          jobCase_ = 0;
          job_ = null;
          onChanged();
        }
      } else {
        if (jobCase_ == 2) {
          jobCase_ = 0;
          job_ = null;
        }
        inspectJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectJobConfig.Builder getInspectJobBuilder() {
      return getInspectJobFieldBuilder().getBuilder();
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    public com.google.privacy.dlp.v2.InspectJobConfigOrBuilder getInspectJobOrBuilder() {
      if ((jobCase_ == 2) && (inspectJobBuilder_ != null)) {
        return inspectJobBuilder_.getMessageOrBuilder();
      } else {
        if (jobCase_ == 2) {
          return (com.google.privacy.dlp.v2.InspectJobConfig) job_;
        }
        return com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
      }
    }
    /**
     * <code>.google.privacy.dlp.v2.InspectJobConfig inspect_job = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder> 
        getInspectJobFieldBuilder() {
      if (inspectJobBuilder_ == null) {
        if (!(jobCase_ == 2)) {
          job_ = com.google.privacy.dlp.v2.InspectJobConfig.getDefaultInstance();
        }
        inspectJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.InspectJobConfig, com.google.privacy.dlp.v2.InspectJobConfig.Builder, com.google.privacy.dlp.v2.InspectJobConfigOrBuilder>(
                (com.google.privacy.dlp.v2.InspectJobConfig) job_,
                getParentForChildren(),
                isClean());
        job_ = null;
      }
      jobCase_ = 2;
      onChanged();;
      return inspectJobBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> riskJobBuilder_;
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public boolean hasRiskJob() {
      return jobCase_ == 3;
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public com.google.privacy.dlp.v2.RiskAnalysisJobConfig getRiskJob() {
      if (riskJobBuilder_ == null) {
        if (jobCase_ == 3) {
          return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_;
        }
        return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
      } else {
        if (jobCase_ == 3) {
          return riskJobBuilder_.getMessage();
        }
        return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
      }
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public Builder setRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) {
      if (riskJobBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        job_ = value;
        onChanged();
      } else {
        riskJobBuilder_.setMessage(value);
      }
      jobCase_ = 3;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public Builder setRiskJob(
        com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder builderForValue) {
      if (riskJobBuilder_ == null) {
        job_ = builderForValue.build();
        onChanged();
      } else {
        riskJobBuilder_.setMessage(builderForValue.build());
      }
      jobCase_ = 3;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public Builder mergeRiskJob(com.google.privacy.dlp.v2.RiskAnalysisJobConfig value) {
      if (riskJobBuilder_ == null) {
        if (jobCase_ == 3 &&
            job_ != com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance()) {
          job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.newBuilder((com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_)
              .mergeFrom(value).buildPartial();
        } else {
          job_ = value;
        }
        onChanged();
      } else {
        if (jobCase_ == 3) {
          riskJobBuilder_.mergeFrom(value);
        }
        riskJobBuilder_.setMessage(value);
      }
      jobCase_ = 3;
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public Builder clearRiskJob() {
      if (riskJobBuilder_ == null) {
        if (jobCase_ == 3) {
          jobCase_ = 0;
          job_ = null;
          onChanged();
        }
      } else {
        if (jobCase_ == 3) {
          jobCase_ = 0;
          job_ = null;
        }
        riskJobBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder getRiskJobBuilder() {
      return getRiskJobFieldBuilder().getBuilder();
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    public com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder getRiskJobOrBuilder() {
      if ((jobCase_ == 3) && (riskJobBuilder_ != null)) {
        return riskJobBuilder_.getMessageOrBuilder();
      } else {
        if (jobCase_ == 3) {
          return (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_;
        }
        return com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
      }
    }
    /**
     * <code>.google.privacy.dlp.v2.RiskAnalysisJobConfig risk_job = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder> 
        getRiskJobFieldBuilder() {
      if (riskJobBuilder_ == null) {
        if (!(jobCase_ == 3)) {
          job_ = com.google.privacy.dlp.v2.RiskAnalysisJobConfig.getDefaultInstance();
        }
        riskJobBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.privacy.dlp.v2.RiskAnalysisJobConfig, com.google.privacy.dlp.v2.RiskAnalysisJobConfig.Builder, com.google.privacy.dlp.v2.RiskAnalysisJobConfigOrBuilder>(
                (com.google.privacy.dlp.v2.RiskAnalysisJobConfig) job_,
                getParentForChildren(),
                isClean());
        job_ = null;
      }
      jobCase_ = 3;
      onChanged();;
      return riskJobBuilder_;
    }

    private java.lang.Object jobId_ = "";
    /**
     * <pre>
     * The job id can contain uppercase and lowercase letters,
     * numbers, and hyphens; that is, it must match the regular
     * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
     * characters. Can be empty to allow the system to generate one.
     * </pre>
     *
     * <code>string job_id = 4;</code>
     */
    public java.lang.String getJobId() {
      java.lang.Object ref = jobId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        jobId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The job id can contain uppercase and lowercase letters,
     * numbers, and hyphens; that is, it must match the regular
     * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
     * characters. Can be empty to allow the system to generate one.
     * </pre>
     *
     * <code>string job_id = 4;</code>
     */
    public com.google.protobuf.ByteString
        getJobIdBytes() {
      java.lang.Object ref = jobId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        jobId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The job id can contain uppercase and lowercase letters,
     * numbers, and hyphens; that is, it must match the regular
     * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
     * characters. Can be empty to allow the system to generate one.
     * </pre>
     *
     * <code>string job_id = 4;</code>
     */
    public Builder setJobId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      jobId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The job id can contain uppercase and lowercase letters,
     * numbers, and hyphens; that is, it must match the regular
     * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
     * characters. Can be empty to allow the system to generate one.
     * </pre>
     *
     * <code>string job_id = 4;</code>
     */
    public Builder clearJobId() {
      
      jobId_ = getDefaultInstance().getJobId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The job id can contain uppercase and lowercase letters,
     * numbers, and hyphens; that is, it must match the regular
     * expression: `[a-zA-Z&#92;&#92;d-]+`. The maximum length is 100
     * characters. Can be empty to allow the system to generate one.
     * </pre>
     *
     * <code>string job_id = 4;</code>
     */
    public Builder setJobIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      jobId_ = value;
      onChanged();
      return this;
    }
    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.privacy.dlp.v2.CreateDlpJobRequest)
  }

  // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.CreateDlpJobRequest)
  private static final com.google.privacy.dlp.v2.CreateDlpJobRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.CreateDlpJobRequest();
  }

  public static com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.google.privacy.dlp.v2.CreateDlpJobRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

