/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Table/PartitioningPolicy.php
165 строк
5 KB
Alexei Shabalin
updated protos
17 фев 2023, 13:31
17 фев 2023, 13:31
ae6a264
Код
Авторство
О чём код?
<?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.PartitioningPolicy</code> */ class PartitioningPolicy extends \Google\Protobuf\Internal\Message { /** * Generated from protobuf field <code>string preset_name = 1;</code> */ protected $preset_name = ''; /** * Generated from protobuf field <code>.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy auto_partitioning = 2;</code> */ protected $auto_partitioning = 0; protected $partitions; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $preset_name * @type int $auto_partitioning * @type int|string $uniform_partitions * Allows to enable uniform sharding using given shards number. * The first components of primary key must have Uint32/Uint64 type. * @type \Ydb\Table\ExplicitPartitions $explicit_partitions * Explicitly specify key values which are used as borders for * created partitions. * } */ public function __construct($data = NULL) { \GPBMetadata\Protos\YdbTable::initOnce(); parent::__construct($data); } /** * Generated from protobuf field <code>string preset_name = 1;</code> * @return string */ public function getPresetName() { return $this->preset_name; } /** * Generated from protobuf field <code>string preset_name = 1;</code> * @param string $var * @return $this */ public function setPresetName($var) { GPBUtil::checkString($var, True); $this->preset_name = $var; return $this; } /** * Generated from protobuf field <code>.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy auto_partitioning = 2;</code> * @return int */ public function getAutoPartitioning() { return $this->auto_partitioning; } /** * Generated from protobuf field <code>.Ydb.Table.PartitioningPolicy.AutoPartitioningPolicy auto_partitioning = 2;</code> * @param int $var * @return $this */ public function setAutoPartitioning($var) { GPBUtil::checkEnum($var, \Ydb\Table\PartitioningPolicy\AutoPartitioningPolicy::class); $this->auto_partitioning = $var; return $this; } /** * Allows to enable uniform sharding using given shards number. * The first components of primary key must have Uint32/Uint64 type. * * Generated from protobuf field <code>uint64 uniform_partitions = 3;</code> * @return int|string */ public function getUniformPartitions() { return $this->readOneof(3); } public function hasUniformPartitions() { return $this->hasOneof(3); } /** * Allows to enable uniform sharding using given shards number. * The first components of primary key must have Uint32/Uint64 type. * * Generated from protobuf field <code>uint64 uniform_partitions = 3;</code> * @param int|string $var * @return $this */ public function setUniformPartitions($var) { GPBUtil::checkUint64($var); $this->writeOneof(3, $var); return $this; } /** * Explicitly specify key values which are used as borders for * created partitions. * * Generated from protobuf field <code>.Ydb.Table.ExplicitPartitions explicit_partitions = 4;</code> * @return \Ydb\Table\ExplicitPartitions|null */ public function getExplicitPartitions() { return $this->readOneof(4); } public function hasExplicitPartitions() { return $this->hasOneof(4); } /** * Explicitly specify key values which are used as borders for * created partitions. * * Generated from protobuf field <code>.Ydb.Table.ExplicitPartitions explicit_partitions = 4;</code> * @param \Ydb\Table\ExplicitPartitions $var * @return $this */ public function setExplicitPartitions($var) { GPBUtil::checkMessage($var, \Ydb\Table\ExplicitPartitions::class); $this->writeOneof(4, $var); return $this; } /** * @return string */ public function getPartitions() { return $this->whichOneof("partitions"); } }