123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <?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);
|