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

namespace Google\Cloud\Dialogflow\V2\GeneratorEvaluationConfig\InputDataConfig;

use UnexpectedValueException;

/**
 * Summary generation options.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.GeneratorEvaluationConfig.InputDataConfig.SummaryGenerationOption</code>
 */
class SummaryGenerationOption
{
    /**
     * Default option will not be used
     *
     * Generated from protobuf enum <code>SUMMARY_GENERATION_OPTION_UNSPECIFIED = 0;</code>
     */
    const SUMMARY_GENERATION_OPTION_UNSPECIFIED = 0;
    /**
     * Always Generate summary for all conversations.
     *
     * Generated from protobuf enum <code>ALWAYS_GENERATE = 1;</code>
     */
    const ALWAYS_GENERATE = 1;
    /**
     * Gnerate only missing summaries.
     *
     * Generated from protobuf enum <code>GENERATE_IF_MISSING = 2;</code>
     */
    const GENERATE_IF_MISSING = 2;
    /**
     * Do not generate new summaries. Only use existing summaries found.
     *
     * Generated from protobuf enum <code>DO_NOT_GENERATE = 3;</code>
     */
    const DO_NOT_GENERATE = 3;

    private static $valueToName = [
        self::SUMMARY_GENERATION_OPTION_UNSPECIFIED => 'SUMMARY_GENERATION_OPTION_UNSPECIFIED',
        self::ALWAYS_GENERATE => 'ALWAYS_GENERATE',
        self::GENERATE_IF_MISSING => 'GENERATE_IF_MISSING',
        self::DO_NOT_GENERATE => 'DO_NOT_GENERATE',
    ];

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

