/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Topic/StreamWriteMessage/InitRequest.php
258 строк
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\StreamWriteMessage; use Google\Protobuf\Internal\GPBType; use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\Internal\GPBUtil; /** * Handshake request that must be sent to server first. * * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.InitRequest</code> */ class InitRequest extends \Google\Protobuf\Internal\Message { /** * Full path of topic to write to. * * Generated from protobuf field <code>string path = 1;</code> */ protected $path = ''; /** * Producer identifier of client data stream. * Used for message deduplication by sequence numbers. * * Generated from protobuf field <code>string producer_id = 2;</code> */ protected $producer_id = ''; /** * User metadata attached to this write session. * Reader will get this session meta data with each message read. * * Generated from protobuf field <code>map<string, string> write_session_meta = 3;</code> */ private $write_session_meta; /** * Explicitly request for last sequential number * It may be expensive, if producer wrote to many partitions before. * * Generated from protobuf field <code>bool get_last_seq_no = 6;</code> */ protected $get_last_seq_no = false; protected $partitioning; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $path * Full path of topic to write to. * @type string $producer_id * Producer identifier of client data stream. * Used for message deduplication by sequence numbers. * @type array|\Google\Protobuf\Internal\MapField $write_session_meta * User metadata attached to this write session. * Reader will get this session meta data with each message read. * @type string $message_group_id * All messages with given pair (producer_id, message_group_id) go to single partition in order of writes. * @type int|string $partition_id * Explicit partition id to write to. * @type bool $get_last_seq_no * Explicitly request for last sequential number * It may be expensive, if producer wrote to many partitions before. * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbTopic::initOnce(); parent::__construct($data); } /** * Full path of topic to write to. * * Generated from protobuf field <code>string path = 1;</code> * @return string */ public function getPath() { return $this->path; } /** * Full path of topic to write to. * * Generated from protobuf field <code>string path = 1;</code> * @param string $var * @return $this */ public function setPath($var) { GPBUtil::checkString($var, True); $this->path = $var; return $this; } /** * Producer identifier of client data stream. * Used for message deduplication by sequence numbers. * * Generated from protobuf field <code>string producer_id = 2;</code> * @return string */ public function getProducerId() { return $this->producer_id; } /** * Producer identifier of client data stream. * Used for message deduplication by sequence numbers. * * 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; } /** * User metadata attached to this write session. * Reader will get this session meta data with each message read. * * 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; } /** * User metadata attached to this write session. * Reader will get this session meta data with each message read. * * 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; } /** * All messages with given pair (producer_id, message_group_id) go to single partition in order of writes. * * Generated from protobuf field <code>string message_group_id = 4;</code> * @return string */ public function getMessageGroupId() { return $this->readOneof(4); } public function hasMessageGroupId() { return $this->hasOneof(4); } /** * All messages with given pair (producer_id, message_group_id) go to single partition in order of writes. * * Generated from protobuf field <code>string message_group_id = 4;</code> * @param string $var * @return $this */ public function setMessageGroupId($var) { GPBUtil::checkString($var, True); $this->writeOneof(4, $var); return $this; } /** * Explicit partition id to write to. * * Generated from protobuf field <code>int64 partition_id = 5;</code> * @return int|string */ public function getPartitionId() { return $this->readOneof(5); } public function hasPartitionId() { return $this->hasOneof(5); } /** * Explicit partition id to write to. * * Generated from protobuf field <code>int64 partition_id = 5;</code> * @param int|string $var * @return $this */ public function setPartitionId($var) { GPBUtil::checkInt64($var); $this->writeOneof(5, $var); return $this; } /** * Explicitly request for last sequential number * It may be expensive, if producer wrote to many partitions before. * * Generated from protobuf field <code>bool get_last_seq_no = 6;</code> * @return bool */ public function getGetLastSeqNo() { return $this->get_last_seq_no; } /** * Explicitly request for last sequential number * It may be expensive, if producer wrote to many partitions before. * * Generated from protobuf field <code>bool get_last_seq_no = 6;</code> * @param bool $var * @return $this */ public function setGetLastSeqNo($var) { GPBUtil::checkBool($var); $this->get_last_seq_no = $var; return $this; } /** * @return string */ public function getPartitioning() { return $this->whichOneof("partitioning"); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(InitRequest::class, \Ydb\Topic\StreamWriteMessage_InitRequest::class);