|
| 1 | +# coding=utf8 |
| 2 | + |
| 3 | +# Copyright 2018 JDCLOUD.COM |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | +# NOTE: This class is auto generated by the jdcloud code generator program. |
| 18 | + |
| 19 | +from jdcloud_sdk.core.jdcloudrequest import JDCloudRequest |
| 20 | + |
| 21 | + |
| 22 | +class AsyncImageScanRequest(JDCloudRequest): |
| 23 | + """ |
| 24 | + 提交图片异步检测任务 |
| 25 | + """ |
| 26 | + |
| 27 | + def __init__(self, parameters, header=None, version="v1"): |
| 28 | + super(AsyncImageScanRequest, self).__init__( |
| 29 | + '/image:asyncscan', 'POST', header, version) |
| 30 | + self.parameters = parameters |
| 31 | + |
| 32 | + |
| 33 | +class AsyncImageScanParameters(object): |
| 34 | + |
| 35 | + def __init__(self, ): |
| 36 | + """ |
| 37 | + """ |
| 38 | + |
| 39 | + self.scenes = None |
| 40 | + self.tasks = None |
| 41 | + self.callback = None |
| 42 | + self.seed = None |
| 43 | + |
| 44 | + def setScenes(self, scenes): |
| 45 | + """ |
| 46 | + :param scenes: (Optional) 指定检测场景 |
| 47 | + """ |
| 48 | + self.scenes = scenes |
| 49 | + |
| 50 | + def setTasks(self, tasks): |
| 51 | + """ |
| 52 | + :param tasks: (Optional) 检测任务列表,包含一个或多个元素。每个元素是个结构体,最多可添加10个元素,每个元素的具体结构描述见ImageTask。 |
| 53 | + """ |
| 54 | + self.tasks = tasks |
| 55 | + |
| 56 | + def setCallback(self, callback): |
| 57 | + """ |
| 58 | + :param callback: (Optional) 异步检测结果回调通知您的URL,支持HTTP/HTTPS。该字段为空时,您必须定时检索检测结果。 |
| 59 | + """ |
| 60 | + self.callback = callback |
| 61 | + |
| 62 | + def setSeed(self, seed): |
| 63 | + """ |
| 64 | + :param seed: (Optional) 随机字符串,该值用于回调通知请求中的签名。当使用callback时,该字段必须提供。 |
| 65 | + """ |
| 66 | + self.seed = seed |
| 67 | + |
0 commit comments