PartitioningSettings.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.PartitioningSettings</code>
  10. */
  11. class PartitioningSettings extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * List of columns to partition by
  15. *
  16. * Generated from protobuf field <code>repeated string partition_by = 1;</code>
  17. */
  18. private $partition_by;
  19. /**
  20. * Enable auto partitioning on reaching upper or lower partition size bound
  21. *
  22. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_size = 2;</code>
  23. */
  24. protected $partitioning_by_size = 0;
  25. /**
  26. * Preferred partition size for auto partitioning by size, Mb
  27. *
  28. * Generated from protobuf field <code>uint64 partition_size_mb = 3;</code>
  29. */
  30. protected $partition_size_mb = 0;
  31. /**
  32. * Enable auto partitioning based on load on each partition
  33. *
  34. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_load = 4;</code>
  35. */
  36. protected $partitioning_by_load = 0;
  37. /**
  38. * Minimum partitions count auto merge would stop working at
  39. *
  40. * Generated from protobuf field <code>uint64 min_partitions_count = 6;</code>
  41. */
  42. protected $min_partitions_count = 0;
  43. /**
  44. * Maximum partitions count auto split would stop working at
  45. *
  46. * Generated from protobuf field <code>uint64 max_partitions_count = 7;</code>
  47. */
  48. protected $max_partitions_count = 0;
  49. /**
  50. * Constructor.
  51. *
  52. * @param array $data {
  53. * Optional. Data for populating the Message object.
  54. *
  55. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $partition_by
  56. * List of columns to partition by
  57. * @type int $partitioning_by_size
  58. * Enable auto partitioning on reaching upper or lower partition size bound
  59. * @type int|string $partition_size_mb
  60. * Preferred partition size for auto partitioning by size, Mb
  61. * @type int $partitioning_by_load
  62. * Enable auto partitioning based on load on each partition
  63. * @type int|string $min_partitions_count
  64. * Minimum partitions count auto merge would stop working at
  65. * @type int|string $max_partitions_count
  66. * Maximum partitions count auto split would stop working at
  67. * }
  68. */
  69. public function __construct($data = NULL) {
  70. \GPBMetadata\Protos\YdbTable::initOnce();
  71. parent::__construct($data);
  72. }
  73. /**
  74. * List of columns to partition by
  75. *
  76. * Generated from protobuf field <code>repeated string partition_by = 1;</code>
  77. * @return \Google\Protobuf\Internal\RepeatedField
  78. */
  79. public function getPartitionBy()
  80. {
  81. return $this->partition_by;
  82. }
  83. /**
  84. * List of columns to partition by
  85. *
  86. * Generated from protobuf field <code>repeated string partition_by = 1;</code>
  87. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  88. * @return $this
  89. */
  90. public function setPartitionBy($var)
  91. {
  92. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  93. $this->partition_by = $arr;
  94. return $this;
  95. }
  96. /**
  97. * Enable auto partitioning on reaching upper or lower partition size bound
  98. *
  99. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_size = 2;</code>
  100. * @return int
  101. */
  102. public function getPartitioningBySize()
  103. {
  104. return $this->partitioning_by_size;
  105. }
  106. /**
  107. * Enable auto partitioning on reaching upper or lower partition size bound
  108. *
  109. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_size = 2;</code>
  110. * @param int $var
  111. * @return $this
  112. */
  113. public function setPartitioningBySize($var)
  114. {
  115. GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
  116. $this->partitioning_by_size = $var;
  117. return $this;
  118. }
  119. /**
  120. * Preferred partition size for auto partitioning by size, Mb
  121. *
  122. * Generated from protobuf field <code>uint64 partition_size_mb = 3;</code>
  123. * @return int|string
  124. */
  125. public function getPartitionSizeMb()
  126. {
  127. return $this->partition_size_mb;
  128. }
  129. /**
  130. * Preferred partition size for auto partitioning by size, Mb
  131. *
  132. * Generated from protobuf field <code>uint64 partition_size_mb = 3;</code>
  133. * @param int|string $var
  134. * @return $this
  135. */
  136. public function setPartitionSizeMb($var)
  137. {
  138. GPBUtil::checkUint64($var);
  139. $this->partition_size_mb = $var;
  140. return $this;
  141. }
  142. /**
  143. * Enable auto partitioning based on load on each partition
  144. *
  145. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_load = 4;</code>
  146. * @return int
  147. */
  148. public function getPartitioningByLoad()
  149. {
  150. return $this->partitioning_by_load;
  151. }
  152. /**
  153. * Enable auto partitioning based on load on each partition
  154. *
  155. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status partitioning_by_load = 4;</code>
  156. * @param int $var
  157. * @return $this
  158. */
  159. public function setPartitioningByLoad($var)
  160. {
  161. GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
  162. $this->partitioning_by_load = $var;
  163. return $this;
  164. }
  165. /**
  166. * Minimum partitions count auto merge would stop working at
  167. *
  168. * Generated from protobuf field <code>uint64 min_partitions_count = 6;</code>
  169. * @return int|string
  170. */
  171. public function getMinPartitionsCount()
  172. {
  173. return $this->min_partitions_count;
  174. }
  175. /**
  176. * Minimum partitions count auto merge would stop working at
  177. *
  178. * Generated from protobuf field <code>uint64 min_partitions_count = 6;</code>
  179. * @param int|string $var
  180. * @return $this
  181. */
  182. public function setMinPartitionsCount($var)
  183. {
  184. GPBUtil::checkUint64($var);
  185. $this->min_partitions_count = $var;
  186. return $this;
  187. }
  188. /**
  189. * Maximum partitions count auto split would stop working at
  190. *
  191. * Generated from protobuf field <code>uint64 max_partitions_count = 7;</code>
  192. * @return int|string
  193. */
  194. public function getMaxPartitionsCount()
  195. {
  196. return $this->max_partitions_count;
  197. }
  198. /**
  199. * Maximum partitions count auto split would stop working at
  200. *
  201. * Generated from protobuf field <code>uint64 max_partitions_count = 7;</code>
  202. * @param int|string $var
  203. * @return $this
  204. */
  205. public function setMaxPartitionsCount($var)
  206. {
  207. GPBUtil::checkUint64($var);
  208. $this->max_partitions_count = $var;
  209. return $this;
  210. }
  211. }