<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/devtools/clouderrorreporting/v1beta1/common.proto

namespace Google\Cloud\ErrorReporting\V1beta1;

use UnexpectedValueException;

/**
 * Resolution status of an error group.
 *
 * Protobuf type <code>google.devtools.clouderrorreporting.v1beta1.ResolutionStatus</code>
 */
class ResolutionStatus
{
    /**
     * Status is unknown. When left unspecified in requests, it is treated like
     * OPEN.
     *
     * Generated from protobuf enum <code>RESOLUTION_STATUS_UNSPECIFIED = 0;</code>
     */
    const RESOLUTION_STATUS_UNSPECIFIED = 0;
    /**
     * The error group is not being addressed. This is the default for
     * new groups. It is also used for errors re-occurring after marked RESOLVED.
     *
     * Generated from protobuf enum <code>OPEN = 1;</code>
     */
    const OPEN = 1;
    /**
     * Error Group manually acknowledged, it can have an issue link attached.
     *
     * Generated from protobuf enum <code>ACKNOWLEDGED = 2;</code>
     */
    const ACKNOWLEDGED = 2;
    /**
     * Error Group manually resolved, more events for this group are not expected
     * to occur.
     *
     * Generated from protobuf enum <code>RESOLVED = 3;</code>
     */
    const RESOLVED = 3;
    /**
     * The error group is muted and excluded by default on group stats requests.
     *
     * Generated from protobuf enum <code>MUTED = 4;</code>
     */
    const MUTED = 4;

    private static $valueToName = [
        self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED',
        self::OPEN => 'OPEN',
        self::ACKNOWLEDGED => 'ACKNOWLEDGED',
        self::RESOLVED => 'RESOLVED',
        self::MUTED => 'MUTED',
    ];

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

