123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\DescribeTopicResult;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Topic.DescribeTopicResult.PartitionInfo</code>
- */
- class PartitionInfo extends \Google\Protobuf\Internal\Message
- {
- /**
- * Partition identifier.
- *
- * Generated from protobuf field <code>int64 partition_id = 1;</code>
- */
- protected $partition_id = 0;
- /**
- * Is partition open for write.
- *
- * Generated from protobuf field <code>bool active = 2;</code>
- */
- protected $active = false;
- /**
- * Ids of partitions which was formed when this partition was split or merged.
- *
- * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
- */
- private $child_partition_ids;
- /**
- * Ids of partitions from which this partition was formed by split or merge.
- *
- * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
- */
- private $parent_partition_ids;
- /**
- * Stats for partition, filled only when include_stats in request is true.
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
- */
- protected $partition_stats = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $partition_id
- * Partition identifier.
- * @type bool $active
- * Is partition open for write.
- * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $child_partition_ids
- * Ids of partitions which was formed when this partition was split or merged.
- * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $parent_partition_ids
- * Ids of partitions from which this partition was formed by split or merge.
- * @type \Ydb\Topic\PartitionStats $partition_stats
- * Stats for partition, filled only when include_stats in request is true.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Partition identifier.
- *
- * Generated from protobuf field <code>int64 partition_id = 1;</code>
- * @return int|string
- */
- public function getPartitionId()
- {
- return $this->partition_id;
- }
- /**
- * Partition identifier.
- *
- * Generated from protobuf field <code>int64 partition_id = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionId($var)
- {
- GPBUtil::checkInt64($var);
- $this->partition_id = $var;
- return $this;
- }
- /**
- * Is partition open for write.
- *
- * Generated from protobuf field <code>bool active = 2;</code>
- * @return bool
- */
- public function getActive()
- {
- return $this->active;
- }
- /**
- * Is partition open for write.
- *
- * Generated from protobuf field <code>bool active = 2;</code>
- * @param bool $var
- * @return $this
- */
- public function setActive($var)
- {
- GPBUtil::checkBool($var);
- $this->active = $var;
- return $this;
- }
- /**
- * Ids of partitions which was formed when this partition was split or merged.
- *
- * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getChildPartitionIds()
- {
- return $this->child_partition_ids;
- }
- /**
- * Ids of partitions which was formed when this partition was split or merged.
- *
- * Generated from protobuf field <code>repeated int64 child_partition_ids = 3;</code>
- * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setChildPartitionIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
- $this->child_partition_ids = $arr;
- return $this;
- }
- /**
- * Ids of partitions from which this partition was formed by split or merge.
- *
- * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getParentPartitionIds()
- {
- return $this->parent_partition_ids;
- }
- /**
- * Ids of partitions from which this partition was formed by split or merge.
- *
- * Generated from protobuf field <code>repeated int64 parent_partition_ids = 4;</code>
- * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setParentPartitionIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
- $this->parent_partition_ids = $arr;
- return $this;
- }
- /**
- * Stats for partition, filled only when include_stats in request is true.
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
- * @return \Ydb\Topic\PartitionStats|null
- */
- public function getPartitionStats()
- {
- return $this->partition_stats;
- }
- public function hasPartitionStats()
- {
- return isset($this->partition_stats);
- }
- public function clearPartitionStats()
- {
- unset($this->partition_stats);
- }
- /**
- * Stats for partition, filled only when include_stats in request is true.
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitionStats partition_stats = 5;</code>
- * @param \Ydb\Topic\PartitionStats $var
- * @return $this
- */
- public function setPartitionStats($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\PartitionStats::class);
- $this->partition_stats = $var;
- return $this;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(PartitionInfo::class, \Ydb\Topic\DescribeTopicResult_PartitionInfo::class);
|