# coding: utf-8

"""
    ARLAS CITY API

    Upload GTFS data

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


from pprint import pformat
from six import iteritems
import re


class JobResource(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 = {
        'job_id': 'str',
        'collection': 'str',
        'operation_id': 'str',
        'created_at': 'int',
        'modified_at': 'int',
        'started_at': 'int',
        'finished_at': 'int',
        'error': 'str',
        'steps': 'list[Step]'
    }

    attribute_map = {
        'job_id': 'job_id',
        'collection': 'collection',
        'operation_id': 'operation_id',
        'created_at': 'created_at',
        'modified_at': 'modified_at',
        'started_at': 'started_at',
        'finished_at': 'finished_at',
        'error': 'error',
        'steps': 'steps'
    }

    def __init__(self, job_id=None, collection=None, operation_id=None, created_at=None, modified_at=None, started_at=None, finished_at=None, error=None, steps=None):
        """
        JobResource - a model defined in Swagger
        """

        self._job_id = None
        self._collection = None
        self._operation_id = None
        self._created_at = None
        self._modified_at = None
        self._started_at = None
        self._finished_at = None
        self._error = None
        self._steps = None

        if job_id is not None:
          self.job_id = job_id
        if collection is not None:
          self.collection = collection
        if operation_id is not None:
          self.operation_id = operation_id
        if created_at is not None:
          self.created_at = created_at
        if modified_at is not None:
          self.modified_at = modified_at
        if started_at is not None:
          self.started_at = started_at
        if finished_at is not None:
          self.finished_at = finished_at
        if error is not None:
          self.error = error
        if steps is not None:
          self.steps = steps

    @property
    def job_id(self):
        """
        Gets the job_id of this JobResource.

        :return: The job_id of this JobResource.
        :rtype: str
        """
        return self._job_id

    @job_id.setter
    def job_id(self, job_id):
        """
        Sets the job_id of this JobResource.

        :param job_id: The job_id of this JobResource.
        :type: str
        """

        self._job_id = job_id

    @property
    def collection(self):
        """
        Gets the collection of this JobResource.

        :return: The collection of this JobResource.
        :rtype: str
        """
        return self._collection

    @collection.setter
    def collection(self, collection):
        """
        Sets the collection of this JobResource.

        :param collection: The collection of this JobResource.
        :type: str
        """

        self._collection = collection

    @property
    def operation_id(self):
        """
        Gets the operation_id of this JobResource.

        :return: The operation_id of this JobResource.
        :rtype: str
        """
        return self._operation_id

    @operation_id.setter
    def operation_id(self, operation_id):
        """
        Sets the operation_id of this JobResource.

        :param operation_id: The operation_id of this JobResource.
        :type: str
        """

        self._operation_id = operation_id

    @property
    def created_at(self):
        """
        Gets the created_at of this JobResource.

        :return: The created_at of this JobResource.
        :rtype: int
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """
        Sets the created_at of this JobResource.

        :param created_at: The created_at of this JobResource.
        :type: int
        """

        self._created_at = created_at

    @property
    def modified_at(self):
        """
        Gets the modified_at of this JobResource.

        :return: The modified_at of this JobResource.
        :rtype: int
        """
        return self._modified_at

    @modified_at.setter
    def modified_at(self, modified_at):
        """
        Sets the modified_at of this JobResource.

        :param modified_at: The modified_at of this JobResource.
        :type: int
        """

        self._modified_at = modified_at

    @property
    def started_at(self):
        """
        Gets the started_at of this JobResource.

        :return: The started_at of this JobResource.
        :rtype: int
        """
        return self._started_at

    @started_at.setter
    def started_at(self, started_at):
        """
        Sets the started_at of this JobResource.

        :param started_at: The started_at of this JobResource.
        :type: int
        """

        self._started_at = started_at

    @property
    def finished_at(self):
        """
        Gets the finished_at of this JobResource.

        :return: The finished_at of this JobResource.
        :rtype: int
        """
        return self._finished_at

    @finished_at.setter
    def finished_at(self, finished_at):
        """
        Sets the finished_at of this JobResource.

        :param finished_at: The finished_at of this JobResource.
        :type: int
        """

        self._finished_at = finished_at

    @property
    def error(self):
        """
        Gets the error of this JobResource.

        :return: The error of this JobResource.
        :rtype: str
        """
        return self._error

    @error.setter
    def error(self, error):
        """
        Sets the error of this JobResource.

        :param error: The error of this JobResource.
        :type: str
        """

        self._error = error

    @property
    def steps(self):
        """
        Gets the steps of this JobResource.

        :return: The steps of this JobResource.
        :rtype: list[Step]
        """
        return self._steps

    @steps.setter
    def steps(self, steps):
        """
        Sets the steps of this JobResource.

        :param steps: The steps of this JobResource.
        :type: list[Step]
        """

        self._steps = steps

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, JobResource):
            return False

        return self.__dict__ == other.__dict__

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