Changefeed.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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.Changefeed</code>
  10. */
  11. class Changefeed extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Name of the feed
  15. *
  16. * Generated from protobuf field <code>string name = 1;</code>
  17. */
  18. protected $name = '';
  19. /**
  20. * Mode specifies the information that will be written to the feed
  21. *
  22. * Generated from protobuf field <code>.Ydb.Table.ChangefeedMode.Mode mode = 2;</code>
  23. */
  24. protected $mode = 0;
  25. /**
  26. * Format of the data
  27. *
  28. * Generated from protobuf field <code>.Ydb.Table.ChangefeedFormat.Format format = 3;</code>
  29. */
  30. protected $format = 0;
  31. /**
  32. * How long data in changefeed's underlying topic should be stored
  33. *
  34. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  35. */
  36. protected $retention_period = null;
  37. /**
  38. * Emit virtual timestamps of changes along with data or not
  39. *
  40. * Generated from protobuf field <code>bool virtual_timestamps = 5;</code>
  41. */
  42. protected $virtual_timestamps = false;
  43. /**
  44. * Constructor.
  45. *
  46. * @param array $data {
  47. * Optional. Data for populating the Message object.
  48. *
  49. * @type string $name
  50. * Name of the feed
  51. * @type int $mode
  52. * Mode specifies the information that will be written to the feed
  53. * @type int $format
  54. * Format of the data
  55. * @type \Google\Protobuf\Duration $retention_period
  56. * How long data in changefeed's underlying topic should be stored
  57. * @type bool $virtual_timestamps
  58. * Emit virtual timestamps of changes along with data or not
  59. * }
  60. */
  61. public function __construct($data = NULL) {
  62. \GPBMetadata\Protos\YdbTable::initOnce();
  63. parent::__construct($data);
  64. }
  65. /**
  66. * Name of the feed
  67. *
  68. * Generated from protobuf field <code>string name = 1;</code>
  69. * @return string
  70. */
  71. public function getName()
  72. {
  73. return $this->name;
  74. }
  75. /**
  76. * Name of the feed
  77. *
  78. * Generated from protobuf field <code>string name = 1;</code>
  79. * @param string $var
  80. * @return $this
  81. */
  82. public function setName($var)
  83. {
  84. GPBUtil::checkString($var, True);
  85. $this->name = $var;
  86. return $this;
  87. }
  88. /**
  89. * Mode specifies the information that will be written to the feed
  90. *
  91. * Generated from protobuf field <code>.Ydb.Table.ChangefeedMode.Mode mode = 2;</code>
  92. * @return int
  93. */
  94. public function getMode()
  95. {
  96. return $this->mode;
  97. }
  98. /**
  99. * Mode specifies the information that will be written to the feed
  100. *
  101. * Generated from protobuf field <code>.Ydb.Table.ChangefeedMode.Mode mode = 2;</code>
  102. * @param int $var
  103. * @return $this
  104. */
  105. public function setMode($var)
  106. {
  107. GPBUtil::checkEnum($var, \Ydb\Table\ChangefeedMode\Mode::class);
  108. $this->mode = $var;
  109. return $this;
  110. }
  111. /**
  112. * Format of the data
  113. *
  114. * Generated from protobuf field <code>.Ydb.Table.ChangefeedFormat.Format format = 3;</code>
  115. * @return int
  116. */
  117. public function getFormat()
  118. {
  119. return $this->format;
  120. }
  121. /**
  122. * Format of the data
  123. *
  124. * Generated from protobuf field <code>.Ydb.Table.ChangefeedFormat.Format format = 3;</code>
  125. * @param int $var
  126. * @return $this
  127. */
  128. public function setFormat($var)
  129. {
  130. GPBUtil::checkEnum($var, \Ydb\Table\ChangefeedFormat\Format::class);
  131. $this->format = $var;
  132. return $this;
  133. }
  134. /**
  135. * How long data in changefeed's underlying topic should be stored
  136. *
  137. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  138. * @return \Google\Protobuf\Duration|null
  139. */
  140. public function getRetentionPeriod()
  141. {
  142. return $this->retention_period;
  143. }
  144. public function hasRetentionPeriod()
  145. {
  146. return isset($this->retention_period);
  147. }
  148. public function clearRetentionPeriod()
  149. {
  150. unset($this->retention_period);
  151. }
  152. /**
  153. * How long data in changefeed's underlying topic should be stored
  154. *
  155. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  156. * @param \Google\Protobuf\Duration $var
  157. * @return $this
  158. */
  159. public function setRetentionPeriod($var)
  160. {
  161. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  162. $this->retention_period = $var;
  163. return $this;
  164. }
  165. /**
  166. * Emit virtual timestamps of changes along with data or not
  167. *
  168. * Generated from protobuf field <code>bool virtual_timestamps = 5;</code>
  169. * @return bool
  170. */
  171. public function getVirtualTimestamps()
  172. {
  173. return $this->virtual_timestamps;
  174. }
  175. /**
  176. * Emit virtual timestamps of changes along with data or not
  177. *
  178. * Generated from protobuf field <code>bool virtual_timestamps = 5;</code>
  179. * @param bool $var
  180. * @return $this
  181. */
  182. public function setVirtualTimestamps($var)
  183. {
  184. GPBUtil::checkBool($var);
  185. $this->virtual_timestamps = $var;
  186. return $this;
  187. }
  188. }