173 lines
4.9 KiB
Python
173 lines
4.9 KiB
Python
# coding: utf-8
|
|
|
|
from __future__ import absolute_import
|
|
from datetime import date, datetime # noqa: F401
|
|
|
|
from typing import List, Dict # noqa: F401
|
|
|
|
from swagger_server.models.base_model_ import Model
|
|
from swagger_server import util
|
|
|
|
|
|
class JobResponse(Model):
|
|
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
|
|
Do not edit the class manually.
|
|
"""
|
|
def __init__(self, job_status: str=None, finished_on: datetime=None, started_on: datetime=None, created_on: datetime=None, job_result: str=None): # noqa: E501
|
|
"""JobResponse - a model defined in Swagger
|
|
|
|
:param job_status: The job_status of this JobResponse. # noqa: E501
|
|
:type job_status: str
|
|
:param finished_on: The finished_on of this JobResponse. # noqa: E501
|
|
:type finished_on: datetime
|
|
:param started_on: The started_on of this JobResponse. # noqa: E501
|
|
:type started_on: datetime
|
|
:param created_on: The created_on of this JobResponse. # noqa: E501
|
|
:type created_on: datetime
|
|
:param job_result: The job_result of this JobResponse. # noqa: E501
|
|
:type job_result: str
|
|
"""
|
|
self.swagger_types = {
|
|
'job_status': str,
|
|
'finished_on': datetime,
|
|
'started_on': datetime,
|
|
'created_on': datetime,
|
|
'job_result': str
|
|
}
|
|
|
|
self.attribute_map = {
|
|
'job_status': 'job_status',
|
|
'finished_on': 'finished_on',
|
|
'started_on': 'started_on',
|
|
'created_on': 'created_on',
|
|
'job_result': 'job_result'
|
|
}
|
|
self._job_status = job_status
|
|
self._finished_on = finished_on
|
|
self._started_on = started_on
|
|
self._created_on = created_on
|
|
self._job_result = job_result
|
|
|
|
@classmethod
|
|
def from_dict(cls, dikt) -> 'JobResponse':
|
|
"""Returns the dict as a model
|
|
|
|
:param dikt: A dict.
|
|
:type: dict
|
|
:return: The JobResponse of this JobResponse. # noqa: E501
|
|
:rtype: JobResponse
|
|
"""
|
|
return util.deserialize_model(dikt, cls)
|
|
|
|
@property
|
|
def job_status(self) -> str:
|
|
"""Gets the job_status of this JobResponse.
|
|
|
|
|
|
:return: The job_status of this JobResponse.
|
|
:rtype: str
|
|
"""
|
|
return self._job_status
|
|
|
|
@job_status.setter
|
|
def job_status(self, job_status: str):
|
|
"""Sets the job_status of this JobResponse.
|
|
|
|
|
|
:param job_status: The job_status of this JobResponse.
|
|
:type job_status: str
|
|
"""
|
|
allowed_values = ["waiting in que", "currently processing", "finished processing (OK)", "finished processing (ERROR)"] # noqa: E501
|
|
if job_status not in allowed_values:
|
|
raise ValueError(
|
|
"Invalid value for `job_status` ({0}), must be one of {1}"
|
|
.format(job_status, allowed_values)
|
|
)
|
|
|
|
self._job_status = job_status
|
|
|
|
@property
|
|
def finished_on(self) -> datetime:
|
|
"""Gets the finished_on of this JobResponse.
|
|
|
|
|
|
:return: The finished_on of this JobResponse.
|
|
:rtype: datetime
|
|
"""
|
|
return self._finished_on
|
|
|
|
@finished_on.setter
|
|
def finished_on(self, finished_on: datetime):
|
|
"""Sets the finished_on of this JobResponse.
|
|
|
|
|
|
:param finished_on: The finished_on of this JobResponse.
|
|
:type finished_on: datetime
|
|
"""
|
|
|
|
self._finished_on = finished_on
|
|
|
|
@property
|
|
def started_on(self) -> datetime:
|
|
"""Gets the started_on of this JobResponse.
|
|
|
|
|
|
:return: The started_on of this JobResponse.
|
|
:rtype: datetime
|
|
"""
|
|
return self._started_on
|
|
|
|
@started_on.setter
|
|
def started_on(self, started_on: datetime):
|
|
"""Sets the started_on of this JobResponse.
|
|
|
|
|
|
:param started_on: The started_on of this JobResponse.
|
|
:type started_on: datetime
|
|
"""
|
|
|
|
self._started_on = started_on
|
|
|
|
@property
|
|
def created_on(self) -> datetime:
|
|
"""Gets the created_on of this JobResponse.
|
|
|
|
|
|
:return: The created_on of this JobResponse.
|
|
:rtype: datetime
|
|
"""
|
|
return self._created_on
|
|
|
|
@created_on.setter
|
|
def created_on(self, created_on: datetime):
|
|
"""Sets the created_on of this JobResponse.
|
|
|
|
|
|
:param created_on: The created_on of this JobResponse.
|
|
:type created_on: datetime
|
|
"""
|
|
|
|
self._created_on = created_on
|
|
|
|
@property
|
|
def job_result(self) -> str:
|
|
"""Gets the job_result of this JobResponse.
|
|
|
|
|
|
:return: The job_result of this JobResponse.
|
|
:rtype: str
|
|
"""
|
|
return self._job_result
|
|
|
|
@job_result.setter
|
|
def job_result(self, job_result: str):
|
|
"""Sets the job_result of this JobResponse.
|
|
|
|
|
|
:param job_result: The job_result of this JobResponse.
|
|
:type job_result: str
|
|
"""
|
|
|
|
self._job_result = job_result
|