Ydb.Table.IndexBuildState.State
*/
class State
{
/**
* Generated from protobuf enum STATE_UNSPECIFIED = 0;
*/
const STATE_UNSPECIFIED = 0;
/**
* Generated from protobuf enum STATE_PREPARING = 1;
*/
const STATE_PREPARING = 1;
/**
* Generated from protobuf enum STATE_TRANSFERING_DATA = 2;
*/
const STATE_TRANSFERING_DATA = 2;
/**
* Generated from protobuf enum STATE_APPLYING = 3;
*/
const STATE_APPLYING = 3;
/**
* Generated from protobuf enum STATE_DONE = 4;
*/
const STATE_DONE = 4;
/**
* Generated from protobuf enum STATE_CANCELLATION = 5;
*/
const STATE_CANCELLATION = 5;
/**
* Generated from protobuf enum STATE_CANCELLED = 6;
*/
const STATE_CANCELLED = 6;
/**
* Generated from protobuf enum STATE_REJECTION = 7;
*/
const STATE_REJECTION = 7;
/**
* Generated from protobuf enum STATE_REJECTED = 8;
*/
const STATE_REJECTED = 8;
private static $valueToName = [
self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
self::STATE_PREPARING => 'STATE_PREPARING',
self::STATE_TRANSFERING_DATA => 'STATE_TRANSFERING_DATA',
self::STATE_APPLYING => 'STATE_APPLYING',
self::STATE_DONE => 'STATE_DONE',
self::STATE_CANCELLATION => 'STATE_CANCELLATION',
self::STATE_CANCELLED => 'STATE_CANCELLED',
self::STATE_REJECTION => 'STATE_REJECTION',
self::STATE_REJECTED => 'STATE_REJECTED',
];
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(State::class, \Ydb\Table\IndexBuildState_State::class);