# 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 StructuredContent(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 = {
        "id": "str",
        "dita": "MultilangObject",
        "title": "I18nString",
        "intro": "I18nString",
        "featured_image": "MultilangDocument",
        "author_id": "str",
        "owner_users": "list[str]",
        "owner_groups": "list[str]",
        "updated_at": "datetime",
    }

    attribute_map = {
        "id": "id",
        "dita": "dita",
        "title": "title",
        "intro": "intro",
        "featured_image": "featuredImage",
        "author_id": "authorId",
        "owner_users": "ownerUsers",
        "owner_groups": "ownerGroups",
        "updated_at": "updatedAt",
    }

    def __init__(
        self,
        id=None,
        dita=None,
        title=None,
        intro=None,
        featured_image=None,
        author_id=None,
        owner_users=None,
        owner_groups=None,
        updated_at=None,
    ):  # noqa: E501
        """StructuredContent - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._dita = None
        self._title = None
        self._intro = None
        self._featured_image = None
        self._author_id = None
        self._owner_users = None
        self._owner_groups = None
        self._updated_at = None
        self.discriminator = None
        self.id = id
        self.dita = dita
        self.title = title
        if intro is not None:
            self.intro = intro
        if featured_image is not None:
            self.featured_image = featured_image
        self.author_id = author_id
        self.owner_users = owner_users
        self.owner_groups = owner_groups
        if updated_at is not None:
            self.updated_at = updated_at

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

        The structured content id  # noqa: E501

        :return: The id of this StructuredContent.  # noqa: E501
        :rtype: str
        """
        return self._id

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

        The structured content id  # noqa: E501

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

        self._id = id

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


        :return: The dita of this StructuredContent.  # noqa: E501
        :rtype: MultilangObject
        """
        return self._dita

    @dita.setter
    def dita(self, dita):
        """Sets the dita of this StructuredContent.


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

        self._dita = dita

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


        :return: The title of this StructuredContent.  # noqa: E501
        :rtype: I18nString
        """
        return self._title

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


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

        self._title = title

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


        :return: The intro of this StructuredContent.  # noqa: E501
        :rtype: I18nString
        """
        return self._intro

    @intro.setter
    def intro(self, intro):
        """Sets the intro of this StructuredContent.


        :param intro: The intro of this StructuredContent.  # noqa: E501
        :type: I18nString
        """

        self._intro = intro

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


        :return: The featured_image of this StructuredContent.  # noqa: E501
        :rtype: MultilangDocument
        """
        return self._featured_image

    @featured_image.setter
    def featured_image(self, featured_image):
        """Sets the featured_image of this StructuredContent.


        :param featured_image: The featured_image of this StructuredContent.  # noqa: E501
        :type: MultilangDocument
        """

        self._featured_image = featured_image

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

        The author's user id  # noqa: E501

        :return: The author_id of this StructuredContent.  # noqa: E501
        :rtype: str
        """
        return self._author_id

    @author_id.setter
    def author_id(self, author_id):
        """Sets the author_id of this StructuredContent.

        The author's user id  # noqa: E501

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

        self._author_id = author_id

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

        The owner user ids  # noqa: E501

        :return: The owner_users of this StructuredContent.  # noqa: E501
        :rtype: list[str]
        """
        return self._owner_users

    @owner_users.setter
    def owner_users(self, owner_users):
        """Sets the owner_users of this StructuredContent.

        The owner user ids  # noqa: E501

        :param owner_users: The owner_users of this StructuredContent.  # noqa: E501
        :type: list[str]
        """
        if owner_users is None:
            raise ValueError(
                "Invalid value for `owner_users`, must not be `None`"
            )  # noqa: E501

        self._owner_users = owner_users

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

        The owner group ids  # noqa: E501

        :return: The owner_groups of this StructuredContent.  # noqa: E501
        :rtype: list[str]
        """
        return self._owner_groups

    @owner_groups.setter
    def owner_groups(self, owner_groups):
        """Sets the owner_groups of this StructuredContent.

        The owner group ids  # noqa: E501

        :param owner_groups: The owner_groups of this StructuredContent.  # noqa: E501
        :type: list[str]
        """
        if owner_groups is None:
            raise ValueError(
                "Invalid value for `owner_groups`, must not be `None`"
            )  # noqa: E501

        self._owner_groups = owner_groups

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

        The date and time when the structured content was last updated  # noqa: E501

        :return: The updated_at of this StructuredContent.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this StructuredContent.

        The date and time when the structured content was last updated  # noqa: E501

        :param updated_at: The updated_at of this StructuredContent.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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

        return self.__dict__ == other.__dict__

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