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

namespace Google\Cloud\Dlp\V2\DataRiskLevel;

use UnexpectedValueException;

/**
 * Various score levels for resources.
 *
 * Protobuf type <code>google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore</code>
 */
class DataRiskLevelScore
{
    /**
     * Unused.
     *
     * Generated from protobuf enum <code>RISK_SCORE_UNSPECIFIED = 0;</code>
     */
    const RISK_SCORE_UNSPECIFIED = 0;
    /**
     * Low risk - Lower indication of sensitive data that appears to have
     * additional access restrictions in place or no indication of sensitive
     * data found.
     *
     * Generated from protobuf enum <code>RISK_LOW = 10;</code>
     */
    const RISK_LOW = 10;
    /**
     * Unable to determine risk.
     *
     * Generated from protobuf enum <code>RISK_UNKNOWN = 12;</code>
     */
    const RISK_UNKNOWN = 12;
    /**
     * Medium risk - Sensitive data may be present but additional access or fine
     * grain access restrictions appear to be present.  Consider limiting
     * access even further or transform data to mask.
     *
     * Generated from protobuf enum <code>RISK_MODERATE = 20;</code>
     */
    const RISK_MODERATE = 20;
    /**
     * High risk – SPII may be present. Access controls may include public
     * ACLs. Exfiltration of data may lead to user data loss. Re-identification
     * of users may be possible. Consider limiting usage and or removing SPII.
     *
     * Generated from protobuf enum <code>RISK_HIGH = 30;</code>
     */
    const RISK_HIGH = 30;

    private static $valueToName = [
        self::RISK_SCORE_UNSPECIFIED => 'RISK_SCORE_UNSPECIFIED',
        self::RISK_LOW => 'RISK_LOW',
        self::RISK_UNKNOWN => 'RISK_UNKNOWN',
        self::RISK_MODERATE => 'RISK_MODERATE',
        self::RISK_HIGH => 'RISK_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);
    }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(DataRiskLevelScore::class, \Google\Cloud\Dlp\V2\DataRiskLevel_DataRiskLevelScore::class);

