# 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 LendingpoolFlashLoanEvent(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',
        'target': 'str',
        'initiator': 'str',
        'asset': 'str',
        'amount': 'str',
        'premium': 'str',
        'referral_code': 'int',
        'raw': 'Log'
    }

    attribute_map = {
        'id': 'id',
        'target': 'target',
        'initiator': 'initiator',
        'asset': 'asset',
        'amount': 'amount',
        'premium': 'premium',
        'referral_code': 'referralCode',
        'raw': 'raw'
    }

    def __init__(self, id=None, target=None, initiator=None, asset=None, amount=None, premium=None, referral_code=None, raw=None, local_vars_configuration=None):  # noqa: E501
        """LendingpoolFlashLoanEvent - 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._target = None
        self._initiator = None
        self._asset = None
        self._amount = None
        self._premium = None
        self._referral_code = None
        self._raw = None
        self.discriminator = None

        self.id = id
        self.target = target
        self.initiator = initiator
        self.asset = asset
        self.amount = amount
        self.premium = premium
        if referral_code is not None:
            self.referral_code = referral_code
        self.raw = raw

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

        Identifier for the flash loan event.  # noqa: E501

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

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

        Identifier for the flash loan event.  # noqa: E501

        :param id: The id of this LendingpoolFlashLoanEvent.  # 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 target(self):
        """Gets the target of this LendingpoolFlashLoanEvent.  # noqa: E501

        Ethereum address of the target involved in the flash loan.  # noqa: E501

        :return: The target of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: str
        """
        return self._target

    @target.setter
    def target(self, target):
        """Sets the target of this LendingpoolFlashLoanEvent.

        Ethereum address of the target involved in the flash loan.  # noqa: E501

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

        self._target = target

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

        Ethereum address of the initiator who triggered the flash loan.  # noqa: E501

        :return: The initiator of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: str
        """
        return self._initiator

    @initiator.setter
    def initiator(self, initiator):
        """Sets the initiator of this LendingpoolFlashLoanEvent.

        Ethereum address of the initiator who triggered the flash loan.  # noqa: E501

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

        self._initiator = initiator

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

        Ethereum address of the asset used in the flash loan.  # noqa: E501

        :return: The asset of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: str
        """
        return self._asset

    @asset.setter
    def asset(self, asset):
        """Sets the asset of this LendingpoolFlashLoanEvent.

        Ethereum address of the asset used in the flash loan.  # noqa: E501

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

        self._asset = asset

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

        The amount involved in the flash loan.  # noqa: E501

        :return: The amount of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this LendingpoolFlashLoanEvent.

        The amount involved in the flash loan.  # noqa: E501

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

        self._amount = amount

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

        The premium involved in the flash loan.  # noqa: E501

        :return: The premium of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: str
        """
        return self._premium

    @premium.setter
    def premium(self, premium):
        """Sets the premium of this LendingpoolFlashLoanEvent.

        The premium involved in the flash loan.  # noqa: E501

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

        self._premium = premium

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

        Referral code or identifier related to the flash loan.  # noqa: E501

        :return: The referral_code of this LendingpoolFlashLoanEvent.  # noqa: E501
        :rtype: int
        """
        return self._referral_code

    @referral_code.setter
    def referral_code(self, referral_code):
        """Sets the referral_code of this LendingpoolFlashLoanEvent.

        Referral code or identifier related to the flash loan.  # noqa: E501

        :param referral_code: The referral_code of this LendingpoolFlashLoanEvent.  # noqa: E501
        :type: int
        """

        self._referral_code = referral_code

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


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

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


        :param raw: The raw of this LendingpoolFlashLoanEvent.  # 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, LendingpoolFlashLoanEvent):
            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, LendingpoolFlashLoanEvent):
            return True

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