# coding: utf-8

"""
    BIMData API

    BIMData API is a tool to interact with your models stored on BIMData’s servers.     Through the API, you can manage your projects, the clouds, upload your IFC files and manage them through endpoints.  # noqa: E501

    The version of the OpenAPI document: v1
    Contact: support@bimdata.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from bimdata_api_client.configuration import Configuration


class MarketplaceApp(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': 'int',
        'name': 'str',
        'short_description': 'str',
        'long_description': 'str',
        'activation_webhook_url': 'str',
        'post_activation_redirect_uri': 'str',
        'viewer_plugins_urls': 'list[str]',
        'webhook_secret': 'str',
        'creator': 'User',
        'scopes': 'list[str]',
        'settings_url': 'str',
        'is_public': 'bool',
        'tags': 'list[str]',
        'logo': 'str',
        'images': 'list[MarketplaceAppImage]',
        'organization': 'PublicOrganization'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'short_description': 'short_description',
        'long_description': 'long_description',
        'activation_webhook_url': 'activation_webhook_url',
        'post_activation_redirect_uri': 'post_activation_redirect_uri',
        'viewer_plugins_urls': 'viewer_plugins_urls',
        'webhook_secret': 'webhook_secret',
        'creator': 'creator',
        'scopes': 'scopes',
        'settings_url': 'settings_url',
        'is_public': 'is_public',
        'tags': 'tags',
        'logo': 'logo',
        'images': 'images',
        'organization': 'organization'
    }

    def __init__(self, id=None, name=None, short_description=None, long_description=None, activation_webhook_url=None, post_activation_redirect_uri=None, viewer_plugins_urls=None, webhook_secret=None, creator=None, scopes=None, settings_url=None, is_public=None, tags=None, logo=None, images=None, organization=None, local_vars_configuration=None):  # noqa: E501
        """MarketplaceApp - 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._id = None
        self._name = None
        self._short_description = None
        self._long_description = None
        self._activation_webhook_url = None
        self._post_activation_redirect_uri = None
        self._viewer_plugins_urls = None
        self._webhook_secret = None
        self._creator = None
        self._scopes = None
        self._settings_url = None
        self._is_public = None
        self._tags = None
        self._logo = None
        self._images = None
        self._organization = None
        self.discriminator = None

        if id is not None:
            self.id = id
        self.name = name
        self.short_description = short_description
        self.long_description = long_description
        self.activation_webhook_url = activation_webhook_url
        self.post_activation_redirect_uri = post_activation_redirect_uri
        self.viewer_plugins_urls = viewer_plugins_urls
        if webhook_secret is not None:
            self.webhook_secret = webhook_secret
        if creator is not None:
            self.creator = creator
        if scopes is not None:
            self.scopes = scopes
        self.settings_url = settings_url
        if is_public is not None:
            self.is_public = is_public
        if tags is not None:
            self.tags = tags
        self.logo = logo
        if images is not None:
            self.images = images
        if organization is not None:
            self.organization = organization

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


        :return: The id of this MarketplaceApp.  # noqa: E501
        :rtype: int
        """
        return self._id

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


        :param id: The id of this MarketplaceApp.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The name of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this MarketplaceApp.


        :param name: The name of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and name is None:  # noqa: E501
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) > 256):
            raise ValueError("Invalid value for `name`, length must be less than or equal to `256`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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


        :return: The short_description of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._short_description

    @short_description.setter
    def short_description(self, short_description):
        """Sets the short_description of this MarketplaceApp.


        :param short_description: The short_description of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and short_description is None:  # noqa: E501
            raise ValueError("Invalid value for `short_description`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                short_description is not None and len(short_description) > 130):
            raise ValueError("Invalid value for `short_description`, length must be less than or equal to `130`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                short_description is not None and len(short_description) < 1):
            raise ValueError("Invalid value for `short_description`, length must be greater than or equal to `1`")  # noqa: E501

        self._short_description = short_description

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


        :return: The long_description of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._long_description

    @long_description.setter
    def long_description(self, long_description):
        """Sets the long_description of this MarketplaceApp.


        :param long_description: The long_description of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and long_description is None:  # noqa: E501
            raise ValueError("Invalid value for `long_description`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                long_description is not None and len(long_description) < 1):
            raise ValueError("Invalid value for `long_description`, length must be greater than or equal to `1`")  # noqa: E501

        self._long_description = long_description

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


        :return: The activation_webhook_url of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._activation_webhook_url

    @activation_webhook_url.setter
    def activation_webhook_url(self, activation_webhook_url):
        """Sets the activation_webhook_url of this MarketplaceApp.


        :param activation_webhook_url: The activation_webhook_url of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                activation_webhook_url is not None and len(activation_webhook_url) > 1024):
            raise ValueError("Invalid value for `activation_webhook_url`, length must be less than or equal to `1024`")  # noqa: E501

        self._activation_webhook_url = activation_webhook_url

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


        :return: The post_activation_redirect_uri of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._post_activation_redirect_uri

    @post_activation_redirect_uri.setter
    def post_activation_redirect_uri(self, post_activation_redirect_uri):
        """Sets the post_activation_redirect_uri of this MarketplaceApp.


        :param post_activation_redirect_uri: The post_activation_redirect_uri of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                post_activation_redirect_uri is not None and len(post_activation_redirect_uri) > 1024):
            raise ValueError("Invalid value for `post_activation_redirect_uri`, length must be less than or equal to `1024`")  # noqa: E501

        self._post_activation_redirect_uri = post_activation_redirect_uri

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


        :return: The viewer_plugins_urls of this MarketplaceApp.  # noqa: E501
        :rtype: list[str]
        """
        return self._viewer_plugins_urls

    @viewer_plugins_urls.setter
    def viewer_plugins_urls(self, viewer_plugins_urls):
        """Sets the viewer_plugins_urls of this MarketplaceApp.


        :param viewer_plugins_urls: The viewer_plugins_urls of this MarketplaceApp.  # noqa: E501
        :type: list[str]
        """

        self._viewer_plugins_urls = viewer_plugins_urls

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


        :return: The webhook_secret of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._webhook_secret

    @webhook_secret.setter
    def webhook_secret(self, webhook_secret):
        """Sets the webhook_secret of this MarketplaceApp.


        :param webhook_secret: The webhook_secret of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                webhook_secret is not None and len(webhook_secret) < 1):
            raise ValueError("Invalid value for `webhook_secret`, length must be greater than or equal to `1`")  # noqa: E501

        self._webhook_secret = webhook_secret

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


        :return: The creator of this MarketplaceApp.  # noqa: E501
        :rtype: User
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this MarketplaceApp.


        :param creator: The creator of this MarketplaceApp.  # noqa: E501
        :type: User
        """

        self._creator = creator

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


        :return: The scopes of this MarketplaceApp.  # noqa: E501
        :rtype: list[str]
        """
        return self._scopes

    @scopes.setter
    def scopes(self, scopes):
        """Sets the scopes of this MarketplaceApp.


        :param scopes: The scopes of this MarketplaceApp.  # noqa: E501
        :type: list[str]
        """

        self._scopes = scopes

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

        this URL will be called with query params ?cloud_id=  # noqa: E501

        :return: The settings_url of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._settings_url

    @settings_url.setter
    def settings_url(self, settings_url):
        """Sets the settings_url of this MarketplaceApp.

        this URL will be called with query params ?cloud_id=  # noqa: E501

        :param settings_url: The settings_url of this MarketplaceApp.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                settings_url is not None and len(settings_url) > 1024):
            raise ValueError("Invalid value for `settings_url`, length must be less than or equal to `1024`")  # noqa: E501

        self._settings_url = settings_url

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


        :return: The is_public of this MarketplaceApp.  # noqa: E501
        :rtype: bool
        """
        return self._is_public

    @is_public.setter
    def is_public(self, is_public):
        """Sets the is_public of this MarketplaceApp.


        :param is_public: The is_public of this MarketplaceApp.  # noqa: E501
        :type: bool
        """

        self._is_public = is_public

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


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

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


        :param tags: The tags of this MarketplaceApp.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

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


        :return: The logo of this MarketplaceApp.  # noqa: E501
        :rtype: str
        """
        return self._logo

    @logo.setter
    def logo(self, logo):
        """Sets the logo of this MarketplaceApp.


        :param logo: The logo of this MarketplaceApp.  # noqa: E501
        :type: str
        """

        self._logo = logo

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


        :return: The images of this MarketplaceApp.  # noqa: E501
        :rtype: list[MarketplaceAppImage]
        """
        return self._images

    @images.setter
    def images(self, images):
        """Sets the images of this MarketplaceApp.


        :param images: The images of this MarketplaceApp.  # noqa: E501
        :type: list[MarketplaceAppImage]
        """

        self._images = images

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


        :return: The organization of this MarketplaceApp.  # noqa: E501
        :rtype: PublicOrganization
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this MarketplaceApp.


        :param organization: The organization of this MarketplaceApp.  # noqa: E501
        :type: PublicOrganization
        """

        self._organization = organization

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

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