ColumnFamily.php 5.0 KB

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