TransactionSettings.php 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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.TransactionSettings</code>
  10. */
  11. class TransactionSettings extends \Google\Protobuf\Internal\Message
  12. {
  13. protected $tx_mode;
  14. /**
  15. * Constructor.
  16. *
  17. * @param array $data {
  18. * Optional. Data for populating the Message object.
  19. *
  20. * @type \Ydb\Table\SerializableModeSettings $serializable_read_write
  21. * @type \Ydb\Table\OnlineModeSettings $online_read_only
  22. * @type \Ydb\Table\StaleModeSettings $stale_read_only
  23. * @type \Ydb\Table\SnapshotModeSettings $snapshot_read_only
  24. * }
  25. */
  26. public function __construct($data = NULL) {
  27. \GPBMetadata\Protos\YdbTable::initOnce();
  28. parent::__construct($data);
  29. }
  30. /**
  31. * Generated from protobuf field <code>.Ydb.Table.SerializableModeSettings serializable_read_write = 1;</code>
  32. * @return \Ydb\Table\SerializableModeSettings|null
  33. */
  34. public function getSerializableReadWrite()
  35. {
  36. return $this->readOneof(1);
  37. }
  38. public function hasSerializableReadWrite()
  39. {
  40. return $this->hasOneof(1);
  41. }
  42. /**
  43. * Generated from protobuf field <code>.Ydb.Table.SerializableModeSettings serializable_read_write = 1;</code>
  44. * @param \Ydb\Table\SerializableModeSettings $var
  45. * @return $this
  46. */
  47. public function setSerializableReadWrite($var)
  48. {
  49. GPBUtil::checkMessage($var, \Ydb\Table\SerializableModeSettings::class);
  50. $this->writeOneof(1, $var);
  51. return $this;
  52. }
  53. /**
  54. * Generated from protobuf field <code>.Ydb.Table.OnlineModeSettings online_read_only = 2;</code>
  55. * @return \Ydb\Table\OnlineModeSettings|null
  56. */
  57. public function getOnlineReadOnly()
  58. {
  59. return $this->readOneof(2);
  60. }
  61. public function hasOnlineReadOnly()
  62. {
  63. return $this->hasOneof(2);
  64. }
  65. /**
  66. * Generated from protobuf field <code>.Ydb.Table.OnlineModeSettings online_read_only = 2;</code>
  67. * @param \Ydb\Table\OnlineModeSettings $var
  68. * @return $this
  69. */
  70. public function setOnlineReadOnly($var)
  71. {
  72. GPBUtil::checkMessage($var, \Ydb\Table\OnlineModeSettings::class);
  73. $this->writeOneof(2, $var);
  74. return $this;
  75. }
  76. /**
  77. * Generated from protobuf field <code>.Ydb.Table.StaleModeSettings stale_read_only = 3;</code>
  78. * @return \Ydb\Table\StaleModeSettings|null
  79. */
  80. public function getStaleReadOnly()
  81. {
  82. return $this->readOneof(3);
  83. }
  84. public function hasStaleReadOnly()
  85. {
  86. return $this->hasOneof(3);
  87. }
  88. /**
  89. * Generated from protobuf field <code>.Ydb.Table.StaleModeSettings stale_read_only = 3;</code>
  90. * @param \Ydb\Table\StaleModeSettings $var
  91. * @return $this
  92. */
  93. public function setStaleReadOnly($var)
  94. {
  95. GPBUtil::checkMessage($var, \Ydb\Table\StaleModeSettings::class);
  96. $this->writeOneof(3, $var);
  97. return $this;
  98. }
  99. /**
  100. * Generated from protobuf field <code>.Ydb.Table.SnapshotModeSettings snapshot_read_only = 4;</code>
  101. * @return \Ydb\Table\SnapshotModeSettings|null
  102. */
  103. public function getSnapshotReadOnly()
  104. {
  105. return $this->readOneof(4);
  106. }
  107. public function hasSnapshotReadOnly()
  108. {
  109. return $this->hasOneof(4);
  110. }
  111. /**
  112. * Generated from protobuf field <code>.Ydb.Table.SnapshotModeSettings snapshot_read_only = 4;</code>
  113. * @param \Ydb\Table\SnapshotModeSettings $var
  114. * @return $this
  115. */
  116. public function setSnapshotReadOnly($var)
  117. {
  118. GPBUtil::checkMessage($var, \Ydb\Table\SnapshotModeSettings::class);
  119. $this->writeOneof(4, $var);
  120. return $this;
  121. }
  122. /**
  123. * @return string
  124. */
  125. public function getTxMode()
  126. {
  127. return $this->whichOneof("tx_mode");
  128. }
  129. }