TtlSettings.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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.TtlSettings</code>
  10. */
  11. class TtlSettings extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * How often to run BRO on the same partition.
  15. * BRO will not be started more often, but may be started less often.
  16. *
  17. * Generated from protobuf field <code>uint32 run_interval_seconds = 3;</code>
  18. */
  19. protected $run_interval_seconds = 0;
  20. protected $mode;
  21. /**
  22. * Constructor.
  23. *
  24. * @param array $data {
  25. * Optional. Data for populating the Message object.
  26. *
  27. * @type \Ydb\Table\DateTypeColumnModeSettings $date_type_column
  28. * @type \Ydb\Table\ValueSinceUnixEpochModeSettings $value_since_unix_epoch
  29. * @type int $run_interval_seconds
  30. * How often to run BRO on the same partition.
  31. * BRO will not be started more often, but may be started less often.
  32. * }
  33. */
  34. public function __construct($data = NULL) {
  35. \GPBMetadata\Protos\YdbTable::initOnce();
  36. parent::__construct($data);
  37. }
  38. /**
  39. * Generated from protobuf field <code>.Ydb.Table.DateTypeColumnModeSettings date_type_column = 1;</code>
  40. * @return \Ydb\Table\DateTypeColumnModeSettings|null
  41. */
  42. public function getDateTypeColumn()
  43. {
  44. return $this->readOneof(1);
  45. }
  46. public function hasDateTypeColumn()
  47. {
  48. return $this->hasOneof(1);
  49. }
  50. /**
  51. * Generated from protobuf field <code>.Ydb.Table.DateTypeColumnModeSettings date_type_column = 1;</code>
  52. * @param \Ydb\Table\DateTypeColumnModeSettings $var
  53. * @return $this
  54. */
  55. public function setDateTypeColumn($var)
  56. {
  57. GPBUtil::checkMessage($var, \Ydb\Table\DateTypeColumnModeSettings::class);
  58. $this->writeOneof(1, $var);
  59. return $this;
  60. }
  61. /**
  62. * Generated from protobuf field <code>.Ydb.Table.ValueSinceUnixEpochModeSettings value_since_unix_epoch = 2;</code>
  63. * @return \Ydb\Table\ValueSinceUnixEpochModeSettings|null
  64. */
  65. public function getValueSinceUnixEpoch()
  66. {
  67. return $this->readOneof(2);
  68. }
  69. public function hasValueSinceUnixEpoch()
  70. {
  71. return $this->hasOneof(2);
  72. }
  73. /**
  74. * Generated from protobuf field <code>.Ydb.Table.ValueSinceUnixEpochModeSettings value_since_unix_epoch = 2;</code>
  75. * @param \Ydb\Table\ValueSinceUnixEpochModeSettings $var
  76. * @return $this
  77. */
  78. public function setValueSinceUnixEpoch($var)
  79. {
  80. GPBUtil::checkMessage($var, \Ydb\Table\ValueSinceUnixEpochModeSettings::class);
  81. $this->writeOneof(2, $var);
  82. return $this;
  83. }
  84. /**
  85. * How often to run BRO on the same partition.
  86. * BRO will not be started more often, but may be started less often.
  87. *
  88. * Generated from protobuf field <code>uint32 run_interval_seconds = 3;</code>
  89. * @return int
  90. */
  91. public function getRunIntervalSeconds()
  92. {
  93. return $this->run_interval_seconds;
  94. }
  95. /**
  96. * How often to run BRO on the same partition.
  97. * BRO will not be started more often, but may be started less often.
  98. *
  99. * Generated from protobuf field <code>uint32 run_interval_seconds = 3;</code>
  100. * @param int $var
  101. * @return $this
  102. */
  103. public function setRunIntervalSeconds($var)
  104. {
  105. GPBUtil::checkUint32($var);
  106. $this->run_interval_seconds = $var;
  107. return $this;
  108. }
  109. /**
  110. * @return string
  111. */
  112. public function getMode()
  113. {
  114. return $this->whichOneof("mode");
  115. }
  116. }