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

namespace Google\Cloud\SecurityCenter\V2\Cve;

use UnexpectedValueException;

/**
 * The possible values of exploitation activity of the vulnerability in the
 * wild.
 *
 * Protobuf type <code>google.cloud.securitycenter.v2.Cve.ExploitationActivity</code>
 */
class ExploitationActivity
{
    /**
     * Invalid or empty value.
     *
     * Generated from protobuf enum <code>EXPLOITATION_ACTIVITY_UNSPECIFIED = 0;</code>
     */
    const EXPLOITATION_ACTIVITY_UNSPECIFIED = 0;
    /**
     * Exploitation has been reported or confirmed to widely occur.
     *
     * Generated from protobuf enum <code>WIDE = 1;</code>
     */
    const WIDE = 1;
    /**
     * Limited reported or confirmed exploitation activities.
     *
     * Generated from protobuf enum <code>CONFIRMED = 2;</code>
     */
    const CONFIRMED = 2;
    /**
     * Exploit is publicly available.
     *
     * Generated from protobuf enum <code>AVAILABLE = 3;</code>
     */
    const AVAILABLE = 3;
    /**
     * No known exploitation activity, but has a high potential for
     * exploitation.
     *
     * Generated from protobuf enum <code>ANTICIPATED = 4;</code>
     */
    const ANTICIPATED = 4;
    /**
     * No known exploitation activity.
     *
     * Generated from protobuf enum <code>NO_KNOWN = 5;</code>
     */
    const NO_KNOWN = 5;

    private static $valueToName = [
        self::EXPLOITATION_ACTIVITY_UNSPECIFIED => 'EXPLOITATION_ACTIVITY_UNSPECIFIED',
        self::WIDE => 'WIDE',
        self::CONFIRMED => 'CONFIRMED',
        self::AVAILABLE => 'AVAILABLE',
        self::ANTICIPATED => 'ANTICIPATED',
        self::NO_KNOWN => 'NO_KNOWN',
    ];

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


