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

namespace Google\Cloud\Talent\V4beta1;

use UnexpectedValueException;

/**
 * The type of candidate availability signal.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.AvailabilitySignalType</code>
 */
class AvailabilitySignalType
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>AVAILABILITY_SIGNAL_TYPE_UNSPECIFIED = 0;</code>
     */
    const AVAILABILITY_SIGNAL_TYPE_UNSPECIFIED = 0;
    /**
     * Job application signal.
     * In the context of
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals],
     * this signal is related to the candidate's most recent application.
     * [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time]
     * is calculated from
     * max([Application.create_time][google.cloud.talent.v4beta1.Application.create_time])
     * from all [Application][google.cloud.talent.v4beta1.Application] records
     * where [Application.source][google.cloud.talent.v4beta1.Application.source]
     * is any of the following:
     *  [APPLY_DIRECT_WEB][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_WEB]
     *  [APPLY_DIRECT_MOBILE_WEB][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_MOBILE_WEB]
     *  [APPLY_DIRECT_MOBILE_APP][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_MOBILE_APP]
     *  [APPLY_DIRECT_IN_PERSON][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_DIRECT_IN_PERSON]
     *  [APPLY_INDIRECT][google.cloud.talent.v4beta1.Application.ApplicationSource.APPLY_INDIRECT]
     * In the context of
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the
     * filter is applied on
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]
     * where [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is
     * JOB_APPLICATION.
     *
     * Generated from protobuf enum <code>JOB_APPLICATION = 1;</code>
     */
    const JOB_APPLICATION = 1;
    /**
     * Resume update signal.
     * In the context of
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals],
     * this signal is related to the candidate's most recent update to their
     * resume. For a
     * [SummarizedProfile.summary][google.cloud.talent.v4beta1.SummarizedProfile.summary],
     * [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time]
     * is calculated from
     * max([Profile.resume_update_time][google.cloud.talent.v4beta1.Profile.resume_update_time])
     * from all
     * [SummarizedProfile.profiles][google.cloud.talent.v4beta1.SummarizedProfile.profiles].
     * In the context of
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the
     * filter is applied on
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]
     * where [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is
     * RESUME_UPDATE.
     *
     * Generated from protobuf enum <code>RESUME_UPDATE = 2;</code>
     */
    const RESUME_UPDATE = 2;
    /**
     * Candidate update signal.
     * In the context of
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals],
     * this signal is related to the candidate's most recent update to their
     * profile. For a
     * [SummarizedProfile.summary][google.cloud.talent.v4beta1.SummarizedProfile.summary],
     * [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time]
     * is calculated from
     * max([Profile.candidate_update_time][google.cloud.talent.v4beta1.Profile.candidate_update_time])
     * from all
     * [SummarizedProfile.profiles][google.cloud.talent.v4beta1.SummarizedProfile.profiles].
     * In the context of
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the
     * filter is applied on
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]
     * where [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is
     * CANDIDATE_UPDATE.
     *
     * Generated from protobuf enum <code>CANDIDATE_UPDATE = 3;</code>
     */
    const CANDIDATE_UPDATE = 3;
    /**
     * Client submission signal.
     * In the context of
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals],
     * this signal is related to the candidate's most recent submission.
     * [last_update_time][google.cloud.talent.v4beta1.AvailabilitySignal.last_update_time]
     * is calculated from
     * max([Application.create_time][google.cloud.talent.v4beta1.Application.create_time])
     * from all [Application][google.cloud.talent.v4beta1.Application] records
     * where [Application.stage][google.cloud.talent.v4beta1.Application.stage] is
     * any of the following:
     *  [HIRING_MANAGER_REVIEW][google.cloud.talent.v4beta1.Application.ApplicationStage.HIRING_MANAGER_REVIEW]
     *  [INTERVIEW][google.cloud.talent.v4beta1.Application.ApplicationStage.INTERVIEW]
     *  [OFFER_EXTENDED][google.cloud.talent.v4beta1.Application.ApplicationStage.OFFER_EXTENDED]
     *  [OFFER_ACCEPTED][google.cloud.talent.v4beta1.Application.ApplicationStage.OFFER_ACCEPTED]
     *  [STARTED][google.cloud.talent.v4beta1.Application.ApplicationStage.STARTED]
     * In the context of
     * [AvailabilityFilter][google.cloud.talent.v4beta1.AvailabilityFilter], the
     * filter is applied on
     * [Profile.availability_signals][google.cloud.talent.v4beta1.Profile.availability_signals]
     * where [type][google.cloud.talent.v4beta1.AvailabilitySignal.type] is
     * CLIENT_SUBMISSION.
     *
     * Generated from protobuf enum <code>CLIENT_SUBMISSION = 4;</code>
     */
    const CLIENT_SUBMISSION = 4;

    private static $valueToName = [
        self::AVAILABILITY_SIGNAL_TYPE_UNSPECIFIED => 'AVAILABILITY_SIGNAL_TYPE_UNSPECIFIED',
        self::JOB_APPLICATION => 'JOB_APPLICATION',
        self::RESUME_UPDATE => 'RESUME_UPDATE',
        self::CANDIDATE_UPDATE => 'CANDIDATE_UPDATE',
        self::CLIENT_SUBMISSION => 'CLIENT_SUBMISSION',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

