<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/agent.proto

namespace Google\Cloud\Dialogflow\V2\Agent;

use UnexpectedValueException;

/**
 * Represents the agent tier.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.Agent.Tier</code>
 */
class Tier
{
    /**
     * Not specified. This value should never be used.
     *
     * Generated from protobuf enum <code>TIER_UNSPECIFIED = 0;</code>
     */
    const TIER_UNSPECIFIED = 0;
    /**
     * Trial Edition, previously known as Standard Edition.
     *
     * Generated from protobuf enum <code>TIER_STANDARD = 1;</code>
     */
    const TIER_STANDARD = 1;
    /**
     * Essentials Edition, previously known as Enterprise Essential Edition.
     *
     * Generated from protobuf enum <code>TIER_ENTERPRISE = 2;</code>
     */
    const TIER_ENTERPRISE = 2;
    /**
     * Essentials Edition (same as TIER_ENTERPRISE), previously known as
     * Enterprise Plus Edition.
     *
     * Generated from protobuf enum <code>TIER_ENTERPRISE_PLUS = 3 [deprecated = true];</code>
     */
    const TIER_ENTERPRISE_PLUS = 3;

    private static $valueToName = [
        self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED',
        self::TIER_STANDARD => 'TIER_STANDARD',
        self::TIER_ENTERPRISE => 'TIER_ENTERPRISE',
        self::TIER_ENTERPRISE_PLUS => 'TIER_ENTERPRISE_PLUS',
    ];

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

