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

namespace Google\Cloud\Dialogflow\V2\GeneratorEvaluationConfig;

use UnexpectedValueException;

/**
 * Enumeration of input data source type.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.GeneratorEvaluationConfig.InputDataSourceType</code>
 */
class InputDataSourceType
{
    /**
     * Unspecified InputDataSourceType. Should not be used.
     *
     * Generated from protobuf enum <code>INPUT_DATA_SOURCE_TYPE_UNSPECIFIED = 0;</code>
     */
    const INPUT_DATA_SOURCE_TYPE_UNSPECIFIED = 0;
    /**
     * Fetch data from Agent Assist storage. If this source type is chosen,
     * input_data_config.start_time and input_data_config.end_timestamp must be
     * provided.
     *
     * Generated from protobuf enum <code>AGENT_ASSIST_CONVERSATIONS = 1;</code>
     */
    const AGENT_ASSIST_CONVERSATIONS = 1;
    /**
     * Fetch data from Insights storage. If this source type is chosen,
     * input_data_config.start_time and input_data_config.end_timestamp must be
     * provided.
     *
     * Generated from protobuf enum <code>INSIGHTS_CONVERSATIONS = 2;</code>
     */
    const INSIGHTS_CONVERSATIONS = 2;

    private static $valueToName = [
        self::INPUT_DATA_SOURCE_TYPE_UNSPECIFIED => 'INPUT_DATA_SOURCE_TYPE_UNSPECIFIED',
        self::AGENT_ASSIST_CONVERSATIONS => 'AGENT_ASSIST_CONVERSATIONS',
        self::INSIGHTS_CONVERSATIONS => 'INSIGHTS_CONVERSATIONS',
    ];

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

