# 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 TransactionAuthorizationLevelData(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 = {
        'allow_broker': 'bool',
        'allow_payer': 'bool',
        'allow_receiver': 'bool',
        'allow_admin': 'bool',
        'brokers': 'list[User]'
    }

    attribute_map = {
        'allow_broker': 'allowBroker',
        'allow_payer': 'allowPayer',
        'allow_receiver': 'allowReceiver',
        'allow_admin': 'allowAdmin',
        'brokers': 'brokers'
    }

    def __init__(self, allow_broker=None, allow_payer=None, allow_receiver=None, allow_admin=None, brokers=None, _configuration=None):  # noqa: E501
        """TransactionAuthorizationLevelData - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._allow_broker = None
        self._allow_payer = None
        self._allow_receiver = None
        self._allow_admin = None
        self._brokers = None
        self.discriminator = None

        if allow_broker is not None:
            self.allow_broker = allow_broker
        if allow_payer is not None:
            self.allow_payer = allow_payer
        if allow_receiver is not None:
            self.allow_receiver = allow_receiver
        if allow_admin is not None:
            self.allow_admin = allow_admin
        if brokers is not None:
            self.brokers = brokers

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

        Indicates that any of the payer's brokers can authorize this level.  # noqa: E501

        :return: The allow_broker of this TransactionAuthorizationLevelData.  # noqa: E501
        :rtype: bool
        """
        return self._allow_broker

    @allow_broker.setter
    def allow_broker(self, allow_broker):
        """Sets the allow_broker of this TransactionAuthorizationLevelData.

        Indicates that any of the payer's brokers can authorize this level.  # noqa: E501

        :param allow_broker: The allow_broker of this TransactionAuthorizationLevelData.  # noqa: E501
        :type: bool
        """

        self._allow_broker = allow_broker

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

        Indicates that the payer can authorize this level.  # noqa: E501

        :return: The allow_payer of this TransactionAuthorizationLevelData.  # noqa: E501
        :rtype: bool
        """
        return self._allow_payer

    @allow_payer.setter
    def allow_payer(self, allow_payer):
        """Sets the allow_payer of this TransactionAuthorizationLevelData.

        Indicates that the payer can authorize this level.  # noqa: E501

        :param allow_payer: The allow_payer of this TransactionAuthorizationLevelData.  # noqa: E501
        :type: bool
        """

        self._allow_payer = allow_payer

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

        Indicates that the payer can authorize this level.  # noqa: E501

        :return: The allow_receiver of this TransactionAuthorizationLevelData.  # noqa: E501
        :rtype: bool
        """
        return self._allow_receiver

    @allow_receiver.setter
    def allow_receiver(self, allow_receiver):
        """Sets the allow_receiver of this TransactionAuthorizationLevelData.

        Indicates that the payer can authorize this level.  # noqa: E501

        :param allow_receiver: The allow_receiver of this TransactionAuthorizationLevelData.  # noqa: E501
        :type: bool
        """

        self._allow_receiver = allow_receiver

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

        Indicates that an administrator can authorize this level.  # noqa: E501

        :return: The allow_admin of this TransactionAuthorizationLevelData.  # noqa: E501
        :rtype: bool
        """
        return self._allow_admin

    @allow_admin.setter
    def allow_admin(self, allow_admin):
        """Sets the allow_admin of this TransactionAuthorizationLevelData.

        Indicates that an administrator can authorize this level.  # noqa: E501

        :param allow_admin: The allow_admin of this TransactionAuthorizationLevelData.  # noqa: E501
        :type: bool
        """

        self._allow_admin = allow_admin

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

        Contains the brokers that can authorize this level.  # noqa: E501

        :return: The brokers of this TransactionAuthorizationLevelData.  # noqa: E501
        :rtype: list[User]
        """
        return self._brokers

    @brokers.setter
    def brokers(self, brokers):
        """Sets the brokers of this TransactionAuthorizationLevelData.

        Contains the brokers that can authorize this level.  # noqa: E501

        :param brokers: The brokers of this TransactionAuthorizationLevelData.  # noqa: E501
        :type: list[User]
        """

        self._brokers = brokers

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

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