AlterConsumer.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: protos/ydb_topic.proto
  4. namespace Ydb\Topic;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Consumer alter description.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.AlterConsumer</code>
  12. */
  13. class AlterConsumer extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Must have valid not empty name as a key.
  17. *
  18. * Generated from protobuf field <code>string name = 1;</code>
  19. */
  20. protected $name = '';
  21. /**
  22. * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
  23. * User should take care that such consumer never stalls, to prevent running out of disk space.
  24. * Flag that this consumer is important.
  25. *
  26. * Generated from protobuf field <code>optional bool set_important = 2;</code>
  27. */
  28. protected $set_important = null;
  29. /**
  30. * All messages with smaller server written_at timestamp will be skipped.
  31. *
  32. * Generated from protobuf field <code>.google.protobuf.Timestamp set_read_from = 3;</code>
  33. */
  34. protected $set_read_from = null;
  35. /**
  36. * List of supported codecs by this consumer.
  37. * supported_codecs on topic must be contained inside this list.
  38. *
  39. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 5;</code>
  40. */
  41. protected $set_supported_codecs = null;
  42. /**
  43. * User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
  44. * Leave the value blank to drop an attribute.
  45. *
  46. * Generated from protobuf field <code>map<string, string> alter_attributes = 6;</code>
  47. */
  48. private $alter_attributes;
  49. /**
  50. * Constructor.
  51. *
  52. * @param array $data {
  53. * Optional. Data for populating the Message object.
  54. *
  55. * @type string $name
  56. * Must have valid not empty name as a key.
  57. * @type bool $set_important
  58. * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
  59. * User should take care that such consumer never stalls, to prevent running out of disk space.
  60. * Flag that this consumer is important.
  61. * @type \Google\Protobuf\Timestamp $set_read_from
  62. * All messages with smaller server written_at timestamp will be skipped.
  63. * @type \Ydb\Topic\SupportedCodecs $set_supported_codecs
  64. * List of supported codecs by this consumer.
  65. * supported_codecs on topic must be contained inside this list.
  66. * @type array|\Google\Protobuf\Internal\MapField $alter_attributes
  67. * User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
  68. * Leave the value blank to drop an attribute.
  69. * }
  70. */
  71. public function __construct($data = NULL) {
  72. \GPBMetadata\Protos\YdbTopic::initOnce();
  73. parent::__construct($data);
  74. }
  75. /**
  76. * Must have valid not empty name as a key.
  77. *
  78. * Generated from protobuf field <code>string name = 1;</code>
  79. * @return string
  80. */
  81. public function getName()
  82. {
  83. return $this->name;
  84. }
  85. /**
  86. * Must have valid not empty name as a key.
  87. *
  88. * Generated from protobuf field <code>string name = 1;</code>
  89. * @param string $var
  90. * @return $this
  91. */
  92. public function setName($var)
  93. {
  94. GPBUtil::checkString($var, True);
  95. $this->name = $var;
  96. return $this;
  97. }
  98. /**
  99. * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
  100. * User should take care that such consumer never stalls, to prevent running out of disk space.
  101. * Flag that this consumer is important.
  102. *
  103. * Generated from protobuf field <code>optional bool set_important = 2;</code>
  104. * @return bool
  105. */
  106. public function getSetImportant()
  107. {
  108. return isset($this->set_important) ? $this->set_important : false;
  109. }
  110. public function hasSetImportant()
  111. {
  112. return isset($this->set_important);
  113. }
  114. public function clearSetImportant()
  115. {
  116. unset($this->set_important);
  117. }
  118. /**
  119. * Consumer may be marked as 'important'. It means messages for this consumer will never expire due to retention.
  120. * User should take care that such consumer never stalls, to prevent running out of disk space.
  121. * Flag that this consumer is important.
  122. *
  123. * Generated from protobuf field <code>optional bool set_important = 2;</code>
  124. * @param bool $var
  125. * @return $this
  126. */
  127. public function setSetImportant($var)
  128. {
  129. GPBUtil::checkBool($var);
  130. $this->set_important = $var;
  131. return $this;
  132. }
  133. /**
  134. * All messages with smaller server written_at timestamp will be skipped.
  135. *
  136. * Generated from protobuf field <code>.google.protobuf.Timestamp set_read_from = 3;</code>
  137. * @return \Google\Protobuf\Timestamp|null
  138. */
  139. public function getSetReadFrom()
  140. {
  141. return $this->set_read_from;
  142. }
  143. public function hasSetReadFrom()
  144. {
  145. return isset($this->set_read_from);
  146. }
  147. public function clearSetReadFrom()
  148. {
  149. unset($this->set_read_from);
  150. }
  151. /**
  152. * All messages with smaller server written_at timestamp will be skipped.
  153. *
  154. * Generated from protobuf field <code>.google.protobuf.Timestamp set_read_from = 3;</code>
  155. * @param \Google\Protobuf\Timestamp $var
  156. * @return $this
  157. */
  158. public function setSetReadFrom($var)
  159. {
  160. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  161. $this->set_read_from = $var;
  162. return $this;
  163. }
  164. /**
  165. * List of supported codecs by this consumer.
  166. * supported_codecs on topic must be contained inside this list.
  167. *
  168. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 5;</code>
  169. * @return \Ydb\Topic\SupportedCodecs|null
  170. */
  171. public function getSetSupportedCodecs()
  172. {
  173. return $this->set_supported_codecs;
  174. }
  175. public function hasSetSupportedCodecs()
  176. {
  177. return isset($this->set_supported_codecs);
  178. }
  179. public function clearSetSupportedCodecs()
  180. {
  181. unset($this->set_supported_codecs);
  182. }
  183. /**
  184. * List of supported codecs by this consumer.
  185. * supported_codecs on topic must be contained inside this list.
  186. *
  187. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 5;</code>
  188. * @param \Ydb\Topic\SupportedCodecs $var
  189. * @return $this
  190. */
  191. public function setSetSupportedCodecs($var)
  192. {
  193. GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
  194. $this->set_supported_codecs = $var;
  195. return $this;
  196. }
  197. /**
  198. * User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
  199. * Leave the value blank to drop an attribute.
  200. *
  201. * Generated from protobuf field <code>map<string, string> alter_attributes = 6;</code>
  202. * @return \Google\Protobuf\Internal\MapField
  203. */
  204. public function getAlterAttributes()
  205. {
  206. return $this->alter_attributes;
  207. }
  208. /**
  209. * User and server attributes of consumer. Server attributes starts from "_" and will be validated by server.
  210. * Leave the value blank to drop an attribute.
  211. *
  212. * Generated from protobuf field <code>map<string, string> alter_attributes = 6;</code>
  213. * @param array|\Google\Protobuf\Internal\MapField $var
  214. * @return $this
  215. */
  216. public function setAlterAttributes($var)
  217. {
  218. $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
  219. $this->alter_attributes = $arr;
  220. return $this;
  221. }
  222. }