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

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

use UnexpectedValueException;

/**
 * Import option.
 *
 * Protobuf type <code>google.cloud.dialogflow.cx.v3.ImportFlowRequest.ImportOption</code>
 */
class ImportOption
{
    /**
     * Unspecified. Treated as `KEEP`.
     *
     * Generated from protobuf enum <code>IMPORT_OPTION_UNSPECIFIED = 0;</code>
     */
    const IMPORT_OPTION_UNSPECIFIED = 0;
    /**
     * Always respect settings in exported flow content. It may cause a
     * import failure if some settings (e.g. custom NLU) are not supported in
     * the agent to import into.
     *
     * Generated from protobuf enum <code>KEEP = 1;</code>
     */
    const KEEP = 1;
    /**
     * Fallback to default settings if some settings are not supported in the
     * agent to import into. E.g. Standard NLU will be used if custom NLU is
     * not available.
     *
     * Generated from protobuf enum <code>FALLBACK = 2;</code>
     */
    const FALLBACK = 2;

    private static $valueToName = [
        self::IMPORT_OPTION_UNSPECIFIED => 'IMPORT_OPTION_UNSPECIFIED',
        self::KEEP => 'KEEP',
        self::FALLBACK => 'FALLBACK',
    ];

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

