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

namespace Google\Cloud\Dialogflow\Cx\V3\TestRunDifference;

use UnexpectedValueException;

/**
 * What part of the message replay differs from the test case.
 *
 * Protobuf type <code>google.cloud.dialogflow.cx.v3.TestRunDifference.DiffType</code>
 */
class DiffType
{
    /**
     * Should never be used.
     *
     * Generated from protobuf enum <code>DIFF_TYPE_UNSPECIFIED = 0;</code>
     */
    const DIFF_TYPE_UNSPECIFIED = 0;
    /**
     * The intent.
     *
     * Generated from protobuf enum <code>INTENT = 1;</code>
     */
    const INTENT = 1;
    /**
     * The page.
     *
     * Generated from protobuf enum <code>PAGE = 2;</code>
     */
    const PAGE = 2;
    /**
     * The parameters.
     *
     * Generated from protobuf enum <code>PARAMETERS = 3;</code>
     */
    const PARAMETERS = 3;
    /**
     * The message utterance.
     *
     * Generated from protobuf enum <code>UTTERANCE = 4;</code>
     */
    const UTTERANCE = 4;
    /**
     * The flow.
     *
     * Generated from protobuf enum <code>FLOW = 5;</code>
     */
    const FLOW = 5;

    private static $valueToName = [
        self::DIFF_TYPE_UNSPECIFIED => 'DIFF_TYPE_UNSPECIFIED',
        self::INTENT => 'INTENT',
        self::PAGE => 'PAGE',
        self::PARAMETERS => 'PARAMETERS',
        self::UTTERANCE => 'UTTERANCE',
        self::FLOW => 'FLOW',
    ];

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


