Ydb.Table.TableIndex
*/
class TableIndex extends \Google\Protobuf\Internal\Message
{
/**
* Name of index
*
* Generated from protobuf field string name = 1;
*/
protected $name = '';
/**
* list of columns
*
* Generated from protobuf field repeated string index_columns = 2;
*/
private $index_columns;
/**
* list of columns content to be copied in to index table
*
* Generated from protobuf field repeated string data_columns = 5;
*/
private $data_columns;
protected $type;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $name
* Name of index
* @type array|\Google\Protobuf\Internal\RepeatedField $index_columns
* list of columns
* @type \Ydb\Table\GlobalIndex $global_index
* @type \Ydb\Table\GlobalAsyncIndex $global_async_index
* @type array|\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 string name = 1;
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Name of index
*
* Generated from protobuf field string name = 1;
* @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 repeated string index_columns = 2;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getIndexColumns()
{
return $this->index_columns;
}
/**
* list of columns
*
* Generated from protobuf field repeated string index_columns = 2;
* @param array|\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 .Ydb.Table.GlobalIndex global_index = 3;
* @return \Ydb\Table\GlobalIndex|null
*/
public function getGlobalIndex()
{
return $this->readOneof(3);
}
public function hasGlobalIndex()
{
return $this->hasOneof(3);
}
/**
* Generated from protobuf field .Ydb.Table.GlobalIndex global_index = 3;
* @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 .Ydb.Table.GlobalAsyncIndex global_async_index = 4;
* @return \Ydb\Table\GlobalAsyncIndex|null
*/
public function getGlobalAsyncIndex()
{
return $this->readOneof(4);
}
public function hasGlobalAsyncIndex()
{
return $this->hasOneof(4);
}
/**
* Generated from protobuf field .Ydb.Table.GlobalAsyncIndex global_async_index = 4;
* @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 repeated string data_columns = 5;
* @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 repeated string data_columns = 5;
* @param array|\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");
}
}