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

namespace Google\Cloud\Dialogflow\Cx\V3\DataStoreConnectionSignals\GroundingSignals;

use UnexpectedValueException;

/**
 * Grounding score buckets.
 *
 * Protobuf type <code>google.cloud.dialogflow.cx.v3.DataStoreConnectionSignals.GroundingSignals.GroundingScoreBucket</code>
 */
class GroundingScoreBucket
{
    /**
     * Score not specified.
     *
     * Generated from protobuf enum <code>GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0;</code>
     */
    const GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0;
    /**
     * We have very low confidence that the answer is grounded.
     *
     * Generated from protobuf enum <code>VERY_LOW = 1;</code>
     */
    const VERY_LOW = 1;
    /**
     * We have low confidence that the answer is grounded.
     *
     * Generated from protobuf enum <code>LOW = 3;</code>
     */
    const LOW = 3;
    /**
     * We have medium confidence that the answer is grounded.
     *
     * Generated from protobuf enum <code>MEDIUM = 4;</code>
     */
    const MEDIUM = 4;
    /**
     * We have high confidence that the answer is grounded.
     *
     * Generated from protobuf enum <code>HIGH = 5;</code>
     */
    const HIGH = 5;
    /**
     * We have very high confidence that the answer is grounded.
     *
     * Generated from protobuf enum <code>VERY_HIGH = 6;</code>
     */
    const VERY_HIGH = 6;

    private static $valueToName = [
        self::GROUNDING_SCORE_BUCKET_UNSPECIFIED => 'GROUNDING_SCORE_BUCKET_UNSPECIFIED',
        self::VERY_LOW => 'VERY_LOW',
        self::LOW => 'LOW',
        self::MEDIUM => 'MEDIUM',
        self::HIGH => 'HIGH',
        self::VERY_HIGH => 'VERY_HIGH',
    ];

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


