1 # Copyright 2019 ZTE Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 class JobHistory(object):
17 def __init__(self, status="", progress="", statusDescription="", errorCode="", responseId=""):
19 self.progress = progress
20 self.statusDescription = statusDescription
21 self.errorCode = errorCode
22 self.responseId = responseId
25 class JobDescriptor(object):
26 def __init__(self, status="", progress=0, statusDescription="", errorCode="", responseId="", responseHistoryList=None):
28 self.progress = progress
29 self.statusDescription = statusDescription
30 self.errorCode = errorCode
31 self.responseId = responseId
32 self.responseHistoryList = responseHistoryList
35 class JobQueryResp(object):
36 def __init__(self, jobId="", responseDescriptor=None):
38 self.responseDescriptor = responseDescriptor
41 class JobUpdReq(object):
42 def __init__(self, progress="", desc="", errcode=""):
43 self.progress = progress
45 self.errcode = errcode
48 self.progress = data["progress"]
49 self.desc = data["desc"]
50 self.errcode = data["errcode"]
53 class JobUpdResp(object):
54 def __init__(self, result="", msg=""):
59 self.result = data["result"]
60 self.msg = data["msg"]