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

namespace Google\Cloud\Talent\V4beta1\EmployerFilter;

use UnexpectedValueException;

/**
 * Enum indicating which set of [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records] to search
 * against.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.EmployerFilter.EmployerFilterMode</code>
 */
class EmployerFilterMode
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>EMPLOYER_FILTER_MODE_UNSPECIFIED = 0;</code>
     */
    const EMPLOYER_FILTER_MODE_UNSPECIFIED = 0;
    /**
     * Apply to all employers in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
     *
     * Generated from protobuf enum <code>ALL_EMPLOYMENT_RECORDS = 1;</code>
     */
    const ALL_EMPLOYMENT_RECORDS = 1;
    /**
     * Apply only to current employer in [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
     *
     * Generated from protobuf enum <code>CURRENT_EMPLOYMENT_RECORDS_ONLY = 2;</code>
     */
    const CURRENT_EMPLOYMENT_RECORDS_ONLY = 2;
    /**
     * Apply only to past (not current) employers in
     * [Profile.employment_records][google.cloud.talent.v4beta1.Profile.employment_records].
     *
     * Generated from protobuf enum <code>PAST_EMPLOYMENT_RECORDS_ONLY = 3;</code>
     */
    const PAST_EMPLOYMENT_RECORDS_ONLY = 3;

    private static $valueToName = [
        self::EMPLOYER_FILTER_MODE_UNSPECIFIED => 'EMPLOYER_FILTER_MODE_UNSPECIFIED',
        self::ALL_EMPLOYMENT_RECORDS => 'ALL_EMPLOYMENT_RECORDS',
        self::CURRENT_EMPLOYMENT_RECORDS_ONLY => 'CURRENT_EMPLOYMENT_RECORDS_ONLY',
        self::PAST_EMPLOYMENT_RECORDS_ONLY => 'PAST_EMPLOYMENT_RECORDS_ONLY',
    ];

    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);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EmployerFilterMode::class, \Google\Cloud\Talent\V4beta1\EmployerFilter_EmployerFilterMode::class);

