# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class AccountPermissions(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 = {
        'account': 'AccountWithCurrency',
        'visible': 'bool',
        'system_payments': 'list[RelatedTransferType]',
        'user_payments': 'list[RelatedTransferType]',
        'self_payments': 'list[RelatedTransferType]',
        'pos_payments': 'list[RelatedTransferType]'
    }

    attribute_map = {
        'account': 'account',
        'visible': 'visible',
        'system_payments': 'systemPayments',
        'user_payments': 'userPayments',
        'self_payments': 'selfPayments',
        'pos_payments': 'posPayments'
    }

    def __init__(self, account=None, visible=None, system_payments=None, user_payments=None, self_payments=None, pos_payments=None, _configuration=None):  # noqa: E501
        """AccountPermissions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._account = None
        self._visible = None
        self._system_payments = None
        self._user_payments = None
        self._self_payments = None
        self._pos_payments = None
        self.discriminator = None

        if account is not None:
            self.account = account
        if visible is not None:
            self.visible = visible
        if system_payments is not None:
            self.system_payments = system_payments
        if user_payments is not None:
            self.user_payments = user_payments
        if self_payments is not None:
            self.self_payments = self_payments
        if pos_payments is not None:
            self.pos_payments = pos_payments

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

        The account  # noqa: E501

        :return: The account of this AccountPermissions.  # noqa: E501
        :rtype: AccountWithCurrency
        """
        return self._account

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

        The account  # noqa: E501

        :param account: The account of this AccountPermissions.  # noqa: E501
        :type: AccountWithCurrency
        """

        self._account = account

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

        Whether the account also is visible for the logged user or, if false means it is only accessible. A non visible account still is operative, i.e the user could make/receive payments from/to it  (i.e is accessible) but can not make a transfers history search for it.   # noqa: E501

        :return: The visible of this AccountPermissions.  # noqa: E501
        :rtype: bool
        """
        return self._visible

    @visible.setter
    def visible(self, visible):
        """Sets the visible of this AccountPermissions.

        Whether the account also is visible for the logged user or, if false means it is only accessible. A non visible account still is operative, i.e the user could make/receive payments from/to it  (i.e is accessible) but can not make a transfers history search for it.   # noqa: E501

        :param visible: The visible of this AccountPermissions.  # noqa: E501
        :type: bool
        """

        self._visible = visible

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

        Payment types allowed to be performed to system accounts.  # noqa: E501

        :return: The system_payments of this AccountPermissions.  # noqa: E501
        :rtype: list[RelatedTransferType]
        """
        return self._system_payments

    @system_payments.setter
    def system_payments(self, system_payments):
        """Sets the system_payments of this AccountPermissions.

        Payment types allowed to be performed to system accounts.  # noqa: E501

        :param system_payments: The system_payments of this AccountPermissions.  # noqa: E501
        :type: list[RelatedTransferType]
        """

        self._system_payments = system_payments

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

        Payment types allowed to be performed to other users  # noqa: E501

        :return: The user_payments of this AccountPermissions.  # noqa: E501
        :rtype: list[RelatedTransferType]
        """
        return self._user_payments

    @user_payments.setter
    def user_payments(self, user_payments):
        """Sets the user_payments of this AccountPermissions.

        Payment types allowed to be performed to other users  # noqa: E501

        :param user_payments: The user_payments of this AccountPermissions.  # noqa: E501
        :type: list[RelatedTransferType]
        """

        self._user_payments = user_payments

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

        Payment types allowed to be performed to other self accounts. Only returned for user accounts.   # noqa: E501

        :return: The self_payments of this AccountPermissions.  # noqa: E501
        :rtype: list[RelatedTransferType]
        """
        return self._self_payments

    @self_payments.setter
    def self_payments(self, self_payments):
        """Sets the self_payments of this AccountPermissions.

        Payment types allowed to be performed to other self accounts. Only returned for user accounts.   # noqa: E501

        :param self_payments: The self_payments of this AccountPermissions.  # noqa: E501
        :type: list[RelatedTransferType]
        """

        self._self_payments = self_payments

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

        Payment types allowed to be used on POS (receive payments from other users). Only returned for user accounts.           # noqa: E501

        :return: The pos_payments of this AccountPermissions.  # noqa: E501
        :rtype: list[RelatedTransferType]
        """
        return self._pos_payments

    @pos_payments.setter
    def pos_payments(self, pos_payments):
        """Sets the pos_payments of this AccountPermissions.

        Payment types allowed to be used on POS (receive payments from other users). Only returned for user accounts.           # noqa: E501

        :param pos_payments: The pos_payments of this AccountPermissions.  # noqa: E501
        :type: list[RelatedTransferType]
        """

        self._pos_payments = pos_payments

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

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