# coding: utf-8

"""
    HEP REST API

    The REST API for HEP protocol  # noqa: E501

    OpenAPI spec version: v1
    Contact: xiawu@zeuux.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class NewchainTransactionResponse(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 = {
        'txid': 'str',
        'order_number': 'str',
        'from_address': 'str',
        'to_address': 'str',
        'value': 'str',
        'block_height': 'int',
        'status': 'int'
    }

    attribute_map = {
        'txid': 'txid',
        'order_number': 'order_number',
        'from_address': 'from_address',
        'to_address': 'to_address',
        'value': 'value',
        'block_height': 'block_height',
        'status': 'status'
    }

    def __init__(self, txid=None, order_number=None, from_address=None, to_address=None, value=None, block_height=None, status=None):  # noqa: E501
        """NewchainTransactionResponse - a model defined in Swagger"""  # noqa: E501
        self._txid = None
        self._order_number = None
        self._from_address = None
        self._to_address = None
        self._value = None
        self._block_height = None
        self._status = None
        self.discriminator = None
        self.txid = txid
        self.order_number = order_number
        self.from_address = from_address
        self.to_address = to_address
        self.value = value
        self.block_height = block_height
        self.status = status

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

        The transaction ID  # noqa: E501

        :return: The txid of this NewchainTransactionResponse.  # noqa: E501
        :rtype: str
        """
        return self._txid

    @txid.setter
    def txid(self, txid):
        """Sets the txid of this NewchainTransactionResponse.

        The transaction ID  # noqa: E501

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

        self._txid = txid

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

        The order number  # noqa: E501

        :return: The order_number of this NewchainTransactionResponse.  # noqa: E501
        :rtype: str
        """
        return self._order_number

    @order_number.setter
    def order_number(self, order_number):
        """Sets the order_number of this NewchainTransactionResponse.

        The order number  # noqa: E501

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

        self._order_number = order_number

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

        The from address  # noqa: E501

        :return: The from_address of this NewchainTransactionResponse.  # noqa: E501
        :rtype: str
        """
        return self._from_address

    @from_address.setter
    def from_address(self, from_address):
        """Sets the from_address of this NewchainTransactionResponse.

        The from address  # noqa: E501

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

        self._from_address = from_address

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

        The from address  # noqa: E501

        :return: The to_address of this NewchainTransactionResponse.  # noqa: E501
        :rtype: str
        """
        return self._to_address

    @to_address.setter
    def to_address(self, to_address):
        """Sets the to_address of this NewchainTransactionResponse.

        The from address  # noqa: E501

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

        self._to_address = to_address

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

        The transfer amount  # noqa: E501

        :return: The value of this NewchainTransactionResponse.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this NewchainTransactionResponse.

        The transfer amount  # noqa: E501

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

        self._value = value

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

        The block height  # noqa: E501

        :return: The block_height of this NewchainTransactionResponse.  # noqa: E501
        :rtype: int
        """
        return self._block_height

    @block_height.setter
    def block_height(self, block_height):
        """Sets the block_height of this NewchainTransactionResponse.

        The block height  # noqa: E501

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

        self._block_height = block_height

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

        The status of transaction  # noqa: E501

        :return: The status of this NewchainTransactionResponse.  # noqa: E501
        :rtype: int
        """
        return self._status

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

        The status of transaction  # noqa: E501

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

        self._status = status

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

        return self.__dict__ == other.__dict__

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