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

Files changed (56) hide show
  1. huaweicloudsdkdcs/v2/__init__.py +35 -0
  2. huaweicloudsdkdcs/v2/dcs_async_client.py +753 -28
  3. huaweicloudsdkdcs/v2/dcs_client.py +753 -28
  4. huaweicloudsdkdcs/v2/model/__init__.py +35 -0
  5. huaweicloudsdkdcs/v2/model/backup_files_body.py +2 -1
  6. huaweicloudsdkdcs/v2/model/bandwidth_auto_scaling_policy.py +257 -0
  7. huaweicloudsdkdcs/v2/model/bandwidth_info.py +61 -3
  8. huaweicloudsdkdcs/v2/model/batch_restart_migration_task_result.py +202 -0
  9. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_body.py +114 -0
  10. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_request.py +111 -0
  11. huaweicloudsdkdcs/v2/model/batch_restart_online_migration_tasks_response.py +116 -0
  12. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_body.py +144 -0
  13. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_request.py +139 -0
  14. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_resp.py +84 -0
  15. huaweicloudsdkdcs/v2/model/change_nodes_start_stop_status_response.py +112 -0
  16. huaweicloudsdkdcs/v2/model/client_info.py +4 -4
  17. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_request.py +114 -0
  18. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_resp.py +84 -0
  19. huaweicloudsdkdcs/v2/model/delete_instance_bandwidth_auto_scaling_policy_response.py +112 -0
  20. huaweicloudsdkdcs/v2/model/delete_public_ip_request.py +114 -0
  21. huaweicloudsdkdcs/v2/model/delete_public_ip_response.py +116 -0
  22. huaweicloudsdkdcs/v2/model/details_body.py +549 -27
  23. huaweicloudsdkdcs/v2/model/group_bandwidth_info.py +231 -0
  24. huaweicloudsdkdcs/v2/model/migration_task_list.py +366 -18
  25. huaweicloudsdkdcs/v2/model/resize_instance_body.py +3 -3
  26. huaweicloudsdkdcs/v2/model/show_bandwidths_request.py +114 -0
  27. huaweicloudsdkdcs/v2/model/show_bandwidths_response.py +203 -0
  28. huaweicloudsdkdcs/v2/model/show_instance_bandwidth_auto_scaling_policy_request.py +114 -0
  29. huaweicloudsdkdcs/v2/model/show_instance_bandwidth_auto_scaling_policy_response.py +258 -0
  30. huaweicloudsdkdcs/v2/model/show_instance_version_request.py +114 -0
  31. huaweicloudsdkdcs/v2/model/show_instance_version_response.py +261 -0
  32. huaweicloudsdkdcs/v2/model/show_migration_task_response.py +264 -3
  33. huaweicloudsdkdcs/v2/model/source_instance_body.py +206 -3
  34. huaweicloudsdkdcs/v2/model/stop_migration_task_response.py +264 -3
  35. huaweicloudsdkdcs/v2/model/stop_migration_task_result.py +61 -3
  36. huaweicloudsdkdcs/v2/model/target_instance_body.py +177 -3
  37. huaweicloudsdkdcs/v2/model/update_bandwidth_info_request.py +115 -0
  38. huaweicloudsdkdcs/v2/model/update_bandwidth_request.py +139 -0
  39. huaweicloudsdkdcs/v2/model/update_bandwidth_resp.py +84 -0
  40. huaweicloudsdkdcs/v2/model/update_bandwidth_response.py +112 -0
  41. huaweicloudsdkdcs/v2/model/update_group_bandwidth_info_request.py +142 -0
  42. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_request.py +139 -0
  43. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_request_body.py +257 -0
  44. huaweicloudsdkdcs/v2/model/update_instance_bandwidth_auto_scaling_policy_response.py +258 -0
  45. huaweicloudsdkdcs/v2/model/update_public_ip_request.py +139 -0
  46. huaweicloudsdkdcs/v2/model/update_public_ip_request_body.py +173 -0
  47. huaweicloudsdkdcs/v2/model/update_public_ip_response.py +116 -0
  48. huaweicloudsdkdcs/v2/model/upgrade_instance_minor_version_request.py +139 -0
  49. huaweicloudsdkdcs/v2/model/upgrade_instance_minor_version_response.py +116 -0
  50. huaweicloudsdkdcs/v2/model/upgrade_minor_version_request_body.py +144 -0
  51. huaweicloudsdkdcs/v2/region/dcs_region.py +6 -0
  52. {huaweicloudsdkdcs-3.1.85.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/METADATA +2 -2
  53. {huaweicloudsdkdcs-3.1.85.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/RECORD +56 -21
  54. {huaweicloudsdkdcs-3.1.85.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/WHEEL +1 -1
  55. {huaweicloudsdkdcs-3.1.85.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/LICENSE +0 -0
  56. {huaweicloudsdkdcs-3.1.85.dist-info → huaweicloudsdkdcs-3.1.132.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,202 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class BatchRestartMigrationTaskResult:
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
+ 'result': 'str',
21
+ 'task_id': 'str',
22
+ 'error_msg': 'str',
23
+ 'error_code': 'str'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'result': 'result',
28
+ 'task_id': 'task_id',
29
+ 'error_msg': 'error_msg',
30
+ 'error_code': 'error_code'
31
+ }
32
+
33
+ def __init__(self, result=None, task_id=None, error_msg=None, error_code=None):
34
+ """BatchRestartMigrationTaskResult
35
+
36
+ The model defined in huaweicloud sdk
37
+
38
+ :param result: 下发重启迁移任务操作结果。
39
+ :type result: str
40
+ :param task_id: 数据迁移任务ID。
41
+ :type task_id: str
42
+ :param error_msg: 错误信息
43
+ :type error_msg: str
44
+ :param error_code: 错误码
45
+ :type error_code: str
46
+ """
47
+
48
+
49
+
50
+ self._result = None
51
+ self._task_id = None
52
+ self._error_msg = None
53
+ self._error_code = None
54
+ self.discriminator = None
55
+
56
+ if result is not None:
57
+ self.result = result
58
+ if task_id is not None:
59
+ self.task_id = task_id
60
+ if error_msg is not None:
61
+ self.error_msg = error_msg
62
+ if error_code is not None:
63
+ self.error_code = error_code
64
+
65
+ @property
66
+ def result(self):
67
+ """Gets the result of this BatchRestartMigrationTaskResult.
68
+
69
+ 下发重启迁移任务操作结果。
70
+
71
+ :return: The result of this BatchRestartMigrationTaskResult.
72
+ :rtype: str
73
+ """
74
+ return self._result
75
+
76
+ @result.setter
77
+ def result(self, result):
78
+ """Sets the result of this BatchRestartMigrationTaskResult.
79
+
80
+ 下发重启迁移任务操作结果。
81
+
82
+ :param result: The result of this BatchRestartMigrationTaskResult.
83
+ :type result: str
84
+ """
85
+ self._result = result
86
+
87
+ @property
88
+ def task_id(self):
89
+ """Gets the task_id of this BatchRestartMigrationTaskResult.
90
+
91
+ 数据迁移任务ID。
92
+
93
+ :return: The task_id of this BatchRestartMigrationTaskResult.
94
+ :rtype: str
95
+ """
96
+ return self._task_id
97
+
98
+ @task_id.setter
99
+ def task_id(self, task_id):
100
+ """Sets the task_id of this BatchRestartMigrationTaskResult.
101
+
102
+ 数据迁移任务ID。
103
+
104
+ :param task_id: The task_id of this BatchRestartMigrationTaskResult.
105
+ :type task_id: str
106
+ """
107
+ self._task_id = task_id
108
+
109
+ @property
110
+ def error_msg(self):
111
+ """Gets the error_msg of this BatchRestartMigrationTaskResult.
112
+
113
+ 错误信息
114
+
115
+ :return: The error_msg of this BatchRestartMigrationTaskResult.
116
+ :rtype: str
117
+ """
118
+ return self._error_msg
119
+
120
+ @error_msg.setter
121
+ def error_msg(self, error_msg):
122
+ """Sets the error_msg of this BatchRestartMigrationTaskResult.
123
+
124
+ 错误信息
125
+
126
+ :param error_msg: The error_msg of this BatchRestartMigrationTaskResult.
127
+ :type error_msg: str
128
+ """
129
+ self._error_msg = error_msg
130
+
131
+ @property
132
+ def error_code(self):
133
+ """Gets the error_code of this BatchRestartMigrationTaskResult.
134
+
135
+ 错误码
136
+
137
+ :return: The error_code of this BatchRestartMigrationTaskResult.
138
+ :rtype: str
139
+ """
140
+ return self._error_code
141
+
142
+ @error_code.setter
143
+ def error_code(self, error_code):
144
+ """Sets the error_code of this BatchRestartMigrationTaskResult.
145
+
146
+ 错误码
147
+
148
+ :param error_code: The error_code of this BatchRestartMigrationTaskResult.
149
+ :type error_code: str
150
+ """
151
+ self._error_code = error_code
152
+
153
+ def to_dict(self):
154
+ """Returns the model properties as a dict"""
155
+ result = {}
156
+
157
+ for attr, _ in six.iteritems(self.openapi_types):
158
+ value = getattr(self, attr)
159
+ if isinstance(value, list):
160
+ result[attr] = list(map(
161
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
162
+ value
163
+ ))
164
+ elif hasattr(value, "to_dict"):
165
+ result[attr] = value.to_dict()
166
+ elif isinstance(value, dict):
167
+ result[attr] = dict(map(
168
+ lambda item: (item[0], item[1].to_dict())
169
+ if hasattr(item[1], "to_dict") else item,
170
+ value.items()
171
+ ))
172
+ else:
173
+ if attr in self.sensitive_list:
174
+ result[attr] = "****"
175
+ else:
176
+ result[attr] = value
177
+
178
+ return result
179
+
180
+ def to_str(self):
181
+ """Returns the string representation of the model"""
182
+ import simplejson as json
183
+ if six.PY2:
184
+ import sys
185
+ reload(sys)
186
+ sys.setdefaultencoding("utf-8")
187
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
188
+
189
+ def __repr__(self):
190
+ """For `print`"""
191
+ return self.to_str()
192
+
193
+ def __eq__(self, other):
194
+ """Returns true if both objects are equal"""
195
+ if not isinstance(other, BatchRestartMigrationTaskResult):
196
+ return False
197
+
198
+ return self.__dict__ == other.__dict__
199
+
200
+ def __ne__(self, other):
201
+ """Returns true if both objects are not equal"""
202
+ return not self == other
@@ -0,0 +1,114 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class BatchRestartOnlineMigrationTasksBody:
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
+ 'migration_tasks': 'list[str]'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'migration_tasks': 'migration_tasks'
25
+ }
26
+
27
+ def __init__(self, migration_tasks=None):
28
+ """BatchRestartOnlineMigrationTasksBody
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param migration_tasks: 数据迁移任务列表。
33
+ :type migration_tasks: list[str]
34
+ """
35
+
36
+
37
+
38
+ self._migration_tasks = None
39
+ self.discriminator = None
40
+
41
+ self.migration_tasks = migration_tasks
42
+
43
+ @property
44
+ def migration_tasks(self):
45
+ """Gets the migration_tasks of this BatchRestartOnlineMigrationTasksBody.
46
+
47
+ 数据迁移任务列表。
48
+
49
+ :return: The migration_tasks of this BatchRestartOnlineMigrationTasksBody.
50
+ :rtype: list[str]
51
+ """
52
+ return self._migration_tasks
53
+
54
+ @migration_tasks.setter
55
+ def migration_tasks(self, migration_tasks):
56
+ """Sets the migration_tasks of this BatchRestartOnlineMigrationTasksBody.
57
+
58
+ 数据迁移任务列表。
59
+
60
+ :param migration_tasks: The migration_tasks of this BatchRestartOnlineMigrationTasksBody.
61
+ :type migration_tasks: list[str]
62
+ """
63
+ self._migration_tasks = migration_tasks
64
+
65
+ def to_dict(self):
66
+ """Returns the model properties as a dict"""
67
+ result = {}
68
+
69
+ for attr, _ in six.iteritems(self.openapi_types):
70
+ value = getattr(self, attr)
71
+ if isinstance(value, list):
72
+ result[attr] = list(map(
73
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
74
+ value
75
+ ))
76
+ elif hasattr(value, "to_dict"):
77
+ result[attr] = value.to_dict()
78
+ elif isinstance(value, dict):
79
+ result[attr] = dict(map(
80
+ lambda item: (item[0], item[1].to_dict())
81
+ if hasattr(item[1], "to_dict") else item,
82
+ value.items()
83
+ ))
84
+ else:
85
+ if attr in self.sensitive_list:
86
+ result[attr] = "****"
87
+ else:
88
+ result[attr] = value
89
+
90
+ return result
91
+
92
+ def to_str(self):
93
+ """Returns the string representation of the model"""
94
+ import simplejson as json
95
+ if six.PY2:
96
+ import sys
97
+ reload(sys)
98
+ sys.setdefaultencoding("utf-8")
99
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
100
+
101
+ def __repr__(self):
102
+ """For `print`"""
103
+ return self.to_str()
104
+
105
+ def __eq__(self, other):
106
+ """Returns true if both objects are equal"""
107
+ if not isinstance(other, BatchRestartOnlineMigrationTasksBody):
108
+ return False
109
+
110
+ return self.__dict__ == other.__dict__
111
+
112
+ def __ne__(self, other):
113
+ """Returns true if both objects are not equal"""
114
+ 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 BatchRestartOnlineMigrationTasksRequest:
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': 'BatchRestartOnlineMigrationTasksBody'
21
+ }
22
+
23
+ attribute_map = {
24
+ 'body': 'body'
25
+ }
26
+
27
+ def __init__(self, body=None):
28
+ """BatchRestartOnlineMigrationTasksRequest
29
+
30
+ The model defined in huaweicloud sdk
31
+
32
+ :param body: Body of the BatchRestartOnlineMigrationTasksRequest
33
+ :type body: :class:`huaweicloudsdkdcs.v2.BatchRestartOnlineMigrationTasksBody`
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
+ """Gets the body of this BatchRestartOnlineMigrationTasksRequest.
47
+
48
+ :return: The body of this BatchRestartOnlineMigrationTasksRequest.
49
+ :rtype: :class:`huaweicloudsdkdcs.v2.BatchRestartOnlineMigrationTasksBody`
50
+ """
51
+ return self._body
52
+
53
+ @body.setter
54
+ def body(self, body):
55
+ """Sets the body of this BatchRestartOnlineMigrationTasksRequest.
56
+
57
+ :param body: The body of this BatchRestartOnlineMigrationTasksRequest.
58
+ :type body: :class:`huaweicloudsdkdcs.v2.BatchRestartOnlineMigrationTasksBody`
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, BatchRestartOnlineMigrationTasksRequest):
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 BatchRestartOnlineMigrationTasksResponse(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
+ 'migration_tasks': 'list[BatchRestartMigrationTaskResult]'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'migration_tasks': 'migration_tasks'
26
+ }
27
+
28
+ def __init__(self, migration_tasks=None):
29
+ """BatchRestartOnlineMigrationTasksResponse
30
+
31
+ The model defined in huaweicloud sdk
32
+
33
+ :param migration_tasks: 数据迁移任务列表。
34
+ :type migration_tasks: list[:class:`huaweicloudsdkdcs.v2.BatchRestartMigrationTaskResult`]
35
+ """
36
+
37
+ super(BatchRestartOnlineMigrationTasksResponse, self).__init__()
38
+
39
+ self._migration_tasks = None
40
+ self.discriminator = None
41
+
42
+ if migration_tasks is not None:
43
+ self.migration_tasks = migration_tasks
44
+
45
+ @property
46
+ def migration_tasks(self):
47
+ """Gets the migration_tasks of this BatchRestartOnlineMigrationTasksResponse.
48
+
49
+ 数据迁移任务列表。
50
+
51
+ :return: The migration_tasks of this BatchRestartOnlineMigrationTasksResponse.
52
+ :rtype: list[:class:`huaweicloudsdkdcs.v2.BatchRestartMigrationTaskResult`]
53
+ """
54
+ return self._migration_tasks
55
+
56
+ @migration_tasks.setter
57
+ def migration_tasks(self, migration_tasks):
58
+ """Sets the migration_tasks of this BatchRestartOnlineMigrationTasksResponse.
59
+
60
+ 数据迁移任务列表。
61
+
62
+ :param migration_tasks: The migration_tasks of this BatchRestartOnlineMigrationTasksResponse.
63
+ :type migration_tasks: list[:class:`huaweicloudsdkdcs.v2.BatchRestartMigrationTaskResult`]
64
+ """
65
+ self._migration_tasks = migration_tasks
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, BatchRestartOnlineMigrationTasksResponse):
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
@@ -0,0 +1,144 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class ChangeNodesStartStopStatusBody:
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
+ 'node_ids': 'list[str]',
21
+ 'action': 'str'
22
+ }
23
+
24
+ attribute_map = {
25
+ 'node_ids': 'node_ids',
26
+ 'action': 'action'
27
+ }
28
+
29
+ def __init__(self, node_ids=None, action=None):
30
+ """ChangeNodesStartStopStatusBody
31
+
32
+ The model defined in huaweicloud sdk
33
+
34
+ :param node_ids: 实例需要启停的节点ID列表。未配置该参数时,默认启停实例全部节点。
35
+ :type node_ids: list[str]
36
+ :param action: 对实例节点的操作: start:开启节点 stop:关闭节点
37
+ :type action: str
38
+ """
39
+
40
+
41
+
42
+ self._node_ids = None
43
+ self._action = None
44
+ self.discriminator = None
45
+
46
+ if node_ids is not None:
47
+ self.node_ids = node_ids
48
+ if action is not None:
49
+ self.action = action
50
+
51
+ @property
52
+ def node_ids(self):
53
+ """Gets the node_ids of this ChangeNodesStartStopStatusBody.
54
+
55
+ 实例需要启停的节点ID列表。未配置该参数时,默认启停实例全部节点。
56
+
57
+ :return: The node_ids of this ChangeNodesStartStopStatusBody.
58
+ :rtype: list[str]
59
+ """
60
+ return self._node_ids
61
+
62
+ @node_ids.setter
63
+ def node_ids(self, node_ids):
64
+ """Sets the node_ids of this ChangeNodesStartStopStatusBody.
65
+
66
+ 实例需要启停的节点ID列表。未配置该参数时,默认启停实例全部节点。
67
+
68
+ :param node_ids: The node_ids of this ChangeNodesStartStopStatusBody.
69
+ :type node_ids: list[str]
70
+ """
71
+ self._node_ids = node_ids
72
+
73
+ @property
74
+ def action(self):
75
+ """Gets the action of this ChangeNodesStartStopStatusBody.
76
+
77
+ 对实例节点的操作: start:开启节点 stop:关闭节点
78
+
79
+ :return: The action of this ChangeNodesStartStopStatusBody.
80
+ :rtype: str
81
+ """
82
+ return self._action
83
+
84
+ @action.setter
85
+ def action(self, action):
86
+ """Sets the action of this ChangeNodesStartStopStatusBody.
87
+
88
+ 对实例节点的操作: start:开启节点 stop:关闭节点
89
+
90
+ :param action: The action of this ChangeNodesStartStopStatusBody.
91
+ :type action: str
92
+ """
93
+ self._action = action
94
+
95
+ def to_dict(self):
96
+ """Returns the model properties as a dict"""
97
+ result = {}
98
+
99
+ for attr, _ in six.iteritems(self.openapi_types):
100
+ value = getattr(self, attr)
101
+ if isinstance(value, list):
102
+ result[attr] = list(map(
103
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
104
+ value
105
+ ))
106
+ elif hasattr(value, "to_dict"):
107
+ result[attr] = value.to_dict()
108
+ elif isinstance(value, dict):
109
+ result[attr] = dict(map(
110
+ lambda item: (item[0], item[1].to_dict())
111
+ if hasattr(item[1], "to_dict") else item,
112
+ value.items()
113
+ ))
114
+ else:
115
+ if attr in self.sensitive_list:
116
+ result[attr] = "****"
117
+ else:
118
+ result[attr] = value
119
+
120
+ return result
121
+
122
+ def to_str(self):
123
+ """Returns the string representation of the model"""
124
+ import simplejson as json
125
+ if six.PY2:
126
+ import sys
127
+ reload(sys)
128
+ sys.setdefaultencoding("utf-8")
129
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
130
+
131
+ def __repr__(self):
132
+ """For `print`"""
133
+ return self.to_str()
134
+
135
+ def __eq__(self, other):
136
+ """Returns true if both objects are equal"""
137
+ if not isinstance(other, ChangeNodesStartStopStatusBody):
138
+ return False
139
+
140
+ return self.__dict__ == other.__dict__
141
+
142
+ def __ne__(self, other):
143
+ """Returns true if both objects are not equal"""
144
+ return not self == other