123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?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.ReplicationPolicy</code>
- */
- class ReplicationPolicy extends \Google\Protobuf\Internal\Message
- {
- /**
- * Generated from protobuf field <code>string preset_name = 1;</code>
- */
- protected $preset_name = '';
- /**
- * If value is non-zero then it specifies a number of read-only
- * replicas to create for a table. Zero value means preset
- * setting usage.
- *
- * Generated from protobuf field <code>uint32 replicas_count = 2;</code>
- */
- protected $replicas_count = 0;
- /**
- * If this feature in enabled then requested number of replicas
- * will be created in each availability zone.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status create_per_availability_zone = 3;</code>
- */
- protected $create_per_availability_zone = 0;
- /**
- * If this feature in enabled then read-only replicas can be promoted
- * to leader.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status allow_promotion = 4;</code>
- */
- protected $allow_promotion = 0;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type string $preset_name
- * @type int $replicas_count
- * If value is non-zero then it specifies a number of read-only
- * replicas to create for a table. Zero value means preset
- * setting usage.
- * @type int $create_per_availability_zone
- * If this feature in enabled then requested number of replicas
- * will be created in each availability zone.
- * @type int $allow_promotion
- * If this feature in enabled then read-only replicas can be promoted
- * to leader.
- * }
- */
- 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;
- }
- /**
- * If value is non-zero then it specifies a number of read-only
- * replicas to create for a table. Zero value means preset
- * setting usage.
- *
- * Generated from protobuf field <code>uint32 replicas_count = 2;</code>
- * @return int
- */
- public function getReplicasCount()
- {
- return $this->replicas_count;
- }
- /**
- * If value is non-zero then it specifies a number of read-only
- * replicas to create for a table. Zero value means preset
- * setting usage.
- *
- * Generated from protobuf field <code>uint32 replicas_count = 2;</code>
- * @param int $var
- * @return $this
- */
- public function setReplicasCount($var)
- {
- GPBUtil::checkUint32($var);
- $this->replicas_count = $var;
- return $this;
- }
- /**
- * If this feature in enabled then requested number of replicas
- * will be created in each availability zone.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status create_per_availability_zone = 3;</code>
- * @return int
- */
- public function getCreatePerAvailabilityZone()
- {
- return $this->create_per_availability_zone;
- }
- /**
- * If this feature in enabled then requested number of replicas
- * will be created in each availability zone.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status create_per_availability_zone = 3;</code>
- * @param int $var
- * @return $this
- */
- public function setCreatePerAvailabilityZone($var)
- {
- GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
- $this->create_per_availability_zone = $var;
- return $this;
- }
- /**
- * If this feature in enabled then read-only replicas can be promoted
- * to leader.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status allow_promotion = 4;</code>
- * @return int
- */
- public function getAllowPromotion()
- {
- return $this->allow_promotion;
- }
- /**
- * If this feature in enabled then read-only replicas can be promoted
- * to leader.
- *
- * Generated from protobuf field <code>.Ydb.FeatureFlag.Status allow_promotion = 4;</code>
- * @param int $var
- * @return $this
- */
- public function setAllowPromotion($var)
- {
- GPBUtil::checkEnum($var, \Ydb\FeatureFlag\Status::class);
- $this->allow_promotion = $var;
- return $this;
- }
- }
|