/
githubmirror
/
ydb-php-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-php-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
protos/Ydb/Topic/CreateTopicRequest.php
467 строк
15 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_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; } }