huaweicloudsdkaom 3.1.86__py2.py3-none-any.whl → 3.1.132__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huaweicloudsdkaom might be problematic. Click here for more details.

Files changed (69) hide show
  1. huaweicloudsdkaom/v1/region/aom_region.py +9 -0
  2. huaweicloudsdkaom/v2/__init__.py +23 -0
  3. huaweicloudsdkaom/v2/aom_async_client.py +255 -24
  4. huaweicloudsdkaom/v2/aom_client.py +255 -24
  5. huaweicloudsdkaom/v2/model/__init__.py +23 -0
  6. huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_item_result.py +142 -0
  7. huaweicloudsdkaom/v2/model/add_or_update_alarm_rule_v4_request_body.py +304 -0
  8. huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_request.py +168 -0
  9. huaweicloudsdkaom/v2/model/add_or_update_metric_or_event_alarm_rule_response.py +174 -0
  10. huaweicloudsdkaom/v2/model/alarm_notification.py +315 -0
  11. huaweicloudsdkaom/v2/model/alarm_param_for_v4_db.py +470 -0
  12. huaweicloudsdkaom/v2/model/alarm_tags.py +173 -0
  13. huaweicloudsdkaom/v2/model/cmdb_info.py +144 -0
  14. huaweicloudsdkaom/v2/model/count_events_response.py +32 -3
  15. huaweicloudsdkaom/v2/model/delete_alarm_rule_v4_request_body.py +114 -0
  16. huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_request.py +111 -0
  17. huaweicloudsdkaom/v2/model/delete_metric_or_event_alarm_rule_response.py +174 -0
  18. huaweicloudsdkaom/v2/model/delete_prom_instance_request.py +31 -3
  19. huaweicloudsdkaom/v2/model/event_alarm_spec.py +260 -0
  20. huaweicloudsdkaom/v2/model/event_trigger_condition.py +260 -0
  21. huaweicloudsdkaom/v2/model/item_result.py +114 -0
  22. huaweicloudsdkaom/v2/model/list_agents_request.py +6 -6
  23. huaweicloudsdkaom/v2/model/list_event_model.py +405 -0
  24. huaweicloudsdkaom/v2/model/list_events_request.py +88 -1
  25. huaweicloudsdkaom/v2/model/list_events_response.py +31 -6
  26. huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_request.py +434 -0
  27. huaweicloudsdkaom/v2/model/list_metric_or_event_alarm_rule_response.py +174 -0
  28. huaweicloudsdkaom/v2/model/list_prom_instance_request.py +31 -3
  29. huaweicloudsdkaom/v2/model/metric_alarm_spec.py +310 -0
  30. huaweicloudsdkaom/v2/model/no_data_condition.py +173 -0
  31. huaweicloudsdkaom/v2/model/node_info.py +144 -0
  32. huaweicloudsdkaom/v2/model/page_info.py +170 -0
  33. huaweicloudsdkaom/v2/model/push_events_request.py +18 -18
  34. huaweicloudsdkaom/v2/model/recovery_condition.py +115 -0
  35. huaweicloudsdkaom/v2/model/smn_info.py +4 -4
  36. huaweicloudsdkaom/v2/model/trigger_condition.py +742 -0
  37. huaweicloudsdkaom/v2/region/aom_region.py +9 -0
  38. huaweicloudsdkaom/v3/aom_async_client.py +19 -19
  39. huaweicloudsdkaom/v3/aom_client.py +19 -19
  40. huaweicloudsdkaom/v3/model/biz_app_param.py +12 -12
  41. huaweicloudsdkaom/v3/model/component_param.py +3 -3
  42. huaweicloudsdkaom/v3/model/env_param.py +6 -6
  43. huaweicloudsdkaom/v3/model/sub_app_create_param.py +15 -15
  44. huaweicloudsdkaom/v3/model/sub_app_update_param.py +9 -9
  45. huaweicloudsdkaom/v3/region/aom_region.py +9 -0
  46. huaweicloudsdkaom/v4/__init__.py +21 -0
  47. huaweicloudsdkaom/v4/aom_async_client.py +279 -0
  48. huaweicloudsdkaom/v4/aom_client.py +276 -0
  49. huaweicloudsdkaom/v4/model/__init__.py +18 -0
  50. huaweicloudsdkaom/v4/model/agent_batch_import_param_new.py +280 -0
  51. huaweicloudsdkaom/v4/model/agent_import_param_new.py +313 -0
  52. huaweicloudsdkaom/v4/model/agent_info_param.py +231 -0
  53. huaweicloudsdkaom/v4/model/agent_info_result.py +463 -0
  54. huaweicloudsdkaom/v4/model/agent_upgrade_param.py +142 -0
  55. huaweicloudsdkaom/v4/model/batch_import_agent_request.py +139 -0
  56. huaweicloudsdkaom/v4/model/batch_import_agent_response.py +116 -0
  57. huaweicloudsdkaom/v4/model/batch_update_agent_request.py +111 -0
  58. huaweicloudsdkaom/v4/model/batch_update_agent_response.py +116 -0
  59. huaweicloudsdkaom/v4/model/plugin_install_basic_param.py +173 -0
  60. huaweicloudsdkaom/v4/model/show_agent_infos_request.py +111 -0
  61. huaweicloudsdkaom/v4/model/show_agent_infos_response.py +203 -0
  62. huaweicloudsdkaom/v4/model/single_agent_param.py +142 -0
  63. huaweicloudsdkaom/v4/region/__init__.py +0 -0
  64. huaweicloudsdkaom/v4/region/aom_region.py +100 -0
  65. {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/METADATA +2 -2
  66. {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/RECORD +69 -27
  67. {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/WHEEL +1 -1
  68. {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/LICENSE +0 -0
  69. {huaweicloudsdkaom-3.1.86.dist-info → huaweicloudsdkaom-3.1.132.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,174 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.sdk_response import SdkResponse
6
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
7
+
8
+
9
+ class AddOrUpdateMetricOrEventAlarmRuleResponse(SdkResponse):
10
+
11
+ """
12
+ Attributes:
13
+ openapi_types (dict): The key is attribute name
14
+ and the value is attribute type.
15
+ attribute_map (dict): The key is attribute name
16
+ and the value is json key in definition.
17
+ """
18
+ sensitive_list = []
19
+
20
+ openapi_types = {
21
+ 'error_code': 'str',
22
+ 'error_message': 'str',
23
+ 'alarm_rules': 'list[AddOrUpdateAlarmRuleV4ItemResult]'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'error_code': 'error_code',
28
+ 'error_message': 'error_message',
29
+ 'alarm_rules': 'alarm_rules'
30
+ }
31
+
32
+ def __init__(self, error_code=None, error_message=None, alarm_rules=None):
33
+ """AddOrUpdateMetricOrEventAlarmRuleResponse
34
+
35
+ The model defined in huaweicloud sdk
36
+
37
+ :param error_code: 错误码。
38
+ :type error_code: str
39
+ :param error_message: 错误信息。
40
+ :type error_message: str
41
+ :param alarm_rules: 告警规则列表。
42
+ :type alarm_rules: list[:class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4ItemResult`]
43
+ """
44
+
45
+ super(AddOrUpdateMetricOrEventAlarmRuleResponse, self).__init__()
46
+
47
+ self._error_code = None
48
+ self._error_message = None
49
+ self._alarm_rules = None
50
+ self.discriminator = None
51
+
52
+ if error_code is not None:
53
+ self.error_code = error_code
54
+ if error_message is not None:
55
+ self.error_message = error_message
56
+ if alarm_rules is not None:
57
+ self.alarm_rules = alarm_rules
58
+
59
+ @property
60
+ def error_code(self):
61
+ """Gets the error_code of this AddOrUpdateMetricOrEventAlarmRuleResponse.
62
+
63
+ 错误码。
64
+
65
+ :return: The error_code of this AddOrUpdateMetricOrEventAlarmRuleResponse.
66
+ :rtype: str
67
+ """
68
+ return self._error_code
69
+
70
+ @error_code.setter
71
+ def error_code(self, error_code):
72
+ """Sets the error_code of this AddOrUpdateMetricOrEventAlarmRuleResponse.
73
+
74
+ 错误码。
75
+
76
+ :param error_code: The error_code of this AddOrUpdateMetricOrEventAlarmRuleResponse.
77
+ :type error_code: str
78
+ """
79
+ self._error_code = error_code
80
+
81
+ @property
82
+ def error_message(self):
83
+ """Gets the error_message of this AddOrUpdateMetricOrEventAlarmRuleResponse.
84
+
85
+ 错误信息。
86
+
87
+ :return: The error_message of this AddOrUpdateMetricOrEventAlarmRuleResponse.
88
+ :rtype: str
89
+ """
90
+ return self._error_message
91
+
92
+ @error_message.setter
93
+ def error_message(self, error_message):
94
+ """Sets the error_message of this AddOrUpdateMetricOrEventAlarmRuleResponse.
95
+
96
+ 错误信息。
97
+
98
+ :param error_message: The error_message of this AddOrUpdateMetricOrEventAlarmRuleResponse.
99
+ :type error_message: str
100
+ """
101
+ self._error_message = error_message
102
+
103
+ @property
104
+ def alarm_rules(self):
105
+ """Gets the alarm_rules of this AddOrUpdateMetricOrEventAlarmRuleResponse.
106
+
107
+ 告警规则列表。
108
+
109
+ :return: The alarm_rules of this AddOrUpdateMetricOrEventAlarmRuleResponse.
110
+ :rtype: list[:class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4ItemResult`]
111
+ """
112
+ return self._alarm_rules
113
+
114
+ @alarm_rules.setter
115
+ def alarm_rules(self, alarm_rules):
116
+ """Sets the alarm_rules of this AddOrUpdateMetricOrEventAlarmRuleResponse.
117
+
118
+ 告警规则列表。
119
+
120
+ :param alarm_rules: The alarm_rules of this AddOrUpdateMetricOrEventAlarmRuleResponse.
121
+ :type alarm_rules: list[:class:`huaweicloudsdkaom.v2.AddOrUpdateAlarmRuleV4ItemResult`]
122
+ """
123
+ self._alarm_rules = alarm_rules
124
+
125
+ def to_dict(self):
126
+ """Returns the model properties as a dict"""
127
+ result = {}
128
+
129
+ for attr, _ in six.iteritems(self.openapi_types):
130
+ value = getattr(self, attr)
131
+ if isinstance(value, list):
132
+ result[attr] = list(map(
133
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
134
+ value
135
+ ))
136
+ elif hasattr(value, "to_dict"):
137
+ result[attr] = value.to_dict()
138
+ elif isinstance(value, dict):
139
+ result[attr] = dict(map(
140
+ lambda item: (item[0], item[1].to_dict())
141
+ if hasattr(item[1], "to_dict") else item,
142
+ value.items()
143
+ ))
144
+ else:
145
+ if attr in self.sensitive_list:
146
+ result[attr] = "****"
147
+ else:
148
+ result[attr] = value
149
+
150
+ return result
151
+
152
+ def to_str(self):
153
+ """Returns the string representation of the model"""
154
+ import simplejson as json
155
+ if six.PY2:
156
+ import sys
157
+ reload(sys)
158
+ sys.setdefaultencoding("utf-8")
159
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
160
+
161
+ def __repr__(self):
162
+ """For `print`"""
163
+ return self.to_str()
164
+
165
+ def __eq__(self, other):
166
+ """Returns true if both objects are equal"""
167
+ if not isinstance(other, AddOrUpdateMetricOrEventAlarmRuleResponse):
168
+ return False
169
+
170
+ return self.__dict__ == other.__dict__
171
+
172
+ def __ne__(self, other):
173
+ """Returns true if both objects are not equal"""
174
+ return not self == other
@@ -0,0 +1,315 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class AlarmNotification:
9
+
10
+ """
11
+ Attributes:
12
+ openapi_types (dict): The key is attribute name
13
+ and the value is attribute type.
14
+ attribute_map (dict): The key is attribute name
15
+ and the value is json key in definition.
16
+ """
17
+ sensitive_list = []
18
+
19
+ openapi_types = {
20
+ 'notification_type': 'str',
21
+ 'route_group_enable': 'bool',
22
+ 'route_group_rule': 'str',
23
+ 'notification_enable': 'bool',
24
+ 'bind_notification_rule_id': 'str',
25
+ 'notify_resolved': 'bool',
26
+ 'notify_triggered': 'bool',
27
+ 'notify_frequency': 'int'
28
+ }
29
+
30
+ attribute_map = {
31
+ 'notification_type': 'notification_type',
32
+ 'route_group_enable': 'route_group_enable',
33
+ 'route_group_rule': 'route_group_rule',
34
+ 'notification_enable': 'notification_enable',
35
+ 'bind_notification_rule_id': 'bind_notification_rule_id',
36
+ 'notify_resolved': 'notify_resolved',
37
+ 'notify_triggered': 'notify_triggered',
38
+ 'notify_frequency': 'notify_frequency'
39
+ }
40
+
41
+ def __init__(self, notification_type=None, route_group_enable=None, route_group_rule=None, notification_enable=None, bind_notification_rule_id=None, notify_resolved=None, notify_triggered=None, notify_frequency=None):
42
+ """AlarmNotification
43
+
44
+ The model defined in huaweicloud sdk
45
+
46
+ :param notification_type: 通知类型。 - “direct”:直接告警 - “alarm_policy”:告警降噪
47
+ :type notification_type: str
48
+ :param route_group_enable: 启用分组规则。 - 当通知类型为“alarm_policy”时:true - 当通知类型为“direct”时:false
49
+ :type route_group_enable: bool
50
+ :param route_group_rule: 分组规则名称。 - 当route_group_enable 为true时,填分组规则名称 - 当route_group_enable 为false时,填“”
51
+ :type route_group_rule: str
52
+ :param notification_enable: 是否启用告警行动规则。 - 当通知类型为“direct”时,填true - 当通知类型为“alarm_policy”时,填false
53
+ :type notification_enable: bool
54
+ :param bind_notification_rule_id: 告警行动策略id。 - 当notification_enable为true时,填告警行动策略id - 当notification_enable为false时,填“”
55
+ :type bind_notification_rule_id: str
56
+ :param notify_resolved: 告警解决是否通知。 - true:通知 - false:不通知
57
+ :type notify_resolved: bool
58
+ :param notify_triggered: 告警触发是否通知。 - true:通知 - false:不通知
59
+ :type notify_triggered: bool
60
+ :param notify_frequency: 通知频率 - 当通知类型为“alarm_policy”时,填“-1” - 当通知类型为“direct”时, - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟 - “900”:每15分钟 - “1800”:每30分钟 - “3600”:每1小时 - “10800”:每3小时 - “21600”:每6小时 - “43200”:每12小时 - “86400”:每天
61
+ :type notify_frequency: int
62
+ """
63
+
64
+
65
+
66
+ self._notification_type = None
67
+ self._route_group_enable = None
68
+ self._route_group_rule = None
69
+ self._notification_enable = None
70
+ self._bind_notification_rule_id = None
71
+ self._notify_resolved = None
72
+ self._notify_triggered = None
73
+ self._notify_frequency = None
74
+ self.discriminator = None
75
+
76
+ self.notification_type = notification_type
77
+ self.route_group_enable = route_group_enable
78
+ self.route_group_rule = route_group_rule
79
+ if notification_enable is not None:
80
+ self.notification_enable = notification_enable
81
+ if bind_notification_rule_id is not None:
82
+ self.bind_notification_rule_id = bind_notification_rule_id
83
+ if notify_resolved is not None:
84
+ self.notify_resolved = notify_resolved
85
+ if notify_triggered is not None:
86
+ self.notify_triggered = notify_triggered
87
+ if notify_frequency is not None:
88
+ self.notify_frequency = notify_frequency
89
+
90
+ @property
91
+ def notification_type(self):
92
+ """Gets the notification_type of this AlarmNotification.
93
+
94
+ 通知类型。 - “direct”:直接告警 - “alarm_policy”:告警降噪
95
+
96
+ :return: The notification_type of this AlarmNotification.
97
+ :rtype: str
98
+ """
99
+ return self._notification_type
100
+
101
+ @notification_type.setter
102
+ def notification_type(self, notification_type):
103
+ """Sets the notification_type of this AlarmNotification.
104
+
105
+ 通知类型。 - “direct”:直接告警 - “alarm_policy”:告警降噪
106
+
107
+ :param notification_type: The notification_type of this AlarmNotification.
108
+ :type notification_type: str
109
+ """
110
+ self._notification_type = notification_type
111
+
112
+ @property
113
+ def route_group_enable(self):
114
+ """Gets the route_group_enable of this AlarmNotification.
115
+
116
+ 启用分组规则。 - 当通知类型为“alarm_policy”时:true - 当通知类型为“direct”时:false
117
+
118
+ :return: The route_group_enable of this AlarmNotification.
119
+ :rtype: bool
120
+ """
121
+ return self._route_group_enable
122
+
123
+ @route_group_enable.setter
124
+ def route_group_enable(self, route_group_enable):
125
+ """Sets the route_group_enable of this AlarmNotification.
126
+
127
+ 启用分组规则。 - 当通知类型为“alarm_policy”时:true - 当通知类型为“direct”时:false
128
+
129
+ :param route_group_enable: The route_group_enable of this AlarmNotification.
130
+ :type route_group_enable: bool
131
+ """
132
+ self._route_group_enable = route_group_enable
133
+
134
+ @property
135
+ def route_group_rule(self):
136
+ """Gets the route_group_rule of this AlarmNotification.
137
+
138
+ 分组规则名称。 - 当route_group_enable 为true时,填分组规则名称 - 当route_group_enable 为false时,填“”
139
+
140
+ :return: The route_group_rule of this AlarmNotification.
141
+ :rtype: str
142
+ """
143
+ return self._route_group_rule
144
+
145
+ @route_group_rule.setter
146
+ def route_group_rule(self, route_group_rule):
147
+ """Sets the route_group_rule of this AlarmNotification.
148
+
149
+ 分组规则名称。 - 当route_group_enable 为true时,填分组规则名称 - 当route_group_enable 为false时,填“”
150
+
151
+ :param route_group_rule: The route_group_rule of this AlarmNotification.
152
+ :type route_group_rule: str
153
+ """
154
+ self._route_group_rule = route_group_rule
155
+
156
+ @property
157
+ def notification_enable(self):
158
+ """Gets the notification_enable of this AlarmNotification.
159
+
160
+ 是否启用告警行动规则。 - 当通知类型为“direct”时,填true - 当通知类型为“alarm_policy”时,填false
161
+
162
+ :return: The notification_enable of this AlarmNotification.
163
+ :rtype: bool
164
+ """
165
+ return self._notification_enable
166
+
167
+ @notification_enable.setter
168
+ def notification_enable(self, notification_enable):
169
+ """Sets the notification_enable of this AlarmNotification.
170
+
171
+ 是否启用告警行动规则。 - 当通知类型为“direct”时,填true - 当通知类型为“alarm_policy”时,填false
172
+
173
+ :param notification_enable: The notification_enable of this AlarmNotification.
174
+ :type notification_enable: bool
175
+ """
176
+ self._notification_enable = notification_enable
177
+
178
+ @property
179
+ def bind_notification_rule_id(self):
180
+ """Gets the bind_notification_rule_id of this AlarmNotification.
181
+
182
+ 告警行动策略id。 - 当notification_enable为true时,填告警行动策略id - 当notification_enable为false时,填“”
183
+
184
+ :return: The bind_notification_rule_id of this AlarmNotification.
185
+ :rtype: str
186
+ """
187
+ return self._bind_notification_rule_id
188
+
189
+ @bind_notification_rule_id.setter
190
+ def bind_notification_rule_id(self, bind_notification_rule_id):
191
+ """Sets the bind_notification_rule_id of this AlarmNotification.
192
+
193
+ 告警行动策略id。 - 当notification_enable为true时,填告警行动策略id - 当notification_enable为false时,填“”
194
+
195
+ :param bind_notification_rule_id: The bind_notification_rule_id of this AlarmNotification.
196
+ :type bind_notification_rule_id: str
197
+ """
198
+ self._bind_notification_rule_id = bind_notification_rule_id
199
+
200
+ @property
201
+ def notify_resolved(self):
202
+ """Gets the notify_resolved of this AlarmNotification.
203
+
204
+ 告警解决是否通知。 - true:通知 - false:不通知
205
+
206
+ :return: The notify_resolved of this AlarmNotification.
207
+ :rtype: bool
208
+ """
209
+ return self._notify_resolved
210
+
211
+ @notify_resolved.setter
212
+ def notify_resolved(self, notify_resolved):
213
+ """Sets the notify_resolved of this AlarmNotification.
214
+
215
+ 告警解决是否通知。 - true:通知 - false:不通知
216
+
217
+ :param notify_resolved: The notify_resolved of this AlarmNotification.
218
+ :type notify_resolved: bool
219
+ """
220
+ self._notify_resolved = notify_resolved
221
+
222
+ @property
223
+ def notify_triggered(self):
224
+ """Gets the notify_triggered of this AlarmNotification.
225
+
226
+ 告警触发是否通知。 - true:通知 - false:不通知
227
+
228
+ :return: The notify_triggered of this AlarmNotification.
229
+ :rtype: bool
230
+ """
231
+ return self._notify_triggered
232
+
233
+ @notify_triggered.setter
234
+ def notify_triggered(self, notify_triggered):
235
+ """Sets the notify_triggered of this AlarmNotification.
236
+
237
+ 告警触发是否通知。 - true:通知 - false:不通知
238
+
239
+ :param notify_triggered: The notify_triggered of this AlarmNotification.
240
+ :type notify_triggered: bool
241
+ """
242
+ self._notify_triggered = notify_triggered
243
+
244
+ @property
245
+ def notify_frequency(self):
246
+ """Gets the notify_frequency of this AlarmNotification.
247
+
248
+ 通知频率 - 当通知类型为“alarm_policy”时,填“-1” - 当通知类型为“direct”时, - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟 - “900”:每15分钟 - “1800”:每30分钟 - “3600”:每1小时 - “10800”:每3小时 - “21600”:每6小时 - “43200”:每12小时 - “86400”:每天
249
+
250
+ :return: The notify_frequency of this AlarmNotification.
251
+ :rtype: int
252
+ """
253
+ return self._notify_frequency
254
+
255
+ @notify_frequency.setter
256
+ def notify_frequency(self, notify_frequency):
257
+ """Sets the notify_frequency of this AlarmNotification.
258
+
259
+ 通知频率 - 当通知类型为“alarm_policy”时,填“-1” - 当通知类型为“direct”时, - “0”:只告警一次 - “300”:每5分钟 - “600”:每10分钟 - “900”:每15分钟 - “1800”:每30分钟 - “3600”:每1小时 - “10800”:每3小时 - “21600”:每6小时 - “43200”:每12小时 - “86400”:每天
260
+
261
+ :param notify_frequency: The notify_frequency of this AlarmNotification.
262
+ :type notify_frequency: int
263
+ """
264
+ self._notify_frequency = notify_frequency
265
+
266
+ def to_dict(self):
267
+ """Returns the model properties as a dict"""
268
+ result = {}
269
+
270
+ for attr, _ in six.iteritems(self.openapi_types):
271
+ value = getattr(self, attr)
272
+ if isinstance(value, list):
273
+ result[attr] = list(map(
274
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
275
+ value
276
+ ))
277
+ elif hasattr(value, "to_dict"):
278
+ result[attr] = value.to_dict()
279
+ elif isinstance(value, dict):
280
+ result[attr] = dict(map(
281
+ lambda item: (item[0], item[1].to_dict())
282
+ if hasattr(item[1], "to_dict") else item,
283
+ value.items()
284
+ ))
285
+ else:
286
+ if attr in self.sensitive_list:
287
+ result[attr] = "****"
288
+ else:
289
+ result[attr] = value
290
+
291
+ return result
292
+
293
+ def to_str(self):
294
+ """Returns the string representation of the model"""
295
+ import simplejson as json
296
+ if six.PY2:
297
+ import sys
298
+ reload(sys)
299
+ sys.setdefaultencoding("utf-8")
300
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
301
+
302
+ def __repr__(self):
303
+ """For `print`"""
304
+ return self.to_str()
305
+
306
+ def __eq__(self, other):
307
+ """Returns true if both objects are equal"""
308
+ if not isinstance(other, AlarmNotification):
309
+ return False
310
+
311
+ return self.__dict__ == other.__dict__
312
+
313
+ def __ne__(self, other):
314
+ """Returns true if both objects are not equal"""
315
+ return not self == other