<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: deviceapis/device/v1/deviceapis_device_video_v1.proto

namespace Deviceapis\Device\V1\VideoChannel;

use UnexpectedValueException;

/**
 * Профиль
 *
 * Protobuf type <code>deviceapis.device.v1.VideoChannel.ProfileType</code>
 */
class ProfileType
{
    /**
     * Значение не указано
     *
     * Generated from protobuf enum <code>PROFILE_TYPE_UNKNOWN = 0;</code>
     */
    const PROFILE_TYPE_UNKNOWN = 0;
    /**
     * Высокий
     *
     * Generated from protobuf enum <code>PROFILE_HIGH = 1;</code>
     */
    const PROFILE_HIGH = 1;
    /**
     * Основной
     *
     * Generated from protobuf enum <code>PROFILE_MAIN = 2;</code>
     */
    const PROFILE_MAIN = 2;
    /**
     * Базовый
     *
     * Generated from protobuf enum <code>PROFILE_BASE = 3;</code>
     */
    const PROFILE_BASE = 3;

    private static $valueToName = [
        self::PROFILE_TYPE_UNKNOWN => 'PROFILE_TYPE_UNKNOWN',
        self::PROFILE_HIGH => 'PROFILE_HIGH',
        self::PROFILE_MAIN => 'PROFILE_MAIN',
        self::PROFILE_BASE => 'PROFILE_BASE',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ProfileType::class, \Deviceapis\Device\V1\VideoChannel_ProfileType::class);

