# coding: utf-8

"""
    

    [AHOI cookbook](/ahoi/docs/cookbook/index.html)  [Data Privacy](/sandboxmanager/#/privacy)  [Terms of Service](/sandboxmanager/#/terms)  [Imprint](https://sparkassen-hub.com/impressum/)  &copy; 2016&dash;2017 Starfinanz - Ein Unternehmen der Finanz Informatik  # noqa: E501

    OpenAPI spec version: 2.1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.models.amount import Amount  # noqa: F401,E501


class TransactionPattern(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 = {
        'id': 'int',
        'state': 'str',
        'cycle': 'str',
        'origin': 'str',
        'day': 'int',
        'related_account_owner': 'str',
        'amount': 'Amount',
        'account_number': 'str',
        'bank_code': 'str',
        'kind': 'str'
    }

    attribute_map = {
        'id': 'id',
        'state': 'state',
        'cycle': 'cycle',
        'origin': 'origin',
        'day': 'day',
        'related_account_owner': 'relatedAccountOwner',
        'amount': 'amount',
        'account_number': 'accountNumber',
        'bank_code': 'bankCode',
        'kind': 'kind'
    }

    def __init__(self, id=None, state=None, cycle=None, origin=None, day=None, related_account_owner=None, amount=None, account_number=None, bank_code=None, kind=None):  # noqa: E501
        """TransactionPattern - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._state = None
        self._cycle = None
        self._origin = None
        self._day = None
        self._related_account_owner = None
        self._amount = None
        self._account_number = None
        self._bank_code = None
        self._kind = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.state = state
        self.cycle = cycle
        if origin is not None:
            self.origin = origin
        self.day = day
        self.related_account_owner = related_account_owner
        self.amount = amount
        self.account_number = account_number
        self.bank_code = bank_code
        if kind is not None:
            self.kind = kind

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

        Internal ID of this transactionPattern (generated value)  # noqa: E501

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

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

        Internal ID of this transactionPattern (generated value)  # noqa: E501

        :param id: The id of this TransactionPattern.  # noqa: E501
        :type: int
        """

        self._id = id

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

        State of this pattern  can be `ACTIVE` (default) or `INACTIVE` (user has disabled it)  # noqa: E501

        :return: The state of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this TransactionPattern.

        State of this pattern  can be `ACTIVE` (default) or `INACTIVE` (user has disabled it)  # noqa: E501

        :param state: The state of this TransactionPattern.  # noqa: E501
        :type: str
        """
        if state is None:
            raise ValueError("Invalid value for `state`, must not be `None`")  # noqa: E501
        allowed_values = ["INACTIVE", "ACTIVE"]  # noqa: E501
        if state not in allowed_values:
            raise ValueError(
                "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                .format(state, allowed_values)
            )

        self._state = state

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

        Frequency of occurrence for this pattern  # noqa: E501

        :return: The cycle of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._cycle

    @cycle.setter
    def cycle(self, cycle):
        """Sets the cycle of this TransactionPattern.

        Frequency of occurrence for this pattern  # noqa: E501

        :param cycle: The cycle of this TransactionPattern.  # noqa: E501
        :type: str
        """
        if cycle is None:
            raise ValueError("Invalid value for `cycle`, must not be `None`")  # noqa: E501
        allowed_values = ["MONTHLY", "QUARTERLY", "SEMI_ANNUALLY", "ANNUALLY"]  # noqa: E501
        if cycle not in allowed_values:
            raise ValueError(
                "Invalid value for `cycle` ({0}), must be one of {1}"  # noqa: E501
                .format(cycle, allowed_values)
            )

        self._cycle = cycle

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

        Origin of creation can be `FINDER` (automatically found) or `MANUAL` (created by user). Cannot be set with creation or update.  # noqa: E501

        :return: The origin of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this TransactionPattern.

        Origin of creation can be `FINDER` (automatically found) or `MANUAL` (created by user). Cannot be set with creation or update.  # noqa: E501

        :param origin: The origin of this TransactionPattern.  # noqa: E501
        :type: str
        """
        allowed_values = ["FINDER", "MANUAL"]  # noqa: E501
        if origin not in allowed_values:
            raise ValueError(
                "Invalid value for `origin` ({0}), must be one of {1}"  # noqa: E501
                .format(origin, allowed_values)
            )

        self._origin = origin

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

        Day in the cycle this pattern occurs  # noqa: E501

        :return: The day of this TransactionPattern.  # noqa: E501
        :rtype: int
        """
        return self._day

    @day.setter
    def day(self, day):
        """Sets the day of this TransactionPattern.

        Day in the cycle this pattern occurs  # noqa: E501

        :param day: The day of this TransactionPattern.  # noqa: E501
        :type: int
        """
        if day is None:
            raise ValueError("Invalid value for `day`, must not be `None`")  # noqa: E501

        self._day = day

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

        Name of owner of related account (debtor or creditor)  # noqa: E501

        :return: The related_account_owner of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._related_account_owner

    @related_account_owner.setter
    def related_account_owner(self, related_account_owner):
        """Sets the related_account_owner of this TransactionPattern.

        Name of owner of related account (debtor or creditor)  # noqa: E501

        :param related_account_owner: The related_account_owner of this TransactionPattern.  # noqa: E501
        :type: str
        """
        if related_account_owner is None:
            raise ValueError("Invalid value for `related_account_owner`, must not be `None`")  # noqa: E501

        self._related_account_owner = related_account_owner

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

        Amount value  # noqa: E501

        :return: The amount of this TransactionPattern.  # noqa: E501
        :rtype: Amount
        """
        return self._amount

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

        Amount value  # noqa: E501

        :param amount: The amount of this TransactionPattern.  # noqa: E501
        :type: Amount
        """
        if amount is None:
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

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

        Account number or IBAN of related account (debtor or creditor)  # noqa: E501

        :return: The account_number of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._account_number

    @account_number.setter
    def account_number(self, account_number):
        """Sets the account_number of this TransactionPattern.

        Account number or IBAN of related account (debtor or creditor)  # noqa: E501

        :param account_number: The account_number of this TransactionPattern.  # noqa: E501
        :type: str
        """
        if account_number is None:
            raise ValueError("Invalid value for `account_number`, must not be `None`")  # noqa: E501

        self._account_number = account_number

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

        Bank code number or BIC of related account (debtor or creditor)  # noqa: E501

        :return: The bank_code of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._bank_code

    @bank_code.setter
    def bank_code(self, bank_code):
        """Sets the bank_code of this TransactionPattern.

        Bank code number or BIC of related account (debtor or creditor)  # noqa: E501

        :param bank_code: The bank_code of this TransactionPattern.  # noqa: E501
        :type: str
        """
        if bank_code is None:
            raise ValueError("Invalid value for `bank_code`, must not be `None`")  # noqa: E501

        self._bank_code = bank_code

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

        Kind of transaction (e.g., \"Lastschrift\" or \"Dauerauftrag\")  # noqa: E501

        :return: The kind of this TransactionPattern.  # noqa: E501
        :rtype: str
        """
        return self._kind

    @kind.setter
    def kind(self, kind):
        """Sets the kind of this TransactionPattern.

        Kind of transaction (e.g., \"Lastschrift\" or \"Dauerauftrag\")  # noqa: E501

        :param kind: The kind of this TransactionPattern.  # noqa: E501
        :type: str
        """

        self._kind = kind

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

        return self.__dict__ == other.__dict__

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