Ydb.Topic.CreateTopicRequest
*/
class CreateTopicRequest extends \Google\Protobuf\Internal\Message
{
/**
* Generated from protobuf field .Ydb.Operations.OperationParams operation_params = 1;
*/
protected $operation_params = null;
/**
* Topic path.
*
* Generated from protobuf field string path = 2;
*/
protected $path = '';
/**
* Settings for partitioning
*
* Generated from protobuf field .Ydb.Topic.PartitioningSettings partitioning_settings = 3;
*/
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 .google.protobuf.Duration retention_period = 4;
*/
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 int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];
*/
protected $retention_storage_mb = 0;
/**
* List of allowed codecs for writers.
* Writes with codec not from this list are forbidden.
*
* Generated from protobuf field .Ydb.Topic.SupportedCodecs supported_codecs = 7;
*/
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 int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];
*/
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 int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];
*/
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 map attributes = 10;
*/
private $attributes;
/**
* List of consumers for this topic.
*
* Generated from protobuf field repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {
*/
private $consumers;
/**
* Metering mode for the topic in a serverless database.
*
* Generated from protobuf field .Ydb.Topic.MeteringMode metering_mode = 12;
*/
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 .Ydb.Operations.OperationParams operation_params = 1;
* @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 .Ydb.Operations.OperationParams operation_params = 1;
* @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 string path = 2;
* @return string
*/
public function getPath()
{
return $this->path;
}
/**
* Topic path.
*
* Generated from protobuf field string path = 2;
* @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 .Ydb.Topic.PartitioningSettings partitioning_settings = 3;
* @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 .Ydb.Topic.PartitioningSettings partitioning_settings = 3;
* @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 .google.protobuf.Duration retention_period = 4;
* @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 .google.protobuf.Duration retention_period = 4;
* @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 int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];
* @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 int64 retention_storage_mb = 5 [(.Ydb.value) = ">= 0"];
* @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 .Ydb.Topic.SupportedCodecs supported_codecs = 7;
* @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 .Ydb.Topic.SupportedCodecs supported_codecs = 7;
* @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 int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];
* @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 int64 partition_write_speed_bytes_per_second = 8 [(.Ydb.value) = ">= 0"];
* @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 int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];
* @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 int64 partition_write_burst_bytes = 9 [(.Ydb.value) = ">= 0"];
* @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 map attributes = 10;
* @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 map attributes = 10;
* @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 repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getConsumers()
{
return $this->consumers;
}
/**
* List of consumers for this topic.
*
* Generated from protobuf field repeated .Ydb.Topic.Consumer consumers = 11 [(.Ydb.size) = {
* @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 .Ydb.Topic.MeteringMode metering_mode = 12;
* @return int
*/
public function getMeteringMode()
{
return $this->metering_mode;
}
/**
* Metering mode for the topic in a serverless database.
*
* Generated from protobuf field .Ydb.Topic.MeteringMode metering_mode = 12;
* @param int $var
* @return $this
*/
public function setMeteringMode($var)
{
GPBUtil::checkEnum($var, \Ydb\Topic\MeteringMode::class);
$this->metering_mode = $var;
return $this;
}
}