Ydb.Topic.StreamWriteMessage.WriteRequest.MessageData */ class MessageData extends \Google\Protobuf\Internal\Message { /** * Message sequence number, provided by client for deduplication. * Starts at 1 * * Generated from protobuf field int64 seq_no = 1; */ protected $seq_no = 0; /** * Creation timestamp * * Generated from protobuf field .google.protobuf.Timestamp created_at = 2; */ protected $created_at = null; /** * Compressed client message body. * * Generated from protobuf field bytes data = 3; */ protected $data = ''; /** * Uncompressed size of client message body. * * Generated from protobuf field int64 uncompressed_size = 4; */ 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 int64 seq_no = 1; * @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 int64 seq_no = 1; * @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 .google.protobuf.Timestamp created_at = 2; * @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 .google.protobuf.Timestamp created_at = 2; * @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 bytes data = 3; * @return string */ public function getData() { return $this->data; } /** * Compressed client message body. * * Generated from protobuf field bytes data = 3; * @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 int64 uncompressed_size = 4; * @return int|string */ public function getUncompressedSize() { return $this->uncompressed_size; } /** * Uncompressed size of client message body. * * Generated from protobuf field int64 uncompressed_size = 4; * @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 string message_group_id = 5; * @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 string message_group_id = 5; * @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 int64 partition_id = 6; * @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 int64 partition_id = 6; * @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);