ReadTableRequest.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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. * Request to read table (without SQL)
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.ReadTableRequest</code>
  12. */
  13. class ReadTableRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Session identifier
  17. *
  18. * Generated from protobuf field <code>string session_id = 1;</code>
  19. */
  20. protected $session_id = '';
  21. /**
  22. * Path to table to read
  23. *
  24. * Generated from protobuf field <code>string path = 2;</code>
  25. */
  26. protected $path = '';
  27. /**
  28. * Primary key range to read
  29. *
  30. * Generated from protobuf field <code>.Ydb.Table.KeyRange key_range = 3;</code>
  31. */
  32. protected $key_range = null;
  33. /**
  34. * Output columns
  35. *
  36. * Generated from protobuf field <code>repeated string columns = 4;</code>
  37. */
  38. private $columns;
  39. /**
  40. * Require ordered reading
  41. *
  42. * Generated from protobuf field <code>bool ordered = 5;</code>
  43. */
  44. protected $ordered = false;
  45. /**
  46. * Limits row count to read
  47. *
  48. * Generated from protobuf field <code>uint64 row_limit = 6;</code>
  49. */
  50. protected $row_limit = 0;
  51. /**
  52. * Use a server-side snapshot
  53. *
  54. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status use_snapshot = 7;</code>
  55. */
  56. protected $use_snapshot = 0;
  57. /**
  58. * Constructor.
  59. *
  60. * @param array $data {
  61. * Optional. Data for populating the Message object.
  62. *
  63. * @type string $session_id
  64. * Session identifier
  65. * @type string $path
  66. * Path to table to read
  67. * @type \Ydb\Table\KeyRange $key_range
  68. * Primary key range to read
  69. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $columns
  70. * Output columns
  71. * @type bool $ordered
  72. * Require ordered reading
  73. * @type int|string $row_limit
  74. * Limits row count to read
  75. * @type int $use_snapshot
  76. * Use a server-side snapshot
  77. * }
  78. */
  79. public function __construct($data = NULL) {
  80. \GPBMetadata\Protos\YdbTable::initOnce();
  81. parent::__construct($data);
  82. }
  83. /**
  84. * Session identifier
  85. *
  86. * Generated from protobuf field <code>string session_id = 1;</code>
  87. * @return string
  88. */
  89. public function getSessionId()
  90. {
  91. return $this->session_id;
  92. }
  93. /**
  94. * Session identifier
  95. *
  96. * Generated from protobuf field <code>string session_id = 1;</code>
  97. * @param string $var
  98. * @return $this
  99. */
  100. public function setSessionId($var)
  101. {
  102. GPBUtil::checkString($var, True);
  103. $this->session_id = $var;
  104. return $this;
  105. }
  106. /**
  107. * Path to table to read
  108. *
  109. * Generated from protobuf field <code>string path = 2;</code>
  110. * @return string
  111. */
  112. public function getPath()
  113. {
  114. return $this->path;
  115. }
  116. /**
  117. * Path to table to read
  118. *
  119. * Generated from protobuf field <code>string path = 2;</code>
  120. * @param string $var
  121. * @return $this
  122. */
  123. public function setPath($var)
  124. {
  125. GPBUtil::checkString($var, True);
  126. $this->path = $var;
  127. return $this;
  128. }
  129. /**
  130. * Primary key range to read
  131. *
  132. * Generated from protobuf field <code>.Ydb.Table.KeyRange key_range = 3;</code>
  133. * @return \Ydb\Table\KeyRange|null
  134. */
  135. public function getKeyRange()
  136. {
  137. return $this->key_range;
  138. }
  139. public function hasKeyRange()
  140. {
  141. return isset($this->key_range);
  142. }
  143. public function clearKeyRange()
  144. {
  145. unset($this->key_range);
  146. }
  147. /**
  148. * Primary key range to read
  149. *
  150. * Generated from protobuf field <code>.Ydb.Table.KeyRange key_range = 3;</code>
  151. * @param \Ydb\Table\KeyRange $var
  152. * @return $this
  153. */
  154. public function setKeyRange($var)
  155. {
  156. GPBUtil::checkMessage($var, \Ydb\Table\KeyRange::class);
  157. $this->key_range = $var;
  158. return $this;
  159. }
  160. /**
  161. * Output columns
  162. *
  163. * Generated from protobuf field <code>repeated string columns = 4;</code>
  164. * @return \Google\Protobuf\Internal\RepeatedField
  165. */
  166. public function getColumns()
  167. {
  168. return $this->columns;
  169. }
  170. /**
  171. * Output columns
  172. *
  173. * Generated from protobuf field <code>repeated string columns = 4;</code>
  174. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  175. * @return $this
  176. */
  177. public function setColumns($var)
  178. {
  179. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  180. $this->columns = $arr;
  181. return $this;
  182. }
  183. /**
  184. * Require ordered reading
  185. *
  186. * Generated from protobuf field <code>bool ordered = 5;</code>
  187. * @return bool
  188. */
  189. public function getOrdered()
  190. {
  191. return $this->ordered;
  192. }
  193. /**
  194. * Require ordered reading
  195. *
  196. * Generated from protobuf field <code>bool ordered = 5;</code>
  197. * @param bool $var
  198. * @return $this
  199. */
  200. public function setOrdered($var)
  201. {
  202. GPBUtil::checkBool($var);
  203. $this->ordered = $var;
  204. return $this;
  205. }
  206. /**
  207. * Limits row count to read
  208. *
  209. * Generated from protobuf field <code>uint64 row_limit = 6;</code>
  210. * @return int|string
  211. */
  212. public function getRowLimit()
  213. {
  214. return $this->row_limit;
  215. }
  216. /**
  217. * Limits row count to read
  218. *
  219. * Generated from protobuf field <code>uint64 row_limit = 6;</code>
  220. * @param int|string $var
  221. * @return $this
  222. */
  223. public function setRowLimit($var)
  224. {
  225. GPBUtil::checkUint64($var);
  226. $this->row_limit = $var;
  227. return $this;
  228. }
  229. /**
  230. * Use a server-side snapshot
  231. *
  232. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status use_snapshot = 7;</code>
  233. * @return int
  234. */
  235. public function getUseSnapshot()
  236. {
  237. return $this->use_snapshot;
  238. }
  239. /**
  240. * Use a server-side snapshot
  241. *
  242. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status use_snapshot = 7;</code>
  243. * @param int $var
  244. * @return $this
  245. */
  246. public function setUseSnapshot($var)
  247. {
  248. GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
  249. $this->use_snapshot = $var;
  250. return $this;
  251. }
  252. }