# coding: utf-8

"""
    Zarban API

    API for Zarban services.  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from zarban.service.openapi_client.configuration import Configuration


class LendingpoolLiquidationCallEvent(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'int',
        'collateral_asset': 'str',
        'debt_asset': 'str',
        'user': 'str',
        'debt_to_cover': 'str',
        'liquidated_collateral_amount': 'str',
        'liquidator': 'str',
        'receive_z_token': 'bool',
        'raw': 'Log'
    }

    attribute_map = {
        'id': 'id',
        'collateral_asset': 'collateralAsset',
        'debt_asset': 'debtAsset',
        'user': 'user',
        'debt_to_cover': 'debtToCover',
        'liquidated_collateral_amount': 'liquidatedCollateralAmount',
        'liquidator': 'liquidator',
        'receive_z_token': 'receiveZToken',
        'raw': 'raw'
    }

    def __init__(self, id=None, collateral_asset=None, debt_asset=None, user=None, debt_to_cover=None, liquidated_collateral_amount=None, liquidator=None, receive_z_token=None, raw=None, local_vars_configuration=None):  # noqa: E501
        """LendingpoolLiquidationCallEvent - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._collateral_asset = None
        self._debt_asset = None
        self._user = None
        self._debt_to_cover = None
        self._liquidated_collateral_amount = None
        self._liquidator = None
        self._receive_z_token = None
        self._raw = None
        self.discriminator = None

        self.id = id
        self.collateral_asset = collateral_asset
        self.debt_asset = debt_asset
        self.user = user
        self.debt_to_cover = debt_to_cover
        self.liquidated_collateral_amount = liquidated_collateral_amount
        self.liquidator = liquidator
        self.receive_z_token = receive_z_token
        self.raw = raw

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

        Identifier for the liquidation call event.  # noqa: E501

        :return: The id of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this LendingpoolLiquidationCallEvent.

        Identifier for the liquidation call event.  # noqa: E501

        :param id: The id of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        Ethereum address of the collateral asset involved in the liquidation call.  # noqa: E501

        :return: The collateral_asset of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._collateral_asset

    @collateral_asset.setter
    def collateral_asset(self, collateral_asset):
        """Sets the collateral_asset of this LendingpoolLiquidationCallEvent.

        Ethereum address of the collateral asset involved in the liquidation call.  # noqa: E501

        :param collateral_asset: The collateral_asset of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and collateral_asset is None:  # noqa: E501
            raise ValueError("Invalid value for `collateral_asset`, must not be `None`")  # noqa: E501

        self._collateral_asset = collateral_asset

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

        Ethereum address of the debt asset involved in the liquidation call.  # noqa: E501

        :return: The debt_asset of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._debt_asset

    @debt_asset.setter
    def debt_asset(self, debt_asset):
        """Sets the debt_asset of this LendingpoolLiquidationCallEvent.

        Ethereum address of the debt asset involved in the liquidation call.  # noqa: E501

        :param debt_asset: The debt_asset of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and debt_asset is None:  # noqa: E501
            raise ValueError("Invalid value for `debt_asset`, must not be `None`")  # noqa: E501

        self._debt_asset = debt_asset

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

        Ethereum address of the user being liquidated.  # noqa: E501

        :return: The user of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this LendingpoolLiquidationCallEvent.

        Ethereum address of the user being liquidated.  # noqa: E501

        :param user: The user of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and user is None:  # noqa: E501
            raise ValueError("Invalid value for `user`, must not be `None`")  # noqa: E501

        self._user = user

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

        The amount of debt to cover during the liquidation.  # noqa: E501

        :return: The debt_to_cover of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._debt_to_cover

    @debt_to_cover.setter
    def debt_to_cover(self, debt_to_cover):
        """Sets the debt_to_cover of this LendingpoolLiquidationCallEvent.

        The amount of debt to cover during the liquidation.  # noqa: E501

        :param debt_to_cover: The debt_to_cover of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and debt_to_cover is None:  # noqa: E501
            raise ValueError("Invalid value for `debt_to_cover`, must not be `None`")  # noqa: E501

        self._debt_to_cover = debt_to_cover

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

        The amount of collateral that was liquidated.  # noqa: E501

        :return: The liquidated_collateral_amount of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._liquidated_collateral_amount

    @liquidated_collateral_amount.setter
    def liquidated_collateral_amount(self, liquidated_collateral_amount):
        """Sets the liquidated_collateral_amount of this LendingpoolLiquidationCallEvent.

        The amount of collateral that was liquidated.  # noqa: E501

        :param liquidated_collateral_amount: The liquidated_collateral_amount of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and liquidated_collateral_amount is None:  # noqa: E501
            raise ValueError("Invalid value for `liquidated_collateral_amount`, must not be `None`")  # noqa: E501

        self._liquidated_collateral_amount = liquidated_collateral_amount

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

        Ethereum address of the liquidator who initiated the liquidation.  # noqa: E501

        :return: The liquidator of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: str
        """
        return self._liquidator

    @liquidator.setter
    def liquidator(self, liquidator):
        """Sets the liquidator of this LendingpoolLiquidationCallEvent.

        Ethereum address of the liquidator who initiated the liquidation.  # noqa: E501

        :param liquidator: The liquidator of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and liquidator is None:  # noqa: E501
            raise ValueError("Invalid value for `liquidator`, must not be `None`")  # noqa: E501

        self._liquidator = liquidator

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

        Indicates if the liquidator chose to receive ZTokens.  # noqa: E501

        :return: The receive_z_token of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: bool
        """
        return self._receive_z_token

    @receive_z_token.setter
    def receive_z_token(self, receive_z_token):
        """Sets the receive_z_token of this LendingpoolLiquidationCallEvent.

        Indicates if the liquidator chose to receive ZTokens.  # noqa: E501

        :param receive_z_token: The receive_z_token of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and receive_z_token is None:  # noqa: E501
            raise ValueError("Invalid value for `receive_z_token`, must not be `None`")  # noqa: E501

        self._receive_z_token = receive_z_token

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


        :return: The raw of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :rtype: Log
        """
        return self._raw

    @raw.setter
    def raw(self, raw):
        """Sets the raw of this LendingpoolLiquidationCallEvent.


        :param raw: The raw of this LendingpoolLiquidationCallEvent.  # noqa: E501
        :type: Log
        """
        if self.local_vars_configuration.client_side_validation and raw is None:  # noqa: E501
            raise ValueError("Invalid value for `raw`, must not be `None`")  # noqa: E501

        self._raw = raw

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

        for attr, _ in six.iteritems(self.openapi_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 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, LendingpoolLiquidationCallEvent):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
