123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <?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 with index state
- *
- * Generated from protobuf message <code>Ydb.Table.TableIndexDescription</code>
- */
- class TableIndexDescription 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;
- /**
- * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
- */
- protected $status = 0;
- /**
- * list of columns content to be copied in to index table
- *
- * Generated from protobuf field <code>repeated string data_columns = 6;</code>
- */
- private $data_columns;
- /**
- * Size of index data in bytes
- *
- * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
- */
- protected $size_bytes = 0;
- 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 int $status
- * @type array<string>|\Google\Protobuf\Internal\RepeatedField $data_columns
- * list of columns content to be copied in to index table
- * @type int|string $size_bytes
- * Size of index data in bytes
- * }
- */
- 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 = 5;</code>
- * @return \Ydb\Table\GlobalAsyncIndex|null
- */
- public function getGlobalAsyncIndex()
- {
- return $this->readOneof(5);
- }
- public function hasGlobalAsyncIndex()
- {
- return $this->hasOneof(5);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.GlobalAsyncIndex global_async_index = 5;</code>
- * @param \Ydb\Table\GlobalAsyncIndex $var
- * @return $this
- */
- public function setGlobalAsyncIndex($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\GlobalAsyncIndex::class);
- $this->writeOneof(5, $var);
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
- * @return int
- */
- public function getStatus()
- {
- return $this->status;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Table.TableIndexDescription.Status status = 4;</code>
- * @param int $var
- * @return $this
- */
- public function setStatus($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Table\TableIndexDescription\Status::class);
- $this->status = $var;
- return $this;
- }
- /**
- * list of columns content to be copied in to index table
- *
- * Generated from protobuf field <code>repeated string data_columns = 6;</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 = 6;</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;
- }
- /**
- * Size of index data in bytes
- *
- * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
- * @return int|string
- */
- public function getSizeBytes()
- {
- return $this->size_bytes;
- }
- /**
- * Size of index data in bytes
- *
- * Generated from protobuf field <code>uint64 size_bytes = 7;</code>
- * @param int|string $var
- * @return $this
- */
- public function setSizeBytes($var)
- {
- GPBUtil::checkUint64($var);
- $this->size_bytes = $var;
- return $this;
- }
- /**
- * @return string
- */
- public function getType()
- {
- return $this->whichOneof("type");
- }
- }
|