<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: plugnmeet_nats_msg.proto

namespace Mynaparrot\PlugnmeetProto;

use UnexpectedValueException;

/**
 * Protobuf type <code>plugnmeet.NatsMsgClientToServerEvents</code>
 */
class NatsMsgClientToServerEvents
{
    /**
     * Generated from protobuf enum <code>REQ_INITIAL_DATA = 0;</code>
     */
    const REQ_INITIAL_DATA = 0;
    /**
     * Generated from protobuf enum <code>REQ_MEDIA_SERVER_DATA = 8;</code>
     */
    const REQ_MEDIA_SERVER_DATA = 8;
    /**
     * Generated from protobuf enum <code>REQ_JOINED_USERS_LIST = 1;</code>
     */
    const REQ_JOINED_USERS_LIST = 1;
    /**
     * Generated from protobuf enum <code>REQ_RENEW_PNM_TOKEN = 2;</code>
     */
    const REQ_RENEW_PNM_TOKEN = 2;
    /**
     * Generated from protobuf enum <code>PING = 3;</code>
     */
    const PING = 3;
    /**
     * Generated from protobuf enum <code>REQ_RAISE_HAND = 4;</code>
     */
    const REQ_RAISE_HAND = 4;
    /**
     * Generated from protobuf enum <code>REQ_LOWER_HAND = 5;</code>
     */
    const REQ_LOWER_HAND = 5;
    /**
     * Generated from protobuf enum <code>REQ_LOWER_OTHER_USER_HAND = 6;</code>
     */
    const REQ_LOWER_OTHER_USER_HAND = 6;
    /**
     * Generated from protobuf enum <code>PUSH_ANALYTICS_DATA = 7;</code>
     */
    const PUSH_ANALYTICS_DATA = 7;

    private static $valueToName = [
        self::REQ_INITIAL_DATA => 'REQ_INITIAL_DATA',
        self::REQ_MEDIA_SERVER_DATA => 'REQ_MEDIA_SERVER_DATA',
        self::REQ_JOINED_USERS_LIST => 'REQ_JOINED_USERS_LIST',
        self::REQ_RENEW_PNM_TOKEN => 'REQ_RENEW_PNM_TOKEN',
        self::PING => 'PING',
        self::REQ_RAISE_HAND => 'REQ_RAISE_HAND',
        self::REQ_LOWER_HAND => 'REQ_LOWER_HAND',
        self::REQ_LOWER_OTHER_USER_HAND => 'REQ_LOWER_OTHER_USER_HAND',
        self::PUSH_ANALYTICS_DATA => 'PUSH_ANALYTICS_DATA',
    ];

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

