huaweicloudsdkclouddc 3.1.176__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.
Files changed (143) hide show
  1. huaweicloudsdkclouddc/__init__.py +0 -0
  2. huaweicloudsdkclouddc/v1/__init__.py +140 -0
  3. huaweicloudsdkclouddc/v1/clouddc_async_client.py +2255 -0
  4. huaweicloudsdkclouddc/v1/clouddc_client.py +2252 -0
  5. huaweicloudsdkclouddc/v1/model/__init__.py +137 -0
  6. huaweicloudsdkclouddc/v1/model/alarm_daily_trend.py +166 -0
  7. huaweicloudsdkclouddc/v1/model/alarm_device_info.py +137 -0
  8. huaweicloudsdkclouddc/v1/model/alarm_group.py +166 -0
  9. huaweicloudsdkclouddc/v1/model/alarm_history.py +336 -0
  10. huaweicloudsdkclouddc/v1/model/alarm_host.py +166 -0
  11. huaweicloudsdkclouddc/v1/model/alarm_info.py +166 -0
  12. huaweicloudsdkclouddc/v1/model/alarm_level_info.py +137 -0
  13. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_request.py +132 -0
  14. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_response.py +81 -0
  15. huaweicloudsdkclouddc/v1/model/batch_create_tags_request.py +160 -0
  16. huaweicloudsdkclouddc/v1/model/batch_create_tags_response.py +81 -0
  17. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_request.py +132 -0
  18. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_response.py +81 -0
  19. huaweicloudsdkclouddc/v1/model/batch_delete_options.py +108 -0
  20. huaweicloudsdkclouddc/v1/model/batch_delete_tags_request.py +160 -0
  21. huaweicloudsdkclouddc/v1/model/batch_delete_tags_response.py +81 -0
  22. huaweicloudsdkclouddc/v1/model/capacity_bytes.py +77 -0
  23. huaweicloudsdkclouddc/v1/model/change_instance_password_options.py +136 -0
  24. huaweicloudsdkclouddc/v1/model/change_instance_password_request.py +104 -0
  25. huaweicloudsdkclouddc/v1/model/change_instance_password_response.py +112 -0
  26. huaweicloudsdkclouddc/v1/model/change_server_power_state_request.py +104 -0
  27. huaweicloudsdkclouddc/v1/model/change_server_power_state_response.py +112 -0
  28. huaweicloudsdkclouddc/v1/model/create_instance_opitons.py +302 -0
  29. huaweicloudsdkclouddc/v1/model/create_instance_opitons_placement.py +108 -0
  30. huaweicloudsdkclouddc/v1/model/create_instance_request.py +104 -0
  31. huaweicloudsdkclouddc/v1/model/create_instance_response.py +112 -0
  32. huaweicloudsdkclouddc/v1/model/delete_instance_request.py +107 -0
  33. huaweicloudsdkclouddc/v1/model/delete_instance_response.py +108 -0
  34. huaweicloudsdkclouddc/v1/model/delete_instances_request.py +104 -0
  35. huaweicloudsdkclouddc/v1/model/delete_instances_response.py +112 -0
  36. huaweicloudsdkclouddc/v1/model/dimension.py +137 -0
  37. huaweicloudsdkclouddc/v1/model/download_server_logs_request.py +135 -0
  38. huaweicloudsdkclouddc/v1/model/download_server_logs_response.py +158 -0
  39. huaweicloudsdkclouddc/v1/model/drive.py +630 -0
  40. huaweicloudsdkclouddc/v1/model/error_status.py +163 -0
  41. huaweicloudsdkclouddc/v1/model/event_info.py +311 -0
  42. huaweicloudsdkclouddc/v1/model/export_server_logs_request.py +107 -0
  43. huaweicloudsdkclouddc/v1/model/export_server_logs_response.py +274 -0
  44. huaweicloudsdkclouddc/v1/model/fan.py +278 -0
  45. huaweicloudsdkclouddc/v1/model/fault_host_info.py +166 -0
  46. huaweicloudsdkclouddc/v1/model/firmware_details.py +195 -0
  47. huaweicloudsdkclouddc/v1/model/hardware_metric.py +137 -0
  48. huaweicloudsdkclouddc/v1/model/hardware_summary.py +221 -0
  49. huaweicloudsdkclouddc/v1/model/health.py +83 -0
  50. huaweicloudsdkclouddc/v1/model/i_dc.py +201 -0
  51. huaweicloudsdkclouddc/v1/model/i_rack.py +514 -0
  52. huaweicloudsdkclouddc/v1/model/i_rack_request.py +108 -0
  53. huaweicloudsdkclouddc/v1/model/image.py +163 -0
  54. huaweicloudsdkclouddc/v1/model/image_id.py +77 -0
  55. huaweicloudsdkclouddc/v1/model/instance.py +273 -0
  56. huaweicloudsdkclouddc/v1/model/instance_id.py +77 -0
  57. huaweicloudsdkclouddc/v1/model/instance_state.py +89 -0
  58. huaweicloudsdkclouddc/v1/model/list_alarms_request.py +340 -0
  59. huaweicloudsdkclouddc/v1/model/list_alarms_response.py +141 -0
  60. huaweicloudsdkclouddc/v1/model/list_events_request.py +251 -0
  61. huaweicloudsdkclouddc/v1/model/list_events_response.py +141 -0
  62. huaweicloudsdkclouddc/v1/model/list_i_dcs_request.py +194 -0
  63. huaweicloudsdkclouddc/v1/model/list_i_dcs_response.py +133 -0
  64. huaweicloudsdkclouddc/v1/model/list_i_racks_request.py +194 -0
  65. huaweicloudsdkclouddc/v1/model/list_i_racks_response.py +133 -0
  66. huaweicloudsdkclouddc/v1/model/list_instances_request.py +224 -0
  67. huaweicloudsdkclouddc/v1/model/list_instances_response.py +166 -0
  68. huaweicloudsdkclouddc/v1/model/list_servers_request.py +166 -0
  69. huaweicloudsdkclouddc/v1/model/list_servers_response.py +166 -0
  70. huaweicloudsdkclouddc/v1/model/location.py +166 -0
  71. huaweicloudsdkclouddc/v1/model/manage_state.py +84 -0
  72. huaweicloudsdkclouddc/v1/model/memory.py +572 -0
  73. huaweicloudsdkclouddc/v1/model/metric.py +137 -0
  74. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request.py +132 -0
  75. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body.py +137 -0
  76. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body_nics.py +136 -0
  77. huaweicloudsdkclouddc/v1/model/modify_instance_ip_response.py +81 -0
  78. huaweicloudsdkclouddc/v1/model/network_adapter.py +485 -0
  79. huaweicloudsdkclouddc/v1/model/network_interface.py +136 -0
  80. huaweicloudsdkclouddc/v1/model/network_port.py +340 -0
  81. huaweicloudsdkclouddc/v1/model/page_info.py +166 -0
  82. huaweicloudsdkclouddc/v1/model/password.py +77 -0
  83. huaweicloudsdkclouddc/v1/model/physical_server.py +395 -0
  84. huaweicloudsdkclouddc/v1/model/power.py +481 -0
  85. huaweicloudsdkclouddc/v1/model/power_action.py +136 -0
  86. huaweicloudsdkclouddc/v1/model/power_state.py +84 -0
  87. huaweicloudsdkclouddc/v1/model/processors.py +630 -0
  88. huaweicloudsdkclouddc/v1/model/query_instance_response_body.py +492 -0
  89. huaweicloudsdkclouddc/v1/model/reinstall_os_options.py +165 -0
  90. huaweicloudsdkclouddc/v1/model/reinstall_os_request.py +104 -0
  91. huaweicloudsdkclouddc/v1/model/reinstall_os_response.py +112 -0
  92. huaweicloudsdkclouddc/v1/model/resource_name.py +77 -0
  93. huaweicloudsdkclouddc/v1/model/resource_tags.py +108 -0
  94. huaweicloudsdkclouddc/v1/model/resource_uuid.py +77 -0
  95. huaweicloudsdkclouddc/v1/model/run_instances_options.py +360 -0
  96. huaweicloudsdkclouddc/v1/model/run_instances_options_network_interfaces.py +107 -0
  97. huaweicloudsdkclouddc/v1/model/run_instances_options_placement.py +108 -0
  98. huaweicloudsdkclouddc/v1/model/run_instances_request.py +104 -0
  99. huaweicloudsdkclouddc/v1/model/run_instances_response.py +112 -0
  100. huaweicloudsdkclouddc/v1/model/sas_address.py +77 -0
  101. huaweicloudsdkclouddc/v1/model/server_instance_id_set.py +108 -0
  102. huaweicloudsdkclouddc/v1/model/server_power_status.py +164 -0
  103. huaweicloudsdkclouddc/v1/model/server_state.py +135 -0
  104. huaweicloudsdkclouddc/v1/model/server_status.py +272 -0
  105. huaweicloudsdkclouddc/v1/model/servers_response_physical_servers.py +108 -0
  106. huaweicloudsdkclouddc/v1/model/show_alarm_summary_request.py +77 -0
  107. huaweicloudsdkclouddc/v1/model/show_alarm_summary_response.py +199 -0
  108. huaweicloudsdkclouddc/v1/model/show_alarm_trend_request.py +135 -0
  109. huaweicloudsdkclouddc/v1/model/show_alarm_trend_response.py +141 -0
  110. huaweicloudsdkclouddc/v1/model/show_event_request.py +107 -0
  111. huaweicloudsdkclouddc/v1/model/show_event_response.py +373 -0
  112. huaweicloudsdkclouddc/v1/model/show_instance_status_request.py +107 -0
  113. huaweicloudsdkclouddc/v1/model/show_instance_status_response.py +133 -0
  114. huaweicloudsdkclouddc/v1/model/show_logs_export_status_request.py +135 -0
  115. huaweicloudsdkclouddc/v1/model/show_logs_export_status_response.py +199 -0
  116. huaweicloudsdkclouddc/v1/model/show_remote_console_request.py +107 -0
  117. huaweicloudsdkclouddc/v1/model/show_remote_console_response.py +112 -0
  118. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_request.py +107 -0
  119. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_response.py +112 -0
  120. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_request.py +107 -0
  121. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_response.py +311 -0
  122. huaweicloudsdkclouddc/v1/model/show_server_request.py +107 -0
  123. huaweicloudsdkclouddc/v1/model/show_server_response.py +407 -0
  124. huaweicloudsdkclouddc/v1/model/show_server_status_request.py +77 -0
  125. huaweicloudsdkclouddc/v1/model/show_server_status_response.py +133 -0
  126. huaweicloudsdkclouddc/v1/model/state.py +82 -0
  127. huaweicloudsdkclouddc/v1/model/status.py +129 -0
  128. huaweicloudsdkclouddc/v1/model/storage_controller.py +601 -0
  129. huaweicloudsdkclouddc/v1/model/tag.py +136 -0
  130. huaweicloudsdkclouddc/v1/model/update_i_dcs_request.py +104 -0
  131. huaweicloudsdkclouddc/v1/model/update_i_dcs_response.py +108 -0
  132. huaweicloudsdkclouddc/v1/model/update_i_rack_request.py +132 -0
  133. huaweicloudsdkclouddc/v1/model/update_i_rack_response.py +108 -0
  134. huaweicloudsdkclouddc/v1/model/user_data.py +77 -0
  135. huaweicloudsdkclouddc/v1/model/volume.py +452 -0
  136. huaweicloudsdkclouddc/v1/model/volume_status.py +133 -0
  137. huaweicloudsdkclouddc/v1/model/vpc_id.py +77 -0
  138. huaweicloudsdkclouddc/v1/region/__init__.py +0 -0
  139. huaweicloudsdkclouddc/v1/region/clouddc_region.py +40 -0
  140. huaweicloudsdkclouddc-3.1.176.dist-info/METADATA +25 -0
  141. huaweicloudsdkclouddc-3.1.176.dist-info/RECORD +143 -0
  142. huaweicloudsdkclouddc-3.1.176.dist-info/WHEEL +4 -0
  143. huaweicloudsdkclouddc-3.1.176.dist-info/licenses/LICENSE +13 -0
@@ -0,0 +1,272 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ServerStatus:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'total': 'ServerState',
19
+ 'ok': 'object',
20
+ 'warning': 'object',
21
+ 'critical': 'object',
22
+ 'health': 'object',
23
+ 'unhealth': 'object',
24
+ 'isolation': 'object'
25
+ }
26
+
27
+ attribute_map = {
28
+ 'total': 'total',
29
+ 'ok': 'ok',
30
+ 'warning': 'warning',
31
+ 'critical': 'critical',
32
+ 'health': 'health',
33
+ 'unhealth': 'unhealth',
34
+ 'isolation': 'isolation'
35
+ }
36
+
37
+ def __init__(self, total=None, ok=None, warning=None, critical=None, health=None, unhealth=None, isolation=None):
38
+ r"""ServerStatus
39
+
40
+ The model defined in huaweicloud sdk
41
+
42
+ :param total:
43
+ :type total: :class:`huaweicloudsdkclouddc.v1.ServerState`
44
+ :param ok: 服务器运行OK状态所有对象
45
+ :type ok: object
46
+ :param warning: 服务器运行Warning状态所有对象
47
+ :type warning: object
48
+ :param critical: 服务器运行Critical状态所有对象
49
+ :type critical: object
50
+ :param health: 服务器运行Health状态所有对象
51
+ :type health: object
52
+ :param unhealth: 服务器运行UnHealth状态所有对象
53
+ :type unhealth: object
54
+ :param isolation: 服务器运行Isolation状态所有对象
55
+ :type isolation: object
56
+ """
57
+
58
+
59
+
60
+ self._total = None
61
+ self._ok = None
62
+ self._warning = None
63
+ self._critical = None
64
+ self._health = None
65
+ self._unhealth = None
66
+ self._isolation = None
67
+ self.discriminator = None
68
+
69
+ self.total = total
70
+ self.ok = ok
71
+ self.warning = warning
72
+ self.critical = critical
73
+ self.health = health
74
+ if unhealth is not None:
75
+ self.unhealth = unhealth
76
+ self.isolation = isolation
77
+
78
+ @property
79
+ def total(self):
80
+ r"""Gets the total of this ServerStatus.
81
+
82
+ :return: The total of this ServerStatus.
83
+ :rtype: :class:`huaweicloudsdkclouddc.v1.ServerState`
84
+ """
85
+ return self._total
86
+
87
+ @total.setter
88
+ def total(self, total):
89
+ r"""Sets the total of this ServerStatus.
90
+
91
+ :param total: The total of this ServerStatus.
92
+ :type total: :class:`huaweicloudsdkclouddc.v1.ServerState`
93
+ """
94
+ self._total = total
95
+
96
+ @property
97
+ def ok(self):
98
+ r"""Gets the ok of this ServerStatus.
99
+
100
+ 服务器运行OK状态所有对象
101
+
102
+ :return: The ok of this ServerStatus.
103
+ :rtype: object
104
+ """
105
+ return self._ok
106
+
107
+ @ok.setter
108
+ def ok(self, ok):
109
+ r"""Sets the ok of this ServerStatus.
110
+
111
+ 服务器运行OK状态所有对象
112
+
113
+ :param ok: The ok of this ServerStatus.
114
+ :type ok: object
115
+ """
116
+ self._ok = ok
117
+
118
+ @property
119
+ def warning(self):
120
+ r"""Gets the warning of this ServerStatus.
121
+
122
+ 服务器运行Warning状态所有对象
123
+
124
+ :return: The warning of this ServerStatus.
125
+ :rtype: object
126
+ """
127
+ return self._warning
128
+
129
+ @warning.setter
130
+ def warning(self, warning):
131
+ r"""Sets the warning of this ServerStatus.
132
+
133
+ 服务器运行Warning状态所有对象
134
+
135
+ :param warning: The warning of this ServerStatus.
136
+ :type warning: object
137
+ """
138
+ self._warning = warning
139
+
140
+ @property
141
+ def critical(self):
142
+ r"""Gets the critical of this ServerStatus.
143
+
144
+ 服务器运行Critical状态所有对象
145
+
146
+ :return: The critical of this ServerStatus.
147
+ :rtype: object
148
+ """
149
+ return self._critical
150
+
151
+ @critical.setter
152
+ def critical(self, critical):
153
+ r"""Sets the critical of this ServerStatus.
154
+
155
+ 服务器运行Critical状态所有对象
156
+
157
+ :param critical: The critical of this ServerStatus.
158
+ :type critical: object
159
+ """
160
+ self._critical = critical
161
+
162
+ @property
163
+ def health(self):
164
+ r"""Gets the health of this ServerStatus.
165
+
166
+ 服务器运行Health状态所有对象
167
+
168
+ :return: The health of this ServerStatus.
169
+ :rtype: object
170
+ """
171
+ return self._health
172
+
173
+ @health.setter
174
+ def health(self, health):
175
+ r"""Sets the health of this ServerStatus.
176
+
177
+ 服务器运行Health状态所有对象
178
+
179
+ :param health: The health of this ServerStatus.
180
+ :type health: object
181
+ """
182
+ self._health = health
183
+
184
+ @property
185
+ def unhealth(self):
186
+ r"""Gets the unhealth of this ServerStatus.
187
+
188
+ 服务器运行UnHealth状态所有对象
189
+
190
+ :return: The unhealth of this ServerStatus.
191
+ :rtype: object
192
+ """
193
+ return self._unhealth
194
+
195
+ @unhealth.setter
196
+ def unhealth(self, unhealth):
197
+ r"""Sets the unhealth of this ServerStatus.
198
+
199
+ 服务器运行UnHealth状态所有对象
200
+
201
+ :param unhealth: The unhealth of this ServerStatus.
202
+ :type unhealth: object
203
+ """
204
+ self._unhealth = unhealth
205
+
206
+ @property
207
+ def isolation(self):
208
+ r"""Gets the isolation of this ServerStatus.
209
+
210
+ 服务器运行Isolation状态所有对象
211
+
212
+ :return: The isolation of this ServerStatus.
213
+ :rtype: object
214
+ """
215
+ return self._isolation
216
+
217
+ @isolation.setter
218
+ def isolation(self, isolation):
219
+ r"""Sets the isolation of this ServerStatus.
220
+
221
+ 服务器运行Isolation状态所有对象
222
+
223
+ :param isolation: The isolation of this ServerStatus.
224
+ :type isolation: object
225
+ """
226
+ self._isolation = isolation
227
+
228
+ def to_dict(self):
229
+ result = {}
230
+
231
+ for attr, _ in self.openapi_types.items():
232
+ value = getattr(self, attr)
233
+ if isinstance(value, list):
234
+ result[attr] = list(map(
235
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
236
+ value
237
+ ))
238
+ elif hasattr(value, "to_dict"):
239
+ result[attr] = value.to_dict()
240
+ elif isinstance(value, dict):
241
+ result[attr] = dict(map(
242
+ lambda item: (item[0], item[1].to_dict())
243
+ if hasattr(item[1], "to_dict") else item,
244
+ value.items()
245
+ ))
246
+ else:
247
+ if attr in self.sensitive_list:
248
+ result[attr] = "****"
249
+ else:
250
+ result[attr] = value
251
+
252
+ return result
253
+
254
+ def to_str(self):
255
+ """Returns the string representation of the model"""
256
+ import simplejson as json
257
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
258
+
259
+ def __repr__(self):
260
+ """For `print`"""
261
+ return self.to_str()
262
+
263
+ def __eq__(self, other):
264
+ """Returns true if both objects are equal"""
265
+ if not isinstance(other, ServerStatus):
266
+ return False
267
+
268
+ return self.__dict__ == other.__dict__
269
+
270
+ def __ne__(self, other):
271
+ """Returns true if both objects are not equal"""
272
+ return not self == other
@@ -0,0 +1,108 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ServersResponsePhysicalServers:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ 'id': 'str'
19
+ }
20
+
21
+ attribute_map = {
22
+ 'id': 'id'
23
+ }
24
+
25
+ def __init__(self, id=None):
26
+ r"""ServersResponsePhysicalServers
27
+
28
+ The model defined in huaweicloud sdk
29
+
30
+ :param id: UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
31
+ :type id: str
32
+ """
33
+
34
+
35
+
36
+ self._id = None
37
+ self.discriminator = None
38
+
39
+ if id is not None:
40
+ self.id = id
41
+
42
+ @property
43
+ def id(self):
44
+ r"""Gets the id of this ServersResponsePhysicalServers.
45
+
46
+ UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
47
+
48
+ :return: The id of this ServersResponsePhysicalServers.
49
+ :rtype: str
50
+ """
51
+ return self._id
52
+
53
+ @id.setter
54
+ def id(self, id):
55
+ r"""Sets the id of this ServersResponsePhysicalServers.
56
+
57
+ UUID(Universally Unique Identifier)是一个 128 位的数字,通常以 32 个十六进制数字的形式表示,分为 5 组,用连字符分隔。具体格式如下: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 其中: 每个 x 是一个十六进制数字(0-9 或 a-f)。 5 组的长度分别是:8 位、4 位、4 位、4 位 和 12 位。 为了匹配这种格式的 UUID,可以使用以下正则表达式: regex ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
58
+
59
+ :param id: The id of this ServersResponsePhysicalServers.
60
+ :type id: str
61
+ """
62
+ self._id = id
63
+
64
+ def to_dict(self):
65
+ result = {}
66
+
67
+ for attr, _ in self.openapi_types.items():
68
+ value = getattr(self, attr)
69
+ if isinstance(value, list):
70
+ result[attr] = list(map(
71
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
72
+ value
73
+ ))
74
+ elif hasattr(value, "to_dict"):
75
+ result[attr] = value.to_dict()
76
+ elif isinstance(value, dict):
77
+ result[attr] = dict(map(
78
+ lambda item: (item[0], item[1].to_dict())
79
+ if hasattr(item[1], "to_dict") else item,
80
+ value.items()
81
+ ))
82
+ else:
83
+ if attr in self.sensitive_list:
84
+ result[attr] = "****"
85
+ else:
86
+ result[attr] = value
87
+
88
+ return result
89
+
90
+ def to_str(self):
91
+ """Returns the string representation of the model"""
92
+ import simplejson as json
93
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
94
+
95
+ def __repr__(self):
96
+ """For `print`"""
97
+ return self.to_str()
98
+
99
+ def __eq__(self, other):
100
+ """Returns true if both objects are equal"""
101
+ if not isinstance(other, ServersResponsePhysicalServers):
102
+ return False
103
+
104
+ return self.__dict__ == other.__dict__
105
+
106
+ def __ne__(self, other):
107
+ """Returns true if both objects are not equal"""
108
+ return not self == other
@@ -0,0 +1,77 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ShowAlarmSummaryRequest:
7
+
8
+ """
9
+ Attributes:
10
+ openapi_types (dict): The key is attribute name
11
+ and the value is attribute type.
12
+ attribute_map (dict): The key is attribute name
13
+ and the value is json key in definition.
14
+ """
15
+ sensitive_list = []
16
+
17
+ openapi_types = {
18
+ }
19
+
20
+ attribute_map = {
21
+ }
22
+
23
+ def __init__(self):
24
+ r"""ShowAlarmSummaryRequest
25
+
26
+ The model defined in huaweicloud sdk
27
+
28
+ """
29
+
30
+
31
+ self.discriminator = None
32
+
33
+ def to_dict(self):
34
+ result = {}
35
+
36
+ for attr, _ in self.openapi_types.items():
37
+ value = getattr(self, attr)
38
+ if isinstance(value, list):
39
+ result[attr] = list(map(
40
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
41
+ value
42
+ ))
43
+ elif hasattr(value, "to_dict"):
44
+ result[attr] = value.to_dict()
45
+ elif isinstance(value, dict):
46
+ result[attr] = dict(map(
47
+ lambda item: (item[0], item[1].to_dict())
48
+ if hasattr(item[1], "to_dict") else item,
49
+ value.items()
50
+ ))
51
+ else:
52
+ if attr in self.sensitive_list:
53
+ result[attr] = "****"
54
+ else:
55
+ result[attr] = value
56
+
57
+ return result
58
+
59
+ def to_str(self):
60
+ """Returns the string representation of the model"""
61
+ import simplejson as json
62
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
63
+
64
+ def __repr__(self):
65
+ """For `print`"""
66
+ return self.to_str()
67
+
68
+ def __eq__(self, other):
69
+ """Returns true if both objects are equal"""
70
+ if not isinstance(other, ShowAlarmSummaryRequest):
71
+ return False
72
+
73
+ return self.__dict__ == other.__dict__
74
+
75
+ def __ne__(self, other):
76
+ """Returns true if both objects are not equal"""
77
+ return not self == other
@@ -0,0 +1,199 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.sdk_response import SdkResponse
4
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
5
+
6
+
7
+ class ShowAlarmSummaryResponse(SdkResponse):
8
+
9
+ """
10
+ Attributes:
11
+ openapi_types (dict): The key is attribute name
12
+ and the value is attribute type.
13
+ attribute_map (dict): The key is attribute name
14
+ and the value is json key in definition.
15
+ """
16
+ sensitive_list = []
17
+
18
+ openapi_types = {
19
+ 'alarm_levels': 'list[AlarmLevelInfo]',
20
+ 'alarm_devices': 'list[AlarmDeviceInfo]',
21
+ 'alarm_hosts': 'list[AlarmHost]',
22
+ 'alarm_groups': 'list[AlarmGroup]'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'alarm_levels': 'alarm_levels',
27
+ 'alarm_devices': 'alarm_devices',
28
+ 'alarm_hosts': 'alarm_hosts',
29
+ 'alarm_groups': 'alarm_groups'
30
+ }
31
+
32
+ def __init__(self, alarm_levels=None, alarm_devices=None, alarm_hosts=None, alarm_groups=None):
33
+ r"""ShowAlarmSummaryResponse
34
+
35
+ The model defined in huaweicloud sdk
36
+
37
+ :param alarm_levels: 告警级别
38
+ :type alarm_levels: list[:class:`huaweicloudsdkclouddc.v1.AlarmLevelInfo`]
39
+ :param alarm_devices: 告警设备信息,包括设备类型及告警数量
40
+ :type alarm_devices: list[:class:`huaweicloudsdkclouddc.v1.AlarmDeviceInfo`]
41
+ :param alarm_hosts: 故障服务器Top10
42
+ :type alarm_hosts: list[:class:`huaweicloudsdkclouddc.v1.AlarmHost`]
43
+ :param alarm_groups: 告警分组
44
+ :type alarm_groups: list[:class:`huaweicloudsdkclouddc.v1.AlarmGroup`]
45
+ """
46
+
47
+ super().__init__()
48
+
49
+ self._alarm_levels = None
50
+ self._alarm_devices = None
51
+ self._alarm_hosts = None
52
+ self._alarm_groups = None
53
+ self.discriminator = None
54
+
55
+ if alarm_levels is not None:
56
+ self.alarm_levels = alarm_levels
57
+ if alarm_devices is not None:
58
+ self.alarm_devices = alarm_devices
59
+ if alarm_hosts is not None:
60
+ self.alarm_hosts = alarm_hosts
61
+ if alarm_groups is not None:
62
+ self.alarm_groups = alarm_groups
63
+
64
+ @property
65
+ def alarm_levels(self):
66
+ r"""Gets the alarm_levels of this ShowAlarmSummaryResponse.
67
+
68
+ 告警级别
69
+
70
+ :return: The alarm_levels of this ShowAlarmSummaryResponse.
71
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.AlarmLevelInfo`]
72
+ """
73
+ return self._alarm_levels
74
+
75
+ @alarm_levels.setter
76
+ def alarm_levels(self, alarm_levels):
77
+ r"""Sets the alarm_levels of this ShowAlarmSummaryResponse.
78
+
79
+ 告警级别
80
+
81
+ :param alarm_levels: The alarm_levels of this ShowAlarmSummaryResponse.
82
+ :type alarm_levels: list[:class:`huaweicloudsdkclouddc.v1.AlarmLevelInfo`]
83
+ """
84
+ self._alarm_levels = alarm_levels
85
+
86
+ @property
87
+ def alarm_devices(self):
88
+ r"""Gets the alarm_devices of this ShowAlarmSummaryResponse.
89
+
90
+ 告警设备信息,包括设备类型及告警数量
91
+
92
+ :return: The alarm_devices of this ShowAlarmSummaryResponse.
93
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.AlarmDeviceInfo`]
94
+ """
95
+ return self._alarm_devices
96
+
97
+ @alarm_devices.setter
98
+ def alarm_devices(self, alarm_devices):
99
+ r"""Sets the alarm_devices of this ShowAlarmSummaryResponse.
100
+
101
+ 告警设备信息,包括设备类型及告警数量
102
+
103
+ :param alarm_devices: The alarm_devices of this ShowAlarmSummaryResponse.
104
+ :type alarm_devices: list[:class:`huaweicloudsdkclouddc.v1.AlarmDeviceInfo`]
105
+ """
106
+ self._alarm_devices = alarm_devices
107
+
108
+ @property
109
+ def alarm_hosts(self):
110
+ r"""Gets the alarm_hosts of this ShowAlarmSummaryResponse.
111
+
112
+ 故障服务器Top10
113
+
114
+ :return: The alarm_hosts of this ShowAlarmSummaryResponse.
115
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.AlarmHost`]
116
+ """
117
+ return self._alarm_hosts
118
+
119
+ @alarm_hosts.setter
120
+ def alarm_hosts(self, alarm_hosts):
121
+ r"""Sets the alarm_hosts of this ShowAlarmSummaryResponse.
122
+
123
+ 故障服务器Top10
124
+
125
+ :param alarm_hosts: The alarm_hosts of this ShowAlarmSummaryResponse.
126
+ :type alarm_hosts: list[:class:`huaweicloudsdkclouddc.v1.AlarmHost`]
127
+ """
128
+ self._alarm_hosts = alarm_hosts
129
+
130
+ @property
131
+ def alarm_groups(self):
132
+ r"""Gets the alarm_groups of this ShowAlarmSummaryResponse.
133
+
134
+ 告警分组
135
+
136
+ :return: The alarm_groups of this ShowAlarmSummaryResponse.
137
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.AlarmGroup`]
138
+ """
139
+ return self._alarm_groups
140
+
141
+ @alarm_groups.setter
142
+ def alarm_groups(self, alarm_groups):
143
+ r"""Sets the alarm_groups of this ShowAlarmSummaryResponse.
144
+
145
+ 告警分组
146
+
147
+ :param alarm_groups: The alarm_groups of this ShowAlarmSummaryResponse.
148
+ :type alarm_groups: list[:class:`huaweicloudsdkclouddc.v1.AlarmGroup`]
149
+ """
150
+ self._alarm_groups = alarm_groups
151
+
152
+ def to_dict(self):
153
+ import warnings
154
+ warnings.warn("ShowAlarmSummaryResponse.to_dict() is deprecated and no longer maintained, "
155
+ "use to_json_object() to get the response content.", DeprecationWarning)
156
+ result = {}
157
+
158
+ for attr, _ in self.openapi_types.items():
159
+ value = getattr(self, attr)
160
+ if isinstance(value, list):
161
+ result[attr] = list(map(
162
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
163
+ value
164
+ ))
165
+ elif hasattr(value, "to_dict"):
166
+ result[attr] = value.to_dict()
167
+ elif isinstance(value, dict):
168
+ result[attr] = dict(map(
169
+ lambda item: (item[0], item[1].to_dict())
170
+ if hasattr(item[1], "to_dict") else item,
171
+ value.items()
172
+ ))
173
+ else:
174
+ if attr in self.sensitive_list:
175
+ result[attr] = "****"
176
+ else:
177
+ result[attr] = value
178
+
179
+ return result
180
+
181
+ def to_str(self):
182
+ """Returns the string representation of the model"""
183
+ import simplejson as json
184
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
185
+
186
+ def __repr__(self):
187
+ """For `print`"""
188
+ return self.to_str()
189
+
190
+ def __eq__(self, other):
191
+ """Returns true if both objects are equal"""
192
+ if not isinstance(other, ShowAlarmSummaryResponse):
193
+ return False
194
+
195
+ return self.__dict__ == other.__dict__
196
+
197
+ def __ne__(self, other):
198
+ """Returns true if both objects are not equal"""
199
+ return not self == other