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

namespace Google\Apps\Chat\V1\SpaceNotificationSetting;

use UnexpectedValueException;

/**
 * The space notification mute setting types.
 *
 * Protobuf type <code>google.chat.v1.SpaceNotificationSetting.MuteSetting</code>
 */
class MuteSetting
{
    /**
     * Reserved.
     *
     * Generated from protobuf enum <code>MUTE_SETTING_UNSPECIFIED = 0;</code>
     */
    const MUTE_SETTING_UNSPECIFIED = 0;
    /**
     * The user will receive notifications for the space based on the
     * notification setting.
     *
     * Generated from protobuf enum <code>UNMUTED = 1;</code>
     */
    const UNMUTED = 1;
    /**
     * The user will not receive any notifications for the space, regardless of
     * the notification setting.
     *
     * Generated from protobuf enum <code>MUTED = 2;</code>
     */
    const MUTED = 2;

    private static $valueToName = [
        self::MUTE_SETTING_UNSPECIFIED => 'MUTE_SETTING_UNSPECIFIED',
        self::UNMUTED => 'UNMUTED',
        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);
    }
}


