Ydb.Value */ class Value extends \Google\Protobuf\Internal\Message { /** * Used for List, Tuple, Struct types * * Generated from protobuf field repeated .Ydb.Value items = 12; */ private $items; /** * Used for Dict type * * Generated from protobuf field repeated .Ydb.ValuePair pairs = 13; */ private $pairs; /** * Used for Variant type * * Generated from protobuf field uint32 variant_index = 14; */ protected $variant_index = 0; /** * Generated from protobuf field fixed64 high_128 = 16; */ protected $high_128 = 0; protected $value; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type bool $bool_value * @type int $int32_value * @type int $uint32_value * @type int|string $int64_value * @type int|string $uint64_value * @type float $float_value * @type float $double_value * @type string $bytes_value * @type string $text_value * @type int $null_flag_value * Set if current TValue is terminal Null * @type \Ydb\Value $nested_value * Represents nested TValue for Optional>(Null), or Variant types * @type int|string $low_128 * @type array<\Ydb\Value>|\Google\Protobuf\Internal\RepeatedField $items * Used for List, Tuple, Struct types * @type array<\Ydb\ValuePair>|\Google\Protobuf\Internal\RepeatedField $pairs * Used for Dict type * @type int $variant_index * Used for Variant type * @type int|string $high_128 * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbValue::initOnce(); parent::__construct($data); } /** * Generated from protobuf field bool bool_value = 1; * @return bool */ public function getBoolValue() { return $this->readOneof(1); } public function hasBoolValue() { return $this->hasOneof(1); } /** * Generated from protobuf field bool bool_value = 1; * @param bool $var * @return $this */ public function setBoolValue($var) { GPBUtil::checkBool($var); $this->writeOneof(1, $var); return $this; } /** * Generated from protobuf field sfixed32 int32_value = 2; * @return int */ public function getInt32Value() { return $this->readOneof(2); } public function hasInt32Value() { return $this->hasOneof(2); } /** * Generated from protobuf field sfixed32 int32_value = 2; * @param int $var * @return $this */ public function setInt32Value($var) { GPBUtil::checkInt32($var); $this->writeOneof(2, $var); return $this; } /** * Generated from protobuf field fixed32 uint32_value = 3; * @return int */ public function getUint32Value() { return $this->readOneof(3); } public function hasUint32Value() { return $this->hasOneof(3); } /** * Generated from protobuf field fixed32 uint32_value = 3; * @param int $var * @return $this */ public function setUint32Value($var) { GPBUtil::checkUint32($var); $this->writeOneof(3, $var); return $this; } /** * Generated from protobuf field sfixed64 int64_value = 4; * @return int|string */ public function getInt64Value() { return $this->readOneof(4); } public function hasInt64Value() { return $this->hasOneof(4); } /** * Generated from protobuf field sfixed64 int64_value = 4; * @param int|string $var * @return $this */ public function setInt64Value($var) { GPBUtil::checkInt64($var); $this->writeOneof(4, $var); return $this; } /** * Generated from protobuf field fixed64 uint64_value = 5; * @return int|string */ public function getUint64Value() { return $this->readOneof(5); } public function hasUint64Value() { return $this->hasOneof(5); } /** * Generated from protobuf field fixed64 uint64_value = 5; * @param int|string $var * @return $this */ public function setUint64Value($var) { GPBUtil::checkUint64($var); $this->writeOneof(5, $var); return $this; } /** * Generated from protobuf field float float_value = 6; * @return float */ public function getFloatValue() { return $this->readOneof(6); } public function hasFloatValue() { return $this->hasOneof(6); } /** * Generated from protobuf field float float_value = 6; * @param float $var * @return $this */ public function setFloatValue($var) { GPBUtil::checkFloat($var); $this->writeOneof(6, $var); return $this; } /** * Generated from protobuf field double double_value = 7; * @return float */ public function getDoubleValue() { return $this->readOneof(7); } public function hasDoubleValue() { return $this->hasOneof(7); } /** * Generated from protobuf field double double_value = 7; * @param float $var * @return $this */ public function setDoubleValue($var) { GPBUtil::checkDouble($var); $this->writeOneof(7, $var); return $this; } /** * Generated from protobuf field bytes bytes_value = 8; * @return string */ public function getBytesValue() { return $this->readOneof(8); } public function hasBytesValue() { return $this->hasOneof(8); } /** * Generated from protobuf field bytes bytes_value = 8; * @param string $var * @return $this */ public function setBytesValue($var) { GPBUtil::checkString($var, False); $this->writeOneof(8, $var); return $this; } /** * Generated from protobuf field string text_value = 9; * @return string */ public function getTextValue() { return $this->readOneof(9); } public function hasTextValue() { return $this->hasOneof(9); } /** * Generated from protobuf field string text_value = 9; * @param string $var * @return $this */ public function setTextValue($var) { GPBUtil::checkString($var, True); $this->writeOneof(9, $var); return $this; } /** * Set if current TValue is terminal Null * * Generated from protobuf field .google.protobuf.NullValue null_flag_value = 10; * @return int */ public function getNullFlagValue() { return $this->readOneof(10); } public function hasNullFlagValue() { return $this->hasOneof(10); } /** * Set if current TValue is terminal Null * * Generated from protobuf field .google.protobuf.NullValue null_flag_value = 10; * @param int $var * @return $this */ public function setNullFlagValue($var) { GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); $this->writeOneof(10, $var); return $this; } /** * Represents nested TValue for Optional>(Null), or Variant types * * Generated from protobuf field .Ydb.Value nested_value = 11; * @return \Ydb\Value|null */ public function getNestedValue() { return $this->readOneof(11); } public function hasNestedValue() { return $this->hasOneof(11); } /** * Represents nested TValue for Optional>(Null), or Variant types * * Generated from protobuf field .Ydb.Value nested_value = 11; * @param \Ydb\Value $var * @return $this */ public function setNestedValue($var) { GPBUtil::checkMessage($var, \Ydb\Value::class); $this->writeOneof(11, $var); return $this; } /** * Generated from protobuf field fixed64 low_128 = 15; * @return int|string */ public function getLow128() { return $this->readOneof(15); } public function hasLow128() { return $this->hasOneof(15); } /** * Generated from protobuf field fixed64 low_128 = 15; * @param int|string $var * @return $this */ public function setLow128($var) { GPBUtil::checkUint64($var); $this->writeOneof(15, $var); return $this; } /** * Used for List, Tuple, Struct types * * Generated from protobuf field repeated .Ydb.Value items = 12; * @return \Google\Protobuf\Internal\RepeatedField */ public function getItems() { return $this->items; } /** * Used for List, Tuple, Struct types * * Generated from protobuf field repeated .Ydb.Value items = 12; * @param array<\Ydb\Value>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setItems($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Value::class); $this->items = $arr; return $this; } /** * Used for Dict type * * Generated from protobuf field repeated .Ydb.ValuePair pairs = 13; * @return \Google\Protobuf\Internal\RepeatedField */ public function getPairs() { return $this->pairs; } /** * Used for Dict type * * Generated from protobuf field repeated .Ydb.ValuePair pairs = 13; * @param array<\Ydb\ValuePair>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setPairs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\ValuePair::class); $this->pairs = $arr; return $this; } /** * Used for Variant type * * Generated from protobuf field uint32 variant_index = 14; * @return int */ public function getVariantIndex() { return $this->variant_index; } /** * Used for Variant type * * Generated from protobuf field uint32 variant_index = 14; * @param int $var * @return $this */ public function setVariantIndex($var) { GPBUtil::checkUint32($var); $this->variant_index = $var; return $this; } /** * Generated from protobuf field fixed64 high_128 = 16; * @return int|string */ public function getHigh128() { return $this->high_128; } /** * Generated from protobuf field fixed64 high_128 = 16; * @param int|string $var * @return $this */ public function setHigh128($var) { GPBUtil::checkUint64($var); $this->high_128 = $var; return $this; } /** * @return string */ public function getValue() { return $this->whichOneof("value"); } }