123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamWriteMessage\WriteRequest;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData</code>
- */
- class MessageData extends \Google\Protobuf\Internal\Message
- {
- /**
- * Message sequence number, provided by client for deduplication.
- * Starts at 1
- *
- * Generated from protobuf field <code>int64 seq_no = 1;</code>
- */
- protected $seq_no = 0;
- /**
- * Creation timestamp
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 2;</code>
- */
- protected $created_at = null;
- /**
- * Compressed client message body.
- *
- * Generated from protobuf field <code>bytes data = 3;</code>
- */
- protected $data = '';
- /**
- * Uncompressed size of client message body.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 4;</code>
- */
- protected $uncompressed_size = 0;
- protected $partitioning;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $seq_no
- * Message sequence number, provided by client for deduplication.
- * Starts at 1
- * @type \Google\Protobuf\Timestamp $created_at
- * Creation timestamp
- * @type string $data
- * Compressed client message body.
- * @type int|string $uncompressed_size
- * Uncompressed size of client message body.
- * @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.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Message sequence number, provided by client for deduplication.
- * Starts at 1
- *
- * Generated from protobuf field <code>int64 seq_no = 1;</code>
- * @return int|string
- */
- public function getSeqNo()
- {
- return $this->seq_no;
- }
- /**
- * Message sequence number, provided by client for deduplication.
- * Starts at 1
- *
- * 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;
- }
- /**
- * Creation timestamp
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 2;</code>
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getCreatedAt()
- {
- return $this->created_at;
- }
- public function hasCreatedAt()
- {
- return isset($this->created_at);
- }
- public function clearCreatedAt()
- {
- unset($this->created_at);
- }
- /**
- * Creation timestamp
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 2;</code>
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setCreatedAt($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->created_at = $var;
- return $this;
- }
- /**
- * Compressed client message body.
- *
- * Generated from protobuf field <code>bytes data = 3;</code>
- * @return string
- */
- public function getData()
- {
- return $this->data;
- }
- /**
- * Compressed client message body.
- *
- * Generated from protobuf field <code>bytes data = 3;</code>
- * @param string $var
- * @return $this
- */
- public function setData($var)
- {
- GPBUtil::checkString($var, False);
- $this->data = $var;
- return $this;
- }
- /**
- * Uncompressed size of client message body.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 4;</code>
- * @return int|string
- */
- public function getUncompressedSize()
- {
- return $this->uncompressed_size;
- }
- /**
- * Uncompressed size of client message body.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 4;</code>
- * @param int|string $var
- * @return $this
- */
- public function setUncompressedSize($var)
- {
- GPBUtil::checkInt64($var);
- $this->uncompressed_size = $var;
- 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 = 5;</code>
- * @return string
- */
- public function getMessageGroupId()
- {
- return $this->readOneof(5);
- }
- public function hasMessageGroupId()
- {
- return $this->hasOneof(5);
- }
- /**
- * 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 = 5;</code>
- * @param string $var
- * @return $this
- */
- public function setMessageGroupId($var)
- {
- GPBUtil::checkString($var, True);
- $this->writeOneof(5, $var);
- return $this;
- }
- /**
- * Explicit partition id to write to.
- *
- * Generated from protobuf field <code>int64 partition_id = 6;</code>
- * @return int|string
- */
- public function getPartitionId()
- {
- return $this->readOneof(6);
- }
- public function hasPartitionId()
- {
- return $this->hasOneof(6);
- }
- /**
- * Explicit partition id to write to.
- *
- * Generated from protobuf field <code>int64 partition_id = 6;</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionId($var)
- {
- GPBUtil::checkInt64($var);
- $this->writeOneof(6, $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(MessageData::class, \Ydb\Topic\StreamWriteMessage_WriteRequest_MessageData::class);
|