Ydb.Topic.StreamWriteMessage.WriteRequest
*/
class WriteRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;
*/
private $messages;
/**
* Codec that is used for data compression.
* See enum Codec above for values.
*
* Generated from protobuf field int32 codec = 2;
*/
protected $codec = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData>|\Google\Protobuf\Internal\RepeatedField $messages
* @type int $codec
* Codec that is used for data compression.
* See enum Codec above for values.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getMessages()
{
return $this->messages;
}
/**
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData messages = 1;
* @param array<\Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setMessages($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamWriteMessage\WriteRequest\MessageData::class);
$this->messages = $arr;
return $this;
}
/**
* Codec that is used for data compression.
* See enum Codec above for values.
*
* Generated from protobuf field int32 codec = 2;
* @return int
*/
public function getCodec()
{
return $this->codec;
}
/**
* Codec that is used for data compression.
* See enum Codec above for values.
*
* Generated from protobuf field int32 codec = 2;
* @param int $var
* @return $this
*/
public function setCodec($var)
{
GPBUtil::checkInt32($var);
$this->codec = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WriteRequest::class, \Ydb\Topic\StreamWriteMessage_WriteRequest::class);