PartitionStats.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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. * Generated from protobuf message <code>Ydb.Topic.PartitionStats</code>
  10. */
  11. class PartitionStats extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Partition contains messages with offsets in range [start, end).
  15. *
  16. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 1;</code>
  17. */
  18. protected $partition_offsets = null;
  19. /**
  20. * Approximate size of partition.
  21. *
  22. * Generated from protobuf field <code>int64 store_size_bytes = 2;</code>
  23. */
  24. protected $store_size_bytes = 0;
  25. /**
  26. * Timestamp of last write.
  27. *
  28. * Generated from protobuf field <code>.google.protobuf.Timestamp last_write_time = 3;</code>
  29. */
  30. protected $last_write_time = null;
  31. /**
  32. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  33. *
  34. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 4;</code>
  35. */
  36. protected $max_write_time_lag = null;
  37. /**
  38. * How much bytes were written during several windows in this partition.
  39. *
  40. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 5;</code>
  41. */
  42. protected $bytes_written = null;
  43. /**
  44. * Host where tablet for this partition works. Useful for debugging purposes.
  45. *
  46. * Generated from protobuf field <code>int32 partition_node_id = 8;</code>
  47. */
  48. protected $partition_node_id = 0;
  49. /**
  50. * Constructor.
  51. *
  52. * @param array $data {
  53. * Optional. Data for populating the Message object.
  54. *
  55. * @type \Ydb\Topic\OffsetsRange $partition_offsets
  56. * Partition contains messages with offsets in range [start, end).
  57. * @type int|string $store_size_bytes
  58. * Approximate size of partition.
  59. * @type \Google\Protobuf\Timestamp $last_write_time
  60. * Timestamp of last write.
  61. * @type \Google\Protobuf\Duration $max_write_time_lag
  62. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  63. * @type \Ydb\Topic\MultipleWindowsStat $bytes_written
  64. * How much bytes were written during several windows in this partition.
  65. * @type int $partition_node_id
  66. * Host where tablet for this partition works. Useful for debugging purposes.
  67. * }
  68. */
  69. public function __construct($data = NULL) {
  70. \GPBMetadata\Protos\YdbTopic::initOnce();
  71. parent::__construct($data);
  72. }
  73. /**
  74. * Partition contains messages with offsets in range [start, end).
  75. *
  76. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 1;</code>
  77. * @return \Ydb\Topic\OffsetsRange|null
  78. */
  79. public function getPartitionOffsets()
  80. {
  81. return $this->partition_offsets;
  82. }
  83. public function hasPartitionOffsets()
  84. {
  85. return isset($this->partition_offsets);
  86. }
  87. public function clearPartitionOffsets()
  88. {
  89. unset($this->partition_offsets);
  90. }
  91. /**
  92. * Partition contains messages with offsets in range [start, end).
  93. *
  94. * Generated from protobuf field <code>.Ydb.Topic.OffsetsRange partition_offsets = 1;</code>
  95. * @param \Ydb\Topic\OffsetsRange $var
  96. * @return $this
  97. */
  98. public function setPartitionOffsets($var)
  99. {
  100. GPBUtil::checkMessage($var, \Ydb\Topic\OffsetsRange::class);
  101. $this->partition_offsets = $var;
  102. return $this;
  103. }
  104. /**
  105. * Approximate size of partition.
  106. *
  107. * Generated from protobuf field <code>int64 store_size_bytes = 2;</code>
  108. * @return int|string
  109. */
  110. public function getStoreSizeBytes()
  111. {
  112. return $this->store_size_bytes;
  113. }
  114. /**
  115. * Approximate size of partition.
  116. *
  117. * Generated from protobuf field <code>int64 store_size_bytes = 2;</code>
  118. * @param int|string $var
  119. * @return $this
  120. */
  121. public function setStoreSizeBytes($var)
  122. {
  123. GPBUtil::checkInt64($var);
  124. $this->store_size_bytes = $var;
  125. return $this;
  126. }
  127. /**
  128. * Timestamp of last write.
  129. *
  130. * Generated from protobuf field <code>.google.protobuf.Timestamp last_write_time = 3;</code>
  131. * @return \Google\Protobuf\Timestamp|null
  132. */
  133. public function getLastWriteTime()
  134. {
  135. return $this->last_write_time;
  136. }
  137. public function hasLastWriteTime()
  138. {
  139. return isset($this->last_write_time);
  140. }
  141. public function clearLastWriteTime()
  142. {
  143. unset($this->last_write_time);
  144. }
  145. /**
  146. * Timestamp of last write.
  147. *
  148. * Generated from protobuf field <code>.google.protobuf.Timestamp last_write_time = 3;</code>
  149. * @param \Google\Protobuf\Timestamp $var
  150. * @return $this
  151. */
  152. public function setLastWriteTime($var)
  153. {
  154. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  155. $this->last_write_time = $var;
  156. return $this;
  157. }
  158. /**
  159. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  160. *
  161. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 4;</code>
  162. * @return \Google\Protobuf\Duration|null
  163. */
  164. public function getMaxWriteTimeLag()
  165. {
  166. return $this->max_write_time_lag;
  167. }
  168. public function hasMaxWriteTimeLag()
  169. {
  170. return isset($this->max_write_time_lag);
  171. }
  172. public function clearMaxWriteTimeLag()
  173. {
  174. unset($this->max_write_time_lag);
  175. }
  176. /**
  177. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  178. *
  179. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 4;</code>
  180. * @param \Google\Protobuf\Duration $var
  181. * @return $this
  182. */
  183. public function setMaxWriteTimeLag($var)
  184. {
  185. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  186. $this->max_write_time_lag = $var;
  187. return $this;
  188. }
  189. /**
  190. * How much bytes were written during several windows in this partition.
  191. *
  192. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 5;</code>
  193. * @return \Ydb\Topic\MultipleWindowsStat|null
  194. */
  195. public function getBytesWritten()
  196. {
  197. return $this->bytes_written;
  198. }
  199. public function hasBytesWritten()
  200. {
  201. return isset($this->bytes_written);
  202. }
  203. public function clearBytesWritten()
  204. {
  205. unset($this->bytes_written);
  206. }
  207. /**
  208. * How much bytes were written during several windows in this partition.
  209. *
  210. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 5;</code>
  211. * @param \Ydb\Topic\MultipleWindowsStat $var
  212. * @return $this
  213. */
  214. public function setBytesWritten($var)
  215. {
  216. GPBUtil::checkMessage($var, \Ydb\Topic\MultipleWindowsStat::class);
  217. $this->bytes_written = $var;
  218. return $this;
  219. }
  220. /**
  221. * Host where tablet for this partition works. Useful for debugging purposes.
  222. *
  223. * Generated from protobuf field <code>int32 partition_node_id = 8;</code>
  224. * @return int
  225. */
  226. public function getPartitionNodeId()
  227. {
  228. return $this->partition_node_id;
  229. }
  230. /**
  231. * Host where tablet for this partition works. Useful for debugging purposes.
  232. *
  233. * Generated from protobuf field <code>int32 partition_node_id = 8;</code>
  234. * @param int $var
  235. * @return $this
  236. */
  237. public function setPartitionNodeId($var)
  238. {
  239. GPBUtil::checkInt32($var);
  240. $this->partition_node_id = $var;
  241. return $this;
  242. }
  243. }