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,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 CreateSyncTaskResponse(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
|
+
'sync_task_id': 'str'
|
22
|
+
}
|
23
|
+
|
24
|
+
attribute_map = {
|
25
|
+
'sync_task_id': 'sync_task_id'
|
26
|
+
}
|
27
|
+
|
28
|
+
def __init__(self, sync_task_id=None):
|
29
|
+
r"""CreateSyncTaskResponse
|
30
|
+
|
31
|
+
The model defined in huaweicloud sdk
|
32
|
+
|
33
|
+
:param sync_task_id: 同步任务ID
|
34
|
+
:type sync_task_id: str
|
35
|
+
"""
|
36
|
+
|
37
|
+
super(CreateSyncTaskResponse, self).__init__()
|
38
|
+
|
39
|
+
self._sync_task_id = None
|
40
|
+
self.discriminator = None
|
41
|
+
|
42
|
+
if sync_task_id is not None:
|
43
|
+
self.sync_task_id = sync_task_id
|
44
|
+
|
45
|
+
@property
|
46
|
+
def sync_task_id(self):
|
47
|
+
r"""Gets the sync_task_id of this CreateSyncTaskResponse.
|
48
|
+
|
49
|
+
同步任务ID
|
50
|
+
|
51
|
+
:return: The sync_task_id of this CreateSyncTaskResponse.
|
52
|
+
:rtype: str
|
53
|
+
"""
|
54
|
+
return self._sync_task_id
|
55
|
+
|
56
|
+
@sync_task_id.setter
|
57
|
+
def sync_task_id(self, sync_task_id):
|
58
|
+
r"""Sets the sync_task_id of this CreateSyncTaskResponse.
|
59
|
+
|
60
|
+
同步任务ID
|
61
|
+
|
62
|
+
:param sync_task_id: The sync_task_id of this CreateSyncTaskResponse.
|
63
|
+
:type sync_task_id: str
|
64
|
+
"""
|
65
|
+
self._sync_task_id = sync_task_id
|
66
|
+
|
67
|
+
def to_dict(self):
|
68
|
+
"""Returns the model properties as a dict"""
|
69
|
+
result = {}
|
70
|
+
|
71
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
72
|
+
value = getattr(self, attr)
|
73
|
+
if isinstance(value, list):
|
74
|
+
result[attr] = list(map(
|
75
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
76
|
+
value
|
77
|
+
))
|
78
|
+
elif hasattr(value, "to_dict"):
|
79
|
+
result[attr] = value.to_dict()
|
80
|
+
elif isinstance(value, dict):
|
81
|
+
result[attr] = dict(map(
|
82
|
+
lambda item: (item[0], item[1].to_dict())
|
83
|
+
if hasattr(item[1], "to_dict") else item,
|
84
|
+
value.items()
|
85
|
+
))
|
86
|
+
else:
|
87
|
+
if attr in self.sensitive_list:
|
88
|
+
result[attr] = "****"
|
89
|
+
else:
|
90
|
+
result[attr] = value
|
91
|
+
|
92
|
+
return result
|
93
|
+
|
94
|
+
def to_str(self):
|
95
|
+
"""Returns the string representation of the model"""
|
96
|
+
import simplejson as json
|
97
|
+
if six.PY2:
|
98
|
+
import sys
|
99
|
+
reload(sys)
|
100
|
+
sys.setdefaultencoding("utf-8")
|
101
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
102
|
+
|
103
|
+
def __repr__(self):
|
104
|
+
"""For `print`"""
|
105
|
+
return self.to_str()
|
106
|
+
|
107
|
+
def __eq__(self, other):
|
108
|
+
"""Returns true if both objects are equal"""
|
109
|
+
if not isinstance(other, CreateSyncTaskResponse):
|
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,531 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
import six
|
4
|
+
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
6
|
+
|
7
|
+
|
8
|
+
class CreateTaskGroupReq:
|
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
|
+
'src_node': 'TaskGroupSrcNode',
|
21
|
+
'description': 'str',
|
22
|
+
'dst_node': 'TaskGroupDstNode',
|
23
|
+
'enable_metadata_migration': 'bool',
|
24
|
+
'enable_failed_object_recording': 'bool',
|
25
|
+
'enable_restore': 'bool',
|
26
|
+
'enable_kms': 'bool',
|
27
|
+
'task_type': 'str',
|
28
|
+
'bandwidth_policy': 'list[BandwidthPolicyDto]',
|
29
|
+
'smn_config': 'SmnConfig',
|
30
|
+
'source_cdn': 'SourceCdnReq',
|
31
|
+
'migrate_since': 'int',
|
32
|
+
'object_overwrite_mode': 'str',
|
33
|
+
'dst_storage_policy': 'str',
|
34
|
+
'consistency_check': 'str',
|
35
|
+
'enable_requester_pays': 'bool'
|
36
|
+
}
|
37
|
+
|
38
|
+
attribute_map = {
|
39
|
+
'src_node': 'src_node',
|
40
|
+
'description': 'description',
|
41
|
+
'dst_node': 'dst_node',
|
42
|
+
'enable_metadata_migration': 'enable_metadata_migration',
|
43
|
+
'enable_failed_object_recording': 'enable_failed_object_recording',
|
44
|
+
'enable_restore': 'enable_restore',
|
45
|
+
'enable_kms': 'enable_kms',
|
46
|
+
'task_type': 'task_type',
|
47
|
+
'bandwidth_policy': 'bandwidth_policy',
|
48
|
+
'smn_config': 'smn_config',
|
49
|
+
'source_cdn': 'source_cdn',
|
50
|
+
'migrate_since': 'migrate_since',
|
51
|
+
'object_overwrite_mode': 'object_overwrite_mode',
|
52
|
+
'dst_storage_policy': 'dst_storage_policy',
|
53
|
+
'consistency_check': 'consistency_check',
|
54
|
+
'enable_requester_pays': 'enable_requester_pays'
|
55
|
+
}
|
56
|
+
|
57
|
+
def __init__(self, src_node=None, description=None, dst_node=None, enable_metadata_migration=None, enable_failed_object_recording=None, enable_restore=None, enable_kms=None, task_type=None, bandwidth_policy=None, smn_config=None, source_cdn=None, migrate_since=None, object_overwrite_mode=None, dst_storage_policy=None, consistency_check=None, enable_requester_pays=None):
|
58
|
+
r"""CreateTaskGroupReq
|
59
|
+
|
60
|
+
The model defined in huaweicloud sdk
|
61
|
+
|
62
|
+
:param src_node:
|
63
|
+
:type src_node: :class:`huaweicloudsdkoms.v2.TaskGroupSrcNode`
|
64
|
+
:param description: 任务组描述,不能超过255个字符,且不能包含^<>&\"'等特殊字符。
|
65
|
+
:type description: str
|
66
|
+
:param dst_node:
|
67
|
+
:type dst_node: :class:`huaweicloudsdkoms.v2.TaskGroupDstNode`
|
68
|
+
:param enable_metadata_migration: 是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
69
|
+
:type enable_metadata_migration: bool
|
70
|
+
:param enable_failed_object_recording: 是否开启记录失败对象
|
71
|
+
:type enable_failed_object_recording: bool
|
72
|
+
:param enable_restore: 是否自动解冻归档数据,默认否。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移。
|
73
|
+
:type enable_restore: bool
|
74
|
+
:param enable_kms: 是否开启KMS加密,默认不开启。
|
75
|
+
:type enable_kms: bool
|
76
|
+
:param task_type: 任务类型,默认为PREFIX。 LIST:对象列表迁移 URL_LIST:URL列表迁移, PREFIX:对象前缀迁移
|
77
|
+
:type task_type: str
|
78
|
+
:param bandwidth_policy: 配置流量控制策略。数组中一个元素对应一个时段的最大带宽,最多允许5个时段,且时段不能重叠。
|
79
|
+
:type bandwidth_policy: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
80
|
+
:param smn_config:
|
81
|
+
:type smn_config: :class:`huaweicloudsdkoms.v2.SmnConfig`
|
82
|
+
:param source_cdn:
|
83
|
+
:type source_cdn: :class:`huaweicloudsdkoms.v2.SourceCdnReq`
|
84
|
+
:param migrate_since: 以时间戳方式表示的迁移指定时间(单位:秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认不设置迁移指定时间。
|
85
|
+
:type migrate_since: int
|
86
|
+
: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:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
87
|
+
:type object_overwrite_mode: str
|
88
|
+
:param dst_storage_policy: 目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
89
|
+
:type dst_storage_policy: str
|
90
|
+
:param consistency_check: 一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
91
|
+
:type consistency_check: str
|
92
|
+
:param enable_requester_pays: 是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
93
|
+
:type enable_requester_pays: bool
|
94
|
+
"""
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
self._src_node = None
|
99
|
+
self._description = None
|
100
|
+
self._dst_node = None
|
101
|
+
self._enable_metadata_migration = None
|
102
|
+
self._enable_failed_object_recording = None
|
103
|
+
self._enable_restore = None
|
104
|
+
self._enable_kms = None
|
105
|
+
self._task_type = None
|
106
|
+
self._bandwidth_policy = None
|
107
|
+
self._smn_config = None
|
108
|
+
self._source_cdn = None
|
109
|
+
self._migrate_since = None
|
110
|
+
self._object_overwrite_mode = None
|
111
|
+
self._dst_storage_policy = None
|
112
|
+
self._consistency_check = None
|
113
|
+
self._enable_requester_pays = None
|
114
|
+
self.discriminator = None
|
115
|
+
|
116
|
+
self.src_node = src_node
|
117
|
+
if description is not None:
|
118
|
+
self.description = description
|
119
|
+
self.dst_node = dst_node
|
120
|
+
if enable_metadata_migration is not None:
|
121
|
+
self.enable_metadata_migration = enable_metadata_migration
|
122
|
+
if enable_failed_object_recording is not None:
|
123
|
+
self.enable_failed_object_recording = enable_failed_object_recording
|
124
|
+
if enable_restore is not None:
|
125
|
+
self.enable_restore = enable_restore
|
126
|
+
self.enable_kms = enable_kms
|
127
|
+
if task_type is not None:
|
128
|
+
self.task_type = task_type
|
129
|
+
if bandwidth_policy is not None:
|
130
|
+
self.bandwidth_policy = bandwidth_policy
|
131
|
+
if smn_config is not None:
|
132
|
+
self.smn_config = smn_config
|
133
|
+
if source_cdn is not None:
|
134
|
+
self.source_cdn = source_cdn
|
135
|
+
if migrate_since is not None:
|
136
|
+
self.migrate_since = migrate_since
|
137
|
+
if object_overwrite_mode is not None:
|
138
|
+
self.object_overwrite_mode = object_overwrite_mode
|
139
|
+
if dst_storage_policy is not None:
|
140
|
+
self.dst_storage_policy = dst_storage_policy
|
141
|
+
if consistency_check is not None:
|
142
|
+
self.consistency_check = consistency_check
|
143
|
+
if enable_requester_pays is not None:
|
144
|
+
self.enable_requester_pays = enable_requester_pays
|
145
|
+
|
146
|
+
@property
|
147
|
+
def src_node(self):
|
148
|
+
r"""Gets the src_node of this CreateTaskGroupReq.
|
149
|
+
|
150
|
+
:return: The src_node of this CreateTaskGroupReq.
|
151
|
+
:rtype: :class:`huaweicloudsdkoms.v2.TaskGroupSrcNode`
|
152
|
+
"""
|
153
|
+
return self._src_node
|
154
|
+
|
155
|
+
@src_node.setter
|
156
|
+
def src_node(self, src_node):
|
157
|
+
r"""Sets the src_node of this CreateTaskGroupReq.
|
158
|
+
|
159
|
+
:param src_node: The src_node of this CreateTaskGroupReq.
|
160
|
+
:type src_node: :class:`huaweicloudsdkoms.v2.TaskGroupSrcNode`
|
161
|
+
"""
|
162
|
+
self._src_node = src_node
|
163
|
+
|
164
|
+
@property
|
165
|
+
def description(self):
|
166
|
+
r"""Gets the description of this CreateTaskGroupReq.
|
167
|
+
|
168
|
+
任务组描述,不能超过255个字符,且不能包含^<>&\"'等特殊字符。
|
169
|
+
|
170
|
+
:return: The description of this CreateTaskGroupReq.
|
171
|
+
:rtype: str
|
172
|
+
"""
|
173
|
+
return self._description
|
174
|
+
|
175
|
+
@description.setter
|
176
|
+
def description(self, description):
|
177
|
+
r"""Sets the description of this CreateTaskGroupReq.
|
178
|
+
|
179
|
+
任务组描述,不能超过255个字符,且不能包含^<>&\"'等特殊字符。
|
180
|
+
|
181
|
+
:param description: The description of this CreateTaskGroupReq.
|
182
|
+
:type description: str
|
183
|
+
"""
|
184
|
+
self._description = description
|
185
|
+
|
186
|
+
@property
|
187
|
+
def dst_node(self):
|
188
|
+
r"""Gets the dst_node of this CreateTaskGroupReq.
|
189
|
+
|
190
|
+
:return: The dst_node of this CreateTaskGroupReq.
|
191
|
+
:rtype: :class:`huaweicloudsdkoms.v2.TaskGroupDstNode`
|
192
|
+
"""
|
193
|
+
return self._dst_node
|
194
|
+
|
195
|
+
@dst_node.setter
|
196
|
+
def dst_node(self, dst_node):
|
197
|
+
r"""Sets the dst_node of this CreateTaskGroupReq.
|
198
|
+
|
199
|
+
:param dst_node: The dst_node of this CreateTaskGroupReq.
|
200
|
+
:type dst_node: :class:`huaweicloudsdkoms.v2.TaskGroupDstNode`
|
201
|
+
"""
|
202
|
+
self._dst_node = dst_node
|
203
|
+
|
204
|
+
@property
|
205
|
+
def enable_metadata_migration(self):
|
206
|
+
r"""Gets the enable_metadata_migration of this CreateTaskGroupReq.
|
207
|
+
|
208
|
+
是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
209
|
+
|
210
|
+
:return: The enable_metadata_migration of this CreateTaskGroupReq.
|
211
|
+
:rtype: bool
|
212
|
+
"""
|
213
|
+
return self._enable_metadata_migration
|
214
|
+
|
215
|
+
@enable_metadata_migration.setter
|
216
|
+
def enable_metadata_migration(self, enable_metadata_migration):
|
217
|
+
r"""Sets the enable_metadata_migration of this CreateTaskGroupReq.
|
218
|
+
|
219
|
+
是否启用元数据迁移,默认否。不启用时,为保证迁移任务正常运行,仍将为您迁移ContentType元数据。
|
220
|
+
|
221
|
+
:param enable_metadata_migration: The enable_metadata_migration of this CreateTaskGroupReq.
|
222
|
+
:type enable_metadata_migration: bool
|
223
|
+
"""
|
224
|
+
self._enable_metadata_migration = enable_metadata_migration
|
225
|
+
|
226
|
+
@property
|
227
|
+
def enable_failed_object_recording(self):
|
228
|
+
r"""Gets the enable_failed_object_recording of this CreateTaskGroupReq.
|
229
|
+
|
230
|
+
是否开启记录失败对象
|
231
|
+
|
232
|
+
:return: The enable_failed_object_recording of this CreateTaskGroupReq.
|
233
|
+
:rtype: bool
|
234
|
+
"""
|
235
|
+
return self._enable_failed_object_recording
|
236
|
+
|
237
|
+
@enable_failed_object_recording.setter
|
238
|
+
def enable_failed_object_recording(self, enable_failed_object_recording):
|
239
|
+
r"""Sets the enable_failed_object_recording of this CreateTaskGroupReq.
|
240
|
+
|
241
|
+
是否开启记录失败对象
|
242
|
+
|
243
|
+
:param enable_failed_object_recording: The enable_failed_object_recording of this CreateTaskGroupReq.
|
244
|
+
:type enable_failed_object_recording: bool
|
245
|
+
"""
|
246
|
+
self._enable_failed_object_recording = enable_failed_object_recording
|
247
|
+
|
248
|
+
@property
|
249
|
+
def enable_restore(self):
|
250
|
+
r"""Gets the enable_restore of this CreateTaskGroupReq.
|
251
|
+
|
252
|
+
是否自动解冻归档数据,默认否。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移。
|
253
|
+
|
254
|
+
:return: The enable_restore of this CreateTaskGroupReq.
|
255
|
+
:rtype: bool
|
256
|
+
"""
|
257
|
+
return self._enable_restore
|
258
|
+
|
259
|
+
@enable_restore.setter
|
260
|
+
def enable_restore(self, enable_restore):
|
261
|
+
r"""Sets the enable_restore of this CreateTaskGroupReq.
|
262
|
+
|
263
|
+
是否自动解冻归档数据,默认否。 开启后,如果遇到归档类型数据,会自动解冻再进行迁移。
|
264
|
+
|
265
|
+
:param enable_restore: The enable_restore of this CreateTaskGroupReq.
|
266
|
+
:type enable_restore: bool
|
267
|
+
"""
|
268
|
+
self._enable_restore = enable_restore
|
269
|
+
|
270
|
+
@property
|
271
|
+
def enable_kms(self):
|
272
|
+
r"""Gets the enable_kms of this CreateTaskGroupReq.
|
273
|
+
|
274
|
+
是否开启KMS加密,默认不开启。
|
275
|
+
|
276
|
+
:return: The enable_kms of this CreateTaskGroupReq.
|
277
|
+
:rtype: bool
|
278
|
+
"""
|
279
|
+
return self._enable_kms
|
280
|
+
|
281
|
+
@enable_kms.setter
|
282
|
+
def enable_kms(self, enable_kms):
|
283
|
+
r"""Sets the enable_kms of this CreateTaskGroupReq.
|
284
|
+
|
285
|
+
是否开启KMS加密,默认不开启。
|
286
|
+
|
287
|
+
:param enable_kms: The enable_kms of this CreateTaskGroupReq.
|
288
|
+
:type enable_kms: bool
|
289
|
+
"""
|
290
|
+
self._enable_kms = enable_kms
|
291
|
+
|
292
|
+
@property
|
293
|
+
def task_type(self):
|
294
|
+
r"""Gets the task_type of this CreateTaskGroupReq.
|
295
|
+
|
296
|
+
任务类型,默认为PREFIX。 LIST:对象列表迁移 URL_LIST:URL列表迁移, PREFIX:对象前缀迁移
|
297
|
+
|
298
|
+
:return: The task_type of this CreateTaskGroupReq.
|
299
|
+
:rtype: str
|
300
|
+
"""
|
301
|
+
return self._task_type
|
302
|
+
|
303
|
+
@task_type.setter
|
304
|
+
def task_type(self, task_type):
|
305
|
+
r"""Sets the task_type of this CreateTaskGroupReq.
|
306
|
+
|
307
|
+
任务类型,默认为PREFIX。 LIST:对象列表迁移 URL_LIST:URL列表迁移, PREFIX:对象前缀迁移
|
308
|
+
|
309
|
+
:param task_type: The task_type of this CreateTaskGroupReq.
|
310
|
+
:type task_type: str
|
311
|
+
"""
|
312
|
+
self._task_type = task_type
|
313
|
+
|
314
|
+
@property
|
315
|
+
def bandwidth_policy(self):
|
316
|
+
r"""Gets the bandwidth_policy of this CreateTaskGroupReq.
|
317
|
+
|
318
|
+
配置流量控制策略。数组中一个元素对应一个时段的最大带宽,最多允许5个时段,且时段不能重叠。
|
319
|
+
|
320
|
+
:return: The bandwidth_policy of this CreateTaskGroupReq.
|
321
|
+
:rtype: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
322
|
+
"""
|
323
|
+
return self._bandwidth_policy
|
324
|
+
|
325
|
+
@bandwidth_policy.setter
|
326
|
+
def bandwidth_policy(self, bandwidth_policy):
|
327
|
+
r"""Sets the bandwidth_policy of this CreateTaskGroupReq.
|
328
|
+
|
329
|
+
配置流量控制策略。数组中一个元素对应一个时段的最大带宽,最多允许5个时段,且时段不能重叠。
|
330
|
+
|
331
|
+
:param bandwidth_policy: The bandwidth_policy of this CreateTaskGroupReq.
|
332
|
+
:type bandwidth_policy: list[:class:`huaweicloudsdkoms.v2.BandwidthPolicyDto`]
|
333
|
+
"""
|
334
|
+
self._bandwidth_policy = bandwidth_policy
|
335
|
+
|
336
|
+
@property
|
337
|
+
def smn_config(self):
|
338
|
+
r"""Gets the smn_config of this CreateTaskGroupReq.
|
339
|
+
|
340
|
+
:return: The smn_config of this CreateTaskGroupReq.
|
341
|
+
:rtype: :class:`huaweicloudsdkoms.v2.SmnConfig`
|
342
|
+
"""
|
343
|
+
return self._smn_config
|
344
|
+
|
345
|
+
@smn_config.setter
|
346
|
+
def smn_config(self, smn_config):
|
347
|
+
r"""Sets the smn_config of this CreateTaskGroupReq.
|
348
|
+
|
349
|
+
:param smn_config: The smn_config of this CreateTaskGroupReq.
|
350
|
+
:type smn_config: :class:`huaweicloudsdkoms.v2.SmnConfig`
|
351
|
+
"""
|
352
|
+
self._smn_config = smn_config
|
353
|
+
|
354
|
+
@property
|
355
|
+
def source_cdn(self):
|
356
|
+
r"""Gets the source_cdn of this CreateTaskGroupReq.
|
357
|
+
|
358
|
+
:return: The source_cdn of this CreateTaskGroupReq.
|
359
|
+
:rtype: :class:`huaweicloudsdkoms.v2.SourceCdnReq`
|
360
|
+
"""
|
361
|
+
return self._source_cdn
|
362
|
+
|
363
|
+
@source_cdn.setter
|
364
|
+
def source_cdn(self, source_cdn):
|
365
|
+
r"""Sets the source_cdn of this CreateTaskGroupReq.
|
366
|
+
|
367
|
+
:param source_cdn: The source_cdn of this CreateTaskGroupReq.
|
368
|
+
:type source_cdn: :class:`huaweicloudsdkoms.v2.SourceCdnReq`
|
369
|
+
"""
|
370
|
+
self._source_cdn = source_cdn
|
371
|
+
|
372
|
+
@property
|
373
|
+
def migrate_since(self):
|
374
|
+
r"""Gets the migrate_since of this CreateTaskGroupReq.
|
375
|
+
|
376
|
+
以时间戳方式表示的迁移指定时间(单位:秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认不设置迁移指定时间。
|
377
|
+
|
378
|
+
:return: The migrate_since of this CreateTaskGroupReq.
|
379
|
+
:rtype: int
|
380
|
+
"""
|
381
|
+
return self._migrate_since
|
382
|
+
|
383
|
+
@migrate_since.setter
|
384
|
+
def migrate_since(self, migrate_since):
|
385
|
+
r"""Sets the migrate_since of this CreateTaskGroupReq.
|
386
|
+
|
387
|
+
以时间戳方式表示的迁移指定时间(单位:秒),表示仅迁移在指定时间之后修改的源端待迁移对象。默认不设置迁移指定时间。
|
388
|
+
|
389
|
+
:param migrate_since: The migrate_since of this CreateTaskGroupReq.
|
390
|
+
:type migrate_since: int
|
391
|
+
"""
|
392
|
+
self._migrate_since = migrate_since
|
393
|
+
|
394
|
+
@property
|
395
|
+
def object_overwrite_mode(self):
|
396
|
+
r"""Gets the object_overwrite_mode of this CreateTaskGroupReq.
|
397
|
+
|
398
|
+
迁移前同名对象覆盖方式,用于迁移前判断源端与目的端有同名对象时,覆盖目的端或跳过迁移。默认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:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
399
|
+
|
400
|
+
:return: The object_overwrite_mode of this CreateTaskGroupReq.
|
401
|
+
:rtype: str
|
402
|
+
"""
|
403
|
+
return self._object_overwrite_mode
|
404
|
+
|
405
|
+
@object_overwrite_mode.setter
|
406
|
+
def object_overwrite_mode(self, object_overwrite_mode):
|
407
|
+
r"""Sets the object_overwrite_mode of this CreateTaskGroupReq.
|
408
|
+
|
409
|
+
迁移前同名对象覆盖方式,用于迁移前判断源端与目的端有同名对象时,覆盖目的端或跳过迁移。默认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:全覆盖。迁移前源端对象与目的端对象同名时,不做对比覆盖目的端。
|
410
|
+
|
411
|
+
:param object_overwrite_mode: The object_overwrite_mode of this CreateTaskGroupReq.
|
412
|
+
:type object_overwrite_mode: str
|
413
|
+
"""
|
414
|
+
self._object_overwrite_mode = object_overwrite_mode
|
415
|
+
|
416
|
+
@property
|
417
|
+
def dst_storage_policy(self):
|
418
|
+
r"""Gets the dst_storage_policy of this CreateTaskGroupReq.
|
419
|
+
|
420
|
+
目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
421
|
+
|
422
|
+
:return: The dst_storage_policy of this CreateTaskGroupReq.
|
423
|
+
:rtype: str
|
424
|
+
"""
|
425
|
+
return self._dst_storage_policy
|
426
|
+
|
427
|
+
@dst_storage_policy.setter
|
428
|
+
def dst_storage_policy(self, dst_storage_policy):
|
429
|
+
r"""Sets the dst_storage_policy of this CreateTaskGroupReq.
|
430
|
+
|
431
|
+
目的端存储类型设置,当且仅当目的端为华为云OBS时需要,默认为标准存储 STANDARD:华为云OBS标准存储 IA:华为云OBS低频存储 ARCHIVE:华为云OBS归档存储 DEEP_ARCHIVE:华为云OBS深度归档存储 SRC_STORAGE_MAPPING:保留源端存储类型,将源端存储类型映射为华为云OBS存储类型
|
432
|
+
|
433
|
+
:param dst_storage_policy: The dst_storage_policy of this CreateTaskGroupReq.
|
434
|
+
:type dst_storage_policy: str
|
435
|
+
"""
|
436
|
+
self._dst_storage_policy = dst_storage_policy
|
437
|
+
|
438
|
+
@property
|
439
|
+
def consistency_check(self):
|
440
|
+
r"""Gets the consistency_check of this CreateTaskGroupReq.
|
441
|
+
|
442
|
+
一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
443
|
+
|
444
|
+
:return: The consistency_check of this CreateTaskGroupReq.
|
445
|
+
:rtype: str
|
446
|
+
"""
|
447
|
+
return self._consistency_check
|
448
|
+
|
449
|
+
@consistency_check.setter
|
450
|
+
def consistency_check(self, consistency_check):
|
451
|
+
r"""Sets the consistency_check of this CreateTaskGroupReq.
|
452
|
+
|
453
|
+
一致性校验方式,用于迁移前/后校验对象是否一致,所有校验方式需满足源端/目的端对象的加密状态一致,具体校验方式和校验结果可通过对象列表查看。默认size_last_modified。 size_last_modified:默认配置。迁移前后,通过对比源端和目的端对象大小+最后修改时间,判断对象是否已存在或迁移后数据是否完整。源端与目的端同名对象大小相同,且目的端对象的最后修改时间不早于源端对象的最后修改时间,则代表该对象已存在/迁移成功。 crc64:目前仅支持华为/阿里/腾讯。迁移前后,通过对比源端和目的端对象元数据中CRC64值是否相同,判断对象是否已存在/迁移完成。如果源端与目的端对象元数据中不存在CRC64值,则系统会默认使用大小/最后修改时间校验方式来校验。 no_check:目前仅支持HTTP/HTTPS数据源。当源端对象无法通过标准http协议中content-length字段获取数据大小时,默认数据下载成功即迁移成功,不对数据做额外校验,且迁移时源端对象默认覆盖目的端同名对象。当源端对象能正常通过标准http协议中content-length字段获取数据大小时,则采用大小/最后修改时间校验方式来校验。
|
454
|
+
|
455
|
+
:param consistency_check: The consistency_check of this CreateTaskGroupReq.
|
456
|
+
:type consistency_check: str
|
457
|
+
"""
|
458
|
+
self._consistency_check = consistency_check
|
459
|
+
|
460
|
+
@property
|
461
|
+
def enable_requester_pays(self):
|
462
|
+
r"""Gets the enable_requester_pays of this CreateTaskGroupReq.
|
463
|
+
|
464
|
+
是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
465
|
+
|
466
|
+
:return: The enable_requester_pays of this CreateTaskGroupReq.
|
467
|
+
:rtype: bool
|
468
|
+
"""
|
469
|
+
return self._enable_requester_pays
|
470
|
+
|
471
|
+
@enable_requester_pays.setter
|
472
|
+
def enable_requester_pays(self, enable_requester_pays):
|
473
|
+
r"""Sets the enable_requester_pays of this CreateTaskGroupReq.
|
474
|
+
|
475
|
+
是否开启请求者付款,在启用后,请求者支付请求和数据传输费用。
|
476
|
+
|
477
|
+
:param enable_requester_pays: The enable_requester_pays of this CreateTaskGroupReq.
|
478
|
+
:type enable_requester_pays: bool
|
479
|
+
"""
|
480
|
+
self._enable_requester_pays = enable_requester_pays
|
481
|
+
|
482
|
+
def to_dict(self):
|
483
|
+
"""Returns the model properties as a dict"""
|
484
|
+
result = {}
|
485
|
+
|
486
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
487
|
+
value = getattr(self, attr)
|
488
|
+
if isinstance(value, list):
|
489
|
+
result[attr] = list(map(
|
490
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
491
|
+
value
|
492
|
+
))
|
493
|
+
elif hasattr(value, "to_dict"):
|
494
|
+
result[attr] = value.to_dict()
|
495
|
+
elif isinstance(value, dict):
|
496
|
+
result[attr] = dict(map(
|
497
|
+
lambda item: (item[0], item[1].to_dict())
|
498
|
+
if hasattr(item[1], "to_dict") else item,
|
499
|
+
value.items()
|
500
|
+
))
|
501
|
+
else:
|
502
|
+
if attr in self.sensitive_list:
|
503
|
+
result[attr] = "****"
|
504
|
+
else:
|
505
|
+
result[attr] = value
|
506
|
+
|
507
|
+
return result
|
508
|
+
|
509
|
+
def to_str(self):
|
510
|
+
"""Returns the string representation of the model"""
|
511
|
+
import simplejson as json
|
512
|
+
if six.PY2:
|
513
|
+
import sys
|
514
|
+
reload(sys)
|
515
|
+
sys.setdefaultencoding("utf-8")
|
516
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
517
|
+
|
518
|
+
def __repr__(self):
|
519
|
+
"""For `print`"""
|
520
|
+
return self.to_str()
|
521
|
+
|
522
|
+
def __eq__(self, other):
|
523
|
+
"""Returns true if both objects are equal"""
|
524
|
+
if not isinstance(other, CreateTaskGroupReq):
|
525
|
+
return False
|
526
|
+
|
527
|
+
return self.__dict__ == other.__dict__
|
528
|
+
|
529
|
+
def __ne__(self, other):
|
530
|
+
"""Returns true if both objects are not equal"""
|
531
|
+
return not self == other
|