ColumnFamilyPolicy.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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.ColumnFamilyPolicy</code>
  10. */
  11. class ColumnFamilyPolicy extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * Name of the column family, the name "default" must be used for the
  15. * primary column family that contains as least primary key columns
  16. *
  17. * Generated from protobuf field <code>string name = 1;</code>
  18. */
  19. protected $name = '';
  20. /**
  21. * Storage settings for the column group (default to values in storage policy)
  22. *
  23. * Generated from protobuf field <code>.Ydb.Table.StoragePool data = 2;</code>
  24. */
  25. protected $data = null;
  26. /**
  27. * Generated from protobuf field <code>.Ydb.Table.StoragePool external = 3;</code>
  28. */
  29. protected $external = null;
  30. /**
  31. * When enabled table data will be kept in memory
  32. * WARNING: DO NOT USE
  33. *
  34. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status keep_in_memory = 4;</code>
  35. */
  36. protected $keep_in_memory = 0;
  37. /**
  38. * Optionally specify whether data should be compressed
  39. *
  40. * Generated from protobuf field <code>.Ydb.Table.ColumnFamilyPolicy.Compression compression = 5;</code>
  41. */
  42. protected $compression = 0;
  43. /**
  44. * Constructor.
  45. *
  46. * @param array $data {
  47. * Optional. Data for populating the Message object.
  48. *
  49. * @type string $name
  50. * Name of the column family, the name "default" must be used for the
  51. * primary column family that contains as least primary key columns
  52. * @type \Ydb\Table\StoragePool $data
  53. * Storage settings for the column group (default to values in storage policy)
  54. * @type \Ydb\Table\StoragePool $external
  55. * @type int $keep_in_memory
  56. * When enabled table data will be kept in memory
  57. * WARNING: DO NOT USE
  58. * @type int $compression
  59. * Optionally specify whether data should be compressed
  60. * }
  61. */
  62. public function __construct($data = NULL) {
  63. \GPBMetadata\Protos\YdbTable::initOnce();
  64. parent::__construct($data);
  65. }
  66. /**
  67. * Name of the column family, the name "default" must be used for the
  68. * primary column family that contains as least primary key columns
  69. *
  70. * Generated from protobuf field <code>string name = 1;</code>
  71. * @return string
  72. */
  73. public function getName()
  74. {
  75. return $this->name;
  76. }
  77. /**
  78. * Name of the column family, the name "default" must be used for the
  79. * primary column family that contains as least primary key columns
  80. *
  81. * Generated from protobuf field <code>string name = 1;</code>
  82. * @param string $var
  83. * @return $this
  84. */
  85. public function setName($var)
  86. {
  87. GPBUtil::checkString($var, True);
  88. $this->name = $var;
  89. return $this;
  90. }
  91. /**
  92. * Storage settings for the column group (default to values in storage policy)
  93. *
  94. * Generated from protobuf field <code>.Ydb.Table.StoragePool data = 2;</code>
  95. * @return \Ydb\Table\StoragePool|null
  96. */
  97. public function getData()
  98. {
  99. return $this->data;
  100. }
  101. public function hasData()
  102. {
  103. return isset($this->data);
  104. }
  105. public function clearData()
  106. {
  107. unset($this->data);
  108. }
  109. /**
  110. * Storage settings for the column group (default to values in storage policy)
  111. *
  112. * Generated from protobuf field <code>.Ydb.Table.StoragePool data = 2;</code>
  113. * @param \Ydb\Table\StoragePool $var
  114. * @return $this
  115. */
  116. public function setData($var)
  117. {
  118. GPBUtil::checkMessage($var, \Ydb\Table\StoragePool::class);
  119. $this->data = $var;
  120. return $this;
  121. }
  122. /**
  123. * Generated from protobuf field <code>.Ydb.Table.StoragePool external = 3;</code>
  124. * @return \Ydb\Table\StoragePool|null
  125. */
  126. public function getExternal()
  127. {
  128. return $this->external;
  129. }
  130. public function hasExternal()
  131. {
  132. return isset($this->external);
  133. }
  134. public function clearExternal()
  135. {
  136. unset($this->external);
  137. }
  138. /**
  139. * Generated from protobuf field <code>.Ydb.Table.StoragePool external = 3;</code>
  140. * @param \Ydb\Table\StoragePool $var
  141. * @return $this
  142. */
  143. public function setExternal($var)
  144. {
  145. GPBUtil::checkMessage($var, \Ydb\Table\StoragePool::class);
  146. $this->external = $var;
  147. return $this;
  148. }
  149. /**
  150. * When enabled table data will be kept in memory
  151. * WARNING: DO NOT USE
  152. *
  153. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status keep_in_memory = 4;</code>
  154. * @return int
  155. */
  156. public function getKeepInMemory()
  157. {
  158. return $this->keep_in_memory;
  159. }
  160. /**
  161. * When enabled table data will be kept in memory
  162. * WARNING: DO NOT USE
  163. *
  164. * Generated from protobuf field <code>.Ydb.FeatureFlag.Status keep_in_memory = 4;</code>
  165. * @param int $var
  166. * @return $this
  167. */
  168. public function setKeepInMemory($var)
  169. {
  170. GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
  171. $this->keep_in_memory = $var;
  172. return $this;
  173. }
  174. /**
  175. * Optionally specify whether data should be compressed
  176. *
  177. * Generated from protobuf field <code>.Ydb.Table.ColumnFamilyPolicy.Compression compression = 5;</code>
  178. * @return int
  179. */
  180. public function getCompression()
  181. {
  182. return $this->compression;
  183. }
  184. /**
  185. * Optionally specify whether data should be compressed
  186. *
  187. * Generated from protobuf field <code>.Ydb.Table.ColumnFamilyPolicy.Compression compression = 5;</code>
  188. * @param int $var
  189. * @return $this
  190. */
  191. public function setCompression($var)
  192. {
  193. GPBUtil::checkEnum($var, \Ydb\Table\ColumnFamilyPolicy\Compression::class);
  194. $this->compression = $var;
  195. return $this;
  196. }
  197. }