123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?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");
- }
- }
|