DescribeConsumerResult.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Describe topic's consumer result message that will be inside DescribeConsumerResponse.operation.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.DescribeConsumerResult</code>
  12. */
  13. class DescribeConsumerResult extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Description of scheme object.
  17. *
  18. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  19. */
  20. protected $self = null;
  21. /**
  22. * Generated from protobuf field <code>.Ydb.Topic.Consumer consumer = 2;</code>
  23. */
  24. protected $consumer = null;
  25. /**
  26. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeConsumerResult.PartitionInfo partitions = 3;</code>
  27. */
  28. private $partitions;
  29. /**
  30. * Constructor.
  31. *
  32. * @param array $data {
  33. * Optional. Data for populating the Message object.
  34. *
  35. * @type \Ydb\Scheme\Entry $self
  36. * Description of scheme object.
  37. * @type \Ydb\Topic\Consumer $consumer
  38. * @type array<\Ydb\Topic\DescribeConsumerResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $partitions
  39. * }
  40. */
  41. public function __construct($data = NULL) {
  42. \GPBMetadata\Protos\YdbTopic::initOnce();
  43. parent::__construct($data);
  44. }
  45. /**
  46. * Description of scheme object.
  47. *
  48. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  49. * @return \Ydb\Scheme\Entry|null
  50. */
  51. public function getSelf()
  52. {
  53. return $this->self;
  54. }
  55. public function hasSelf()
  56. {
  57. return isset($this->self);
  58. }
  59. public function clearSelf()
  60. {
  61. unset($this->self);
  62. }
  63. /**
  64. * Description of scheme object.
  65. *
  66. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  67. * @param \Ydb\Scheme\Entry $var
  68. * @return $this
  69. */
  70. public function setSelf($var)
  71. {
  72. GPBUtil::checkMessage($var, \Ydb\Scheme\Entry::class);
  73. $this->self = $var;
  74. return $this;
  75. }
  76. /**
  77. * Generated from protobuf field <code>.Ydb.Topic.Consumer consumer = 2;</code>
  78. * @return \Ydb\Topic\Consumer|null
  79. */
  80. public function getConsumer()
  81. {
  82. return $this->consumer;
  83. }
  84. public function hasConsumer()
  85. {
  86. return isset($this->consumer);
  87. }
  88. public function clearConsumer()
  89. {
  90. unset($this->consumer);
  91. }
  92. /**
  93. * Generated from protobuf field <code>.Ydb.Topic.Consumer consumer = 2;</code>
  94. * @param \Ydb\Topic\Consumer $var
  95. * @return $this
  96. */
  97. public function setConsumer($var)
  98. {
  99. GPBUtil::checkMessage($var, \Ydb\Topic\Consumer::class);
  100. $this->consumer = $var;
  101. return $this;
  102. }
  103. /**
  104. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeConsumerResult.PartitionInfo partitions = 3;</code>
  105. * @return \Google\Protobuf\Internal\RepeatedField
  106. */
  107. public function getPartitions()
  108. {
  109. return $this->partitions;
  110. }
  111. /**
  112. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeConsumerResult.PartitionInfo partitions = 3;</code>
  113. * @param array<\Ydb\Topic\DescribeConsumerResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $var
  114. * @return $this
  115. */
  116. public function setPartitions($var)
  117. {
  118. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\DescribeConsumerResult\PartitionInfo::class);
  119. $this->partitions = $arr;
  120. return $this;
  121. }
  122. }