TableStats.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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.TableStats</code>
  10. */
  11. class TableStats extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Stats for each partition
  15. *
  16. * Generated from protobuf field <code>repeated .Ydb.Table.PartitionStats partition_stats = 1;</code>
  17. */
  18. private $partition_stats;
  19. /**
  20. * Approximate number of rows in table
  21. *
  22. * Generated from protobuf field <code>uint64 rows_estimate = 2;</code>
  23. */
  24. protected $rows_estimate = 0;
  25. /**
  26. * Approximate size of table (bytes)
  27. *
  28. * Generated from protobuf field <code>uint64 store_size = 3;</code>
  29. */
  30. protected $store_size = 0;
  31. /**
  32. * Number of partitions in table
  33. *
  34. * Generated from protobuf field <code>uint64 partitions = 4;</code>
  35. */
  36. protected $partitions = 0;
  37. /**
  38. * Timestamp of table creation
  39. *
  40. * Generated from protobuf field <code>.google.protobuf.Timestamp creation_time = 5;</code>
  41. */
  42. protected $creation_time = null;
  43. /**
  44. * Timestamp of last modification
  45. *
  46. * Generated from protobuf field <code>.google.protobuf.Timestamp modification_time = 6;</code>
  47. */
  48. protected $modification_time = null;
  49. /**
  50. * Constructor.
  51. *
  52. * @param array $data {
  53. * Optional. Data for populating the Message object.
  54. *
  55. * @type array<\Ydb\Table\PartitionStats>|\Google\Protobuf\Internal\RepeatedField $partition_stats
  56. * Stats for each partition
  57. * @type int|string $rows_estimate
  58. * Approximate number of rows in table
  59. * @type int|string $store_size
  60. * Approximate size of table (bytes)
  61. * @type int|string $partitions
  62. * Number of partitions in table
  63. * @type \Google\Protobuf\Timestamp $creation_time
  64. * Timestamp of table creation
  65. * @type \Google\Protobuf\Timestamp $modification_time
  66. * Timestamp of last modification
  67. * }
  68. */
  69. public function __construct($data = NULL) {
  70. \GPBMetadata\Protos\YdbTable::initOnce();
  71. parent::__construct($data);
  72. }
  73. /**
  74. * Stats for each partition
  75. *
  76. * Generated from protobuf field <code>repeated .Ydb.Table.PartitionStats partition_stats = 1;</code>
  77. * @return \Google\Protobuf\Internal\RepeatedField
  78. */
  79. public function getPartitionStats()
  80. {
  81. return $this->partition_stats;
  82. }
  83. /**
  84. * Stats for each partition
  85. *
  86. * Generated from protobuf field <code>repeated .Ydb.Table.PartitionStats partition_stats = 1;</code>
  87. * @param array<\Ydb\Table\PartitionStats>|\Google\Protobuf\Internal\RepeatedField $var
  88. * @return $this
  89. */
  90. public function setPartitionStats($var)
  91. {
  92. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Table\PartitionStats::class);
  93. $this->partition_stats = $arr;
  94. return $this;
  95. }
  96. /**
  97. * Approximate number of rows in table
  98. *
  99. * Generated from protobuf field <code>uint64 rows_estimate = 2;</code>
  100. * @return int|string
  101. */
  102. public function getRowsEstimate()
  103. {
  104. return $this->rows_estimate;
  105. }
  106. /**
  107. * Approximate number of rows in table
  108. *
  109. * Generated from protobuf field <code>uint64 rows_estimate = 2;</code>
  110. * @param int|string $var
  111. * @return $this
  112. */
  113. public function setRowsEstimate($var)
  114. {
  115. GPBUtil::checkUint64($var);
  116. $this->rows_estimate = $var;
  117. return $this;
  118. }
  119. /**
  120. * Approximate size of table (bytes)
  121. *
  122. * Generated from protobuf field <code>uint64 store_size = 3;</code>
  123. * @return int|string
  124. */
  125. public function getStoreSize()
  126. {
  127. return $this->store_size;
  128. }
  129. /**
  130. * Approximate size of table (bytes)
  131. *
  132. * Generated from protobuf field <code>uint64 store_size = 3;</code>
  133. * @param int|string $var
  134. * @return $this
  135. */
  136. public function setStoreSize($var)
  137. {
  138. GPBUtil::checkUint64($var);
  139. $this->store_size = $var;
  140. return $this;
  141. }
  142. /**
  143. * Number of partitions in table
  144. *
  145. * Generated from protobuf field <code>uint64 partitions = 4;</code>
  146. * @return int|string
  147. */
  148. public function getPartitions()
  149. {
  150. return $this->partitions;
  151. }
  152. /**
  153. * Number of partitions in table
  154. *
  155. * Generated from protobuf field <code>uint64 partitions = 4;</code>
  156. * @param int|string $var
  157. * @return $this
  158. */
  159. public function setPartitions($var)
  160. {
  161. GPBUtil::checkUint64($var);
  162. $this->partitions = $var;
  163. return $this;
  164. }
  165. /**
  166. * Timestamp of table creation
  167. *
  168. * Generated from protobuf field <code>.google.protobuf.Timestamp creation_time = 5;</code>
  169. * @return \Google\Protobuf\Timestamp|null
  170. */
  171. public function getCreationTime()
  172. {
  173. return $this->creation_time;
  174. }
  175. public function hasCreationTime()
  176. {
  177. return isset($this->creation_time);
  178. }
  179. public function clearCreationTime()
  180. {
  181. unset($this->creation_time);
  182. }
  183. /**
  184. * Timestamp of table creation
  185. *
  186. * Generated from protobuf field <code>.google.protobuf.Timestamp creation_time = 5;</code>
  187. * @param \Google\Protobuf\Timestamp $var
  188. * @return $this
  189. */
  190. public function setCreationTime($var)
  191. {
  192. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  193. $this->creation_time = $var;
  194. return $this;
  195. }
  196. /**
  197. * Timestamp of last modification
  198. *
  199. * Generated from protobuf field <code>.google.protobuf.Timestamp modification_time = 6;</code>
  200. * @return \Google\Protobuf\Timestamp|null
  201. */
  202. public function getModificationTime()
  203. {
  204. return $this->modification_time;
  205. }
  206. public function hasModificationTime()
  207. {
  208. return isset($this->modification_time);
  209. }
  210. public function clearModificationTime()
  211. {
  212. unset($this->modification_time);
  213. }
  214. /**
  215. * Timestamp of last modification
  216. *
  217. * Generated from protobuf field <code>.google.protobuf.Timestamp modification_time = 6;</code>
  218. * @param \Google\Protobuf\Timestamp $var
  219. * @return $this
  220. */
  221. public function setModificationTime($var)
  222. {
  223. GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
  224. $this->modification_time = $var;
  225. return $this;
  226. }
  227. }