TransactionControl.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. * Generated from protobuf message <code>Ydb.Table.TransactionControl</code>
  10. */
  11. class TransactionControl extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Generated from protobuf field <code>bool commit_tx = 10;</code>
  15. */
  16. protected $commit_tx = false;
  17. protected $tx_selector;
  18. /**
  19. * Constructor.
  20. *
  21. * @param array $data {
  22. * Optional. Data for populating the Message object.
  23. *
  24. * @type string $tx_id
  25. * @type \Ydb\Table\TransactionSettings $begin_tx
  26. * @type bool $commit_tx
  27. * }
  28. */
  29. public function __construct($data = NULL) {
  30. \GPBMetadata\Protos\YdbTable::initOnce();
  31. parent::__construct($data);
  32. }
  33. /**
  34. * Generated from protobuf field <code>string tx_id = 1;</code>
  35. * @return string
  36. */
  37. public function getTxId()
  38. {
  39. return $this->readOneof(1);
  40. }
  41. public function hasTxId()
  42. {
  43. return $this->hasOneof(1);
  44. }
  45. /**
  46. * Generated from protobuf field <code>string tx_id = 1;</code>
  47. * @param string $var
  48. * @return $this
  49. */
  50. public function setTxId($var)
  51. {
  52. GPBUtil::checkString($var, True);
  53. $this->writeOneof(1, $var);
  54. return $this;
  55. }
  56. /**
  57. * Generated from protobuf field <code>.Ydb.Table.TransactionSettings begin_tx = 2;</code>
  58. * @return \Ydb\Table\TransactionSettings|null
  59. */
  60. public function getBeginTx()
  61. {
  62. return $this->readOneof(2);
  63. }
  64. public function hasBeginTx()
  65. {
  66. return $this->hasOneof(2);
  67. }
  68. /**
  69. * Generated from protobuf field <code>.Ydb.Table.TransactionSettings begin_tx = 2;</code>
  70. * @param \Ydb\Table\TransactionSettings $var
  71. * @return $this
  72. */
  73. public function setBeginTx($var)
  74. {
  75. GPBUtil::checkMessage($var, \Ydb\Table\TransactionSettings::class);
  76. $this->writeOneof(2, $var);
  77. return $this;
  78. }
  79. /**
  80. * Generated from protobuf field <code>bool commit_tx = 10;</code>
  81. * @return bool
  82. */
  83. public function getCommitTx()
  84. {
  85. return $this->commit_tx;
  86. }
  87. /**
  88. * Generated from protobuf field <code>bool commit_tx = 10;</code>
  89. * @param bool $var
  90. * @return $this
  91. */
  92. public function setCommitTx($var)
  93. {
  94. GPBUtil::checkBool($var);
  95. $this->commit_tx = $var;
  96. return $this;
  97. }
  98. /**
  99. * @return string
  100. */
  101. public function getTxSelector()
  102. {
  103. return $this->whichOneof("tx_selector");
  104. }
  105. }