ReadTableResponse.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_table.proto
  4. namespace Ydb\Table;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * ReadTable doesn't use Operation, returns result directly
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.ReadTableResponse</code>
  12. */
  13. class ReadTableResponse extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Status of request (same as other statuses)
  17. *
  18. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  19. */
  20. protected $status = 0;
  21. /**
  22. * Issues
  23. *
  24. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  25. */
  26. private $issues;
  27. /**
  28. * Optional snapshot that corresponds to the returned data
  29. *
  30. * Generated from protobuf field <code>.Ydb.VirtualTimestamp snapshot = 4;</code>
  31. */
  32. protected $snapshot = null;
  33. /**
  34. * Read table result
  35. *
  36. * Generated from protobuf field <code>.Ydb.Table.ReadTableResult result = 3;</code>
  37. */
  38. protected $result = null;
  39. /**
  40. * Constructor.
  41. *
  42. * @param array $data {
  43. * Optional. Data for populating the Message object.
  44. *
  45. * @type int $status
  46. * Status of request (same as other statuses)
  47. * @type array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $issues
  48. * Issues
  49. * @type \Ydb\VirtualTimestamp $snapshot
  50. * Optional snapshot that corresponds to the returned data
  51. * @type \Ydb\Table\ReadTableResult $result
  52. * Read table result
  53. * }
  54. */
  55. public function __construct($data = NULL) {
  56. \GPBMetadata\Protos\YdbTable::initOnce();
  57. parent::__construct($data);
  58. }
  59. /**
  60. * Status of request (same as other statuses)
  61. *
  62. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  63. * @return int
  64. */
  65. public function getStatus()
  66. {
  67. return $this->status;
  68. }
  69. /**
  70. * Status of request (same as other statuses)
  71. *
  72. * Generated from protobuf field <code>.Ydb.StatusIds.StatusCode status = 1;</code>
  73. * @param int $var
  74. * @return $this
  75. */
  76. public function setStatus($var)
  77. {
  78. GPBUtil::checkEnum($var, \Ydb\StatusIds\StatusCode::class);
  79. $this->status = $var;
  80. return $this;
  81. }
  82. /**
  83. * Issues
  84. *
  85. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  86. * @return \Google\Protobuf\Internal\RepeatedField
  87. */
  88. public function getIssues()
  89. {
  90. return $this->issues;
  91. }
  92. /**
  93. * Issues
  94. *
  95. * Generated from protobuf field <code>repeated .Ydb.Issue.IssueMessage issues = 2;</code>
  96. * @param array<\Ydb\Issue\IssueMessage>|\Google\Protobuf\Internal\RepeatedField $var
  97. * @return $this
  98. */
  99. public function setIssues($var)
  100. {
  101. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Issue\IssueMessage::class);
  102. $this->issues = $arr;
  103. return $this;
  104. }
  105. /**
  106. * Optional snapshot that corresponds to the returned data
  107. *
  108. * Generated from protobuf field <code>.Ydb.VirtualTimestamp snapshot = 4;</code>
  109. * @return \Ydb\VirtualTimestamp|null
  110. */
  111. public function getSnapshot()
  112. {
  113. return $this->snapshot;
  114. }
  115. public function hasSnapshot()
  116. {
  117. return isset($this->snapshot);
  118. }
  119. public function clearSnapshot()
  120. {
  121. unset($this->snapshot);
  122. }
  123. /**
  124. * Optional snapshot that corresponds to the returned data
  125. *
  126. * Generated from protobuf field <code>.Ydb.VirtualTimestamp snapshot = 4;</code>
  127. * @param \Ydb\VirtualTimestamp $var
  128. * @return $this
  129. */
  130. public function setSnapshot($var)
  131. {
  132. GPBUtil::checkMessage($var, \Ydb\VirtualTimestamp::class);
  133. $this->snapshot = $var;
  134. return $this;
  135. }
  136. /**
  137. * Read table result
  138. *
  139. * Generated from protobuf field <code>.Ydb.Table.ReadTableResult result = 3;</code>
  140. * @return \Ydb\Table\ReadTableResult|null
  141. */
  142. public function getResult()
  143. {
  144. return $this->result;
  145. }
  146. public function hasResult()
  147. {
  148. return isset($this->result);
  149. }
  150. public function clearResult()
  151. {
  152. unset($this->result);
  153. }
  154. /**
  155. * Read table result
  156. *
  157. * Generated from protobuf field <code>.Ydb.Table.ReadTableResult result = 3;</code>
  158. * @param \Ydb\Table\ReadTableResult $var
  159. * @return $this
  160. */
  161. public function setResult($var)
  162. {
  163. GPBUtil::checkMessage($var, \Ydb\Table\ReadTableResult::class);
  164. $this->result = $var;
  165. return $this;
  166. }
  167. }