Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets
*/
class TopicOffsets extends \Google\Protobuf\Internal\Message
{
/**
* Topic path.
*
* Generated from protobuf field string path = 1;
*/
protected $path = '';
/**
* Ranges of offsets by partitions.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;
*/
private $partitions;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $path
* Topic path.
* @type array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets>|\Google\Protobuf\Internal\RepeatedField $partitions
* Ranges of offsets by partitions.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Topic path.
*
* Generated from protobuf field string path = 1;
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Topic path.
*
* Generated from protobuf field string path = 1;
* @param string $var
* @return $this
*/
public function setPath($var)
{
GPBUtil::checkString($var, True);
$this->path = $var;
return $this;
}
/**
* Ranges of offsets by partitions.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getPartitions()
{
return $this->partitions;
}
/**
* Ranges of offsets by partitions.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets.PartitionOffsets partitions = 2;
* @param array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setPartitions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets\PartitionOffsets::class);
$this->partitions = $arr;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TopicOffsets::class, \Ydb\Topic\AddOffsetsToTransactionRequest_TopicOffsets::class);