StopPartitionSessionRequest.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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 stop and destroy concrete partition session.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.StopPartitionSessionRequest</code>
  12. */
  13. class StopPartitionSessionRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Identifier of partition session that is ready to be closed by server.
  17. *
  18. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  19. */
  20. protected $partition_session_id = 0;
  21. /**
  22. * Flag of graceful stop.
  23. * If set, server will wait for response from client before giving this partition to other read session.
  24. * Server will not send more data from this partition.
  25. * Client can process all received data and wait for commit and only after send response.
  26. * If False then server gives partition for other session right now.
  27. * All further commits for this partition session has no effect. Server is not waiting for response.
  28. *
  29. * Generated from protobuf field <code>bool graceful = 2;</code>
  30. */
  31. protected $graceful = false;
  32. /**
  33. * Upper bound for committed offsets.
  34. *
  35. * Generated from protobuf field <code>int64 committed_offset = 3;</code>
  36. */
  37. protected $committed_offset = 0;
  38. /**
  39. * Constructor.
  40. *
  41. * @param array $data {
  42. * Optional. Data for populating the Message object.
  43. *
  44. * @type int|string $partition_session_id
  45. * Identifier of partition session that is ready to be closed by server.
  46. * @type bool $graceful
  47. * Flag of graceful stop.
  48. * If set, server will wait for response from client before giving this partition to other read session.
  49. * Server will not send more data from this partition.
  50. * Client can process all received data and wait for commit and only after send response.
  51. * If False then server gives partition for other session right now.
  52. * All further commits for this partition session has no effect. Server is not waiting for response.
  53. * @type int|string $committed_offset
  54. * Upper bound for committed offsets.
  55. * }
  56. */
  57. public function __construct($data = NULL) {
  58. \GPBMetadata\Protos\YdbTopic::initOnce();
  59. parent::__construct($data);
  60. }
  61. /**
  62. * Identifier of partition session that is ready to be closed by server.
  63. *
  64. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  65. * @return int|string
  66. */
  67. public function getPartitionSessionId()
  68. {
  69. return $this->partition_session_id;
  70. }
  71. /**
  72. * Identifier of partition session that is ready to be closed by server.
  73. *
  74. * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
  75. * @param int|string $var
  76. * @return $this
  77. */
  78. public function setPartitionSessionId($var)
  79. {
  80. GPBUtil::checkInt64($var);
  81. $this->partition_session_id = $var;
  82. return $this;
  83. }
  84. /**
  85. * Flag of graceful stop.
  86. * If set, server will wait for response from client before giving this partition to other read session.
  87. * Server will not send more data from this partition.
  88. * Client can process all received data and wait for commit and only after send response.
  89. * If False then server gives partition for other session right now.
  90. * All further commits for this partition session has no effect. Server is not waiting for response.
  91. *
  92. * Generated from protobuf field <code>bool graceful = 2;</code>
  93. * @return bool
  94. */
  95. public function getGraceful()
  96. {
  97. return $this->graceful;
  98. }
  99. /**
  100. * Flag of graceful stop.
  101. * If set, server will wait for response from client before giving this partition to other read session.
  102. * Server will not send more data from this partition.
  103. * Client can process all received data and wait for commit and only after send response.
  104. * If False then server gives partition for other session right now.
  105. * All further commits for this partition session has no effect. Server is not waiting for response.
  106. *
  107. * Generated from protobuf field <code>bool graceful = 2;</code>
  108. * @param bool $var
  109. * @return $this
  110. */
  111. public function setGraceful($var)
  112. {
  113. GPBUtil::checkBool($var);
  114. $this->graceful = $var;
  115. return $this;
  116. }
  117. /**
  118. * Upper bound for committed offsets.
  119. *
  120. * Generated from protobuf field <code>int64 committed_offset = 3;</code>
  121. * @return int|string
  122. */
  123. public function getCommittedOffset()
  124. {
  125. return $this->committed_offset;
  126. }
  127. /**
  128. * Upper bound for committed offsets.
  129. *
  130. * Generated from protobuf field <code>int64 committed_offset = 3;</code>
  131. * @param int|string $var
  132. * @return $this
  133. */
  134. public function setCommittedOffset($var)
  135. {
  136. GPBUtil::checkInt64($var);
  137. $this->committed_offset = $var;
  138. return $this;
  139. }
  140. }
  141. // Adding a class alias for backwards compatibility with the previous class name.
  142. class_alias(StopPartitionSessionRequest::class, \Ydb\Topic\StreamReadMessage_StopPartitionSessionRequest::class);