DescribeTopicResult.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  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. * Describe topic result message that will be inside DescribeTopicResponse.operation.
  10. *
  11. * Generated from protobuf message <code>Ydb.Topic.DescribeTopicResult</code>
  12. */
  13. class DescribeTopicResult extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Description of scheme object.
  17. *
  18. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  19. */
  20. protected $self = null;
  21. /**
  22. * Settings for partitioning
  23. *
  24. * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 2;</code>
  25. */
  26. protected $partitioning_settings = null;
  27. /**
  28. * Partitions description.
  29. *
  30. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;</code>
  31. */
  32. private $partitions;
  33. /**
  34. * Retention settings.
  35. * Currently, only one limit may be set, so other should not be set.
  36. * How long data in partition should be stored.
  37. *
  38. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  39. */
  40. protected $retention_period = null;
  41. /**
  42. * How much data in partition should be stored.
  43. * Zero value means infinite limit.
  44. *
  45. * Generated from protobuf field <code>int64 retention_storage_mb = 5;</code>
  46. */
  47. protected $retention_storage_mb = 0;
  48. /**
  49. * List of allowed codecs for writers.
  50. * Writes with codec not from this list are forbidden.
  51. *
  52. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
  53. */
  54. protected $supported_codecs = null;
  55. /**
  56. * Partition write speed in bytes per second.
  57. * Zero value means default limit: 1 MB per second.
  58. *
  59. * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8;</code>
  60. */
  61. protected $partition_write_speed_bytes_per_second = 0;
  62. /**
  63. * Burst size for write in partition, in bytes.
  64. * Zero value means default limit: 1 MB.
  65. *
  66. * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9;</code>
  67. */
  68. protected $partition_write_burst_bytes = 0;
  69. /**
  70. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  71. *
  72. * Generated from protobuf field <code>map<string, string> attributes = 10;</code>
  73. */
  74. private $attributes;
  75. /**
  76. * List of consumers for this topic.
  77. *
  78. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11;</code>
  79. */
  80. private $consumers;
  81. /**
  82. * Metering settings.
  83. *
  84. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
  85. */
  86. protected $metering_mode = 0;
  87. /**
  88. * Statistics of topic.
  89. *
  90. * Generated from protobuf field <code>.Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;</code>
  91. */
  92. protected $topic_stats = null;
  93. /**
  94. * Constructor.
  95. *
  96. * @param array $data {
  97. * Optional. Data for populating the Message object.
  98. *
  99. * @type \Ydb\Scheme\Entry $self
  100. * Description of scheme object.
  101. * @type \Ydb\Topic\PartitioningSettings $partitioning_settings
  102. * Settings for partitioning
  103. * @type array<\Ydb\Topic\DescribeTopicResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $partitions
  104. * Partitions description.
  105. * @type \Google\Protobuf\Duration $retention_period
  106. * Retention settings.
  107. * Currently, only one limit may be set, so other should not be set.
  108. * How long data in partition should be stored.
  109. * @type int|string $retention_storage_mb
  110. * How much data in partition should be stored.
  111. * Zero value means infinite limit.
  112. * @type \Ydb\Topic\SupportedCodecs $supported_codecs
  113. * List of allowed codecs for writers.
  114. * Writes with codec not from this list are forbidden.
  115. * @type int|string $partition_write_speed_bytes_per_second
  116. * Partition write speed in bytes per second.
  117. * Zero value means default limit: 1 MB per second.
  118. * @type int|string $partition_write_burst_bytes
  119. * Burst size for write in partition, in bytes.
  120. * Zero value means default limit: 1 MB.
  121. * @type array|\Google\Protobuf\Internal\MapField $attributes
  122. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  123. * @type array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $consumers
  124. * List of consumers for this topic.
  125. * @type int $metering_mode
  126. * Metering settings.
  127. * @type \Ydb\Topic\DescribeTopicResult\TopicStats $topic_stats
  128. * Statistics of topic.
  129. * }
  130. */
  131. public function __construct($data = NULL) {
  132. \GPBMetadata\Protos\YdbTopic::initOnce();
  133. parent::__construct($data);
  134. }
  135. /**
  136. * Description of scheme object.
  137. *
  138. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  139. * @return \Ydb\Scheme\Entry|null
  140. */
  141. public function getSelf()
  142. {
  143. return $this->self;
  144. }
  145. public function hasSelf()
  146. {
  147. return isset($this->self);
  148. }
  149. public function clearSelf()
  150. {
  151. unset($this->self);
  152. }
  153. /**
  154. * Description of scheme object.
  155. *
  156. * Generated from protobuf field <code>.Ydb.Scheme.Entry self = 1;</code>
  157. * @param \Ydb\Scheme\Entry $var
  158. * @return $this
  159. */
  160. public function setSelf($var)
  161. {
  162. GPBUtil::checkMessage($var, \Ydb\Scheme\Entry::class);
  163. $this->self = $var;
  164. return $this;
  165. }
  166. /**
  167. * Settings for partitioning
  168. *
  169. * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 2;</code>
  170. * @return \Ydb\Topic\PartitioningSettings|null
  171. */
  172. public function getPartitioningSettings()
  173. {
  174. return $this->partitioning_settings;
  175. }
  176. public function hasPartitioningSettings()
  177. {
  178. return isset($this->partitioning_settings);
  179. }
  180. public function clearPartitioningSettings()
  181. {
  182. unset($this->partitioning_settings);
  183. }
  184. /**
  185. * Settings for partitioning
  186. *
  187. * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 2;</code>
  188. * @param \Ydb\Topic\PartitioningSettings $var
  189. * @return $this
  190. */
  191. public function setPartitioningSettings($var)
  192. {
  193. GPBUtil::checkMessage($var, \Ydb\Topic\PartitioningSettings::class);
  194. $this->partitioning_settings = $var;
  195. return $this;
  196. }
  197. /**
  198. * Partitions description.
  199. *
  200. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;</code>
  201. * @return \Google\Protobuf\Internal\RepeatedField
  202. */
  203. public function getPartitions()
  204. {
  205. return $this->partitions;
  206. }
  207. /**
  208. * Partitions description.
  209. *
  210. * Generated from protobuf field <code>repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;</code>
  211. * @param array<\Ydb\Topic\DescribeTopicResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $var
  212. * @return $this
  213. */
  214. public function setPartitions($var)
  215. {
  216. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\DescribeTopicResult\PartitionInfo::class);
  217. $this->partitions = $arr;
  218. return $this;
  219. }
  220. /**
  221. * Retention settings.
  222. * Currently, only one limit may be set, so other should not be set.
  223. * How long data in partition should be stored.
  224. *
  225. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  226. * @return \Google\Protobuf\Duration|null
  227. */
  228. public function getRetentionPeriod()
  229. {
  230. return $this->retention_period;
  231. }
  232. public function hasRetentionPeriod()
  233. {
  234. return isset($this->retention_period);
  235. }
  236. public function clearRetentionPeriod()
  237. {
  238. unset($this->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.
  244. *
  245. * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
  246. * @param \Google\Protobuf\Duration $var
  247. * @return $this
  248. */
  249. public function setRetentionPeriod($var)
  250. {
  251. GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
  252. $this->retention_period = $var;
  253. return $this;
  254. }
  255. /**
  256. * How much data in partition should be stored.
  257. * Zero value means infinite limit.
  258. *
  259. * Generated from protobuf field <code>int64 retention_storage_mb = 5;</code>
  260. * @return int|string
  261. */
  262. public function getRetentionStorageMb()
  263. {
  264. return $this->retention_storage_mb;
  265. }
  266. /**
  267. * How much data in partition should be stored.
  268. * Zero value means infinite limit.
  269. *
  270. * Generated from protobuf field <code>int64 retention_storage_mb = 5;</code>
  271. * @param int|string $var
  272. * @return $this
  273. */
  274. public function setRetentionStorageMb($var)
  275. {
  276. GPBUtil::checkInt64($var);
  277. $this->retention_storage_mb = $var;
  278. return $this;
  279. }
  280. /**
  281. * List of allowed codecs for writers.
  282. * Writes with codec not from this list are forbidden.
  283. *
  284. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
  285. * @return \Ydb\Topic\SupportedCodecs|null
  286. */
  287. public function getSupportedCodecs()
  288. {
  289. return $this->supported_codecs;
  290. }
  291. public function hasSupportedCodecs()
  292. {
  293. return isset($this->supported_codecs);
  294. }
  295. public function clearSupportedCodecs()
  296. {
  297. unset($this->supported_codecs);
  298. }
  299. /**
  300. * List of allowed codecs for writers.
  301. * Writes with codec not from this list are forbidden.
  302. *
  303. * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
  304. * @param \Ydb\Topic\SupportedCodecs $var
  305. * @return $this
  306. */
  307. public function setSupportedCodecs($var)
  308. {
  309. GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
  310. $this->supported_codecs = $var;
  311. return $this;
  312. }
  313. /**
  314. * Partition write speed in bytes per second.
  315. * Zero value means default limit: 1 MB per second.
  316. *
  317. * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8;</code>
  318. * @return int|string
  319. */
  320. public function getPartitionWriteSpeedBytesPerSecond()
  321. {
  322. return $this->partition_write_speed_bytes_per_second;
  323. }
  324. /**
  325. * Partition write speed in bytes per second.
  326. * Zero value means default limit: 1 MB per second.
  327. *
  328. * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8;</code>
  329. * @param int|string $var
  330. * @return $this
  331. */
  332. public function setPartitionWriteSpeedBytesPerSecond($var)
  333. {
  334. GPBUtil::checkInt64($var);
  335. $this->partition_write_speed_bytes_per_second = $var;
  336. return $this;
  337. }
  338. /**
  339. * Burst size for write in partition, in bytes.
  340. * Zero value means default limit: 1 MB.
  341. *
  342. * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9;</code>
  343. * @return int|string
  344. */
  345. public function getPartitionWriteBurstBytes()
  346. {
  347. return $this->partition_write_burst_bytes;
  348. }
  349. /**
  350. * Burst size for write in partition, in bytes.
  351. * Zero value means default limit: 1 MB.
  352. *
  353. * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9;</code>
  354. * @param int|string $var
  355. * @return $this
  356. */
  357. public function setPartitionWriteBurstBytes($var)
  358. {
  359. GPBUtil::checkInt64($var);
  360. $this->partition_write_burst_bytes = $var;
  361. return $this;
  362. }
  363. /**
  364. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  365. *
  366. * Generated from protobuf field <code>map<string, string> attributes = 10;</code>
  367. * @return \Google\Protobuf\Internal\MapField
  368. */
  369. public function getAttributes()
  370. {
  371. return $this->attributes;
  372. }
  373. /**
  374. * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
  375. *
  376. * Generated from protobuf field <code>map<string, string> attributes = 10;</code>
  377. * @param array|\Google\Protobuf\Internal\MapField $var
  378. * @return $this
  379. */
  380. public function setAttributes($var)
  381. {
  382. $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
  383. $this->attributes = $arr;
  384. return $this;
  385. }
  386. /**
  387. * List of consumers for this topic.
  388. *
  389. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11;</code>
  390. * @return \Google\Protobuf\Internal\RepeatedField
  391. */
  392. public function getConsumers()
  393. {
  394. return $this->consumers;
  395. }
  396. /**
  397. * List of consumers for this topic.
  398. *
  399. * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11;</code>
  400. * @param array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
  401. * @return $this
  402. */
  403. public function setConsumers($var)
  404. {
  405. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\Consumer::class);
  406. $this->consumers = $arr;
  407. return $this;
  408. }
  409. /**
  410. * Metering settings.
  411. *
  412. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
  413. * @return int
  414. */
  415. public function getMeteringMode()
  416. {
  417. return $this->metering_mode;
  418. }
  419. /**
  420. * Metering settings.
  421. *
  422. * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
  423. * @param int $var
  424. * @return $this
  425. */
  426. public function setMeteringMode($var)
  427. {
  428. GPBUtil::checkEnum($var, \Ydb\Topic\MeteringMode::class);
  429. $this->metering_mode = $var;
  430. return $this;
  431. }
  432. /**
  433. * Statistics of topic.
  434. *
  435. * Generated from protobuf field <code>.Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;</code>
  436. * @return \Ydb\Topic\DescribeTopicResult\TopicStats|null
  437. */
  438. public function getTopicStats()
  439. {
  440. return $this->topic_stats;
  441. }
  442. public function hasTopicStats()
  443. {
  444. return isset($this->topic_stats);
  445. }
  446. public function clearTopicStats()
  447. {
  448. unset($this->topic_stats);
  449. }
  450. /**
  451. * Statistics of topic.
  452. *
  453. * Generated from protobuf field <code>.Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;</code>
  454. * @param \Ydb\Topic\DescribeTopicResult\TopicStats $var
  455. * @return $this
  456. */
  457. public function setTopicStats($var)
  458. {
  459. GPBUtil::checkMessage($var, \Ydb\Topic\DescribeTopicResult\TopicStats::class);
  460. $this->topic_stats = $var;
  461. return $this;
  462. }
  463. }