chirpstack/api/php/generated/Chirpstack/Api/InfluxDbPrecision.php
2024-06-25 12:27:28 +01:00

69 lines
1.6 KiB
PHP
Vendored

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api/application.proto
namespace Chirpstack\Api;
use UnexpectedValueException;
/**
* Protobuf type <code>api.InfluxDbPrecision</code>
*/
class InfluxDbPrecision
{
/**
* Generated from protobuf enum <code>NS = 0;</code>
*/
const NS = 0;
/**
* Generated from protobuf enum <code>U = 1;</code>
*/
const U = 1;
/**
* Generated from protobuf enum <code>MS = 2;</code>
*/
const MS = 2;
/**
* Generated from protobuf enum <code>S = 3;</code>
*/
const S = 3;
/**
* Generated from protobuf enum <code>M = 4;</code>
*/
const M = 4;
/**
* Generated from protobuf enum <code>H = 5;</code>
*/
const H = 5;
private static $valueToName = [
self::NS => 'NS',
self::U => 'U',
self::MS => 'MS',
self::S => 'S',
self::M => 'M',
self::H => 'H',
];
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);
}
}