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

namespace Google\Cloud\Talent\V4beta1\CompensationInfo;

use UnexpectedValueException;

/**
 * The type of compensation.
 * For compensation amounts specified in non-monetary amounts,
 * describe the compensation scheme in the
 * [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description].
 * For example, tipping format is described in
 * [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]
 * (for example, "expect 15-20% tips based on customer bill.") and an estimate
 * of the tips provided in
 * [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount]
 * or
 * [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range]
 * ($10 per hour).
 * For example, equity is described in
 * [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]
 * (for example, "1% - 2% equity vesting over 4 years, 1 year cliff") and
 * value estimated in
 * [CompensationEntry.amount][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.amount]
 * or
 * [CompensationEntry.range][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.range].
 * If no value estimate is possible, units are
 * [CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED][google.cloud.talent.v4beta1.CompensationInfo.CompensationUnit.COMPENSATION_UNIT_UNSPECIFIED]
 * and then further clarified in
 * [CompensationEntry.description][google.cloud.talent.v4beta1.CompensationInfo.CompensationEntry.description]
 * field.
 *
 * Protobuf type <code>google.cloud.talent.v4beta1.CompensationInfo.CompensationType</code>
 */
class CompensationType
{
    /**
     * Default value.
     *
     * Generated from protobuf enum <code>COMPENSATION_TYPE_UNSPECIFIED = 0;</code>
     */
    const COMPENSATION_TYPE_UNSPECIFIED = 0;
    /**
     * Base compensation: Refers to the fixed amount of money paid to an
     * employee by an employer in return for work performed. Base compensation
     * does not include benefits, bonuses or any other potential compensation
     * from an employer.
     *
     * Generated from protobuf enum <code>BASE = 1;</code>
     */
    const BASE = 1;
    /**
     * Bonus.
     *
     * Generated from protobuf enum <code>BONUS = 2;</code>
     */
    const BONUS = 2;
    /**
     * Signing bonus.
     *
     * Generated from protobuf enum <code>SIGNING_BONUS = 3;</code>
     */
    const SIGNING_BONUS = 3;
    /**
     * Equity.
     *
     * Generated from protobuf enum <code>EQUITY = 4;</code>
     */
    const EQUITY = 4;
    /**
     * Profit sharing.
     *
     * Generated from protobuf enum <code>PROFIT_SHARING = 5;</code>
     */
    const PROFIT_SHARING = 5;
    /**
     * Commission.
     *
     * Generated from protobuf enum <code>COMMISSIONS = 6;</code>
     */
    const COMMISSIONS = 6;
    /**
     * Tips.
     *
     * Generated from protobuf enum <code>TIPS = 7;</code>
     */
    const TIPS = 7;
    /**
     * Other compensation type.
     *
     * Generated from protobuf enum <code>OTHER_COMPENSATION_TYPE = 8;</code>
     */
    const OTHER_COMPENSATION_TYPE = 8;

    private static $valueToName = [
        self::COMPENSATION_TYPE_UNSPECIFIED => 'COMPENSATION_TYPE_UNSPECIFIED',
        self::BASE => 'BASE',
        self::BONUS => 'BONUS',
        self::SIGNING_BONUS => 'SIGNING_BONUS',
        self::EQUITY => 'EQUITY',
        self::PROFIT_SHARING => 'PROFIT_SHARING',
        self::COMMISSIONS => 'COMMISSIONS',
        self::TIPS => 'TIPS',
        self::OTHER_COMPENSATION_TYPE => 'OTHER_COMPENSATION_TYPE',
    ];

    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(CompensationType::class, \Google\Cloud\Talent\V4beta1\CompensationInfo_CompensationType::class);

