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

namespace Mynaparrot\PlugnmeetProto;

use UnexpectedValueException;

/**
 * Protobuf type <code>plugnmeet.RoomUploadedFileType</code>
 */
class RoomUploadedFileType
{
    /**
     * Generated from protobuf enum <code>CHAT_FILE = 0;</code>
     */
    const CHAT_FILE = 0;
    /**
     * Generated from protobuf enum <code>WHITEBOARD_IMAGE_FILE = 1;</code>
     */
    const WHITEBOARD_IMAGE_FILE = 1;
    /**
     * Generated from protobuf enum <code>WHITEBOARD_CONVERTED_FILE = 2;</code>
     */
    const WHITEBOARD_CONVERTED_FILE = 2;
    /**
     * Generated from protobuf enum <code>EXTERNAL_MEDIA_PLAYER_FILE = 3;</code>
     */
    const EXTERNAL_MEDIA_PLAYER_FILE = 3;
    /**
     * Generated from protobuf enum <code>VIRTUAL_BACKGROUND = 4;</code>
     */
    const VIRTUAL_BACKGROUND = 4;

    private static $valueToName = [
        self::CHAT_FILE => 'CHAT_FILE',
        self::WHITEBOARD_IMAGE_FILE => 'WHITEBOARD_IMAGE_FILE',
        self::WHITEBOARD_CONVERTED_FILE => 'WHITEBOARD_CONVERTED_FILE',
        self::EXTERNAL_MEDIA_PLAYER_FILE => 'EXTERNAL_MEDIA_PLAYER_FILE',
        self::VIRTUAL_BACKGROUND => 'VIRTUAL_BACKGROUND',
    ];

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

