# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API

    The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

    The version of the OpenAPI document: 2024-03-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class FxRateDetails(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 = {
        'fx_rate_id': 'str',
        'base_rate': 'float',
        'effective_fx_rate': 'float',
        'rate_direction': 'RateDirection',
    }

    attribute_map = {
        'fx_rate_id': 'fxRateId',
        'base_rate': 'baseRate',
        'effective_fx_rate': 'effectiveFxRate',
        'rate_direction': 'rateDirection',
    }

    def __init__(self, fx_rate_id=None, base_rate=None, effective_fx_rate=None, rate_direction=None, _configuration=None):  # noqa: E501
        """FxRateDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._fx_rate_id = None
        self._base_rate = None
        self._effective_fx_rate = None
        self._rate_direction = None
        self.discriminator = None

        self.fx_rate_id = fx_rate_id
        self.base_rate = base_rate
        self.effective_fx_rate = effective_fx_rate
        self.rate_direction = rate_direction

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

        The unique identifier assigned to the fees / foreign exchange rate of a transaction.  # noqa: E501

        :return: The fx_rate_id of this FxRateDetails.  # noqa: E501
        :rtype: str
        """
        return self._fx_rate_id

    @fx_rate_id.setter
    def fx_rate_id(self, fx_rate_id):
        """Sets the fx_rate_id of this FxRateDetails.

        The unique identifier assigned to the fees / foreign exchange rate of a transaction.  # noqa: E501

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

        self._fx_rate_id = fx_rate_id

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

        A decimal number, such as an amount or FX rate.  # noqa: E501

        :return: The base_rate of this FxRateDetails.  # noqa: E501
        :rtype: float
        """
        return self._base_rate

    @base_rate.setter
    def base_rate(self, base_rate):
        """Sets the base_rate of this FxRateDetails.

        A decimal number, such as an amount or FX rate.  # noqa: E501

        :param base_rate: The base_rate of this FxRateDetails.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and base_rate is None:
            raise ValueError("Invalid value for `base_rate`, must not be `None`")  # noqa: E501

        self._base_rate = base_rate

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

        A decimal number, such as an amount or FX rate.  # noqa: E501

        :return: The effective_fx_rate of this FxRateDetails.  # noqa: E501
        :rtype: float
        """
        return self._effective_fx_rate

    @effective_fx_rate.setter
    def effective_fx_rate(self, effective_fx_rate):
        """Sets the effective_fx_rate of this FxRateDetails.

        A decimal number, such as an amount or FX rate.  # noqa: E501

        :param effective_fx_rate: The effective_fx_rate of this FxRateDetails.  # noqa: E501
        :type: float
        """
        if self._configuration.client_side_validation and effective_fx_rate is None:
            raise ValueError("Invalid value for `effective_fx_rate`, must not be `None`")  # noqa: E501

        self._effective_fx_rate = effective_fx_rate

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


        :return: The rate_direction of this FxRateDetails.  # noqa: E501
        :rtype: RateDirection
        """
        return self._rate_direction

    @rate_direction.setter
    def rate_direction(self, rate_direction):
        """Sets the rate_direction of this FxRateDetails.


        :param rate_direction: The rate_direction of this FxRateDetails.  # noqa: E501
        :type: RateDirection
        """
        if self._configuration.client_side_validation and rate_direction is None:
            raise ValueError("Invalid value for `rate_direction`, must not be `None`")  # noqa: E501

        self._rate_direction = rate_direction

    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(FxRateDetails, 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, FxRateDetails):
            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, FxRateDetails):
            return True

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