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

namespace Mynaparrot\PlugnmeetProto;

use UnexpectedValueException;

/**
 * Protobuf type <code>plugnmeet.RecordingTasks</code>
 */
class RecordingTasks
{
    /**
     * Generated from protobuf enum <code>START_RECORDING = 0;</code>
     */
    const START_RECORDING = 0;
    /**
     * Generated from protobuf enum <code>STOP_RECORDING = 1;</code>
     */
    const STOP_RECORDING = 1;
    /**
     * Generated from protobuf enum <code>START_RTMP = 2;</code>
     */
    const START_RTMP = 2;
    /**
     * Generated from protobuf enum <code>STOP_RTMP = 3;</code>
     */
    const STOP_RTMP = 3;
    /**
     * Generated from protobuf enum <code>END_RECORDING = 4;</code>
     */
    const END_RECORDING = 4;
    /**
     * Generated from protobuf enum <code>END_RTMP = 5;</code>
     */
    const END_RTMP = 5;
    /**
     * Generated from protobuf enum <code>RECORDING_PROCEEDED = 6;</code>
     */
    const RECORDING_PROCEEDED = 6;
    /**
     * Generated from protobuf enum <code>STOP = 7;</code>
     */
    const STOP = 7;
    /**
     * Generated from protobuf enum <code>RECORDING_TRANSCODING_FINISHED = 8;</code>
     */
    const RECORDING_TRANSCODING_FINISHED = 8;

    private static $valueToName = [
        self::START_RECORDING => 'START_RECORDING',
        self::STOP_RECORDING => 'STOP_RECORDING',
        self::START_RTMP => 'START_RTMP',
        self::STOP_RTMP => 'STOP_RTMP',
        self::END_RECORDING => 'END_RECORDING',
        self::END_RTMP => 'END_RTMP',
        self::RECORDING_PROCEEDED => 'RECORDING_PROCEEDED',
        self::STOP => 'STOP',
        self::RECORDING_TRANSCODING_FINISHED => 'RECORDING_TRANSCODING_FINISHED',
    ];

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

