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

namespace Google\Cloud\Dialogflow\V2;

use UnexpectedValueException;

/**
 * [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling)
 * digit in Telephony Gateway.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.TelephonyDtmf</code>
 */
class TelephonyDtmf
{
    /**
     * Not specified. This value may be used to indicate an absent digit.
     *
     * Generated from protobuf enum <code>TELEPHONY_DTMF_UNSPECIFIED = 0;</code>
     */
    const TELEPHONY_DTMF_UNSPECIFIED = 0;
    /**
     * Number: '1'.
     *
     * Generated from protobuf enum <code>DTMF_ONE = 1;</code>
     */
    const DTMF_ONE = 1;
    /**
     * Number: '2'.
     *
     * Generated from protobuf enum <code>DTMF_TWO = 2;</code>
     */
    const DTMF_TWO = 2;
    /**
     * Number: '3'.
     *
     * Generated from protobuf enum <code>DTMF_THREE = 3;</code>
     */
    const DTMF_THREE = 3;
    /**
     * Number: '4'.
     *
     * Generated from protobuf enum <code>DTMF_FOUR = 4;</code>
     */
    const DTMF_FOUR = 4;
    /**
     * Number: '5'.
     *
     * Generated from protobuf enum <code>DTMF_FIVE = 5;</code>
     */
    const DTMF_FIVE = 5;
    /**
     * Number: '6'.
     *
     * Generated from protobuf enum <code>DTMF_SIX = 6;</code>
     */
    const DTMF_SIX = 6;
    /**
     * Number: '7'.
     *
     * Generated from protobuf enum <code>DTMF_SEVEN = 7;</code>
     */
    const DTMF_SEVEN = 7;
    /**
     * Number: '8'.
     *
     * Generated from protobuf enum <code>DTMF_EIGHT = 8;</code>
     */
    const DTMF_EIGHT = 8;
    /**
     * Number: '9'.
     *
     * Generated from protobuf enum <code>DTMF_NINE = 9;</code>
     */
    const DTMF_NINE = 9;
    /**
     * Number: '0'.
     *
     * Generated from protobuf enum <code>DTMF_ZERO = 10;</code>
     */
    const DTMF_ZERO = 10;
    /**
     * Letter: 'A'.
     *
     * Generated from protobuf enum <code>DTMF_A = 11;</code>
     */
    const DTMF_A = 11;
    /**
     * Letter: 'B'.
     *
     * Generated from protobuf enum <code>DTMF_B = 12;</code>
     */
    const DTMF_B = 12;
    /**
     * Letter: 'C'.
     *
     * Generated from protobuf enum <code>DTMF_C = 13;</code>
     */
    const DTMF_C = 13;
    /**
     * Letter: 'D'.
     *
     * Generated from protobuf enum <code>DTMF_D = 14;</code>
     */
    const DTMF_D = 14;
    /**
     * Asterisk/star: '*'.
     *
     * Generated from protobuf enum <code>DTMF_STAR = 15;</code>
     */
    const DTMF_STAR = 15;
    /**
     * Pound/diamond/hash/square/gate/octothorpe: '#'.
     *
     * Generated from protobuf enum <code>DTMF_POUND = 16;</code>
     */
    const DTMF_POUND = 16;

    private static $valueToName = [
        self::TELEPHONY_DTMF_UNSPECIFIED => 'TELEPHONY_DTMF_UNSPECIFIED',
        self::DTMF_ONE => 'DTMF_ONE',
        self::DTMF_TWO => 'DTMF_TWO',
        self::DTMF_THREE => 'DTMF_THREE',
        self::DTMF_FOUR => 'DTMF_FOUR',
        self::DTMF_FIVE => 'DTMF_FIVE',
        self::DTMF_SIX => 'DTMF_SIX',
        self::DTMF_SEVEN => 'DTMF_SEVEN',
        self::DTMF_EIGHT => 'DTMF_EIGHT',
        self::DTMF_NINE => 'DTMF_NINE',
        self::DTMF_ZERO => 'DTMF_ZERO',
        self::DTMF_A => 'DTMF_A',
        self::DTMF_B => 'DTMF_B',
        self::DTMF_C => 'DTMF_C',
        self::DTMF_D => 'DTMF_D',
        self::DTMF_STAR => 'DTMF_STAR',
        self::DTMF_POUND => 'DTMF_POUND',
    ];

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

