Value.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_value.proto
  4. namespace Ydb;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>Ydb.Value</code>
  10. */
  11. class Value extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Used for List, Tuple, Struct types
  15. *
  16. * Generated from protobuf field <code>repeated .Ydb.Value items = 12;</code>
  17. */
  18. private $items;
  19. /**
  20. * Used for Dict type
  21. *
  22. * Generated from protobuf field <code>repeated .Ydb.ValuePair pairs = 13;</code>
  23. */
  24. private $pairs;
  25. /**
  26. * Used for Variant type
  27. *
  28. * Generated from protobuf field <code>uint32 variant_index = 14;</code>
  29. */
  30. protected $variant_index = 0;
  31. /**
  32. * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
  33. */
  34. protected $high_128 = 0;
  35. protected $value;
  36. /**
  37. * Constructor.
  38. *
  39. * @param array $data {
  40. * Optional. Data for populating the Message object.
  41. *
  42. * @type bool $bool_value
  43. * @type int $int32_value
  44. * @type int $uint32_value
  45. * @type int|string $int64_value
  46. * @type int|string $uint64_value
  47. * @type float $float_value
  48. * @type float $double_value
  49. * @type string $bytes_value
  50. * @type string $text_value
  51. * @type int $null_flag_value
  52. * Set if current TValue is terminal Null
  53. * @type \Ydb\Value $nested_value
  54. * Represents nested TValue for Optional<Optional<T>>(Null), or Variant<T> types
  55. * @type int|string $low_128
  56. * @type array<\Ydb\Value>|\Google\Protobuf\Internal\RepeatedField $items
  57. * Used for List, Tuple, Struct types
  58. * @type array<\Ydb\ValuePair>|\Google\Protobuf\Internal\RepeatedField $pairs
  59. * Used for Dict type
  60. * @type int $variant_index
  61. * Used for Variant type
  62. * @type int|string $high_128
  63. * }
  64. */
  65. public function __construct($data = NULL) {
  66. \GPBMetadata\Protos\YdbValue::initOnce();
  67. parent::__construct($data);
  68. }
  69. /**
  70. * Generated from protobuf field <code>bool bool_value = 1;</code>
  71. * @return bool
  72. */
  73. public function getBoolValue()
  74. {
  75. return $this->readOneof(1);
  76. }
  77. public function hasBoolValue()
  78. {
  79. return $this->hasOneof(1);
  80. }
  81. /**
  82. * Generated from protobuf field <code>bool bool_value = 1;</code>
  83. * @param bool $var
  84. * @return $this
  85. */
  86. public function setBoolValue($var)
  87. {
  88. GPBUtil::checkBool($var);
  89. $this->writeOneof(1, $var);
  90. return $this;
  91. }
  92. /**
  93. * Generated from protobuf field <code>sfixed32 int32_value = 2;</code>
  94. * @return int
  95. */
  96. public function getInt32Value()
  97. {
  98. return $this->readOneof(2);
  99. }
  100. public function hasInt32Value()
  101. {
  102. return $this->hasOneof(2);
  103. }
  104. /**
  105. * Generated from protobuf field <code>sfixed32 int32_value = 2;</code>
  106. * @param int $var
  107. * @return $this
  108. */
  109. public function setInt32Value($var)
  110. {
  111. GPBUtil::checkInt32($var);
  112. $this->writeOneof(2, $var);
  113. return $this;
  114. }
  115. /**
  116. * Generated from protobuf field <code>fixed32 uint32_value = 3;</code>
  117. * @return int
  118. */
  119. public function getUint32Value()
  120. {
  121. return $this->readOneof(3);
  122. }
  123. public function hasUint32Value()
  124. {
  125. return $this->hasOneof(3);
  126. }
  127. /**
  128. * Generated from protobuf field <code>fixed32 uint32_value = 3;</code>
  129. * @param int $var
  130. * @return $this
  131. */
  132. public function setUint32Value($var)
  133. {
  134. GPBUtil::checkUint32($var);
  135. $this->writeOneof(3, $var);
  136. return $this;
  137. }
  138. /**
  139. * Generated from protobuf field <code>sfixed64 int64_value = 4;</code>
  140. * @return int|string
  141. */
  142. public function getInt64Value()
  143. {
  144. return $this->readOneof(4);
  145. }
  146. public function hasInt64Value()
  147. {
  148. return $this->hasOneof(4);
  149. }
  150. /**
  151. * Generated from protobuf field <code>sfixed64 int64_value = 4;</code>
  152. * @param int|string $var
  153. * @return $this
  154. */
  155. public function setInt64Value($var)
  156. {
  157. GPBUtil::checkInt64($var);
  158. $this->writeOneof(4, $var);
  159. return $this;
  160. }
  161. /**
  162. * Generated from protobuf field <code>fixed64 uint64_value = 5;</code>
  163. * @return int|string
  164. */
  165. public function getUint64Value()
  166. {
  167. return $this->readOneof(5);
  168. }
  169. public function hasUint64Value()
  170. {
  171. return $this->hasOneof(5);
  172. }
  173. /**
  174. * Generated from protobuf field <code>fixed64 uint64_value = 5;</code>
  175. * @param int|string $var
  176. * @return $this
  177. */
  178. public function setUint64Value($var)
  179. {
  180. GPBUtil::checkUint64($var);
  181. $this->writeOneof(5, $var);
  182. return $this;
  183. }
  184. /**
  185. * Generated from protobuf field <code>float float_value = 6;</code>
  186. * @return float
  187. */
  188. public function getFloatValue()
  189. {
  190. return $this->readOneof(6);
  191. }
  192. public function hasFloatValue()
  193. {
  194. return $this->hasOneof(6);
  195. }
  196. /**
  197. * Generated from protobuf field <code>float float_value = 6;</code>
  198. * @param float $var
  199. * @return $this
  200. */
  201. public function setFloatValue($var)
  202. {
  203. GPBUtil::checkFloat($var);
  204. $this->writeOneof(6, $var);
  205. return $this;
  206. }
  207. /**
  208. * Generated from protobuf field <code>double double_value = 7;</code>
  209. * @return float
  210. */
  211. public function getDoubleValue()
  212. {
  213. return $this->readOneof(7);
  214. }
  215. public function hasDoubleValue()
  216. {
  217. return $this->hasOneof(7);
  218. }
  219. /**
  220. * Generated from protobuf field <code>double double_value = 7;</code>
  221. * @param float $var
  222. * @return $this
  223. */
  224. public function setDoubleValue($var)
  225. {
  226. GPBUtil::checkDouble($var);
  227. $this->writeOneof(7, $var);
  228. return $this;
  229. }
  230. /**
  231. * Generated from protobuf field <code>bytes bytes_value = 8;</code>
  232. * @return string
  233. */
  234. public function getBytesValue()
  235. {
  236. return $this->readOneof(8);
  237. }
  238. public function hasBytesValue()
  239. {
  240. return $this->hasOneof(8);
  241. }
  242. /**
  243. * Generated from protobuf field <code>bytes bytes_value = 8;</code>
  244. * @param string $var
  245. * @return $this
  246. */
  247. public function setBytesValue($var)
  248. {
  249. GPBUtil::checkString($var, False);
  250. $this->writeOneof(8, $var);
  251. return $this;
  252. }
  253. /**
  254. * Generated from protobuf field <code>string text_value = 9;</code>
  255. * @return string
  256. */
  257. public function getTextValue()
  258. {
  259. return $this->readOneof(9);
  260. }
  261. public function hasTextValue()
  262. {
  263. return $this->hasOneof(9);
  264. }
  265. /**
  266. * Generated from protobuf field <code>string text_value = 9;</code>
  267. * @param string $var
  268. * @return $this
  269. */
  270. public function setTextValue($var)
  271. {
  272. GPBUtil::checkString($var, True);
  273. $this->writeOneof(9, $var);
  274. return $this;
  275. }
  276. /**
  277. * Set if current TValue is terminal Null
  278. *
  279. * Generated from protobuf field <code>.google.protobuf.NullValue null_flag_value = 10;</code>
  280. * @return int
  281. */
  282. public function getNullFlagValue()
  283. {
  284. return $this->readOneof(10);
  285. }
  286. public function hasNullFlagValue()
  287. {
  288. return $this->hasOneof(10);
  289. }
  290. /**
  291. * Set if current TValue is terminal Null
  292. *
  293. * Generated from protobuf field <code>.google.protobuf.NullValue null_flag_value = 10;</code>
  294. * @param int $var
  295. * @return $this
  296. */
  297. public function setNullFlagValue($var)
  298. {
  299. GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
  300. $this->writeOneof(10, $var);
  301. return $this;
  302. }
  303. /**
  304. * Represents nested TValue for Optional<Optional<T>>(Null), or Variant<T> types
  305. *
  306. * Generated from protobuf field <code>.Ydb.Value nested_value = 11;</code>
  307. * @return \Ydb\Value|null
  308. */
  309. public function getNestedValue()
  310. {
  311. return $this->readOneof(11);
  312. }
  313. public function hasNestedValue()
  314. {
  315. return $this->hasOneof(11);
  316. }
  317. /**
  318. * Represents nested TValue for Optional<Optional<T>>(Null), or Variant<T> types
  319. *
  320. * Generated from protobuf field <code>.Ydb.Value nested_value = 11;</code>
  321. * @param \Ydb\Value $var
  322. * @return $this
  323. */
  324. public function setNestedValue($var)
  325. {
  326. GPBUtil::checkMessage($var, \Ydb\Value::class);
  327. $this->writeOneof(11, $var);
  328. return $this;
  329. }
  330. /**
  331. * Generated from protobuf field <code>fixed64 low_128 = 15;</code>
  332. * @return int|string
  333. */
  334. public function getLow128()
  335. {
  336. return $this->readOneof(15);
  337. }
  338. public function hasLow128()
  339. {
  340. return $this->hasOneof(15);
  341. }
  342. /**
  343. * Generated from protobuf field <code>fixed64 low_128 = 15;</code>
  344. * @param int|string $var
  345. * @return $this
  346. */
  347. public function setLow128($var)
  348. {
  349. GPBUtil::checkUint64($var);
  350. $this->writeOneof(15, $var);
  351. return $this;
  352. }
  353. /**
  354. * Used for List, Tuple, Struct types
  355. *
  356. * Generated from protobuf field <code>repeated .Ydb.Value items = 12;</code>
  357. * @return \Google\Protobuf\Internal\RepeatedField
  358. */
  359. public function getItems()
  360. {
  361. return $this->items;
  362. }
  363. /**
  364. * Used for List, Tuple, Struct types
  365. *
  366. * Generated from protobuf field <code>repeated .Ydb.Value items = 12;</code>
  367. * @param array<\Ydb\Value>|\Google\Protobuf\Internal\RepeatedField $var
  368. * @return $this
  369. */
  370. public function setItems($var)
  371. {
  372. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Value::class);
  373. $this->items = $arr;
  374. return $this;
  375. }
  376. /**
  377. * Used for Dict type
  378. *
  379. * Generated from protobuf field <code>repeated .Ydb.ValuePair pairs = 13;</code>
  380. * @return \Google\Protobuf\Internal\RepeatedField
  381. */
  382. public function getPairs()
  383. {
  384. return $this->pairs;
  385. }
  386. /**
  387. * Used for Dict type
  388. *
  389. * Generated from protobuf field <code>repeated .Ydb.ValuePair pairs = 13;</code>
  390. * @param array<\Ydb\ValuePair>|\Google\Protobuf\Internal\RepeatedField $var
  391. * @return $this
  392. */
  393. public function setPairs($var)
  394. {
  395. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\ValuePair::class);
  396. $this->pairs = $arr;
  397. return $this;
  398. }
  399. /**
  400. * Used for Variant type
  401. *
  402. * Generated from protobuf field <code>uint32 variant_index = 14;</code>
  403. * @return int
  404. */
  405. public function getVariantIndex()
  406. {
  407. return $this->variant_index;
  408. }
  409. /**
  410. * Used for Variant type
  411. *
  412. * Generated from protobuf field <code>uint32 variant_index = 14;</code>
  413. * @param int $var
  414. * @return $this
  415. */
  416. public function setVariantIndex($var)
  417. {
  418. GPBUtil::checkUint32($var);
  419. $this->variant_index = $var;
  420. return $this;
  421. }
  422. /**
  423. * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
  424. * @return int|string
  425. */
  426. public function getHigh128()
  427. {
  428. return $this->high_128;
  429. }
  430. /**
  431. * Generated from protobuf field <code>fixed64 high_128 = 16;</code>
  432. * @param int|string $var
  433. * @return $this
  434. */
  435. public function setHigh128($var)
  436. {
  437. GPBUtil::checkUint64($var);
  438. $this->high_128 = $var;
  439. return $this;
  440. }
  441. /**
  442. * @return string
  443. */
  444. public function getValue()
  445. {
  446. return $this->whichOneof("value");
  447. }
  448. }