123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamReadMessage\ReadResponse;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * One client message representation.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.ReadResponse.MessageData</code>
- */
- class MessageData extends \Google\Protobuf\Internal\Message
- {
- /**
- * Partition offset in partition that assigned for message.
- *
- * Generated from protobuf field <code>int64 offset = 1;</code>
- */
- protected $offset = 0;
- /**
- * Sequence number that provided with message on write from client.
- *
- * Generated from protobuf field <code>int64 seq_no = 2;</code>
- */
- protected $seq_no = 0;
- /**
- * Timestamp of creation of message provided on write from client.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 3;</code>
- */
- protected $created_at = null;
- /**
- * Compressed client message body.
- *
- * Generated from protobuf field <code>bytes data = 5;</code>
- */
- protected $data = '';
- /**
- * Uncompressed size of client message body.
- * sent as is from WriteRequest, without check on server side. May be empty (for writes from old client) or wrong (if bug in writer).
- * Use it for optimization purposes only, don't trust it.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 6;</code>
- */
- protected $uncompressed_size = 0;
- /**
- * Filled if message_group_id was set on message write.
- *
- * Generated from protobuf field <code>string message_group_id = 7;</code>
- */
- protected $message_group_id = '';
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $offset
- * Partition offset in partition that assigned for message.
- * @type int|string $seq_no
- * Sequence number that provided with message on write from client.
- * @type \Google\Protobuf\Timestamp $created_at
- * Timestamp of creation of message provided on write from client.
- * @type string $data
- * Compressed client message body.
- * @type int|string $uncompressed_size
- * Uncompressed size of client message body.
- * sent as is from WriteRequest, without check on server side. May be empty (for writes from old client) or wrong (if bug in writer).
- * Use it for optimization purposes only, don't trust it.
- * @type string $message_group_id
- * Filled if message_group_id was set on message write.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Partition offset in partition that assigned for message.
- *
- * Generated from protobuf field <code>int64 offset = 1;</code>
- * @return int|string
- */
- public function getOffset()
- {
- return $this->offset;
- }
- /**
- * Partition offset in partition that assigned for message.
- *
- * Generated from protobuf field <code>int64 offset = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setOffset($var)
- {
- GPBUtil::checkInt64($var);
- $this->offset = $var;
- return $this;
- }
- /**
- * Sequence number that provided with message on write from client.
- *
- * Generated from protobuf field <code>int64 seq_no = 2;</code>
- * @return int|string
- */
- public function getSeqNo()
- {
- return $this->seq_no;
- }
- /**
- * Sequence number that provided with message on write from client.
- *
- * Generated from protobuf field <code>int64 seq_no = 2;</code>
- * @param int|string $var
- * @return $this
- */
- public function setSeqNo($var)
- {
- GPBUtil::checkInt64($var);
- $this->seq_no = $var;
- return $this;
- }
- /**
- * Timestamp of creation of message provided on write from client.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 3;</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);
- }
- /**
- * Timestamp of creation of message provided on write from client.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp created_at = 3;</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 = 5;</code>
- * @return string
- */
- public function getData()
- {
- return $this->data;
- }
- /**
- * Compressed client message body.
- *
- * Generated from protobuf field <code>bytes data = 5;</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.
- * sent as is from WriteRequest, without check on server side. May be empty (for writes from old client) or wrong (if bug in writer).
- * Use it for optimization purposes only, don't trust it.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 6;</code>
- * @return int|string
- */
- public function getUncompressedSize()
- {
- return $this->uncompressed_size;
- }
- /**
- * Uncompressed size of client message body.
- * sent as is from WriteRequest, without check on server side. May be empty (for writes from old client) or wrong (if bug in writer).
- * Use it for optimization purposes only, don't trust it.
- *
- * Generated from protobuf field <code>int64 uncompressed_size = 6;</code>
- * @param int|string $var
- * @return $this
- */
- public function setUncompressedSize($var)
- {
- GPBUtil::checkInt64($var);
- $this->uncompressed_size = $var;
- return $this;
- }
- /**
- * Filled if message_group_id was set on message write.
- *
- * Generated from protobuf field <code>string message_group_id = 7;</code>
- * @return string
- */
- public function getMessageGroupId()
- {
- return $this->message_group_id;
- }
- /**
- * Filled if message_group_id was set on message write.
- *
- * Generated from protobuf field <code>string message_group_id = 7;</code>
- * @param string $var
- * @return $this
- */
- public function setMessageGroupId($var)
- {
- GPBUtil::checkString($var, True);
- $this->message_group_id = $var;
- return $this;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(MessageData::class, \Ydb\Topic\StreamReadMessage_ReadResponse_MessageData::class);
|