# coding: utf-8

"""
    OANDA v20 REST API

    The full OANDA v20 REST API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more. To authenticate use the string 'Bearer ' followed by the token which can be obtained at https://www.oanda.com/demo-account/tpa/personal_token  # noqa: E501

    OpenAPI spec version: 3.0.23
    Contact: api@oanda.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class HomeConversions(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 = {
        'currency': 'str',
        'account_gain': 'str',
        'account_loss': 'str',
        'position_value': 'str'
    }

    attribute_map = {
        'currency': 'currency',
        'account_gain': 'accountGain',
        'account_loss': 'accountLoss',
        'position_value': 'positionValue'
    }

    def __init__(self, currency=None, account_gain=None, account_loss=None, position_value=None):  # noqa: E501
        """HomeConversions - a model defined in Swagger"""  # noqa: E501

        self._currency = None
        self._account_gain = None
        self._account_loss = None
        self._position_value = None
        self.discriminator = None

        if currency is not None:
            self.currency = currency
        if account_gain is not None:
            self.account_gain = account_gain
        if account_loss is not None:
            self.account_loss = account_loss
        if position_value is not None:
            self.position_value = position_value

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

        The currency to be converted into the home currency.  # noqa: E501

        :return: The currency of this HomeConversions.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this HomeConversions.

        The currency to be converted into the home currency.  # noqa: E501

        :param currency: The currency of this HomeConversions.  # noqa: E501
        :type: str
        """

        self._currency = currency

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

        The factor used to convert any gains for an Account in the specified currency into the Account's home currency. This would include positive realized P/L and positive financing amounts. Conversion is performed by multiplying the positive P/L by the conversion factor.  # noqa: E501

        :return: The account_gain of this HomeConversions.  # noqa: E501
        :rtype: str
        """
        return self._account_gain

    @account_gain.setter
    def account_gain(self, account_gain):
        """Sets the account_gain of this HomeConversions.

        The factor used to convert any gains for an Account in the specified currency into the Account's home currency. This would include positive realized P/L and positive financing amounts. Conversion is performed by multiplying the positive P/L by the conversion factor.  # noqa: E501

        :param account_gain: The account_gain of this HomeConversions.  # noqa: E501
        :type: str
        """

        self._account_gain = account_gain

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

        The string representation of a decimal number.  # noqa: E501

        :return: The account_loss of this HomeConversions.  # noqa: E501
        :rtype: str
        """
        return self._account_loss

    @account_loss.setter
    def account_loss(self, account_loss):
        """Sets the account_loss of this HomeConversions.

        The string representation of a decimal number.  # noqa: E501

        :param account_loss: The account_loss of this HomeConversions.  # noqa: E501
        :type: str
        """

        self._account_loss = account_loss

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

        The factor used to convert a Position or Trade Value in the specified currency into the Account's home currency. Conversion is performed by multiplying the Position or Trade Value by the conversion factor.  # noqa: E501

        :return: The position_value of this HomeConversions.  # noqa: E501
        :rtype: str
        """
        return self._position_value

    @position_value.setter
    def position_value(self, position_value):
        """Sets the position_value of this HomeConversions.

        The factor used to convert a Position or Trade Value in the specified currency into the Account's home currency. Conversion is performed by multiplying the Position or Trade Value by the conversion factor.  # noqa: E501

        :param position_value: The position_value of this HomeConversions.  # noqa: E501
        :type: str
        """

        self._position_value = position_value

    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

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

        return self.__dict__ == other.__dict__

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