123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672 |
- <?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;
- /**
- * Generated from protobuf message <code>Ydb.Table.CreateTableRequest</code>
- */
- class CreateTableRequest extends \Google\Protobuf\Internal\Message
- {
- /**
- * Session identifier
- *
- * Generated from protobuf field <code>string session_id = 1;</code>
- */
- protected $session_id = '';
- /**
- * Full path
- *
- * Generated from protobuf field <code>string path = 2;</code>
- */
- protected $path = '';
- /**
- * Columns (name, type)
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnMeta columns = 3;</code>
- */
- private $columns;
- /**
- * List of columns used as primary key
- *
- * Generated from protobuf field <code>repeated string primary_key = 4;</code>
- */
- private $primary_key;
- /**
- * Table profile
- *
- * Generated from protobuf field <code>.Ydb.Table.TableProfile profile = 5;</code>
- */
- protected $profile = null;
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 6;</code>
- */
- protected $operation_params = null;
- /**
- * List of secondary indexes
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.TableIndex indexes = 7;</code>
- */
- private $indexes;
- /**
- * Table rows time to live settings
- *
- * Generated from protobuf field <code>.Ydb.Table.TtlSettings ttl_settings = 8;</code>
- */
- protected $ttl_settings = null;
- /**
- * Storage settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.StorageSettings storage_settings = 9;</code>
- */
- protected $storage_settings = null;
- /**
- * Column families
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnFamily column_families = 10;</code>
- */
- private $column_families;
- /**
- * Attributes. Total size is limited to 10 KB.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 11 [(.Ydb.length) = {</code>
- */
- private $attributes;
- /**
- * Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
- *
- * Generated from protobuf field <code>string compaction_policy = 12;</code>
- */
- protected $compaction_policy = '';
- /**
- * Partitioning settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.PartitioningSettings partitioning_settings = 15;</code>
- */
- protected $partitioning_settings = null;
- /**
- * Bloom filter by key
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status key_bloom_filter = 16;</code>
- */
- protected $key_bloom_filter = 0;
- /**
- * Read replicas settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.ReadReplicasSettings read_replicas_settings = 17;</code>
- */
- protected $read_replicas_settings = null;
- protected $partitions;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $session_id
- * Session identifier
- * @type string $path
- * Full path
- * @type array<\Ydb\Table\ColumnMeta>|\Google\Protobuf\Internal\RepeatedField $columns
- * Columns (name, type)
- * @type array<string>|\Google\Protobuf\Internal\RepeatedField $primary_key
- * List of columns used as primary key
- * @type \Ydb\Table\TableProfile $profile
- * Table profile
- * @type \Ydb\Operations\OperationParams $operation_params
- * @type array<\Ydb\Table\TableIndex>|\Google\Protobuf\Internal\RepeatedField $indexes
- * List of secondary indexes
- * @type \Ydb\Table\TtlSettings $ttl_settings
- * Table rows time to live settings
- * @type \Ydb\Table\StorageSettings $storage_settings
- * Storage settings for table
- * @type array<\Ydb\Table\ColumnFamily>|\Google\Protobuf\Internal\RepeatedField $column_families
- * Column families
- * @type array|\Google\Protobuf\Internal\MapField $attributes
- * Attributes. Total size is limited to 10 KB.
- * @type string $compaction_policy
- * Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
- * @type int|string $uniform_partitions
- * Enable uniform partitioning using given partitions count.
- * The first components of primary key must have Uint32/Uint64 type.
- * @type \Ydb\Table\ExplicitPartitions $partition_at_keys
- * Explicitly specify key values which are used as borders for created partitions.
- * @type \Ydb\Table\PartitioningSettings $partitioning_settings
- * Partitioning settings for table
- * @type int $key_bloom_filter
- * Bloom filter by key
- * @type \Ydb\Table\ReadReplicasSettings $read_replicas_settings
- * Read replicas settings for table
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTable::initOnce();
- parent::__construct($data);
- }
- /**
- * Session identifier
- *
- * Generated from protobuf field <code>string session_id = 1;</code>
- * @return string
- */
- public function getSessionId()
- {
- return $this->session_id;
- }
- /**
- * Session identifier
- *
- * Generated from protobuf field <code>string session_id = 1;</code>
- * @param string $var
- * @return $this
- */
- public function setSessionId($var)
- {
- GPBUtil::checkString($var, True);
- $this->session_id = $var;
- return $this;
- }
- /**
- * Full path
- *
- * Generated from protobuf field <code>string path = 2;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Full path
- *
- * Generated from protobuf field <code>string path = 2;</code>
- * @param string $var
- * @return $this
- */
- public function setPath($var)
- {
- GPBUtil::checkString($var, True);
- $this->path = $var;
- return $this;
- }
- /**
- * Columns (name, type)
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnMeta columns = 3;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getColumns()
- {
- return $this->columns;
- }
- /**
- * Columns (name, type)
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnMeta columns = 3;</code>
- * @param array<\Ydb\Table\ColumnMeta>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setColumns($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Table\ColumnMeta::class);
- $this->columns = $arr;
- return $this;
- }
- /**
- * List of columns used as primary key
- *
- * Generated from protobuf field <code>repeated string primary_key = 4;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getPrimaryKey()
- {
- return $this->primary_key;
- }
- /**
- * List of columns used as primary key
- *
- * Generated from protobuf field <code>repeated string primary_key = 4;</code>
- * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setPrimaryKey($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
- $this->primary_key = $arr;
- return $this;
- }
- /**
- * Table profile
- *
- * Generated from protobuf field <code>.Ydb.Table.TableProfile profile = 5;</code>
- * @return \Ydb\Table\TableProfile|null
- */
- public function getProfile()
- {
- return $this->profile;
- }
- public function hasProfile()
- {
- return isset($this->profile);
- }
- public function clearProfile()
- {
- unset($this->profile);
- }
- /**
- * Table profile
- *
- * Generated from protobuf field <code>.Ydb.Table.TableProfile profile = 5;</code>
- * @param \Ydb\Table\TableProfile $var
- * @return $this
- */
- public function setProfile($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\TableProfile::class);
- $this->profile = $var;
- return $this;
- }
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 6;</code>
- * @return \Ydb\Operations\OperationParams|null
- */
- public function getOperationParams()
- {
- return $this->operation_params;
- }
- public function hasOperationParams()
- {
- return isset($this->operation_params);
- }
- public function clearOperationParams()
- {
- unset($this->operation_params);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 6;</code>
- * @param \Ydb\Operations\OperationParams $var
- * @return $this
- */
- public function setOperationParams($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Operations\OperationParams::class);
- $this->operation_params = $var;
- return $this;
- }
- /**
- * List of secondary indexes
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.TableIndex indexes = 7;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getIndexes()
- {
- return $this->indexes;
- }
- /**
- * List of secondary indexes
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.TableIndex indexes = 7;</code>
- * @param array<\Ydb\Table\TableIndex>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setIndexes($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Table\TableIndex::class);
- $this->indexes = $arr;
- return $this;
- }
- /**
- * Table rows time to live settings
- *
- * Generated from protobuf field <code>.Ydb.Table.TtlSettings ttl_settings = 8;</code>
- * @return \Ydb\Table\TtlSettings|null
- */
- public function getTtlSettings()
- {
- return $this->ttl_settings;
- }
- public function hasTtlSettings()
- {
- return isset($this->ttl_settings);
- }
- public function clearTtlSettings()
- {
- unset($this->ttl_settings);
- }
- /**
- * Table rows time to live settings
- *
- * Generated from protobuf field <code>.Ydb.Table.TtlSettings ttl_settings = 8;</code>
- * @param \Ydb\Table\TtlSettings $var
- * @return $this
- */
- public function setTtlSettings($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\TtlSettings::class);
- $this->ttl_settings = $var;
- return $this;
- }
- /**
- * Storage settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.StorageSettings storage_settings = 9;</code>
- * @return \Ydb\Table\StorageSettings|null
- */
- public function getStorageSettings()
- {
- return $this->storage_settings;
- }
- public function hasStorageSettings()
- {
- return isset($this->storage_settings);
- }
- public function clearStorageSettings()
- {
- unset($this->storage_settings);
- }
- /**
- * Storage settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.StorageSettings storage_settings = 9;</code>
- * @param \Ydb\Table\StorageSettings $var
- * @return $this
- */
- public function setStorageSettings($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\StorageSettings::class);
- $this->storage_settings = $var;
- return $this;
- }
- /**
- * Column families
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnFamily column_families = 10;</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getColumnFamilies()
- {
- return $this->column_families;
- }
- /**
- * Column families
- *
- * Generated from protobuf field <code>repeated .Ydb.Table.ColumnFamily column_families = 10;</code>
- * @param array<\Ydb\Table\ColumnFamily>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setColumnFamilies($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Table\ColumnFamily::class);
- $this->column_families = $arr;
- return $this;
- }
- /**
- * Attributes. Total size is limited to 10 KB.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 11 [(.Ydb.length) = {</code>
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
- /**
- * Attributes. Total size is limited to 10 KB.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 11 [(.Ydb.length) = {</code>
- * @param array|\Google\Protobuf\Internal\MapField $var
- * @return $this
- */
- public function setAttributes($var)
- {
- $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
- $this->attributes = $arr;
- return $this;
- }
- /**
- * Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
- *
- * Generated from protobuf field <code>string compaction_policy = 12;</code>
- * @return string
- */
- public function getCompactionPolicy()
- {
- return $this->compaction_policy;
- }
- /**
- * Predefined named set of settings for table compaction ["default", "small_table", "log_table"].
- *
- * Generated from protobuf field <code>string compaction_policy = 12;</code>
- * @param string $var
- * @return $this
- */
- public function setCompactionPolicy($var)
- {
- GPBUtil::checkString($var, True);
- $this->compaction_policy = $var;
- return $this;
- }
- /**
- * Enable uniform partitioning using given partitions count.
- * The first components of primary key must have Uint32/Uint64 type.
- *
- * Generated from protobuf field <code>uint64 uniform_partitions = 13;</code>
- * @return int|string
- */
- public function getUniformPartitions()
- {
- return $this->readOneof(13);
- }
- public function hasUniformPartitions()
- {
- return $this->hasOneof(13);
- }
- /**
- * Enable uniform partitioning using given partitions count.
- * The first components of primary key must have Uint32/Uint64 type.
- *
- * Generated from protobuf field <code>uint64 uniform_partitions = 13;</code>
- * @param int|string $var
- * @return $this
- */
- public function setUniformPartitions($var)
- {
- GPBUtil::checkUint64($var);
- $this->writeOneof(13, $var);
- return $this;
- }
- /**
- * Explicitly specify key values which are used as borders for created partitions.
- *
- * Generated from protobuf field <code>.Ydb.Table.ExplicitPartitions partition_at_keys = 14;</code>
- * @return \Ydb\Table\ExplicitPartitions|null
- */
- public function getPartitionAtKeys()
- {
- return $this->readOneof(14);
- }
- public function hasPartitionAtKeys()
- {
- return $this->hasOneof(14);
- }
- /**
- * Explicitly specify key values which are used as borders for created partitions.
- *
- * Generated from protobuf field <code>.Ydb.Table.ExplicitPartitions partition_at_keys = 14;</code>
- * @param \Ydb\Table\ExplicitPartitions $var
- * @return $this
- */
- public function setPartitionAtKeys($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\ExplicitPartitions::class);
- $this->writeOneof(14, $var);
- return $this;
- }
- /**
- * Partitioning settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.PartitioningSettings partitioning_settings = 15;</code>
- * @return \Ydb\Table\PartitioningSettings|null
- */
- public function getPartitioningSettings()
- {
- return $this->partitioning_settings;
- }
- public function hasPartitioningSettings()
- {
- return isset($this->partitioning_settings);
- }
- public function clearPartitioningSettings()
- {
- unset($this->partitioning_settings);
- }
- /**
- * Partitioning settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.PartitioningSettings partitioning_settings = 15;</code>
- * @param \Ydb\Table\PartitioningSettings $var
- * @return $this
- */
- public function setPartitioningSettings($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\PartitioningSettings::class);
- $this->partitioning_settings = $var;
- return $this;
- }
- /**
- * Bloom filter by key
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status key_bloom_filter = 16;</code>
- * @return int
- */
- public function getKeyBloomFilter()
- {
- return $this->key_bloom_filter;
- }
- /**
- * Bloom filter by key
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status key_bloom_filter = 16;</code>
- * @param int $var
- * @return $this
- */
- public function setKeyBloomFilter($var)
- {
- GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
- $this->key_bloom_filter = $var;
- return $this;
- }
- /**
- * Read replicas settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.ReadReplicasSettings read_replicas_settings = 17;</code>
- * @return \Ydb\Table\ReadReplicasSettings|null
- */
- public function getReadReplicasSettings()
- {
- return $this->read_replicas_settings;
- }
- public function hasReadReplicasSettings()
- {
- return isset($this->read_replicas_settings);
- }
- public function clearReadReplicasSettings()
- {
- unset($this->read_replicas_settings);
- }
- /**
- * Read replicas settings for table
- *
- * Generated from protobuf field <code>.Ydb.Table.ReadReplicasSettings read_replicas_settings = 17;</code>
- * @param \Ydb\Table\ReadReplicasSettings $var
- * @return $this
- */
- public function setReadReplicasSettings($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Table\ReadReplicasSettings::class);
- $this->read_replicas_settings = $var;
- return $this;
- }
- /**
- * @return string
- */
- public function getPartitions()
- {
- return $this->whichOneof("partitions");
- }
- }
|