123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamReadMessage;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Signal for server that cient is ready to recive data for partition.
- *
- * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.StartPartitionSessionResponse</code>
- */
- class StartPartitionSessionResponse extends \Google\Protobuf\Internal\Message
- {
- /**
- * Partition session identifier of partition to start read.
- *
- * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
- */
- protected $partition_session_id = 0;
- /**
- * Reads in this partition session will start from offset no less than read_offset.
- * If read_offset is set, server will check that read_offset is no less that actual committed offset.
- * If check fails then server will send an error message (status != SUCCESS) and close stream.
- * If read_offset is not set, no check will be made.
- * InitRequest.max_lag and InitRequest.read_from could lead to skip of more messages.
- * Server will return data starting from offset that is maximum of actual committed offset, read_offset (if set)
- * and offsets calculated from InitRequest.max_lag and InitRequest.read_from.
- *
- * Generated from protobuf field <code>optional int64 read_offset = 2;</code>
- */
- protected $read_offset = null;
- /**
- * All messages with offset less than commit_offset are processed by client.
- * Server will commit this position if this is not done yet.
- *
- * Generated from protobuf field <code>optional int64 commit_offset = 3;</code>
- */
- protected $commit_offset = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type int|string $partition_session_id
- * Partition session identifier of partition to start read.
- * @type int|string $read_offset
- * Reads in this partition session will start from offset no less than read_offset.
- * If read_offset is set, server will check that read_offset is no less that actual committed offset.
- * If check fails then server will send an error message (status != SUCCESS) and close stream.
- * If read_offset is not set, no check will be made.
- * InitRequest.max_lag and InitRequest.read_from could lead to skip of more messages.
- * Server will return data starting from offset that is maximum of actual committed offset, read_offset (if set)
- * and offsets calculated from InitRequest.max_lag and InitRequest.read_from.
- * @type int|string $commit_offset
- * All messages with offset less than commit_offset are processed by client.
- * Server will commit this position if this is not done yet.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Partition session identifier of partition to start read.
- *
- * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
- * @return int|string
- */
- public function getPartitionSessionId()
- {
- return $this->partition_session_id;
- }
- /**
- * Partition session identifier of partition to start read.
- *
- * Generated from protobuf field <code>int64 partition_session_id = 1;</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionSessionId($var)
- {
- GPBUtil::checkInt64($var);
- $this->partition_session_id = $var;
- return $this;
- }
- /**
- * Reads in this partition session will start from offset no less than read_offset.
- * If read_offset is set, server will check that read_offset is no less that actual committed offset.
- * If check fails then server will send an error message (status != SUCCESS) and close stream.
- * If read_offset is not set, no check will be made.
- * InitRequest.max_lag and InitRequest.read_from could lead to skip of more messages.
- * Server will return data starting from offset that is maximum of actual committed offset, read_offset (if set)
- * and offsets calculated from InitRequest.max_lag and InitRequest.read_from.
- *
- * Generated from protobuf field <code>optional int64 read_offset = 2;</code>
- * @return int|string
- */
- public function getReadOffset()
- {
- return isset($this->read_offset) ? $this->read_offset : 0;
- }
- public function hasReadOffset()
- {
- return isset($this->read_offset);
- }
- public function clearReadOffset()
- {
- unset($this->read_offset);
- }
- /**
- * Reads in this partition session will start from offset no less than read_offset.
- * If read_offset is set, server will check that read_offset is no less that actual committed offset.
- * If check fails then server will send an error message (status != SUCCESS) and close stream.
- * If read_offset is not set, no check will be made.
- * InitRequest.max_lag and InitRequest.read_from could lead to skip of more messages.
- * Server will return data starting from offset that is maximum of actual committed offset, read_offset (if set)
- * and offsets calculated from InitRequest.max_lag and InitRequest.read_from.
- *
- * Generated from protobuf field <code>optional int64 read_offset = 2;</code>
- * @param int|string $var
- * @return $this
- */
- public function setReadOffset($var)
- {
- GPBUtil::checkInt64($var);
- $this->read_offset = $var;
- return $this;
- }
- /**
- * All messages with offset less than commit_offset are processed by client.
- * Server will commit this position if this is not done yet.
- *
- * Generated from protobuf field <code>optional int64 commit_offset = 3;</code>
- * @return int|string
- */
- public function getCommitOffset()
- {
- return isset($this->commit_offset) ? $this->commit_offset : 0;
- }
- public function hasCommitOffset()
- {
- return isset($this->commit_offset);
- }
- public function clearCommitOffset()
- {
- unset($this->commit_offset);
- }
- /**
- * All messages with offset less than commit_offset are processed by client.
- * Server will commit this position if this is not done yet.
- *
- * Generated from protobuf field <code>optional int64 commit_offset = 3;</code>
- * @param int|string $var
- * @return $this
- */
- public function setCommitOffset($var)
- {
- GPBUtil::checkInt64($var);
- $this->commit_offset = $var;
- return $this;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(StartPartitionSessionResponse::class, \Ydb\Topic\StreamReadMessage_StartPartitionSessionResponse::class);
|