# 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 Step(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 = {
        'name': 'str',
        'state': 'str',
        'error': 'str',
        'started_at': 'int',
        'finished_at': 'int'
    }

    attribute_map = {
        'name': 'name',
        'state': 'state',
        'error': 'error',
        'started_at': 'started_at',
        'finished_at': 'finished_at'
    }

    def __init__(self, name=None, state=None, error=None, started_at=None, finished_at=None):
        """
        Step - a model defined in Swagger
        """

        self._name = None
        self._state = None
        self._error = None
        self._started_at = None
        self._finished_at = None

        if name is not None:
          self.name = name
        if state is not None:
          self.state = state
        if error is not None:
          self.error = error
        if started_at is not None:
          self.started_at = started_at
        if finished_at is not None:
          self.finished_at = finished_at

    @property
    def name(self):
        """
        Gets the name of this Step.

        :return: The name of this Step.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this Step.

        :param name: The name of this Step.
        :type: str
        """

        self._name = name

    @property
    def state(self):
        """
        Gets the state of this Step.

        :return: The state of this Step.
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """
        Sets the state of this Step.

        :param state: The state of this Step.
        :type: str
        """

        self._state = state

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

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

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

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

        self._error = error

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

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

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

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

        self._started_at = started_at

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

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

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

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

        self._finished_at = finished_at

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

        return self.__dict__ == other.__dict__

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