AlterTopicRequest.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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. * Update existing topic request sent from client to server.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.AlterTopicRequest</code>
  12. */
  13. class AlterTopicRequest extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  17. */
  18. protected $operation_params = null;
  19. /**
  20. * Topic path.
  21. *
  22. * Generated from protobuf field <code>string path = 2;</code>
  23. */
  24. protected $path = '';
  25. /**
  26. * partitioning_settings
  27. *
  28. * Generated from protobuf field <code>.Ydb.Topic.AlterPartitioningSettings alter_partitioning_settings = 3;</code>
  29. */
  30. protected $alter_partitioning_settings = null;
  31. /**
  32. * Retention settings.
  33. * Currently, only one limit may be set, so other should not be set.
  34. * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
  35. * Default limit - 36 hours.
  36. *
  37. * Generated from protobuf field <code>.google.protobuf.Duration set_retention_period = 4;</code>
  38. */
  39. protected $set_retention_period = null;
  40. /**
  41. * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
  42. *
  43. * Generated from protobuf field <code>optional int64 set_retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
  44. */
  45. protected $set_retention_storage_mb = null;
  46. /**
  47. * List of allowed codecs for writers.
  48. * Writes with codec not from this list are forbidden.
  49. *
  50. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 7;</code>
  51. */
  52. protected $set_supported_codecs = null;
  53. /**
  54. * Partition write speed in bytes per second. Must be less than database limit. Default limit - 1 MB/s.
  55. *
  56. * Generated from protobuf field <code>optional int64 set_partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
  57. */
  58. protected $set_partition_write_speed_bytes_per_second = null;
  59. /**
  60. * Burst size for write in partition, in bytes. Must be less than database limit. Default limit - 1 MB.
  61. *
  62. * Generated from protobuf field <code>optional int64 set_partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
  63. */
  64. protected $set_partition_write_burst_bytes = null;
  65. /**
  66. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  67. * Leave the value blank to drop an attribute.
  68. *
  69. * Generated from protobuf field <code>map<string, string> alter_attributes = 10;</code>
  70. */
  71. private $alter_attributes;
  72. /**
  73. * Add consumers.
  74. *
  75. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer add_consumers = 11 [(.Ydb.size) = {</code>
  76. */
  77. private $add_consumers;
  78. /**
  79. * Remove consumers (by their names)
  80. *
  81. * Generated from protobuf field <code>repeated string drop_consumers = 12 [(.Ydb.size) = {</code>
  82. */
  83. private $drop_consumers;
  84. /**
  85. * Alter consumers
  86. *
  87. * Generated from protobuf field <code>repeated .Ydb.Topic.AlterConsumer alter_consumers = 13 [(.Ydb.size) = {</code>
  88. */
  89. private $alter_consumers;
  90. /**
  91. * Set metering mode for topic in serverless database.
  92. *
  93. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode set_metering_mode = 14;</code>
  94. */
  95. protected $set_metering_mode = 0;
  96. /**
  97. * Constructor.
  98. *
  99. * @param array $data {
  100. * Optional. Data for populating the Message object.
  101. *
  102. * @type \Ydb\Operations\OperationParams $operation_params
  103. * @type string $path
  104. * Topic path.
  105. * @type \Ydb\Topic\AlterPartitioningSettings $alter_partitioning_settings
  106. * partitioning_settings
  107. * @type \Google\Protobuf\Duration $set_retention_period
  108. * Retention settings.
  109. * Currently, only one limit may be set, so other should not be set.
  110. * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
  111. * Default limit - 36 hours.
  112. * @type int|string $set_retention_storage_mb
  113. * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
  114. * @type \Ydb\Topic\SupportedCodecs $set_supported_codecs
  115. * List of allowed codecs for writers.
  116. * Writes with codec not from this list are forbidden.
  117. * @type int|string $set_partition_write_speed_bytes_per_second
  118. * Partition write speed in bytes per second. Must be less than database limit. Default limit - 1 MB/s.
  119. * @type int|string $set_partition_write_burst_bytes
  120. * Burst size for write in partition, in bytes. Must be less than database limit. Default limit - 1 MB.
  121. * @type array|\Google\Protobuf\Internal\MapField $alter_attributes
  122. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  123. * Leave the value blank to drop an attribute.
  124. * @type array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $add_consumers
  125. * Add consumers.
  126. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $drop_consumers
  127. * Remove consumers (by their names)
  128. * @type array<\Ydb\Topic\AlterConsumer>|\Google\Protobuf\Internal\RepeatedField $alter_consumers
  129. * Alter consumers
  130. * @type int $set_metering_mode
  131. * Set metering mode for topic in serverless database.
  132. * }
  133. */
  134. public function __construct($data = NULL) {
  135. \GPBMetadata\Protos\YdbTopic::initOnce();
  136. parent::__construct($data);
  137. }
  138. /**
  139. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  140. * @return \Ydb\Operations\OperationParams|null
  141. */
  142. public function getOperationParams()
  143. {
  144. return $this->operation_params;
  145. }
  146. public function hasOperationParams()
  147. {
  148. return isset($this->operation_params);
  149. }
  150. public function clearOperationParams()
  151. {
  152. unset($this->operation_params);
  153. }
  154. /**
  155. * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
  156. * @param \Ydb\Operations\OperationParams $var
  157. * @return $this
  158. */
  159. public function setOperationParams($var)
  160. {
  161. GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
  162. $this->operation_params = $var;
  163. return $this;
  164. }
  165. /**
  166. * Topic path.
  167. *
  168. * Generated from protobuf field <code>string path = 2;</code>
  169. * @return string
  170. */
  171. public function getPath()
  172. {
  173. return $this->path;
  174. }
  175. /**
  176. * Topic path.
  177. *
  178. * Generated from protobuf field <code>string path = 2;</code>
  179. * @param string $var
  180. * @return $this
  181. */
  182. public function setPath($var)
  183. {
  184. GPBUtil::checkString($var, True);
  185. $this->path = $var;
  186. return $this;
  187. }
  188. /**
  189. * partitioning_settings
  190. *
  191. * Generated from protobuf field <code>.Ydb.Topic.AlterPartitioningSettings alter_partitioning_settings = 3;</code>
  192. * @return \Ydb\Topic\AlterPartitioningSettings|null
  193. */
  194. public function getAlterPartitioningSettings()
  195. {
  196. return $this->alter_partitioning_settings;
  197. }
  198. public function hasAlterPartitioningSettings()
  199. {
  200. return isset($this->alter_partitioning_settings);
  201. }
  202. public function clearAlterPartitioningSettings()
  203. {
  204. unset($this->alter_partitioning_settings);
  205. }
  206. /**
  207. * partitioning_settings
  208. *
  209. * Generated from protobuf field <code>.Ydb.Topic.AlterPartitioningSettings alter_partitioning_settings = 3;</code>
  210. * @param \Ydb\Topic\AlterPartitioningSettings $var
  211. * @return $this
  212. */
  213. public function setAlterPartitioningSettings($var)
  214. {
  215. GPBUtil::checkMessage($var, \Ydb\Topic\AlterPartitioningSettings::class);
  216. $this->alter_partitioning_settings = $var;
  217. return $this;
  218. }
  219. /**
  220. * Retention settings.
  221. * Currently, only one limit may be set, so other should not be set.
  222. * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
  223. * Default limit - 36 hours.
  224. *
  225. * Generated from protobuf field <code>.google.protobuf.Duration set_retention_period = 4;</code>
  226. * @return \Google\Protobuf\Duration|null
  227. */
  228. public function getSetRetentionPeriod()
  229. {
  230. return $this->set_retention_period;
  231. }
  232. public function hasSetRetentionPeriod()
  233. {
  234. return isset($this->set_retention_period);
  235. }
  236. public function clearSetRetentionPeriod()
  237. {
  238. unset($this->set_retention_period);
  239. }
  240. /**
  241. * Retention settings.
  242. * Currently, only one limit may be set, so other should not be set.
  243. * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
  244. * Default limit - 36 hours.
  245. *
  246. * Generated from protobuf field <code>.google.protobuf.Duration set_retention_period = 4;</code>
  247. * @param \Google\Protobuf\Duration $var
  248. * @return $this
  249. */
  250. public function setSetRetentionPeriod($var)
  251. {
  252. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  253. $this->set_retention_period = $var;
  254. return $this;
  255. }
  256. /**
  257. * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
  258. *
  259. * Generated from protobuf field <code>optional int64 set_retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
  260. * @return int|string
  261. */
  262. public function getSetRetentionStorageMb()
  263. {
  264. return isset($this->set_retention_storage_mb) ? $this->set_retention_storage_mb : 0;
  265. }
  266. public function hasSetRetentionStorageMb()
  267. {
  268. return isset($this->set_retention_storage_mb);
  269. }
  270. public function clearSetRetentionStorageMb()
  271. {
  272. unset($this->set_retention_storage_mb);
  273. }
  274. /**
  275. * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
  276. *
  277. * Generated from protobuf field <code>optional int64 set_retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
  278. * @param int|string $var
  279. * @return $this
  280. */
  281. public function setSetRetentionStorageMb($var)
  282. {
  283. GPBUtil::checkInt64($var);
  284. $this->set_retention_storage_mb = $var;
  285. return $this;
  286. }
  287. /**
  288. * List of allowed codecs for writers.
  289. * Writes with codec not from this list are forbidden.
  290. *
  291. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 7;</code>
  292. * @return \Ydb\Topic\SupportedCodecs|null
  293. */
  294. public function getSetSupportedCodecs()
  295. {
  296. return $this->set_supported_codecs;
  297. }
  298. public function hasSetSupportedCodecs()
  299. {
  300. return isset($this->set_supported_codecs);
  301. }
  302. public function clearSetSupportedCodecs()
  303. {
  304. unset($this->set_supported_codecs);
  305. }
  306. /**
  307. * List of allowed codecs for writers.
  308. * Writes with codec not from this list are forbidden.
  309. *
  310. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs set_supported_codecs = 7;</code>
  311. * @param \Ydb\Topic\SupportedCodecs $var
  312. * @return $this
  313. */
  314. public function setSetSupportedCodecs($var)
  315. {
  316. GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
  317. $this->set_supported_codecs = $var;
  318. return $this;
  319. }
  320. /**
  321. * Partition write speed in bytes per second. Must be less than database limit. Default limit - 1 MB/s.
  322. *
  323. * Generated from protobuf field <code>optional int64 set_partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
  324. * @return int|string
  325. */
  326. public function getSetPartitionWriteSpeedBytesPerSecond()
  327. {
  328. return isset($this->set_partition_write_speed_bytes_per_second) ? $this->set_partition_write_speed_bytes_per_second : 0;
  329. }
  330. public function hasSetPartitionWriteSpeedBytesPerSecond()
  331. {
  332. return isset($this->set_partition_write_speed_bytes_per_second);
  333. }
  334. public function clearSetPartitionWriteSpeedBytesPerSecond()
  335. {
  336. unset($this->set_partition_write_speed_bytes_per_second);
  337. }
  338. /**
  339. * Partition write speed in bytes per second. Must be less than database limit. Default limit - 1 MB/s.
  340. *
  341. * Generated from protobuf field <code>optional int64 set_partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
  342. * @param int|string $var
  343. * @return $this
  344. */
  345. public function setSetPartitionWriteSpeedBytesPerSecond($var)
  346. {
  347. GPBUtil::checkInt64($var);
  348. $this->set_partition_write_speed_bytes_per_second = $var;
  349. return $this;
  350. }
  351. /**
  352. * Burst size for write in partition, in bytes. Must be less than database limit. Default limit - 1 MB.
  353. *
  354. * Generated from protobuf field <code>optional int64 set_partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
  355. * @return int|string
  356. */
  357. public function getSetPartitionWriteBurstBytes()
  358. {
  359. return isset($this->set_partition_write_burst_bytes) ? $this->set_partition_write_burst_bytes : 0;
  360. }
  361. public function hasSetPartitionWriteBurstBytes()
  362. {
  363. return isset($this->set_partition_write_burst_bytes);
  364. }
  365. public function clearSetPartitionWriteBurstBytes()
  366. {
  367. unset($this->set_partition_write_burst_bytes);
  368. }
  369. /**
  370. * Burst size for write in partition, in bytes. Must be less than database limit. Default limit - 1 MB.
  371. *
  372. * Generated from protobuf field <code>optional int64 set_partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
  373. * @param int|string $var
  374. * @return $this
  375. */
  376. public function setSetPartitionWriteBurstBytes($var)
  377. {
  378. GPBUtil::checkInt64($var);
  379. $this->set_partition_write_burst_bytes = $var;
  380. return $this;
  381. }
  382. /**
  383. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  384. * Leave the value blank to drop an attribute.
  385. *
  386. * Generated from protobuf field <code>map<string, string> alter_attributes = 10;</code>
  387. * @return \Google\Protobuf\Internal\MapField
  388. */
  389. public function getAlterAttributes()
  390. {
  391. return $this->alter_attributes;
  392. }
  393. /**
  394. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  395. * Leave the value blank to drop an attribute.
  396. *
  397. * Generated from protobuf field <code>map<string, string> alter_attributes = 10;</code>
  398. * @param array|\Google\Protobuf\Internal\MapField $var
  399. * @return $this
  400. */
  401. public function setAlterAttributes($var)
  402. {
  403. $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
  404. $this->alter_attributes = $arr;
  405. return $this;
  406. }
  407. /**
  408. * Add consumers.
  409. *
  410. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer add_consumers = 11 [(.Ydb.size) = {</code>
  411. * @return \Google\Protobuf\Internal\RepeatedField
  412. */
  413. public function getAddConsumers()
  414. {
  415. return $this->add_consumers;
  416. }
  417. /**
  418. * Add consumers.
  419. *
  420. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer add_consumers = 11 [(.Ydb.size) = {</code>
  421. * @param array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
  422. * @return $this
  423. */
  424. public function setAddConsumers($var)
  425. {
  426. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\Consumer::class);
  427. $this->add_consumers = $arr;
  428. return $this;
  429. }
  430. /**
  431. * Remove consumers (by their names)
  432. *
  433. * Generated from protobuf field <code>repeated string drop_consumers = 12 [(.Ydb.size) = {</code>
  434. * @return \Google\Protobuf\Internal\RepeatedField
  435. */
  436. public function getDropConsumers()
  437. {
  438. return $this->drop_consumers;
  439. }
  440. /**
  441. * Remove consumers (by their names)
  442. *
  443. * Generated from protobuf field <code>repeated string drop_consumers = 12 [(.Ydb.size) = {</code>
  444. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  445. * @return $this
  446. */
  447. public function setDropConsumers($var)
  448. {
  449. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  450. $this->drop_consumers = $arr;
  451. return $this;
  452. }
  453. /**
  454. * Alter consumers
  455. *
  456. * Generated from protobuf field <code>repeated .Ydb.Topic.AlterConsumer alter_consumers = 13 [(.Ydb.size) = {</code>
  457. * @return \Google\Protobuf\Internal\RepeatedField
  458. */
  459. public function getAlterConsumers()
  460. {
  461. return $this->alter_consumers;
  462. }
  463. /**
  464. * Alter consumers
  465. *
  466. * Generated from protobuf field <code>repeated .Ydb.Topic.AlterConsumer alter_consumers = 13 [(.Ydb.size) = {</code>
  467. * @param array<\Ydb\Topic\AlterConsumer>|\Google\Protobuf\Internal\RepeatedField $var
  468. * @return $this
  469. */
  470. public function setAlterConsumers($var)
  471. {
  472. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\AlterConsumer::class);
  473. $this->alter_consumers = $arr;
  474. return $this;
  475. }
  476. /**
  477. * Set metering mode for topic in serverless database.
  478. *
  479. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode set_metering_mode = 14;</code>
  480. * @return int
  481. */
  482. public function getSetMeteringMode()
  483. {
  484. return $this->set_metering_mode;
  485. }
  486. /**
  487. * Set metering mode for topic in serverless database.
  488. *
  489. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode set_metering_mode = 14;</code>
  490. * @param int $var
  491. * @return $this
  492. */
  493. public function setSetMeteringMode($var)
  494. {
  495. GPBUtil::checkEnum($var, \Ydb\Topic\MeteringMode::class);
  496. $this->set_metering_mode = $var;
  497. return $this;
  498. }
  499. }