StartPartitionSessionRequest.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\StreamReadMessage;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Command from server to create and start a partition session.
  10. * Client must respond with StartPartitionSessionResponse when ready to receive data from this partition.
  11. *
  12. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.StartPartitionSessionRequest</code>
  13. */
  14. class StartPartitionSessionRequest extends \Google\Protobuf\Internal\Message
  15. {
  16. /**
  17. * Partition session description.
  18. *
  19. * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSession partition_session = 1;</code>
  20. */
  21. protected $partition_session = null;
  22. /**
  23. * Each offset up to and including (committed_offset - 1) was fully processed.
  24. *
  25. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  26. */
  27. protected $committed_offset = 0;
  28. /**
  29. * Partition contains messages with offsets in range [start, end).
  30. *
  31. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 3;</code>
  32. */
  33. protected $partition_offsets = null;
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type \Ydb\Topic\StreamReadMessage\PartitionSession $partition_session
  41. * Partition session description.
  42. * @type int|string $committed_offset
  43. * Each offset up to and including (committed_offset - 1) was fully processed.
  44. * @type \Ydb\Topic\OffsetsRange $partition_offsets
  45. * Partition contains messages with offsets in range [start, end).
  46. * }
  47. */
  48. public function __construct($data = NULL) {
  49. \GPBMetadata\Protos\YdbTopic::initOnce();
  50. parent::__construct($data);
  51. }
  52. /**
  53. * Partition session description.
  54. *
  55. * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSession partition_session = 1;</code>
  56. * @return \Ydb\Topic\StreamReadMessage\PartitionSession|null
  57. */
  58. public function getPartitionSession()
  59. {
  60. return $this->partition_session;
  61. }
  62. public function hasPartitionSession()
  63. {
  64. return isset($this->partition_session);
  65. }
  66. public function clearPartitionSession()
  67. {
  68. unset($this->partition_session);
  69. }
  70. /**
  71. * Partition session description.
  72. *
  73. * Generated from protobuf field <code>.Ydb.Topic.StreamReadMessage.PartitionSession partition_session = 1;</code>
  74. * @param \Ydb\Topic\StreamReadMessage\PartitionSession $var
  75. * @return $this
  76. */
  77. public function setPartitionSession($var)
  78. {
  79. GPBUtil::checkMessage($var, \Ydb\Topic\StreamReadMessage\PartitionSession::class);
  80. $this->partition_session = $var;
  81. return $this;
  82. }
  83. /**
  84. * Each offset up to and including (committed_offset - 1) was fully processed.
  85. *
  86. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  87. * @return int|string
  88. */
  89. public function getCommittedOffset()
  90. {
  91. return $this->committed_offset;
  92. }
  93. /**
  94. * Each offset up to and including (committed_offset - 1) was fully processed.
  95. *
  96. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  97. * @param int|string $var
  98. * @return $this
  99. */
  100. public function setCommittedOffset($var)
  101. {
  102. GPBUtil::checkInt64($var);
  103. $this->committed_offset = $var;
  104. return $this;
  105. }
  106. /**
  107. * Partition contains messages with offsets in range [start, end).
  108. *
  109. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 3;</code>
  110. * @return \Ydb\Topic\OffsetsRange|null
  111. */
  112. public function getPartitionOffsets()
  113. {
  114. return $this->partition_offsets;
  115. }
  116. public function hasPartitionOffsets()
  117. {
  118. return isset($this->partition_offsets);
  119. }
  120. public function clearPartitionOffsets()
  121. {
  122. unset($this->partition_offsets);
  123. }
  124. /**
  125. * Partition contains messages with offsets in range [start, end).
  126. *
  127. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 3;</code>
  128. * @param \Ydb\Topic\OffsetsRange $var
  129. * @return $this
  130. */
  131. public function setPartitionOffsets($var)
  132. {
  133. GPBUtil::checkMessage($var, \Ydb\Topic\OffsetsRange::class);
  134. $this->partition_offsets = $var;
  135. return $this;
  136. }
  137. }
  138. // Adding a class alias for backwards compatibility with the previous class name.
  139. class_alias(StartPartitionSessionRequest::class, \Ydb\Topic\StreamReadMessage_StartPartitionSessionRequest::class);