123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Add offsets to transaction request sent from client to server.
- *
- * Generated from protobuf message <code>Ydb.Topic.AddOffsetsToTransactionRequest</code>
- */
- class AddOffsetsToTransactionRequest extends \Google\Protobuf\Internal\Message
- {
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
- */
- protected $operation_params = null;
- /**
- * Session identifier from TableService.
- *
- * Generated from protobuf field <code>string session_id = 2;</code>
- */
- protected $session_id = '';
- /**
- * Transaction identifier from TableService.
- *
- * Generated from protobuf field <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
- */
- protected $tx_control = null;
- /**
- * Ranges of offsets by topics.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
- */
- private $topics;
- /**
- * Generated from protobuf field <code>string consumer = 5;</code>
- */
- 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 <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
- * @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 <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
- * @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 <code>string session_id = 2;</code>
- * @return string
- */
- public function getSessionId()
- {
- return $this->session_id;
- }
- /**
- * Session identifier from TableService.
- *
- * Generated from protobuf field <code>string session_id = 2;</code>
- * @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 <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
- * @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 <code>.Ydb.Table.TransactionControl tx_control = 3;</code>
- * @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 <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getTopics()
- {
- return $this->topics;
- }
- /**
- * Ranges of offsets by topics.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.AddOffsetsToTransactionRequest.TopicOffsets topics = 4;</code>
- * @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 <code>string consumer = 5;</code>
- * @return string
- */
- public function getConsumer()
- {
- return $this->consumer;
- }
- /**
- * Generated from protobuf field <code>string consumer = 5;</code>
- * @param string $var
- * @return $this
- */
- public function setConsumer($var)
- {
- GPBUtil::checkString($var, True);
- $this->consumer = $var;
- return $this;
- }
- }
|