huaweicloudsdkclouddc 3.1.160__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 huaweicloudsdkclouddc might be problematic. Click here for more details.

Files changed (142) hide show
  1. huaweicloudsdkclouddc/__init__.py +0 -0
  2. huaweicloudsdkclouddc/v1/__init__.py +138 -0
  3. huaweicloudsdkclouddc/v1/clouddc_async_client.py +2255 -0
  4. huaweicloudsdkclouddc/v1/clouddc_client.py +2252 -0
  5. huaweicloudsdkclouddc/v1/model/__init__.py +135 -0
  6. huaweicloudsdkclouddc/v1/model/alarm_daily_trend.py +173 -0
  7. huaweicloudsdkclouddc/v1/model/alarm_device_info.py +144 -0
  8. huaweicloudsdkclouddc/v1/model/alarm_group.py +173 -0
  9. huaweicloudsdkclouddc/v1/model/alarm_history.py +343 -0
  10. huaweicloudsdkclouddc/v1/model/alarm_host.py +173 -0
  11. huaweicloudsdkclouddc/v1/model/alarm_info.py +173 -0
  12. huaweicloudsdkclouddc/v1/model/alarm_level_info.py +144 -0
  13. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_request.py +139 -0
  14. huaweicloudsdkclouddc/v1/model/batch_create_irack_tags_response.py +85 -0
  15. huaweicloudsdkclouddc/v1/model/batch_create_tags_request.py +167 -0
  16. huaweicloudsdkclouddc/v1/model/batch_create_tags_response.py +85 -0
  17. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_request.py +139 -0
  18. huaweicloudsdkclouddc/v1/model/batch_delete_irack_tags_response.py +85 -0
  19. huaweicloudsdkclouddc/v1/model/batch_delete_options.py +115 -0
  20. huaweicloudsdkclouddc/v1/model/batch_delete_tags_request.py +167 -0
  21. huaweicloudsdkclouddc/v1/model/batch_delete_tags_response.py +85 -0
  22. huaweicloudsdkclouddc/v1/model/capacity_bytes.py +84 -0
  23. huaweicloudsdkclouddc/v1/model/change_instance_password_options.py +143 -0
  24. huaweicloudsdkclouddc/v1/model/change_instance_password_request.py +111 -0
  25. huaweicloudsdkclouddc/v1/model/change_instance_password_response.py +116 -0
  26. huaweicloudsdkclouddc/v1/model/change_server_power_state_request.py +111 -0
  27. huaweicloudsdkclouddc/v1/model/change_server_power_state_response.py +116 -0
  28. huaweicloudsdkclouddc/v1/model/create_instance_opitons.py +305 -0
  29. huaweicloudsdkclouddc/v1/model/create_instance_opitons_placement.py +115 -0
  30. huaweicloudsdkclouddc/v1/model/create_instance_request.py +111 -0
  31. huaweicloudsdkclouddc/v1/model/create_instance_response.py +116 -0
  32. huaweicloudsdkclouddc/v1/model/delete_instance_request.py +114 -0
  33. huaweicloudsdkclouddc/v1/model/delete_instance_response.py +112 -0
  34. huaweicloudsdkclouddc/v1/model/delete_instances_request.py +111 -0
  35. huaweicloudsdkclouddc/v1/model/delete_instances_response.py +116 -0
  36. huaweicloudsdkclouddc/v1/model/dimension.py +144 -0
  37. huaweicloudsdkclouddc/v1/model/download_server_logs_request.py +142 -0
  38. huaweicloudsdkclouddc/v1/model/download_server_logs_response.py +162 -0
  39. huaweicloudsdkclouddc/v1/model/drive.py +637 -0
  40. huaweicloudsdkclouddc/v1/model/error_status.py +170 -0
  41. huaweicloudsdkclouddc/v1/model/event_info.py +318 -0
  42. huaweicloudsdkclouddc/v1/model/export_server_logs_request.py +114 -0
  43. huaweicloudsdkclouddc/v1/model/export_server_logs_response.py +278 -0
  44. huaweicloudsdkclouddc/v1/model/fan.py +285 -0
  45. huaweicloudsdkclouddc/v1/model/fault_host_info.py +173 -0
  46. huaweicloudsdkclouddc/v1/model/firmware_details.py +202 -0
  47. huaweicloudsdkclouddc/v1/model/hardware_summary.py +199 -0
  48. huaweicloudsdkclouddc/v1/model/health.py +90 -0
  49. huaweicloudsdkclouddc/v1/model/i_dc.py +208 -0
  50. huaweicloudsdkclouddc/v1/model/i_rack.py +521 -0
  51. huaweicloudsdkclouddc/v1/model/i_rack_request.py +115 -0
  52. huaweicloudsdkclouddc/v1/model/image.py +170 -0
  53. huaweicloudsdkclouddc/v1/model/image_id.py +84 -0
  54. huaweicloudsdkclouddc/v1/model/instance.py +280 -0
  55. huaweicloudsdkclouddc/v1/model/instance_id.py +84 -0
  56. huaweicloudsdkclouddc/v1/model/instance_state.py +94 -0
  57. huaweicloudsdkclouddc/v1/model/list_alarms_request.py +347 -0
  58. huaweicloudsdkclouddc/v1/model/list_alarms_response.py +145 -0
  59. huaweicloudsdkclouddc/v1/model/list_events_request.py +260 -0
  60. huaweicloudsdkclouddc/v1/model/list_events_response.py +145 -0
  61. huaweicloudsdkclouddc/v1/model/list_i_dcs_request.py +201 -0
  62. huaweicloudsdkclouddc/v1/model/list_i_dcs_response.py +137 -0
  63. huaweicloudsdkclouddc/v1/model/list_i_rack_request.py +201 -0
  64. huaweicloudsdkclouddc/v1/model/list_i_rack_response.py +137 -0
  65. huaweicloudsdkclouddc/v1/model/list_instances_request.py +231 -0
  66. huaweicloudsdkclouddc/v1/model/list_instances_response.py +170 -0
  67. huaweicloudsdkclouddc/v1/model/list_servers_request.py +173 -0
  68. huaweicloudsdkclouddc/v1/model/list_servers_response.py +170 -0
  69. huaweicloudsdkclouddc/v1/model/location.py +173 -0
  70. huaweicloudsdkclouddc/v1/model/manage_state.py +91 -0
  71. huaweicloudsdkclouddc/v1/model/memory.py +579 -0
  72. huaweicloudsdkclouddc/v1/model/metric.py +144 -0
  73. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request.py +139 -0
  74. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body.py +144 -0
  75. huaweicloudsdkclouddc/v1/model/modify_instance_ip_request_body_nics.py +143 -0
  76. huaweicloudsdkclouddc/v1/model/modify_instance_ip_response.py +85 -0
  77. huaweicloudsdkclouddc/v1/model/network_adapter.py +492 -0
  78. huaweicloudsdkclouddc/v1/model/network_interface.py +143 -0
  79. huaweicloudsdkclouddc/v1/model/network_port.py +347 -0
  80. huaweicloudsdkclouddc/v1/model/page_info.py +173 -0
  81. huaweicloudsdkclouddc/v1/model/password.py +84 -0
  82. huaweicloudsdkclouddc/v1/model/physical_server.py +402 -0
  83. huaweicloudsdkclouddc/v1/model/power.py +488 -0
  84. huaweicloudsdkclouddc/v1/model/power_action.py +143 -0
  85. huaweicloudsdkclouddc/v1/model/power_state.py +91 -0
  86. huaweicloudsdkclouddc/v1/model/processors.py +608 -0
  87. huaweicloudsdkclouddc/v1/model/query_instance_response_body.py +499 -0
  88. huaweicloudsdkclouddc/v1/model/reinstall_os_options.py +172 -0
  89. huaweicloudsdkclouddc/v1/model/reinstall_os_request.py +111 -0
  90. huaweicloudsdkclouddc/v1/model/reinstall_os_response.py +116 -0
  91. huaweicloudsdkclouddc/v1/model/resource_name.py +84 -0
  92. huaweicloudsdkclouddc/v1/model/resource_tags.py +115 -0
  93. huaweicloudsdkclouddc/v1/model/resource_uuid.py +84 -0
  94. huaweicloudsdkclouddc/v1/model/run_instances_options.py +367 -0
  95. huaweicloudsdkclouddc/v1/model/run_instances_options_network_interfaces.py +114 -0
  96. huaweicloudsdkclouddc/v1/model/run_instances_options_placement.py +115 -0
  97. huaweicloudsdkclouddc/v1/model/run_instances_request.py +111 -0
  98. huaweicloudsdkclouddc/v1/model/run_instances_response.py +116 -0
  99. huaweicloudsdkclouddc/v1/model/sas_address.py +84 -0
  100. huaweicloudsdkclouddc/v1/model/server_instance_id_set.py +115 -0
  101. huaweicloudsdkclouddc/v1/model/server_power_status.py +171 -0
  102. huaweicloudsdkclouddc/v1/model/server_state.py +142 -0
  103. huaweicloudsdkclouddc/v1/model/server_status.py +279 -0
  104. huaweicloudsdkclouddc/v1/model/servers_response_physical_servers.py +115 -0
  105. huaweicloudsdkclouddc/v1/model/show_alarm_summary_request.py +84 -0
  106. huaweicloudsdkclouddc/v1/model/show_alarm_summary_response.py +203 -0
  107. huaweicloudsdkclouddc/v1/model/show_alarm_trend_request.py +142 -0
  108. huaweicloudsdkclouddc/v1/model/show_alarm_trend_response.py +145 -0
  109. huaweicloudsdkclouddc/v1/model/show_event_request.py +114 -0
  110. huaweicloudsdkclouddc/v1/model/show_event_response.py +377 -0
  111. huaweicloudsdkclouddc/v1/model/show_instance_status_request.py +114 -0
  112. huaweicloudsdkclouddc/v1/model/show_instance_status_response.py +137 -0
  113. huaweicloudsdkclouddc/v1/model/show_logs_export_status_request.py +142 -0
  114. huaweicloudsdkclouddc/v1/model/show_logs_export_status_response.py +203 -0
  115. huaweicloudsdkclouddc/v1/model/show_remote_console_request.py +114 -0
  116. huaweicloudsdkclouddc/v1/model/show_remote_console_response.py +116 -0
  117. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_request.py +114 -0
  118. huaweicloudsdkclouddc/v1/model/show_server_firmware_attributes_response.py +116 -0
  119. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_request.py +114 -0
  120. huaweicloudsdkclouddc/v1/model/show_server_hardware_attributes_response.py +286 -0
  121. huaweicloudsdkclouddc/v1/model/show_server_request.py +114 -0
  122. huaweicloudsdkclouddc/v1/model/show_server_response.py +411 -0
  123. huaweicloudsdkclouddc/v1/model/show_server_status_request.py +84 -0
  124. huaweicloudsdkclouddc/v1/model/show_server_status_response.py +137 -0
  125. huaweicloudsdkclouddc/v1/model/state.py +89 -0
  126. huaweicloudsdkclouddc/v1/model/status.py +136 -0
  127. huaweicloudsdkclouddc/v1/model/storage_controller.py +608 -0
  128. huaweicloudsdkclouddc/v1/model/tag.py +143 -0
  129. huaweicloudsdkclouddc/v1/model/update_i_dcs_request.py +111 -0
  130. huaweicloudsdkclouddc/v1/model/update_i_dcs_response.py +112 -0
  131. huaweicloudsdkclouddc/v1/model/update_i_rack_request.py +139 -0
  132. huaweicloudsdkclouddc/v1/model/update_i_rack_response.py +112 -0
  133. huaweicloudsdkclouddc/v1/model/user_data.py +84 -0
  134. huaweicloudsdkclouddc/v1/model/volume.py +459 -0
  135. huaweicloudsdkclouddc/v1/model/vpc_id.py +84 -0
  136. huaweicloudsdkclouddc/v1/region/__init__.py +0 -0
  137. huaweicloudsdkclouddc/v1/region/clouddc_region.py +40 -0
  138. huaweicloudsdkclouddc-3.1.160.dist-info/LICENSE +13 -0
  139. huaweicloudsdkclouddc-3.1.160.dist-info/METADATA +26 -0
  140. huaweicloudsdkclouddc-3.1.160.dist-info/RECORD +142 -0
  141. huaweicloudsdkclouddc-3.1.160.dist-info/WHEEL +5 -0
  142. huaweicloudsdkclouddc-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,305 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateInstanceOpitons:
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
+ 'name': 'str',
21
+ 'image_id': 'str',
22
+ 'vpc_id': 'str',
23
+ 'network_interfaces': 'list[NetworkInterface]',
24
+ 'password': 'str',
25
+ 'metadata': 'list[dict(str, str)]',
26
+ 'description': 'str',
27
+ 'placement': 'CreateInstanceOpitonsPlacement'
28
+ }
29
+
30
+ attribute_map = {
31
+ 'name': 'name',
32
+ 'image_id': 'image_id',
33
+ 'vpc_id': 'vpc_id',
34
+ 'network_interfaces': 'network_interfaces',
35
+ 'password': 'password',
36
+ 'metadata': 'metadata',
37
+ 'description': 'description',
38
+ 'placement': 'placement'
39
+ }
40
+
41
+ def __init__(self, name=None, image_id=None, vpc_id=None, network_interfaces=None, password=None, metadata=None, description=None, placement=None):
42
+ r"""CreateInstanceOpitons
43
+
44
+ The model defined in huaweicloud sdk
45
+
46
+ :param name: 设置实例主机名称。取值范围:只能由中文字符、英文字母(a~z,A~Z)、数字(0~9)、下划线(_)、中划线(-)、点(.)组成,且长度为[1-63]个字符。
47
+ :type name: str
48
+ :param image_id: 镜像ID
49
+ :type image_id: str
50
+ :param vpc_id: 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
51
+ :type vpc_id: str
52
+ :param network_interfaces: 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
53
+ :type network_interfaces: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
54
+ :param password: 设置实例的管理员账户初始登录密码,其中,Linux管理员账户为root,Windows管理员账户为Administrator。
55
+ :type password: str
56
+ :param metadata:
57
+ :type metadata: list[dict(str, str)]
58
+ :param description: 裸机实例的描述信息,默认为空字符串。
59
+ :type description: str
60
+ :param placement:
61
+ :type placement: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitonsPlacement`
62
+ """
63
+
64
+
65
+
66
+ self._name = None
67
+ self._image_id = None
68
+ self._vpc_id = None
69
+ self._network_interfaces = None
70
+ self._password = None
71
+ self._metadata = None
72
+ self._description = None
73
+ self._placement = None
74
+ self.discriminator = None
75
+
76
+ self.name = name
77
+ self.image_id = image_id
78
+ self.vpc_id = vpc_id
79
+ self.network_interfaces = network_interfaces
80
+ self.password = password
81
+ if metadata is not None:
82
+ self.metadata = metadata
83
+ if description is not None:
84
+ self.description = description
85
+ if placement is not None:
86
+ self.placement = placement
87
+
88
+ @property
89
+ def name(self):
90
+ r"""Gets the name of this CreateInstanceOpitons.
91
+
92
+ 设置实例主机名称。取值范围:只能由中文字符、英文字母(a~z,A~Z)、数字(0~9)、下划线(_)、中划线(-)、点(.)组成,且长度为[1-63]个字符。
93
+
94
+ :return: The name of this CreateInstanceOpitons.
95
+ :rtype: str
96
+ """
97
+ return self._name
98
+
99
+ @name.setter
100
+ def name(self, name):
101
+ r"""Sets the name of this CreateInstanceOpitons.
102
+
103
+ 设置实例主机名称。取值范围:只能由中文字符、英文字母(a~z,A~Z)、数字(0~9)、下划线(_)、中划线(-)、点(.)组成,且长度为[1-63]个字符。
104
+
105
+ :param name: The name of this CreateInstanceOpitons.
106
+ :type name: str
107
+ """
108
+ self._name = name
109
+
110
+ @property
111
+ def image_id(self):
112
+ r"""Gets the image_id of this CreateInstanceOpitons.
113
+
114
+ 镜像ID
115
+
116
+ :return: The image_id of this CreateInstanceOpitons.
117
+ :rtype: str
118
+ """
119
+ return self._image_id
120
+
121
+ @image_id.setter
122
+ def image_id(self, image_id):
123
+ r"""Sets the image_id of this CreateInstanceOpitons.
124
+
125
+ 镜像ID
126
+
127
+ :param image_id: The image_id of this CreateInstanceOpitons.
128
+ :type image_id: str
129
+ """
130
+ self._image_id = image_id
131
+
132
+ @property
133
+ def vpc_id(self):
134
+ r"""Gets the vpc_id of this CreateInstanceOpitons.
135
+
136
+ 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
137
+
138
+ :return: The vpc_id of this CreateInstanceOpitons.
139
+ :rtype: str
140
+ """
141
+ return self._vpc_id
142
+
143
+ @vpc_id.setter
144
+ def vpc_id(self, vpc_id):
145
+ r"""Sets the vpc_id of this CreateInstanceOpitons.
146
+
147
+ 创建网卡所属的 VPC ID,可通过 VPC API 查询:https://support.huaweicloud.com/api-vpc/vpc_api01_0003.html。
148
+
149
+ :param vpc_id: The vpc_id of this CreateInstanceOpitons.
150
+ :type vpc_id: str
151
+ """
152
+ self._vpc_id = vpc_id
153
+
154
+ @property
155
+ def network_interfaces(self):
156
+ r"""Gets the network_interfaces of this CreateInstanceOpitons.
157
+
158
+ 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
159
+
160
+ :return: The network_interfaces of this CreateInstanceOpitons.
161
+ :rtype: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
162
+ """
163
+ return self._network_interfaces
164
+
165
+ @network_interfaces.setter
166
+ def network_interfaces(self, network_interfaces):
167
+ r"""Sets the network_interfaces of this CreateInstanceOpitons.
168
+
169
+ 指定裸机实例的网卡信息。 约束: 一个裸机实例最多挂载2个网卡,参数中第一个网卡会作为裸机实例的主网卡。若用户指定了多组网卡参数,需保证各组参数都属于同一VPC。
170
+
171
+ :param network_interfaces: The network_interfaces of this CreateInstanceOpitons.
172
+ :type network_interfaces: list[:class:`huaweicloudsdkclouddc.v1.NetworkInterface`]
173
+ """
174
+ self._network_interfaces = network_interfaces
175
+
176
+ @property
177
+ def password(self):
178
+ r"""Gets the password of this CreateInstanceOpitons.
179
+
180
+ 设置实例的管理员账户初始登录密码,其中,Linux管理员账户为root,Windows管理员账户为Administrator。
181
+
182
+ :return: The password of this CreateInstanceOpitons.
183
+ :rtype: str
184
+ """
185
+ return self._password
186
+
187
+ @password.setter
188
+ def password(self, password):
189
+ r"""Sets the password of this CreateInstanceOpitons.
190
+
191
+ 设置实例的管理员账户初始登录密码,其中,Linux管理员账户为root,Windows管理员账户为Administrator。
192
+
193
+ :param password: The password of this CreateInstanceOpitons.
194
+ :type password: str
195
+ """
196
+ self._password = password
197
+
198
+ @property
199
+ def metadata(self):
200
+ r"""Gets the metadata of this CreateInstanceOpitons.
201
+
202
+ :return: The metadata of this CreateInstanceOpitons.
203
+ :rtype: list[dict(str, str)]
204
+ """
205
+ return self._metadata
206
+
207
+ @metadata.setter
208
+ def metadata(self, metadata):
209
+ r"""Sets the metadata of this CreateInstanceOpitons.
210
+
211
+ :param metadata: The metadata of this CreateInstanceOpitons.
212
+ :type metadata: list[dict(str, str)]
213
+ """
214
+ self._metadata = metadata
215
+
216
+ @property
217
+ def description(self):
218
+ r"""Gets the description of this CreateInstanceOpitons.
219
+
220
+ 裸机实例的描述信息,默认为空字符串。
221
+
222
+ :return: The description of this CreateInstanceOpitons.
223
+ :rtype: str
224
+ """
225
+ return self._description
226
+
227
+ @description.setter
228
+ def description(self, description):
229
+ r"""Sets the description of this CreateInstanceOpitons.
230
+
231
+ 裸机实例的描述信息,默认为空字符串。
232
+
233
+ :param description: The description of this CreateInstanceOpitons.
234
+ :type description: str
235
+ """
236
+ self._description = description
237
+
238
+ @property
239
+ def placement(self):
240
+ r"""Gets the placement of this CreateInstanceOpitons.
241
+
242
+ :return: The placement of this CreateInstanceOpitons.
243
+ :rtype: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitonsPlacement`
244
+ """
245
+ return self._placement
246
+
247
+ @placement.setter
248
+ def placement(self, placement):
249
+ r"""Sets the placement of this CreateInstanceOpitons.
250
+
251
+ :param placement: The placement of this CreateInstanceOpitons.
252
+ :type placement: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitonsPlacement`
253
+ """
254
+ self._placement = placement
255
+
256
+ def to_dict(self):
257
+ """Returns the model properties as a dict"""
258
+ result = {}
259
+
260
+ for attr, _ in six.iteritems(self.openapi_types):
261
+ value = getattr(self, attr)
262
+ if isinstance(value, list):
263
+ result[attr] = list(map(
264
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
265
+ value
266
+ ))
267
+ elif hasattr(value, "to_dict"):
268
+ result[attr] = value.to_dict()
269
+ elif isinstance(value, dict):
270
+ result[attr] = dict(map(
271
+ lambda item: (item[0], item[1].to_dict())
272
+ if hasattr(item[1], "to_dict") else item,
273
+ value.items()
274
+ ))
275
+ else:
276
+ if attr in self.sensitive_list:
277
+ result[attr] = "****"
278
+ else:
279
+ result[attr] = value
280
+
281
+ return result
282
+
283
+ def to_str(self):
284
+ """Returns the string representation of the model"""
285
+ import simplejson as json
286
+ if six.PY2:
287
+ import sys
288
+ reload(sys)
289
+ sys.setdefaultencoding("utf-8")
290
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
291
+
292
+ def __repr__(self):
293
+ """For `print`"""
294
+ return self.to_str()
295
+
296
+ def __eq__(self, other):
297
+ """Returns true if both objects are equal"""
298
+ if not isinstance(other, CreateInstanceOpitons):
299
+ return False
300
+
301
+ return self.__dict__ == other.__dict__
302
+
303
+ def __ne__(self, other):
304
+ """Returns true if both objects are not equal"""
305
+ return not self == other
@@ -0,0 +1,115 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateInstanceOpitonsPlacement:
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
+ 'server_id': 'str'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'server_id': 'server_id'
25
+ }
26
+
27
+ def __init__(self, server_id=None):
28
+ r"""CreateInstanceOpitonsPlacement
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param server_id: 指定服务器
33
+ :type server_id: str
34
+ """
35
+
36
+
37
+
38
+ self._server_id = None
39
+ self.discriminator = None
40
+
41
+ if server_id is not None:
42
+ self.server_id = server_id
43
+
44
+ @property
45
+ def server_id(self):
46
+ r"""Gets the server_id of this CreateInstanceOpitonsPlacement.
47
+
48
+ 指定服务器
49
+
50
+ :return: The server_id of this CreateInstanceOpitonsPlacement.
51
+ :rtype: str
52
+ """
53
+ return self._server_id
54
+
55
+ @server_id.setter
56
+ def server_id(self, server_id):
57
+ r"""Sets the server_id of this CreateInstanceOpitonsPlacement.
58
+
59
+ 指定服务器
60
+
61
+ :param server_id: The server_id of this CreateInstanceOpitonsPlacement.
62
+ :type server_id: str
63
+ """
64
+ self._server_id = server_id
65
+
66
+ def to_dict(self):
67
+ """Returns the model properties as a dict"""
68
+ result = {}
69
+
70
+ for attr, _ in six.iteritems(self.openapi_types):
71
+ value = getattr(self, attr)
72
+ if isinstance(value, list):
73
+ result[attr] = list(map(
74
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
75
+ value
76
+ ))
77
+ elif hasattr(value, "to_dict"):
78
+ result[attr] = value.to_dict()
79
+ elif isinstance(value, dict):
80
+ result[attr] = dict(map(
81
+ lambda item: (item[0], item[1].to_dict())
82
+ if hasattr(item[1], "to_dict") else item,
83
+ value.items()
84
+ ))
85
+ else:
86
+ if attr in self.sensitive_list:
87
+ result[attr] = "****"
88
+ else:
89
+ result[attr] = value
90
+
91
+ return result
92
+
93
+ def to_str(self):
94
+ """Returns the string representation of the model"""
95
+ import simplejson as json
96
+ if six.PY2:
97
+ import sys
98
+ reload(sys)
99
+ sys.setdefaultencoding("utf-8")
100
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
101
+
102
+ def __repr__(self):
103
+ """For `print`"""
104
+ return self.to_str()
105
+
106
+ def __eq__(self, other):
107
+ """Returns true if both objects are equal"""
108
+ if not isinstance(other, CreateInstanceOpitonsPlacement):
109
+ return False
110
+
111
+ return self.__dict__ == other.__dict__
112
+
113
+ def __ne__(self, other):
114
+ """Returns true if both objects are not equal"""
115
+ return not self == other
@@ -0,0 +1,111 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateInstanceRequest:
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
+ 'body': 'CreateInstanceOpitons'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ r"""CreateInstanceRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the CreateInstanceRequest
33
+ :type body: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitons`
34
+ """
35
+
36
+
37
+
38
+ self._body = None
39
+ self.discriminator = None
40
+
41
+ if body is not None:
42
+ self.body = body
43
+
44
+ @property
45
+ def body(self):
46
+ r"""Gets the body of this CreateInstanceRequest.
47
+
48
+ :return: The body of this CreateInstanceRequest.
49
+ :rtype: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitons`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ r"""Sets the body of this CreateInstanceRequest.
56
+
57
+ :param body: The body of this CreateInstanceRequest.
58
+ :type body: :class:`huaweicloudsdkclouddc.v1.CreateInstanceOpitons`
59
+ """
60
+ self._body = body
61
+
62
+ def to_dict(self):
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.openapi_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ if attr in self.sensitive_list:
83
+ result[attr] = "****"
84
+ else:
85
+ result[attr] = value
86
+
87
+ return result
88
+
89
+ def to_str(self):
90
+ """Returns the string representation of the model"""
91
+ import simplejson as json
92
+ if six.PY2:
93
+ import sys
94
+ reload(sys)
95
+ sys.setdefaultencoding("utf-8")
96
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
97
+
98
+ def __repr__(self):
99
+ """For `print`"""
100
+ return self.to_str()
101
+
102
+ def __eq__(self, other):
103
+ """Returns true if both objects are equal"""
104
+ if not isinstance(other, CreateInstanceRequest):
105
+ return False
106
+
107
+ return self.__dict__ == other.__dict__
108
+
109
+ def __ne__(self, other):
110
+ """Returns true if both objects are not equal"""
111
+ return not self == other
@@ -0,0 +1,116 @@
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 CreateInstanceResponse(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
+ 'instance_id': 'str'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'instance_id': 'instance_id'
26
+ }
27
+
28
+ def __init__(self, instance_id=None):
29
+ r"""CreateInstanceResponse
30
+
31
+ The model defined in huaweicloud sdk
32
+
33
+ :param instance_id: 实例id
34
+ :type instance_id: str
35
+ """
36
+
37
+ super(CreateInstanceResponse, self).__init__()
38
+
39
+ self._instance_id = None
40
+ self.discriminator = None
41
+
42
+ if instance_id is not None:
43
+ self.instance_id = instance_id
44
+
45
+ @property
46
+ def instance_id(self):
47
+ r"""Gets the instance_id of this CreateInstanceResponse.
48
+
49
+ 实例id
50
+
51
+ :return: The instance_id of this CreateInstanceResponse.
52
+ :rtype: str
53
+ """
54
+ return self._instance_id
55
+
56
+ @instance_id.setter
57
+ def instance_id(self, instance_id):
58
+ r"""Sets the instance_id of this CreateInstanceResponse.
59
+
60
+ 实例id
61
+
62
+ :param instance_id: The instance_id of this CreateInstanceResponse.
63
+ :type instance_id: str
64
+ """
65
+ self._instance_id = instance_id
66
+
67
+ def to_dict(self):
68
+ """Returns the model properties as a dict"""
69
+ result = {}
70
+
71
+ for attr, _ in six.iteritems(self.openapi_types):
72
+ value = getattr(self, attr)
73
+ if isinstance(value, list):
74
+ result[attr] = list(map(
75
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
76
+ value
77
+ ))
78
+ elif hasattr(value, "to_dict"):
79
+ result[attr] = value.to_dict()
80
+ elif isinstance(value, dict):
81
+ result[attr] = dict(map(
82
+ lambda item: (item[0], item[1].to_dict())
83
+ if hasattr(item[1], "to_dict") else item,
84
+ value.items()
85
+ ))
86
+ else:
87
+ if attr in self.sensitive_list:
88
+ result[attr] = "****"
89
+ else:
90
+ result[attr] = value
91
+
92
+ return result
93
+
94
+ def to_str(self):
95
+ """Returns the string representation of the model"""
96
+ import simplejson as json
97
+ if six.PY2:
98
+ import sys
99
+ reload(sys)
100
+ sys.setdefaultencoding("utf-8")
101
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
102
+
103
+ def __repr__(self):
104
+ """For `print`"""
105
+ return self.to_str()
106
+
107
+ def __eq__(self, other):
108
+ """Returns true if both objects are equal"""
109
+ if not isinstance(other, CreateInstanceResponse):
110
+ return False
111
+
112
+ return self.__dict__ == other.__dict__
113
+
114
+ def __ne__(self, other):
115
+ """Returns true if both objects are not equal"""
116
+ return not self == other