Ydb.Topic.StreamReadMessage.InitRequest
*/
class InitRequest extends \Google\Protobuf\Internal\Message
{
/**
* Message that describes topic to read.
* Topics that will be read by this session.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;
*/
private $topics_read_settings;
/**
* Path of consumer that is used for reading by this session.
*
* Generated from protobuf field string consumer = 2;
*/
protected $consumer = '';
/**
* Optional name. Will be shown in debug stat.
*
* Generated from protobuf field string reader_name = 3;
*/
protected $reader_name = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings>|\Google\Protobuf\Internal\RepeatedField $topics_read_settings
* Message that describes topic to read.
* Topics that will be read by this session.
* @type string $consumer
* Path of consumer that is used for reading by this session.
* @type string $reader_name
* Optional name. Will be shown in debug stat.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Message that describes topic to read.
* Topics that will be read by this session.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getTopicsReadSettings()
{
return $this->topics_read_settings;
}
/**
* Message that describes topic to read.
* Topics that will be read by this session.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings topics_read_settings = 1;
* @param array<\Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setTopicsReadSettings($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\InitRequest\TopicReadSettings::class);
$this->topics_read_settings = $arr;
return $this;
}
/**
* Path of consumer that is used for reading by this session.
*
* Generated from protobuf field string consumer = 2;
* @return string
*/
public function getConsumer()
{
return $this->consumer;
}
/**
* Path of consumer that is used for reading by this session.
*
* Generated from protobuf field string consumer = 2;
* @param string $var
* @return $this
*/
public function setConsumer($var)
{
GPBUtil::checkString($var, True);
$this->consumer = $var;
return $this;
}
/**
* Optional name. Will be shown in debug stat.
*
* Generated from protobuf field string reader_name = 3;
* @return string
*/
public function getReaderName()
{
return $this->reader_name;
}
/**
* Optional name. Will be shown in debug stat.
*
* Generated from protobuf field string reader_name = 3;
* @param string $var
* @return $this
*/
public function setReaderName($var)
{
GPBUtil::checkString($var, True);
$this->reader_name = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(InitRequest::class, \Ydb\Topic\StreamReadMessage_InitRequest::class);