// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/talent/v4beta1/event.proto

package com.google.cloud.talent.v4beta1;

/**
 *
 *
 * <pre>
 * An event issued when a job seeker interacts with the application that
 * implements Cloud Talent Solution.
 * </pre>
 *
 * Protobuf type {@code google.cloud.talent.v4beta1.JobEvent}
 */
public final class JobEvent extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.talent.v4beta1.JobEvent)
    JobEventOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use JobEvent.newBuilder() to construct.
  private JobEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private JobEvent() {
    type_ = 0;
    jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

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

  private JobEvent(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8:
            {
              int rawValue = input.readEnum();

              type_ = rawValue;
              break;
            }
          case 18:
            {
              java.lang.String s = input.readStringRequireUtf8();
              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                jobs_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000002;
              }
              jobs_.add(s);
              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              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_ & 0x00000002) != 0)) {
        jobs_ = jobs_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.talent.v4beta1.EventProto
        .internal_static_google_cloud_talent_v4beta1_JobEvent_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.talent.v4beta1.EventProto
        .internal_static_google_cloud_talent_v4beta1_JobEvent_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.talent.v4beta1.JobEvent.class,
            com.google.cloud.talent.v4beta1.JobEvent.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * An enumeration of an event attributed to the behavior of the end user,
   * such as a job seeker.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.talent.v4beta1.JobEvent.JobEventType}
   */
  public enum JobEventType implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The event is unspecified by other provided values.
     * </pre>
     *
     * <code>JOB_EVENT_TYPE_UNSPECIFIED = 0;</code>
     */
    JOB_EVENT_TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service has
     * had a job rendered in their view, such as in a list of search results in
     * a compressed or clipped format. This event is typically associated with
     * the viewing of a jobs list on a single page by a job seeker.
     * </pre>
     *
     * <code>IMPRESSION = 1;</code>
     */
    IMPRESSION(1),
    /**
     *
     *
     * <pre>
     * The job seeker, or other entity interacting with the service, has
     * viewed the details of a job, including the full description. This
     * event doesn't apply to the viewing a snippet of a job appearing as a
     * part of the job search results. Viewing a snippet is associated with an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]).
     * </pre>
     *
     * <code>VIEW = 2;</code>
     */
    VIEW(2),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * performed an action to view a job and was redirected to a different
     * website for job.
     * </pre>
     *
     * <code>VIEW_REDIRECT = 3;</code>
     */
    VIEW_REDIRECT(3),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * began the process or demonstrated the intention of applying for a job.
     * </pre>
     *
     * <code>APPLICATION_START = 4;</code>
     */
    APPLICATION_START(4),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * submitted an application for a job.
     * </pre>
     *
     * <code>APPLICATION_FINISH = 5;</code>
     */
    APPLICATION_FINISH(5),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * submitted an application for a job with a single click without
     * entering information. If a job seeker performs this action, send only
     * this event to the service. Do not also send
     * [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START]
     * or
     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
     * events.
     * </pre>
     *
     * <code>APPLICATION_QUICK_SUBMISSION = 6;</code>
     */
    APPLICATION_QUICK_SUBMISSION(6),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * performed an action to apply to a job and was redirected to a different
     * website to complete the application.
     * </pre>
     *
     * <code>APPLICATION_REDIRECT = 7;</code>
     */
    APPLICATION_REDIRECT(7),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service began the
     * process or demonstrated the intention of applying for a job from the
     * search results page without viewing the details of the job posting.
     * If sending this event, JobEventType.VIEW event shouldn't be sent.
     * </pre>
     *
     * <code>APPLICATION_START_FROM_SEARCH = 8;</code>
     */
    APPLICATION_START_FROM_SEARCH(8),
    /**
     *
     *
     * <pre>
     * The job seeker, or other entity interacting with the service, performs an
     * action with a single click from the search results page to apply to a job
     * (without viewing the details of the job posting), and is redirected
     * to a different website to complete the application. If a candidate
     * performs this action, send only this event to the service. Do not also
     * send
     * [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START],
     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
     * or
     * [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW]
     * events.
     * </pre>
     *
     * <code>APPLICATION_REDIRECT_FROM_SEARCH = 9;</code>
     */
    APPLICATION_REDIRECT_FROM_SEARCH(9),
    /**
     *
     *
     * <pre>
     * This event should be used when a company submits an application
     * on behalf of a job seeker. This event is intended for use by staffing
     * agencies attempting to place candidates.
     * </pre>
     *
     * <code>APPLICATION_COMPANY_SUBMIT = 10;</code>
     */
    APPLICATION_COMPANY_SUBMIT(10),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service demonstrated
     * an interest in a job by bookmarking or saving it.
     * </pre>
     *
     * <code>BOOKMARK = 11;</code>
     */
    BOOKMARK(11),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service was
     * sent a notification, such as an email alert or device notification,
     * containing one or more jobs listings generated by the service.
     * </pre>
     *
     * <code>NOTIFICATION = 12;</code>
     */
    NOTIFICATION(12),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service was
     * employed by the hiring entity (employer). Send this event
     * only if the job seeker was hired through an application that was
     * initiated by a search conducted through the Cloud Talent Solution
     * service.
     * </pre>
     *
     * <code>HIRED = 13;</code>
     */
    HIRED(13),
    /**
     *
     *
     * <pre>
     * A recruiter or staffing agency submitted an application on behalf of the
     * candidate after interacting with the service to identify a suitable job
     * posting.
     * </pre>
     *
     * <code>SENT_CV = 14;</code>
     */
    SENT_CV(14),
    /**
     *
     *
     * <pre>
     * The entity interacting with the service (for example, the job seeker),
     * was granted an initial interview by the hiring entity (employer). This
     * event should only be sent if the job seeker was granted an interview as
     * part of an application that was initiated by a search conducted through /
     * recommendation provided by the Cloud Talent Solution service.
     * </pre>
     *
     * <code>INTERVIEW_GRANTED = 15;</code>
     */
    INTERVIEW_GRANTED(15),
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service showed
     * no interest in the job.
     * </pre>
     *
     * <code>NOT_INTERESTED = 16;</code>
     */
    NOT_INTERESTED(16),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The event is unspecified by other provided values.
     * </pre>
     *
     * <code>JOB_EVENT_TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int JOB_EVENT_TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service has
     * had a job rendered in their view, such as in a list of search results in
     * a compressed or clipped format. This event is typically associated with
     * the viewing of a jobs list on a single page by a job seeker.
     * </pre>
     *
     * <code>IMPRESSION = 1;</code>
     */
    public static final int IMPRESSION_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The job seeker, or other entity interacting with the service, has
     * viewed the details of a job, including the full description. This
     * event doesn't apply to the viewing a snippet of a job appearing as a
     * part of the job search results. Viewing a snippet is associated with an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]).
     * </pre>
     *
     * <code>VIEW = 2;</code>
     */
    public static final int VIEW_VALUE = 2;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * performed an action to view a job and was redirected to a different
     * website for job.
     * </pre>
     *
     * <code>VIEW_REDIRECT = 3;</code>
     */
    public static final int VIEW_REDIRECT_VALUE = 3;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * began the process or demonstrated the intention of applying for a job.
     * </pre>
     *
     * <code>APPLICATION_START = 4;</code>
     */
    public static final int APPLICATION_START_VALUE = 4;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * submitted an application for a job.
     * </pre>
     *
     * <code>APPLICATION_FINISH = 5;</code>
     */
    public static final int APPLICATION_FINISH_VALUE = 5;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * submitted an application for a job with a single click without
     * entering information. If a job seeker performs this action, send only
     * this event to the service. Do not also send
     * [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START]
     * or
     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
     * events.
     * </pre>
     *
     * <code>APPLICATION_QUICK_SUBMISSION = 6;</code>
     */
    public static final int APPLICATION_QUICK_SUBMISSION_VALUE = 6;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service
     * performed an action to apply to a job and was redirected to a different
     * website to complete the application.
     * </pre>
     *
     * <code>APPLICATION_REDIRECT = 7;</code>
     */
    public static final int APPLICATION_REDIRECT_VALUE = 7;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service began the
     * process or demonstrated the intention of applying for a job from the
     * search results page without viewing the details of the job posting.
     * If sending this event, JobEventType.VIEW event shouldn't be sent.
     * </pre>
     *
     * <code>APPLICATION_START_FROM_SEARCH = 8;</code>
     */
    public static final int APPLICATION_START_FROM_SEARCH_VALUE = 8;
    /**
     *
     *
     * <pre>
     * The job seeker, or other entity interacting with the service, performs an
     * action with a single click from the search results page to apply to a job
     * (without viewing the details of the job posting), and is redirected
     * to a different website to complete the application. If a candidate
     * performs this action, send only this event to the service. Do not also
     * send
     * [JobEventType.APPLICATION_START][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_START],
     * [JobEventType.APPLICATION_FINISH][google.cloud.talent.v4beta1.JobEvent.JobEventType.APPLICATION_FINISH]
     * or
     * [JobEventType.VIEW][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW]
     * events.
     * </pre>
     *
     * <code>APPLICATION_REDIRECT_FROM_SEARCH = 9;</code>
     */
    public static final int APPLICATION_REDIRECT_FROM_SEARCH_VALUE = 9;
    /**
     *
     *
     * <pre>
     * This event should be used when a company submits an application
     * on behalf of a job seeker. This event is intended for use by staffing
     * agencies attempting to place candidates.
     * </pre>
     *
     * <code>APPLICATION_COMPANY_SUBMIT = 10;</code>
     */
    public static final int APPLICATION_COMPANY_SUBMIT_VALUE = 10;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service demonstrated
     * an interest in a job by bookmarking or saving it.
     * </pre>
     *
     * <code>BOOKMARK = 11;</code>
     */
    public static final int BOOKMARK_VALUE = 11;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service was
     * sent a notification, such as an email alert or device notification,
     * containing one or more jobs listings generated by the service.
     * </pre>
     *
     * <code>NOTIFICATION = 12;</code>
     */
    public static final int NOTIFICATION_VALUE = 12;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service was
     * employed by the hiring entity (employer). Send this event
     * only if the job seeker was hired through an application that was
     * initiated by a search conducted through the Cloud Talent Solution
     * service.
     * </pre>
     *
     * <code>HIRED = 13;</code>
     */
    public static final int HIRED_VALUE = 13;
    /**
     *
     *
     * <pre>
     * A recruiter or staffing agency submitted an application on behalf of the
     * candidate after interacting with the service to identify a suitable job
     * posting.
     * </pre>
     *
     * <code>SENT_CV = 14;</code>
     */
    public static final int SENT_CV_VALUE = 14;
    /**
     *
     *
     * <pre>
     * The entity interacting with the service (for example, the job seeker),
     * was granted an initial interview by the hiring entity (employer). This
     * event should only be sent if the job seeker was granted an interview as
     * part of an application that was initiated by a search conducted through /
     * recommendation provided by the Cloud Talent Solution service.
     * </pre>
     *
     * <code>INTERVIEW_GRANTED = 15;</code>
     */
    public static final int INTERVIEW_GRANTED_VALUE = 15;
    /**
     *
     *
     * <pre>
     * The job seeker or other entity interacting with the service showed
     * no interest in the job.
     * </pre>
     *
     * <code>NOT_INTERESTED = 16;</code>
     */
    public static final int NOT_INTERESTED_VALUE = 16;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /** @deprecated Use {@link #forNumber(int)} instead. */
    @java.lang.Deprecated
    public static JobEventType valueOf(int value) {
      return forNumber(value);
    }

    public static JobEventType forNumber(int value) {
      switch (value) {
        case 0:
          return JOB_EVENT_TYPE_UNSPECIFIED;
        case 1:
          return IMPRESSION;
        case 2:
          return VIEW;
        case 3:
          return VIEW_REDIRECT;
        case 4:
          return APPLICATION_START;
        case 5:
          return APPLICATION_FINISH;
        case 6:
          return APPLICATION_QUICK_SUBMISSION;
        case 7:
          return APPLICATION_REDIRECT;
        case 8:
          return APPLICATION_START_FROM_SEARCH;
        case 9:
          return APPLICATION_REDIRECT_FROM_SEARCH;
        case 10:
          return APPLICATION_COMPANY_SUBMIT;
        case 11:
          return BOOKMARK;
        case 12:
          return NOTIFICATION;
        case 13:
          return HIRED;
        case 14:
          return SENT_CV;
        case 15:
          return INTERVIEW_GRANTED;
        case 16:
          return NOT_INTERESTED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<JobEventType> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<JobEventType> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<JobEventType>() {
          public JobEventType findValueByNumber(int number) {
            return JobEventType.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.talent.v4beta1.JobEvent.getDescriptor().getEnumTypes().get(0);
    }

    private static final JobEventType[] VALUES = values();

    public static JobEventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private JobEventType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.talent.v4beta1.JobEvent.JobEventType)
  }

  private int bitField0_;
  public static final int TYPE_FIELD_NUMBER = 1;
  private int type_;
  /**
   *
   *
   * <pre>
   * Required.
   * The type of the event (see
   * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
   * </pre>
   *
   * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
   */
  public int getTypeValue() {
    return type_;
  }
  /**
   *
   *
   * <pre>
   * Required.
   * The type of the event (see
   * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
   * </pre>
   *
   * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
   */
  public com.google.cloud.talent.v4beta1.JobEvent.JobEventType getType() {
    @SuppressWarnings("deprecation")
    com.google.cloud.talent.v4beta1.JobEvent.JobEventType result =
        com.google.cloud.talent.v4beta1.JobEvent.JobEventType.valueOf(type_);
    return result == null
        ? com.google.cloud.talent.v4beta1.JobEvent.JobEventType.UNRECOGNIZED
        : result;
  }

  public static final int JOBS_FIELD_NUMBER = 2;
  private com.google.protobuf.LazyStringList jobs_;
  /**
   *
   *
   * <pre>
   * Required.
   * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
   * this event. For example, if this is an
   * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
   * event, this field contains the identifiers of all jobs shown to the job
   * seeker. If this was a
   * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
   * field contains the identifier of the viewed job.
   * </pre>
   *
   * <code>repeated string jobs = 2;</code>
   */
  public com.google.protobuf.ProtocolStringList getJobsList() {
    return jobs_;
  }
  /**
   *
   *
   * <pre>
   * Required.
   * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
   * this event. For example, if this is an
   * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
   * event, this field contains the identifiers of all jobs shown to the job
   * seeker. If this was a
   * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
   * field contains the identifier of the viewed job.
   * </pre>
   *
   * <code>repeated string jobs = 2;</code>
   */
  public int getJobsCount() {
    return jobs_.size();
  }
  /**
   *
   *
   * <pre>
   * Required.
   * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
   * this event. For example, if this is an
   * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
   * event, this field contains the identifiers of all jobs shown to the job
   * seeker. If this was a
   * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
   * field contains the identifier of the viewed job.
   * </pre>
   *
   * <code>repeated string jobs = 2;</code>
   */
  public java.lang.String getJobs(int index) {
    return jobs_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Required.
   * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
   * this event. For example, if this is an
   * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
   * event, this field contains the identifiers of all jobs shown to the job
   * seeker. If this was a
   * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
   * field contains the identifier of the viewed job.
   * </pre>
   *
   * <code>repeated string jobs = 2;</code>
   */
  public com.google.protobuf.ByteString getJobsBytes(int index) {
    return jobs_.getByteString(index);
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (type_
        != com.google.cloud.talent.v4beta1.JobEvent.JobEventType.JOB_EVENT_TYPE_UNSPECIFIED
            .getNumber()) {
      output.writeEnum(1, type_);
    }
    for (int i = 0; i < jobs_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobs_.getRaw(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (type_
        != com.google.cloud.talent.v4beta1.JobEvent.JobEventType.JOB_EVENT_TYPE_UNSPECIFIED
            .getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < jobs_.size(); i++) {
        dataSize += computeStringSizeNoTag(jobs_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getJobsList().size();
    }
    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.talent.v4beta1.JobEvent)) {
      return super.equals(obj);
    }
    com.google.cloud.talent.v4beta1.JobEvent other = (com.google.cloud.talent.v4beta1.JobEvent) obj;

    if (type_ != other.type_) return false;
    if (!getJobsList().equals(other.getJobsList())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    if (getJobsCount() > 0) {
      hash = (37 * hash) + JOBS_FIELD_NUMBER;
      hash = (53 * hash) + getJobsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.talent.v4beta1.JobEvent parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.talent.v4beta1.JobEvent 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.talent.v4beta1.JobEvent parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

  public static com.google.cloud.talent.v4beta1.JobEvent parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.talent.v4beta1.JobEvent parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

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

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

  public static com.google.cloud.talent.v4beta1.JobEvent parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.cloud.talent.v4beta1.JobEvent prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * An event issued when a job seeker interacts with the application that
   * implements Cloud Talent Solution.
   * </pre>
   *
   * Protobuf type {@code google.cloud.talent.v4beta1.JobEvent}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.talent.v4beta1.JobEvent)
      com.google.cloud.talent.v4beta1.JobEventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.talent.v4beta1.EventProto
          .internal_static_google_cloud_talent_v4beta1_JobEvent_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.talent.v4beta1.EventProto
          .internal_static_google_cloud_talent_v4beta1_JobEvent_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.talent.v4beta1.JobEvent.class,
              com.google.cloud.talent.v4beta1.JobEvent.Builder.class);
    }

    // Construct using com.google.cloud.talent.v4beta1.JobEvent.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

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

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

      jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.talent.v4beta1.EventProto
          .internal_static_google_cloud_talent_v4beta1_JobEvent_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.talent.v4beta1.JobEvent getDefaultInstanceForType() {
      return com.google.cloud.talent.v4beta1.JobEvent.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.talent.v4beta1.JobEvent build() {
      com.google.cloud.talent.v4beta1.JobEvent result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.talent.v4beta1.JobEvent buildPartial() {
      com.google.cloud.talent.v4beta1.JobEvent result =
          new com.google.cloud.talent.v4beta1.JobEvent(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.type_ = type_;
      if (((bitField0_ & 0x00000002) != 0)) {
        jobs_ = jobs_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.jobs_ = jobs_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.talent.v4beta1.JobEvent) {
        return mergeFrom((com.google.cloud.talent.v4beta1.JobEvent) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.talent.v4beta1.JobEvent other) {
      if (other == com.google.cloud.talent.v4beta1.JobEvent.getDefaultInstance()) return this;
      if (other.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (!other.jobs_.isEmpty()) {
        if (jobs_.isEmpty()) {
          jobs_ = other.jobs_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureJobsIsMutable();
          jobs_.addAll(other.jobs_);
        }
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private int bitField0_;

    private int type_ = 0;
    /**
     *
     *
     * <pre>
     * Required.
     * The type of the event (see
     * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
     */
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The type of the event (see
     * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The type of the event (see
     * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
     */
    public com.google.cloud.talent.v4beta1.JobEvent.JobEventType getType() {
      @SuppressWarnings("deprecation")
      com.google.cloud.talent.v4beta1.JobEvent.JobEventType result =
          com.google.cloud.talent.v4beta1.JobEvent.JobEventType.valueOf(type_);
      return result == null
          ? com.google.cloud.talent.v4beta1.JobEvent.JobEventType.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The type of the event (see
     * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
     */
    public Builder setType(com.google.cloud.talent.v4beta1.JobEvent.JobEventType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The type of the event (see
     * [JobEventType][google.cloud.talent.v4beta1.JobEvent.JobEventType]).
     * </pre>
     *
     * <code>.google.cloud.talent.v4beta1.JobEvent.JobEventType type = 1;</code>
     */
    public Builder clearType() {

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

    private com.google.protobuf.LazyStringList jobs_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureJobsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        jobs_ = new com.google.protobuf.LazyStringArrayList(jobs_);
        bitField0_ |= 0x00000002;
      }
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public com.google.protobuf.ProtocolStringList getJobsList() {
      return jobs_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public int getJobsCount() {
      return jobs_.size();
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public java.lang.String getJobs(int index) {
      return jobs_.get(index);
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public com.google.protobuf.ByteString getJobsBytes(int index) {
      return jobs_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public Builder setJobs(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureJobsIsMutable();
      jobs_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public Builder addJobs(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureJobsIsMutable();
      jobs_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public Builder addAllJobs(java.lang.Iterable<java.lang.String> values) {
      ensureJobsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jobs_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public Builder clearJobs() {
      jobs_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Required.
     * The [job name(s)][google.cloud.talent.v4beta1.Job.name] associated with
     * this event. For example, if this is an
     * [impression][google.cloud.talent.v4beta1.JobEvent.JobEventType.IMPRESSION]
     * event, this field contains the identifiers of all jobs shown to the job
     * seeker. If this was a
     * [view][google.cloud.talent.v4beta1.JobEvent.JobEventType.VIEW] event, this
     * field contains the identifier of the viewed job.
     * </pre>
     *
     * <code>repeated string jobs = 2;</code>
     */
    public Builder addJobsBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureJobsIsMutable();
      jobs_.add(value);
      onChanged();
      return this;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.cloud.talent.v4beta1.JobEvent)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.talent.v4beta1.JobEvent)
  private static final com.google.cloud.talent.v4beta1.JobEvent DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.talent.v4beta1.JobEvent();
  }

  public static com.google.cloud.talent.v4beta1.JobEvent getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.cloud.talent.v4beta1.JobEvent getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
