123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamWriteMessage;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Message that represents acknowledgment for sequence of client messages.
- * This sequence is persisted together so write statistics is for messages batch.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.WriteResponse</code>
- */
- class WriteResponse extends \Google\Protobuf\Internal\Message
- {
- /**
- * Number of acks is equal to number of messages in the corresponding WriteRequests.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;</code>
- */
- 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 <code>int64 partition_id = 2;</code>
- */
- protected $partition_id = 0;
- /**
- * Write statistics for this sequence of client messages.
- *
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;</code>
- */
- 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 <code>repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;</code>
- * @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 <code>repeated .Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck acks = 1;</code>
- * @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 <code>int64 partition_id = 2;</code>
- * @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 <code>int64 partition_id = 2;</code>
- * @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 <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;</code>
- * @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 <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteStatistics write_statistics = 3;</code>
- * @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);
|