PartitionConsumerStats.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\DescribeConsumerResult;
  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.DescribeConsumerResult.PartitionConsumerStats</code>
  10. */
  11. class PartitionConsumerStats extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Last read offset from this partition.
  15. *
  16. * Generated from protobuf field <code>int64 last_read_offset = 1;</code>
  17. */
  18. protected $last_read_offset = 0;
  19. /**
  20. * Committed offset for this partition.
  21. *
  22. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  23. */
  24. protected $committed_offset = 0;
  25. /**
  26. * Reading this partition read session identifier.
  27. *
  28. * Generated from protobuf field <code>string read_session_id = 3;</code>
  29. */
  30. protected $read_session_id = '';
  31. /**
  32. * Timestamp of providing this partition to this session by server.
  33. *
  34. * Generated from protobuf field <code>.google.protobuf.Timestamp partition_read_session_create_time = 4;</code>
  35. */
  36. protected $partition_read_session_create_time = null;
  37. /**
  38. * Timestamp of last read from this partition.
  39. *
  40. * Generated from protobuf field <code>.google.protobuf.Timestamp last_read_time = 5;</code>
  41. */
  42. protected $last_read_time = null;
  43. /**
  44. * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
  45. *
  46. * Generated from protobuf field <code>.google.protobuf.Duration max_read_time_lag = 6;</code>
  47. */
  48. protected $max_read_time_lag = null;
  49. /**
  50. * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
  51. *
  52. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 7;</code>
  53. */
  54. protected $max_write_time_lag = null;
  55. /**
  56. * How much bytes were read during several windows statistics from this partiton.
  57. *
  58. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_read = 8;</code>
  59. */
  60. protected $bytes_read = null;
  61. /**
  62. * Read session name, provided by client.
  63. *
  64. * Generated from protobuf field <code>string reader_name = 11;</code>
  65. */
  66. protected $reader_name = '';
  67. /**
  68. * Host where read session connected.
  69. *
  70. * Generated from protobuf field <code>int32 connection_node_id = 12;</code>
  71. */
  72. protected $connection_node_id = 0;
  73. /**
  74. * Constructor.
  75. *
  76. * @param array $data {
  77. * Optional. Data for populating the Message object.
  78. *
  79. * @type int|string $last_read_offset
  80. * Last read offset from this partition.
  81. * @type int|string $committed_offset
  82. * Committed offset for this partition.
  83. * @type string $read_session_id
  84. * Reading this partition read session identifier.
  85. * @type \Google\Protobuf\Timestamp $partition_read_session_create_time
  86. * Timestamp of providing this partition to this session by server.
  87. * @type \Google\Protobuf\Timestamp $last_read_time
  88. * Timestamp of last read from this partition.
  89. * @type \Google\Protobuf\Duration $max_read_time_lag
  90. * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
  91. * @type \Google\Protobuf\Duration $max_write_time_lag
  92. * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
  93. * @type \Ydb\Topic\MultipleWindowsStat $bytes_read
  94. * How much bytes were read during several windows statistics from this partiton.
  95. * @type string $reader_name
  96. * Read session name, provided by client.
  97. * @type int $connection_node_id
  98. * Host where read session connected.
  99. * }
  100. */
  101. public function __construct($data = NULL) {
  102. \GPBMetadata\Protos\YdbTopic::initOnce();
  103. parent::__construct($data);
  104. }
  105. /**
  106. * Last read offset from this partition.
  107. *
  108. * Generated from protobuf field <code>int64 last_read_offset = 1;</code>
  109. * @return int|string
  110. */
  111. public function getLastReadOffset()
  112. {
  113. return $this->last_read_offset;
  114. }
  115. /**
  116. * Last read offset from this partition.
  117. *
  118. * Generated from protobuf field <code>int64 last_read_offset = 1;</code>
  119. * @param int|string $var
  120. * @return $this
  121. */
  122. public function setLastReadOffset($var)
  123. {
  124. GPBUtil::checkInt64($var);
  125. $this->last_read_offset = $var;
  126. return $this;
  127. }
  128. /**
  129. * Committed offset for this partition.
  130. *
  131. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  132. * @return int|string
  133. */
  134. public function getCommittedOffset()
  135. {
  136. return $this->committed_offset;
  137. }
  138. /**
  139. * Committed offset for this partition.
  140. *
  141. * Generated from protobuf field <code>int64 committed_offset = 2;</code>
  142. * @param int|string $var
  143. * @return $this
  144. */
  145. public function setCommittedOffset($var)
  146. {
  147. GPBUtil::checkInt64($var);
  148. $this->committed_offset = $var;
  149. return $this;
  150. }
  151. /**
  152. * Reading this partition read session identifier.
  153. *
  154. * Generated from protobuf field <code>string read_session_id = 3;</code>
  155. * @return string
  156. */
  157. public function getReadSessionId()
  158. {
  159. return $this->read_session_id;
  160. }
  161. /**
  162. * Reading this partition read session identifier.
  163. *
  164. * Generated from protobuf field <code>string read_session_id = 3;</code>
  165. * @param string $var
  166. * @return $this
  167. */
  168. public function setReadSessionId($var)
  169. {
  170. GPBUtil::checkString($var, True);
  171. $this->read_session_id = $var;
  172. return $this;
  173. }
  174. /**
  175. * Timestamp of providing this partition to this session by server.
  176. *
  177. * Generated from protobuf field <code>.google.protobuf.Timestamp partition_read_session_create_time = 4;</code>
  178. * @return \Google\Protobuf\Timestamp|null
  179. */
  180. public function getPartitionReadSessionCreateTime()
  181. {
  182. return $this->partition_read_session_create_time;
  183. }
  184. public function hasPartitionReadSessionCreateTime()
  185. {
  186. return isset($this->partition_read_session_create_time);
  187. }
  188. public function clearPartitionReadSessionCreateTime()
  189. {
  190. unset($this->partition_read_session_create_time);
  191. }
  192. /**
  193. * Timestamp of providing this partition to this session by server.
  194. *
  195. * Generated from protobuf field <code>.google.protobuf.Timestamp partition_read_session_create_time = 4;</code>
  196. * @param \Google\Protobuf\Timestamp $var
  197. * @return $this
  198. */
  199. public function setPartitionReadSessionCreateTime($var)
  200. {
  201. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  202. $this->partition_read_session_create_time = $var;
  203. return $this;
  204. }
  205. /**
  206. * Timestamp of last read from this partition.
  207. *
  208. * Generated from protobuf field <code>.google.protobuf.Timestamp last_read_time = 5;</code>
  209. * @return \Google\Protobuf\Timestamp|null
  210. */
  211. public function getLastReadTime()
  212. {
  213. return $this->last_read_time;
  214. }
  215. public function hasLastReadTime()
  216. {
  217. return isset($this->last_read_time);
  218. }
  219. public function clearLastReadTime()
  220. {
  221. unset($this->last_read_time);
  222. }
  223. /**
  224. * Timestamp of last read from this partition.
  225. *
  226. * Generated from protobuf field <code>.google.protobuf.Timestamp last_read_time = 5;</code>
  227. * @param \Google\Protobuf\Timestamp $var
  228. * @return $this
  229. */
  230. public function setLastReadTime($var)
  231. {
  232. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  233. $this->last_read_time = $var;
  234. return $this;
  235. }
  236. /**
  237. * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
  238. *
  239. * Generated from protobuf field <code>.google.protobuf.Duration max_read_time_lag = 6;</code>
  240. * @return \Google\Protobuf\Duration|null
  241. */
  242. public function getMaxReadTimeLag()
  243. {
  244. return $this->max_read_time_lag;
  245. }
  246. public function hasMaxReadTimeLag()
  247. {
  248. return isset($this->max_read_time_lag);
  249. }
  250. public function clearMaxReadTimeLag()
  251. {
  252. unset($this->max_read_time_lag);
  253. }
  254. /**
  255. * Maximum of differences between timestamp of read and write timestamp for all messages, read during last minute.
  256. *
  257. * Generated from protobuf field <code>.google.protobuf.Duration max_read_time_lag = 6;</code>
  258. * @param \Google\Protobuf\Duration $var
  259. * @return $this
  260. */
  261. public function setMaxReadTimeLag($var)
  262. {
  263. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  264. $this->max_read_time_lag = $var;
  265. return $this;
  266. }
  267. /**
  268. * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
  269. *
  270. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 7;</code>
  271. * @return \Google\Protobuf\Duration|null
  272. */
  273. public function getMaxWriteTimeLag()
  274. {
  275. return $this->max_write_time_lag;
  276. }
  277. public function hasMaxWriteTimeLag()
  278. {
  279. return isset($this->max_write_time_lag);
  280. }
  281. public function clearMaxWriteTimeLag()
  282. {
  283. unset($this->max_write_time_lag);
  284. }
  285. /**
  286. * Maximum of differences between write timestamp and create timestamp for all messages, read during last minute.
  287. *
  288. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 7;</code>
  289. * @param \Google\Protobuf\Duration $var
  290. * @return $this
  291. */
  292. public function setMaxWriteTimeLag($var)
  293. {
  294. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  295. $this->max_write_time_lag = $var;
  296. return $this;
  297. }
  298. /**
  299. * How much bytes were read during several windows statistics from this partiton.
  300. *
  301. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_read = 8;</code>
  302. * @return \Ydb\Topic\MultipleWindowsStat|null
  303. */
  304. public function getBytesRead()
  305. {
  306. return $this->bytes_read;
  307. }
  308. public function hasBytesRead()
  309. {
  310. return isset($this->bytes_read);
  311. }
  312. public function clearBytesRead()
  313. {
  314. unset($this->bytes_read);
  315. }
  316. /**
  317. * How much bytes were read during several windows statistics from this partiton.
  318. *
  319. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_read = 8;</code>
  320. * @param \Ydb\Topic\MultipleWindowsStat $var
  321. * @return $this
  322. */
  323. public function setBytesRead($var)
  324. {
  325. GPBUtil::checkMessage($var, \Ydb\Topic\MultipleWindowsStat::class);
  326. $this->bytes_read = $var;
  327. return $this;
  328. }
  329. /**
  330. * Read session name, provided by client.
  331. *
  332. * Generated from protobuf field <code>string reader_name = 11;</code>
  333. * @return string
  334. */
  335. public function getReaderName()
  336. {
  337. return $this->reader_name;
  338. }
  339. /**
  340. * Read session name, provided by client.
  341. *
  342. * Generated from protobuf field <code>string reader_name = 11;</code>
  343. * @param string $var
  344. * @return $this
  345. */
  346. public function setReaderName($var)
  347. {
  348. GPBUtil::checkString($var, True);
  349. $this->reader_name = $var;
  350. return $this;
  351. }
  352. /**
  353. * Host where read session connected.
  354. *
  355. * Generated from protobuf field <code>int32 connection_node_id = 12;</code>
  356. * @return int
  357. */
  358. public function getConnectionNodeId()
  359. {
  360. return $this->connection_node_id;
  361. }
  362. /**
  363. * Host where read session connected.
  364. *
  365. * Generated from protobuf field <code>int32 connection_node_id = 12;</code>
  366. * @param int $var
  367. * @return $this
  368. */
  369. public function setConnectionNodeId($var)
  370. {
  371. GPBUtil::checkInt32($var);
  372. $this->connection_node_id = $var;
  373. return $this;
  374. }
  375. }
  376. // Adding a class alias for backwards compatibility with the previous class name.
  377. class_alias(PartitionConsumerStats::class, \Ydb\Topic\DescribeConsumerResult_PartitionConsumerStats::class);