# 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 ReferenceMemoPreflightResponse(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 = {
        'reference': 'str',
        'available': 'bool',
        'can_register': 'bool',
        'expires_at': 'str',
        'memo': 'str',
        'usage_count': 'str',
        'max_use': 'str'
    }

    attribute_map = {
        'reference': 'reference',
        'available': 'available',
        'can_register': 'can_register',
        'expires_at': 'expires_at',
        'memo': 'memo',
        'usage_count': 'usage_count',
        'max_use': 'max_use'
    }

    def __init__(self, reference=None, available=None, can_register=None, expires_at=None, memo=None, usage_count=None, max_use=None):  # noqa: E501
        """ReferenceMemoPreflightResponse - a model defined in Swagger"""  # noqa: E501
        self._reference = None
        self._available = None
        self._can_register = None
        self._expires_at = None
        self._memo = None
        self._usage_count = None
        self._max_use = None
        self.discriminator = None
        self.reference = reference
        self.available = available
        self.can_register = can_register
        self.expires_at = expires_at
        if memo is not None:
            self.memo = memo
        self.usage_count = usage_count
        self.max_use = max_use

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

        the reference ID that would be generated from the amount  # noqa: E501

        :return: The reference of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: str
        """
        return self._reference

    @reference.setter
    def reference(self, reference):
        """Sets the reference of this ReferenceMemoPreflightResponse.

        the reference ID that would be generated from the amount  # noqa: E501

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

        self._reference = reference

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

        whether this reference is currently available (not registered or expired)  # noqa: E501

        :return: The available of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: bool
        """
        return self._available

    @available.setter
    def available(self, available):
        """Sets the available of this ReferenceMemoPreflightResponse.

        whether this reference is currently available (not registered or expired)  # noqa: E501

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

        self._available = available

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

        whether a new registration can be made with this reference  # noqa: E501

        :return: The can_register of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: bool
        """
        return self._can_register

    @can_register.setter
    def can_register(self, can_register):
        """Sets the can_register of this ReferenceMemoPreflightResponse.

        whether a new registration can be made with this reference  # noqa: E501

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

        self._can_register = can_register

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

        block height when current registration expires (0 if available)  # noqa: E501

        :return: The expires_at of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: str
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this ReferenceMemoPreflightResponse.

        block height when current registration expires (0 if available)  # noqa: E501

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

        self._expires_at = expires_at

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

        the currently registered memo (only present if not available)  # noqa: E501

        :return: The memo of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: str
        """
        return self._memo

    @memo.setter
    def memo(self, memo):
        """Sets the memo of this ReferenceMemoPreflightResponse.

        the currently registered memo (only present if not available)  # noqa: E501

        :param memo: The memo of this ReferenceMemoPreflightResponse.  # noqa: E501
        :type: str
        """

        self._memo = memo

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

        the number of times this reference has been used  # noqa: E501

        :return: The usage_count of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: str
        """
        return self._usage_count

    @usage_count.setter
    def usage_count(self, usage_count):
        """Sets the usage_count of this ReferenceMemoPreflightResponse.

        the number of times this reference has been used  # noqa: E501

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

        self._usage_count = usage_count

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

        the maximum number of times this reference can be used (0 = unlimited)  # noqa: E501

        :return: The max_use of this ReferenceMemoPreflightResponse.  # noqa: E501
        :rtype: str
        """
        return self._max_use

    @max_use.setter
    def max_use(self, max_use):
        """Sets the max_use of this ReferenceMemoPreflightResponse.

        the maximum number of times this reference can be used (0 = unlimited)  # noqa: E501

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

        self._max_use = max_use

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

        return self.__dict__ == other.__dict__

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