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,89 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class InstanceState:
7
+ """
8
+ allowed enum values
9
+ """
10
+ PENDING = "pending"
11
+ RUNNING = "running"
12
+ STOPPING = "stopping"
13
+ STOPPED = "stopped"
14
+ REINSTALLING = "reinstalling"
15
+ SHUTTING_DOWN = "shutting-down"
16
+ TERMINATED = "terminated"
17
+ FAILED = "failed"
18
+ MODIFYIPING = "modifyIping"
19
+ SWITCH_INSTALLING = "switch-installing"
20
+ """
21
+ Attributes:
22
+ openapi_types (dict): The key is attribute name
23
+ and the value is attribute type.
24
+ attribute_map (dict): The key is attribute name
25
+ and the value is json key in definition.
26
+ """
27
+ sensitive_list = []
28
+
29
+ openapi_types = {
30
+ }
31
+
32
+ attribute_map = {
33
+ }
34
+
35
+ def __init__(self):
36
+ r"""InstanceState
37
+
38
+ The model defined in huaweicloud sdk
39
+
40
+ """
41
+
42
+
43
+ self.discriminator = None
44
+
45
+ def to_dict(self):
46
+ result = {}
47
+
48
+ for attr, _ in self.openapi_types.items():
49
+ value = getattr(self, attr)
50
+ if isinstance(value, list):
51
+ result[attr] = list(map(
52
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
53
+ value
54
+ ))
55
+ elif hasattr(value, "to_dict"):
56
+ result[attr] = value.to_dict()
57
+ elif isinstance(value, dict):
58
+ result[attr] = dict(map(
59
+ lambda item: (item[0], item[1].to_dict())
60
+ if hasattr(item[1], "to_dict") else item,
61
+ value.items()
62
+ ))
63
+ else:
64
+ if attr in self.sensitive_list:
65
+ result[attr] = "****"
66
+ else:
67
+ result[attr] = value
68
+
69
+ return result
70
+
71
+ def to_str(self):
72
+ """Returns the string representation of the model"""
73
+ import simplejson as json
74
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
75
+
76
+ def __repr__(self):
77
+ """For `print`"""
78
+ return self.to_str()
79
+
80
+ def __eq__(self, other):
81
+ """Returns true if both objects are equal"""
82
+ if not isinstance(other, InstanceState):
83
+ return False
84
+
85
+ return self.__dict__ == other.__dict__
86
+
87
+ def __ne__(self, other):
88
+ """Returns true if both objects are not equal"""
89
+ return not self == other
@@ -0,0 +1,340 @@
1
+ # coding: utf-8
2
+
3
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
4
+
5
+
6
+ class ListAlarmsRequest:
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
+ 'alarm_record_id': 'str',
19
+ 'alarm_status': 'str',
20
+ 'alarm_type': 'str',
21
+ 'resource_id': 'str',
22
+ 'alarm_level': 'int',
23
+ '_from': 'str',
24
+ 'to': 'str',
25
+ 'offset': 'int',
26
+ 'limit': 'int'
27
+ }
28
+
29
+ attribute_map = {
30
+ 'alarm_record_id': 'alarm_record_id',
31
+ 'alarm_status': 'alarm_status',
32
+ 'alarm_type': 'alarm_type',
33
+ 'resource_id': 'resource_id',
34
+ 'alarm_level': 'alarm_level',
35
+ '_from': 'from',
36
+ 'to': 'to',
37
+ 'offset': 'offset',
38
+ 'limit': 'limit'
39
+ }
40
+
41
+ def __init__(self, alarm_record_id=None, alarm_status=None, alarm_type=None, resource_id=None, alarm_level=None, _from=None, to=None, offset=None, limit=None):
42
+ r"""ListAlarmsRequest
43
+
44
+ The model defined in huaweicloud sdk
45
+
46
+ :param alarm_record_id: 告警记录ID,以ah开头,后跟22位由字母或数字组成的字符串
47
+ :type alarm_record_id: str
48
+ :param alarm_status: 告警状态,ok为正常,alarm为告警,invalid为已失效
49
+ :type alarm_status: str
50
+ :param alarm_type: 告警类型
51
+ :type alarm_type: str
52
+ :param resource_id: 告警资源ID,多值可以以逗号分割,
53
+ :type resource_id: str
54
+ :param alarm_level: 告警级别,1为紧急,2为重要,3为次要,4为提示
55
+ :type alarm_level: int
56
+ :param _from: 产生告警开始时间,from 必须小于 to。
57
+ :type _from: str
58
+ :param to: 产生告警结束时间,from 必须小于 to。
59
+ :type to: str
60
+ :param offset: 分页游标
61
+ :type offset: int
62
+ :param limit: 分页大小
63
+ :type limit: int
64
+ """
65
+
66
+
67
+
68
+ self._alarm_record_id = None
69
+ self._alarm_status = None
70
+ self._alarm_type = None
71
+ self._resource_id = None
72
+ self._alarm_level = None
73
+ self.__from = None
74
+ self._to = None
75
+ self._offset = None
76
+ self._limit = None
77
+ self.discriminator = None
78
+
79
+ if alarm_record_id is not None:
80
+ self.alarm_record_id = alarm_record_id
81
+ if alarm_status is not None:
82
+ self.alarm_status = alarm_status
83
+ if alarm_type is not None:
84
+ self.alarm_type = alarm_type
85
+ if resource_id is not None:
86
+ self.resource_id = resource_id
87
+ if alarm_level is not None:
88
+ self.alarm_level = alarm_level
89
+ if _from is not None:
90
+ self._from = _from
91
+ if to is not None:
92
+ self.to = to
93
+ if offset is not None:
94
+ self.offset = offset
95
+ if limit is not None:
96
+ self.limit = limit
97
+
98
+ @property
99
+ def alarm_record_id(self):
100
+ r"""Gets the alarm_record_id of this ListAlarmsRequest.
101
+
102
+ 告警记录ID,以ah开头,后跟22位由字母或数字组成的字符串
103
+
104
+ :return: The alarm_record_id of this ListAlarmsRequest.
105
+ :rtype: str
106
+ """
107
+ return self._alarm_record_id
108
+
109
+ @alarm_record_id.setter
110
+ def alarm_record_id(self, alarm_record_id):
111
+ r"""Sets the alarm_record_id of this ListAlarmsRequest.
112
+
113
+ 告警记录ID,以ah开头,后跟22位由字母或数字组成的字符串
114
+
115
+ :param alarm_record_id: The alarm_record_id of this ListAlarmsRequest.
116
+ :type alarm_record_id: str
117
+ """
118
+ self._alarm_record_id = alarm_record_id
119
+
120
+ @property
121
+ def alarm_status(self):
122
+ r"""Gets the alarm_status of this ListAlarmsRequest.
123
+
124
+ 告警状态,ok为正常,alarm为告警,invalid为已失效
125
+
126
+ :return: The alarm_status of this ListAlarmsRequest.
127
+ :rtype: str
128
+ """
129
+ return self._alarm_status
130
+
131
+ @alarm_status.setter
132
+ def alarm_status(self, alarm_status):
133
+ r"""Sets the alarm_status of this ListAlarmsRequest.
134
+
135
+ 告警状态,ok为正常,alarm为告警,invalid为已失效
136
+
137
+ :param alarm_status: The alarm_status of this ListAlarmsRequest.
138
+ :type alarm_status: str
139
+ """
140
+ self._alarm_status = alarm_status
141
+
142
+ @property
143
+ def alarm_type(self):
144
+ r"""Gets the alarm_type of this ListAlarmsRequest.
145
+
146
+ 告警类型
147
+
148
+ :return: The alarm_type of this ListAlarmsRequest.
149
+ :rtype: str
150
+ """
151
+ return self._alarm_type
152
+
153
+ @alarm_type.setter
154
+ def alarm_type(self, alarm_type):
155
+ r"""Sets the alarm_type of this ListAlarmsRequest.
156
+
157
+ 告警类型
158
+
159
+ :param alarm_type: The alarm_type of this ListAlarmsRequest.
160
+ :type alarm_type: str
161
+ """
162
+ self._alarm_type = alarm_type
163
+
164
+ @property
165
+ def resource_id(self):
166
+ r"""Gets the resource_id of this ListAlarmsRequest.
167
+
168
+ 告警资源ID,多值可以以逗号分割,
169
+
170
+ :return: The resource_id of this ListAlarmsRequest.
171
+ :rtype: str
172
+ """
173
+ return self._resource_id
174
+
175
+ @resource_id.setter
176
+ def resource_id(self, resource_id):
177
+ r"""Sets the resource_id of this ListAlarmsRequest.
178
+
179
+ 告警资源ID,多值可以以逗号分割,
180
+
181
+ :param resource_id: The resource_id of this ListAlarmsRequest.
182
+ :type resource_id: str
183
+ """
184
+ self._resource_id = resource_id
185
+
186
+ @property
187
+ def alarm_level(self):
188
+ r"""Gets the alarm_level of this ListAlarmsRequest.
189
+
190
+ 告警级别,1为紧急,2为重要,3为次要,4为提示
191
+
192
+ :return: The alarm_level of this ListAlarmsRequest.
193
+ :rtype: int
194
+ """
195
+ return self._alarm_level
196
+
197
+ @alarm_level.setter
198
+ def alarm_level(self, alarm_level):
199
+ r"""Sets the alarm_level of this ListAlarmsRequest.
200
+
201
+ 告警级别,1为紧急,2为重要,3为次要,4为提示
202
+
203
+ :param alarm_level: The alarm_level of this ListAlarmsRequest.
204
+ :type alarm_level: int
205
+ """
206
+ self._alarm_level = alarm_level
207
+
208
+ @property
209
+ def _from(self):
210
+ r"""Gets the _from of this ListAlarmsRequest.
211
+
212
+ 产生告警开始时间,from 必须小于 to。
213
+
214
+ :return: The _from of this ListAlarmsRequest.
215
+ :rtype: str
216
+ """
217
+ return self.__from
218
+
219
+ @_from.setter
220
+ def _from(self, _from):
221
+ r"""Sets the _from of this ListAlarmsRequest.
222
+
223
+ 产生告警开始时间,from 必须小于 to。
224
+
225
+ :param _from: The _from of this ListAlarmsRequest.
226
+ :type _from: str
227
+ """
228
+ self.__from = _from
229
+
230
+ @property
231
+ def to(self):
232
+ r"""Gets the to of this ListAlarmsRequest.
233
+
234
+ 产生告警结束时间,from 必须小于 to。
235
+
236
+ :return: The to of this ListAlarmsRequest.
237
+ :rtype: str
238
+ """
239
+ return self._to
240
+
241
+ @to.setter
242
+ def to(self, to):
243
+ r"""Sets the to of this ListAlarmsRequest.
244
+
245
+ 产生告警结束时间,from 必须小于 to。
246
+
247
+ :param to: The to of this ListAlarmsRequest.
248
+ :type to: str
249
+ """
250
+ self._to = to
251
+
252
+ @property
253
+ def offset(self):
254
+ r"""Gets the offset of this ListAlarmsRequest.
255
+
256
+ 分页游标
257
+
258
+ :return: The offset of this ListAlarmsRequest.
259
+ :rtype: int
260
+ """
261
+ return self._offset
262
+
263
+ @offset.setter
264
+ def offset(self, offset):
265
+ r"""Sets the offset of this ListAlarmsRequest.
266
+
267
+ 分页游标
268
+
269
+ :param offset: The offset of this ListAlarmsRequest.
270
+ :type offset: int
271
+ """
272
+ self._offset = offset
273
+
274
+ @property
275
+ def limit(self):
276
+ r"""Gets the limit of this ListAlarmsRequest.
277
+
278
+ 分页大小
279
+
280
+ :return: The limit of this ListAlarmsRequest.
281
+ :rtype: int
282
+ """
283
+ return self._limit
284
+
285
+ @limit.setter
286
+ def limit(self, limit):
287
+ r"""Sets the limit of this ListAlarmsRequest.
288
+
289
+ 分页大小
290
+
291
+ :param limit: The limit of this ListAlarmsRequest.
292
+ :type limit: int
293
+ """
294
+ self._limit = limit
295
+
296
+ def to_dict(self):
297
+ result = {}
298
+
299
+ for attr, _ in self.openapi_types.items():
300
+ value = getattr(self, attr)
301
+ if isinstance(value, list):
302
+ result[attr] = list(map(
303
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
304
+ value
305
+ ))
306
+ elif hasattr(value, "to_dict"):
307
+ result[attr] = value.to_dict()
308
+ elif isinstance(value, dict):
309
+ result[attr] = dict(map(
310
+ lambda item: (item[0], item[1].to_dict())
311
+ if hasattr(item[1], "to_dict") else item,
312
+ value.items()
313
+ ))
314
+ else:
315
+ if attr in self.sensitive_list:
316
+ result[attr] = "****"
317
+ else:
318
+ result[attr] = value
319
+
320
+ return result
321
+
322
+ def to_str(self):
323
+ """Returns the string representation of the model"""
324
+ import simplejson as json
325
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
326
+
327
+ def __repr__(self):
328
+ """For `print`"""
329
+ return self.to_str()
330
+
331
+ def __eq__(self, other):
332
+ """Returns true if both objects are equal"""
333
+ if not isinstance(other, ListAlarmsRequest):
334
+ return False
335
+
336
+ return self.__dict__ == other.__dict__
337
+
338
+ def __ne__(self, other):
339
+ """Returns true if both objects are not equal"""
340
+ return not self == other
@@ -0,0 +1,141 @@
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 ListAlarmsResponse(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
+ 'alarms': 'list[AlarmHistory]',
20
+ 'count': 'int'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'alarms': 'alarms',
25
+ 'count': 'count'
26
+ }
27
+
28
+ def __init__(self, alarms=None, count=None):
29
+ r"""ListAlarmsResponse
30
+
31
+ The model defined in huaweicloud sdk
32
+
33
+ :param alarms: 告警列表对象
34
+ :type alarms: list[:class:`huaweicloudsdkclouddc.v1.AlarmHistory`]
35
+ :param count: 告警总数
36
+ :type count: int
37
+ """
38
+
39
+ super().__init__()
40
+
41
+ self._alarms = None
42
+ self._count = None
43
+ self.discriminator = None
44
+
45
+ if alarms is not None:
46
+ self.alarms = alarms
47
+ if count is not None:
48
+ self.count = count
49
+
50
+ @property
51
+ def alarms(self):
52
+ r"""Gets the alarms of this ListAlarmsResponse.
53
+
54
+ 告警列表对象
55
+
56
+ :return: The alarms of this ListAlarmsResponse.
57
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.AlarmHistory`]
58
+ """
59
+ return self._alarms
60
+
61
+ @alarms.setter
62
+ def alarms(self, alarms):
63
+ r"""Sets the alarms of this ListAlarmsResponse.
64
+
65
+ 告警列表对象
66
+
67
+ :param alarms: The alarms of this ListAlarmsResponse.
68
+ :type alarms: list[:class:`huaweicloudsdkclouddc.v1.AlarmHistory`]
69
+ """
70
+ self._alarms = alarms
71
+
72
+ @property
73
+ def count(self):
74
+ r"""Gets the count of this ListAlarmsResponse.
75
+
76
+ 告警总数
77
+
78
+ :return: The count of this ListAlarmsResponse.
79
+ :rtype: int
80
+ """
81
+ return self._count
82
+
83
+ @count.setter
84
+ def count(self, count):
85
+ r"""Sets the count of this ListAlarmsResponse.
86
+
87
+ 告警总数
88
+
89
+ :param count: The count of this ListAlarmsResponse.
90
+ :type count: int
91
+ """
92
+ self._count = count
93
+
94
+ def to_dict(self):
95
+ import warnings
96
+ warnings.warn("ListAlarmsResponse.to_dict() is deprecated and no longer maintained, "
97
+ "use to_json_object() to get the response content.", DeprecationWarning)
98
+ result = {}
99
+
100
+ for attr, _ in self.openapi_types.items():
101
+ value = getattr(self, attr)
102
+ if isinstance(value, list):
103
+ result[attr] = list(map(
104
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
105
+ value
106
+ ))
107
+ elif hasattr(value, "to_dict"):
108
+ result[attr] = value.to_dict()
109
+ elif isinstance(value, dict):
110
+ result[attr] = dict(map(
111
+ lambda item: (item[0], item[1].to_dict())
112
+ if hasattr(item[1], "to_dict") else item,
113
+ value.items()
114
+ ))
115
+ else:
116
+ if attr in self.sensitive_list:
117
+ result[attr] = "****"
118
+ else:
119
+ result[attr] = value
120
+
121
+ return result
122
+
123
+ def to_str(self):
124
+ """Returns the string representation of the model"""
125
+ import simplejson as json
126
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
127
+
128
+ def __repr__(self):
129
+ """For `print`"""
130
+ return self.to_str()
131
+
132
+ def __eq__(self, other):
133
+ """Returns true if both objects are equal"""
134
+ if not isinstance(other, ListAlarmsResponse):
135
+ return False
136
+
137
+ return self.__dict__ == other.__dict__
138
+
139
+ def __ne__(self, other):
140
+ """Returns true if both objects are not equal"""
141
+ return not self == other