PartitionInfo.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.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. * Constructor.
  45. *
  46. * @param array $data {
  47. * Optional. Data for populating the Message object.
  48. *
  49. * @type int|string $partition_id
  50. * Partition identifier.
  51. * @type bool $active
  52. * Is partition open for write.
  53. * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $child_partition_ids
  54. * Ids of partitions which was formed when this partition was split or merged.
  55. * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $parent_partition_ids
  56. * Ids of partitions from which this partition was formed by split or merge.
  57. * @type \Ydb\Topic\PartitionStats $partition_stats
  58. * Stats for partition, filled only when include_stats in request is true.
  59. * }
  60. */
  61. public function __construct($data = NULL) {
  62. \GPBMetadata\Protos\YdbTopic::initOnce();
  63. parent::__construct($data);
  64. }
  65. /**
  66. * Partition identifier.
  67. *
  68. * Generated from protobuf field <code>int64 partition_id = 1;</code>
  69. * @return int|string
  70. */
  71. public function getPartitionId()
  72. {
  73. return $this->partition_id;
  74. }
  75. /**
  76. * Partition identifier.
  77. *
  78. * Generated from protobuf field <code>int64 partition_id = 1;</code>
  79. * @param int|string $var
  80. * @return $this
  81. */
  82. public function setPartitionId($var)
  83. {
  84. GPBUtil::checkInt64($var);
  85. $this->partition_id = $var;
  86. return $this;
  87. }
  88. /**
  89. * Is partition open for write.
  90. *
  91. * Generated from protobuf field <code>bool active = 2;</code>
  92. * @return bool
  93. */
  94. public function getActive()
  95. {
  96. return $this->active;
  97. }
  98. /**
  99. * Is partition open for write.
  100. *
  101. * Generated from protobuf field <code>bool active = 2;</code>
  102. * @param bool $var
  103. * @return $this
  104. */
  105. public function setActive($var)
  106. {
  107. GPBUtil::checkBool($var);
  108. $this->active = $var;
  109. return $this;
  110. }
  111. /**
  112. * Ids of partitions which was formed when this partition was split or merged.
  113. *
  114. * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
  115. * @return \Google\Protobuf\Internal\RepeatedField
  116. */
  117. public function getChildPartitionIds()
  118. {
  119. return $this->child_partition_ids;
  120. }
  121. /**
  122. * Ids of partitions which was formed when this partition was split or merged.
  123. *
  124. * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
  125. * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
  126. * @return $this
  127. */
  128. public function setChildPartitionIds($var)
  129. {
  130. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
  131. $this->child_partition_ids = $arr;
  132. return $this;
  133. }
  134. /**
  135. * Ids of partitions from which this partition was formed by split or merge.
  136. *
  137. * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
  138. * @return \Google\Protobuf\Internal\RepeatedField
  139. */
  140. public function getParentPartitionIds()
  141. {
  142. return $this->parent_partition_ids;
  143. }
  144. /**
  145. * Ids of partitions from which this partition was formed by split or merge.
  146. *
  147. * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
  148. * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
  149. * @return $this
  150. */
  151. public function setParentPartitionIds($var)
  152. {
  153. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
  154. $this->parent_partition_ids = $arr;
  155. return $this;
  156. }
  157. /**
  158. * Stats for partition, filled only when include_stats in request is true.
  159. *
  160. * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
  161. * @return \Ydb\Topic\PartitionStats|null
  162. */
  163. public function getPartitionStats()
  164. {
  165. return $this->partition_stats;
  166. }
  167. public function hasPartitionStats()
  168. {
  169. return isset($this->partition_stats);
  170. }
  171. public function clearPartitionStats()
  172. {
  173. unset($this->partition_stats);
  174. }
  175. /**
  176. * Stats for partition, filled only when include_stats in request is true.
  177. *
  178. * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
  179. * @param \Ydb\Topic\PartitionStats $var
  180. * @return $this
  181. */
  182. public function setPartitionStats($var)
  183. {
  184. GPBUtil::checkMessage($var, \Ydb\Topic\PartitionStats::class);
  185. $this->partition_stats = $var;
  186. return $this;
  187. }
  188. }
  189. // Adding a class alias for backwards compatibility with the previous class name.
  190. class_alias(PartitionInfo::class, \Ydb\Topic\DescribeTopicResult_PartitionInfo::class);