Ydb.Coordination.ConsistencyMode */ class ConsistencyMode { /** * The default or current value * * Generated from protobuf enum CONSISTENCY_MODE_UNSET = 0; */ const CONSISTENCY_MODE_UNSET = 0; /** * Strict mode makes sure operations may only complete on current leader * * Generated from protobuf enum CONSISTENCY_MODE_STRICT = 1; */ const CONSISTENCY_MODE_STRICT = 1; /** * Relaxed mode allows operations to complete on stale masters * * Generated from protobuf enum CONSISTENCY_MODE_RELAXED = 2; */ const CONSISTENCY_MODE_RELAXED = 2; private static $valueToName = [ self::CONSISTENCY_MODE_UNSET => 'CONSISTENCY_MODE_UNSET', self::CONSISTENCY_MODE_STRICT => 'CONSISTENCY_MODE_STRICT', self::CONSISTENCY_MODE_RELAXED => 'CONSISTENCY_MODE_RELAXED', ]; 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); } }