AddOffsetsToTransactionRequest.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Add offsets to transaction request sent from client to server.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.AddOffsetsToTransactionRequest</code>
  12. */
  13. class AddOffsetsToTransactionRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  17. */
  18. protected $operation_params = null;
  19. /**
  20. * Session identifier from TableService.
  21. *
  22. * Generated from protobuf field <code>string session_id = 2;</code>
  23. */
  24. protected $session_id = '';
  25. /**
  26. * Transaction identifier from TableService.
  27. *
  28. * Generated from protobuf field <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
  29. */
  30. protected $tx_control = null;
  31. /**
  32. * Ranges of offsets by topics.
  33. *
  34. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
  35. */
  36. private $topics;
  37. /**
  38. * Generated from protobuf field <code>string consumer = 5;</code>
  39. */
  40. protected $consumer = '';
  41. /**
  42. * Constructor.
  43. *
  44. * @param array $data {
  45. * Optional. Data for populating the Message object.
  46. *
  47. * @type \Ydb\Operations\OperationParams $operation_params
  48. * @type string $session_id
  49. * Session identifier from TableService.
  50. * @type \Ydb\Table\TransactionControl $tx_control
  51. * Transaction identifier from TableService.
  52. * @type array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets>|\Google\Protobuf\Internal\RepeatedField $topics
  53. * Ranges of offsets by topics.
  54. * @type string $consumer
  55. * }
  56. */
  57. public function __construct($data = NULL) {
  58. \GPBMetadata\Protos\YdbTopic::initOnce();
  59. parent::__construct($data);
  60. }
  61. /**
  62. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  63. * @return \Ydb\Operations\OperationParams|null
  64. */
  65. public function getOperationParams()
  66. {
  67. return $this->operation_params;
  68. }
  69. public function hasOperationParams()
  70. {
  71. return isset($this->operation_params);
  72. }
  73. public function clearOperationParams()
  74. {
  75. unset($this->operation_params);
  76. }
  77. /**
  78. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  79. * @param \Ydb\Operations\OperationParams $var
  80. * @return $this
  81. */
  82. public function setOperationParams($var)
  83. {
  84. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  85. $this->operation_params = $var;
  86. return $this;
  87. }
  88. /**
  89. * Session identifier from TableService.
  90. *
  91. * Generated from protobuf field <code>string session_id = 2;</code>
  92. * @return string
  93. */
  94. public function getSessionId()
  95. {
  96. return $this->session_id;
  97. }
  98. /**
  99. * Session identifier from TableService.
  100. *
  101. * Generated from protobuf field <code>string session_id = 2;</code>
  102. * @param string $var
  103. * @return $this
  104. */
  105. public function setSessionId($var)
  106. {
  107. GPBUtil::checkString($var, True);
  108. $this->session_id = $var;
  109. return $this;
  110. }
  111. /**
  112. * Transaction identifier from TableService.
  113. *
  114. * Generated from protobuf field <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
  115. * @return \Ydb\Table\TransactionControl|null
  116. */
  117. public function getTxControl()
  118. {
  119. return $this->tx_control;
  120. }
  121. public function hasTxControl()
  122. {
  123. return isset($this->tx_control);
  124. }
  125. public function clearTxControl()
  126. {
  127. unset($this->tx_control);
  128. }
  129. /**
  130. * Transaction identifier from TableService.
  131. *
  132. * Generated from protobuf field <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
  133. * @param \Ydb\Table\TransactionControl $var
  134. * @return $this
  135. */
  136. public function setTxControl($var)
  137. {
  138. GPBUtil::checkMessage($var, \Ydb\Table\TransactionControl::class);
  139. $this->tx_control = $var;
  140. return $this;
  141. }
  142. /**
  143. * Ranges of offsets by topics.
  144. *
  145. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
  146. * @return \Google\Protobuf\Internal\RepeatedField
  147. */
  148. public function getTopics()
  149. {
  150. return $this->topics;
  151. }
  152. /**
  153. * Ranges of offsets by topics.
  154. *
  155. * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
  156. * @param array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets>|\Google\Protobuf\Internal\RepeatedField $var
  157. * @return $this
  158. */
  159. public function setTopics($var)
  160. {
  161. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets::class);
  162. $this->topics = $arr;
  163. return $this;
  164. }
  165. /**
  166. * Generated from protobuf field <code>string consumer = 5;</code>
  167. * @return string
  168. */
  169. public function getConsumer()
  170. {
  171. return $this->consumer;
  172. }
  173. /**
  174. * Generated from protobuf field <code>string consumer = 5;</code>
  175. * @param string $var
  176. * @return $this
  177. */
  178. public function setConsumer($var)
  179. {
  180. GPBUtil::checkString($var, True);
  181. $this->consumer = $var;
  182. return $this;
  183. }
  184. }