# coding: utf-8

"""
    Creditas OpenAPI

    This is specification of the Creditas OpenAPI. It contains definitions of Creditas banking services exposed via API accessible on the internet.  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: is@creditas.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from creditas.configuration import Configuration


class AispAccountTransaction(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 = {
        'transaction_id': 'str',
        'category': 'str',
        'type': 'str',
        'partner_account': 'AispAccountTransactionPartnerAccount',
        'amount': 'Money',
        'effective_date': 'date'
    }

    attribute_map = {
        'transaction_id': 'transactionId',
        'category': 'category',
        'type': 'type',
        'partner_account': 'partnerAccount',
        'amount': 'amount',
        'effective_date': 'effectiveDate'
    }

    def __init__(self, transaction_id=None, category=None, type=None, partner_account=None, amount=None, effective_date=None, _configuration=None):  # noqa: E501
        """AispAccountTransaction - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._transaction_id = None
        self._category = None
        self._type = None
        self._partner_account = None
        self._amount = None
        self._effective_date = None
        self.discriminator = None

        self.transaction_id = transaction_id
        self.category = category
        self.type = type
        if partner_account is not None:
            self.partner_account = partner_account
        self.amount = amount
        self.effective_date = effective_date

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

        The unique identifier for the transaction record  # noqa: E501

        :return: The transaction_id of this AispAccountTransaction.  # noqa: E501
        :rtype: str
        """
        return self._transaction_id

    @transaction_id.setter
    def transaction_id(self, transaction_id):
        """Sets the transaction_id of this AispAccountTransaction.

        The unique identifier for the transaction record  # noqa: E501

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

        self._transaction_id = transaction_id

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

        Transaction category  # noqa: E501

        :return: The category of this AispAccountTransaction.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this AispAccountTransaction.

        Transaction category  # noqa: E501

        :param category: The category of this AispAccountTransaction.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and category is None:
            raise ValueError("Invalid value for `category`, must not be `None`")  # noqa: E501
        allowed_values = ["DOMESTIC", "FOREIGN", "CARD", "OTHER"]  # noqa: E501
        if (self._configuration.client_side_validation and
                category not in allowed_values):
            raise ValueError(
                "Invalid value for `category` ({0}), must be one of {1}"  # noqa: E501
                .format(category, allowed_values)
            )

        self._category = category

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

        Transaction type  # noqa: E501

        :return: The type of this AispAccountTransaction.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this AispAccountTransaction.

        Transaction type  # noqa: E501

        :param type: The type of this AispAccountTransaction.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["CREDIT", "DEBIT"]  # noqa: E501
        if (self._configuration.client_side_validation and
                type not in allowed_values):
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The partner_account of this AispAccountTransaction.  # noqa: E501
        :rtype: AispAccountTransactionPartnerAccount
        """
        return self._partner_account

    @partner_account.setter
    def partner_account(self, partner_account):
        """Sets the partner_account of this AispAccountTransaction.


        :param partner_account: The partner_account of this AispAccountTransaction.  # noqa: E501
        :type: AispAccountTransactionPartnerAccount
        """

        self._partner_account = partner_account

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


        :return: The amount of this AispAccountTransaction.  # noqa: E501
        :rtype: Money
        """
        return self._amount

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


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

        self._amount = amount

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

        Effective/Value date  # noqa: E501

        :return: The effective_date of this AispAccountTransaction.  # noqa: E501
        :rtype: date
        """
        return self._effective_date

    @effective_date.setter
    def effective_date(self, effective_date):
        """Sets the effective_date of this AispAccountTransaction.

        Effective/Value date  # noqa: E501

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

        self._effective_date = effective_date

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

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