# coding: utf-8

"""
    CMS Contribution API

    The CMS Contribution API allows access and modification of Lumapps contents.   # noqa: E501

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

import pprint
import re  # noqa: F401

import six


class MediaPreview(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 = {
        "media_id": "str",
        "title": "str",
        "description": "str",
        "file_name": "str",
        "url": "str",
        "mime_type": "str",
        "is_secure": "bool",
        "thumbnail": "BlockImage",
    }

    attribute_map = {
        "media_id": "mediaId",
        "title": "title",
        "description": "description",
        "file_name": "fileName",
        "url": "url",
        "mime_type": "mimeType",
        "is_secure": "isSecure",
        "thumbnail": "thumbnail",
    }

    def __init__(
        self,
        media_id=None,
        title=None,
        description=None,
        file_name=None,
        url=None,
        mime_type=None,
        is_secure=None,
        thumbnail=None,
    ):  # noqa: E501
        """MediaPreview - a model defined in Swagger"""  # noqa: E501
        self._media_id = None
        self._title = None
        self._description = None
        self._file_name = None
        self._url = None
        self._mime_type = None
        self._is_secure = None
        self._thumbnail = None
        self.discriminator = None
        if media_id is not None:
            self.media_id = media_id
        self.title = title
        if description is not None:
            self.description = description
        self.file_name = file_name
        self.url = url
        self.mime_type = mime_type
        self.is_secure = is_secure
        if thumbnail is not None:
            self.thumbnail = thumbnail

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

        The media's id.  # noqa: E501

        :return: The media_id of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._media_id

    @media_id.setter
    def media_id(self, media_id):
        """Sets the media_id of this MediaPreview.

        The media's id.  # noqa: E501

        :param media_id: The media_id of this MediaPreview.  # noqa: E501
        :type: str
        """

        self._media_id = media_id

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

        The media's title.  # noqa: E501

        :return: The title of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this MediaPreview.

        The media's title.  # noqa: E501

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

        self._title = title

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

        The media's description.  # noqa: E501

        :return: The description of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this MediaPreview.

        The media's description.  # noqa: E501

        :param description: The description of this MediaPreview.  # noqa: E501
        :type: str
        """

        self._description = description

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

        The media file's name.  # noqa: E501

        :return: The file_name of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._file_name

    @file_name.setter
    def file_name(self, file_name):
        """Sets the file_name of this MediaPreview.

        The media file's name.  # noqa: E501

        :param file_name: The file_name of this MediaPreview.  # noqa: E501
        :type: str
        """
        if file_name is None:
            raise ValueError(
                "Invalid value for `file_name`, must not be `None`"
            )  # noqa: E501

        self._file_name = file_name

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

        The media file's url.  # noqa: E501

        :return: The url of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._url

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

        The media file's url.  # noqa: E501

        :param url: The url of this MediaPreview.  # noqa: E501
        :type: str
        """
        if url is None:
            raise ValueError(
                "Invalid value for `url`, must not be `None`"
            )  # noqa: E501

        self._url = url

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

        The media file's type.  # noqa: E501

        :return: The mime_type of this MediaPreview.  # noqa: E501
        :rtype: str
        """
        return self._mime_type

    @mime_type.setter
    def mime_type(self, mime_type):
        """Sets the mime_type of this MediaPreview.

        The media file's type.  # noqa: E501

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

        self._mime_type = mime_type

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

        Whether the media is secure.  # noqa: E501

        :return: The is_secure of this MediaPreview.  # noqa: E501
        :rtype: bool
        """
        return self._is_secure

    @is_secure.setter
    def is_secure(self, is_secure):
        """Sets the is_secure of this MediaPreview.

        Whether the media is secure.  # noqa: E501

        :param is_secure: The is_secure of this MediaPreview.  # noqa: E501
        :type: bool
        """
        if is_secure is None:
            raise ValueError(
                "Invalid value for `is_secure`, must not be `None`"
            )  # noqa: E501

        self._is_secure = is_secure

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


        :return: The thumbnail of this MediaPreview.  # noqa: E501
        :rtype: BlockImage
        """
        return self._thumbnail

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


        :param thumbnail: The thumbnail of this MediaPreview.  # noqa: E501
        :type: BlockImage
        """

        self._thumbnail = thumbnail

    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(MediaPreview, 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, MediaPreview):
            return False

        return self.__dict__ == other.__dict__

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