# coding: utf-8

"""
    Thornode API

    Thornode REST API.  # noqa: E501

    OpenAPI spec version: 3.14.1
    Contact: devs@thorchain.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class LimitSwapWithDetails(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 = {
        'swap': 'MsgSwap',
        'ratio': 'str',
        'blocks_since_created': 'int',
        'time_to_expiry_blocks': 'int',
        'created_timestamp': 'int'
    }

    attribute_map = {
        'swap': 'swap',
        'ratio': 'ratio',
        'blocks_since_created': 'blocks_since_created',
        'time_to_expiry_blocks': 'time_to_expiry_blocks',
        'created_timestamp': 'created_timestamp'
    }

    def __init__(self, swap=None, ratio=None, blocks_since_created=None, time_to_expiry_blocks=None, created_timestamp=None):  # noqa: E501
        """LimitSwapWithDetails - a model defined in Swagger"""  # noqa: E501
        self._swap = None
        self._ratio = None
        self._blocks_since_created = None
        self._time_to_expiry_blocks = None
        self._created_timestamp = None
        self.discriminator = None
        if swap is not None:
            self.swap = swap
        if ratio is not None:
            self.ratio = ratio
        if blocks_since_created is not None:
            self.blocks_since_created = blocks_since_created
        if time_to_expiry_blocks is not None:
            self.time_to_expiry_blocks = time_to_expiry_blocks
        if created_timestamp is not None:
            self.created_timestamp = created_timestamp

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


        :return: The swap of this LimitSwapWithDetails.  # noqa: E501
        :rtype: MsgSwap
        """
        return self._swap

    @swap.setter
    def swap(self, swap):
        """Sets the swap of this LimitSwapWithDetails.


        :param swap: The swap of this LimitSwapWithDetails.  # noqa: E501
        :type: MsgSwap
        """

        self._swap = swap

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

        The ratio threshold for this limit swap  # noqa: E501

        :return: The ratio of this LimitSwapWithDetails.  # noqa: E501
        :rtype: str
        """
        return self._ratio

    @ratio.setter
    def ratio(self, ratio):
        """Sets the ratio of this LimitSwapWithDetails.

        The ratio threshold for this limit swap  # noqa: E501

        :param ratio: The ratio of this LimitSwapWithDetails.  # noqa: E501
        :type: str
        """

        self._ratio = ratio

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

        Number of blocks since the swap was created  # noqa: E501

        :return: The blocks_since_created of this LimitSwapWithDetails.  # noqa: E501
        :rtype: int
        """
        return self._blocks_since_created

    @blocks_since_created.setter
    def blocks_since_created(self, blocks_since_created):
        """Sets the blocks_since_created of this LimitSwapWithDetails.

        Number of blocks since the swap was created  # noqa: E501

        :param blocks_since_created: The blocks_since_created of this LimitSwapWithDetails.  # noqa: E501
        :type: int
        """

        self._blocks_since_created = blocks_since_created

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

        Number of blocks until the swap expires  # noqa: E501

        :return: The time_to_expiry_blocks of this LimitSwapWithDetails.  # noqa: E501
        :rtype: int
        """
        return self._time_to_expiry_blocks

    @time_to_expiry_blocks.setter
    def time_to_expiry_blocks(self, time_to_expiry_blocks):
        """Sets the time_to_expiry_blocks of this LimitSwapWithDetails.

        Number of blocks until the swap expires  # noqa: E501

        :param time_to_expiry_blocks: The time_to_expiry_blocks of this LimitSwapWithDetails.  # noqa: E501
        :type: int
        """

        self._time_to_expiry_blocks = time_to_expiry_blocks

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

        Unix timestamp when the swap was created  # noqa: E501

        :return: The created_timestamp of this LimitSwapWithDetails.  # noqa: E501
        :rtype: int
        """
        return self._created_timestamp

    @created_timestamp.setter
    def created_timestamp(self, created_timestamp):
        """Sets the created_timestamp of this LimitSwapWithDetails.

        Unix timestamp when the swap was created  # noqa: E501

        :param created_timestamp: The created_timestamp of this LimitSwapWithDetails.  # noqa: E501
        :type: int
        """

        self._created_timestamp = created_timestamp

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

        return self.__dict__ == other.__dict__

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