TopicStats.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic\DescribeTopicResult;
  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.DescribeTopicResult.TopicStats</code>
  10. */
  11. class TopicStats extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Approximate size of topic.
  15. *
  16. * Generated from protobuf field <code>int64 store_size_bytes = 1;</code>
  17. */
  18. protected $store_size_bytes = 0;
  19. /**
  20. * Minimum of timestamps of last write among all partitions.
  21. *
  22. * Generated from protobuf field <code>.google.protobuf.Timestamp min_last_write_time = 2;</code>
  23. */
  24. protected $min_last_write_time = null;
  25. /**
  26. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  27. *
  28. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 3;</code>
  29. */
  30. protected $max_write_time_lag = null;
  31. /**
  32. * How much bytes were written statistics.
  33. *
  34. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 4;</code>
  35. */
  36. protected $bytes_written = null;
  37. /**
  38. * Constructor.
  39. *
  40. * @param array $data {
  41. * Optional. Data for populating the Message object.
  42. *
  43. * @type int|string $store_size_bytes
  44. * Approximate size of topic.
  45. * @type \Google\Protobuf\Timestamp $min_last_write_time
  46. * Minimum of timestamps of last write among all partitions.
  47. * @type \Google\Protobuf\Duration $max_write_time_lag
  48. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  49. * @type \Ydb\Topic\MultipleWindowsStat $bytes_written
  50. * How much bytes were written statistics.
  51. * }
  52. */
  53. public function __construct($data = NULL) {
  54. \GPBMetadata\Protos\YdbTopic::initOnce();
  55. parent::__construct($data);
  56. }
  57. /**
  58. * Approximate size of topic.
  59. *
  60. * Generated from protobuf field <code>int64 store_size_bytes = 1;</code>
  61. * @return int|string
  62. */
  63. public function getStoreSizeBytes()
  64. {
  65. return $this->store_size_bytes;
  66. }
  67. /**
  68. * Approximate size of topic.
  69. *
  70. * Generated from protobuf field <code>int64 store_size_bytes = 1;</code>
  71. * @param int|string $var
  72. * @return $this
  73. */
  74. public function setStoreSizeBytes($var)
  75. {
  76. GPBUtil::checkInt64($var);
  77. $this->store_size_bytes = $var;
  78. return $this;
  79. }
  80. /**
  81. * Minimum of timestamps of last write among all partitions.
  82. *
  83. * Generated from protobuf field <code>.google.protobuf.Timestamp min_last_write_time = 2;</code>
  84. * @return \Google\Protobuf\Timestamp|null
  85. */
  86. public function getMinLastWriteTime()
  87. {
  88. return $this->min_last_write_time;
  89. }
  90. public function hasMinLastWriteTime()
  91. {
  92. return isset($this->min_last_write_time);
  93. }
  94. public function clearMinLastWriteTime()
  95. {
  96. unset($this->min_last_write_time);
  97. }
  98. /**
  99. * Minimum of timestamps of last write among all partitions.
  100. *
  101. * Generated from protobuf field <code>.google.protobuf.Timestamp min_last_write_time = 2;</code>
  102. * @param \Google\Protobuf\Timestamp $var
  103. * @return $this
  104. */
  105. public function setMinLastWriteTime($var)
  106. {
  107. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  108. $this->min_last_write_time = $var;
  109. return $this;
  110. }
  111. /**
  112. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  113. *
  114. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 3;</code>
  115. * @return \Google\Protobuf\Duration|null
  116. */
  117. public function getMaxWriteTimeLag()
  118. {
  119. return $this->max_write_time_lag;
  120. }
  121. public function hasMaxWriteTimeLag()
  122. {
  123. return isset($this->max_write_time_lag);
  124. }
  125. public function clearMaxWriteTimeLag()
  126. {
  127. unset($this->max_write_time_lag);
  128. }
  129. /**
  130. * Maximum of differences between write timestamp and create timestamp for all messages, written during last minute.
  131. *
  132. * Generated from protobuf field <code>.google.protobuf.Duration max_write_time_lag = 3;</code>
  133. * @param \Google\Protobuf\Duration $var
  134. * @return $this
  135. */
  136. public function setMaxWriteTimeLag($var)
  137. {
  138. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  139. $this->max_write_time_lag = $var;
  140. return $this;
  141. }
  142. /**
  143. * How much bytes were written statistics.
  144. *
  145. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 4;</code>
  146. * @return \Ydb\Topic\MultipleWindowsStat|null
  147. */
  148. public function getBytesWritten()
  149. {
  150. return $this->bytes_written;
  151. }
  152. public function hasBytesWritten()
  153. {
  154. return isset($this->bytes_written);
  155. }
  156. public function clearBytesWritten()
  157. {
  158. unset($this->bytes_written);
  159. }
  160. /**
  161. * How much bytes were written statistics.
  162. *
  163. * Generated from protobuf field <code>.Ydb.Topic.MultipleWindowsStat bytes_written = 4;</code>
  164. * @param \Ydb\Topic\MultipleWindowsStat $var
  165. * @return $this
  166. */
  167. public function setBytesWritten($var)
  168. {
  169. GPBUtil::checkMessage($var, \Ydb\Topic\MultipleWindowsStat::class);
  170. $this->bytes_written = $var;
  171. return $this;
  172. }
  173. }
  174. // Adding a class alias for backwards compatibility with the previous class name.
  175. class_alias(TopicStats::class, \Ydb\Topic\DescribeTopicResult_TopicStats::class);