# coding: utf-8

"""
    Schul-Cloud Content API

    This is the specification for the content of Schul-Cloud. You can find more information in the repository <https://github.com/schul-cloud/ressources-api-v1>. 

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


from pprint import pformat
from six import iteritems
import re


class Ressource(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, title=None, url=None, license=None, mime_type=None, providers=None, content_category=None, languages=None, subjects=None, thumbnail=None, size=None, dimensions=None, duration=None, context_url=None):
        """
        Ressource - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'title': 'str',
            'url': 'URL',
            'license': 'list[License]',
            'mime_type': 'str',
            'providers': 'list[Provider]',
            'content_category': 'ContentCategory',
            'languages': 'list[Language]',
            'subjects': 'list[Subject]',
            'thumbnail': 'URL',
            'size': 'int',
            'dimensions': 'Dimensions',
            'duration': 'float',
            'context_url': 'URL'
        }

        self.attribute_map = {
            'title': 'title',
            'url': 'url',
            'license': 'license',
            'mime_type': 'mimeType',
            'providers': 'providers',
            'content_category': 'contentCategory',
            'languages': 'languages',
            'subjects': 'subjects',
            'thumbnail': 'thumbnail',
            'size': 'size',
            'dimensions': 'dimensions',
            'duration': 'duration',
            'context_url': 'contextUrl'
        }

        self._title = title
        self._url = url
        self._license = license
        self._mime_type = mime_type
        self._providers = providers
        self._content_category = content_category
        self._languages = languages
        self._subjects = subjects
        self._thumbnail = thumbnail
        self._size = size
        self._dimensions = dimensions
        self._duration = duration
        self._context_url = context_url

    @property
    def title(self):
        """
        Gets the title of this Ressource.
        The title of the document.

        :return: The title of this Ressource.
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """
        Sets the title of this Ressource.
        The title of the document.

        :param title: The title of this Ressource.
        :type: str
        """
        if title is None:
            raise ValueError("Invalid value for `title`, must not be `None`")

        self._title = title

    @property
    def url(self):
        """
        Gets the url of this Ressource.

        :return: The url of this Ressource.
        :rtype: URL
        """
        return self._url

    @url.setter
    def url(self, url):
        """
        Sets the url of this Ressource.

        :param url: The url of this Ressource.
        :type: URL
        """
        if url is None:
            raise ValueError("Invalid value for `url`, must not be `None`")

        self._url = url

    @property
    def license(self):
        """
        Gets the license of this Ressource.

        :return: The license of this Ressource.
        :rtype: list[License]
        """
        return self._license

    @license.setter
    def license(self, license):
        """
        Sets the license of this Ressource.

        :param license: The license of this Ressource.
        :type: list[License]
        """
        if license is None:
            raise ValueError("Invalid value for `license`, must not be `None`")

        self._license = license

    @property
    def mime_type(self):
        """
        Gets the mime_type of this Ressource.
        <https://tools.ietf.org/html/rfc2046>

        :return: The mime_type of this Ressource.
        :rtype: str
        """
        return self._mime_type

    @mime_type.setter
    def mime_type(self, mime_type):
        """
        Sets the mime_type of this Ressource.
        <https://tools.ietf.org/html/rfc2046>

        :param mime_type: The mime_type of this Ressource.
        :type: str
        """
        if mime_type is None:
            raise ValueError("Invalid value for `mime_type`, must not be `None`")

        self._mime_type = mime_type

    @property
    def providers(self):
        """
        Gets the providers of this Ressource.
        The entity providing this information.

        :return: The providers of this Ressource.
        :rtype: list[Provider]
        """
        return self._providers

    @providers.setter
    def providers(self, providers):
        """
        Sets the providers of this Ressource.
        The entity providing this information.

        :param providers: The providers of this Ressource.
        :type: list[Provider]
        """
        if providers is None:
            raise ValueError("Invalid value for `providers`, must not be `None`")

        self._providers = providers

    @property
    def content_category(self):
        """
        Gets the content_category of this Ressource.

        :return: The content_category of this Ressource.
        :rtype: ContentCategory
        """
        return self._content_category

    @content_category.setter
    def content_category(self, content_category):
        """
        Sets the content_category of this Ressource.

        :param content_category: The content_category of this Ressource.
        :type: ContentCategory
        """
        if content_category is None:
            raise ValueError("Invalid value for `content_category`, must not be `None`")

        self._content_category = content_category

    @property
    def languages(self):
        """
        Gets the languages of this Ressource.

        :return: The languages of this Ressource.
        :rtype: list[Language]
        """
        return self._languages

    @languages.setter
    def languages(self, languages):
        """
        Sets the languages of this Ressource.

        :param languages: The languages of this Ressource.
        :type: list[Language]
        """
        if languages is None:
            raise ValueError("Invalid value for `languages`, must not be `None`")

        self._languages = languages

    @property
    def subjects(self):
        """
        Gets the subjects of this Ressource.

        :return: The subjects of this Ressource.
        :rtype: list[Subject]
        """
        return self._subjects

    @subjects.setter
    def subjects(self, subjects):
        """
        Sets the subjects of this Ressource.

        :param subjects: The subjects of this Ressource.
        :type: list[Subject]
        """

        self._subjects = subjects

    @property
    def thumbnail(self):
        """
        Gets the thumbnail of this Ressource.

        :return: The thumbnail of this Ressource.
        :rtype: URL
        """
        return self._thumbnail

    @thumbnail.setter
    def thumbnail(self, thumbnail):
        """
        Sets the thumbnail of this Ressource.

        :param thumbnail: The thumbnail of this Ressource.
        :type: URL
        """

        self._thumbnail = thumbnail

    @property
    def size(self):
        """
        Gets the size of this Ressource.

        :return: The size of this Ressource.
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """
        Sets the size of this Ressource.

        :param size: The size of this Ressource.
        :type: int
        """

        self._size = size

    @property
    def dimensions(self):
        """
        Gets the dimensions of this Ressource.

        :return: The dimensions of this Ressource.
        :rtype: Dimensions
        """
        return self._dimensions

    @dimensions.setter
    def dimensions(self, dimensions):
        """
        Sets the dimensions of this Ressource.

        :param dimensions: The dimensions of this Ressource.
        :type: Dimensions
        """

        self._dimensions = dimensions

    @property
    def duration(self):
        """
        Gets the duration of this Ressource.

        :return: The duration of this Ressource.
        :rtype: float
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """
        Sets the duration of this Ressource.

        :param duration: The duration of this Ressource.
        :type: float
        """

        self._duration = duration

    @property
    def context_url(self):
        """
        Gets the context_url of this Ressource.

        :return: The context_url of this Ressource.
        :rtype: URL
        """
        return self._context_url

    @context_url.setter
    def context_url(self, context_url):
        """
        Sets the context_url of this Ressource.

        :param context_url: The context_url of this Ressource.
        :type: URL
        """

        self._context_url = context_url

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, Ressource):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
