Ydb.Type.PrimitiveTypeId
*/
class PrimitiveTypeId
{
/**
* Generated from protobuf enum PRIMITIVE_TYPE_ID_UNSPECIFIED = 0;
*/
const PRIMITIVE_TYPE_ID_UNSPECIFIED = 0;
/**
* Generated from protobuf enum BOOL = 6;
*/
const BOOL = 6;
/**
* Generated from protobuf enum INT8 = 7;
*/
const INT8 = 7;
/**
* Generated from protobuf enum UINT8 = 5;
*/
const UINT8 = 5;
/**
* Generated from protobuf enum INT16 = 8;
*/
const INT16 = 8;
/**
* Generated from protobuf enum UINT16 = 9;
*/
const UINT16 = 9;
/**
* Generated from protobuf enum INT32 = 1;
*/
const INT32 = 1;
/**
* Generated from protobuf enum UINT32 = 2;
*/
const UINT32 = 2;
/**
* Generated from protobuf enum INT64 = 3;
*/
const INT64 = 3;
/**
* Generated from protobuf enum UINT64 = 4;
*/
const UINT64 = 4;
/**
* Generated from protobuf enum FLOAT = 33;
*/
const FLOAT = 33;
/**
* Generated from protobuf enum DOUBLE = 32;
*/
const DOUBLE = 32;
/**
* Generated from protobuf enum DATE = 48;
*/
const DATE = 48;
/**
* Generated from protobuf enum DATETIME = 49;
*/
const DATETIME = 49;
/**
* Generated from protobuf enum TIMESTAMP = 50;
*/
const TIMESTAMP = 50;
/**
* Generated from protobuf enum INTERVAL = 51;
*/
const INTERVAL = 51;
/**
* Generated from protobuf enum TZ_DATE = 52;
*/
const TZ_DATE = 52;
/**
* Generated from protobuf enum TZ_DATETIME = 53;
*/
const TZ_DATETIME = 53;
/**
* Generated from protobuf enum TZ_TIMESTAMP = 54;
*/
const TZ_TIMESTAMP = 54;
/**
* Generated from protobuf enum STRING = 4097;
*/
const STRING = 4097;
/**
* Generated from protobuf enum UTF8 = 4608;
*/
const UTF8 = 4608;
/**
* Generated from protobuf enum YSON = 4609;
*/
const YSON = 4609;
/**
* Generated from protobuf enum JSON = 4610;
*/
const JSON = 4610;
/**
* Generated from protobuf enum UUID = 4611;
*/
const UUID = 4611;
/**
* Generated from protobuf enum JSON_DOCUMENT = 4612;
*/
const JSON_DOCUMENT = 4612;
/**
* Generated from protobuf enum DYNUMBER = 4866;
*/
const DYNUMBER = 4866;
private static $valueToName = [
self::PRIMITIVE_TYPE_ID_UNSPECIFIED => 'PRIMITIVE_TYPE_ID_UNSPECIFIED',
self::BOOL => 'BOOL',
self::INT8 => 'INT8',
self::UINT8 => 'UINT8',
self::INT16 => 'INT16',
self::UINT16 => 'UINT16',
self::INT32 => 'INT32',
self::UINT32 => 'UINT32',
self::INT64 => 'INT64',
self::UINT64 => 'UINT64',
self::FLOAT => 'FLOAT',
self::DOUBLE => 'DOUBLE',
self::DATE => 'DATE',
self::DATETIME => 'DATETIME',
self::TIMESTAMP => 'TIMESTAMP',
self::INTERVAL => 'INTERVAL',
self::TZ_DATE => 'TZ_DATE',
self::TZ_DATETIME => 'TZ_DATETIME',
self::TZ_TIMESTAMP => 'TZ_TIMESTAMP',
self::STRING => 'STRING',
self::UTF8 => 'UTF8',
self::YSON => 'YSON',
self::JSON => 'JSON',
self::UUID => 'UUID',
self::JSON_DOCUMENT => 'JSON_DOCUMENT',
self::DYNUMBER => 'DYNUMBER',
];
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(PrimitiveTypeId::class, \Ydb\Type_PrimitiveTypeId::class);