Dodana logika vrste, ustvarjanje job-ov, urejen in popravljen swagger.yaml, poizvedba koncanih job-ov, protibitev statusa ce je koncano ali ne.

This commit is contained in:
Kristjan Žagar
2022-08-12 11:40:37 +02:00
parent 763ca8a7c6
commit 42076386f3
10 changed files with 476 additions and 8 deletions
+142
View File
@@ -0,0 +1,142 @@
# 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, finished_job: bool=None, completed_at: datetime=None, estimated_completion: datetime=None, job_result: str=None): # noqa: E501
"""JobResponse - a model defined in Swagger
:param finished_job: The finished_job of this JobResponse. # noqa: E501
:type finished_job: bool
:param completed_at: The completed_at of this JobResponse. # noqa: E501
:type completed_at: datetime
:param estimated_completion: The estimated_completion of this JobResponse. # noqa: E501
:type estimated_completion: datetime
:param job_result: The job_result of this JobResponse. # noqa: E501
:type job_result: str
"""
self.swagger_types = {
'finished_job': bool,
'completed_at': datetime,
'estimated_completion': datetime,
'job_result': str
}
self.attribute_map = {
'finished_job': 'finished_job',
'completed_at': 'completed_at',
'estimated_completion': 'estimated_completion',
'job_result': 'job_result'
}
self._finished_job = finished_job
self._completed_at = completed_at
self._estimated_completion = estimated_completion
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 finished_job(self) -> bool:
"""Gets the finished_job of this JobResponse.
:return: The finished_job of this JobResponse.
:rtype: bool
"""
return self._finished_job
@finished_job.setter
def finished_job(self, finished_job: bool):
"""Sets the finished_job of this JobResponse.
:param finished_job: The finished_job of this JobResponse.
:type finished_job: bool
"""
if finished_job is None:
raise ValueError("Invalid value for `finished_job`, must not be `None`") # noqa: E501
self._finished_job = finished_job
@property
def completed_at(self) -> datetime:
"""Gets the completed_at of this JobResponse.
:return: The completed_at of this JobResponse.
:rtype: datetime
"""
return self._completed_at
@completed_at.setter
def completed_at(self, completed_at: datetime):
"""Sets the completed_at of this JobResponse.
:param completed_at: The completed_at of this JobResponse.
:type completed_at: datetime
"""
self._completed_at = completed_at
@property
def estimated_completion(self) -> datetime:
"""Gets the estimated_completion of this JobResponse.
:return: The estimated_completion of this JobResponse.
:rtype: datetime
"""
return self._estimated_completion
@estimated_completion.setter
def estimated_completion(self, estimated_completion: datetime):
"""Sets the estimated_completion of this JobResponse.
:param estimated_completion: The estimated_completion of this JobResponse.
:type estimated_completion: datetime
"""
self._estimated_completion = estimated_completion
@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