PartitionInfo.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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.PartitionInfo</code>
  10. */
  11. class PartitionInfo extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Partition identifier.
  15. *
  16. * Generated from protobuf field <code>int64 partition_id = 1;</code>
  17. */
  18. protected $partition_id = 0;
  19. /**
  20. * Is partition open for write.
  21. *
  22. * Generated from protobuf field <code>bool active = 2;</code>
  23. */
  24. protected $active = false;
  25. /**
  26. * Ids of partitions which was formed when this partition was split or merged.
  27. *
  28. * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
  29. */
  30. private $child_partition_ids;
  31. /**
  32. * Ids of partitions from which this partition was formed by split or merge.
  33. *
  34. * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
  35. */
  36. private $parent_partition_ids;
  37. /**
  38. * Stats for partition, filled only when include_stats in request is true.
  39. *
  40. * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
  41. */
  42. protected $partition_stats = null;
  43. /**
  44. * Stats for consumer of this partition, filled only when include_stats in request is true.
  45. *
  46. * Generated from protobuf field <code>.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats partition_consumer_stats = 6;</code>
  47. */
  48. protected $partition_consumer_stats = null;
  49. /**
  50. * Constructor.
  51. *
  52. * @param array $data {
  53. * Optional. Data for populating the Message object.
  54. *
  55. * @type int|string $partition_id
  56. * Partition identifier.
  57. * @type bool $active
  58. * Is partition open for write.
  59. * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $child_partition_ids
  60. * Ids of partitions which was formed when this partition was split or merged.
  61. * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $parent_partition_ids
  62. * Ids of partitions from which this partition was formed by split or merge.
  63. * @type \Ydb\Topic\PartitionStats $partition_stats
  64. * Stats for partition, filled only when include_stats in request is true.
  65. * @type \Ydb\Topic\DescribeConsumerResult\PartitionConsumerStats $partition_consumer_stats
  66. * Stats for consumer of this partition, filled only when include_stats in request is true.
  67. * }
  68. */
  69. public function __construct($data = NULL) {
  70. \GPBMetadata\Protos\YdbTopic::initOnce();
  71. parent::__construct($data);
  72. }
  73. /**
  74. * Partition identifier.
  75. *
  76. * Generated from protobuf field <code>int64 partition_id = 1;</code>
  77. * @return int|string
  78. */
  79. public function getPartitionId()
  80. {
  81. return $this->partition_id;
  82. }
  83. /**
  84. * Partition identifier.
  85. *
  86. * Generated from protobuf field <code>int64 partition_id = 1;</code>
  87. * @param int|string $var
  88. * @return $this
  89. */
  90. public function setPartitionId($var)
  91. {
  92. GPBUtil::checkInt64($var);
  93. $this->partition_id = $var;
  94. return $this;
  95. }
  96. /**
  97. * Is partition open for write.
  98. *
  99. * Generated from protobuf field <code>bool active = 2;</code>
  100. * @return bool
  101. */
  102. public function getActive()
  103. {
  104. return $this->active;
  105. }
  106. /**
  107. * Is partition open for write.
  108. *
  109. * Generated from protobuf field <code>bool active = 2;</code>
  110. * @param bool $var
  111. * @return $this
  112. */
  113. public function setActive($var)
  114. {
  115. GPBUtil::checkBool($var);
  116. $this->active = $var;
  117. return $this;
  118. }
  119. /**
  120. * Ids of partitions which was formed when this partition was split or merged.
  121. *
  122. * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
  123. * @return \Google\Protobuf\Internal\RepeatedField
  124. */
  125. public function getChildPartitionIds()
  126. {
  127. return $this->child_partition_ids;
  128. }
  129. /**
  130. * Ids of partitions which was formed when this partition was split or merged.
  131. *
  132. * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
  133. * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
  134. * @return $this
  135. */
  136. public function setChildPartitionIds($var)
  137. {
  138. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
  139. $this->child_partition_ids = $arr;
  140. return $this;
  141. }
  142. /**
  143. * Ids of partitions from which this partition was formed by split or merge.
  144. *
  145. * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
  146. * @return \Google\Protobuf\Internal\RepeatedField
  147. */
  148. public function getParentPartitionIds()
  149. {
  150. return $this->parent_partition_ids;
  151. }
  152. /**
  153. * Ids of partitions from which this partition was formed by split or merge.
  154. *
  155. * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
  156. * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
  157. * @return $this
  158. */
  159. public function setParentPartitionIds($var)
  160. {
  161. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
  162. $this->parent_partition_ids = $arr;
  163. return $this;
  164. }
  165. /**
  166. * Stats for partition, filled only when include_stats in request is true.
  167. *
  168. * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
  169. * @return \Ydb\Topic\PartitionStats|null
  170. */
  171. public function getPartitionStats()
  172. {
  173. return $this->partition_stats;
  174. }
  175. public function hasPartitionStats()
  176. {
  177. return isset($this->partition_stats);
  178. }
  179. public function clearPartitionStats()
  180. {
  181. unset($this->partition_stats);
  182. }
  183. /**
  184. * Stats for partition, filled only when include_stats in request is true.
  185. *
  186. * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
  187. * @param \Ydb\Topic\PartitionStats $var
  188. * @return $this
  189. */
  190. public function setPartitionStats($var)
  191. {
  192. GPBUtil::checkMessage($var, \Ydb\Topic\PartitionStats::class);
  193. $this->partition_stats = $var;
  194. return $this;
  195. }
  196. /**
  197. * Stats for consumer of this partition, filled only when include_stats in request is true.
  198. *
  199. * Generated from protobuf field <code>.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats partition_consumer_stats = 6;</code>
  200. * @return \Ydb\Topic\DescribeConsumerResult\PartitionConsumerStats|null
  201. */
  202. public function getPartitionConsumerStats()
  203. {
  204. return $this->partition_consumer_stats;
  205. }
  206. public function hasPartitionConsumerStats()
  207. {
  208. return isset($this->partition_consumer_stats);
  209. }
  210. public function clearPartitionConsumerStats()
  211. {
  212. unset($this->partition_consumer_stats);
  213. }
  214. /**
  215. * Stats for consumer of this partition, filled only when include_stats in request is true.
  216. *
  217. * Generated from protobuf field <code>.Ydb.Topic.DescribeConsumerResult.PartitionConsumerStats partition_consumer_stats = 6;</code>
  218. * @param \Ydb\Topic\DescribeConsumerResult\PartitionConsumerStats $var
  219. * @return $this
  220. */
  221. public function setPartitionConsumerStats($var)
  222. {
  223. GPBUtil::checkMessage($var, \Ydb\Topic\DescribeConsumerResult\PartitionConsumerStats::class);
  224. $this->partition_consumer_stats = $var;
  225. return $this;
  226. }
  227. }
  228. // Adding a class alias for backwards compatibility with the previous class name.
  229. class_alias(PartitionInfo::class, \Ydb\Topic\DescribeConsumerResult_PartitionInfo::class);