<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4beta1/profile.proto

namespace Google\Cloud\Talent\V4beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Resource that represents a job application record of a candidate.
 *
 * Generated from protobuf message <code>google.cloud.talent.v4beta1.JobApplication</code>
 */
class JobApplication extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional.
     * The information of job which the candidate applied for.
     * If [Job.name][google.cloud.talent.v4beta1.Job.name] is provided, the corresponding [Job][google.cloud.talent.v4beta1.Job] must be created.
     * Otherwise, only [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
     * [Job.description][google.cloud.talent.v4beta1.Job.description] and [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] provided here are persisted
     * in the application. No [Job][google.cloud.talent.v4beta1.Job] entity is created in this case.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Job job = 1;</code>
     */
    private $job = null;
    /**
     * Optional.
     * The job application id.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string application_id = 2;</code>
     */
    private $application_id = '';
    /**
     * Optional.
     * The application date.
     *
     * Generated from protobuf field <code>.google.type.Date application_date = 3;</code>
     */
    private $application_date = null;
    /**
     * Optional.
     * The last stage the candidate reached in the application progress.
     * For example, "new", "phone screen", "interview".
     *
     * Generated from protobuf field <code>string last_stage = 4;</code>
     */
    private $last_stage = '';
    /**
     * Optional.
     * The application state.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.JobApplication.ApplicationStatus state = 5;</code>
     */
    private $state = 0;
    /**
     * Optional.
     * The average interview score.
     *
     * Generated from protobuf field <code>double average_interview_score = 6;</code>
     */
    private $average_interview_score = 0.0;
    /**
     * Optional.
     * The scale id of the interview score.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string interview_score_scale_id = 7;</code>
     */
    private $interview_score_scale_id = '';
    /**
     * Optional.
     * The number of interviews.
     *
     * Generated from protobuf field <code>int32 number_of_interviews = 8;</code>
     */
    private $number_of_interviews = 0;
    /**
     * Optional.
     * If the candidate is referred by a employee.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_employee_referred = 9;</code>
     */
    private $is_employee_referred = null;
    /**
     * Optional.
     * The last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 10;</code>
     */
    private $update_time = null;
    /**
     * Optional.
     * The outcome reason for the job application.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string outcome_reason = 11;</code>
     */
    private $outcome_reason = '';
    /**
     * Optional.
     * Outcome positiveness shows how positive the outcome is.
     * Currently only -1, 0 and 1 are accepted, where -1 means not positive, 0
     * means neutral and 1 means positive. An error is thrown if other value is
     * set.
     *
     * Generated from protobuf field <code>double outcome_positiveness = 12;</code>
     */
    private $outcome_positiveness = 0.0;
    /**
     * Output only. Indicates whether this job application is a match to
     * application related filters. This value is only applicable in profile
     * search response.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_match = 13;</code>
     */
    private $is_match = null;
    /**
     * Output only. Job title snippet shows how the job title is related to a
     * search query. It's empty if the job title isn't related to the search
     * query.
     *
     * Generated from protobuf field <code>string job_title_snippet = 14;</code>
     */
    private $job_title_snippet = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Talent\V4beta1\Job $job
     *           Optional.
     *           The information of job which the candidate applied for.
     *           If [Job.name][google.cloud.talent.v4beta1.Job.name] is provided, the corresponding [Job][google.cloud.talent.v4beta1.Job] must be created.
     *           Otherwise, only [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
     *           [Job.description][google.cloud.talent.v4beta1.Job.description] and [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] provided here are persisted
     *           in the application. No [Job][google.cloud.talent.v4beta1.Job] entity is created in this case.
     *     @type string $application_id
     *           Optional.
     *           The job application id.
     *           Number of characters allowed is 100.
     *     @type \Google\Type\Date $application_date
     *           Optional.
     *           The application date.
     *     @type string $last_stage
     *           Optional.
     *           The last stage the candidate reached in the application progress.
     *           For example, "new", "phone screen", "interview".
     *     @type int $state
     *           Optional.
     *           The application state.
     *     @type float $average_interview_score
     *           Optional.
     *           The average interview score.
     *     @type string $interview_score_scale_id
     *           Optional.
     *           The scale id of the interview score.
     *           Number of characters allowed is 100.
     *     @type int $number_of_interviews
     *           Optional.
     *           The number of interviews.
     *     @type \Google\Protobuf\BoolValue $is_employee_referred
     *           Optional.
     *           If the candidate is referred by a employee.
     *     @type \Google\Protobuf\Timestamp $update_time
     *           Optional.
     *           The last update timestamp.
     *     @type string $outcome_reason
     *           Optional.
     *           The outcome reason for the job application.
     *           Number of characters allowed is 100.
     *     @type float $outcome_positiveness
     *           Optional.
     *           Outcome positiveness shows how positive the outcome is.
     *           Currently only -1, 0 and 1 are accepted, where -1 means not positive, 0
     *           means neutral and 1 means positive. An error is thrown if other value is
     *           set.
     *     @type \Google\Protobuf\BoolValue $is_match
     *           Output only. Indicates whether this job application is a match to
     *           application related filters. This value is only applicable in profile
     *           search response.
     *     @type string $job_title_snippet
     *           Output only. Job title snippet shows how the job title is related to a
     *           search query. It's empty if the job title isn't related to the search
     *           query.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Talent\V4Beta1\Profile::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional.
     * The information of job which the candidate applied for.
     * If [Job.name][google.cloud.talent.v4beta1.Job.name] is provided, the corresponding [Job][google.cloud.talent.v4beta1.Job] must be created.
     * Otherwise, only [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
     * [Job.description][google.cloud.talent.v4beta1.Job.description] and [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] provided here are persisted
     * in the application. No [Job][google.cloud.talent.v4beta1.Job] entity is created in this case.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Job job = 1;</code>
     * @return \Google\Cloud\Talent\V4beta1\Job
     */
    public function getJob()
    {
        return $this->job;
    }

    /**
     * Optional.
     * The information of job which the candidate applied for.
     * If [Job.name][google.cloud.talent.v4beta1.Job.name] is provided, the corresponding [Job][google.cloud.talent.v4beta1.Job] must be created.
     * Otherwise, only [Job.requisition_id][google.cloud.talent.v4beta1.Job.requisition_id], [Job.title][google.cloud.talent.v4beta1.Job.title],
     * [Job.description][google.cloud.talent.v4beta1.Job.description] and [Job.addresses][google.cloud.talent.v4beta1.Job.addresses] provided here are persisted
     * in the application. No [Job][google.cloud.talent.v4beta1.Job] entity is created in this case.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.Job job = 1;</code>
     * @param \Google\Cloud\Talent\V4beta1\Job $var
     * @return $this
     */
    public function setJob($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Talent\V4beta1\Job::class);
        $this->job = $var;

        return $this;
    }

    /**
     * Optional.
     * The job application id.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string application_id = 2;</code>
     * @return string
     */
    public function getApplicationId()
    {
        return $this->application_id;
    }

    /**
     * Optional.
     * The job application id.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string application_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setApplicationId($var)
    {
        GPBUtil::checkString($var, True);
        $this->application_id = $var;

        return $this;
    }

    /**
     * Optional.
     * The application date.
     *
     * Generated from protobuf field <code>.google.type.Date application_date = 3;</code>
     * @return \Google\Type\Date
     */
    public function getApplicationDate()
    {
        return $this->application_date;
    }

    /**
     * Optional.
     * The application date.
     *
     * Generated from protobuf field <code>.google.type.Date application_date = 3;</code>
     * @param \Google\Type\Date $var
     * @return $this
     */
    public function setApplicationDate($var)
    {
        GPBUtil::checkMessage($var, \Google\Type\Date::class);
        $this->application_date = $var;

        return $this;
    }

    /**
     * Optional.
     * The last stage the candidate reached in the application progress.
     * For example, "new", "phone screen", "interview".
     *
     * Generated from protobuf field <code>string last_stage = 4;</code>
     * @return string
     */
    public function getLastStage()
    {
        return $this->last_stage;
    }

    /**
     * Optional.
     * The last stage the candidate reached in the application progress.
     * For example, "new", "phone screen", "interview".
     *
     * Generated from protobuf field <code>string last_stage = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setLastStage($var)
    {
        GPBUtil::checkString($var, True);
        $this->last_stage = $var;

        return $this;
    }

    /**
     * Optional.
     * The application state.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.JobApplication.ApplicationStatus state = 5;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Optional.
     * The application state.
     *
     * Generated from protobuf field <code>.google.cloud.talent.v4beta1.JobApplication.ApplicationStatus state = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\JobApplication_ApplicationStatus::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Optional.
     * The average interview score.
     *
     * Generated from protobuf field <code>double average_interview_score = 6;</code>
     * @return float
     */
    public function getAverageInterviewScore()
    {
        return $this->average_interview_score;
    }

    /**
     * Optional.
     * The average interview score.
     *
     * Generated from protobuf field <code>double average_interview_score = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setAverageInterviewScore($var)
    {
        GPBUtil::checkDouble($var);
        $this->average_interview_score = $var;

        return $this;
    }

    /**
     * Optional.
     * The scale id of the interview score.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string interview_score_scale_id = 7;</code>
     * @return string
     */
    public function getInterviewScoreScaleId()
    {
        return $this->interview_score_scale_id;
    }

    /**
     * Optional.
     * The scale id of the interview score.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string interview_score_scale_id = 7;</code>
     * @param string $var
     * @return $this
     */
    public function setInterviewScoreScaleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->interview_score_scale_id = $var;

        return $this;
    }

    /**
     * Optional.
     * The number of interviews.
     *
     * Generated from protobuf field <code>int32 number_of_interviews = 8;</code>
     * @return int
     */
    public function getNumberOfInterviews()
    {
        return $this->number_of_interviews;
    }

    /**
     * Optional.
     * The number of interviews.
     *
     * Generated from protobuf field <code>int32 number_of_interviews = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setNumberOfInterviews($var)
    {
        GPBUtil::checkInt32($var);
        $this->number_of_interviews = $var;

        return $this;
    }

    /**
     * Optional.
     * If the candidate is referred by a employee.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_employee_referred = 9;</code>
     * @return \Google\Protobuf\BoolValue
     */
    public function getIsEmployeeReferred()
    {
        return $this->is_employee_referred;
    }

    /**
     * Optional.
     * If the candidate is referred by a employee.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_employee_referred = 9;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setIsEmployeeReferred($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->is_employee_referred = $var;

        return $this;
    }

    /**
     * Optional.
     * The last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 10;</code>
     * @return \Google\Protobuf\Timestamp
     */
    public function getUpdateTime()
    {
        return $this->update_time;
    }

    /**
     * Optional.
     * The last update timestamp.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp update_time = 10;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setUpdateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->update_time = $var;

        return $this;
    }

    /**
     * Optional.
     * The outcome reason for the job application.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string outcome_reason = 11;</code>
     * @return string
     */
    public function getOutcomeReason()
    {
        return $this->outcome_reason;
    }

    /**
     * Optional.
     * The outcome reason for the job application.
     * Number of characters allowed is 100.
     *
     * Generated from protobuf field <code>string outcome_reason = 11;</code>
     * @param string $var
     * @return $this
     */
    public function setOutcomeReason($var)
    {
        GPBUtil::checkString($var, True);
        $this->outcome_reason = $var;

        return $this;
    }

    /**
     * Optional.
     * Outcome positiveness shows how positive the outcome is.
     * Currently only -1, 0 and 1 are accepted, where -1 means not positive, 0
     * means neutral and 1 means positive. An error is thrown if other value is
     * set.
     *
     * Generated from protobuf field <code>double outcome_positiveness = 12;</code>
     * @return float
     */
    public function getOutcomePositiveness()
    {
        return $this->outcome_positiveness;
    }

    /**
     * Optional.
     * Outcome positiveness shows how positive the outcome is.
     * Currently only -1, 0 and 1 are accepted, where -1 means not positive, 0
     * means neutral and 1 means positive. An error is thrown if other value is
     * set.
     *
     * Generated from protobuf field <code>double outcome_positiveness = 12;</code>
     * @param float $var
     * @return $this
     */
    public function setOutcomePositiveness($var)
    {
        GPBUtil::checkDouble($var);
        $this->outcome_positiveness = $var;

        return $this;
    }

    /**
     * Output only. Indicates whether this job application is a match to
     * application related filters. This value is only applicable in profile
     * search response.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_match = 13;</code>
     * @return \Google\Protobuf\BoolValue
     */
    public function getIsMatch()
    {
        return $this->is_match;
    }

    /**
     * Output only. Indicates whether this job application is a match to
     * application related filters. This value is only applicable in profile
     * search response.
     *
     * Generated from protobuf field <code>.google.protobuf.BoolValue is_match = 13;</code>
     * @param \Google\Protobuf\BoolValue $var
     * @return $this
     */
    public function setIsMatch($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class);
        $this->is_match = $var;

        return $this;
    }

    /**
     * Output only. Job title snippet shows how the job title is related to a
     * search query. It's empty if the job title isn't related to the search
     * query.
     *
     * Generated from protobuf field <code>string job_title_snippet = 14;</code>
     * @return string
     */
    public function getJobTitleSnippet()
    {
        return $this->job_title_snippet;
    }

    /**
     * Output only. Job title snippet shows how the job title is related to a
     * search query. It's empty if the job title isn't related to the search
     * query.
     *
     * Generated from protobuf field <code>string job_title_snippet = 14;</code>
     * @param string $var
     * @return $this
     */
    public function setJobTitleSnippet($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_title_snippet = $var;

        return $this;
    }

}

