123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_value.proto
- namespace Ydb;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Value</code>
- */
- class Value extends \Google\Protobuf\Internal\Message
- {
- /**
- * Used for List, Tuple, Struct types
- *
- * Generated from protobuf field <code>repeated .Ydb.Value items = 12;</code>
- */
- private $items;
- /**
- * Used for Dict type
- *
- * Generated from protobuf field <code>repeated .Ydb.ValuePair pairs = 13;</code>
- */
- private $pairs;
- /**
- * Used for Variant type
- *
- * Generated from protobuf field <code>uint32 variant_index = 14;</code>
- */
- protected $variant_index = 0;
- /**
- * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
- */
- 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<Optional<T>>(Null), or Variant<T> 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 <code>bool bool_value = 1;</code>
- * @return bool
- */
- public function getBoolValue()
- {
- return $this->readOneof(1);
- }
- public function hasBoolValue()
- {
- return $this->hasOneof(1);
- }
- /**
- * Generated from protobuf field <code>bool bool_value = 1;</code>
- * @param bool $var
- * @return $this
- */
- public function setBoolValue($var)
- {
- GPBUtil::checkBool($var);
- $this->writeOneof(1, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>sfixed32 int32_value = 2;</code>
- * @return int
- */
- public function getInt32Value()
- {
- return $this->readOneof(2);
- }
- public function hasInt32Value()
- {
- return $this->hasOneof(2);
- }
- /**
- * Generated from protobuf field <code>sfixed32 int32_value = 2;</code>
- * @param int $var
- * @return $this
- */
- public function setInt32Value($var)
- {
- GPBUtil::checkInt32($var);
- $this->writeOneof(2, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>fixed32 uint32_value = 3;</code>
- * @return int
- */
- public function getUint32Value()
- {
- return $this->readOneof(3);
- }
- public function hasUint32Value()
- {
- return $this->hasOneof(3);
- }
- /**
- * Generated from protobuf field <code>fixed32 uint32_value = 3;</code>
- * @param int $var
- * @return $this
- */
- public function setUint32Value($var)
- {
- GPBUtil::checkUint32($var);
- $this->writeOneof(3, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>sfixed64 int64_value = 4;</code>
- * @return int|string
- */
- public function getInt64Value()
- {
- return $this->readOneof(4);
- }
- public function hasInt64Value()
- {
- return $this->hasOneof(4);
- }
- /**
- * Generated from protobuf field <code>sfixed64 int64_value = 4;</code>
- * @param int|string $var
- * @return $this
- */
- public function setInt64Value($var)
- {
- GPBUtil::checkInt64($var);
- $this->writeOneof(4, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>fixed64 uint64_value = 5;</code>
- * @return int|string
- */
- public function getUint64Value()
- {
- return $this->readOneof(5);
- }
- public function hasUint64Value()
- {
- return $this->hasOneof(5);
- }
- /**
- * Generated from protobuf field <code>fixed64 uint64_value = 5;</code>
- * @param int|string $var
- * @return $this
- */
- public function setUint64Value($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(5, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>float float_value = 6;</code>
- * @return float
- */
- public function getFloatValue()
- {
- return $this->readOneof(6);
- }
- public function hasFloatValue()
- {
- return $this->hasOneof(6);
- }
- /**
- * Generated from protobuf field <code>float float_value = 6;</code>
- * @param float $var
- * @return $this
- */
- public function setFloatValue($var)
- {
- GPBUtil::checkFloat($var);
- $this->writeOneof(6, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>double double_value = 7;</code>
- * @return float
- */
- public function getDoubleValue()
- {
- return $this->readOneof(7);
- }
- public function hasDoubleValue()
- {
- return $this->hasOneof(7);
- }
- /**
- * Generated from protobuf field <code>double double_value = 7;</code>
- * @param float $var
- * @return $this
- */
- public function setDoubleValue($var)
- {
- GPBUtil::checkDouble($var);
- $this->writeOneof(7, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>bytes bytes_value = 8;</code>
- * @return string
- */
- public function getBytesValue()
- {
- return $this->readOneof(8);
- }
- public function hasBytesValue()
- {
- return $this->hasOneof(8);
- }
- /**
- * Generated from protobuf field <code>bytes bytes_value = 8;</code>
- * @param string $var
- * @return $this
- */
- public function setBytesValue($var)
- {
- GPBUtil::checkString($var, False);
- $this->writeOneof(8, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>string text_value = 9;</code>
- * @return string
- */
- public function getTextValue()
- {
- return $this->readOneof(9);
- }
- public function hasTextValue()
- {
- return $this->hasOneof(9);
- }
- /**
- * Generated from protobuf field <code>string text_value = 9;</code>
- * @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 <code>.google.protobuf.NullValue null_flag_value = 10;</code>
- * @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 <code>.google.protobuf.NullValue null_flag_value = 10;</code>
- * @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<Optional<T>>(Null), or Variant<T> types
- *
- * Generated from protobuf field <code>.Ydb.Value nested_value = 11;</code>
- * @return \Ydb\Value|null
- */
- public function getNestedValue()
- {
- return $this->readOneof(11);
- }
- public function hasNestedValue()
- {
- return $this->hasOneof(11);
- }
- /**
- * Represents nested TValue for Optional<Optional<T>>(Null), or Variant<T> types
- *
- * Generated from protobuf field <code>.Ydb.Value nested_value = 11;</code>
- * @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 <code>fixed64 low_128 = 15;</code>
- * @return int|string
- */
- public function getLow128()
- {
- return $this->readOneof(15);
- }
- public function hasLow128()
- {
- return $this->hasOneof(15);
- }
- /**
- * Generated from protobuf field <code>fixed64 low_128 = 15;</code>
- * @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 <code>repeated .Ydb.Value items = 12;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getItems()
- {
- return $this->items;
- }
- /**
- * Used for List, Tuple, Struct types
- *
- * Generated from protobuf field <code>repeated .Ydb.Value items = 12;</code>
- * @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 <code>repeated .Ydb.ValuePair pairs = 13;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPairs()
- {
- return $this->pairs;
- }
- /**
- * Used for Dict type
- *
- * Generated from protobuf field <code>repeated .Ydb.ValuePair pairs = 13;</code>
- * @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 <code>uint32 variant_index = 14;</code>
- * @return int
- */
- public function getVariantIndex()
- {
- return $this->variant_index;
- }
- /**
- * Used for Variant type
- *
- * Generated from protobuf field <code>uint32 variant_index = 14;</code>
- * @param int $var
- * @return $this
- */
- public function setVariantIndex($var)
- {
- GPBUtil::checkUint32($var);
- $this->variant_index = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
- * @return int|string
- */
- public function getHigh128()
- {
- return $this->high_128;
- }
- /**
- * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
- * @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");
- }
- }
|