huaweicloudsdkoroas 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.
@@ -0,0 +1,348 @@
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 ShowTaskResponse(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
+ 'task_id': 'str',
22
+ 'status': 'str',
23
+ 'input_json': 'object',
24
+ 'input_url': 'str',
25
+ 'start_time': 'datetime',
26
+ 'end_time': 'datetime',
27
+ 'create_time': 'datetime',
28
+ 'output_json': 'object',
29
+ 'output_url': 'str'
30
+ }
31
+
32
+ attribute_map = {
33
+ 'task_id': 'task_id',
34
+ 'status': 'status',
35
+ 'input_json': 'input_json',
36
+ 'input_url': 'input_url',
37
+ 'start_time': 'start_time',
38
+ 'end_time': 'end_time',
39
+ 'create_time': 'create_time',
40
+ 'output_json': 'output_json',
41
+ 'output_url': 'output_url'
42
+ }
43
+
44
+ def __init__(self, task_id=None, status=None, input_json=None, input_url=None, start_time=None, end_time=None, create_time=None, output_json=None, output_url=None):
45
+ r"""ShowTaskResponse
46
+
47
+ The model defined in huaweicloud sdk
48
+
49
+ :param task_id: 任务编号
50
+ :type task_id: str
51
+ :param status: 任务运行状态,暂考虑取值仅为 Running/Failed/Successed
52
+ :type status: str
53
+ :param input_json: 如果提交任务使用了input_enable参数,并且创建任务使用的是json格式非文件方式,该值为输入的字符串; 对应数据结构参见创建任务时的结构体
54
+ :type input_json: object
55
+ :param input_url: 如果提交任务使用了input_enable参数,并且创建任务使用的是文件方式,该值为OBS对应的文件绝对路径
56
+ :type input_url: str
57
+ :param start_time: 开始时间(UTC)
58
+ :type start_time: datetime
59
+ :param end_time: 结束时间(UTC)
60
+ :type end_time: datetime
61
+ :param create_time: 创建时间(UTC)
62
+ :type create_time: datetime
63
+ :param output_json: 任务处理结果,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接拷贝算法服务返回信息、
64
+ :type output_json: object
65
+ :param output_url: 任务结果文件对应的绝对地址,具体值由租户OBS对应的待存储路径前缀和文件名组成,文件名服务端固定用task_id命名
66
+ :type output_url: str
67
+ """
68
+
69
+ super(ShowTaskResponse, self).__init__()
70
+
71
+ self._task_id = None
72
+ self._status = None
73
+ self._input_json = None
74
+ self._input_url = None
75
+ self._start_time = None
76
+ self._end_time = None
77
+ self._create_time = None
78
+ self._output_json = None
79
+ self._output_url = None
80
+ self.discriminator = None
81
+
82
+ if task_id is not None:
83
+ self.task_id = task_id
84
+ if status is not None:
85
+ self.status = status
86
+ if input_json is not None:
87
+ self.input_json = input_json
88
+ if input_url is not None:
89
+ self.input_url = input_url
90
+ if start_time is not None:
91
+ self.start_time = start_time
92
+ if end_time is not None:
93
+ self.end_time = end_time
94
+ if create_time is not None:
95
+ self.create_time = create_time
96
+ if output_json is not None:
97
+ self.output_json = output_json
98
+ if output_url is not None:
99
+ self.output_url = output_url
100
+
101
+ @property
102
+ def task_id(self):
103
+ r"""Gets the task_id of this ShowTaskResponse.
104
+
105
+ 任务编号
106
+
107
+ :return: The task_id of this ShowTaskResponse.
108
+ :rtype: str
109
+ """
110
+ return self._task_id
111
+
112
+ @task_id.setter
113
+ def task_id(self, task_id):
114
+ r"""Sets the task_id of this ShowTaskResponse.
115
+
116
+ 任务编号
117
+
118
+ :param task_id: The task_id of this ShowTaskResponse.
119
+ :type task_id: str
120
+ """
121
+ self._task_id = task_id
122
+
123
+ @property
124
+ def status(self):
125
+ r"""Gets the status of this ShowTaskResponse.
126
+
127
+ 任务运行状态,暂考虑取值仅为 Running/Failed/Successed
128
+
129
+ :return: The status of this ShowTaskResponse.
130
+ :rtype: str
131
+ """
132
+ return self._status
133
+
134
+ @status.setter
135
+ def status(self, status):
136
+ r"""Sets the status of this ShowTaskResponse.
137
+
138
+ 任务运行状态,暂考虑取值仅为 Running/Failed/Successed
139
+
140
+ :param status: The status of this ShowTaskResponse.
141
+ :type status: str
142
+ """
143
+ self._status = status
144
+
145
+ @property
146
+ def input_json(self):
147
+ r"""Gets the input_json of this ShowTaskResponse.
148
+
149
+ 如果提交任务使用了input_enable参数,并且创建任务使用的是json格式非文件方式,该值为输入的字符串; 对应数据结构参见创建任务时的结构体
150
+
151
+ :return: The input_json of this ShowTaskResponse.
152
+ :rtype: object
153
+ """
154
+ return self._input_json
155
+
156
+ @input_json.setter
157
+ def input_json(self, input_json):
158
+ r"""Sets the input_json of this ShowTaskResponse.
159
+
160
+ 如果提交任务使用了input_enable参数,并且创建任务使用的是json格式非文件方式,该值为输入的字符串; 对应数据结构参见创建任务时的结构体
161
+
162
+ :param input_json: The input_json of this ShowTaskResponse.
163
+ :type input_json: object
164
+ """
165
+ self._input_json = input_json
166
+
167
+ @property
168
+ def input_url(self):
169
+ r"""Gets the input_url of this ShowTaskResponse.
170
+
171
+ 如果提交任务使用了input_enable参数,并且创建任务使用的是文件方式,该值为OBS对应的文件绝对路径
172
+
173
+ :return: The input_url of this ShowTaskResponse.
174
+ :rtype: str
175
+ """
176
+ return self._input_url
177
+
178
+ @input_url.setter
179
+ def input_url(self, input_url):
180
+ r"""Sets the input_url of this ShowTaskResponse.
181
+
182
+ 如果提交任务使用了input_enable参数,并且创建任务使用的是文件方式,该值为OBS对应的文件绝对路径
183
+
184
+ :param input_url: The input_url of this ShowTaskResponse.
185
+ :type input_url: str
186
+ """
187
+ self._input_url = input_url
188
+
189
+ @property
190
+ def start_time(self):
191
+ r"""Gets the start_time of this ShowTaskResponse.
192
+
193
+ 开始时间(UTC)
194
+
195
+ :return: The start_time of this ShowTaskResponse.
196
+ :rtype: datetime
197
+ """
198
+ return self._start_time
199
+
200
+ @start_time.setter
201
+ def start_time(self, start_time):
202
+ r"""Sets the start_time of this ShowTaskResponse.
203
+
204
+ 开始时间(UTC)
205
+
206
+ :param start_time: The start_time of this ShowTaskResponse.
207
+ :type start_time: datetime
208
+ """
209
+ self._start_time = start_time
210
+
211
+ @property
212
+ def end_time(self):
213
+ r"""Gets the end_time of this ShowTaskResponse.
214
+
215
+ 结束时间(UTC)
216
+
217
+ :return: The end_time of this ShowTaskResponse.
218
+ :rtype: datetime
219
+ """
220
+ return self._end_time
221
+
222
+ @end_time.setter
223
+ def end_time(self, end_time):
224
+ r"""Sets the end_time of this ShowTaskResponse.
225
+
226
+ 结束时间(UTC)
227
+
228
+ :param end_time: The end_time of this ShowTaskResponse.
229
+ :type end_time: datetime
230
+ """
231
+ self._end_time = end_time
232
+
233
+ @property
234
+ def create_time(self):
235
+ r"""Gets the create_time of this ShowTaskResponse.
236
+
237
+ 创建时间(UTC)
238
+
239
+ :return: The create_time of this ShowTaskResponse.
240
+ :rtype: datetime
241
+ """
242
+ return self._create_time
243
+
244
+ @create_time.setter
245
+ def create_time(self, create_time):
246
+ r"""Sets the create_time of this ShowTaskResponse.
247
+
248
+ 创建时间(UTC)
249
+
250
+ :param create_time: The create_time of this ShowTaskResponse.
251
+ :type create_time: datetime
252
+ """
253
+ self._create_time = create_time
254
+
255
+ @property
256
+ def output_json(self):
257
+ r"""Gets the output_json of this ShowTaskResponse.
258
+
259
+ 任务处理结果,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接拷贝算法服务返回信息、
260
+
261
+ :return: The output_json of this ShowTaskResponse.
262
+ :rtype: object
263
+ """
264
+ return self._output_json
265
+
266
+ @output_json.setter
267
+ def output_json(self, output_json):
268
+ r"""Sets the output_json of this ShowTaskResponse.
269
+
270
+ 任务处理结果,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接拷贝算法服务返回信息、
271
+
272
+ :param output_json: The output_json of this ShowTaskResponse.
273
+ :type output_json: object
274
+ """
275
+ self._output_json = output_json
276
+
277
+ @property
278
+ def output_url(self):
279
+ r"""Gets the output_url of this ShowTaskResponse.
280
+
281
+ 任务结果文件对应的绝对地址,具体值由租户OBS对应的待存储路径前缀和文件名组成,文件名服务端固定用task_id命名
282
+
283
+ :return: The output_url of this ShowTaskResponse.
284
+ :rtype: str
285
+ """
286
+ return self._output_url
287
+
288
+ @output_url.setter
289
+ def output_url(self, output_url):
290
+ r"""Sets the output_url of this ShowTaskResponse.
291
+
292
+ 任务结果文件对应的绝对地址,具体值由租户OBS对应的待存储路径前缀和文件名组成,文件名服务端固定用task_id命名
293
+
294
+ :param output_url: The output_url of this ShowTaskResponse.
295
+ :type output_url: str
296
+ """
297
+ self._output_url = output_url
298
+
299
+ def to_dict(self):
300
+ """Returns the model properties as a dict"""
301
+ result = {}
302
+
303
+ for attr, _ in six.iteritems(self.openapi_types):
304
+ value = getattr(self, attr)
305
+ if isinstance(value, list):
306
+ result[attr] = list(map(
307
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
308
+ value
309
+ ))
310
+ elif hasattr(value, "to_dict"):
311
+ result[attr] = value.to_dict()
312
+ elif isinstance(value, dict):
313
+ result[attr] = dict(map(
314
+ lambda item: (item[0], item[1].to_dict())
315
+ if hasattr(item[1], "to_dict") else item,
316
+ value.items()
317
+ ))
318
+ else:
319
+ if attr in self.sensitive_list:
320
+ result[attr] = "****"
321
+ else:
322
+ result[attr] = value
323
+
324
+ return result
325
+
326
+ def to_str(self):
327
+ """Returns the string representation of the model"""
328
+ import simplejson as json
329
+ if six.PY2:
330
+ import sys
331
+ reload(sys)
332
+ sys.setdefaultencoding("utf-8")
333
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
334
+
335
+ def __repr__(self):
336
+ """For `print`"""
337
+ return self.to_str()
338
+
339
+ def __eq__(self, other):
340
+ """Returns true if both objects are equal"""
341
+ if not isinstance(other, ShowTaskResponse):
342
+ return False
343
+
344
+ return self.__dict__ == other.__dict__
345
+
346
+ def __ne__(self, other):
347
+ """Returns true if both objects are not equal"""
348
+ return not self == other
@@ -0,0 +1,172 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class TaskDto:
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
+ 'input_json': 'object',
21
+ 'input_url': 'str',
22
+ 'output_url': 'str'
23
+ }
24
+
25
+ attribute_map = {
26
+ 'input_json': 'input_json',
27
+ 'input_url': 'input_url',
28
+ 'output_url': 'output_url'
29
+ }
30
+
31
+ def __init__(self, input_json=None, input_url=None, output_url=None):
32
+ r"""TaskDto
33
+
34
+ The model defined in huaweicloud sdk
35
+
36
+ :param input_json: 任务输入信息,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接透传给子服务REST API处理(参数合法性校验 只能子服务镜像内进行;当前算法镜像提供单独校验接口和处理接口,后续待统一交互机制)
37
+ :type input_json: object
38
+ :param input_url: 任务输入信息为文件格式,传入值为租户OBS对应的文件绝对路径;在请求信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用(和input_json二选一),暂不开放该功能
39
+ :type input_url: str
40
+ :param output_url: 任务输出信息为文件格式,传入值为租户OBS对应的待存储路径前缀(和input_url成对使用),文件名服务端固定用task_id命名;在响应信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用,暂不开放该功能
41
+ :type output_url: str
42
+ """
43
+
44
+
45
+
46
+ self._input_json = None
47
+ self._input_url = None
48
+ self._output_url = None
49
+ self.discriminator = None
50
+
51
+ self.input_json = input_json
52
+ if input_url is not None:
53
+ self.input_url = input_url
54
+ if output_url is not None:
55
+ self.output_url = output_url
56
+
57
+ @property
58
+ def input_json(self):
59
+ r"""Gets the input_json of this TaskDto.
60
+
61
+ 任务输入信息,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接透传给子服务REST API处理(参数合法性校验 只能子服务镜像内进行;当前算法镜像提供单独校验接口和处理接口,后续待统一交互机制)
62
+
63
+ :return: The input_json of this TaskDto.
64
+ :rtype: object
65
+ """
66
+ return self._input_json
67
+
68
+ @input_json.setter
69
+ def input_json(self, input_json):
70
+ r"""Sets the input_json of this TaskDto.
71
+
72
+ 任务输入信息,json格式;每个子服务该对象结构不同,框架层不解析具体key,运行态直接透传给子服务REST API处理(参数合法性校验 只能子服务镜像内进行;当前算法镜像提供单独校验接口和处理接口,后续待统一交互机制)
73
+
74
+ :param input_json: The input_json of this TaskDto.
75
+ :type input_json: object
76
+ """
77
+ self._input_json = input_json
78
+
79
+ @property
80
+ def input_url(self):
81
+ r"""Gets the input_url of this TaskDto.
82
+
83
+ 任务输入信息为文件格式,传入值为租户OBS对应的文件绝对路径;在请求信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用(和input_json二选一),暂不开放该功能
84
+
85
+ :return: The input_url of this TaskDto.
86
+ :rtype: str
87
+ """
88
+ return self._input_url
89
+
90
+ @input_url.setter
91
+ def input_url(self, input_url):
92
+ r"""Sets the input_url of this TaskDto.
93
+
94
+ 任务输入信息为文件格式,传入值为租户OBS对应的文件绝对路径;在请求信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用(和input_json二选一),暂不开放该功能
95
+
96
+ :param input_url: The input_url of this TaskDto.
97
+ :type input_url: str
98
+ """
99
+ self._input_url = input_url
100
+
101
+ @property
102
+ def output_url(self):
103
+ r"""Gets the output_url of this TaskDto.
104
+
105
+ 任务输出信息为文件格式,传入值为租户OBS对应的待存储路径前缀(和input_url成对使用),文件名服务端固定用task_id命名;在响应信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用,暂不开放该功能
106
+
107
+ :return: The output_url of this TaskDto.
108
+ :rtype: str
109
+ """
110
+ return self._output_url
111
+
112
+ @output_url.setter
113
+ def output_url(self, output_url):
114
+ r"""Sets the output_url of this TaskDto.
115
+
116
+ 任务输出信息为文件格式,传入值为租户OBS对应的待存储路径前缀(和input_url成对使用),文件名服务端固定用task_id命名;在响应信息大于12MB情形使用该参数,需用户在Console进行OBS委托授权方可使用,暂不开放该功能
117
+
118
+ :param output_url: The output_url of this TaskDto.
119
+ :type output_url: str
120
+ """
121
+ self._output_url = output_url
122
+
123
+ def to_dict(self):
124
+ """Returns the model properties as a dict"""
125
+ result = {}
126
+
127
+ for attr, _ in six.iteritems(self.openapi_types):
128
+ value = getattr(self, attr)
129
+ if isinstance(value, list):
130
+ result[attr] = list(map(
131
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
132
+ value
133
+ ))
134
+ elif hasattr(value, "to_dict"):
135
+ result[attr] = value.to_dict()
136
+ elif isinstance(value, dict):
137
+ result[attr] = dict(map(
138
+ lambda item: (item[0], item[1].to_dict())
139
+ if hasattr(item[1], "to_dict") else item,
140
+ value.items()
141
+ ))
142
+ else:
143
+ if attr in self.sensitive_list:
144
+ result[attr] = "****"
145
+ else:
146
+ result[attr] = value
147
+
148
+ return result
149
+
150
+ def to_str(self):
151
+ """Returns the string representation of the model"""
152
+ import simplejson as json
153
+ if six.PY2:
154
+ import sys
155
+ reload(sys)
156
+ sys.setdefaultencoding("utf-8")
157
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
158
+
159
+ def __repr__(self):
160
+ """For `print`"""
161
+ return self.to_str()
162
+
163
+ def __eq__(self, other):
164
+ """Returns true if both objects are equal"""
165
+ if not isinstance(other, TaskDto):
166
+ return False
167
+
168
+ return self.__dict__ == other.__dict__
169
+
170
+ def __ne__(self, other):
171
+ """Returns true if both objects are not equal"""
172
+ return not self == other