common.Region
*/
class Region
{
/**
* EU868
*
* Generated from protobuf enum EU868 = 0;
*/
const EU868 = 0;
/**
* US915
*
* Generated from protobuf enum US915 = 2;
*/
const US915 = 2;
/**
* CN779
*
* Generated from protobuf enum CN779 = 3;
*/
const CN779 = 3;
/**
* EU433
*
* Generated from protobuf enum EU433 = 4;
*/
const EU433 = 4;
/**
* AU915
*
* Generated from protobuf enum AU915 = 5;
*/
const AU915 = 5;
/**
* CN470
*
* Generated from protobuf enum CN470 = 6;
*/
const CN470 = 6;
/**
* AS923
*
* Generated from protobuf enum AS923 = 7;
*/
const AS923 = 7;
/**
* AS923 with -1.80 MHz frequency offset
*
* Generated from protobuf enum AS923_2 = 12;
*/
const AS923_2 = 12;
/**
* AS923 with -6.60 MHz frequency offset
*
* Generated from protobuf enum AS923_3 = 13;
*/
const AS923_3 = 13;
/**
* (AS923 with -5.90 MHz frequency offset).
*
* Generated from protobuf enum AS923_4 = 14;
*/
const AS923_4 = 14;
/**
* KR920
*
* Generated from protobuf enum KR920 = 8;
*/
const KR920 = 8;
/**
* IN865
*
* Generated from protobuf enum IN865 = 9;
*/
const IN865 = 9;
/**
* RU864
*
* Generated from protobuf enum RU864 = 10;
*/
const RU864 = 10;
/**
* ISM2400 (LoRaWAN 2.4 GHz)
*
* Generated from protobuf enum ISM2400 = 11;
*/
const ISM2400 = 11;
private static $valueToName = [
self::EU868 => 'EU868',
self::US915 => 'US915',
self::CN779 => 'CN779',
self::EU433 => 'EU433',
self::AU915 => 'AU915',
self::CN470 => 'CN470',
self::AS923 => 'AS923',
self::AS923_2 => 'AS923_2',
self::AS923_3 => 'AS923_3',
self::AS923_4 => 'AS923_4',
self::KR920 => 'KR920',
self::IN865 => 'IN865',
self::RU864 => 'RU864',
self::ISM2400 => 'ISM2400',
];
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);
}
}