123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic\StreamReadMessage\InitRequest;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Generated from protobuf message <code>Ydb.Topic.StreamReadMessage.InitRequest.TopicReadSettings</code>
- */
- class TopicReadSettings extends \Google\Protobuf\Internal\Message
- {
- /**
- * Topic path.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- */
- protected $path = '';
- /**
- * Partitions that will be read by this session.
- * If list is empty - then session will read all partitions.
- *
- * Generated from protobuf field <code>repeated int64 partition_ids = 2;</code>
- */
- private $partition_ids;
- /**
- * Skip all messages that has write timestamp smaller than now - max_lag.
- * Zero means infinite lag.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration max_lag = 3;</code>
- */
- protected $max_lag = null;
- /**
- * Read data only after this timestamp from this topic.
- * Read only messages with 'written_at' value greater or equal than this timestamp.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 4;</code>
- */
- protected $read_from = null;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $path
- * Topic path.
- * @type array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $partition_ids
- * Partitions that will be read by this session.
- * If list is empty - then session will read all partitions.
- * @type \Google\Protobuf\Duration $max_lag
- * Skip all messages that has write timestamp smaller than now - max_lag.
- * Zero means infinite lag.
- * @type \Google\Protobuf\Timestamp $read_from
- * Read data only after this timestamp from this topic.
- * Read only messages with 'written_at' value greater or equal than this timestamp.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Topic path.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Topic path.
- *
- * Generated from protobuf field <code>string path = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setPath($var)
- {
- GPBUtil::checkString($var, True);
- $this->path = $var;
- return $this;
- }
- /**
- * Partitions that will be read by this session.
- * If list is empty - then session will read all partitions.
- *
- * Generated from protobuf field <code>repeated int64 partition_ids = 2;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPartitionIds()
- {
- return $this->partition_ids;
- }
- /**
- * Partitions that will be read by this session.
- * If list is empty - then session will read all partitions.
- *
- * Generated from protobuf field <code>repeated int64 partition_ids = 2;</code>
- * @param array<int>|array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPartitionIds($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64);
- $this->partition_ids = $arr;
- return $this;
- }
- /**
- * Skip all messages that has write timestamp smaller than now - max_lag.
- * Zero means infinite lag.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration max_lag = 3;</code>
- * @return \Google\Protobuf\Duration|null
- */
- public function getMaxLag()
- {
- return $this->max_lag;
- }
- public function hasMaxLag()
- {
- return isset($this->max_lag);
- }
- public function clearMaxLag()
- {
- unset($this->max_lag);
- }
- /**
- * Skip all messages that has write timestamp smaller than now - max_lag.
- * Zero means infinite lag.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration max_lag = 3;</code>
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setMaxLag($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->max_lag = $var;
- return $this;
- }
- /**
- * Read data only after this timestamp from this topic.
- * Read only messages with 'written_at' value greater or equal than this timestamp.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 4;</code>
- * @return \Google\Protobuf\Timestamp|null
- */
- public function getReadFrom()
- {
- return $this->read_from;
- }
- public function hasReadFrom()
- {
- return isset($this->read_from);
- }
- public function clearReadFrom()
- {
- unset($this->read_from);
- }
- /**
- * Read data only after this timestamp from this topic.
- * Read only messages with 'written_at' value greater or equal than this timestamp.
- *
- * Generated from protobuf field <code>.google.protobuf.Timestamp read_from = 4;</code>
- * @param \Google\Protobuf\Timestamp $var
- * @return $this
- */
- public function setReadFrom($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
- $this->read_from = $var;
- return $this;
- }
- }
- // Adding a class alias for backwards compatibility with the previous class name.
- class_alias(TopicReadSettings::class, \Ydb\Topic\StreamReadMessage_InitRequest_TopicReadSettings::class);
|