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

namespace Google\Cloud\Dialogflow\V2\Conversation;

use UnexpectedValueException;

/**
 * Enumeration of the different conversation stages a conversation can be in.
 * Reference:
 * https://cloud.google.com/agent-assist/docs/basics#conversation_stages
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.Conversation.ConversationStage</code>
 */
class ConversationStage
{
    /**
     * Unknown. Should never be used after a conversation is successfully
     * created.
     *
     * Generated from protobuf enum <code>CONVERSATION_STAGE_UNSPECIFIED = 0;</code>
     */
    const CONVERSATION_STAGE_UNSPECIFIED = 0;
    /**
     * The conversation should return virtual agent responses into the
     * conversation.
     *
     * Generated from protobuf enum <code>VIRTUAL_AGENT_STAGE = 1;</code>
     */
    const VIRTUAL_AGENT_STAGE = 1;
    /**
     * The conversation should not provide responses, just listen and provide
     * suggestions.
     *
     * Generated from protobuf enum <code>HUMAN_ASSIST_STAGE = 2;</code>
     */
    const HUMAN_ASSIST_STAGE = 2;

    private static $valueToName = [
        self::CONVERSATION_STAGE_UNSPECIFIED => 'CONVERSATION_STAGE_UNSPECIFIED',
        self::VIRTUAL_AGENT_STAGE => 'VIRTUAL_AGENT_STAGE',
        self::HUMAN_ASSIST_STAGE => 'HUMAN_ASSIST_STAGE',
    ];

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


