# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

    OpenAPI spec version: v3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class JobResponse(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 = {
        'id': 'str',
        'enqueued_time': 'datetime',
        'finished_time': 'datetime',
        'errored_time': 'datetime',
        'status': 'JobStatus',
        'type': 'JobType',
        'uploaded_file_name': 'str',
        'error_file_name': 'str',
        'location': 'LocationChild',
        'corporation': 'CorporationChild',
        'user': 'UserChild'
    }

    attribute_map = {
        'id': 'Id',
        'enqueued_time': 'EnqueuedTime',
        'finished_time': 'FinishedTime',
        'errored_time': 'ErroredTime',
        'status': 'Status',
        'type': 'Type',
        'uploaded_file_name': 'UploadedFileName',
        'error_file_name': 'ErrorFileName',
        'location': 'Location',
        'corporation': 'Corporation',
        'user': 'User'
    }

    def __init__(self, id=None, enqueued_time=None, finished_time=None, errored_time=None, status=None, type=None, uploaded_file_name=None, error_file_name=None, location=None, corporation=None, user=None):  # noqa: E501
        """JobResponse - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._enqueued_time = None
        self._finished_time = None
        self._errored_time = None
        self._status = None
        self._type = None
        self._uploaded_file_name = None
        self._error_file_name = None
        self._location = None
        self._corporation = None
        self._user = None
        self.discriminator = None
        self.id = id
        self.enqueued_time = enqueued_time
        if finished_time is not None:
            self.finished_time = finished_time
        if errored_time is not None:
            self.errored_time = errored_time
        self.status = status
        self.type = type
        self.uploaded_file_name = uploaded_file_name
        if error_file_name is not None:
            self.error_file_name = error_file_name
        self.location = location
        self.corporation = corporation
        self.user = user

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

        The unique Id for the Job  # noqa: E501

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

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

        The unique Id for the Job  # noqa: E501

        :param id: The id of this JobResponse.  # 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 enqueued_time(self):
        """Gets the enqueued_time of this JobResponse.  # noqa: E501

        The time the job was created  # noqa: E501

        :return: The enqueued_time of this JobResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._enqueued_time

    @enqueued_time.setter
    def enqueued_time(self, enqueued_time):
        """Sets the enqueued_time of this JobResponse.

        The time the job was created  # noqa: E501

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

        self._enqueued_time = enqueued_time

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

        The time the job was finished  # noqa: E501

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

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

        The time the job was finished  # noqa: E501

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

        self._finished_time = finished_time

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

        The time the job errored  # noqa: E501

        :return: The errored_time of this JobResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._errored_time

    @errored_time.setter
    def errored_time(self, errored_time):
        """Sets the errored_time of this JobResponse.

        The time the job errored  # noqa: E501

        :param errored_time: The errored_time of this JobResponse.  # noqa: E501
        :type: datetime
        """

        self._errored_time = errored_time

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


        :return: The status of this JobResponse.  # noqa: E501
        :rtype: JobStatus
        """
        return self._status

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


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

        self._status = status

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


        :return: The type of this JobResponse.  # noqa: E501
        :rtype: JobType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this JobResponse.


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

        self._type = type

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

        The name of the file that was uploaded  # noqa: E501

        :return: The uploaded_file_name of this JobResponse.  # noqa: E501
        :rtype: str
        """
        return self._uploaded_file_name

    @uploaded_file_name.setter
    def uploaded_file_name(self, uploaded_file_name):
        """Sets the uploaded_file_name of this JobResponse.

        The name of the file that was uploaded  # noqa: E501

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

        self._uploaded_file_name = uploaded_file_name

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

        The name of the error file, if the job has a Status of FinishedWithErrors  # noqa: E501

        :return: The error_file_name of this JobResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_file_name

    @error_file_name.setter
    def error_file_name(self, error_file_name):
        """Sets the error_file_name of this JobResponse.

        The name of the error file, if the job has a Status of FinishedWithErrors  # noqa: E501

        :param error_file_name: The error_file_name of this JobResponse.  # noqa: E501
        :type: str
        """

        self._error_file_name = error_file_name

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


        :return: The location of this JobResponse.  # noqa: E501
        :rtype: LocationChild
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this JobResponse.


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

        self._location = location

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


        :return: The corporation of this JobResponse.  # noqa: E501
        :rtype: CorporationChild
        """
        return self._corporation

    @corporation.setter
    def corporation(self, corporation):
        """Sets the corporation of this JobResponse.


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

        self._corporation = corporation

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


        :return: The user of this JobResponse.  # noqa: E501
        :rtype: UserChild
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this JobResponse.


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

        self._user = user

    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(JobResponse, 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, JobResponse):
            return False

        return self.__dict__ == other.__dict__

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