2023-03-02 11:02:35 +00:00
|
|
|
|
# coding: utf-8
|
|
|
|
|
|
|
|
|
|
import six
|
|
|
|
|
|
|
|
|
|
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
|
|
|
|
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
class ConsumerDetailResp:
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
Attributes:
|
|
|
|
|
openapi_types (dict): The key is attribute name
|
|
|
|
|
and the value is attribute type.
|
|
|
|
|
attribute_map (dict): The key is attribute name
|
|
|
|
|
and the value is json key in definition.
|
|
|
|
|
"""
|
|
|
|
|
sensitive_list = []
|
|
|
|
|
|
|
|
|
|
openapi_types = {
|
2023-08-10 09:39:31 +00:00
|
|
|
|
'lag': 'int',
|
|
|
|
|
'max_offset': 'int',
|
|
|
|
|
'consumer_offset': 'int',
|
2023-04-20 08:57:41 +00:00
|
|
|
|
'brokers': 'list[Brokers]'
|
2023-03-02 11:02:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
attribute_map = {
|
2023-08-10 09:39:31 +00:00
|
|
|
|
'lag': 'lag',
|
|
|
|
|
'max_offset': 'max_offset',
|
|
|
|
|
'consumer_offset': 'consumer_offset',
|
2023-04-20 08:57:41 +00:00
|
|
|
|
'brokers': 'brokers'
|
2023-03-02 11:02:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-08-10 09:39:31 +00:00
|
|
|
|
def __init__(self, lag=None, max_offset=None, consumer_offset=None, brokers=None):
|
2023-04-20 08:57:41 +00:00
|
|
|
|
"""ConsumerDetailResp
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
|
|
|
|
The model defined in huaweicloud sdk
|
|
|
|
|
|
2023-08-10 09:39:31 +00:00
|
|
|
|
:param lag: 消费堆积总数
|
|
|
|
|
:type lag: int
|
|
|
|
|
:param max_offset: 消息总数
|
|
|
|
|
:type max_offset: int
|
|
|
|
|
:param consumer_offset: 已消费消息数
|
|
|
|
|
:type consumer_offset: int
|
2023-04-20 08:57:41 +00:00
|
|
|
|
:param brokers: Topic关联代理(当查询topic消费“详情”才显示此参数)。
|
|
|
|
|
:type brokers: list[:class:`huaweicloudsdkrocketmq.v2.Brokers`]
|
2023-03-02 11:02:35 +00:00
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-10 09:39:31 +00:00
|
|
|
|
self._lag = None
|
|
|
|
|
self._max_offset = None
|
|
|
|
|
self._consumer_offset = None
|
2023-04-20 08:57:41 +00:00
|
|
|
|
self._brokers = None
|
2023-03-02 11:02:35 +00:00
|
|
|
|
self.discriminator = None
|
|
|
|
|
|
2023-08-10 09:39:31 +00:00
|
|
|
|
if lag is not None:
|
|
|
|
|
self.lag = lag
|
|
|
|
|
if max_offset is not None:
|
|
|
|
|
self.max_offset = max_offset
|
|
|
|
|
if consumer_offset is not None:
|
|
|
|
|
self.consumer_offset = consumer_offset
|
2023-04-20 08:57:41 +00:00
|
|
|
|
if brokers is not None:
|
|
|
|
|
self.brokers = brokers
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-08-10 09:39:31 +00:00
|
|
|
|
@property
|
|
|
|
|
def lag(self):
|
|
|
|
|
"""Gets the lag of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
消费堆积总数
|
|
|
|
|
|
|
|
|
|
:return: The lag of this ConsumerDetailResp.
|
|
|
|
|
:rtype: int
|
|
|
|
|
"""
|
|
|
|
|
return self._lag
|
|
|
|
|
|
|
|
|
|
@lag.setter
|
|
|
|
|
def lag(self, lag):
|
|
|
|
|
"""Sets the lag of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
消费堆积总数
|
|
|
|
|
|
|
|
|
|
:param lag: The lag of this ConsumerDetailResp.
|
|
|
|
|
:type lag: int
|
|
|
|
|
"""
|
|
|
|
|
self._lag = lag
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def max_offset(self):
|
|
|
|
|
"""Gets the max_offset of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
消息总数
|
|
|
|
|
|
|
|
|
|
:return: The max_offset of this ConsumerDetailResp.
|
|
|
|
|
:rtype: int
|
|
|
|
|
"""
|
|
|
|
|
return self._max_offset
|
|
|
|
|
|
|
|
|
|
@max_offset.setter
|
|
|
|
|
def max_offset(self, max_offset):
|
|
|
|
|
"""Sets the max_offset of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
消息总数
|
|
|
|
|
|
|
|
|
|
:param max_offset: The max_offset of this ConsumerDetailResp.
|
|
|
|
|
:type max_offset: int
|
|
|
|
|
"""
|
|
|
|
|
self._max_offset = max_offset
|
|
|
|
|
|
|
|
|
|
@property
|
|
|
|
|
def consumer_offset(self):
|
|
|
|
|
"""Gets the consumer_offset of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
已消费消息数
|
|
|
|
|
|
|
|
|
|
:return: The consumer_offset of this ConsumerDetailResp.
|
|
|
|
|
:rtype: int
|
|
|
|
|
"""
|
|
|
|
|
return self._consumer_offset
|
|
|
|
|
|
|
|
|
|
@consumer_offset.setter
|
|
|
|
|
def consumer_offset(self, consumer_offset):
|
|
|
|
|
"""Sets the consumer_offset of this ConsumerDetailResp.
|
|
|
|
|
|
|
|
|
|
已消费消息数
|
|
|
|
|
|
|
|
|
|
:param consumer_offset: The consumer_offset of this ConsumerDetailResp.
|
|
|
|
|
:type consumer_offset: int
|
|
|
|
|
"""
|
|
|
|
|
self._consumer_offset = consumer_offset
|
|
|
|
|
|
2023-03-02 11:02:35 +00:00
|
|
|
|
@property
|
2023-04-20 08:57:41 +00:00
|
|
|
|
def brokers(self):
|
|
|
|
|
"""Gets the brokers of this ConsumerDetailResp.
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
Topic关联代理(当查询topic消费“详情”才显示此参数)。
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
:return: The brokers of this ConsumerDetailResp.
|
|
|
|
|
:rtype: list[:class:`huaweicloudsdkrocketmq.v2.Brokers`]
|
2023-03-02 11:02:35 +00:00
|
|
|
|
"""
|
2023-04-20 08:57:41 +00:00
|
|
|
|
return self._brokers
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
@brokers.setter
|
|
|
|
|
def brokers(self, brokers):
|
|
|
|
|
"""Sets the brokers of this ConsumerDetailResp.
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
Topic关联代理(当查询topic消费“详情”才显示此参数)。
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
2023-04-20 08:57:41 +00:00
|
|
|
|
:param brokers: The brokers of this ConsumerDetailResp.
|
|
|
|
|
:type brokers: list[:class:`huaweicloudsdkrocketmq.v2.Brokers`]
|
2023-03-02 11:02:35 +00:00
|
|
|
|
"""
|
2023-04-20 08:57:41 +00:00
|
|
|
|
self._brokers = brokers
|
2023-03-02 11:02:35 +00:00
|
|
|
|
|
|
|
|
|
def to_dict(self):
|
|
|
|
|
"""Returns the model properties as a dict"""
|
|
|
|
|
result = {}
|
|
|
|
|
|
|
|
|
|
for attr, _ in six.iteritems(self.openapi_types):
|
|
|
|
|
value = getattr(self, attr)
|
|
|
|
|
if isinstance(value, list):
|
|
|
|
|
result[attr] = list(map(
|
|
|
|
|
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
|
|
|
value
|
|
|
|
|
))
|
|
|
|
|
elif hasattr(value, "to_dict"):
|
|
|
|
|
result[attr] = value.to_dict()
|
|
|
|
|
elif isinstance(value, dict):
|
|
|
|
|
result[attr] = dict(map(
|
|
|
|
|
lambda item: (item[0], item[1].to_dict())
|
|
|
|
|
if hasattr(item[1], "to_dict") else item,
|
|
|
|
|
value.items()
|
|
|
|
|
))
|
|
|
|
|
else:
|
|
|
|
|
if attr in self.sensitive_list:
|
|
|
|
|
result[attr] = "****"
|
|
|
|
|
else:
|
|
|
|
|
result[attr] = value
|
|
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
def to_str(self):
|
|
|
|
|
"""Returns the string representation of the model"""
|
|
|
|
|
import simplejson as json
|
|
|
|
|
if six.PY2:
|
|
|
|
|
import sys
|
|
|
|
|
reload(sys)
|
|
|
|
|
sys.setdefaultencoding("utf-8")
|
|
|
|
|
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
|
"""For `print`"""
|
|
|
|
|
return self.to_str()
|
|
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
|
"""Returns true if both objects are equal"""
|
2023-04-20 08:57:41 +00:00
|
|
|
|
if not isinstance(other, ConsumerDetailResp):
|
2023-03-02 11:02:35 +00:00
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
|
|
|
|
|
|
def __ne__(self, other):
|
|
|
|
|
"""Returns true if both objects are not equal"""
|
|
|
|
|
return not self == other
|