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

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

use UnexpectedValueException;

/**
 * NLU model type.
 *
 * Protobuf type <code>google.cloud.dialogflow.cx.v3.NluSettings.ModelType</code>
 */
class ModelType
{
    /**
     * Not specified. `MODEL_TYPE_STANDARD` will be used.
     *
     * Generated from protobuf enum <code>MODEL_TYPE_UNSPECIFIED = 0;</code>
     */
    const MODEL_TYPE_UNSPECIFIED = 0;
    /**
     * Use standard NLU model.
     *
     * Generated from protobuf enum <code>MODEL_TYPE_STANDARD = 1;</code>
     */
    const MODEL_TYPE_STANDARD = 1;
    /**
     * Use advanced NLU model.
     *
     * Generated from protobuf enum <code>MODEL_TYPE_ADVANCED = 3;</code>
     */
    const MODEL_TYPE_ADVANCED = 3;

    private static $valueToName = [
        self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED',
        self::MODEL_TYPE_STANDARD => 'MODEL_TYPE_STANDARD',
        self::MODEL_TYPE_ADVANCED => 'MODEL_TYPE_ADVANCED',
    ];

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


