CommitTransactionRequest.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_table.proto
  4. namespace Ydb\Table;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Commit transaction with given session and tx id
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.CommitTransactionRequest</code>
  12. */
  13. class CommitTransactionRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Session identifier
  17. *
  18. * Generated from protobuf field <code>string session_id = 1;</code>
  19. */
  20. protected $session_id = '';
  21. /**
  22. * Transaction identifier
  23. *
  24. * Generated from protobuf field <code>string tx_id = 2;</code>
  25. */
  26. protected $tx_id = '';
  27. /**
  28. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  29. */
  30. protected $operation_params = null;
  31. /**
  32. * Generated from protobuf field <code>.Ydb.Table.QueryStatsCollection.Mode collect_stats = 4;</code>
  33. */
  34. protected $collect_stats = 0;
  35. /**
  36. * Constructor.
  37. *
  38. * @param array $data {
  39. * Optional. Data for populating the Message object.
  40. *
  41. * @type string $session_id
  42. * Session identifier
  43. * @type string $tx_id
  44. * Transaction identifier
  45. * @type \Ydb\Operations\OperationParams $operation_params
  46. * @type int $collect_stats
  47. * }
  48. */
  49. public function __construct($data = NULL) {
  50. \GPBMetadata\Protos\YdbTable::initOnce();
  51. parent::__construct($data);
  52. }
  53. /**
  54. * Session identifier
  55. *
  56. * Generated from protobuf field <code>string session_id = 1;</code>
  57. * @return string
  58. */
  59. public function getSessionId()
  60. {
  61. return $this->session_id;
  62. }
  63. /**
  64. * Session identifier
  65. *
  66. * Generated from protobuf field <code>string session_id = 1;</code>
  67. * @param string $var
  68. * @return $this
  69. */
  70. public function setSessionId($var)
  71. {
  72. GPBUtil::checkString($var, True);
  73. $this->session_id = $var;
  74. return $this;
  75. }
  76. /**
  77. * Transaction identifier
  78. *
  79. * Generated from protobuf field <code>string tx_id = 2;</code>
  80. * @return string
  81. */
  82. public function getTxId()
  83. {
  84. return $this->tx_id;
  85. }
  86. /**
  87. * Transaction identifier
  88. *
  89. * Generated from protobuf field <code>string tx_id = 2;</code>
  90. * @param string $var
  91. * @return $this
  92. */
  93. public function setTxId($var)
  94. {
  95. GPBUtil::checkString($var, True);
  96. $this->tx_id = $var;
  97. return $this;
  98. }
  99. /**
  100. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  101. * @return \Ydb\Operations\OperationParams|null
  102. */
  103. public function getOperationParams()
  104. {
  105. return $this->operation_params;
  106. }
  107. public function hasOperationParams()
  108. {
  109. return isset($this->operation_params);
  110. }
  111. public function clearOperationParams()
  112. {
  113. unset($this->operation_params);
  114. }
  115. /**
  116. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  117. * @param \Ydb\Operations\OperationParams $var
  118. * @return $this
  119. */
  120. public function setOperationParams($var)
  121. {
  122. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  123. $this->operation_params = $var;
  124. return $this;
  125. }
  126. /**
  127. * Generated from protobuf field <code>.Ydb.Table.QueryStatsCollection.Mode collect_stats = 4;</code>
  128. * @return int
  129. */
  130. public function getCollectStats()
  131. {
  132. return $this->collect_stats;
  133. }
  134. /**
  135. * Generated from protobuf field <code>.Ydb.Table.QueryStatsCollection.Mode collect_stats = 4;</code>
  136. * @param int $var
  137. * @return $this
  138. */
  139. public function setCollectStats($var)
  140. {
  141. GPBUtil::checkEnum($var, \Ydb\Table\QueryStatsCollection\Mode::class);
  142. $this->collect_stats = $var;
  143. return $this;
  144. }
  145. }