Ydb.Topic.StreamWriteMessage.WriteResponse
*/
class WriteResponse extends \Google\Protobuf\Internal\Message
{
/**
* Number of acks is equal to number of messages in the corresponding WriteRequests.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;
*/
private $acks;
/**
* Assigned partition for all client messages inside this batch.
* This actual partition may differ from that returned in InitResponse
* or other WriteResponses in this write session.
*
* Generated from protobuf field int64 partition_id = 2;
*/
protected $partition_id = 0;
/**
* Write statistics for this sequence of client messages.
*
* Generated from protobuf field .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;
*/
protected $write_statistics = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type array<\Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck>|\Google\Protobuf\Internal\RepeatedField $acks
* Number of acks is equal to number of messages in the corresponding WriteRequests.
* @type int|string $partition_id
* Assigned partition for all client messages inside this batch.
* This actual partition may differ from that returned in InitResponse
* or other WriteResponses in this write session.
* @type \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteStatistics $write_statistics
* Write statistics for this sequence of client messages.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Number of acks is equal to number of messages in the corresponding WriteRequests.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAcks()
{
return $this->acks;
}
/**
* Number of acks is equal to number of messages in the corresponding WriteRequests.
*
* Generated from protobuf field repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;
* @param array<\Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAcks($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck::class);
$this->acks = $arr;
return $this;
}
/**
* Assigned partition for all client messages inside this batch.
* This actual partition may differ from that returned in InitResponse
* or other WriteResponses in this write session.
*
* Generated from protobuf field int64 partition_id = 2;
* @return int|string
*/
public function getPartitionId()
{
return $this->partition_id;
}
/**
* Assigned partition for all client messages inside this batch.
* This actual partition may differ from that returned in InitResponse
* or other WriteResponses in this write session.
*
* Generated from protobuf field int64 partition_id = 2;
* @param int|string $var
* @return $this
*/
public function setPartitionId($var)
{
GPBUtil::checkInt64($var);
$this->partition_id = $var;
return $this;
}
/**
* Write statistics for this sequence of client messages.
*
* Generated from protobuf field .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;
* @return \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteStatistics|null
*/
public function getWriteStatistics()
{
return $this->write_statistics;
}
public function hasWriteStatistics()
{
return isset($this->write_statistics);
}
public function clearWriteStatistics()
{
unset($this->write_statistics);
}
/**
* Write statistics for this sequence of client messages.
*
* Generated from protobuf field .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;
* @param \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteStatistics $var
* @return $this
*/
public function setWriteStatistics($var)
{
GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteStatistics::class);
$this->write_statistics = $var;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(WriteResponse::class, \Ydb\Topic\StreamWriteMessage_WriteResponse::class);