# coding: utf-8

"""
    The Plaid API

    The Plaid REST API. Please see https://plaid.com/docs/api for more details.  # noqa: E501

    The version of the OpenAPI document: 2020-09-14_1.0.11
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from plaid.generated_plaid.configuration import Configuration


class OverrideAccounts(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 = {
        'type': 'AccountType',
        'subtype': 'AccountSubtype',
        'starting_balance': 'float',
        'force_available_balance': 'float',
        'currency': 'str',
        'meta': 'Meta',
        'numbers': 'Numbers',
        'transactions': 'list[TransactionOverride]',
        'identity': 'OwnerOverride',
        'liability': 'LiabilityOverride',
        'inflow_model': 'InflowModel'
    }

    attribute_map = {
        'type': 'type',
        'subtype': 'subtype',
        'starting_balance': 'starting_balance',
        'force_available_balance': 'force_available_balance',
        'currency': 'currency',
        'meta': 'meta',
        'numbers': 'numbers',
        'transactions': 'transactions',
        'identity': 'identity',
        'liability': 'liability',
        'inflow_model': 'inflow_model'
    }

    def __init__(self, type=None, subtype=None, starting_balance=None, force_available_balance=None, currency=None, meta=None, numbers=None, transactions=None, identity=None, liability=None, inflow_model=None, local_vars_configuration=None):  # noqa: E501
        """OverrideAccounts - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._type = None
        self._subtype = None
        self._starting_balance = None
        self._force_available_balance = None
        self._currency = None
        self._meta = None
        self._numbers = None
        self._transactions = None
        self._identity = None
        self._liability = None
        self._inflow_model = None
        self.discriminator = None

        self.type = type
        self.subtype = subtype
        if starting_balance is not None:
            self.starting_balance = starting_balance
        if force_available_balance is not None:
            self.force_available_balance = force_available_balance
        if currency is not None:
            self.currency = currency
        if meta is not None:
            self.meta = meta
        if numbers is not None:
            self.numbers = numbers
        if transactions is not None:
            self.transactions = transactions
        if identity is not None:
            self.identity = identity
        if liability is not None:
            self.liability = liability
        if inflow_model is not None:
            self.inflow_model = inflow_model

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


        :return: The type of this OverrideAccounts.  # noqa: E501
        :rtype: AccountType
        """
        return self._type

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


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

        self._type = type

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


        :return: The subtype of this OverrideAccounts.  # noqa: E501
        :rtype: AccountSubtype
        """
        return self._subtype

    @subtype.setter
    def subtype(self, subtype):
        """Sets the subtype of this OverrideAccounts.


        :param subtype: The subtype of this OverrideAccounts.  # noqa: E501
        :type subtype: AccountSubtype
        """
        if self.local_vars_configuration.client_side_validation and subtype is None:  # noqa: E501
            raise ValueError("Invalid value for `subtype`, must not be `None`")  # noqa: E501

        self._subtype = subtype

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

        If provided, the account will start with this amount as the `current_balance`.   # noqa: E501

        :return: The starting_balance of this OverrideAccounts.  # noqa: E501
        :rtype: float
        """
        return self._starting_balance

    @starting_balance.setter
    def starting_balance(self, starting_balance):
        """Sets the starting_balance of this OverrideAccounts.

        If provided, the account will start with this amount as the `current_balance`.   # noqa: E501

        :param starting_balance: The starting_balance of this OverrideAccounts.  # noqa: E501
        :type starting_balance: float
        """

        self._starting_balance = starting_balance

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

        If provided, the account will always have this amount as its `available_balance`, regardless of current balance or changes in transactions over time.  # noqa: E501

        :return: The force_available_balance of this OverrideAccounts.  # noqa: E501
        :rtype: float
        """
        return self._force_available_balance

    @force_available_balance.setter
    def force_available_balance(self, force_available_balance):
        """Sets the force_available_balance of this OverrideAccounts.

        If provided, the account will always have this amount as its `available_balance`, regardless of current balance or changes in transactions over time.  # noqa: E501

        :param force_available_balance: The force_available_balance of this OverrideAccounts.  # noqa: E501
        :type force_available_balance: float
        """

        self._force_available_balance = force_available_balance

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

        ISO-4217 currency code. If provided, the account will be denominated in the given currency. Transactions will also be in this currency by default.  # noqa: E501

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

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

        ISO-4217 currency code. If provided, the account will be denominated in the given currency. Transactions will also be in this currency by default.  # noqa: E501

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

        self._currency = currency

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


        :return: The meta of this OverrideAccounts.  # noqa: E501
        :rtype: Meta
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this OverrideAccounts.


        :param meta: The meta of this OverrideAccounts.  # noqa: E501
        :type meta: Meta
        """

        self._meta = meta

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


        :return: The numbers of this OverrideAccounts.  # noqa: E501
        :rtype: Numbers
        """
        return self._numbers

    @numbers.setter
    def numbers(self, numbers):
        """Sets the numbers of this OverrideAccounts.


        :param numbers: The numbers of this OverrideAccounts.  # noqa: E501
        :type numbers: Numbers
        """

        self._numbers = numbers

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

        Specify the list of transactions on the account.  # noqa: E501

        :return: The transactions of this OverrideAccounts.  # noqa: E501
        :rtype: list[TransactionOverride]
        """
        return self._transactions

    @transactions.setter
    def transactions(self, transactions):
        """Sets the transactions of this OverrideAccounts.

        Specify the list of transactions on the account.  # noqa: E501

        :param transactions: The transactions of this OverrideAccounts.  # noqa: E501
        :type transactions: list[TransactionOverride]
        """

        self._transactions = transactions

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


        :return: The identity of this OverrideAccounts.  # noqa: E501
        :rtype: OwnerOverride
        """
        return self._identity

    @identity.setter
    def identity(self, identity):
        """Sets the identity of this OverrideAccounts.


        :param identity: The identity of this OverrideAccounts.  # noqa: E501
        :type identity: OwnerOverride
        """

        self._identity = identity

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


        :return: The liability of this OverrideAccounts.  # noqa: E501
        :rtype: LiabilityOverride
        """
        return self._liability

    @liability.setter
    def liability(self, liability):
        """Sets the liability of this OverrideAccounts.


        :param liability: The liability of this OverrideAccounts.  # noqa: E501
        :type liability: LiabilityOverride
        """

        self._liability = liability

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


        :return: The inflow_model of this OverrideAccounts.  # noqa: E501
        :rtype: InflowModel
        """
        return self._inflow_model

    @inflow_model.setter
    def inflow_model(self, inflow_model):
        """Sets the inflow_model of this OverrideAccounts.


        :param inflow_model: The inflow_model of this OverrideAccounts.  # noqa: E501
        :type inflow_model: InflowModel
        """

        self._inflow_model = inflow_model

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

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