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

namespace Google\Cloud\Dialogflow\V2\ConversationModel;

use UnexpectedValueException;

/**
 * Model type.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.ConversationModel.ModelType</code>
 */
class ModelType
{
    /**
     * ModelType unspecified.
     *
     * Generated from protobuf enum <code>MODEL_TYPE_UNSPECIFIED = 0;</code>
     */
    const MODEL_TYPE_UNSPECIFIED = 0;
    /**
     * ModelType smart reply dual encoder model.
     *
     * Generated from protobuf enum <code>SMART_REPLY_DUAL_ENCODER_MODEL = 2;</code>
     */
    const SMART_REPLY_DUAL_ENCODER_MODEL = 2;
    /**
     * ModelType smart reply bert model.
     *
     * Generated from protobuf enum <code>SMART_REPLY_BERT_MODEL = 6;</code>
     */
    const SMART_REPLY_BERT_MODEL = 6;

    private static $valueToName = [
        self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED',
        self::SMART_REPLY_DUAL_ENCODER_MODEL => 'SMART_REPLY_DUAL_ENCODER_MODEL',
        self::SMART_REPLY_BERT_MODEL => 'SMART_REPLY_BERT_MODEL',
    ];

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


