huaweicloudsdkoms 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.
- huaweicloudsdkoms/__init__.py +0 -0
- huaweicloudsdkoms/v2/__init__.py +117 -0
- huaweicloudsdkoms/v2/model/__init__.py +114 -0
- huaweicloudsdkoms/v2/model/bandwidth_policy_dto.py +170 -0
- huaweicloudsdkoms/v2/model/batch_update_tasks_req.py +201 -0
- huaweicloudsdkoms/v2/model/batch_update_tasks_request.py +111 -0
- huaweicloudsdkoms/v2/model/batch_update_tasks_response.py +85 -0
- huaweicloudsdkoms/v2/model/check_prefix_req.py +343 -0
- huaweicloudsdkoms/v2/model/check_prefix_request.py +111 -0
- huaweicloudsdkoms/v2/model/check_prefix_response.py +116 -0
- huaweicloudsdkoms/v2/model/checked_key.py +173 -0
- huaweicloudsdkoms/v2/model/create_sync_events_request.py +139 -0
- huaweicloudsdkoms/v2/model/create_sync_events_response.py +85 -0
- huaweicloudsdkoms/v2/model/create_sync_task_req.py +567 -0
- huaweicloudsdkoms/v2/model/create_sync_task_request.py +111 -0
- huaweicloudsdkoms/v2/model/create_sync_task_response.py +116 -0
- huaweicloudsdkoms/v2/model/create_task_group_req.py +531 -0
- huaweicloudsdkoms/v2/model/create_task_group_request.py +111 -0
- huaweicloudsdkoms/v2/model/create_task_group_response.py +116 -0
- huaweicloudsdkoms/v2/model/create_task_req.py +561 -0
- huaweicloudsdkoms/v2/model/create_task_request.py +111 -0
- huaweicloudsdkoms/v2/model/create_task_response.py +145 -0
- huaweicloudsdkoms/v2/model/delete_sync_task_request.py +114 -0
- huaweicloudsdkoms/v2/model/delete_sync_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/delete_task_group_request.py +114 -0
- huaweicloudsdkoms/v2/model/delete_task_group_response.py +85 -0
- huaweicloudsdkoms/v2/model/delete_task_request.py +114 -0
- huaweicloudsdkoms/v2/model/delete_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/dst_node_req.py +256 -0
- huaweicloudsdkoms/v2/model/dst_node_resp.py +173 -0
- huaweicloudsdkoms/v2/model/error_reason_resp.py +144 -0
- huaweicloudsdkoms/v2/model/failed_object_record_dto.py +173 -0
- huaweicloudsdkoms/v2/model/link.py +144 -0
- huaweicloudsdkoms/v2/model/list_api_versions_request.py +84 -0
- huaweicloudsdkoms/v2/model/list_api_versions_response.py +116 -0
- huaweicloudsdkoms/v2/model/list_buckets_req.py +230 -0
- huaweicloudsdkoms/v2/model/list_file.py +171 -0
- huaweicloudsdkoms/v2/model/list_sync_task_statistic_request.py +198 -0
- huaweicloudsdkoms/v2/model/list_sync_task_statistic_response.py +174 -0
- huaweicloudsdkoms/v2/model/list_sync_tasks_request.py +173 -0
- huaweicloudsdkoms/v2/model/list_sync_tasks_response.py +145 -0
- huaweicloudsdkoms/v2/model/list_task_group_request.py +173 -0
- huaweicloudsdkoms/v2/model/list_task_group_response.py +145 -0
- huaweicloudsdkoms/v2/model/list_tasks_request.py +202 -0
- huaweicloudsdkoms/v2/model/list_tasks_response.py +145 -0
- huaweicloudsdkoms/v2/model/prefix_key_info.py +114 -0
- huaweicloudsdkoms/v2/model/region_info.py +173 -0
- huaweicloudsdkoms/v2/model/retry_task_group_req.py +289 -0
- huaweicloudsdkoms/v2/model/retry_task_group_request.py +139 -0
- huaweicloudsdkoms/v2/model/retry_task_group_response.py +85 -0
- huaweicloudsdkoms/v2/model/show_api_info_request.py +114 -0
- huaweicloudsdkoms/v2/model/show_api_info_response.py +203 -0
- huaweicloudsdkoms/v2/model/show_bucket_list_request.py +111 -0
- huaweicloudsdkoms/v2/model/show_bucket_list_response.py +112 -0
- huaweicloudsdkoms/v2/model/show_bucket_objects_request.py +111 -0
- huaweicloudsdkoms/v2/model/show_bucket_objects_response.py +174 -0
- huaweicloudsdkoms/v2/model/show_bucket_record.py +144 -0
- huaweicloudsdkoms/v2/model/show_bucket_region_req.py +258 -0
- huaweicloudsdkoms/v2/model/show_bucket_region_request.py +111 -0
- huaweicloudsdkoms/v2/model/show_bucket_region_response.py +174 -0
- huaweicloudsdkoms/v2/model/show_bucket_req.py +370 -0
- huaweicloudsdkoms/v2/model/show_cdn_info_req.py +304 -0
- huaweicloudsdkoms/v2/model/show_cdn_info_request.py +111 -0
- huaweicloudsdkoms/v2/model/show_cdn_info_response.py +174 -0
- huaweicloudsdkoms/v2/model/show_cloud_type_request.py +114 -0
- huaweicloudsdkoms/v2/model/show_cloud_type_response.py +112 -0
- huaweicloudsdkoms/v2/model/show_region_info_request.py +84 -0
- huaweicloudsdkoms/v2/model/show_region_info_resp.py +144 -0
- huaweicloudsdkoms/v2/model/show_region_info_response.py +112 -0
- huaweicloudsdkoms/v2/model/show_sync_task_request.py +142 -0
- huaweicloudsdkoms/v2/model/show_sync_task_response.py +725 -0
- huaweicloudsdkoms/v2/model/show_task_group_request.py +114 -0
- huaweicloudsdkoms/v2/model/show_task_group_response.py +1165 -0
- huaweicloudsdkoms/v2/model/show_task_request.py +114 -0
- huaweicloudsdkoms/v2/model/show_task_response.py +1194 -0
- huaweicloudsdkoms/v2/model/smn_config.py +200 -0
- huaweicloudsdkoms/v2/model/smn_info.py +173 -0
- huaweicloudsdkoms/v2/model/source_cdn_req.py +199 -0
- huaweicloudsdkoms/v2/model/source_cdn_resp.py +171 -0
- huaweicloudsdkoms/v2/model/src_node_req.py +372 -0
- huaweicloudsdkoms/v2/model/src_node_resp.py +256 -0
- huaweicloudsdkoms/v2/model/start_sync_task_req.py +227 -0
- huaweicloudsdkoms/v2/model/start_sync_task_request.py +139 -0
- huaweicloudsdkoms/v2/model/start_sync_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/start_task_group_req.py +258 -0
- huaweicloudsdkoms/v2/model/start_task_group_request.py +139 -0
- huaweicloudsdkoms/v2/model/start_task_group_response.py +85 -0
- huaweicloudsdkoms/v2/model/start_task_req.py +345 -0
- huaweicloudsdkoms/v2/model/start_task_request.py +139 -0
- huaweicloudsdkoms/v2/model/start_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/statistic_data.py +144 -0
- huaweicloudsdkoms/v2/model/statistic_type_data.py +144 -0
- huaweicloudsdkoms/v2/model/stop_sync_task_request.py +114 -0
- huaweicloudsdkoms/v2/model/stop_sync_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/stop_task_group_request.py +114 -0
- huaweicloudsdkoms/v2/model/stop_task_group_response.py +85 -0
- huaweicloudsdkoms/v2/model/stop_task_request.py +114 -0
- huaweicloudsdkoms/v2/model/stop_task_response.py +85 -0
- huaweicloudsdkoms/v2/model/sync_object_req.py +114 -0
- huaweicloudsdkoms/v2/model/sync_task_info.py +604 -0
- huaweicloudsdkoms/v2/model/task_group_dst_node.py +256 -0
- huaweicloudsdkoms/v2/model/task_group_dst_node_resp.py +173 -0
- huaweicloudsdkoms/v2/model/task_group_resp.py +1164 -0
- huaweicloudsdkoms/v2/model/task_group_src_node.py +343 -0
- huaweicloudsdkoms/v2/model/task_group_src_node_resp.py +256 -0
- huaweicloudsdkoms/v2/model/task_resp.py +1193 -0
- huaweicloudsdkoms/v2/model/update_bandwidth_policy_req.py +114 -0
- huaweicloudsdkoms/v2/model/update_bandwidth_policy_request.py +139 -0
- huaweicloudsdkoms/v2/model/update_bandwidth_policy_response.py +85 -0
- huaweicloudsdkoms/v2/model/update_task_group_request.py +139 -0
- huaweicloudsdkoms/v2/model/update_task_group_response.py +85 -0
- huaweicloudsdkoms/v2/model/version.py +202 -0
- huaweicloudsdkoms/v2/oms_async_client.py +2263 -0
- huaweicloudsdkoms/v2/oms_client.py +2260 -0
- huaweicloudsdkoms/v2/region/__init__.py +0 -0
- huaweicloudsdkoms/v2/region/oms_region.py +91 -0
- huaweicloudsdkoms-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdkoms-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdkoms-3.1.160.dist-info/RECORD +121 -0
- huaweicloudsdkoms-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdkoms-3.1.160.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1193 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class TaskResp:
|
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
|
+
'bandwidth_policy': 'list[BandwidthPolicyDto]',
|
21
|
+
'complete_size': 'int',
|
22
|
+
'description': 'str',
|
23
|
+
'dst_node': 'DstNodeResp',
|
24
|
+
'enable_failed_object_recording': 'bool',
|
25
|
+
'enable_kms': 'bool',
|
26
|
+
'enable_metadata_migration': 'bool',
|
27
|
+
'enable_restore': 'bool',
|
28
|
+
'error_reason': 'ErrorReasonResp',
|
29
|
+
'failed_num': 'int',
|
30
|
+
'failed_object_record': 'FailedObjectRecordDto',
|
31
|
+
'group_id': 'str',
|
32
|
+
'id': 'int',
|
33
|
+
'is_query_over': 'bool',
|
34
|
+
'left_time': 'int',
|
35
|
+
'migrate_since': 'int',
|
36
|
+
'migrate_speed': 'int',
|
37
|
+
'name': 'str',
|
38
|
+
'progress': 'float',
|
39
|
+
'real_size': 'int',
|
40
|
+
'skipped_num': 'int',
|
41
|
+
'src_node': 'SrcNodeResp',
|
42
|
+
'start_time': 'int',
|
43
|
+
'status': 'int',
|
44
|
+
'successful_num': 'int',
|
45
|
+
'task_type': 'str',
|
46
|
+
'group_type': 'str',
|
47
|
+
'total_num': 'int',
|
48
|
+
'total_size': 'int',
|
49
|
+
'total_time': 'int',
|
50
|
+
'smn_info': 'SmnInfo',
|
51
|
+
'source_cdn': 'SourceCdnResp',
|
52
|
+
'success_record_error_reason': 'str',
|
53
|
+
'skip_record_error_reason': 'str',
|
54
|
+
'object_overwrite_mode': 'str',
|
55
|
+
'dst_storage_policy': 'str',
|
56
|
+
'consistency_check': 'str',
|
57
|
+
'enable_requester_pays': 'bool',
|
58
|
+
'task_priority': 'str'
|
59
|
+
}
|
60
|
+
|
61
|
+
attribute_map = {
|
62
|
+
'bandwidth_policy': 'bandwidth_policy',
|
63
|
+
'complete_size': 'complete_size',
|
64
|
+
'description': 'description',
|
65
|
+
'dst_node': 'dst_node',
|
66
|
+
'enable_failed_object_recording': 'enable_failed_object_recording',
|
67
|
+
'enable_kms': 'enable_kms',
|
68
|
+
'enable_metadata_migration': 'enable_metadata_migration',
|
69
|
+
'enable_restore': 'enable_restore',
|
70
|
+
'error_reason': 'error_reason',
|
71
|
+
'failed_num': 'failed_num',
|
72
|
+
'failed_object_record': 'failed_object_record',
|
73
|
+
'group_id': 'group_id',
|
74
|
+
'id': 'id',
|
75
|
+
'is_query_over': 'is_query_over',
|
76
|
+
'left_time': 'left_time',
|
77
|
+
'migrate_since': 'migrate_since',
|
78
|
+
'migrate_speed': 'migrate_speed',
|
79
|
+
'name': 'name',
|
80
|
+
'progress': 'progress',
|
81
|
+
'real_size': 'real_size',
|
82
|
+
'skipped_num': 'skipped_num',
|
83
|
+
'src_node': 'src_node',
|
84
|
+
'start_time': 'start_time',
|
85
|
+
'status': 'status',
|
86
|
+
'successful_num': 'successful_num',
|
87
|
+
'task_type': 'task_type',
|
88
|
+
'group_type': 'group_type',
|
89
|
+
'total_num': 'total_num',
|
90
|
+
'total_size': 'total_size',
|
91
|
+
'total_time': 'total_time',
|
92
|
+
'smn_info': 'smn_info',
|
93
|
+
'source_cdn': 'source_cdn',
|
94
|
+
'success_record_error_reason': 'success_record_error_reason',
|
95
|
+
'skip_record_error_reason': 'skip_record_error_reason',
|
96
|
+
'object_overwrite_mode': 'object_overwrite_mode',
|
97
|
+
'dst_storage_policy': 'dst_storage_policy',
|
98
|
+
'consistency_check': 'consistency_check',
|
99
|
+
'enable_requester_pays': 'enable_requester_pays',
|
100
|
+
'task_priority': 'task_priority'
|
101
|
+
}
|
102
|
+
|
103
|
+
def __init__(self, bandwidth_policy=None, complete_size=None, description=None, dst_node=None, enable_failed_object_recording=None, enable_kms=None, enable_metadata_migration=None, enable_restore=None, error_reason=None, failed_num=None, failed_object_record=None, group_id=None, id=None, is_query_over=None, left_time=None, migrate_since=None, migrate_speed=None, name=None, progress=None, real_size=None, skipped_num=None, src_node=None, start_time=None, status=None, successful_num=None, task_type=None, group_type=None, total_num=None, total_size=None, total_time=None, smn_info=None, source_cdn=None, success_record_error_reason=None, skip_record_error_reason=None, object_overwrite_mode=None, dst_storage_policy=None, consistency_check=None, enable_requester_pays=None, task_priority=None):
|
104
|
+
r"""TaskResp
|
105
|
+
|
106
|
+
The model defined in huaweicloud sdk
|
107
|
+
|
108
|
+
:param bandwidth_policy: 流量控制策略,每个任务最多可设置5条限速策略。
|
109
|
+
:type bandwidth_policy: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
110
|
+
:param complete_size: 任务迁移完成大小(Byte)。
|
111
|
+
:type complete_size: int
|
112
|
+
:param description: 任务描述,没有设置时为空字符串。
|
113
|
+
:type description: str
|
114
|
+
:param dst_node:
|
115
|
+
:type dst_node: :class:`huaweicloudsdkoms.v2.DstNodeResp`
|
116
|
+
:param enable_failed_object_recording: 是否记录失败对象。开启后,如果有迁移失败对象,会在目的端存储失败对象信息。
|
117
|
+
:type enable_failed_object_recording: bool
|
118
|
+
:param enable_kms: 存储入OBS时是否使用KMS加密。
|
119
|
+
:type enable_kms: bool
|
120
|
+
:param enable_metadata_migration: 是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
121
|
+
:type enable_metadata_migration: bool
|
122
|
+
:param enable_restore: 是否自动解冻归档数据,(由于对象存储解冻需要源端存储等待一定时间,开启自动解冻会对迁移速度有较大影响,建议先完成归档存储数据解冻后再启动迁移)。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移;如果遇到归档类型的对象直接跳过相应对象,系统默认对象迁移失败并记录相关信息到失败对象列表中。
|
123
|
+
:type enable_restore: bool
|
124
|
+
:param error_reason:
|
125
|
+
:type error_reason: :class:`huaweicloudsdkoms.v2.ErrorReasonResp`
|
126
|
+
:param failed_num: 迁移失败对象数量。
|
127
|
+
:type failed_num: int
|
128
|
+
:param failed_object_record:
|
129
|
+
:type failed_object_record: :class:`huaweicloudsdkoms.v2.FailedObjectRecordDto`
|
130
|
+
:param group_id: 迁移任务组ID,当任务由迁移任务组创建时会包含迁移任务组的id信息。
|
131
|
+
:type group_id: str
|
132
|
+
:param id: 任务ID。
|
133
|
+
:type id: int
|
134
|
+
:param is_query_over: 迁移任务是否完成源端对象统计数据扫描。
|
135
|
+
:type is_query_over: bool
|
136
|
+
:param left_time: 任务剩余时间(毫秒)。
|
137
|
+
:type left_time: int
|
138
|
+
:param migrate_since: 迁移指定时间(时间戳,毫秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认为0,表示不设置迁移指定时间。
|
139
|
+
:type migrate_since: int
|
140
|
+
:param migrate_speed: 任务迁移速度(Byte/s)。
|
141
|
+
:type migrate_speed: int
|
142
|
+
:param name: 任务名称。
|
143
|
+
:type name: str
|
144
|
+
:param progress: 任务进度,例如:0.522代表任务进度为52.2%,1代表任务进度为100%。
|
145
|
+
:type progress: float
|
146
|
+
:param real_size: 实际迁移对象总大小(Byte),忽略对象的大小不会统计在内。
|
147
|
+
:type real_size: int
|
148
|
+
:param skipped_num: 迁移忽略对象数(存在以下两种情况会自动跳过:1.源端对象最后修改时间在迁移指定时间前;2.目的端已有该对象。)
|
149
|
+
:type skipped_num: int
|
150
|
+
:param src_node:
|
151
|
+
:type src_node: :class:`huaweicloudsdkoms.v2.SrcNodeResp`
|
152
|
+
:param start_time: 任务启动时间(Unix时间戳,毫秒)。
|
153
|
+
:type start_time: int
|
154
|
+
:param status: 任务状态。 1:等待调度 2:正在执行 3:停止 4:失败 5:成功 7:等待中
|
155
|
+
:type status: int
|
156
|
+
:param successful_num: 迁移成功对象数量。
|
157
|
+
:type successful_num: int
|
158
|
+
:param task_type: 任务类型,为空默认设置为object。 list:对象列表迁移 object:文件/文件夹迁移 prefix:对象前缀迁移 url_list: url对象列表
|
159
|
+
:type task_type: str
|
160
|
+
:param group_type: 分组类型 NORMAL_TASK:一般迁移任务 SYNC_TASK:同步任务所属迁移任务 GROUP_TASK:任务组所属迁移任务
|
161
|
+
:type group_type: str
|
162
|
+
:param total_num: 迁移任务对象总数量。
|
163
|
+
:type total_num: int
|
164
|
+
:param total_size: 任务迁移总大小(Byte)。
|
165
|
+
:type total_size: int
|
166
|
+
:param total_time: 任务总耗时(毫秒)。
|
167
|
+
:type total_time: int
|
168
|
+
:param smn_info:
|
169
|
+
:type smn_info: :class:`huaweicloudsdkoms.v2.SmnInfo`
|
170
|
+
:param source_cdn:
|
171
|
+
:type source_cdn: :class:`huaweicloudsdkoms.v2.SourceCdnResp`
|
172
|
+
:param success_record_error_reason: 迁移成功对象列表记录失败错误码,记录成功时为空
|
173
|
+
:type success_record_error_reason: str
|
174
|
+
:param skip_record_error_reason: 迁移忽略对象列表记录失败错误码,记录记录成功时为空。
|
175
|
+
:type skip_record_error_reason: str
|
176
|
+
:param object_overwrite_mode: 迁移前同名对象覆盖方式,用于迁移前判断源端与目的端有同名对象时,覆盖目的端或跳过迁移。默认SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE。 NO_OVERWRITE:不覆盖。迁移前源端对象与目的端对象同名时,不做对比直接跳过迁移。 SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE:大小/最后修改时间对比覆盖。默认配置。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象大小和最后修改时间,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。源端与目的端同名对象大小不相同,或目的端对象的最后修改时间晚于源端对象的最后修改时间(源端较新),覆盖目的端。 CRC64_COMPARISON_OVERWRITE:CRC64对比覆盖。目前仅支持华为/阿里/腾讯。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象元数据中CRC64值是否相同,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE(大小/最后修改时间对比覆盖)来对比进行覆盖判断。 FULL_OVERWRITE:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
177
|
+
:type object_overwrite_mode: str
|
178
|
+
:param dst_storage_policy: 目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
179
|
+
:type dst_storage_policy: str
|
180
|
+
:param consistency_check: 一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
181
|
+
:type consistency_check: str
|
182
|
+
:param enable_requester_pays: 是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
183
|
+
:type enable_requester_pays: bool
|
184
|
+
:param task_priority: HIGH:高优先级 MEDIUM:中优先级 LOW:低优先级
|
185
|
+
:type task_priority: str
|
186
|
+
"""
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
self._bandwidth_policy = None
|
191
|
+
self._complete_size = None
|
192
|
+
self._description = None
|
193
|
+
self._dst_node = None
|
194
|
+
self._enable_failed_object_recording = None
|
195
|
+
self._enable_kms = None
|
196
|
+
self._enable_metadata_migration = None
|
197
|
+
self._enable_restore = None
|
198
|
+
self._error_reason = None
|
199
|
+
self._failed_num = None
|
200
|
+
self._failed_object_record = None
|
201
|
+
self._group_id = None
|
202
|
+
self._id = None
|
203
|
+
self._is_query_over = None
|
204
|
+
self._left_time = None
|
205
|
+
self._migrate_since = None
|
206
|
+
self._migrate_speed = None
|
207
|
+
self._name = None
|
208
|
+
self._progress = None
|
209
|
+
self._real_size = None
|
210
|
+
self._skipped_num = None
|
211
|
+
self._src_node = None
|
212
|
+
self._start_time = None
|
213
|
+
self._status = None
|
214
|
+
self._successful_num = None
|
215
|
+
self._task_type = None
|
216
|
+
self._group_type = None
|
217
|
+
self._total_num = None
|
218
|
+
self._total_size = None
|
219
|
+
self._total_time = None
|
220
|
+
self._smn_info = None
|
221
|
+
self._source_cdn = None
|
222
|
+
self._success_record_error_reason = None
|
223
|
+
self._skip_record_error_reason = None
|
224
|
+
self._object_overwrite_mode = None
|
225
|
+
self._dst_storage_policy = None
|
226
|
+
self._consistency_check = None
|
227
|
+
self._enable_requester_pays = None
|
228
|
+
self._task_priority = None
|
229
|
+
self.discriminator = None
|
230
|
+
|
231
|
+
if bandwidth_policy is not None:
|
232
|
+
self.bandwidth_policy = bandwidth_policy
|
233
|
+
if complete_size is not None:
|
234
|
+
self.complete_size = complete_size
|
235
|
+
if description is not None:
|
236
|
+
self.description = description
|
237
|
+
if dst_node is not None:
|
238
|
+
self.dst_node = dst_node
|
239
|
+
if enable_failed_object_recording is not None:
|
240
|
+
self.enable_failed_object_recording = enable_failed_object_recording
|
241
|
+
if enable_kms is not None:
|
242
|
+
self.enable_kms = enable_kms
|
243
|
+
if enable_metadata_migration is not None:
|
244
|
+
self.enable_metadata_migration = enable_metadata_migration
|
245
|
+
if enable_restore is not None:
|
246
|
+
self.enable_restore = enable_restore
|
247
|
+
if error_reason is not None:
|
248
|
+
self.error_reason = error_reason
|
249
|
+
if failed_num is not None:
|
250
|
+
self.failed_num = failed_num
|
251
|
+
if failed_object_record is not None:
|
252
|
+
self.failed_object_record = failed_object_record
|
253
|
+
if group_id is not None:
|
254
|
+
self.group_id = group_id
|
255
|
+
if id is not None:
|
256
|
+
self.id = id
|
257
|
+
if is_query_over is not None:
|
258
|
+
self.is_query_over = is_query_over
|
259
|
+
if left_time is not None:
|
260
|
+
self.left_time = left_time
|
261
|
+
if migrate_since is not None:
|
262
|
+
self.migrate_since = migrate_since
|
263
|
+
if migrate_speed is not None:
|
264
|
+
self.migrate_speed = migrate_speed
|
265
|
+
if name is not None:
|
266
|
+
self.name = name
|
267
|
+
if progress is not None:
|
268
|
+
self.progress = progress
|
269
|
+
if real_size is not None:
|
270
|
+
self.real_size = real_size
|
271
|
+
if skipped_num is not None:
|
272
|
+
self.skipped_num = skipped_num
|
273
|
+
if src_node is not None:
|
274
|
+
self.src_node = src_node
|
275
|
+
if start_time is not None:
|
276
|
+
self.start_time = start_time
|
277
|
+
if status is not None:
|
278
|
+
self.status = status
|
279
|
+
if successful_num is not None:
|
280
|
+
self.successful_num = successful_num
|
281
|
+
if task_type is not None:
|
282
|
+
self.task_type = task_type
|
283
|
+
if group_type is not None:
|
284
|
+
self.group_type = group_type
|
285
|
+
if total_num is not None:
|
286
|
+
self.total_num = total_num
|
287
|
+
if total_size is not None:
|
288
|
+
self.total_size = total_size
|
289
|
+
if total_time is not None:
|
290
|
+
self.total_time = total_time
|
291
|
+
if smn_info is not None:
|
292
|
+
self.smn_info = smn_info
|
293
|
+
if source_cdn is not None:
|
294
|
+
self.source_cdn = source_cdn
|
295
|
+
if success_record_error_reason is not None:
|
296
|
+
self.success_record_error_reason = success_record_error_reason
|
297
|
+
if skip_record_error_reason is not None:
|
298
|
+
self.skip_record_error_reason = skip_record_error_reason
|
299
|
+
if object_overwrite_mode is not None:
|
300
|
+
self.object_overwrite_mode = object_overwrite_mode
|
301
|
+
if dst_storage_policy is not None:
|
302
|
+
self.dst_storage_policy = dst_storage_policy
|
303
|
+
if consistency_check is not None:
|
304
|
+
self.consistency_check = consistency_check
|
305
|
+
if enable_requester_pays is not None:
|
306
|
+
self.enable_requester_pays = enable_requester_pays
|
307
|
+
if task_priority is not None:
|
308
|
+
self.task_priority = task_priority
|
309
|
+
|
310
|
+
@property
|
311
|
+
def bandwidth_policy(self):
|
312
|
+
r"""Gets the bandwidth_policy of this TaskResp.
|
313
|
+
|
314
|
+
流量控制策略,每个任务最多可设置5条限速策略。
|
315
|
+
|
316
|
+
:return: The bandwidth_policy of this TaskResp.
|
317
|
+
:rtype: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
318
|
+
"""
|
319
|
+
return self._bandwidth_policy
|
320
|
+
|
321
|
+
@bandwidth_policy.setter
|
322
|
+
def bandwidth_policy(self, bandwidth_policy):
|
323
|
+
r"""Sets the bandwidth_policy of this TaskResp.
|
324
|
+
|
325
|
+
流量控制策略,每个任务最多可设置5条限速策略。
|
326
|
+
|
327
|
+
:param bandwidth_policy: The bandwidth_policy of this TaskResp.
|
328
|
+
:type bandwidth_policy: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
329
|
+
"""
|
330
|
+
self._bandwidth_policy = bandwidth_policy
|
331
|
+
|
332
|
+
@property
|
333
|
+
def complete_size(self):
|
334
|
+
r"""Gets the complete_size of this TaskResp.
|
335
|
+
|
336
|
+
任务迁移完成大小(Byte)。
|
337
|
+
|
338
|
+
:return: The complete_size of this TaskResp.
|
339
|
+
:rtype: int
|
340
|
+
"""
|
341
|
+
return self._complete_size
|
342
|
+
|
343
|
+
@complete_size.setter
|
344
|
+
def complete_size(self, complete_size):
|
345
|
+
r"""Sets the complete_size of this TaskResp.
|
346
|
+
|
347
|
+
任务迁移完成大小(Byte)。
|
348
|
+
|
349
|
+
:param complete_size: The complete_size of this TaskResp.
|
350
|
+
:type complete_size: int
|
351
|
+
"""
|
352
|
+
self._complete_size = complete_size
|
353
|
+
|
354
|
+
@property
|
355
|
+
def description(self):
|
356
|
+
r"""Gets the description of this TaskResp.
|
357
|
+
|
358
|
+
任务描述,没有设置时为空字符串。
|
359
|
+
|
360
|
+
:return: The description of this TaskResp.
|
361
|
+
:rtype: str
|
362
|
+
"""
|
363
|
+
return self._description
|
364
|
+
|
365
|
+
@description.setter
|
366
|
+
def description(self, description):
|
367
|
+
r"""Sets the description of this TaskResp.
|
368
|
+
|
369
|
+
任务描述,没有设置时为空字符串。
|
370
|
+
|
371
|
+
:param description: The description of this TaskResp.
|
372
|
+
:type description: str
|
373
|
+
"""
|
374
|
+
self._description = description
|
375
|
+
|
376
|
+
@property
|
377
|
+
def dst_node(self):
|
378
|
+
r"""Gets the dst_node of this TaskResp.
|
379
|
+
|
380
|
+
:return: The dst_node of this TaskResp.
|
381
|
+
:rtype: :class:`huaweicloudsdkoms.v2.DstNodeResp`
|
382
|
+
"""
|
383
|
+
return self._dst_node
|
384
|
+
|
385
|
+
@dst_node.setter
|
386
|
+
def dst_node(self, dst_node):
|
387
|
+
r"""Sets the dst_node of this TaskResp.
|
388
|
+
|
389
|
+
:param dst_node: The dst_node of this TaskResp.
|
390
|
+
:type dst_node: :class:`huaweicloudsdkoms.v2.DstNodeResp`
|
391
|
+
"""
|
392
|
+
self._dst_node = dst_node
|
393
|
+
|
394
|
+
@property
|
395
|
+
def enable_failed_object_recording(self):
|
396
|
+
r"""Gets the enable_failed_object_recording of this TaskResp.
|
397
|
+
|
398
|
+
是否记录失败对象。开启后,如果有迁移失败对象,会在目的端存储失败对象信息。
|
399
|
+
|
400
|
+
:return: The enable_failed_object_recording of this TaskResp.
|
401
|
+
:rtype: bool
|
402
|
+
"""
|
403
|
+
return self._enable_failed_object_recording
|
404
|
+
|
405
|
+
@enable_failed_object_recording.setter
|
406
|
+
def enable_failed_object_recording(self, enable_failed_object_recording):
|
407
|
+
r"""Sets the enable_failed_object_recording of this TaskResp.
|
408
|
+
|
409
|
+
是否记录失败对象。开启后,如果有迁移失败对象,会在目的端存储失败对象信息。
|
410
|
+
|
411
|
+
:param enable_failed_object_recording: The enable_failed_object_recording of this TaskResp.
|
412
|
+
:type enable_failed_object_recording: bool
|
413
|
+
"""
|
414
|
+
self._enable_failed_object_recording = enable_failed_object_recording
|
415
|
+
|
416
|
+
@property
|
417
|
+
def enable_kms(self):
|
418
|
+
r"""Gets the enable_kms of this TaskResp.
|
419
|
+
|
420
|
+
存储入OBS时是否使用KMS加密。
|
421
|
+
|
422
|
+
:return: The enable_kms of this TaskResp.
|
423
|
+
:rtype: bool
|
424
|
+
"""
|
425
|
+
return self._enable_kms
|
426
|
+
|
427
|
+
@enable_kms.setter
|
428
|
+
def enable_kms(self, enable_kms):
|
429
|
+
r"""Sets the enable_kms of this TaskResp.
|
430
|
+
|
431
|
+
存储入OBS时是否使用KMS加密。
|
432
|
+
|
433
|
+
:param enable_kms: The enable_kms of this TaskResp.
|
434
|
+
:type enable_kms: bool
|
435
|
+
"""
|
436
|
+
self._enable_kms = enable_kms
|
437
|
+
|
438
|
+
@property
|
439
|
+
def enable_metadata_migration(self):
|
440
|
+
r"""Gets the enable_metadata_migration of this TaskResp.
|
441
|
+
|
442
|
+
是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
443
|
+
|
444
|
+
:return: The enable_metadata_migration of this TaskResp.
|
445
|
+
:rtype: bool
|
446
|
+
"""
|
447
|
+
return self._enable_metadata_migration
|
448
|
+
|
449
|
+
@enable_metadata_migration.setter
|
450
|
+
def enable_metadata_migration(self, enable_metadata_migration):
|
451
|
+
r"""Sets the enable_metadata_migration of this TaskResp.
|
452
|
+
|
453
|
+
是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
454
|
+
|
455
|
+
:param enable_metadata_migration: The enable_metadata_migration of this TaskResp.
|
456
|
+
:type enable_metadata_migration: bool
|
457
|
+
"""
|
458
|
+
self._enable_metadata_migration = enable_metadata_migration
|
459
|
+
|
460
|
+
@property
|
461
|
+
def enable_restore(self):
|
462
|
+
r"""Gets the enable_restore of this TaskResp.
|
463
|
+
|
464
|
+
是否自动解冻归档数据,(由于对象存储解冻需要源端存储等待一定时间,开启自动解冻会对迁移速度有较大影响,建议先完成归档存储数据解冻后再启动迁移)。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移;如果遇到归档类型的对象直接跳过相应对象,系统默认对象迁移失败并记录相关信息到失败对象列表中。
|
465
|
+
|
466
|
+
:return: The enable_restore of this TaskResp.
|
467
|
+
:rtype: bool
|
468
|
+
"""
|
469
|
+
return self._enable_restore
|
470
|
+
|
471
|
+
@enable_restore.setter
|
472
|
+
def enable_restore(self, enable_restore):
|
473
|
+
r"""Sets the enable_restore of this TaskResp.
|
474
|
+
|
475
|
+
是否自动解冻归档数据,(由于对象存储解冻需要源端存储等待一定时间,开启自动解冻会对迁移速度有较大影响,建议先完成归档存储数据解冻后再启动迁移)。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移;如果遇到归档类型的对象直接跳过相应对象,系统默认对象迁移失败并记录相关信息到失败对象列表中。
|
476
|
+
|
477
|
+
:param enable_restore: The enable_restore of this TaskResp.
|
478
|
+
:type enable_restore: bool
|
479
|
+
"""
|
480
|
+
self._enable_restore = enable_restore
|
481
|
+
|
482
|
+
@property
|
483
|
+
def error_reason(self):
|
484
|
+
r"""Gets the error_reason of this TaskResp.
|
485
|
+
|
486
|
+
:return: The error_reason of this TaskResp.
|
487
|
+
:rtype: :class:`huaweicloudsdkoms.v2.ErrorReasonResp`
|
488
|
+
"""
|
489
|
+
return self._error_reason
|
490
|
+
|
491
|
+
@error_reason.setter
|
492
|
+
def error_reason(self, error_reason):
|
493
|
+
r"""Sets the error_reason of this TaskResp.
|
494
|
+
|
495
|
+
:param error_reason: The error_reason of this TaskResp.
|
496
|
+
:type error_reason: :class:`huaweicloudsdkoms.v2.ErrorReasonResp`
|
497
|
+
"""
|
498
|
+
self._error_reason = error_reason
|
499
|
+
|
500
|
+
@property
|
501
|
+
def failed_num(self):
|
502
|
+
r"""Gets the failed_num of this TaskResp.
|
503
|
+
|
504
|
+
迁移失败对象数量。
|
505
|
+
|
506
|
+
:return: The failed_num of this TaskResp.
|
507
|
+
:rtype: int
|
508
|
+
"""
|
509
|
+
return self._failed_num
|
510
|
+
|
511
|
+
@failed_num.setter
|
512
|
+
def failed_num(self, failed_num):
|
513
|
+
r"""Sets the failed_num of this TaskResp.
|
514
|
+
|
515
|
+
迁移失败对象数量。
|
516
|
+
|
517
|
+
:param failed_num: The failed_num of this TaskResp.
|
518
|
+
:type failed_num: int
|
519
|
+
"""
|
520
|
+
self._failed_num = failed_num
|
521
|
+
|
522
|
+
@property
|
523
|
+
def failed_object_record(self):
|
524
|
+
r"""Gets the failed_object_record of this TaskResp.
|
525
|
+
|
526
|
+
:return: The failed_object_record of this TaskResp.
|
527
|
+
:rtype: :class:`huaweicloudsdkoms.v2.FailedObjectRecordDto`
|
528
|
+
"""
|
529
|
+
return self._failed_object_record
|
530
|
+
|
531
|
+
@failed_object_record.setter
|
532
|
+
def failed_object_record(self, failed_object_record):
|
533
|
+
r"""Sets the failed_object_record of this TaskResp.
|
534
|
+
|
535
|
+
:param failed_object_record: The failed_object_record of this TaskResp.
|
536
|
+
:type failed_object_record: :class:`huaweicloudsdkoms.v2.FailedObjectRecordDto`
|
537
|
+
"""
|
538
|
+
self._failed_object_record = failed_object_record
|
539
|
+
|
540
|
+
@property
|
541
|
+
def group_id(self):
|
542
|
+
r"""Gets the group_id of this TaskResp.
|
543
|
+
|
544
|
+
迁移任务组ID,当任务由迁移任务组创建时会包含迁移任务组的id信息。
|
545
|
+
|
546
|
+
:return: The group_id of this TaskResp.
|
547
|
+
:rtype: str
|
548
|
+
"""
|
549
|
+
return self._group_id
|
550
|
+
|
551
|
+
@group_id.setter
|
552
|
+
def group_id(self, group_id):
|
553
|
+
r"""Sets the group_id of this TaskResp.
|
554
|
+
|
555
|
+
迁移任务组ID,当任务由迁移任务组创建时会包含迁移任务组的id信息。
|
556
|
+
|
557
|
+
:param group_id: The group_id of this TaskResp.
|
558
|
+
:type group_id: str
|
559
|
+
"""
|
560
|
+
self._group_id = group_id
|
561
|
+
|
562
|
+
@property
|
563
|
+
def id(self):
|
564
|
+
r"""Gets the id of this TaskResp.
|
565
|
+
|
566
|
+
任务ID。
|
567
|
+
|
568
|
+
:return: The id of this TaskResp.
|
569
|
+
:rtype: int
|
570
|
+
"""
|
571
|
+
return self._id
|
572
|
+
|
573
|
+
@id.setter
|
574
|
+
def id(self, id):
|
575
|
+
r"""Sets the id of this TaskResp.
|
576
|
+
|
577
|
+
任务ID。
|
578
|
+
|
579
|
+
:param id: The id of this TaskResp.
|
580
|
+
:type id: int
|
581
|
+
"""
|
582
|
+
self._id = id
|
583
|
+
|
584
|
+
@property
|
585
|
+
def is_query_over(self):
|
586
|
+
r"""Gets the is_query_over of this TaskResp.
|
587
|
+
|
588
|
+
迁移任务是否完成源端对象统计数据扫描。
|
589
|
+
|
590
|
+
:return: The is_query_over of this TaskResp.
|
591
|
+
:rtype: bool
|
592
|
+
"""
|
593
|
+
return self._is_query_over
|
594
|
+
|
595
|
+
@is_query_over.setter
|
596
|
+
def is_query_over(self, is_query_over):
|
597
|
+
r"""Sets the is_query_over of this TaskResp.
|
598
|
+
|
599
|
+
迁移任务是否完成源端对象统计数据扫描。
|
600
|
+
|
601
|
+
:param is_query_over: The is_query_over of this TaskResp.
|
602
|
+
:type is_query_over: bool
|
603
|
+
"""
|
604
|
+
self._is_query_over = is_query_over
|
605
|
+
|
606
|
+
@property
|
607
|
+
def left_time(self):
|
608
|
+
r"""Gets the left_time of this TaskResp.
|
609
|
+
|
610
|
+
任务剩余时间(毫秒)。
|
611
|
+
|
612
|
+
:return: The left_time of this TaskResp.
|
613
|
+
:rtype: int
|
614
|
+
"""
|
615
|
+
return self._left_time
|
616
|
+
|
617
|
+
@left_time.setter
|
618
|
+
def left_time(self, left_time):
|
619
|
+
r"""Sets the left_time of this TaskResp.
|
620
|
+
|
621
|
+
任务剩余时间(毫秒)。
|
622
|
+
|
623
|
+
:param left_time: The left_time of this TaskResp.
|
624
|
+
:type left_time: int
|
625
|
+
"""
|
626
|
+
self._left_time = left_time
|
627
|
+
|
628
|
+
@property
|
629
|
+
def migrate_since(self):
|
630
|
+
r"""Gets the migrate_since of this TaskResp.
|
631
|
+
|
632
|
+
迁移指定时间(时间戳,毫秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认为0,表示不设置迁移指定时间。
|
633
|
+
|
634
|
+
:return: The migrate_since of this TaskResp.
|
635
|
+
:rtype: int
|
636
|
+
"""
|
637
|
+
return self._migrate_since
|
638
|
+
|
639
|
+
@migrate_since.setter
|
640
|
+
def migrate_since(self, migrate_since):
|
641
|
+
r"""Sets the migrate_since of this TaskResp.
|
642
|
+
|
643
|
+
迁移指定时间(时间戳,毫秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认为0,表示不设置迁移指定时间。
|
644
|
+
|
645
|
+
:param migrate_since: The migrate_since of this TaskResp.
|
646
|
+
:type migrate_since: int
|
647
|
+
"""
|
648
|
+
self._migrate_since = migrate_since
|
649
|
+
|
650
|
+
@property
|
651
|
+
def migrate_speed(self):
|
652
|
+
r"""Gets the migrate_speed of this TaskResp.
|
653
|
+
|
654
|
+
任务迁移速度(Byte/s)。
|
655
|
+
|
656
|
+
:return: The migrate_speed of this TaskResp.
|
657
|
+
:rtype: int
|
658
|
+
"""
|
659
|
+
return self._migrate_speed
|
660
|
+
|
661
|
+
@migrate_speed.setter
|
662
|
+
def migrate_speed(self, migrate_speed):
|
663
|
+
r"""Sets the migrate_speed of this TaskResp.
|
664
|
+
|
665
|
+
任务迁移速度(Byte/s)。
|
666
|
+
|
667
|
+
:param migrate_speed: The migrate_speed of this TaskResp.
|
668
|
+
:type migrate_speed: int
|
669
|
+
"""
|
670
|
+
self._migrate_speed = migrate_speed
|
671
|
+
|
672
|
+
@property
|
673
|
+
def name(self):
|
674
|
+
r"""Gets the name of this TaskResp.
|
675
|
+
|
676
|
+
任务名称。
|
677
|
+
|
678
|
+
:return: The name of this TaskResp.
|
679
|
+
:rtype: str
|
680
|
+
"""
|
681
|
+
return self._name
|
682
|
+
|
683
|
+
@name.setter
|
684
|
+
def name(self, name):
|
685
|
+
r"""Sets the name of this TaskResp.
|
686
|
+
|
687
|
+
任务名称。
|
688
|
+
|
689
|
+
:param name: The name of this TaskResp.
|
690
|
+
:type name: str
|
691
|
+
"""
|
692
|
+
self._name = name
|
693
|
+
|
694
|
+
@property
|
695
|
+
def progress(self):
|
696
|
+
r"""Gets the progress of this TaskResp.
|
697
|
+
|
698
|
+
任务进度,例如:0.522代表任务进度为52.2%,1代表任务进度为100%。
|
699
|
+
|
700
|
+
:return: The progress of this TaskResp.
|
701
|
+
:rtype: float
|
702
|
+
"""
|
703
|
+
return self._progress
|
704
|
+
|
705
|
+
@progress.setter
|
706
|
+
def progress(self, progress):
|
707
|
+
r"""Sets the progress of this TaskResp.
|
708
|
+
|
709
|
+
任务进度,例如:0.522代表任务进度为52.2%,1代表任务进度为100%。
|
710
|
+
|
711
|
+
:param progress: The progress of this TaskResp.
|
712
|
+
:type progress: float
|
713
|
+
"""
|
714
|
+
self._progress = progress
|
715
|
+
|
716
|
+
@property
|
717
|
+
def real_size(self):
|
718
|
+
r"""Gets the real_size of this TaskResp.
|
719
|
+
|
720
|
+
实际迁移对象总大小(Byte),忽略对象的大小不会统计在内。
|
721
|
+
|
722
|
+
:return: The real_size of this TaskResp.
|
723
|
+
:rtype: int
|
724
|
+
"""
|
725
|
+
return self._real_size
|
726
|
+
|
727
|
+
@real_size.setter
|
728
|
+
def real_size(self, real_size):
|
729
|
+
r"""Sets the real_size of this TaskResp.
|
730
|
+
|
731
|
+
实际迁移对象总大小(Byte),忽略对象的大小不会统计在内。
|
732
|
+
|
733
|
+
:param real_size: The real_size of this TaskResp.
|
734
|
+
:type real_size: int
|
735
|
+
"""
|
736
|
+
self._real_size = real_size
|
737
|
+
|
738
|
+
@property
|
739
|
+
def skipped_num(self):
|
740
|
+
r"""Gets the skipped_num of this TaskResp.
|
741
|
+
|
742
|
+
迁移忽略对象数(存在以下两种情况会自动跳过:1.源端对象最后修改时间在迁移指定时间前;2.目的端已有该对象。)
|
743
|
+
|
744
|
+
:return: The skipped_num of this TaskResp.
|
745
|
+
:rtype: int
|
746
|
+
"""
|
747
|
+
return self._skipped_num
|
748
|
+
|
749
|
+
@skipped_num.setter
|
750
|
+
def skipped_num(self, skipped_num):
|
751
|
+
r"""Sets the skipped_num of this TaskResp.
|
752
|
+
|
753
|
+
迁移忽略对象数(存在以下两种情况会自动跳过:1.源端对象最后修改时间在迁移指定时间前;2.目的端已有该对象。)
|
754
|
+
|
755
|
+
:param skipped_num: The skipped_num of this TaskResp.
|
756
|
+
:type skipped_num: int
|
757
|
+
"""
|
758
|
+
self._skipped_num = skipped_num
|
759
|
+
|
760
|
+
@property
|
761
|
+
def src_node(self):
|
762
|
+
r"""Gets the src_node of this TaskResp.
|
763
|
+
|
764
|
+
:return: The src_node of this TaskResp.
|
765
|
+
:rtype: :class:`huaweicloudsdkoms.v2.SrcNodeResp`
|
766
|
+
"""
|
767
|
+
return self._src_node
|
768
|
+
|
769
|
+
@src_node.setter
|
770
|
+
def src_node(self, src_node):
|
771
|
+
r"""Sets the src_node of this TaskResp.
|
772
|
+
|
773
|
+
:param src_node: The src_node of this TaskResp.
|
774
|
+
:type src_node: :class:`huaweicloudsdkoms.v2.SrcNodeResp`
|
775
|
+
"""
|
776
|
+
self._src_node = src_node
|
777
|
+
|
778
|
+
@property
|
779
|
+
def start_time(self):
|
780
|
+
r"""Gets the start_time of this TaskResp.
|
781
|
+
|
782
|
+
任务启动时间(Unix时间戳,毫秒)。
|
783
|
+
|
784
|
+
:return: The start_time of this TaskResp.
|
785
|
+
:rtype: int
|
786
|
+
"""
|
787
|
+
return self._start_time
|
788
|
+
|
789
|
+
@start_time.setter
|
790
|
+
def start_time(self, start_time):
|
791
|
+
r"""Sets the start_time of this TaskResp.
|
792
|
+
|
793
|
+
任务启动时间(Unix时间戳,毫秒)。
|
794
|
+
|
795
|
+
:param start_time: The start_time of this TaskResp.
|
796
|
+
:type start_time: int
|
797
|
+
"""
|
798
|
+
self._start_time = start_time
|
799
|
+
|
800
|
+
@property
|
801
|
+
def status(self):
|
802
|
+
r"""Gets the status of this TaskResp.
|
803
|
+
|
804
|
+
任务状态。 1:等待调度 2:正在执行 3:停止 4:失败 5:成功 7:等待中
|
805
|
+
|
806
|
+
:return: The status of this TaskResp.
|
807
|
+
:rtype: int
|
808
|
+
"""
|
809
|
+
return self._status
|
810
|
+
|
811
|
+
@status.setter
|
812
|
+
def status(self, status):
|
813
|
+
r"""Sets the status of this TaskResp.
|
814
|
+
|
815
|
+
任务状态。 1:等待调度 2:正在执行 3:停止 4:失败 5:成功 7:等待中
|
816
|
+
|
817
|
+
:param status: The status of this TaskResp.
|
818
|
+
:type status: int
|
819
|
+
"""
|
820
|
+
self._status = status
|
821
|
+
|
822
|
+
@property
|
823
|
+
def successful_num(self):
|
824
|
+
r"""Gets the successful_num of this TaskResp.
|
825
|
+
|
826
|
+
迁移成功对象数量。
|
827
|
+
|
828
|
+
:return: The successful_num of this TaskResp.
|
829
|
+
:rtype: int
|
830
|
+
"""
|
831
|
+
return self._successful_num
|
832
|
+
|
833
|
+
@successful_num.setter
|
834
|
+
def successful_num(self, successful_num):
|
835
|
+
r"""Sets the successful_num of this TaskResp.
|
836
|
+
|
837
|
+
迁移成功对象数量。
|
838
|
+
|
839
|
+
:param successful_num: The successful_num of this TaskResp.
|
840
|
+
:type successful_num: int
|
841
|
+
"""
|
842
|
+
self._successful_num = successful_num
|
843
|
+
|
844
|
+
@property
|
845
|
+
def task_type(self):
|
846
|
+
r"""Gets the task_type of this TaskResp.
|
847
|
+
|
848
|
+
任务类型,为空默认设置为object。 list:对象列表迁移 object:文件/文件夹迁移 prefix:对象前缀迁移 url_list: url对象列表
|
849
|
+
|
850
|
+
:return: The task_type of this TaskResp.
|
851
|
+
:rtype: str
|
852
|
+
"""
|
853
|
+
return self._task_type
|
854
|
+
|
855
|
+
@task_type.setter
|
856
|
+
def task_type(self, task_type):
|
857
|
+
r"""Sets the task_type of this TaskResp.
|
858
|
+
|
859
|
+
任务类型,为空默认设置为object。 list:对象列表迁移 object:文件/文件夹迁移 prefix:对象前缀迁移 url_list: url对象列表
|
860
|
+
|
861
|
+
:param task_type: The task_type of this TaskResp.
|
862
|
+
:type task_type: str
|
863
|
+
"""
|
864
|
+
self._task_type = task_type
|
865
|
+
|
866
|
+
@property
|
867
|
+
def group_type(self):
|
868
|
+
r"""Gets the group_type of this TaskResp.
|
869
|
+
|
870
|
+
分组类型 NORMAL_TASK:一般迁移任务 SYNC_TASK:同步任务所属迁移任务 GROUP_TASK:任务组所属迁移任务
|
871
|
+
|
872
|
+
:return: The group_type of this TaskResp.
|
873
|
+
:rtype: str
|
874
|
+
"""
|
875
|
+
return self._group_type
|
876
|
+
|
877
|
+
@group_type.setter
|
878
|
+
def group_type(self, group_type):
|
879
|
+
r"""Sets the group_type of this TaskResp.
|
880
|
+
|
881
|
+
分组类型 NORMAL_TASK:一般迁移任务 SYNC_TASK:同步任务所属迁移任务 GROUP_TASK:任务组所属迁移任务
|
882
|
+
|
883
|
+
:param group_type: The group_type of this TaskResp.
|
884
|
+
:type group_type: str
|
885
|
+
"""
|
886
|
+
self._group_type = group_type
|
887
|
+
|
888
|
+
@property
|
889
|
+
def total_num(self):
|
890
|
+
r"""Gets the total_num of this TaskResp.
|
891
|
+
|
892
|
+
迁移任务对象总数量。
|
893
|
+
|
894
|
+
:return: The total_num of this TaskResp.
|
895
|
+
:rtype: int
|
896
|
+
"""
|
897
|
+
return self._total_num
|
898
|
+
|
899
|
+
@total_num.setter
|
900
|
+
def total_num(self, total_num):
|
901
|
+
r"""Sets the total_num of this TaskResp.
|
902
|
+
|
903
|
+
迁移任务对象总数量。
|
904
|
+
|
905
|
+
:param total_num: The total_num of this TaskResp.
|
906
|
+
:type total_num: int
|
907
|
+
"""
|
908
|
+
self._total_num = total_num
|
909
|
+
|
910
|
+
@property
|
911
|
+
def total_size(self):
|
912
|
+
r"""Gets the total_size of this TaskResp.
|
913
|
+
|
914
|
+
任务迁移总大小(Byte)。
|
915
|
+
|
916
|
+
:return: The total_size of this TaskResp.
|
917
|
+
:rtype: int
|
918
|
+
"""
|
919
|
+
return self._total_size
|
920
|
+
|
921
|
+
@total_size.setter
|
922
|
+
def total_size(self, total_size):
|
923
|
+
r"""Sets the total_size of this TaskResp.
|
924
|
+
|
925
|
+
任务迁移总大小(Byte)。
|
926
|
+
|
927
|
+
:param total_size: The total_size of this TaskResp.
|
928
|
+
:type total_size: int
|
929
|
+
"""
|
930
|
+
self._total_size = total_size
|
931
|
+
|
932
|
+
@property
|
933
|
+
def total_time(self):
|
934
|
+
r"""Gets the total_time of this TaskResp.
|
935
|
+
|
936
|
+
任务总耗时(毫秒)。
|
937
|
+
|
938
|
+
:return: The total_time of this TaskResp.
|
939
|
+
:rtype: int
|
940
|
+
"""
|
941
|
+
return self._total_time
|
942
|
+
|
943
|
+
@total_time.setter
|
944
|
+
def total_time(self, total_time):
|
945
|
+
r"""Sets the total_time of this TaskResp.
|
946
|
+
|
947
|
+
任务总耗时(毫秒)。
|
948
|
+
|
949
|
+
:param total_time: The total_time of this TaskResp.
|
950
|
+
:type total_time: int
|
951
|
+
"""
|
952
|
+
self._total_time = total_time
|
953
|
+
|
954
|
+
@property
|
955
|
+
def smn_info(self):
|
956
|
+
r"""Gets the smn_info of this TaskResp.
|
957
|
+
|
958
|
+
:return: The smn_info of this TaskResp.
|
959
|
+
:rtype: :class:`huaweicloudsdkoms.v2.SmnInfo`
|
960
|
+
"""
|
961
|
+
return self._smn_info
|
962
|
+
|
963
|
+
@smn_info.setter
|
964
|
+
def smn_info(self, smn_info):
|
965
|
+
r"""Sets the smn_info of this TaskResp.
|
966
|
+
|
967
|
+
:param smn_info: The smn_info of this TaskResp.
|
968
|
+
:type smn_info: :class:`huaweicloudsdkoms.v2.SmnInfo`
|
969
|
+
"""
|
970
|
+
self._smn_info = smn_info
|
971
|
+
|
972
|
+
@property
|
973
|
+
def source_cdn(self):
|
974
|
+
r"""Gets the source_cdn of this TaskResp.
|
975
|
+
|
976
|
+
:return: The source_cdn of this TaskResp.
|
977
|
+
:rtype: :class:`huaweicloudsdkoms.v2.SourceCdnResp`
|
978
|
+
"""
|
979
|
+
return self._source_cdn
|
980
|
+
|
981
|
+
@source_cdn.setter
|
982
|
+
def source_cdn(self, source_cdn):
|
983
|
+
r"""Sets the source_cdn of this TaskResp.
|
984
|
+
|
985
|
+
:param source_cdn: The source_cdn of this TaskResp.
|
986
|
+
:type source_cdn: :class:`huaweicloudsdkoms.v2.SourceCdnResp`
|
987
|
+
"""
|
988
|
+
self._source_cdn = source_cdn
|
989
|
+
|
990
|
+
@property
|
991
|
+
def success_record_error_reason(self):
|
992
|
+
r"""Gets the success_record_error_reason of this TaskResp.
|
993
|
+
|
994
|
+
迁移成功对象列表记录失败错误码,记录成功时为空
|
995
|
+
|
996
|
+
:return: The success_record_error_reason of this TaskResp.
|
997
|
+
:rtype: str
|
998
|
+
"""
|
999
|
+
return self._success_record_error_reason
|
1000
|
+
|
1001
|
+
@success_record_error_reason.setter
|
1002
|
+
def success_record_error_reason(self, success_record_error_reason):
|
1003
|
+
r"""Sets the success_record_error_reason of this TaskResp.
|
1004
|
+
|
1005
|
+
迁移成功对象列表记录失败错误码,记录成功时为空
|
1006
|
+
|
1007
|
+
:param success_record_error_reason: The success_record_error_reason of this TaskResp.
|
1008
|
+
:type success_record_error_reason: str
|
1009
|
+
"""
|
1010
|
+
self._success_record_error_reason = success_record_error_reason
|
1011
|
+
|
1012
|
+
@property
|
1013
|
+
def skip_record_error_reason(self):
|
1014
|
+
r"""Gets the skip_record_error_reason of this TaskResp.
|
1015
|
+
|
1016
|
+
迁移忽略对象列表记录失败错误码,记录记录成功时为空。
|
1017
|
+
|
1018
|
+
:return: The skip_record_error_reason of this TaskResp.
|
1019
|
+
:rtype: str
|
1020
|
+
"""
|
1021
|
+
return self._skip_record_error_reason
|
1022
|
+
|
1023
|
+
@skip_record_error_reason.setter
|
1024
|
+
def skip_record_error_reason(self, skip_record_error_reason):
|
1025
|
+
r"""Sets the skip_record_error_reason of this TaskResp.
|
1026
|
+
|
1027
|
+
迁移忽略对象列表记录失败错误码,记录记录成功时为空。
|
1028
|
+
|
1029
|
+
:param skip_record_error_reason: The skip_record_error_reason of this TaskResp.
|
1030
|
+
:type skip_record_error_reason: str
|
1031
|
+
"""
|
1032
|
+
self._skip_record_error_reason = skip_record_error_reason
|
1033
|
+
|
1034
|
+
@property
|
1035
|
+
def object_overwrite_mode(self):
|
1036
|
+
r"""Gets the object_overwrite_mode of this TaskResp.
|
1037
|
+
|
1038
|
+
迁移前同名对象覆盖方式,用于迁移前判断源端与目的端有同名对象时,覆盖目的端或跳过迁移。默认SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE。 NO_OVERWRITE:不覆盖。迁移前源端对象与目的端对象同名时,不做对比直接跳过迁移。 SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE:大小/最后修改时间对比覆盖。默认配置。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象大小和最后修改时间,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。源端与目的端同名对象大小不相同,或目的端对象的最后修改时间晚于源端对象的最后修改时间(源端较新),覆盖目的端。 CRC64_COMPARISON_OVERWRITE:CRC64对比覆盖。目前仅支持华为/阿里/腾讯。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象元数据中CRC64值是否相同,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE(大小/最后修改时间对比覆盖)来对比进行覆盖判断。 FULL_OVERWRITE:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
1039
|
+
|
1040
|
+
:return: The object_overwrite_mode of this TaskResp.
|
1041
|
+
:rtype: str
|
1042
|
+
"""
|
1043
|
+
return self._object_overwrite_mode
|
1044
|
+
|
1045
|
+
@object_overwrite_mode.setter
|
1046
|
+
def object_overwrite_mode(self, object_overwrite_mode):
|
1047
|
+
r"""Sets the object_overwrite_mode of this TaskResp.
|
1048
|
+
|
1049
|
+
迁移前同名对象覆盖方式,用于迁移前判断源端与目的端有同名对象时,覆盖目的端或跳过迁移。默认SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE。 NO_OVERWRITE:不覆盖。迁移前源端对象与目的端对象同名时,不做对比直接跳过迁移。 SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE:大小/最后修改时间对比覆盖。默认配置。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象大小和最后修改时间,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。源端与目的端同名对象大小不相同,或目的端对象的最后修改时间晚于源端对象的最后修改时间(源端较新),覆盖目的端。 CRC64_COMPARISON_OVERWRITE:CRC64对比覆盖。目前仅支持华为/阿里/腾讯。迁移前源端对象与目的端对象同名时,通过对比源端和目的端对象元数据中CRC64值是否相同,判断是否覆盖目的端,需满足源端/目的端对象的加密状态一致。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE(大小/最后修改时间对比覆盖)来对比进行覆盖判断。 FULL_OVERWRITE:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
1050
|
+
|
1051
|
+
:param object_overwrite_mode: The object_overwrite_mode of this TaskResp.
|
1052
|
+
:type object_overwrite_mode: str
|
1053
|
+
"""
|
1054
|
+
self._object_overwrite_mode = object_overwrite_mode
|
1055
|
+
|
1056
|
+
@property
|
1057
|
+
def dst_storage_policy(self):
|
1058
|
+
r"""Gets the dst_storage_policy of this TaskResp.
|
1059
|
+
|
1060
|
+
目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
1061
|
+
|
1062
|
+
:return: The dst_storage_policy of this TaskResp.
|
1063
|
+
:rtype: str
|
1064
|
+
"""
|
1065
|
+
return self._dst_storage_policy
|
1066
|
+
|
1067
|
+
@dst_storage_policy.setter
|
1068
|
+
def dst_storage_policy(self, dst_storage_policy):
|
1069
|
+
r"""Sets the dst_storage_policy of this TaskResp.
|
1070
|
+
|
1071
|
+
目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
1072
|
+
|
1073
|
+
:param dst_storage_policy: The dst_storage_policy of this TaskResp.
|
1074
|
+
:type dst_storage_policy: str
|
1075
|
+
"""
|
1076
|
+
self._dst_storage_policy = dst_storage_policy
|
1077
|
+
|
1078
|
+
@property
|
1079
|
+
def consistency_check(self):
|
1080
|
+
r"""Gets the consistency_check of this TaskResp.
|
1081
|
+
|
1082
|
+
一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
1083
|
+
|
1084
|
+
:return: The consistency_check of this TaskResp.
|
1085
|
+
:rtype: str
|
1086
|
+
"""
|
1087
|
+
return self._consistency_check
|
1088
|
+
|
1089
|
+
@consistency_check.setter
|
1090
|
+
def consistency_check(self, consistency_check):
|
1091
|
+
r"""Sets the consistency_check of this TaskResp.
|
1092
|
+
|
1093
|
+
一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
1094
|
+
|
1095
|
+
:param consistency_check: The consistency_check of this TaskResp.
|
1096
|
+
:type consistency_check: str
|
1097
|
+
"""
|
1098
|
+
self._consistency_check = consistency_check
|
1099
|
+
|
1100
|
+
@property
|
1101
|
+
def enable_requester_pays(self):
|
1102
|
+
r"""Gets the enable_requester_pays of this TaskResp.
|
1103
|
+
|
1104
|
+
是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
1105
|
+
|
1106
|
+
:return: The enable_requester_pays of this TaskResp.
|
1107
|
+
:rtype: bool
|
1108
|
+
"""
|
1109
|
+
return self._enable_requester_pays
|
1110
|
+
|
1111
|
+
@enable_requester_pays.setter
|
1112
|
+
def enable_requester_pays(self, enable_requester_pays):
|
1113
|
+
r"""Sets the enable_requester_pays of this TaskResp.
|
1114
|
+
|
1115
|
+
是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
1116
|
+
|
1117
|
+
:param enable_requester_pays: The enable_requester_pays of this TaskResp.
|
1118
|
+
:type enable_requester_pays: bool
|
1119
|
+
"""
|
1120
|
+
self._enable_requester_pays = enable_requester_pays
|
1121
|
+
|
1122
|
+
@property
|
1123
|
+
def task_priority(self):
|
1124
|
+
r"""Gets the task_priority of this TaskResp.
|
1125
|
+
|
1126
|
+
HIGH:高优先级 MEDIUM:中优先级 LOW:低优先级
|
1127
|
+
|
1128
|
+
:return: The task_priority of this TaskResp.
|
1129
|
+
:rtype: str
|
1130
|
+
"""
|
1131
|
+
return self._task_priority
|
1132
|
+
|
1133
|
+
@task_priority.setter
|
1134
|
+
def task_priority(self, task_priority):
|
1135
|
+
r"""Sets the task_priority of this TaskResp.
|
1136
|
+
|
1137
|
+
HIGH:高优先级 MEDIUM:中优先级 LOW:低优先级
|
1138
|
+
|
1139
|
+
:param task_priority: The task_priority of this TaskResp.
|
1140
|
+
:type task_priority: str
|
1141
|
+
"""
|
1142
|
+
self._task_priority = task_priority
|
1143
|
+
|
1144
|
+
def to_dict(self):
|
1145
|
+
"""Returns the model properties as a dict"""
|
1146
|
+
result = {}
|
1147
|
+
|
1148
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
1149
|
+
value = getattr(self, attr)
|
1150
|
+
if isinstance(value, list):
|
1151
|
+
result[attr] = list(map(
|
1152
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
1153
|
+
value
|
1154
|
+
))
|
1155
|
+
elif hasattr(value, "to_dict"):
|
1156
|
+
result[attr] = value.to_dict()
|
1157
|
+
elif isinstance(value, dict):
|
1158
|
+
result[attr] = dict(map(
|
1159
|
+
lambda item: (item[0], item[1].to_dict())
|
1160
|
+
if hasattr(item[1], "to_dict") else item,
|
1161
|
+
value.items()
|
1162
|
+
))
|
1163
|
+
else:
|
1164
|
+
if attr in self.sensitive_list:
|
1165
|
+
result[attr] = "****"
|
1166
|
+
else:
|
1167
|
+
result[attr] = value
|
1168
|
+
|
1169
|
+
return result
|
1170
|
+
|
1171
|
+
def to_str(self):
|
1172
|
+
"""Returns the string representation of the model"""
|
1173
|
+
import simplejson as json
|
1174
|
+
if six.PY2:
|
1175
|
+
import sys
|
1176
|
+
reload(sys)
|
1177
|
+
sys.setdefaultencoding("utf-8")
|
1178
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
1179
|
+
|
1180
|
+
def __repr__(self):
|
1181
|
+
"""For `print`"""
|
1182
|
+
return self.to_str()
|
1183
|
+
|
1184
|
+
def __eq__(self, other):
|
1185
|
+
"""Returns true if both objects are equal"""
|
1186
|
+
if not isinstance(other, TaskResp):
|
1187
|
+
return False
|
1188
|
+
|
1189
|
+
return self.__dict__ == other.__dict__
|
1190
|
+
|
1191
|
+
def __ne__(self, other):
|
1192
|
+
"""Returns true if both objects are not equal"""
|
1193
|
+
return not self == other
|