2024-06-25 12:27:28 +01:00

69 lines
1.8 KiB
PHP
Vendored

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: common/common.proto
namespace Chirpstack\Common;
use UnexpectedValueException;
/**
* Protobuf type <code>common.MacVersion</code>
*/
class MacVersion
{
/**
* Generated from protobuf enum <code>LORAWAN_1_0_0 = 0;</code>
*/
const LORAWAN_1_0_0 = 0;
/**
* Generated from protobuf enum <code>LORAWAN_1_0_1 = 1;</code>
*/
const LORAWAN_1_0_1 = 1;
/**
* Generated from protobuf enum <code>LORAWAN_1_0_2 = 2;</code>
*/
const LORAWAN_1_0_2 = 2;
/**
* Generated from protobuf enum <code>LORAWAN_1_0_3 = 3;</code>
*/
const LORAWAN_1_0_3 = 3;
/**
* Generated from protobuf enum <code>LORAWAN_1_0_4 = 4;</code>
*/
const LORAWAN_1_0_4 = 4;
/**
* Generated from protobuf enum <code>LORAWAN_1_1_0 = 5;</code>
*/
const LORAWAN_1_1_0 = 5;
private static $valueToName = [
self::LORAWAN_1_0_0 => 'LORAWAN_1_0_0',
self::LORAWAN_1_0_1 => 'LORAWAN_1_0_1',
self::LORAWAN_1_0_2 => 'LORAWAN_1_0_2',
self::LORAWAN_1_0_3 => 'LORAWAN_1_0_3',
self::LORAWAN_1_0_4 => 'LORAWAN_1_0_4',
self::LORAWAN_1_1_0 => 'LORAWAN_1_1_0',
];
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);
}
}