123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_table.proto
- namespace Ydb\Table;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Represent secondary index
- *
- * Generated from protobuf message <code>Ydb.Table.TableIndex</code>
- */
- class TableIndex extends \Google\Protobuf\Internal\Message
- {
- /**
- * Name of index
- *
- * Generated from protobuf field <code>string name = 1;</code>
- */
- protected $name = '';
- /**
- * list of columns
- *
- * Generated from protobuf field <code>repeated string index_columns = 2;</code>
- */
- private $index_columns;
- /**
- * list of columns content to be copied in to index table
- *
- * Generated from protobuf field <code>repeated string data_columns = 5;</code>
- */
- private $data_columns;
- protected $type;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $name
- * Name of index
- * @type array<string>|\Google\Protobuf\Internal\RepeatedField $index_columns
- * list of columns
- * @type \Ydb\Table\GlobalIndex $global_index
- * @type \Ydb\Table\GlobalAsyncIndex $global_async_index
- * @type array<string>|\Google\Protobuf\Internal\RepeatedField $data_columns
- * list of columns content to be copied in to index table
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTable::initOnce();
- parent::__construct($data);
- }
- /**
- * Name of index
- *
- * Generated from protobuf field <code>string name = 1;</code>
- * @return string
- */
- public function getName()
- {
- return $this->name;
- }
- /**
- * Name of index
- *
- * Generated from protobuf field <code>string name = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setName($var)
- {
- GPBUtil::checkString($var, True);
- $this->name = $var;
- return $this;
- }
- /**
- * list of columns
- *
- * Generated from protobuf field <code>repeated string index_columns = 2;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getIndexColumns()
- {
- return $this->index_columns;
- }
- /**
- * list of columns
- *
- * Generated from protobuf field <code>repeated string index_columns = 2;</code>
- * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setIndexColumns($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->index_columns = $arr;
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
- * @return \Ydb\Table\GlobalIndex|null
- */
- public function getGlobalIndex()
- {
- return $this->readOneof(3);
- }
- public function hasGlobalIndex()
- {
- return $this->hasOneof(3);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.GlobalIndex global_index = 3;</code>
- * @param \Ydb\Table\GlobalIndex $var
- * @return $this
- */
- public function setGlobalIndex($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\GlobalIndex::class);
- $this->writeOneof(3, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 4;</code>
- * @return \Ydb\Table\GlobalAsyncIndex|null
- */
- public function getGlobalAsyncIndex()
- {
- return $this->readOneof(4);
- }
- public function hasGlobalAsyncIndex()
- {
- return $this->hasOneof(4);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 4;</code>
- * @param \Ydb\Table\GlobalAsyncIndex $var
- * @return $this
- */
- public function setGlobalAsyncIndex($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\GlobalAsyncIndex::class);
- $this->writeOneof(4, $var);
- return $this;
- }
- /**
- * list of columns content to be copied in to index table
- *
- * Generated from protobuf field <code>repeated string data_columns = 5;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getDataColumns()
- {
- return $this->data_columns;
- }
- /**
- * list of columns content to be copied in to index table
- *
- * Generated from protobuf field <code>repeated string data_columns = 5;</code>
- * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setDataColumns($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->data_columns = $arr;
- return $this;
- }
- /**
- * @return string
- */
- public function getType()
- {
- return $this->whichOneof("type");
- }
- }
|