/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Topic/StreamReadMessage/ReadResponse/Batch.php
219 строк
7 KB
Alexei Shabalin
updated protos
17 фев 2023, 13:31
17 фев 2023, 13:31
ae6a264
Код
Авторство
О чём код?
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: protos/ydb_topic.proto namespace Ydb\Topic\StreamReadMessage\ReadResponse; use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** * Representation of sequence of client messages from one write session. * * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.ReadResponse.Batch</code> */ class Batch extends \Google\Protobuf\Internal\Message { /** * List of client messages. * * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.MessageData message_data = 1;</code> */ private $message_data; /** * Producer identifier provided by client for this batch of client messages. * * Generated from protobuf field <code>string producer_id = 2;</code> */ protected $producer_id = ''; /** * Client metadata attached to write session, the same for all messages in batch. * * Generated from protobuf field <code>map<string, string> write_session_meta = 3;</code> */ private $write_session_meta; /** * Codec that is used for data compression. * See enum Codec above for values. * * Generated from protobuf field <code>int32 codec = 4;</code> */ protected $codec = 0; /** * Persist timestamp on server for batch. * * Generated from protobuf field <code>.google.protobuf.Timestamp written_at = 5;</code> */ protected $written_at = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type array<\Ydb\Topic\StreamReadMessage\ReadResponse\MessageData>|\Google\Protobuf\Internal\RepeatedField $message_data * List of client messages. * @type string $producer_id * Producer identifier provided by client for this batch of client messages. * @type array|\Google\Protobuf\Internal\MapField $write_session_meta * Client metadata attached to write session, the same for all messages in batch. * @type int $codec * Codec that is used for data compression. * See enum Codec above for values. * @type \Google\Protobuf\Timestamp $written_at * Persist timestamp on server for batch. * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbTopic::initOnce(); parent::__construct($data); } /** * List of client messages. * * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.MessageData message_data = 1;</code> * @return \Google\Protobuf\Internal\RepeatedField */ public function getMessageData() { return $this->message_data; } /** * List of client messages. * * Generated from protobuf field <code>repeated .Ydb.Topic.StreamReadMessage.ReadResponse.MessageData message_data = 1;</code> * @param array<\Ydb\Topic\StreamReadMessage\ReadResponse\MessageData>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setMessageData($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\StreamReadMessage\ReadResponse\MessageData::class); $this->message_data = $arr; return $this; } /** * Producer identifier provided by client for this batch of client messages. * * Generated from protobuf field <code>string producer_id = 2;</code> * @return string */ public function getProducerId() { return $this->producer_id; } /** * Producer identifier provided by client for this batch of client messages. * * Generated from protobuf field <code>string producer_id = 2;</code> * @param string $var * @return $this */ public function setProducerId($var) { GPBUtil::checkString($var, True); $this->producer_id = $var; return $this; } /** * Client metadata attached to write session, the same for all messages in batch. * * Generated from protobuf field <code>map<string, string> write_session_meta = 3;</code> * @return \Google\Protobuf\Internal\MapField */ public function getWriteSessionMeta() { return $this->write_session_meta; } /** * Client metadata attached to write session, the same for all messages in batch. * * Generated from protobuf field <code>map<string, string> write_session_meta = 3;</code> * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ public function setWriteSessionMeta($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); $this->write_session_meta = $arr; return $this; } /** * Codec that is used for data compression. * See enum Codec above for values. * * Generated from protobuf field <code>int32 codec = 4;</code> * @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 <code>int32 codec = 4;</code> * @param int $var * @return $this */ public function setCodec($var) { GPBUtil::checkInt32($var); $this->codec = $var; return $this; } /** * Persist timestamp on server for batch. * * Generated from protobuf field <code>.google.protobuf.Timestamp written_at = 5;</code> * @return \Google\Protobuf\Timestamp|null */ public function getWrittenAt() { return $this->written_at; } public function hasWrittenAt() { return isset($this->written_at); } public function clearWrittenAt() { unset($this->written_at); } /** * Persist timestamp on server for batch. * * Generated from protobuf field <code>.google.protobuf.Timestamp written_at = 5;</code> * @param \Google\Protobuf\Timestamp $var * @return $this */ public function setWrittenAt($var) { GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); $this->written_at = $var; return $this; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Batch::class, \Ydb\Topic\StreamReadMessage_ReadResponse_Batch::class);