Ydb.Topic.DescribeTopicResult
*/
class DescribeTopicResult extends \Google\Protobuf\Internal\Message
{
/**
* Description of scheme object.
*
* Generated from protobuf field .Ydb.Scheme.Entry self = 1;
*/
protected $self = null;
/**
* Settings for partitioning
*
* Generated from protobuf field .Ydb.Topic.PartitioningSettings partitioning_settings = 2;
*/
protected $partitioning_settings = null;
/**
* Partitions description.
*
* Generated from protobuf field repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;
*/
private $partitions;
/**
* Retention settings.
* Currently, only one limit may be set, so other should not be set.
* How long data in partition should be stored.
*
* Generated from protobuf field .google.protobuf.Duration retention_period = 4;
*/
protected $retention_period = null;
/**
* How much data in partition should be stored.
* Zero value means infinite limit.
*
* Generated from protobuf field int64 retention_storage_mb = 5;
*/
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.
* Zero value means default limit: 1 MB per second.
*
* Generated from protobuf field int64 partition_write_speed_bytes_per_second = 8;
*/
protected $partition_write_speed_bytes_per_second = 0;
/**
* Burst size for write in partition, in bytes.
* Zero value means default limit: 1 MB.
*
* Generated from protobuf field int64 partition_write_burst_bytes = 9;
*/
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;
*/
private $consumers;
/**
* Metering settings.
*
* Generated from protobuf field .Ydb.Topic.MeteringMode metering_mode = 12;
*/
protected $metering_mode = 0;
/**
* Statistics of topic.
*
* Generated from protobuf field .Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;
*/
protected $topic_stats = null;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type \Ydb\Scheme\Entry $self
* Description of scheme object.
* @type \Ydb\Topic\PartitioningSettings $partitioning_settings
* Settings for partitioning
* @type array<\Ydb\Topic\DescribeTopicResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $partitions
* Partitions description.
* @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.
* @type int|string $retention_storage_mb
* How much data in partition should be stored.
* 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.
* Zero value means default limit: 1 MB per second.
* @type int|string $partition_write_burst_bytes
* Burst size for write in partition, in bytes.
* 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 settings.
* @type \Ydb\Topic\DescribeTopicResult\TopicStats $topic_stats
* Statistics of topic.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Protos\YdbTopic::initOnce();
parent::__construct($data);
}
/**
* Description of scheme object.
*
* Generated from protobuf field .Ydb.Scheme.Entry self = 1;
* @return \Ydb\Scheme\Entry|null
*/
public function getSelf()
{
return $this->self;
}
public function hasSelf()
{
return isset($this->self);
}
public function clearSelf()
{
unset($this->self);
}
/**
* Description of scheme object.
*
* Generated from protobuf field .Ydb.Scheme.Entry self = 1;
* @param \Ydb\Scheme\Entry $var
* @return $this
*/
public function setSelf($var)
{
GPBUtil::checkMessage($var, \Ydb\Scheme\Entry::class);
$this->self = $var;
return $this;
}
/**
* Settings for partitioning
*
* Generated from protobuf field .Ydb.Topic.PartitioningSettings partitioning_settings = 2;
* @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 = 2;
* @param \Ydb\Topic\PartitioningSettings $var
* @return $this
*/
public function setPartitioningSettings($var)
{
GPBUtil::checkMessage($var, \Ydb\Topic\PartitioningSettings::class);
$this->partitioning_settings = $var;
return $this;
}
/**
* Partitions description.
*
* Generated from protobuf field repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getPartitions()
{
return $this->partitions;
}
/**
* Partitions description.
*
* Generated from protobuf field repeated .Ydb.Topic.DescribeTopicResult.PartitionInfo partitions = 3;
* @param array<\Ydb\Topic\DescribeTopicResult\PartitionInfo>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setPartitions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Ydb\Topic\DescribeTopicResult\PartitionInfo::class);
$this->partitions = $arr;
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.
*
* 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.
*
* 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.
* Zero value means infinite limit.
*
* Generated from protobuf field int64 retention_storage_mb = 5;
* @return int|string
*/
public function getRetentionStorageMb()
{
return $this->retention_storage_mb;
}
/**
* How much data in partition should be stored.
* Zero value means infinite limit.
*
* Generated from protobuf field int64 retention_storage_mb = 5;
* @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.
* Zero value means default limit: 1 MB per second.
*
* Generated from protobuf field int64 partition_write_speed_bytes_per_second = 8;
* @return int|string
*/
public function getPartitionWriteSpeedBytesPerSecond()
{
return $this->partition_write_speed_bytes_per_second;
}
/**
* Partition write speed in bytes per second.
* Zero value means default limit: 1 MB per second.
*
* Generated from protobuf field int64 partition_write_speed_bytes_per_second = 8;
* @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.
* Zero value means default limit: 1 MB.
*
* Generated from protobuf field int64 partition_write_burst_bytes = 9;
* @return int|string
*/
public function getPartitionWriteBurstBytes()
{
return $this->partition_write_burst_bytes;
}
/**
* Burst size for write in partition, in bytes.
* Zero value means default limit: 1 MB.
*
* Generated from protobuf field int64 partition_write_burst_bytes = 9;
* @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;
* @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;
* @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 settings.
*
* Generated from protobuf field .Ydb.Topic.MeteringMode metering_mode = 12;
* @return int
*/
public function getMeteringMode()
{
return $this->metering_mode;
}
/**
* Metering settings.
*
* 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;
}
/**
* Statistics of topic.
*
* Generated from protobuf field .Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;
* @return \Ydb\Topic\DescribeTopicResult\TopicStats|null
*/
public function getTopicStats()
{
return $this->topic_stats;
}
public function hasTopicStats()
{
return isset($this->topic_stats);
}
public function clearTopicStats()
{
unset($this->topic_stats);
}
/**
* Statistics of topic.
*
* Generated from protobuf field .Ydb.Topic.DescribeTopicResult.TopicStats topic_stats = 13;
* @param \Ydb\Topic\DescribeTopicResult\TopicStats $var
* @return $this
*/
public function setTopicStats($var)
{
GPBUtil::checkMessage($var, \Ydb\Topic\DescribeTopicResult\TopicStats::class);
$this->topic_stats = $var;
return $this;
}
}