huaweicloudsdktics 3.1.160__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of huaweicloudsdktics might be problematic. Click here for more details.
- huaweicloudsdktics/__init__.py +0 -0
- huaweicloudsdktics/v1/__init__.py +74 -0
- huaweicloudsdktics/v1/model/__init__.py +71 -0
- huaweicloudsdktics/v1/model/agent_list_vo.py +521 -0
- huaweicloudsdktics/v1/model/deploy_vo.py +228 -0
- huaweicloudsdktics/v1/model/fl_job_list_vo.py +457 -0
- huaweicloudsdktics/v1/model/job_report_base_info_vo.py +256 -0
- huaweicloudsdktics/v1/model/job_report_env_vo.py +231 -0
- huaweicloudsdktics/v1/model/job_report_output_vo.py +173 -0
- huaweicloudsdktics/v1/model/job_report_partner_vo.py +231 -0
- huaweicloudsdktics/v1/model/league_dataset_statistics_vo.py +260 -0
- huaweicloudsdktics/v1/model/league_partner_statistics_vo.py +318 -0
- huaweicloudsdktics/v1/model/league_update_vo.py +173 -0
- huaweicloudsdktics/v1/model/list_agents_request.py +200 -0
- huaweicloudsdktics/v1/model/list_agents_response.py +145 -0
- huaweicloudsdktics/v1/model/list_audit_info_request.py +170 -0
- huaweicloudsdktics/v1/model/list_audit_info_response.py +145 -0
- huaweicloudsdktics/v1/model/list_fl_job_request.py +170 -0
- huaweicloudsdktics/v1/model/list_fl_job_response.py +145 -0
- huaweicloudsdktics/v1/model/list_instance_history_request.py +199 -0
- huaweicloudsdktics/v1/model/list_instance_history_response.py +145 -0
- huaweicloudsdktics/v1/model/list_league_datasets_request.py +228 -0
- huaweicloudsdktics/v1/model/list_league_datasets_response.py +145 -0
- huaweicloudsdktics/v1/model/list_leagues_request.py +170 -0
- huaweicloudsdktics/v1/model/list_leagues_response.py +145 -0
- huaweicloudsdktics/v1/model/list_nodes_request.py +170 -0
- huaweicloudsdktics/v1/model/list_nodes_response.py +145 -0
- huaweicloudsdktics/v1/model/list_notices_request.py +142 -0
- huaweicloudsdktics/v1/model/list_notices_response.py +145 -0
- huaweicloudsdktics/v1/model/list_partners_request.py +170 -0
- huaweicloudsdktics/v1/model/list_partners_response.py +145 -0
- huaweicloudsdktics/v1/model/list_sql_job_request.py +170 -0
- huaweicloudsdktics/v1/model/list_sql_job_response.py +145 -0
- huaweicloudsdktics/v1/model/partner_data_vo.py +289 -0
- huaweicloudsdktics/v1/model/processor_vo.py +374 -0
- huaweicloudsdktics/v1/model/round_deploy_vo.py +144 -0
- huaweicloudsdktics/v1/model/show_agent_detail_request.py +114 -0
- huaweicloudsdktics/v1/model/show_agent_detail_response.py +212 -0
- huaweicloudsdktics/v1/model/show_dataset_statistics_request.py +172 -0
- huaweicloudsdktics/v1/model/show_dataset_statistics_response.py +112 -0
- huaweicloudsdktics/v1/model/show_instance_report_request.py +142 -0
- huaweicloudsdktics/v1/model/show_instance_report_response.py +220 -0
- huaweicloudsdktics/v1/model/show_job_instance_dag_request.py +170 -0
- huaweicloudsdktics/v1/model/show_job_instance_dag_response.py +112 -0
- huaweicloudsdktics/v1/model/show_job_statistics_request.py +172 -0
- huaweicloudsdktics/v1/model/show_job_statistics_response.py +232 -0
- huaweicloudsdktics/v1/model/show_league_request.py +114 -0
- huaweicloudsdktics/v1/model/show_league_response.py +725 -0
- huaweicloudsdktics/v1/model/show_overview_request.py +84 -0
- huaweicloudsdktics/v1/model/show_overview_response.py +203 -0
- huaweicloudsdktics/v1/model/show_partner_statistics_request.py +172 -0
- huaweicloudsdktics/v1/model/show_partner_statistics_response.py +112 -0
- huaweicloudsdktics/v1/model/stage_vo.py +201 -0
- huaweicloudsdktics/v1/model/tics_agent_deploy.py +724 -0
- huaweicloudsdktics/v1/model/tics_agent_deploy_bcs.py +289 -0
- huaweicloudsdktics/v1/model/tics_agent_deploy_detail.py +463 -0
- huaweicloudsdktics/v1/model/tics_agent_nat_common_info.py +202 -0
- huaweicloudsdktics/v1/model/tics_agent_node_info.py +492 -0
- huaweicloudsdktics/v1/model/tics_approve_log_vo.py +484 -0
- huaweicloudsdktics/v1/model/tics_dataset_column.py +405 -0
- huaweicloudsdktics/v1/model/tics_job_instance_vo.py +401 -0
- huaweicloudsdktics/v1/model/tics_league_audit_log.py +376 -0
- huaweicloudsdktics/v1/model/tics_league_list_vo.py +543 -0
- huaweicloudsdktics/v1/model/tics_league_notice_vo.py +430 -0
- huaweicloudsdktics/v1/model/tics_league_partner_vo.py +202 -0
- huaweicloudsdktics/v1/model/tics_sql_job_vo.py +483 -0
- huaweicloudsdktics/v1/model/tics_trust_info_vo.py +347 -0
- huaweicloudsdktics/v1/model/update_league_request.py +139 -0
- huaweicloudsdktics/v1/model/update_league_response.py +112 -0
- huaweicloudsdktics/v1/region/__init__.py +0 -0
- huaweicloudsdktics/v1/region/tics_region.py +34 -0
- huaweicloudsdktics/v1/tics_async_client.py +1382 -0
- huaweicloudsdktics/v1/tics_client.py +1379 -0
- huaweicloudsdktics-3.1.160.dist-info/LICENSE +13 -0
- huaweicloudsdktics-3.1.160.dist-info/METADATA +26 -0
- huaweicloudsdktics-3.1.160.dist-info/RECORD +78 -0
- huaweicloudsdktics-3.1.160.dist-info/WHEEL +5 -0
- huaweicloudsdktics-3.1.160.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
import six
|
|
4
|
+
|
|
5
|
+
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class TicsJobInstanceVo:
|
|
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
|
+
'end_time': 'datetime',
|
|
21
|
+
'ext': 'str',
|
|
22
|
+
'id': 'str',
|
|
23
|
+
'is_single_predict': 'bool',
|
|
24
|
+
'job_instance_type': 'str',
|
|
25
|
+
'job_name': 'str',
|
|
26
|
+
'job_partner': 'str',
|
|
27
|
+
'result_ext': 'str',
|
|
28
|
+
'round_id': 'int',
|
|
29
|
+
'start_time': 'datetime',
|
|
30
|
+
'status': 'str'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
attribute_map = {
|
|
34
|
+
'end_time': 'end_time',
|
|
35
|
+
'ext': 'ext',
|
|
36
|
+
'id': 'id',
|
|
37
|
+
'is_single_predict': 'is_single_predict',
|
|
38
|
+
'job_instance_type': 'job_instance_type',
|
|
39
|
+
'job_name': 'job_name',
|
|
40
|
+
'job_partner': 'job_partner',
|
|
41
|
+
'result_ext': 'result_ext',
|
|
42
|
+
'round_id': 'round_id',
|
|
43
|
+
'start_time': 'start_time',
|
|
44
|
+
'status': 'status'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
def __init__(self, end_time=None, ext=None, id=None, is_single_predict=None, job_instance_type=None, job_name=None, job_partner=None, result_ext=None, round_id=None, start_time=None, status=None):
|
|
48
|
+
r"""TicsJobInstanceVo
|
|
49
|
+
|
|
50
|
+
The model defined in huaweicloud sdk
|
|
51
|
+
|
|
52
|
+
:param end_time: 结束时间
|
|
53
|
+
:type end_time: datetime
|
|
54
|
+
:param ext: 参数等额外信息
|
|
55
|
+
:type ext: str
|
|
56
|
+
:param id: 实例id
|
|
57
|
+
:type id: str
|
|
58
|
+
:param is_single_predict: 单方还是双方预测
|
|
59
|
+
:type is_single_predict: bool
|
|
60
|
+
:param job_instance_type: 作业类型,HFL.横向联邦,SQL.联邦分析,VFL_EVALUATE.联邦评估,VFL_FEATURE_SELECTION.特征选择,VFL_ID_TRUNCATION.Id截断,VFL_PREDICT.联邦预测,VFL_SAMPLE_ALIGNMENT.样本对齐,VFL_TRAIN.联邦训练
|
|
61
|
+
:type job_instance_type: str
|
|
62
|
+
:param job_name: 作业名称
|
|
63
|
+
:type job_name: str
|
|
64
|
+
:param job_partner: 参与方信息
|
|
65
|
+
:type job_partner: str
|
|
66
|
+
:param result_ext: 参数等额外信息
|
|
67
|
+
:type result_ext: str
|
|
68
|
+
:param round_id: 作业执行总轮数
|
|
69
|
+
:type round_id: int
|
|
70
|
+
:param start_time: 开始时间
|
|
71
|
+
:type start_time: datetime
|
|
72
|
+
:param status: 作业、任务状态,作业任务状态,NEW.新建,SUBMITING.提交中,ACCEPTED.已接收,DEPLOYING.部署中,RUNNING.运行中,SUCCEEDED.成功,FAILED.失败,TERMINATED.中止,TERMINATING.中止中,PENDING.等待中
|
|
73
|
+
:type status: str
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
self._end_time = None
|
|
79
|
+
self._ext = None
|
|
80
|
+
self._id = None
|
|
81
|
+
self._is_single_predict = None
|
|
82
|
+
self._job_instance_type = None
|
|
83
|
+
self._job_name = None
|
|
84
|
+
self._job_partner = None
|
|
85
|
+
self._result_ext = None
|
|
86
|
+
self._round_id = None
|
|
87
|
+
self._start_time = None
|
|
88
|
+
self._status = None
|
|
89
|
+
self.discriminator = None
|
|
90
|
+
|
|
91
|
+
if end_time is not None:
|
|
92
|
+
self.end_time = end_time
|
|
93
|
+
if ext is not None:
|
|
94
|
+
self.ext = ext
|
|
95
|
+
self.id = id
|
|
96
|
+
if is_single_predict is not None:
|
|
97
|
+
self.is_single_predict = is_single_predict
|
|
98
|
+
self.job_instance_type = job_instance_type
|
|
99
|
+
self.job_name = job_name
|
|
100
|
+
if job_partner is not None:
|
|
101
|
+
self.job_partner = job_partner
|
|
102
|
+
if result_ext is not None:
|
|
103
|
+
self.result_ext = result_ext
|
|
104
|
+
if round_id is not None:
|
|
105
|
+
self.round_id = round_id
|
|
106
|
+
if start_time is not None:
|
|
107
|
+
self.start_time = start_time
|
|
108
|
+
self.status = status
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def end_time(self):
|
|
112
|
+
r"""Gets the end_time of this TicsJobInstanceVo.
|
|
113
|
+
|
|
114
|
+
结束时间
|
|
115
|
+
|
|
116
|
+
:return: The end_time of this TicsJobInstanceVo.
|
|
117
|
+
:rtype: datetime
|
|
118
|
+
"""
|
|
119
|
+
return self._end_time
|
|
120
|
+
|
|
121
|
+
@end_time.setter
|
|
122
|
+
def end_time(self, end_time):
|
|
123
|
+
r"""Sets the end_time of this TicsJobInstanceVo.
|
|
124
|
+
|
|
125
|
+
结束时间
|
|
126
|
+
|
|
127
|
+
:param end_time: The end_time of this TicsJobInstanceVo.
|
|
128
|
+
:type end_time: datetime
|
|
129
|
+
"""
|
|
130
|
+
self._end_time = end_time
|
|
131
|
+
|
|
132
|
+
@property
|
|
133
|
+
def ext(self):
|
|
134
|
+
r"""Gets the ext of this TicsJobInstanceVo.
|
|
135
|
+
|
|
136
|
+
参数等额外信息
|
|
137
|
+
|
|
138
|
+
:return: The ext of this TicsJobInstanceVo.
|
|
139
|
+
:rtype: str
|
|
140
|
+
"""
|
|
141
|
+
return self._ext
|
|
142
|
+
|
|
143
|
+
@ext.setter
|
|
144
|
+
def ext(self, ext):
|
|
145
|
+
r"""Sets the ext of this TicsJobInstanceVo.
|
|
146
|
+
|
|
147
|
+
参数等额外信息
|
|
148
|
+
|
|
149
|
+
:param ext: The ext of this TicsJobInstanceVo.
|
|
150
|
+
:type ext: str
|
|
151
|
+
"""
|
|
152
|
+
self._ext = ext
|
|
153
|
+
|
|
154
|
+
@property
|
|
155
|
+
def id(self):
|
|
156
|
+
r"""Gets the id of this TicsJobInstanceVo.
|
|
157
|
+
|
|
158
|
+
实例id
|
|
159
|
+
|
|
160
|
+
:return: The id of this TicsJobInstanceVo.
|
|
161
|
+
:rtype: str
|
|
162
|
+
"""
|
|
163
|
+
return self._id
|
|
164
|
+
|
|
165
|
+
@id.setter
|
|
166
|
+
def id(self, id):
|
|
167
|
+
r"""Sets the id of this TicsJobInstanceVo.
|
|
168
|
+
|
|
169
|
+
实例id
|
|
170
|
+
|
|
171
|
+
:param id: The id of this TicsJobInstanceVo.
|
|
172
|
+
:type id: str
|
|
173
|
+
"""
|
|
174
|
+
self._id = id
|
|
175
|
+
|
|
176
|
+
@property
|
|
177
|
+
def is_single_predict(self):
|
|
178
|
+
r"""Gets the is_single_predict of this TicsJobInstanceVo.
|
|
179
|
+
|
|
180
|
+
单方还是双方预测
|
|
181
|
+
|
|
182
|
+
:return: The is_single_predict of this TicsJobInstanceVo.
|
|
183
|
+
:rtype: bool
|
|
184
|
+
"""
|
|
185
|
+
return self._is_single_predict
|
|
186
|
+
|
|
187
|
+
@is_single_predict.setter
|
|
188
|
+
def is_single_predict(self, is_single_predict):
|
|
189
|
+
r"""Sets the is_single_predict of this TicsJobInstanceVo.
|
|
190
|
+
|
|
191
|
+
单方还是双方预测
|
|
192
|
+
|
|
193
|
+
:param is_single_predict: The is_single_predict of this TicsJobInstanceVo.
|
|
194
|
+
:type is_single_predict: bool
|
|
195
|
+
"""
|
|
196
|
+
self._is_single_predict = is_single_predict
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
def job_instance_type(self):
|
|
200
|
+
r"""Gets the job_instance_type of this TicsJobInstanceVo.
|
|
201
|
+
|
|
202
|
+
作业类型,HFL.横向联邦,SQL.联邦分析,VFL_EVALUATE.联邦评估,VFL_FEATURE_SELECTION.特征选择,VFL_ID_TRUNCATION.Id截断,VFL_PREDICT.联邦预测,VFL_SAMPLE_ALIGNMENT.样本对齐,VFL_TRAIN.联邦训练
|
|
203
|
+
|
|
204
|
+
:return: The job_instance_type of this TicsJobInstanceVo.
|
|
205
|
+
:rtype: str
|
|
206
|
+
"""
|
|
207
|
+
return self._job_instance_type
|
|
208
|
+
|
|
209
|
+
@job_instance_type.setter
|
|
210
|
+
def job_instance_type(self, job_instance_type):
|
|
211
|
+
r"""Sets the job_instance_type of this TicsJobInstanceVo.
|
|
212
|
+
|
|
213
|
+
作业类型,HFL.横向联邦,SQL.联邦分析,VFL_EVALUATE.联邦评估,VFL_FEATURE_SELECTION.特征选择,VFL_ID_TRUNCATION.Id截断,VFL_PREDICT.联邦预测,VFL_SAMPLE_ALIGNMENT.样本对齐,VFL_TRAIN.联邦训练
|
|
214
|
+
|
|
215
|
+
:param job_instance_type: The job_instance_type of this TicsJobInstanceVo.
|
|
216
|
+
:type job_instance_type: str
|
|
217
|
+
"""
|
|
218
|
+
self._job_instance_type = job_instance_type
|
|
219
|
+
|
|
220
|
+
@property
|
|
221
|
+
def job_name(self):
|
|
222
|
+
r"""Gets the job_name of this TicsJobInstanceVo.
|
|
223
|
+
|
|
224
|
+
作业名称
|
|
225
|
+
|
|
226
|
+
:return: The job_name of this TicsJobInstanceVo.
|
|
227
|
+
:rtype: str
|
|
228
|
+
"""
|
|
229
|
+
return self._job_name
|
|
230
|
+
|
|
231
|
+
@job_name.setter
|
|
232
|
+
def job_name(self, job_name):
|
|
233
|
+
r"""Sets the job_name of this TicsJobInstanceVo.
|
|
234
|
+
|
|
235
|
+
作业名称
|
|
236
|
+
|
|
237
|
+
:param job_name: The job_name of this TicsJobInstanceVo.
|
|
238
|
+
:type job_name: str
|
|
239
|
+
"""
|
|
240
|
+
self._job_name = job_name
|
|
241
|
+
|
|
242
|
+
@property
|
|
243
|
+
def job_partner(self):
|
|
244
|
+
r"""Gets the job_partner of this TicsJobInstanceVo.
|
|
245
|
+
|
|
246
|
+
参与方信息
|
|
247
|
+
|
|
248
|
+
:return: The job_partner of this TicsJobInstanceVo.
|
|
249
|
+
:rtype: str
|
|
250
|
+
"""
|
|
251
|
+
return self._job_partner
|
|
252
|
+
|
|
253
|
+
@job_partner.setter
|
|
254
|
+
def job_partner(self, job_partner):
|
|
255
|
+
r"""Sets the job_partner of this TicsJobInstanceVo.
|
|
256
|
+
|
|
257
|
+
参与方信息
|
|
258
|
+
|
|
259
|
+
:param job_partner: The job_partner of this TicsJobInstanceVo.
|
|
260
|
+
:type job_partner: str
|
|
261
|
+
"""
|
|
262
|
+
self._job_partner = job_partner
|
|
263
|
+
|
|
264
|
+
@property
|
|
265
|
+
def result_ext(self):
|
|
266
|
+
r"""Gets the result_ext of this TicsJobInstanceVo.
|
|
267
|
+
|
|
268
|
+
参数等额外信息
|
|
269
|
+
|
|
270
|
+
:return: The result_ext of this TicsJobInstanceVo.
|
|
271
|
+
:rtype: str
|
|
272
|
+
"""
|
|
273
|
+
return self._result_ext
|
|
274
|
+
|
|
275
|
+
@result_ext.setter
|
|
276
|
+
def result_ext(self, result_ext):
|
|
277
|
+
r"""Sets the result_ext of this TicsJobInstanceVo.
|
|
278
|
+
|
|
279
|
+
参数等额外信息
|
|
280
|
+
|
|
281
|
+
:param result_ext: The result_ext of this TicsJobInstanceVo.
|
|
282
|
+
:type result_ext: str
|
|
283
|
+
"""
|
|
284
|
+
self._result_ext = result_ext
|
|
285
|
+
|
|
286
|
+
@property
|
|
287
|
+
def round_id(self):
|
|
288
|
+
r"""Gets the round_id of this TicsJobInstanceVo.
|
|
289
|
+
|
|
290
|
+
作业执行总轮数
|
|
291
|
+
|
|
292
|
+
:return: The round_id of this TicsJobInstanceVo.
|
|
293
|
+
:rtype: int
|
|
294
|
+
"""
|
|
295
|
+
return self._round_id
|
|
296
|
+
|
|
297
|
+
@round_id.setter
|
|
298
|
+
def round_id(self, round_id):
|
|
299
|
+
r"""Sets the round_id of this TicsJobInstanceVo.
|
|
300
|
+
|
|
301
|
+
作业执行总轮数
|
|
302
|
+
|
|
303
|
+
:param round_id: The round_id of this TicsJobInstanceVo.
|
|
304
|
+
:type round_id: int
|
|
305
|
+
"""
|
|
306
|
+
self._round_id = round_id
|
|
307
|
+
|
|
308
|
+
@property
|
|
309
|
+
def start_time(self):
|
|
310
|
+
r"""Gets the start_time of this TicsJobInstanceVo.
|
|
311
|
+
|
|
312
|
+
开始时间
|
|
313
|
+
|
|
314
|
+
:return: The start_time of this TicsJobInstanceVo.
|
|
315
|
+
:rtype: datetime
|
|
316
|
+
"""
|
|
317
|
+
return self._start_time
|
|
318
|
+
|
|
319
|
+
@start_time.setter
|
|
320
|
+
def start_time(self, start_time):
|
|
321
|
+
r"""Sets the start_time of this TicsJobInstanceVo.
|
|
322
|
+
|
|
323
|
+
开始时间
|
|
324
|
+
|
|
325
|
+
:param start_time: The start_time of this TicsJobInstanceVo.
|
|
326
|
+
:type start_time: datetime
|
|
327
|
+
"""
|
|
328
|
+
self._start_time = start_time
|
|
329
|
+
|
|
330
|
+
@property
|
|
331
|
+
def status(self):
|
|
332
|
+
r"""Gets the status of this TicsJobInstanceVo.
|
|
333
|
+
|
|
334
|
+
作业、任务状态,作业任务状态,NEW.新建,SUBMITING.提交中,ACCEPTED.已接收,DEPLOYING.部署中,RUNNING.运行中,SUCCEEDED.成功,FAILED.失败,TERMINATED.中止,TERMINATING.中止中,PENDING.等待中
|
|
335
|
+
|
|
336
|
+
:return: The status of this TicsJobInstanceVo.
|
|
337
|
+
:rtype: str
|
|
338
|
+
"""
|
|
339
|
+
return self._status
|
|
340
|
+
|
|
341
|
+
@status.setter
|
|
342
|
+
def status(self, status):
|
|
343
|
+
r"""Sets the status of this TicsJobInstanceVo.
|
|
344
|
+
|
|
345
|
+
作业、任务状态,作业任务状态,NEW.新建,SUBMITING.提交中,ACCEPTED.已接收,DEPLOYING.部署中,RUNNING.运行中,SUCCEEDED.成功,FAILED.失败,TERMINATED.中止,TERMINATING.中止中,PENDING.等待中
|
|
346
|
+
|
|
347
|
+
:param status: The status of this TicsJobInstanceVo.
|
|
348
|
+
:type status: str
|
|
349
|
+
"""
|
|
350
|
+
self._status = status
|
|
351
|
+
|
|
352
|
+
def to_dict(self):
|
|
353
|
+
"""Returns the model properties as a dict"""
|
|
354
|
+
result = {}
|
|
355
|
+
|
|
356
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
357
|
+
value = getattr(self, attr)
|
|
358
|
+
if isinstance(value, list):
|
|
359
|
+
result[attr] = list(map(
|
|
360
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
361
|
+
value
|
|
362
|
+
))
|
|
363
|
+
elif hasattr(value, "to_dict"):
|
|
364
|
+
result[attr] = value.to_dict()
|
|
365
|
+
elif isinstance(value, dict):
|
|
366
|
+
result[attr] = dict(map(
|
|
367
|
+
lambda item: (item[0], item[1].to_dict())
|
|
368
|
+
if hasattr(item[1], "to_dict") else item,
|
|
369
|
+
value.items()
|
|
370
|
+
))
|
|
371
|
+
else:
|
|
372
|
+
if attr in self.sensitive_list:
|
|
373
|
+
result[attr] = "****"
|
|
374
|
+
else:
|
|
375
|
+
result[attr] = value
|
|
376
|
+
|
|
377
|
+
return result
|
|
378
|
+
|
|
379
|
+
def to_str(self):
|
|
380
|
+
"""Returns the string representation of the model"""
|
|
381
|
+
import simplejson as json
|
|
382
|
+
if six.PY2:
|
|
383
|
+
import sys
|
|
384
|
+
reload(sys)
|
|
385
|
+
sys.setdefaultencoding("utf-8")
|
|
386
|
+
return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
|
|
387
|
+
|
|
388
|
+
def __repr__(self):
|
|
389
|
+
"""For `print`"""
|
|
390
|
+
return self.to_str()
|
|
391
|
+
|
|
392
|
+
def __eq__(self, other):
|
|
393
|
+
"""Returns true if both objects are equal"""
|
|
394
|
+
if not isinstance(other, TicsJobInstanceVo):
|
|
395
|
+
return False
|
|
396
|
+
|
|
397
|
+
return self.__dict__ == other.__dict__
|
|
398
|
+
|
|
399
|
+
def __ne__(self, other):
|
|
400
|
+
"""Returns true if both objects are not equal"""
|
|
401
|
+
return not self == other
|