Type.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  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.Type</code>
  10. */
  11. class Type extends \Google\Protobuf\Internal\Message
  12. {
  13. protected $type;
  14. /**
  15. * Constructor.
  16. *
  17. * @param array $data {
  18. * Optional. Data for populating the Message object.
  19. *
  20. * @type int $type_id
  21. * Data types
  22. * @type \Ydb\DecimalType $decimal_type
  23. * @type \Ydb\OptionalType $optional_type
  24. * Container types
  25. * @type \Ydb\ListType $list_type
  26. * @type \Ydb\TupleType $tuple_type
  27. * @type \Ydb\StructType $struct_type
  28. * @type \Ydb\DictType $dict_type
  29. * @type \Ydb\VariantType $variant_type
  30. * @type \Ydb\TaggedType $tagged_type
  31. * @type int $void_type
  32. * Special types
  33. * @type int $null_type
  34. * @type int $empty_list_type
  35. * @type int $empty_dict_type
  36. * @type \Ydb\PgType $pg_type
  37. * }
  38. */
  39. public function __construct($data = NULL) {
  40. \GPBMetadata\Protos\YdbValue::initOnce();
  41. parent::__construct($data);
  42. }
  43. /**
  44. * Data types
  45. *
  46. * Generated from protobuf field <code>.Ydb.Type.PrimitiveTypeId type_id = 1;</code>
  47. * @return int
  48. */
  49. public function getTypeId()
  50. {
  51. return $this->readOneof(1);
  52. }
  53. public function hasTypeId()
  54. {
  55. return $this->hasOneof(1);
  56. }
  57. /**
  58. * Data types
  59. *
  60. * Generated from protobuf field <code>.Ydb.Type.PrimitiveTypeId type_id = 1;</code>
  61. * @param int $var
  62. * @return $this
  63. */
  64. public function setTypeId($var)
  65. {
  66. GPBUtil::checkEnum($var, \Ydb\Type\PrimitiveTypeId::class);
  67. $this->writeOneof(1, $var);
  68. return $this;
  69. }
  70. /**
  71. * Generated from protobuf field <code>.Ydb.DecimalType decimal_type = 2;</code>
  72. * @return \Ydb\DecimalType|null
  73. */
  74. public function getDecimalType()
  75. {
  76. return $this->readOneof(2);
  77. }
  78. public function hasDecimalType()
  79. {
  80. return $this->hasOneof(2);
  81. }
  82. /**
  83. * Generated from protobuf field <code>.Ydb.DecimalType decimal_type = 2;</code>
  84. * @param \Ydb\DecimalType $var
  85. * @return $this
  86. */
  87. public function setDecimalType($var)
  88. {
  89. GPBUtil::checkMessage($var, \Ydb\DecimalType::class);
  90. $this->writeOneof(2, $var);
  91. return $this;
  92. }
  93. /**
  94. * Container types
  95. *
  96. * Generated from protobuf field <code>.Ydb.OptionalType optional_type = 101;</code>
  97. * @return \Ydb\OptionalType|null
  98. */
  99. public function getOptionalType()
  100. {
  101. return $this->readOneof(101);
  102. }
  103. public function hasOptionalType()
  104. {
  105. return $this->hasOneof(101);
  106. }
  107. /**
  108. * Container types
  109. *
  110. * Generated from protobuf field <code>.Ydb.OptionalType optional_type = 101;</code>
  111. * @param \Ydb\OptionalType $var
  112. * @return $this
  113. */
  114. public function setOptionalType($var)
  115. {
  116. GPBUtil::checkMessage($var, \Ydb\OptionalType::class);
  117. $this->writeOneof(101, $var);
  118. return $this;
  119. }
  120. /**
  121. * Generated from protobuf field <code>.Ydb.ListType list_type = 102;</code>
  122. * @return \Ydb\ListType|null
  123. */
  124. public function getListType()
  125. {
  126. return $this->readOneof(102);
  127. }
  128. public function hasListType()
  129. {
  130. return $this->hasOneof(102);
  131. }
  132. /**
  133. * Generated from protobuf field <code>.Ydb.ListType list_type = 102;</code>
  134. * @param \Ydb\ListType $var
  135. * @return $this
  136. */
  137. public function setListType($var)
  138. {
  139. GPBUtil::checkMessage($var, \Ydb\ListType::class);
  140. $this->writeOneof(102, $var);
  141. return $this;
  142. }
  143. /**
  144. * Generated from protobuf field <code>.Ydb.TupleType tuple_type = 103;</code>
  145. * @return \Ydb\TupleType|null
  146. */
  147. public function getTupleType()
  148. {
  149. return $this->readOneof(103);
  150. }
  151. public function hasTupleType()
  152. {
  153. return $this->hasOneof(103);
  154. }
  155. /**
  156. * Generated from protobuf field <code>.Ydb.TupleType tuple_type = 103;</code>
  157. * @param \Ydb\TupleType $var
  158. * @return $this
  159. */
  160. public function setTupleType($var)
  161. {
  162. GPBUtil::checkMessage($var, \Ydb\TupleType::class);
  163. $this->writeOneof(103, $var);
  164. return $this;
  165. }
  166. /**
  167. * Generated from protobuf field <code>.Ydb.StructType struct_type = 104;</code>
  168. * @return \Ydb\StructType|null
  169. */
  170. public function getStructType()
  171. {
  172. return $this->readOneof(104);
  173. }
  174. public function hasStructType()
  175. {
  176. return $this->hasOneof(104);
  177. }
  178. /**
  179. * Generated from protobuf field <code>.Ydb.StructType struct_type = 104;</code>
  180. * @param \Ydb\StructType $var
  181. * @return $this
  182. */
  183. public function setStructType($var)
  184. {
  185. GPBUtil::checkMessage($var, \Ydb\StructType::class);
  186. $this->writeOneof(104, $var);
  187. return $this;
  188. }
  189. /**
  190. * Generated from protobuf field <code>.Ydb.DictType dict_type = 105;</code>
  191. * @return \Ydb\DictType|null
  192. */
  193. public function getDictType()
  194. {
  195. return $this->readOneof(105);
  196. }
  197. public function hasDictType()
  198. {
  199. return $this->hasOneof(105);
  200. }
  201. /**
  202. * Generated from protobuf field <code>.Ydb.DictType dict_type = 105;</code>
  203. * @param \Ydb\DictType $var
  204. * @return $this
  205. */
  206. public function setDictType($var)
  207. {
  208. GPBUtil::checkMessage($var, \Ydb\DictType::class);
  209. $this->writeOneof(105, $var);
  210. return $this;
  211. }
  212. /**
  213. * Generated from protobuf field <code>.Ydb.VariantType variant_type = 106;</code>
  214. * @return \Ydb\VariantType|null
  215. */
  216. public function getVariantType()
  217. {
  218. return $this->readOneof(106);
  219. }
  220. public function hasVariantType()
  221. {
  222. return $this->hasOneof(106);
  223. }
  224. /**
  225. * Generated from protobuf field <code>.Ydb.VariantType variant_type = 106;</code>
  226. * @param \Ydb\VariantType $var
  227. * @return $this
  228. */
  229. public function setVariantType($var)
  230. {
  231. GPBUtil::checkMessage($var, \Ydb\VariantType::class);
  232. $this->writeOneof(106, $var);
  233. return $this;
  234. }
  235. /**
  236. * Generated from protobuf field <code>.Ydb.TaggedType tagged_type = 107;</code>
  237. * @return \Ydb\TaggedType|null
  238. */
  239. public function getTaggedType()
  240. {
  241. return $this->readOneof(107);
  242. }
  243. public function hasTaggedType()
  244. {
  245. return $this->hasOneof(107);
  246. }
  247. /**
  248. * Generated from protobuf field <code>.Ydb.TaggedType tagged_type = 107;</code>
  249. * @param \Ydb\TaggedType $var
  250. * @return $this
  251. */
  252. public function setTaggedType($var)
  253. {
  254. GPBUtil::checkMessage($var, \Ydb\TaggedType::class);
  255. $this->writeOneof(107, $var);
  256. return $this;
  257. }
  258. /**
  259. * Special types
  260. *
  261. * Generated from protobuf field <code>.google.protobuf.NullValue void_type = 201;</code>
  262. * @return int
  263. */
  264. public function getVoidType()
  265. {
  266. return $this->readOneof(201);
  267. }
  268. public function hasVoidType()
  269. {
  270. return $this->hasOneof(201);
  271. }
  272. /**
  273. * Special types
  274. *
  275. * Generated from protobuf field <code>.google.protobuf.NullValue void_type = 201;</code>
  276. * @param int $var
  277. * @return $this
  278. */
  279. public function setVoidType($var)
  280. {
  281. GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
  282. $this->writeOneof(201, $var);
  283. return $this;
  284. }
  285. /**
  286. * Generated from protobuf field <code>.google.protobuf.NullValue null_type = 202;</code>
  287. * @return int
  288. */
  289. public function getNullType()
  290. {
  291. return $this->readOneof(202);
  292. }
  293. public function hasNullType()
  294. {
  295. return $this->hasOneof(202);
  296. }
  297. /**
  298. * Generated from protobuf field <code>.google.protobuf.NullValue null_type = 202;</code>
  299. * @param int $var
  300. * @return $this
  301. */
  302. public function setNullType($var)
  303. {
  304. GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
  305. $this->writeOneof(202, $var);
  306. return $this;
  307. }
  308. /**
  309. * Generated from protobuf field <code>.google.protobuf.NullValue empty_list_type = 203;</code>
  310. * @return int
  311. */
  312. public function getEmptyListType()
  313. {
  314. return $this->readOneof(203);
  315. }
  316. public function hasEmptyListType()
  317. {
  318. return $this->hasOneof(203);
  319. }
  320. /**
  321. * Generated from protobuf field <code>.google.protobuf.NullValue empty_list_type = 203;</code>
  322. * @param int $var
  323. * @return $this
  324. */
  325. public function setEmptyListType($var)
  326. {
  327. GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
  328. $this->writeOneof(203, $var);
  329. return $this;
  330. }
  331. /**
  332. * Generated from protobuf field <code>.google.protobuf.NullValue empty_dict_type = 204;</code>
  333. * @return int
  334. */
  335. public function getEmptyDictType()
  336. {
  337. return $this->readOneof(204);
  338. }
  339. public function hasEmptyDictType()
  340. {
  341. return $this->hasOneof(204);
  342. }
  343. /**
  344. * Generated from protobuf field <code>.google.protobuf.NullValue empty_dict_type = 204;</code>
  345. * @param int $var
  346. * @return $this
  347. */
  348. public function setEmptyDictType($var)
  349. {
  350. GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class);
  351. $this->writeOneof(204, $var);
  352. return $this;
  353. }
  354. /**
  355. * Generated from protobuf field <code>.Ydb.PgType pg_type = 205;</code>
  356. * @return \Ydb\PgType|null
  357. */
  358. public function getPgType()
  359. {
  360. return $this->readOneof(205);
  361. }
  362. public function hasPgType()
  363. {
  364. return $this->hasOneof(205);
  365. }
  366. /**
  367. * Generated from protobuf field <code>.Ydb.PgType pg_type = 205;</code>
  368. * @param \Ydb\PgType $var
  369. * @return $this
  370. */
  371. public function setPgType($var)
  372. {
  373. GPBUtil::checkMessage($var, \Ydb\PgType::class);
  374. $this->writeOneof(205, $var);
  375. return $this;
  376. }
  377. /**
  378. * @return string
  379. */
  380. public function getType()
  381. {
  382. return $this->whichOneof("type");
  383. }
  384. }