huaweicloudsdkdrs 3.1.76__py2.py3-none-any.whl → 3.1.77__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.
- huaweicloudsdkdrs/v3/__init__.py +1 -0
- huaweicloudsdkdrs/v3/model/__init__.py +1 -0
- huaweicloudsdkdrs/v3/model/customized_dns.py +170 -0
- huaweicloudsdkdrs/v3/model/test_end_point.py +28 -3
- huaweicloudsdkdrs/v5/__init__.py +30 -0
- huaweicloudsdkdrs/v5/drs_async_client.py +736 -94
- huaweicloudsdkdrs/v5/drs_client.py +736 -94
- huaweicloudsdkdrs/v5/model/__init__.py +30 -0
- huaweicloudsdkdrs/v5/model/action_req.py +3 -3
- huaweicloudsdkdrs/v5/model/base_endpoint.py +6 -6
- huaweicloudsdkdrs/v5/model/base_endpoint_config.py +32 -3
- huaweicloudsdkdrs/v5/model/batch_add_tag_req.py +114 -0
- huaweicloudsdkdrs/v5/model/batch_create_tags_request.py +196 -0
- huaweicloudsdkdrs/v5/model/batch_create_tags_response.py +116 -0
- huaweicloudsdkdrs/v5/model/batch_delete_tag_req.py +114 -0
- huaweicloudsdkdrs/v5/model/batch_delete_tags_request.py +196 -0
- huaweicloudsdkdrs/v5/model/batch_delete_tags_response.py +116 -0
- huaweicloudsdkdrs/v5/model/children_job_list_resp.py +3 -3
- huaweicloudsdkdrs/v5/model/count_instance_by_tags_request.py +168 -0
- huaweicloudsdkdrs/v5/model/count_instance_by_tags_response.py +116 -0
- huaweicloudsdkdrs/v5/model/customized_dns.py +170 -0
- huaweicloudsdkdrs/v5/model/job_base_info.py +3 -3
- huaweicloudsdkdrs/v5/model/job_endpoint_info.py +31 -6
- huaweicloudsdkdrs/v5/model/job_link_resp.py +3 -3
- huaweicloudsdkdrs/v5/model/job_list_resp.py +3 -3
- huaweicloudsdkdrs/v5/model/list_instance_by_tags_request.py +226 -0
- huaweicloudsdkdrs/v5/model/list_instance_by_tags_response.py +145 -0
- huaweicloudsdkdrs/v5/model/list_instance_tags_request.py +171 -0
- huaweicloudsdkdrs/v5/model/list_instance_tags_response.py +116 -0
- huaweicloudsdkdrs/v5/model/list_job_history_parameter.py +283 -0
- huaweicloudsdkdrs/v5/model/list_job_history_parameters_request.py +288 -0
- huaweicloudsdkdrs/v5/model/list_job_history_parameters_response.py +145 -0
- huaweicloudsdkdrs/v5/model/list_job_parameters_request.py +230 -0
- huaweicloudsdkdrs/v5/model/list_job_parameters_response.py +145 -0
- huaweicloudsdkdrs/v5/model/list_jobs_request.py +3 -3
- huaweicloudsdkdrs/v5/model/list_tags_request.py +143 -0
- huaweicloudsdkdrs/v5/model/list_tags_response.py +116 -0
- huaweicloudsdkdrs/v5/model/modify_parameter_req.py +114 -0
- huaweicloudsdkdrs/v5/model/parameter_config.py +312 -0
- huaweicloudsdkdrs/v5/model/parameter_info.py +142 -0
- huaweicloudsdkdrs/v5/model/query_instance_by_tag_req.py +173 -0
- huaweicloudsdkdrs/v5/model/resource_instance.py +202 -0
- huaweicloudsdkdrs/v5/model/resource_tag_info.py +144 -0
- huaweicloudsdkdrs/v5/model/tag.py +142 -0
- huaweicloudsdkdrs/v5/model/tag_match.py +142 -0
- huaweicloudsdkdrs/v5/model/update_job_configurations_request.py +168 -0
- huaweicloudsdkdrs/v5/model/update_job_configurations_response.py +116 -0
- {huaweicloudsdkdrs-3.1.76.dist-info → huaweicloudsdkdrs-3.1.77.dist-info}/METADATA +2 -2
- {huaweicloudsdkdrs-3.1.76.dist-info → huaweicloudsdkdrs-3.1.77.dist-info}/RECORD +52 -21
- {huaweicloudsdkdrs-3.1.76.dist-info → huaweicloudsdkdrs-3.1.77.dist-info}/LICENSE +0 -0
- {huaweicloudsdkdrs-3.1.76.dist-info → huaweicloudsdkdrs-3.1.77.dist-info}/WHEEL +0 -0
- {huaweicloudsdkdrs-3.1.76.dist-info → huaweicloudsdkdrs-3.1.77.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,230 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ListJobParametersRequest:
|
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
|
+
'job_id': 'str',
|
21
|
+
'x_language': 'str',
|
22
|
+
'offset': 'int',
|
23
|
+
'limit': 'int',
|
24
|
+
'name': 'str'
|
25
|
+
}
|
26
|
+
|
27
|
+
attribute_map = {
|
28
|
+
'job_id': 'job_id',
|
29
|
+
'x_language': 'X-Language',
|
30
|
+
'offset': 'offset',
|
31
|
+
'limit': 'limit',
|
32
|
+
'name': 'name'
|
33
|
+
}
|
34
|
+
|
35
|
+
def __init__(self, job_id=None, x_language=None, offset=None, limit=None, name=None):
|
36
|
+
"""ListJobParametersRequest
|
37
|
+
|
38
|
+
The model defined in huaweicloud sdk
|
39
|
+
|
40
|
+
:param job_id: 任务ID。
|
41
|
+
:type job_id: str
|
42
|
+
:param x_language: 请求语言类型。
|
43
|
+
:type x_language: str
|
44
|
+
:param offset: 偏移量,表示从此偏移量开始查询,offset 大于等于 0。默认为0
|
45
|
+
:type offset: int
|
46
|
+
:param limit: 每页显示的条目数量。默认为10,取值范围【1-1000】
|
47
|
+
:type limit: int
|
48
|
+
:param name: 根据参数名查询。
|
49
|
+
:type name: str
|
50
|
+
"""
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
self._job_id = None
|
55
|
+
self._x_language = None
|
56
|
+
self._offset = None
|
57
|
+
self._limit = None
|
58
|
+
self._name = None
|
59
|
+
self.discriminator = None
|
60
|
+
|
61
|
+
self.job_id = job_id
|
62
|
+
if x_language is not None:
|
63
|
+
self.x_language = x_language
|
64
|
+
if offset is not None:
|
65
|
+
self.offset = offset
|
66
|
+
if limit is not None:
|
67
|
+
self.limit = limit
|
68
|
+
if name is not None:
|
69
|
+
self.name = name
|
70
|
+
|
71
|
+
@property
|
72
|
+
def job_id(self):
|
73
|
+
"""Gets the job_id of this ListJobParametersRequest.
|
74
|
+
|
75
|
+
任务ID。
|
76
|
+
|
77
|
+
:return: The job_id of this ListJobParametersRequest.
|
78
|
+
:rtype: str
|
79
|
+
"""
|
80
|
+
return self._job_id
|
81
|
+
|
82
|
+
@job_id.setter
|
83
|
+
def job_id(self, job_id):
|
84
|
+
"""Sets the job_id of this ListJobParametersRequest.
|
85
|
+
|
86
|
+
任务ID。
|
87
|
+
|
88
|
+
:param job_id: The job_id of this ListJobParametersRequest.
|
89
|
+
:type job_id: str
|
90
|
+
"""
|
91
|
+
self._job_id = job_id
|
92
|
+
|
93
|
+
@property
|
94
|
+
def x_language(self):
|
95
|
+
"""Gets the x_language of this ListJobParametersRequest.
|
96
|
+
|
97
|
+
请求语言类型。
|
98
|
+
|
99
|
+
:return: The x_language of this ListJobParametersRequest.
|
100
|
+
:rtype: str
|
101
|
+
"""
|
102
|
+
return self._x_language
|
103
|
+
|
104
|
+
@x_language.setter
|
105
|
+
def x_language(self, x_language):
|
106
|
+
"""Sets the x_language of this ListJobParametersRequest.
|
107
|
+
|
108
|
+
请求语言类型。
|
109
|
+
|
110
|
+
:param x_language: The x_language of this ListJobParametersRequest.
|
111
|
+
:type x_language: str
|
112
|
+
"""
|
113
|
+
self._x_language = x_language
|
114
|
+
|
115
|
+
@property
|
116
|
+
def offset(self):
|
117
|
+
"""Gets the offset of this ListJobParametersRequest.
|
118
|
+
|
119
|
+
偏移量,表示从此偏移量开始查询,offset 大于等于 0。默认为0
|
120
|
+
|
121
|
+
:return: The offset of this ListJobParametersRequest.
|
122
|
+
:rtype: int
|
123
|
+
"""
|
124
|
+
return self._offset
|
125
|
+
|
126
|
+
@offset.setter
|
127
|
+
def offset(self, offset):
|
128
|
+
"""Sets the offset of this ListJobParametersRequest.
|
129
|
+
|
130
|
+
偏移量,表示从此偏移量开始查询,offset 大于等于 0。默认为0
|
131
|
+
|
132
|
+
:param offset: The offset of this ListJobParametersRequest.
|
133
|
+
:type offset: int
|
134
|
+
"""
|
135
|
+
self._offset = offset
|
136
|
+
|
137
|
+
@property
|
138
|
+
def limit(self):
|
139
|
+
"""Gets the limit of this ListJobParametersRequest.
|
140
|
+
|
141
|
+
每页显示的条目数量。默认为10,取值范围【1-1000】
|
142
|
+
|
143
|
+
:return: The limit of this ListJobParametersRequest.
|
144
|
+
:rtype: int
|
145
|
+
"""
|
146
|
+
return self._limit
|
147
|
+
|
148
|
+
@limit.setter
|
149
|
+
def limit(self, limit):
|
150
|
+
"""Sets the limit of this ListJobParametersRequest.
|
151
|
+
|
152
|
+
每页显示的条目数量。默认为10,取值范围【1-1000】
|
153
|
+
|
154
|
+
:param limit: The limit of this ListJobParametersRequest.
|
155
|
+
:type limit: int
|
156
|
+
"""
|
157
|
+
self._limit = limit
|
158
|
+
|
159
|
+
@property
|
160
|
+
def name(self):
|
161
|
+
"""Gets the name of this ListJobParametersRequest.
|
162
|
+
|
163
|
+
根据参数名查询。
|
164
|
+
|
165
|
+
:return: The name of this ListJobParametersRequest.
|
166
|
+
:rtype: str
|
167
|
+
"""
|
168
|
+
return self._name
|
169
|
+
|
170
|
+
@name.setter
|
171
|
+
def name(self, name):
|
172
|
+
"""Sets the name of this ListJobParametersRequest.
|
173
|
+
|
174
|
+
根据参数名查询。
|
175
|
+
|
176
|
+
:param name: The name of this ListJobParametersRequest.
|
177
|
+
:type name: str
|
178
|
+
"""
|
179
|
+
self._name = name
|
180
|
+
|
181
|
+
def to_dict(self):
|
182
|
+
"""Returns the model properties as a dict"""
|
183
|
+
result = {}
|
184
|
+
|
185
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
186
|
+
value = getattr(self, attr)
|
187
|
+
if isinstance(value, list):
|
188
|
+
result[attr] = list(map(
|
189
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
190
|
+
value
|
191
|
+
))
|
192
|
+
elif hasattr(value, "to_dict"):
|
193
|
+
result[attr] = value.to_dict()
|
194
|
+
elif isinstance(value, dict):
|
195
|
+
result[attr] = dict(map(
|
196
|
+
lambda item: (item[0], item[1].to_dict())
|
197
|
+
if hasattr(item[1], "to_dict") else item,
|
198
|
+
value.items()
|
199
|
+
))
|
200
|
+
else:
|
201
|
+
if attr in self.sensitive_list:
|
202
|
+
result[attr] = "****"
|
203
|
+
else:
|
204
|
+
result[attr] = value
|
205
|
+
|
206
|
+
return result
|
207
|
+
|
208
|
+
def to_str(self):
|
209
|
+
"""Returns the string representation of the model"""
|
210
|
+
import simplejson as json
|
211
|
+
if six.PY2:
|
212
|
+
import sys
|
213
|
+
reload(sys)
|
214
|
+
sys.setdefaultencoding("utf-8")
|
215
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
216
|
+
|
217
|
+
def __repr__(self):
|
218
|
+
"""For `print`"""
|
219
|
+
return self.to_str()
|
220
|
+
|
221
|
+
def __eq__(self, other):
|
222
|
+
"""Returns true if both objects are equal"""
|
223
|
+
if not isinstance(other, ListJobParametersRequest):
|
224
|
+
return False
|
225
|
+
|
226
|
+
return self.__dict__ == other.__dict__
|
227
|
+
|
228
|
+
def __ne__(self, other):
|
229
|
+
"""Returns true if both objects are not equal"""
|
230
|
+
return not self == other
|
@@ -0,0 +1,145 @@
|
|
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 ListJobParametersResponse(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
|
+
'count': 'int',
|
22
|
+
'parameter_config_list': 'list[ParameterConfig]'
|
23
|
+
}
|
24
|
+
|
25
|
+
attribute_map = {
|
26
|
+
'count': 'count',
|
27
|
+
'parameter_config_list': 'parameter_config_list'
|
28
|
+
}
|
29
|
+
|
30
|
+
def __init__(self, count=None, parameter_config_list=None):
|
31
|
+
"""ListJobParametersResponse
|
32
|
+
|
33
|
+
The model defined in huaweicloud sdk
|
34
|
+
|
35
|
+
:param count: 总数
|
36
|
+
:type count: int
|
37
|
+
:param parameter_config_list: 任务参数列表
|
38
|
+
:type parameter_config_list: list[:class:`huaweicloudsdkdrs.v5.ParameterConfig`]
|
39
|
+
"""
|
40
|
+
|
41
|
+
super(ListJobParametersResponse, self).__init__()
|
42
|
+
|
43
|
+
self._count = None
|
44
|
+
self._parameter_config_list = None
|
45
|
+
self.discriminator = None
|
46
|
+
|
47
|
+
if count is not None:
|
48
|
+
self.count = count
|
49
|
+
if parameter_config_list is not None:
|
50
|
+
self.parameter_config_list = parameter_config_list
|
51
|
+
|
52
|
+
@property
|
53
|
+
def count(self):
|
54
|
+
"""Gets the count of this ListJobParametersResponse.
|
55
|
+
|
56
|
+
总数
|
57
|
+
|
58
|
+
:return: The count of this ListJobParametersResponse.
|
59
|
+
:rtype: int
|
60
|
+
"""
|
61
|
+
return self._count
|
62
|
+
|
63
|
+
@count.setter
|
64
|
+
def count(self, count):
|
65
|
+
"""Sets the count of this ListJobParametersResponse.
|
66
|
+
|
67
|
+
总数
|
68
|
+
|
69
|
+
:param count: The count of this ListJobParametersResponse.
|
70
|
+
:type count: int
|
71
|
+
"""
|
72
|
+
self._count = count
|
73
|
+
|
74
|
+
@property
|
75
|
+
def parameter_config_list(self):
|
76
|
+
"""Gets the parameter_config_list of this ListJobParametersResponse.
|
77
|
+
|
78
|
+
任务参数列表
|
79
|
+
|
80
|
+
:return: The parameter_config_list of this ListJobParametersResponse.
|
81
|
+
:rtype: list[:class:`huaweicloudsdkdrs.v5.ParameterConfig`]
|
82
|
+
"""
|
83
|
+
return self._parameter_config_list
|
84
|
+
|
85
|
+
@parameter_config_list.setter
|
86
|
+
def parameter_config_list(self, parameter_config_list):
|
87
|
+
"""Sets the parameter_config_list of this ListJobParametersResponse.
|
88
|
+
|
89
|
+
任务参数列表
|
90
|
+
|
91
|
+
:param parameter_config_list: The parameter_config_list of this ListJobParametersResponse.
|
92
|
+
:type parameter_config_list: list[:class:`huaweicloudsdkdrs.v5.ParameterConfig`]
|
93
|
+
"""
|
94
|
+
self._parameter_config_list = parameter_config_list
|
95
|
+
|
96
|
+
def to_dict(self):
|
97
|
+
"""Returns the model properties as a dict"""
|
98
|
+
result = {}
|
99
|
+
|
100
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
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
|
+
if six.PY2:
|
127
|
+
import sys
|
128
|
+
reload(sys)
|
129
|
+
sys.setdefaultencoding("utf-8")
|
130
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
131
|
+
|
132
|
+
def __repr__(self):
|
133
|
+
"""For `print`"""
|
134
|
+
return self.to_str()
|
135
|
+
|
136
|
+
def __eq__(self, other):
|
137
|
+
"""Returns true if both objects are equal"""
|
138
|
+
if not isinstance(other, ListJobParametersResponse):
|
139
|
+
return False
|
140
|
+
|
141
|
+
return self.__dict__ == other.__dict__
|
142
|
+
|
143
|
+
def __ne__(self, other):
|
144
|
+
"""Returns true if both objects are not equal"""
|
145
|
+
return not self == other
|
@@ -61,7 +61,7 @@ class ListJobsRequest:
|
|
61
61
|
:type name: str
|
62
62
|
:param status: 任务状态。取值: - CREATING:创建中。 - CREATE_FAILED:创建失败。 - CONFIGURATION:配置中。 - STARTJOBING:启动中。 - WAITING_FOR_START:等待启动中。 - START_JOB_FAILED:任务启动失败。 - FULL_TRANSFER_STARTED:全量迁移中,灾备场景为初始化。 - FULL_TRANSFER_FAILED:全量迁移失败,灾备场景为初始化失败。 - FULL_TRANSFER_COMPLETE:全量迁移完成,灾备场景为初始化完成。 - INCRE_TRANSFER_STARTED:增量迁移中,灾备场景为灾备中。 - INCRE_TRANSFER_FAILED:增量迁移失败,灾备场景为灾备异常。 - RELEASE_RESOURCE_STARTED:结束任务中。 - RELEASE_RESOURCE_FAILED:结束任务失败。 - RELEASE_RESOURCE_COMPLETE:已结束。 - CHANGE_JOB_STARTED:任务变更中。 - CHANGE_JOB_FAILED:任务变更失败。 - CHILD_TRANSFER_STARTING:子任务启动中。 - CHILD_TRANSFER_STARTED:子任务迁移中。 - CHILD_TRANSFER_COMPLETE:子任务迁移完成。 - CHILD_TRANSFER_FAILED:子任务迁移失败。 - RELEASE_CHILD_TRANSFER_STARTED:子任务结束中。 - RELEASE_CHILD_TRANSFER_COMPLETE:子任务已结束。 其中,异常状态可单独查询,也可以通过以下方式查询全部异常任务: CREATE_FAILED,START_JOB_FAILED,FULL_TRANSFER_FAILED,INCRE_TRANSFER_FAILED,RELEASE_RESOURCE_FAILED,CHANGE_JOB_FAILED,CHILD_TRANSFER_FAILED
|
63
63
|
:type status: str
|
64
|
-
:param engine_type: 引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。
|
64
|
+
:param engine_type: 引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。 - redis-to-gaussredis:Redis同步到GeminiDB Redis,实时迁移场景使用。 - rediscluster-to-gaussredis:Redis集群同步到GeminiDB Redis,实时迁移场景使用。
|
65
65
|
:type engine_type: str
|
66
66
|
:param net_type: 网络类型。取值: - eip:公网网络。 - vpc:VPC网络。 - vpn:VPN、专线网络。
|
67
67
|
:type net_type: str
|
@@ -216,7 +216,7 @@ class ListJobsRequest:
|
|
216
216
|
def engine_type(self):
|
217
217
|
"""Gets the engine_type of this ListJobsRequest.
|
218
218
|
|
219
|
-
引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。
|
219
|
+
引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。 - redis-to-gaussredis:Redis同步到GeminiDB Redis,实时迁移场景使用。 - rediscluster-to-gaussredis:Redis集群同步到GeminiDB Redis,实时迁移场景使用。
|
220
220
|
|
221
221
|
:return: The engine_type of this ListJobsRequest.
|
222
222
|
:rtype: str
|
@@ -227,7 +227,7 @@ class ListJobsRequest:
|
|
227
227
|
def engine_type(self, engine_type):
|
228
228
|
"""Sets the engine_type of this ListJobsRequest.
|
229
229
|
|
230
|
-
引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。
|
230
|
+
引擎类型。取值: - oracle-to-gaussdbv5:Oracle同步到GaussDB分布式版,实时同步场景使用。 - redis-to-gaussredis:Redis同步到GeminiDB Redis,实时迁移场景使用。 - rediscluster-to-gaussredis:Redis集群同步到GeminiDB Redis,实时迁移场景使用。
|
231
231
|
|
232
232
|
:param engine_type: The engine_type of this ListJobsRequest.
|
233
233
|
:type engine_type: str
|
@@ -0,0 +1,143 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class ListTagsRequest:
|
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
|
+
'resource_type': 'str',
|
21
|
+
'x_language': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'resource_type': 'resource_type',
|
26
|
+
'x_language': 'X-Language'
|
27
|
+
}
|
28
|
+
|
29
|
+
def __init__(self, resource_type=None, x_language=None):
|
30
|
+
"""ListTagsRequest
|
31
|
+
|
32
|
+
The model defined in huaweicloud sdk
|
33
|
+
|
34
|
+
:param resource_type: 资源类型。 - migration:实时迁移 - sync:实时同步 - cloudDataGuard:实时灾备 - subscription:数据订阅 - backupMigration:备份迁移 - replay:录制回放
|
35
|
+
:type resource_type: str
|
36
|
+
:param x_language: 请求语言类型。
|
37
|
+
:type x_language: str
|
38
|
+
"""
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
self._resource_type = None
|
43
|
+
self._x_language = None
|
44
|
+
self.discriminator = None
|
45
|
+
|
46
|
+
self.resource_type = resource_type
|
47
|
+
if x_language is not None:
|
48
|
+
self.x_language = x_language
|
49
|
+
|
50
|
+
@property
|
51
|
+
def resource_type(self):
|
52
|
+
"""Gets the resource_type of this ListTagsRequest.
|
53
|
+
|
54
|
+
资源类型。 - migration:实时迁移 - sync:实时同步 - cloudDataGuard:实时灾备 - subscription:数据订阅 - backupMigration:备份迁移 - replay:录制回放
|
55
|
+
|
56
|
+
:return: The resource_type of this ListTagsRequest.
|
57
|
+
:rtype: str
|
58
|
+
"""
|
59
|
+
return self._resource_type
|
60
|
+
|
61
|
+
@resource_type.setter
|
62
|
+
def resource_type(self, resource_type):
|
63
|
+
"""Sets the resource_type of this ListTagsRequest.
|
64
|
+
|
65
|
+
资源类型。 - migration:实时迁移 - sync:实时同步 - cloudDataGuard:实时灾备 - subscription:数据订阅 - backupMigration:备份迁移 - replay:录制回放
|
66
|
+
|
67
|
+
:param resource_type: The resource_type of this ListTagsRequest.
|
68
|
+
:type resource_type: str
|
69
|
+
"""
|
70
|
+
self._resource_type = resource_type
|
71
|
+
|
72
|
+
@property
|
73
|
+
def x_language(self):
|
74
|
+
"""Gets the x_language of this ListTagsRequest.
|
75
|
+
|
76
|
+
请求语言类型。
|
77
|
+
|
78
|
+
:return: The x_language of this ListTagsRequest.
|
79
|
+
:rtype: str
|
80
|
+
"""
|
81
|
+
return self._x_language
|
82
|
+
|
83
|
+
@x_language.setter
|
84
|
+
def x_language(self, x_language):
|
85
|
+
"""Sets the x_language of this ListTagsRequest.
|
86
|
+
|
87
|
+
请求语言类型。
|
88
|
+
|
89
|
+
:param x_language: The x_language of this ListTagsRequest.
|
90
|
+
:type x_language: str
|
91
|
+
"""
|
92
|
+
self._x_language = x_language
|
93
|
+
|
94
|
+
def to_dict(self):
|
95
|
+
"""Returns the model properties as a dict"""
|
96
|
+
result = {}
|
97
|
+
|
98
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
99
|
+
value = getattr(self, attr)
|
100
|
+
if isinstance(value, list):
|
101
|
+
result[attr] = list(map(
|
102
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
103
|
+
value
|
104
|
+
))
|
105
|
+
elif hasattr(value, "to_dict"):
|
106
|
+
result[attr] = value.to_dict()
|
107
|
+
elif isinstance(value, dict):
|
108
|
+
result[attr] = dict(map(
|
109
|
+
lambda item: (item[0], item[1].to_dict())
|
110
|
+
if hasattr(item[1], "to_dict") else item,
|
111
|
+
value.items()
|
112
|
+
))
|
113
|
+
else:
|
114
|
+
if attr in self.sensitive_list:
|
115
|
+
result[attr] = "****"
|
116
|
+
else:
|
117
|
+
result[attr] = value
|
118
|
+
|
119
|
+
return result
|
120
|
+
|
121
|
+
def to_str(self):
|
122
|
+
"""Returns the string representation of the model"""
|
123
|
+
import simplejson as json
|
124
|
+
if six.PY2:
|
125
|
+
import sys
|
126
|
+
reload(sys)
|
127
|
+
sys.setdefaultencoding("utf-8")
|
128
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
129
|
+
|
130
|
+
def __repr__(self):
|
131
|
+
"""For `print`"""
|
132
|
+
return self.to_str()
|
133
|
+
|
134
|
+
def __eq__(self, other):
|
135
|
+
"""Returns true if both objects are equal"""
|
136
|
+
if not isinstance(other, ListTagsRequest):
|
137
|
+
return False
|
138
|
+
|
139
|
+
return self.__dict__ == other.__dict__
|
140
|
+
|
141
|
+
def __ne__(self, other):
|
142
|
+
"""Returns true if both objects are not equal"""
|
143
|
+
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 ListTagsResponse(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
|
+
'tags': 'list[ProjectTag]'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'tags': 'tags'
|
26
|
+
}
|
27
|
+
|
28
|
+
def __init__(self, tags=None):
|
29
|
+
"""ListTagsResponse
|
30
|
+
|
31
|
+
The model defined in huaweicloud sdk
|
32
|
+
|
33
|
+
:param tags: 标签列表。
|
34
|
+
:type tags: list[:class:`huaweicloudsdkdrs.v5.ProjectTag`]
|
35
|
+
"""
|
36
|
+
|
37
|
+
super(ListTagsResponse, self).__init__()
|
38
|
+
|
39
|
+
self._tags = None
|
40
|
+
self.discriminator = None
|
41
|
+
|
42
|
+
if tags is not None:
|
43
|
+
self.tags = tags
|
44
|
+
|
45
|
+
@property
|
46
|
+
def tags(self):
|
47
|
+
"""Gets the tags of this ListTagsResponse.
|
48
|
+
|
49
|
+
标签列表。
|
50
|
+
|
51
|
+
:return: The tags of this ListTagsResponse.
|
52
|
+
:rtype: list[:class:`huaweicloudsdkdrs.v5.ProjectTag`]
|
53
|
+
"""
|
54
|
+
return self._tags
|
55
|
+
|
56
|
+
@tags.setter
|
57
|
+
def tags(self, tags):
|
58
|
+
"""Sets the tags of this ListTagsResponse.
|
59
|
+
|
60
|
+
标签列表。
|
61
|
+
|
62
|
+
:param tags: The tags of this ListTagsResponse.
|
63
|
+
:type tags: list[:class:`huaweicloudsdkdrs.v5.ProjectTag`]
|
64
|
+
"""
|
65
|
+
self._tags = tags
|
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, ListTagsResponse):
|
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
|