123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamWriteMessage\WriteResponse;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Acknowledgment for one persistently written message.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck</code>
- */
- class WriteAck extends \Google\Protobuf\Internal\Message
- {
- /**
- * Sequence number as in WriteRequest.
- *
- * Generated from protobuf field <code>int64 seq_no = 1;</code>
- */
- protected $seq_no = 0;
- protected $message_write_status;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $seq_no
- * Sequence number as in WriteRequest.
- * @type \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written $written
- * @type \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped $skipped
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Sequence number as in WriteRequest.
- *
- * Generated from protobuf field <code>int64 seq_no = 1;</code>
- * @return int|string
- */
- public function getSeqNo()
- {
- return $this->seq_no;
- }
- /**
- * Sequence number as in WriteRequest.
- *
- * Generated from protobuf field <code>int64 seq_no = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setSeqNo($var)
- {
- GPBUtil::checkInt64($var);
- $this->seq_no = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Written written = 2;</code>
- * @return \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written|null
- */
- public function getWritten()
- {
- return $this->readOneof(2);
- }
- public function hasWritten()
- {
- return $this->hasOneof(2);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Written written = 2;</code>
- * @param \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written $var
- * @return $this
- */
- public function setWritten($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Written::class);
- $this->writeOneof(2, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped skipped = 3;</code>
- * @return \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped|null
- */
- public function getSkipped()
- {
- return $this->readOneof(3);
- }
- public function hasSkipped()
- {
- return $this->hasOneof(3);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Topic.StreamWriteMessage.WriteResponse.WriteAck.Skipped skipped = 3;</code>
- * @param \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped $var
- * @return $this
- */
- public function setSkipped($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\StreamWriteMessage\WriteResponse\WriteAck\Skipped::class);
- $this->writeOneof(3, $var);
- return $this;
- }
- /**
- * @return string
- */
- public function getMessageWriteStatus()
- {
- return $this->whichOneof("message_write_status");
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(WriteAck::class, \Ydb\Topic\StreamWriteMessage_WriteResponse_WriteAck::class);
|