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

namespace Google\Cloud\Talent\V4beta1;

use UnexpectedValueException;

/**
 * An enum that represents employee benefits included with the job.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.JobBenefit</code>
 */
class JobBenefit
{
    /**
     * Default value if the type isn't specified.
     *
     * Generated from protobuf enum <code>JOB_BENEFIT_UNSPECIFIED = 0;</code>
     */
    const JOB_BENEFIT_UNSPECIFIED = 0;
    /**
     * The job includes access to programs that support child care, such
     * as daycare.
     *
     * Generated from protobuf enum <code>CHILD_CARE = 1;</code>
     */
    const CHILD_CARE = 1;
    /**
     * The job includes dental services covered by a dental
     * insurance plan.
     *
     * Generated from protobuf enum <code>DENTAL = 2;</code>
     */
    const DENTAL = 2;
    /**
     * The job offers specific benefits to domestic partners.
     *
     * Generated from protobuf enum <code>DOMESTIC_PARTNER = 3;</code>
     */
    const DOMESTIC_PARTNER = 3;
    /**
     * The job allows for a flexible work schedule.
     *
     * Generated from protobuf enum <code>FLEXIBLE_HOURS = 4;</code>
     */
    const FLEXIBLE_HOURS = 4;
    /**
     * The job includes health services covered by a medical insurance plan.
     *
     * Generated from protobuf enum <code>MEDICAL = 5;</code>
     */
    const MEDICAL = 5;
    /**
     * The job includes a life insurance plan provided by the employer or
     * available for purchase by the employee.
     *
     * Generated from protobuf enum <code>LIFE_INSURANCE = 6;</code>
     */
    const LIFE_INSURANCE = 6;
    /**
     * The job allows for a leave of absence to a parent to care for a newborn
     * child.
     *
     * Generated from protobuf enum <code>PARENTAL_LEAVE = 7;</code>
     */
    const PARENTAL_LEAVE = 7;
    /**
     * The job includes a workplace retirement plan provided by the
     * employer or available for purchase by the employee.
     *
     * Generated from protobuf enum <code>RETIREMENT_PLAN = 8;</code>
     */
    const RETIREMENT_PLAN = 8;
    /**
     * The job allows for paid time off due to illness.
     *
     * Generated from protobuf enum <code>SICK_DAYS = 9;</code>
     */
    const SICK_DAYS = 9;
    /**
     * The job includes paid time off for vacation.
     *
     * Generated from protobuf enum <code>VACATION = 10;</code>
     */
    const VACATION = 10;
    /**
     * The job includes vision services covered by a vision
     * insurance plan.
     *
     * Generated from protobuf enum <code>VISION = 11;</code>
     */
    const VISION = 11;

    private static $valueToName = [
        self::JOB_BENEFIT_UNSPECIFIED => 'JOB_BENEFIT_UNSPECIFIED',
        self::CHILD_CARE => 'CHILD_CARE',
        self::DENTAL => 'DENTAL',
        self::DOMESTIC_PARTNER => 'DOMESTIC_PARTNER',
        self::FLEXIBLE_HOURS => 'FLEXIBLE_HOURS',
        self::MEDICAL => 'MEDICAL',
        self::LIFE_INSURANCE => 'LIFE_INSURANCE',
        self::PARENTAL_LEAVE => 'PARENTAL_LEAVE',
        self::RETIREMENT_PLAN => 'RETIREMENT_PLAN',
        self::SICK_DAYS => 'SICK_DAYS',
        self::VACATION => 'VACATION',
        self::VISION => 'VISION',
    ];

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

