<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto

namespace Google\Cloud\PolicyTroubleshooter\Iam\V3;

use UnexpectedValueException;

/**
 * The extent to which a single data point contributes to an overall
 * determination.
 *
 * Protobuf type <code>google.cloud.policytroubleshooter.iam.v3.HeuristicRelevance</code>
 */
class HeuristicRelevance
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>HEURISTIC_RELEVANCE_UNSPECIFIED = 0;</code>
     */
    const HEURISTIC_RELEVANCE_UNSPECIFIED = 0;
    /**
     * The data point has a limited effect on the result. Changing the data point
     * is unlikely to affect the overall determination.
     *
     * Generated from protobuf enum <code>HEURISTIC_RELEVANCE_NORMAL = 1;</code>
     */
    const HEURISTIC_RELEVANCE_NORMAL = 1;
    /**
     * The data point has a strong effect on the result. Changing the data point
     * is likely to affect the overall determination.
     *
     * Generated from protobuf enum <code>HEURISTIC_RELEVANCE_HIGH = 2;</code>
     */
    const HEURISTIC_RELEVANCE_HIGH = 2;

    private static $valueToName = [
        self::HEURISTIC_RELEVANCE_UNSPECIFIED => 'HEURISTIC_RELEVANCE_UNSPECIFIED',
        self::HEURISTIC_RELEVANCE_NORMAL => 'HEURISTIC_RELEVANCE_NORMAL',
        self::HEURISTIC_RELEVANCE_HIGH => 'HEURISTIC_RELEVANCE_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);
    }
}

