123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Consumer description.
- *
- * Generated from protobuf message <code>Ydb.Topic.Consumer</code>
- */
- class Consumer extends \Google\Protobuf\Internal\Message
- {
- /**
- * Must have valid not empty name as a key.
- *
- * Generated from protobuf field <code>string name = 1;</code>
- */
- protected $name = '';
- /**
- * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
- * User should take care that such consumer never stalls, to prevent running out of disk space.
- * Flag that this consumer is important.
- *
- * Generated from protobuf field <code>bool important = 2;</code>
- */
- protected $important = false;
- /**
- * All messages with smaller server written_at timestamp will be skipped.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 3;</code>
- */
- protected $read_from = null;
- /**
- * List of supported codecs by this consumer.
- * supported_codecs on topic must be contained inside this list.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 5;</code>
- */
- protected $supported_codecs = null;
- /**
- * Attributes of consumer
- *
- * Generated from protobuf field <code>map<string, string> attributes = 6;</code>
- */
- private $attributes;
- /**
- * Filled only when requested statistics in Describe*Request.
- *
- * Generated from protobuf field <code>.Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7;</code>
- */
- protected $consumer_stats = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Must have valid not empty name as a key.
- * @type bool $important
- * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
- * User should take care that such consumer never stalls, to prevent running out of disk space.
- * Flag that this consumer is important.
- * @type \Google\Protobuf\Timestamp $read_from
- * All messages with smaller server written_at timestamp will be skipped.
- * @type \Ydb\Topic\SupportedCodecs $supported_codecs
- * List of supported codecs by this consumer.
- * supported_codecs on topic must be contained inside this list.
- * @type array|\Google\Protobuf\Internal\MapField $attributes
- * Attributes of consumer
- * @type \Ydb\Topic\Consumer\ConsumerStats $consumer_stats
- * Filled only when requested statistics in Describe*Request.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Must have valid not empty name as a key.
- *
- * Generated from protobuf field <code>string name = 1;</code>
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Must have valid not empty name as a key.
- *
- * Generated from protobuf field <code>string name = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- return $this;
- }
- /**
- * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
- * User should take care that such consumer never stalls, to prevent running out of disk space.
- * Flag that this consumer is important.
- *
- * Generated from protobuf field <code>bool important = 2;</code>
- * @return bool
- */
- public function getImportant()
- {
- return $this->important;
- }
- /**
- * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
- * User should take care that such consumer never stalls, to prevent running out of disk space.
- * Flag that this consumer is important.
- *
- * Generated from protobuf field <code>bool important = 2;</code>
- * @param bool $var
- * @return $this
- */
- public function setImportant($var)
- {
- GPBUtil::checkBool($var);
- $this->important = $var;
- return $this;
- }
- /**
- * All messages with smaller server written_at timestamp will be skipped.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 3;</code>
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getReadFrom()
- {
- return $this->read_from;
- }
- public function hasReadFrom()
- {
- return isset($this->read_from);
- }
- public function clearReadFrom()
- {
- unset($this->read_from);
- }
- /**
- * All messages with smaller server written_at timestamp will be skipped.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 3;</code>
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setReadFrom($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->read_from = $var;
- return $this;
- }
- /**
- * List of supported codecs by this consumer.
- * supported_codecs on topic must be contained inside this list.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 5;</code>
- * @return \Ydb\Topic\SupportedCodecs|null
- */
- public function getSupportedCodecs()
- {
- return $this->supported_codecs;
- }
- public function hasSupportedCodecs()
- {
- return isset($this->supported_codecs);
- }
- public function clearSupportedCodecs()
- {
- unset($this->supported_codecs);
- }
- /**
- * List of supported codecs by this consumer.
- * supported_codecs on topic must be contained inside this list.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 5;</code>
- * @param \Ydb\Topic\SupportedCodecs $var
- * @return $this
- */
- public function setSupportedCodecs($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
- $this->supported_codecs = $var;
- return $this;
- }
- /**
- * Attributes of consumer
- *
- * Generated from protobuf field <code>map<string, string> attributes = 6;</code>
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
- /**
- * Attributes of consumer
- *
- * Generated from protobuf field <code>map<string, string> attributes = 6;</code>
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAttributes($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->attributes = $arr;
- return $this;
- }
- /**
- * Filled only when requested statistics in Describe*Request.
- *
- * Generated from protobuf field <code>.Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7;</code>
- * @return \Ydb\Topic\Consumer\ConsumerStats|null
- */
- public function getConsumerStats()
- {
- return $this->consumer_stats;
- }
- public function hasConsumerStats()
- {
- return isset($this->consumer_stats);
- }
- public function clearConsumerStats()
- {
- unset($this->consumer_stats);
- }
- /**
- * Filled only when requested statistics in Describe*Request.
- *
- * Generated from protobuf field <code>.Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7;</code>
- * @param \Ydb\Topic\Consumer\ConsumerStats $var
- * @return $this
- */
- public function setConsumerStats($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\Consumer\ConsumerStats::class);
- $this->consumer_stats = $var;
- return $this;
- }
- }
|