huaweicloud-sdk-python-v3/huaweicloud-sdk-ces/huaweicloudsdkces/v1/model/show_event_data_request.py

318 lines
15 KiB
Python
Raw Normal View History

2020-05-18 07:34:40 +00:00
# coding: utf-8
import re
import six
2021-07-26 11:24:08 +00:00
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowEventDataRequest:
2020-05-18 07:34:40 +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 = []
2020-05-18 07:34:40 +00:00
openapi_types = {
'namespace': 'str',
'dim_0': 'str',
'dim_1': 'str',
'dim_2': 'str',
'dim_3': 'str',
'type': 'str',
2020-05-18 07:34:40 +00:00
'_from': 'int',
'to': 'int'
2020-05-18 07:34:40 +00:00
}
attribute_map = {
'namespace': 'namespace',
'dim_0': 'dim.0',
'dim_1': 'dim.1',
'dim_2': 'dim.2',
'dim_3': 'dim.3',
'type': 'type',
2020-05-18 07:34:40 +00:00
'_from': 'from',
'to': 'to'
2020-05-18 07:34:40 +00:00
}
def __init__(self, namespace=None, dim_0=None, dim_1=None, dim_2=None, dim_3=None, type=None, _from=None, to=None):
2022-04-21 12:03:46 +00:00
"""ShowEventDataRequest
The model defined in huaweicloud sdk
:param namespace: 指标命名空间弹性云服务器的命名空间为SYS.ECS文档数据库的命名空间为SYS.DDS各服务的命名空间可查看[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
:type namespace: str
2022-08-29 06:16:53 +00:00
:param dim_0: 指标的第一层维度目前最大支持4个维度维度编号从0开始维度格式为dim.0=key,value如mongodb_cluster_id,4270ff17-aba3-4138-89fa-820594c39755key为指标的维度信息文档数据库服务则第一层维度为mongodb_cluster_idvalue为文档数据库实例ID各服务资源的指标维度名称可查看“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
2022-04-21 12:03:46 +00:00
:type dim_0: str
2022-08-29 06:16:53 +00:00
:param dim_1: 指标的第二层维度目前最大支持4个维度维度编号从0开始维度格式为dim.1=key,value如mongos_instance_id,c65d39d7-185c-4616-9aca-ad65703b15f9key为指标的维度信息文档数据库服务则第二层维度为mongos_instance_idvalue为文档数据库集群实例下的mongos节点ID各资源的指标维度名称可查看“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
2022-04-21 12:03:46 +00:00
:type dim_1: str
2022-08-29 06:16:53 +00:00
:param dim_2: 指标的第三层维度目前最大支持4个维度维度编号从0开始维度格式为dim.2=key,value如mongod_primary_instance_id,5f9498e9-36f8-4317-9ea1-ebe28cba99b4key为指标的维度信息文档数据库服务则第三层维度为mongod_primary_instance_idvalue为文档数据库实例下的主节点ID各资源的指标维度名称可查看“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
2022-04-21 12:03:46 +00:00
:type dim_2: str
2022-08-29 06:16:53 +00:00
:param dim_3: 指标的第四层维度目前最大支持4个维度维度编号从0开始维度格式为dim.3=key,value如mongod_secondary_instance_id,b46fa2c7-aac6-4ae3-9337-f4ea97f885cbkey为指标的维度信息文档数据库服务则第四层维度为mongod_secondary_instance_idvalue为文档数据库实例下的备节点ID各资源的指标维度名称可查看“[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)”。
2022-04-21 12:03:46 +00:00
:type dim_3: str
:param type: 事件类型只允许字母下划线中划线字母开头长度不超过64如instance_host_info
:type type: str
:param _from: 查询数据起始时间UNIX时间戳单位毫秒1607146998177
:type _from: int
:param to: 查询数据截止时间UNIX时间戳单位毫秒from必须小于to1607150598177
:type to: int
"""
2020-05-18 07:34:40 +00:00
self._namespace = None
self._dim_0 = None
self._dim_1 = None
self._dim_2 = None
self._dim_3 = None
self._type = None
2020-05-18 07:34:40 +00:00
self.__from = None
self._to = None
self.discriminator = None
self.namespace = namespace
self.dim_0 = dim_0
if dim_1 is not None:
self.dim_1 = dim_1
if dim_2 is not None:
self.dim_2 = dim_2
if dim_3 is not None:
self.dim_3 = dim_3
self.type = type
2020-05-18 07:34:40 +00:00
self._from = _from
self.to = to
@property
def namespace(self):
"""Gets the namespace of this ShowEventDataRequest.
指标命名空间弹性云服务器的命名空间为SYS.ECS文档数据库的命名空间为SYS.DDS各服务的命名空间可查看[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
:return: The namespace of this ShowEventDataRequest.
:rtype: str
"""
return self._namespace
@namespace.setter
def namespace(self, namespace):
"""Sets the namespace of this ShowEventDataRequest.
指标命名空间弹性云服务器的命名空间为SYS.ECS文档数据库的命名空间为SYS.DDS各服务的命名空间可查看[服务命名空间](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
:param namespace: The namespace of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type namespace: str
"""
self._namespace = namespace
2020-05-18 07:34:40 +00:00
@property
def dim_0(self):
"""Gets the dim_0 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第一层维度目前最大支持4个维度维度编号从0开始维度格式为dim.0=key,value如mongodb_cluster_id,4270ff17-aba3-4138-89fa-820594c39755key为指标的维度信息文档数据库服务则第一层维度为mongodb_cluster_idvalue为文档数据库实例ID各服务资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:return: The dim_0 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._dim_0
2020-05-18 07:34:40 +00:00
@dim_0.setter
def dim_0(self, dim_0):
"""Sets the dim_0 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第一层维度目前最大支持4个维度维度编号从0开始维度格式为dim.0=key,value如mongodb_cluster_id,4270ff17-aba3-4138-89fa-820594c39755key为指标的维度信息文档数据库服务则第一层维度为mongodb_cluster_idvalue为文档数据库实例ID各服务资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:param dim_0: The dim_0 of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type dim_0: str
2020-05-18 07:34:40 +00:00
"""
self._dim_0 = dim_0
2020-05-18 07:34:40 +00:00
@property
def dim_1(self):
"""Gets the dim_1 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第二层维度目前最大支持4个维度维度编号从0开始维度格式为dim.1=key,value如mongos_instance_id,c65d39d7-185c-4616-9aca-ad65703b15f9key为指标的维度信息文档数据库服务则第二层维度为mongos_instance_idvalue为文档数据库集群实例下的mongos节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:return: The dim_1 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._dim_1
2020-05-18 07:34:40 +00:00
@dim_1.setter
def dim_1(self, dim_1):
"""Sets the dim_1 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第二层维度目前最大支持4个维度维度编号从0开始维度格式为dim.1=key,value如mongos_instance_id,c65d39d7-185c-4616-9aca-ad65703b15f9key为指标的维度信息文档数据库服务则第二层维度为mongos_instance_idvalue为文档数据库集群实例下的mongos节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:param dim_1: The dim_1 of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type dim_1: str
2020-05-18 07:34:40 +00:00
"""
self._dim_1 = dim_1
2020-05-18 07:34:40 +00:00
@property
def dim_2(self):
"""Gets the dim_2 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第三层维度目前最大支持4个维度维度编号从0开始维度格式为dim.2=key,value如mongod_primary_instance_id,5f9498e9-36f8-4317-9ea1-ebe28cba99b4key为指标的维度信息文档数据库服务则第三层维度为mongod_primary_instance_idvalue为文档数据库实例下的主节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:return: The dim_2 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._dim_2
2020-05-18 07:34:40 +00:00
@dim_2.setter
def dim_2(self, dim_2):
"""Sets the dim_2 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第三层维度目前最大支持4个维度维度编号从0开始维度格式为dim.2=key,value如mongod_primary_instance_id,5f9498e9-36f8-4317-9ea1-ebe28cba99b4key为指标的维度信息文档数据库服务则第三层维度为mongod_primary_instance_idvalue为文档数据库实例下的主节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:param dim_2: The dim_2 of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type dim_2: str
2020-05-18 07:34:40 +00:00
"""
self._dim_2 = dim_2
2020-05-18 07:34:40 +00:00
@property
def dim_3(self):
"""Gets the dim_3 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第四层维度目前最大支持4个维度维度编号从0开始维度格式为dim.3=key,value如mongod_secondary_instance_id,b46fa2c7-aac6-4ae3-9337-f4ea97f885cbkey为指标的维度信息文档数据库服务则第四层维度为mongod_secondary_instance_idvalue为文档数据库实例下的备节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:return: The dim_3 of this ShowEventDataRequest.
:rtype: str
2020-05-18 07:34:40 +00:00
"""
return self._dim_3
2020-05-18 07:34:40 +00:00
@dim_3.setter
def dim_3(self, dim_3):
"""Sets the dim_3 of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
2022-08-29 06:16:53 +00:00
指标的第四层维度目前最大支持4个维度维度编号从0开始维度格式为dim.3=key,value如mongod_secondary_instance_id,b46fa2c7-aac6-4ae3-9337-f4ea97f885cbkey为指标的维度信息文档数据库服务则第四层维度为mongod_secondary_instance_idvalue为文档数据库实例下的备节点ID各资源的指标维度名称可查看[服务指标维度](https://support.huaweicloud.com/usermanual-ces/zh-cn_topic_0202622212.html)
2020-05-18 07:34:40 +00:00
:param dim_3: The dim_3 of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type dim_3: str
2020-05-18 07:34:40 +00:00
"""
self._dim_3 = dim_3
2020-05-18 07:34:40 +00:00
@property
def type(self):
"""Gets the type of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
事件类型只允许字母下划线中划线字母开头长度不超过64如instance_host_info
2020-05-18 07:34:40 +00:00
:return: The type of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
:rtype: str
"""
return self._type
2020-05-18 07:34:40 +00:00
@type.setter
def type(self, type):
"""Sets the type of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
事件类型只允许字母下划线中划线字母开头长度不超过64如instance_host_info
2020-05-18 07:34:40 +00:00
:param type: The type of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type type: str
2020-05-18 07:34:40 +00:00
"""
self._type = type
2020-05-18 07:34:40 +00:00
@property
def _from(self):
"""Gets the _from of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
查询数据起始时间UNIX时间戳单位毫秒1607146998177
2020-05-18 07:34:40 +00:00
:return: The _from of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
:rtype: int
"""
return self.__from
2020-05-18 07:34:40 +00:00
@_from.setter
def _from(self, _from):
"""Sets the _from of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
查询数据起始时间UNIX时间戳单位毫秒1607146998177
2020-05-18 07:34:40 +00:00
:param _from: The _from of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type _from: int
2020-05-18 07:34:40 +00:00
"""
self.__from = _from
2020-05-18 07:34:40 +00:00
@property
def to(self):
"""Gets the to of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
查询数据截止时间UNIX时间戳单位毫秒from必须小于to1607150598177
2020-05-18 07:34:40 +00:00
:return: The to of this ShowEventDataRequest.
:rtype: int
2020-05-18 07:34:40 +00:00
"""
return self._to
2020-05-18 07:34:40 +00:00
@to.setter
def to(self, to):
"""Sets the to of this ShowEventDataRequest.
2020-05-18 07:34:40 +00:00
查询数据截止时间UNIX时间戳单位毫秒from必须小于to1607150598177
2020-05-18 07:34:40 +00:00
:param to: The to of this ShowEventDataRequest.
2022-04-21 12:03:46 +00:00
:type to: int
2020-05-18 07:34:40 +00:00
"""
self._to = to
2020-05-18 07:34:40 +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
2020-05-18 07:34:40 +00:00
return result
def to_str(self):
2021-08-10 12:26:18 +00:00
"""Returns the string representation of the model"""
2021-07-09 10:57:08 +00:00
import simplejson as json
2021-08-10 12:26:18 +00:00
if six.PY2:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
2020-05-18 07:34:40 +00:00
def __repr__(self):
2021-08-10 12:26:18 +00:00
"""For `print`"""
2020-05-18 07:34:40 +00:00
return self.to_str()
def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, ShowEventDataRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other