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

namespace Google\Cloud\SecurityCenter\V1\Finding;

use UnexpectedValueException;

/**
 * Mute state a finding can be in.
 *
 * Protobuf type <code>google.cloud.securitycenter.v1.Finding.Mute</code>
 */
class Mute
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>MUTE_UNSPECIFIED = 0;</code>
     */
    const MUTE_UNSPECIFIED = 0;
    /**
     * Finding has been muted.
     *
     * Generated from protobuf enum <code>MUTED = 1;</code>
     */
    const MUTED = 1;
    /**
     * Finding has been unmuted.
     *
     * Generated from protobuf enum <code>UNMUTED = 2;</code>
     */
    const UNMUTED = 2;
    /**
     * Finding has never been muted/unmuted.
     *
     * Generated from protobuf enum <code>UNDEFINED = 4;</code>
     */
    const UNDEFINED = 4;

    private static $valueToName = [
        self::MUTE_UNSPECIFIED => 'MUTE_UNSPECIFIED',
        self::MUTED => 'MUTED',
        self::UNMUTED => 'UNMUTED',
        self::UNDEFINED => 'UNDEFINED',
    ];

    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(Mute::class, \Google\Cloud\SecurityCenter\V1\Finding_Mute::class);

