# coding: utf-8

"""
    Haven Money API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class RawTransaction(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': 'str',
        'account': 'str',
        'user': 'str',
        'raw_memo': 'str',
        'merchant': 'RawMerchant',
        'store': 'RawMerchantStore',
        'network': 'str',
        'user_transacted_at': 'datetime',
        'amount': 'str',
        'categories': 'list[str]',
        'kind': 'TransactionKind',
        'state': 'TransactionState',
        'tags': 'list[str]'
    }

    attribute_map = {
        'id': 'id',
        'account': 'account',
        'user': 'user',
        'raw_memo': 'rawMemo',
        'merchant': 'merchant',
        'store': 'store',
        'network': 'network',
        'user_transacted_at': 'userTransactedAt',
        'amount': 'amount',
        'categories': 'categories',
        'kind': 'kind',
        'state': 'state',
        'tags': 'tags'
    }

    def __init__(self, id=None, account=None, user=None, raw_memo=None, merchant=None, store=None, network=None, user_transacted_at=None, amount=None, categories=None, kind=None, state=None, tags=None):  # noqa: E501
        """RawTransaction - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._account = None
        self._user = None
        self._raw_memo = None
        self._merchant = None
        self._store = None
        self._network = None
        self._user_transacted_at = None
        self._amount = None
        self._categories = None
        self._kind = None
        self._state = None
        self._tags = None
        self.discriminator = None

        self.id = id
        self.account = account
        self.user = user
        self.raw_memo = raw_memo
        if merchant is not None:
            self.merchant = merchant
        if store is not None:
            self.store = store
        if network is not None:
            self.network = network
        if user_transacted_at is not None:
            self.user_transacted_at = user_transacted_at
        self.amount = amount
        self.categories = categories
        self.kind = kind
        self.state = state
        self.tags = tags

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


        :return: The id of this RawTransaction.  # noqa: E501
        :rtype: str
        """
        return self._id

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


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

        self._id = id

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


        :return: The account of this RawTransaction.  # noqa: E501
        :rtype: str
        """
        return self._account

    @account.setter
    def account(self, account):
        """Sets the account of this RawTransaction.


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

        self._account = account

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


        :return: The user of this RawTransaction.  # noqa: E501
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this RawTransaction.


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

        self._user = user

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


        :return: The raw_memo of this RawTransaction.  # noqa: E501
        :rtype: str
        """
        return self._raw_memo

    @raw_memo.setter
    def raw_memo(self, raw_memo):
        """Sets the raw_memo of this RawTransaction.


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

        self._raw_memo = raw_memo

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


        :return: The merchant of this RawTransaction.  # noqa: E501
        :rtype: RawMerchant
        """
        return self._merchant

    @merchant.setter
    def merchant(self, merchant):
        """Sets the merchant of this RawTransaction.


        :param merchant: The merchant of this RawTransaction.  # noqa: E501
        :type: RawMerchant
        """

        self._merchant = merchant

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


        :return: The store of this RawTransaction.  # noqa: E501
        :rtype: RawMerchantStore
        """
        return self._store

    @store.setter
    def store(self, store):
        """Sets the store of this RawTransaction.


        :param store: The store of this RawTransaction.  # noqa: E501
        :type: RawMerchantStore
        """

        self._store = store

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


        :return: The network of this RawTransaction.  # noqa: E501
        :rtype: str
        """
        return self._network

    @network.setter
    def network(self, network):
        """Sets the network of this RawTransaction.


        :param network: The network of this RawTransaction.  # noqa: E501
        :type: str
        """

        self._network = network

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


        :return: The user_transacted_at of this RawTransaction.  # noqa: E501
        :rtype: datetime
        """
        return self._user_transacted_at

    @user_transacted_at.setter
    def user_transacted_at(self, user_transacted_at):
        """Sets the user_transacted_at of this RawTransaction.


        :param user_transacted_at: The user_transacted_at of this RawTransaction.  # noqa: E501
        :type: datetime
        """

        self._user_transacted_at = user_transacted_at

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


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

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


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

        self._amount = amount

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


        :return: The categories of this RawTransaction.  # noqa: E501
        :rtype: list[str]
        """
        return self._categories

    @categories.setter
    def categories(self, categories):
        """Sets the categories of this RawTransaction.


        :param categories: The categories of this RawTransaction.  # noqa: E501
        :type: list[str]
        """
        if categories is None:
            raise ValueError("Invalid value for `categories`, must not be `None`")  # noqa: E501

        self._categories = categories

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


        :return: The kind of this RawTransaction.  # noqa: E501
        :rtype: TransactionKind
        """
        return self._kind

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


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

        self._kind = kind

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


        :return: The state of this RawTransaction.  # noqa: E501
        :rtype: TransactionState
        """
        return self._state

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


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

        self._state = state

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


        :return: The tags of this RawTransaction.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this RawTransaction.


        :param tags: The tags of this RawTransaction.  # noqa: E501
        :type: list[str]
        """
        if tags is None:
            raise ValueError("Invalid value for `tags`, must not be `None`")  # noqa: E501

        self._tags = tags

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

        return self.__dict__ == other.__dict__

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