Ydb.Topic.AlterConsumer
*/
class AlterConsumer 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 optional bool set_important = 2;
*/
protected $set_important = null;
/**
* All messages with smaller server written_at timestamp will be skipped.
*
* Generated from protobuf field .google.protobuf.Timestamp set_read_from = 3;
*/
protected $set_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 set_supported_codecs = 5;
*/
protected $set_supported_codecs = null;
/**
* User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
* Leave the value blank to drop an attribute.
*
* Generated from protobuf field map alter_attributes = 6;
*/
private $alter_attributes;
/**
* 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 $set_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 $set_read_from
* All messages with smaller server written_at timestamp will be skipped.
* @type \Ydb\Topic\SupportedCodecs $set_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 $alter_attributes
* User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
* Leave the value blank to drop an attribute.
* }
*/
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 optional bool set_important = 2;
* @return bool
*/
public function getSetImportant()
{
return isset($this->set_important) ? $this->set_important : false;
}
public function hasSetImportant()
{
return isset($this->set_important);
}
public function clearSetImportant()
{
unset($this->set_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 optional bool set_important = 2;
* @param bool $var
* @return $this
*/
public function setSetImportant($var)
{
GPBUtil::checkBool($var);
$this->set_important = $var;
return $this;
}
/**
* All messages with smaller server written_at timestamp will be skipped.
*
* Generated from protobuf field .google.protobuf.Timestamp set_read_from = 3;
* @return \Google\Protobuf\Timestamp|null
*/
public function getSetReadFrom()
{
return $this->set_read_from;
}
public function hasSetReadFrom()
{
return isset($this->set_read_from);
}
public function clearSetReadFrom()
{
unset($this->set_read_from);
}
/**
* All messages with smaller server written_at timestamp will be skipped.
*
* Generated from protobuf field .google.protobuf.Timestamp set_read_from = 3;
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setSetReadFrom($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->set_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 set_supported_codecs = 5;
* @return \Ydb\Topic\SupportedCodecs|null
*/
public function getSetSupportedCodecs()
{
return $this->set_supported_codecs;
}
public function hasSetSupportedCodecs()
{
return isset($this->set_supported_codecs);
}
public function clearSetSupportedCodecs()
{
unset($this->set_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 set_supported_codecs = 5;
* @param \Ydb\Topic\SupportedCodecs $var
* @return $this
*/
public function setSetSupportedCodecs($var)
{
GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
$this->set_supported_codecs = $var;
return $this;
}
/**
* User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
* Leave the value blank to drop an attribute.
*
* Generated from protobuf field map alter_attributes = 6;
* @return \Google\Protobuf\Internal\MapField
*/
public function getAlterAttributes()
{
return $this->alter_attributes;
}
/**
* User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
* Leave the value blank to drop an attribute.
*
* Generated from protobuf field map alter_attributes = 6;
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setAlterAttributes($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
$this->alter_attributes = $arr;
return $this;
}
}