Ydb.Topic.StreamWriteMessage.InitRequest */ class InitRequest extends \Google\Protobuf\Internal\Message { /** * Full path of topic to write to. * * Generated from protobuf field string path = 1; */ protected $path = ''; /** * Producer identifier of client data stream. * Used for message deduplication by sequence numbers. * * Generated from protobuf field string producer_id = 2; */ 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 map write_session_meta = 3; */ 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 bool get_last_seq_no = 6; */ 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 string path = 1; * @return string */ public function getPath() { return $this->path; } /** * Full path of topic to write to. * * Generated from protobuf field string path = 1; * @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 string producer_id = 2; * @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 string producer_id = 2; * @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 map write_session_meta = 3; * @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 map write_session_meta = 3; * @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 string message_group_id = 4; * @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 string message_group_id = 4; * @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 int64 partition_id = 5; * @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 int64 partition_id = 5; * @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 bool get_last_seq_no = 6; * @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 bool get_last_seq_no = 6; * @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);