BeginTransactionRequest.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. * Begin transaction on given session with given settings
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.BeginTransactionRequest</code>
  12. */
  13. class BeginTransactionRequest 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. * Generated from protobuf field <code>.Ydb.Table.TransactionSettings tx_settings = 2;</code>
  23. */
  24. protected $tx_settings = null;
  25. /**
  26. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  27. */
  28. protected $operation_params = null;
  29. /**
  30. * Constructor.
  31. *
  32. * @param array $data {
  33. * Optional. Data for populating the Message object.
  34. *
  35. * @type string $session_id
  36. * Session identifier
  37. * @type \Ydb\Table\TransactionSettings $tx_settings
  38. * @type \Ydb\Operations\OperationParams $operation_params
  39. * }
  40. */
  41. public function __construct($data = NULL) {
  42. \GPBMetadata\Protos\YdbTable::initOnce();
  43. parent::__construct($data);
  44. }
  45. /**
  46. * Session identifier
  47. *
  48. * Generated from protobuf field <code>string session_id = 1;</code>
  49. * @return string
  50. */
  51. public function getSessionId()
  52. {
  53. return $this->session_id;
  54. }
  55. /**
  56. * Session identifier
  57. *
  58. * Generated from protobuf field <code>string session_id = 1;</code>
  59. * @param string $var
  60. * @return $this
  61. */
  62. public function setSessionId($var)
  63. {
  64. GPBUtil::checkString($var, True);
  65. $this->session_id = $var;
  66. return $this;
  67. }
  68. /**
  69. * Generated from protobuf field <code>.Ydb.Table.TransactionSettings tx_settings = 2;</code>
  70. * @return \Ydb\Table\TransactionSettings|null
  71. */
  72. public function getTxSettings()
  73. {
  74. return $this->tx_settings;
  75. }
  76. public function hasTxSettings()
  77. {
  78. return isset($this->tx_settings);
  79. }
  80. public function clearTxSettings()
  81. {
  82. unset($this->tx_settings);
  83. }
  84. /**
  85. * Generated from protobuf field <code>.Ydb.Table.TransactionSettings tx_settings = 2;</code>
  86. * @param \Ydb\Table\TransactionSettings $var
  87. * @return $this
  88. */
  89. public function setTxSettings($var)
  90. {
  91. GPBUtil::checkMessage($var, \Ydb\Table\TransactionSettings::class);
  92. $this->tx_settings = $var;
  93. return $this;
  94. }
  95. /**
  96. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  97. * @return \Ydb\Operations\OperationParams|null
  98. */
  99. public function getOperationParams()
  100. {
  101. return $this->operation_params;
  102. }
  103. public function hasOperationParams()
  104. {
  105. return isset($this->operation_params);
  106. }
  107. public function clearOperationParams()
  108. {
  109. unset($this->operation_params);
  110. }
  111. /**
  112. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 3;</code>
  113. * @param \Ydb\Operations\OperationParams $var
  114. * @return $this
  115. */
  116. public function setOperationParams($var)
  117. {
  118. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  119. $this->operation_params = $var;
  120. return $this;
  121. }
  122. }