Ydb.Topic.Consumer */ class Consumer extends \Google\Protobuf\Internal\Message { /** * Must have valid not empty name as a key. * * Generated from protobuf field string name = 1; */ 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 bool important = 2; */ protected $important = false; /** * All messages with smaller server written_at timestamp will be skipped. * * Generated from protobuf field .google.protobuf.Timestamp read_from = 3; */ 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 .Ydb.Topic.SupportedCodecs supported_codecs = 5; */ protected $supported_codecs = null; /** * Attributes of consumer * * Generated from protobuf field map attributes = 6; */ private $attributes; /** * Filled only when requested statistics in Describe*Request. * * Generated from protobuf field .Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7; */ 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 string name = 1; * @return string */ public function getName() { return $this->name; } /** * Must have valid not empty name as a key. * * Generated from protobuf field string name = 1; * @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 bool important = 2; * @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 bool important = 2; * @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 .google.protobuf.Timestamp read_from = 3; * @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 .google.protobuf.Timestamp read_from = 3; * @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 .Ydb.Topic.SupportedCodecs supported_codecs = 5; * @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 .Ydb.Topic.SupportedCodecs supported_codecs = 5; * @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 map attributes = 6; * @return \Google\Protobuf\Internal\MapField */ public function getAttributes() { return $this->attributes; } /** * Attributes of consumer * * Generated from protobuf field map attributes = 6; * @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 .Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7; * @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 .Ydb.Topic.Consumer.ConsumerStats consumer_stats = 7; * @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; } }