TableIndexDescription.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. * Represent secondary index with index state
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.TableIndexDescription</code>
  12. */
  13. class TableIndexDescription extends \Google\Protobuf\Internal\Message
  14. {
  15. /**
  16. * Name of index
  17. *
  18. * Generated from protobuf field <code>string name = 1;</code>
  19. */
  20. protected $name = '';
  21. /**
  22. * list of columns
  23. *
  24. * Generated from protobuf field <code>repeated string index_columns = 2;</code>
  25. */
  26. private $index_columns;
  27. /**
  28. * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
  29. */
  30. protected $status = 0;
  31. /**
  32. * list of columns content to be copied in to index table
  33. *
  34. * Generated from protobuf field <code>repeated string data_columns = 6;</code>
  35. */
  36. private $data_columns;
  37. /**
  38. * Size of index data in bytes
  39. *
  40. * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
  41. */
  42. protected $size_bytes = 0;
  43. protected $type;
  44. /**
  45. * Constructor.
  46. *
  47. * @param array $data {
  48. * Optional. Data for populating the Message object.
  49. *
  50. * @type string $name
  51. * Name of index
  52. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $index_columns
  53. * list of columns
  54. * @type \Ydb\Table\GlobalIndex $global_index
  55. * @type \Ydb\Table\GlobalAsyncIndex $global_async_index
  56. * @type int $status
  57. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $data_columns
  58. * list of columns content to be copied in to index table
  59. * @type int|string $size_bytes
  60. * Size of index data in bytes
  61. * }
  62. */
  63. public function __construct($data = NULL) {
  64. \GPBMetadata\Protos\YdbTable::initOnce();
  65. parent::__construct($data);
  66. }
  67. /**
  68. * Name of index
  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 index
  79. *
  80. * Generated from protobuf field <code>string name = 1;</code>
  81. * @param string $var
  82. * @return $this
  83. */
  84. public function setName($var)
  85. {
  86. GPBUtil::checkString($var, True);
  87. $this->name = $var;
  88. return $this;
  89. }
  90. /**
  91. * list of columns
  92. *
  93. * Generated from protobuf field <code>repeated string index_columns = 2;</code>
  94. * @return \Google\Protobuf\Internal\RepeatedField
  95. */
  96. public function getIndexColumns()
  97. {
  98. return $this->index_columns;
  99. }
  100. /**
  101. * list of columns
  102. *
  103. * Generated from protobuf field <code>repeated string index_columns = 2;</code>
  104. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  105. * @return $this
  106. */
  107. public function setIndexColumns($var)
  108. {
  109. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  110. $this->index_columns = $arr;
  111. return $this;
  112. }
  113. /**
  114. * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
  115. * @return \Ydb\Table\GlobalIndex|null
  116. */
  117. public function getGlobalIndex()
  118. {
  119. return $this->readOneof(3);
  120. }
  121. public function hasGlobalIndex()
  122. {
  123. return $this->hasOneof(3);
  124. }
  125. /**
  126. * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
  127. * @param \Ydb\Table\GlobalIndex $var
  128. * @return $this
  129. */
  130. public function setGlobalIndex($var)
  131. {
  132. GPBUtil::checkMessage($var, \Ydb\Table\GlobalIndex::class);
  133. $this->writeOneof(3, $var);
  134. return $this;
  135. }
  136. /**
  137. * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 5;</code>
  138. * @return \Ydb\Table\GlobalAsyncIndex|null
  139. */
  140. public function getGlobalAsyncIndex()
  141. {
  142. return $this->readOneof(5);
  143. }
  144. public function hasGlobalAsyncIndex()
  145. {
  146. return $this->hasOneof(5);
  147. }
  148. /**
  149. * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 5;</code>
  150. * @param \Ydb\Table\GlobalAsyncIndex $var
  151. * @return $this
  152. */
  153. public function setGlobalAsyncIndex($var)
  154. {
  155. GPBUtil::checkMessage($var, \Ydb\Table\GlobalAsyncIndex::class);
  156. $this->writeOneof(5, $var);
  157. return $this;
  158. }
  159. /**
  160. * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
  161. * @return int
  162. */
  163. public function getStatus()
  164. {
  165. return $this->status;
  166. }
  167. /**
  168. * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
  169. * @param int $var
  170. * @return $this
  171. */
  172. public function setStatus($var)
  173. {
  174. GPBUtil::checkEnum($var, \Ydb\Table\TableIndexDescription\Status::class);
  175. $this->status = $var;
  176. return $this;
  177. }
  178. /**
  179. * list of columns content to be copied in to index table
  180. *
  181. * Generated from protobuf field <code>repeated string data_columns = 6;</code>
  182. * @return \Google\Protobuf\Internal\RepeatedField
  183. */
  184. public function getDataColumns()
  185. {
  186. return $this->data_columns;
  187. }
  188. /**
  189. * list of columns content to be copied in to index table
  190. *
  191. * Generated from protobuf field <code>repeated string data_columns = 6;</code>
  192. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  193. * @return $this
  194. */
  195. public function setDataColumns($var)
  196. {
  197. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  198. $this->data_columns = $arr;
  199. return $this;
  200. }
  201. /**
  202. * Size of index data in bytes
  203. *
  204. * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
  205. * @return int|string
  206. */
  207. public function getSizeBytes()
  208. {
  209. return $this->size_bytes;
  210. }
  211. /**
  212. * Size of index data in bytes
  213. *
  214. * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
  215. * @param int|string $var
  216. * @return $this
  217. */
  218. public function setSizeBytes($var)
  219. {
  220. GPBUtil::checkUint64($var);
  221. $this->size_bytes = $var;
  222. return $this;
  223. }
  224. /**
  225. * @return string
  226. */
  227. public function getType()
  228. {
  229. return $this->whichOneof("type");
  230. }
  231. }