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

namespace Google\Cloud\Dialogflow\V2\AgentAssistantFeedback;

use UnexpectedValueException;

/**
 * Correctness of document.
 *
 * Protobuf type <code>google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness</code>
 */
class DocumentCorrectness
{
    /**
     * Document correctness unspecified.
     *
     * Generated from protobuf enum <code>DOCUMENT_CORRECTNESS_UNSPECIFIED = 0;</code>
     */
    const DOCUMENT_CORRECTNESS_UNSPECIFIED = 0;
    /**
     * Information in document is incorrect.
     *
     * Generated from protobuf enum <code>INCORRECT = 1;</code>
     */
    const INCORRECT = 1;
    /**
     * Information in document is correct.
     *
     * Generated from protobuf enum <code>CORRECT = 2;</code>
     */
    const CORRECT = 2;

    private static $valueToName = [
        self::DOCUMENT_CORRECTNESS_UNSPECIFIED => 'DOCUMENT_CORRECTNESS_UNSPECIFIED',
        self::INCORRECT => 'INCORRECT',
        self::CORRECT => 'CORRECT',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DocumentCorrectness::class, \Google\Cloud\Dialogflow\V2\AgentAssistantFeedback_DocumentCorrectness::class);

