# 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 MarketplacePermissions(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 = {
        'search': 'bool',
        'own_advertisements': 'bool',
        'manage_own_advertisements': 'bool',
        'purchase': 'bool',
        'view_advertisements': 'bool',
        'view_webshop': 'bool'
    }

    attribute_map = {
        'search': 'search',
        'own_advertisements': 'ownAdvertisements',
        'manage_own_advertisements': 'manageOwnAdvertisements',
        'purchase': 'purchase',
        'view_advertisements': 'viewAdvertisements',
        'view_webshop': 'viewWebshop'
    }

    def __init__(self, search=None, own_advertisements=None, manage_own_advertisements=None, purchase=None, view_advertisements=None, view_webshop=None, _configuration=None):  # noqa: E501
        """MarketplacePermissions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._search = None
        self._own_advertisements = None
        self._manage_own_advertisements = None
        self._purchase = None
        self._view_advertisements = None
        self._view_webshop = None
        self.discriminator = None

        if search is not None:
            self.search = search
        if own_advertisements is not None:
            self.own_advertisements = own_advertisements
        if manage_own_advertisements is not None:
            self.manage_own_advertisements = manage_own_advertisements
        if purchase is not None:
            self.purchase = purchase
        if view_advertisements is not None:
            self.view_advertisements = view_advertisements
        if view_webshop is not None:
            self.view_webshop = view_webshop

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

        Can search for simple and webshop advertisements?  # noqa: E501

        :return: The search of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._search

    @search.setter
    def search(self, search):
        """Sets the search of this MarketplacePermissions.

        Can search for simple and webshop advertisements?  # noqa: E501

        :param search: The search of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._search = search

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

        Can own simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :return: The own_advertisements of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._own_advertisements

    @own_advertisements.setter
    def own_advertisements(self, own_advertisements):
        """Sets the own_advertisements of this MarketplacePermissions.

        Can own simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :param own_advertisements: The own_advertisements of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._own_advertisements = own_advertisements

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

        Can manage own simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :return: The manage_own_advertisements of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._manage_own_advertisements

    @manage_own_advertisements.setter
    def manage_own_advertisements(self, manage_own_advertisements):
        """Sets the manage_own_advertisements of this MarketplacePermissions.

        Can manage own simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :param manage_own_advertisements: The manage_own_advertisements of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._manage_own_advertisements = manage_own_advertisements

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

        Can buy webwop ads? Only returned if there is an authenticated user.   # noqa: E501

        :return: The purchase of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._purchase

    @purchase.setter
    def purchase(self, purchase):
        """Sets the purchase of this MarketplacePermissions.

        Can buy webwop ads? Only returned if there is an authenticated user.   # noqa: E501

        :param purchase: The purchase of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._purchase = purchase

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

        Can view simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :return: The view_advertisements of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._view_advertisements

    @view_advertisements.setter
    def view_advertisements(self, view_advertisements):
        """Sets the view_advertisements of this MarketplacePermissions.

        Can view simple advertisements? Only returned if there is an authenticated user.   # noqa: E501

        :param view_advertisements: The view_advertisements of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._view_advertisements = view_advertisements

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

        Can view webshop advertisements? If this permission is granted then the user can can buy webshop ads too. Only returned if there is an authenticated user.   # noqa: E501

        :return: The view_webshop of this MarketplacePermissions.  # noqa: E501
        :rtype: bool
        """
        return self._view_webshop

    @view_webshop.setter
    def view_webshop(self, view_webshop):
        """Sets the view_webshop of this MarketplacePermissions.

        Can view webshop advertisements? If this permission is granted then the user can can buy webshop ads too. Only returned if there is an authenticated user.   # noqa: E501

        :param view_webshop: The view_webshop of this MarketplacePermissions.  # noqa: E501
        :type: bool
        """

        self._view_webshop = view_webshop

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

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