Ydb.Topic.AddOffsetsToTransactionRequest
*/
class AddOffsetsToTransactionRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
*/
protected $operation_params = null;
/**
* Session identifier from TableService.
*
* Generated from protobuf field string session_id = 2;
*/
protected $session_id = '';
/**
* Transaction identifier from TableService.
*
* Generated from protobuf field .Ydb.Table.TransactionControl tx_control = 3;
*/
protected $tx_control = null;
/**
* Ranges of offsets by topics.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;
*/
private $topics;
/**
* Generated from protobuf field string consumer = 5;
*/
protected $consumer = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Ydb\Operations\OperationParams $operation_params
* @type string $session_id
* Session identifier from TableService.
* @type \Ydb\Table\TransactionControl $tx_control
* Transaction identifier from TableService.
* @type array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets>|\Google\Protobuf\Internal\RepeatedField $topics
* Ranges of offsets by topics.
* @type string $consumer
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
* @return \Ydb\Operations\OperationParams|null
*/
public function getOperationParams()
{
return $this->operation_params;
}
public function hasOperationParams()
{
return isset($this->operation_params);
}
public function clearOperationParams()
{
unset($this->operation_params);
}
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
* @param \Ydb\Operations\OperationParams $var
* @return $this
*/
public function setOperationParams($var)
{
GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
$this->operation_params = $var;
return $this;
}
/**
* Session identifier from TableService.
*
* Generated from protobuf field string session_id = 2;
* @return string
*/
public function getSessionId()
{
return $this->session_id;
}
/**
* Session identifier from TableService.
*
* Generated from protobuf field string session_id = 2;
* @param string $var
* @return $this
*/
public function setSessionId($var)
{
GPBUtil::checkString($var, True);
$this->session_id = $var;
return $this;
}
/**
* Transaction identifier from TableService.
*
* Generated from protobuf field .Ydb.Table.TransactionControl tx_control = 3;
* @return \Ydb\Table\TransactionControl|null
*/
public function getTxControl()
{
return $this->tx_control;
}
public function hasTxControl()
{
return isset($this->tx_control);
}
public function clearTxControl()
{
unset($this->tx_control);
}
/**
* Transaction identifier from TableService.
*
* Generated from protobuf field .Ydb.Table.TransactionControl tx_control = 3;
* @param \Ydb\Table\TransactionControl $var
* @return $this
*/
public function setTxControl($var)
{
GPBUtil::checkMessage($var, \Ydb\Table\TransactionControl::class);
$this->tx_control = $var;
return $this;
}
/**
* Ranges of offsets by topics.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getTopics()
{
return $this->topics;
}
/**
* Ranges of offsets by topics.
*
* Generated from protobuf field repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;
* @param array<\Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setTopics($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\AddOffsetsToTransactionRequest\TopicOffsets::class);
$this->topics = $arr;
return $this;
}
/**
* Generated from protobuf field string consumer = 5;
* @return string
*/
public function getConsumer()
{
return $this->consumer;
}
/**
* Generated from protobuf field string consumer = 5;
* @param string $var
* @return $this
*/
public function setConsumer($var)
{
GPBUtil::checkString($var, True);
$this->consumer = $var;
return $this;
}
}