123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_topic.proto
- namespace Ydb\Topic;
- use Google\Protobuf\Internal\GPBType;
- use Google\Protobuf\Internal\RepeatedField;
- use Google\Protobuf\Internal\GPBUtil;
- /**
- * Create topic request sent from client to server.
- *
- * Generated from protobuf message <code>Ydb.Topic.CreateTopicRequest</code>
- */
- class CreateTopicRequest extends \Google\Protobuf\Internal\Message
- {
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</code>
- */
- protected $operation_params = null;
- /**
- * Topic path.
- *
- * Generated from protobuf field <code>string path = 2;</code>
- */
- protected $path = '';
- /**
- * Settings for partitioning
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 3;</code>
- */
- protected $partitioning_settings = null;
- /**
- * Retention settings.
- * Currently, only one limit may be set, so other should not be set.
- * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Default limit - 36 hours.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
- */
- protected $retention_period = null;
- /**
- * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Zero value means infinite limit.
- *
- * Generated from protobuf field <code>int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
- */
- protected $retention_storage_mb = 0;
- /**
- * List of allowed codecs for writers.
- * Writes with codec not from this list are forbidden.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
- */
- protected $supported_codecs = null;
- /**
- * Partition write speed in bytes per second. Must be less than database limit.
- * Zero value means default limit: 1 MB per second.
- *
- * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
- */
- protected $partition_write_speed_bytes_per_second = 0;
- /**
- * Burst size for write in partition, in bytes. Must be less than database limit.
- * Zero value means default limit: 1 MB.
- *
- * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
- */
- protected $partition_write_burst_bytes = 0;
- /**
- * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 10;</code>
- */
- private $attributes;
- /**
- * List of consumers for this topic.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {</code>
- */
- private $consumers;
- /**
- * Metering mode for the topic in a serverless database.
- *
- * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
- */
- protected $metering_mode = 0;
- /**
- * Constructor.
- *
- * @param array $data {
- * Optional. Data for populating the Message object.
- *
- * @type \Ydb\Operations\OperationParams $operation_params
- * @type string $path
- * Topic path.
- * @type \Ydb\Topic\PartitioningSettings $partitioning_settings
- * Settings for partitioning
- * @type \Google\Protobuf\Duration $retention_period
- * Retention settings.
- * Currently, only one limit may be set, so other should not be set.
- * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Default limit - 36 hours.
- * @type int|string $retention_storage_mb
- * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Zero value means infinite limit.
- * @type \Ydb\Topic\SupportedCodecs $supported_codecs
- * List of allowed codecs for writers.
- * Writes with codec not from this list are forbidden.
- * @type int|string $partition_write_speed_bytes_per_second
- * Partition write speed in bytes per second. Must be less than database limit.
- * Zero value means default limit: 1 MB per second.
- * @type int|string $partition_write_burst_bytes
- * Burst size for write in partition, in bytes. Must be less than database limit.
- * Zero value means default limit: 1 MB.
- * @type array|\Google\Protobuf\Internal\MapField $attributes
- * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
- * @type array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $consumers
- * List of consumers for this topic.
- * @type int $metering_mode
- * Metering mode for the topic in a serverless database.
- * }
- */
- public function __construct($data = NULL) {
- \GPBMetadata\Protos\YdbTopic::initOnce();
- parent::__construct($data);
- }
- /**
- * Generated from protobuf field <code>.Ydb.Operations.OperationParams operation_params = 1;</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 = 1;</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;
- }
- /**
- * Topic path.
- *
- * Generated from protobuf field <code>string path = 2;</code>
- * @return string
- */
- public function getPath()
- {
- return $this->path;
- }
- /**
- * Topic 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;
- }
- /**
- * Settings for partitioning
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 3;</code>
- * @return \Ydb\Topic\PartitioningSettings|null
- */
- public function getPartitioningSettings()
- {
- return $this->partitioning_settings;
- }
- public function hasPartitioningSettings()
- {
- return isset($this->partitioning_settings);
- }
- public function clearPartitioningSettings()
- {
- unset($this->partitioning_settings);
- }
- /**
- * Settings for partitioning
- *
- * Generated from protobuf field <code>.Ydb.Topic.PartitioningSettings partitioning_settings = 3;</code>
- * @param \Ydb\Topic\PartitioningSettings $var
- * @return $this
- */
- public function setPartitioningSettings($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\PartitioningSettings::class);
- $this->partitioning_settings = $var;
- return $this;
- }
- /**
- * Retention settings.
- * Currently, only one limit may be set, so other should not be set.
- * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Default limit - 36 hours.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
- * @return \Google\Protobuf\Duration|null
- */
- public function getRetentionPeriod()
- {
- return $this->retention_period;
- }
- public function hasRetentionPeriod()
- {
- return isset($this->retention_period);
- }
- public function clearRetentionPeriod()
- {
- unset($this->retention_period);
- }
- /**
- * Retention settings.
- * Currently, only one limit may be set, so other should not be set.
- * How long data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Default limit - 36 hours.
- *
- * Generated from protobuf field <code>.google.protobuf.Duration retention_period = 4;</code>
- * @param \Google\Protobuf\Duration $var
- * @return $this
- */
- public function setRetentionPeriod($var)
- {
- GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
- $this->retention_period = $var;
- return $this;
- }
- /**
- * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Zero value means infinite limit.
- *
- * Generated from protobuf field <code>int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
- * @return int|string
- */
- public function getRetentionStorageMb()
- {
- return $this->retention_storage_mb;
- }
- /**
- * How much data in partition should be stored. Must be greater than 0 and less than limit for this database.
- * Zero value means infinite limit.
- *
- * Generated from protobuf field <code>int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];</code>
- * @param int|string $var
- * @return $this
- */
- public function setRetentionStorageMb($var)
- {
- GPBUtil::checkInt64($var);
- $this->retention_storage_mb = $var;
- return $this;
- }
- /**
- * List of allowed codecs for writers.
- * Writes with codec not from this list are forbidden.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
- * @return \Ydb\Topic\SupportedCodecs|null
- */
- public function getSupportedCodecs()
- {
- return $this->supported_codecs;
- }
- public function hasSupportedCodecs()
- {
- return isset($this->supported_codecs);
- }
- public function clearSupportedCodecs()
- {
- unset($this->supported_codecs);
- }
- /**
- * List of allowed codecs for writers.
- * Writes with codec not from this list are forbidden.
- *
- * Generated from protobuf field <code>.Ydb.Topic.SupportedCodecs supported_codecs = 7;</code>
- * @param \Ydb\Topic\SupportedCodecs $var
- * @return $this
- */
- public function setSupportedCodecs($var)
- {
- GPBUtil::checkMessage($var, \Ydb\Topic\SupportedCodecs::class);
- $this->supported_codecs = $var;
- return $this;
- }
- /**
- * Partition write speed in bytes per second. Must be less than database limit.
- * Zero value means default limit: 1 MB per second.
- *
- * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
- * @return int|string
- */
- public function getPartitionWriteSpeedBytesPerSecond()
- {
- return $this->partition_write_speed_bytes_per_second;
- }
- /**
- * Partition write speed in bytes per second. Must be less than database limit.
- * Zero value means default limit: 1 MB per second.
- *
- * Generated from protobuf field <code>int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionWriteSpeedBytesPerSecond($var)
- {
- GPBUtil::checkInt64($var);
- $this->partition_write_speed_bytes_per_second = $var;
- return $this;
- }
- /**
- * Burst size for write in partition, in bytes. Must be less than database limit.
- * Zero value means default limit: 1 MB.
- *
- * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
- * @return int|string
- */
- public function getPartitionWriteBurstBytes()
- {
- return $this->partition_write_burst_bytes;
- }
- /**
- * Burst size for write in partition, in bytes. Must be less than database limit.
- * Zero value means default limit: 1 MB.
- *
- * Generated from protobuf field <code>int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];</code>
- * @param int|string $var
- * @return $this
- */
- public function setPartitionWriteBurstBytes($var)
- {
- GPBUtil::checkInt64($var);
- $this->partition_write_burst_bytes = $var;
- return $this;
- }
- /**
- * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 10;</code>
- * @return \Google\Protobuf\Internal\MapField
- */
- public function getAttributes()
- {
- return $this->attributes;
- }
- /**
- * User and server attributes of topic. Server attributes starts from "_" and will be validated by server.
- *
- * Generated from protobuf field <code>map<string, string> attributes = 10;</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;
- }
- /**
- * List of consumers for this topic.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {</code>
- * @return \Google\Protobuf\Internal\RepeatedField
- */
- public function getConsumers()
- {
- return $this->consumers;
- }
- /**
- * List of consumers for this topic.
- *
- * Generated from protobuf field <code>repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {</code>
- * @param array<\Ydb\Topic\Consumer>|\Google\Protobuf\Internal\RepeatedField $var
- * @return $this
- */
- public function setConsumers($var)
- {
- $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\Consumer::class);
- $this->consumers = $arr;
- return $this;
- }
- /**
- * Metering mode for the topic in a serverless database.
- *
- * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
- * @return int
- */
- public function getMeteringMode()
- {
- return $this->metering_mode;
- }
- /**
- * Metering mode for the topic in a serverless database.
- *
- * Generated from protobuf field <code>.Ydb.Topic.MeteringMode metering_mode = 12;</code>
- * @param int $var
- * @return $this
- */
- public function setMeteringMode($var)
- {
- GPBUtil::checkEnum($var, \Ydb\Topic\MeteringMode::class);
- $this->metering_mode = $var;
- return $this;
- }
- }
|