TableIndex.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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
  10. *
  11. * Generated from protobuf message <code>Ydb.Table.TableIndex</code>
  12. */
  13. class TableIndex 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. * list of columns content to be copied in to index table
  29. *
  30. * Generated from protobuf field <code>repeated string data_columns = 5;</code>
  31. */
  32. private $data_columns;
  33. protected $type;
  34. /**
  35. * Constructor.
  36. *
  37. * @param array $data {
  38. * Optional. Data for populating the Message object.
  39. *
  40. * @type string $name
  41. * Name of index
  42. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $index_columns
  43. * list of columns
  44. * @type \Ydb\Table\GlobalIndex $global_index
  45. * @type \Ydb\Table\GlobalAsyncIndex $global_async_index
  46. * @type array<string>|\Google\Protobuf\Internal\RepeatedField $data_columns
  47. * list of columns content to be copied in to index table
  48. * }
  49. */
  50. public function __construct($data = NULL) {
  51. \GPBMetadata\Protos\YdbTable::initOnce();
  52. parent::__construct($data);
  53. }
  54. /**
  55. * Name of index
  56. *
  57. * Generated from protobuf field <code>string name = 1;</code>
  58. * @return string
  59. */
  60. public function getName()
  61. {
  62. return $this->name;
  63. }
  64. /**
  65. * Name of index
  66. *
  67. * Generated from protobuf field <code>string name = 1;</code>
  68. * @param string $var
  69. * @return $this
  70. */
  71. public function setName($var)
  72. {
  73. GPBUtil::checkString($var, True);
  74. $this->name = $var;
  75. return $this;
  76. }
  77. /**
  78. * list of columns
  79. *
  80. * Generated from protobuf field <code>repeated string index_columns = 2;</code>
  81. * @return \Google\Protobuf\Internal\RepeatedField
  82. */
  83. public function getIndexColumns()
  84. {
  85. return $this->index_columns;
  86. }
  87. /**
  88. * list of columns
  89. *
  90. * Generated from protobuf field <code>repeated string index_columns = 2;</code>
  91. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  92. * @return $this
  93. */
  94. public function setIndexColumns($var)
  95. {
  96. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  97. $this->index_columns = $arr;
  98. return $this;
  99. }
  100. /**
  101. * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
  102. * @return \Ydb\Table\GlobalIndex|null
  103. */
  104. public function getGlobalIndex()
  105. {
  106. return $this->readOneof(3);
  107. }
  108. public function hasGlobalIndex()
  109. {
  110. return $this->hasOneof(3);
  111. }
  112. /**
  113. * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
  114. * @param \Ydb\Table\GlobalIndex $var
  115. * @return $this
  116. */
  117. public function setGlobalIndex($var)
  118. {
  119. GPBUtil::checkMessage($var, \Ydb\Table\GlobalIndex::class);
  120. $this->writeOneof(3, $var);
  121. return $this;
  122. }
  123. /**
  124. * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 4;</code>
  125. * @return \Ydb\Table\GlobalAsyncIndex|null
  126. */
  127. public function getGlobalAsyncIndex()
  128. {
  129. return $this->readOneof(4);
  130. }
  131. public function hasGlobalAsyncIndex()
  132. {
  133. return $this->hasOneof(4);
  134. }
  135. /**
  136. * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 4;</code>
  137. * @param \Ydb\Table\GlobalAsyncIndex $var
  138. * @return $this
  139. */
  140. public function setGlobalAsyncIndex($var)
  141. {
  142. GPBUtil::checkMessage($var, \Ydb\Table\GlobalAsyncIndex::class);
  143. $this->writeOneof(4, $var);
  144. return $this;
  145. }
  146. /**
  147. * list of columns content to be copied in to index table
  148. *
  149. * Generated from protobuf field <code>repeated string data_columns = 5;</code>
  150. * @return \Google\Protobuf\Internal\RepeatedField
  151. */
  152. public function getDataColumns()
  153. {
  154. return $this->data_columns;
  155. }
  156. /**
  157. * list of columns content to be copied in to index table
  158. *
  159. * Generated from protobuf field <code>repeated string data_columns = 5;</code>
  160. * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
  161. * @return $this
  162. */
  163. public function setDataColumns($var)
  164. {
  165. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  166. $this->data_columns = $arr;
  167. return $this;
  168. }
  169. /**
  170. * @return string
  171. */
  172. public function getType()
  173. {
  174. return $this->whichOneof("type");
  175. }
  176. }