# coding: utf-8

"""
    LEIA RESTful API for AI

    Leia API  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: contact@leia.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Job(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'application_id': 'str',
        'callback_url': 'str',
        'creation_time': 'datetime',
        'document_ids': 'list[str]',
        'execute_after_id': 'str',
        'finished_time': 'datetime',
        'id': 'str',
        'job_type': 'str',
        'model_id': 'str',
        'parent_job_id': 'str',
        'reason': 'str',
        'result': 'OneOfJobResult',
        'result_type': 'ResultTypes',
        'starting_time': 'datetime',
        'status': 'Statuses'
    }

    attribute_map = {
        'application_id': 'application_id',
        'callback_url': 'callback_url',
        'creation_time': 'creation_time',
        'document_ids': 'document_ids',
        'execute_after_id': 'execute_after_id',
        'finished_time': 'finished_time',
        'id': 'id',
        'job_type': 'job_type',
        'model_id': 'model_id',
        'parent_job_id': 'parent_job_id',
        'reason': 'reason',
        'result': 'result',
        'result_type': 'result_type',
        'starting_time': 'starting_time',
        'status': 'status'
    }

    def __init__(self, application_id=None, callback_url=None, creation_time=None, document_ids=None, execute_after_id=None, finished_time=None, id=None, job_type=None, model_id=None, parent_job_id=None, reason=None, result=None, result_type=None, starting_time=None, status=None):  # noqa: E501
        """Job - a model defined in Swagger"""  # noqa: E501
        self._application_id = None
        self._callback_url = None
        self._creation_time = None
        self._document_ids = None
        self._execute_after_id = None
        self._finished_time = None
        self._id = None
        self._job_type = None
        self._model_id = None
        self._parent_job_id = None
        self._reason = None
        self._result = None
        self._result_type = None
        self._starting_time = None
        self._status = None
        self.discriminator = None
        self.application_id = application_id
        if callback_url is not None:
            self.callback_url = callback_url
        self.creation_time = creation_time
        self.document_ids = document_ids
        if execute_after_id is not None:
            self.execute_after_id = execute_after_id
        if finished_time is not None:
            self.finished_time = finished_time
        self.id = id
        self.job_type = job_type
        if model_id is not None:
            self.model_id = model_id
        if parent_job_id is not None:
            self.parent_job_id = parent_job_id
        if reason is not None:
            self.reason = reason
        if result is not None:
            self.result = result
        if result_type is not None:
            self.result_type = result_type
        if starting_time is not None:
            self.starting_time = starting_time
        self.status = status

    @property
    def application_id(self):
        """Gets the application_id of this Job.  # noqa: E501


        :return: The application_id of this Job.  # noqa: E501
        :rtype: str
        """
        return self._application_id

    @application_id.setter
    def application_id(self, application_id):
        """Sets the application_id of this Job.


        :param application_id: The application_id of this Job.  # noqa: E501
        :type: str
        """
        if application_id is None:
            raise ValueError("Invalid value for `application_id`, must not be `None`")  # noqa: E501

        self._application_id = application_id

    @property
    def callback_url(self):
        """Gets the callback_url of this Job.  # noqa: E501


        :return: The callback_url of this Job.  # noqa: E501
        :rtype: str
        """
        return self._callback_url

    @callback_url.setter
    def callback_url(self, callback_url):
        """Sets the callback_url of this Job.


        :param callback_url: The callback_url of this Job.  # noqa: E501
        :type: str
        """

        self._callback_url = callback_url

    @property
    def creation_time(self):
        """Gets the creation_time of this Job.  # noqa: E501


        :return: The creation_time of this Job.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this Job.


        :param creation_time: The creation_time of this Job.  # noqa: E501
        :type: datetime
        """
        if creation_time is None:
            raise ValueError("Invalid value for `creation_time`, must not be `None`")  # noqa: E501

        self._creation_time = creation_time

    @property
    def document_ids(self):
        """Gets the document_ids of this Job.  # noqa: E501


        :return: The document_ids of this Job.  # noqa: E501
        :rtype: list[str]
        """
        return self._document_ids

    @document_ids.setter
    def document_ids(self, document_ids):
        """Sets the document_ids of this Job.


        :param document_ids: The document_ids of this Job.  # noqa: E501
        :type: list[str]
        """
        if document_ids is None:
            raise ValueError("Invalid value for `document_ids`, must not be `None`")  # noqa: E501

        self._document_ids = document_ids

    @property
    def execute_after_id(self):
        """Gets the execute_after_id of this Job.  # noqa: E501


        :return: The execute_after_id of this Job.  # noqa: E501
        :rtype: str
        """
        return self._execute_after_id

    @execute_after_id.setter
    def execute_after_id(self, execute_after_id):
        """Sets the execute_after_id of this Job.


        :param execute_after_id: The execute_after_id of this Job.  # noqa: E501
        :type: str
        """

        self._execute_after_id = execute_after_id

    @property
    def finished_time(self):
        """Gets the finished_time of this Job.  # noqa: E501


        :return: The finished_time of this Job.  # noqa: E501
        :rtype: datetime
        """
        return self._finished_time

    @finished_time.setter
    def finished_time(self, finished_time):
        """Sets the finished_time of this Job.


        :param finished_time: The finished_time of this Job.  # noqa: E501
        :type: datetime
        """

        self._finished_time = finished_time

    @property
    def id(self):
        """Gets the id of this Job.  # noqa: E501


        :return: The id of this Job.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Job.


        :param id: The id of this Job.  # noqa: E501
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

    @property
    def job_type(self):
        """Gets the job_type of this Job.  # noqa: E501


        :return: The job_type of this Job.  # noqa: E501
        :rtype: str
        """
        return self._job_type

    @job_type.setter
    def job_type(self, job_type):
        """Sets the job_type of this Job.


        :param job_type: The job_type of this Job.  # noqa: E501
        :type: str
        """
        if job_type is None:
            raise ValueError("Invalid value for `job_type`, must not be `None`")  # noqa: E501

        self._job_type = job_type

    @property
    def model_id(self):
        """Gets the model_id of this Job.  # noqa: E501


        :return: The model_id of this Job.  # noqa: E501
        :rtype: str
        """
        return self._model_id

    @model_id.setter
    def model_id(self, model_id):
        """Sets the model_id of this Job.


        :param model_id: The model_id of this Job.  # noqa: E501
        :type: str
        """

        self._model_id = model_id

    @property
    def parent_job_id(self):
        """Gets the parent_job_id of this Job.  # noqa: E501


        :return: The parent_job_id of this Job.  # noqa: E501
        :rtype: str
        """
        return self._parent_job_id

    @parent_job_id.setter
    def parent_job_id(self, parent_job_id):
        """Sets the parent_job_id of this Job.


        :param parent_job_id: The parent_job_id of this Job.  # noqa: E501
        :type: str
        """

        self._parent_job_id = parent_job_id

    @property
    def reason(self):
        """Gets the reason of this Job.  # noqa: E501


        :return: The reason of this Job.  # noqa: E501
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """Sets the reason of this Job.


        :param reason: The reason of this Job.  # noqa: E501
        :type: str
        """

        self._reason = reason

    @property
    def result(self):
        """Gets the result of this Job.  # noqa: E501


        :return: The result of this Job.  # noqa: E501
        :rtype: OneOfJobResult
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this Job.


        :param result: The result of this Job.  # noqa: E501
        :type: OneOfJobResult
        """

        self._result = result

    @property
    def result_type(self):
        """Gets the result_type of this Job.  # noqa: E501


        :return: The result_type of this Job.  # noqa: E501
        :rtype: ResultTypes
        """
        return self._result_type

    @result_type.setter
    def result_type(self, result_type):
        """Sets the result_type of this Job.


        :param result_type: The result_type of this Job.  # noqa: E501
        :type: ResultTypes
        """

        self._result_type = result_type

    @property
    def starting_time(self):
        """Gets the starting_time of this Job.  # noqa: E501


        :return: The starting_time of this Job.  # noqa: E501
        :rtype: datetime
        """
        return self._starting_time

    @starting_time.setter
    def starting_time(self, starting_time):
        """Sets the starting_time of this Job.


        :param starting_time: The starting_time of this Job.  # noqa: E501
        :type: datetime
        """

        self._starting_time = starting_time

    @property
    def status(self):
        """Gets the status of this Job.  # noqa: E501


        :return: The status of this Job.  # noqa: E501
        :rtype: Statuses
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Job.


        :param status: The status of this Job.  # noqa: E501
        :type: Statuses
        """
        if status is None:
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501

        self._status = status

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Job, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Job):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
