VariantType.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.VariantType</code>
  10. */
  11. class VariantType 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 \Ydb\TupleType $tuple_items
  21. * @type \Ydb\StructType $struct_items
  22. * }
  23. */
  24. public function __construct($data = NULL) {
  25. \GPBMetadata\Protos\YdbValue::initOnce();
  26. parent::__construct($data);
  27. }
  28. /**
  29. * Generated from protobuf field <code>.Ydb.TupleType tuple_items = 1;</code>
  30. * @return \Ydb\TupleType|null
  31. */
  32. public function getTupleItems()
  33. {
  34. return $this->readOneof(1);
  35. }
  36. public function hasTupleItems()
  37. {
  38. return $this->hasOneof(1);
  39. }
  40. /**
  41. * Generated from protobuf field <code>.Ydb.TupleType tuple_items = 1;</code>
  42. * @param \Ydb\TupleType $var
  43. * @return $this
  44. */
  45. public function setTupleItems($var)
  46. {
  47. GPBUtil::checkMessage($var, \Ydb\TupleType::class);
  48. $this->writeOneof(1, $var);
  49. return $this;
  50. }
  51. /**
  52. * Generated from protobuf field <code>.Ydb.StructType struct_items = 2;</code>
  53. * @return \Ydb\StructType|null
  54. */
  55. public function getStructItems()
  56. {
  57. return $this->readOneof(2);
  58. }
  59. public function hasStructItems()
  60. {
  61. return $this->hasOneof(2);
  62. }
  63. /**
  64. * Generated from protobuf field <code>.Ydb.StructType struct_items = 2;</code>
  65. * @param \Ydb\StructType $var
  66. * @return $this
  67. */
  68. public function setStructItems($var)
  69. {
  70. GPBUtil::checkMessage($var, \Ydb\StructType::class);
  71. $this->writeOneof(2, $var);
  72. return $this;
  73. }
  74. /**
  75. * @return string
  76. */
  77. public function getType()
  78. {
  79. return $this->whichOneof("type");
  80. }
  81. }