# 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 Event(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",
        "author": "UserReference",
        "organizers": "list[UserReference]",
        "starts_at": "datetime",
        "ends_at": "datetime",
        "location": "str",
        "external_url": "str",
        "external_url_label": "OneOfEventExternalUrlLabel",
        "created_at": "datetime",
        "updated_at": "datetime",
        "template_id": "str",
        "shares": "list[EventShare]",
        "can_edit": "bool",
        "is_user_registered": "bool",
        "structured_content": "StructuredContent",
    }

    attribute_map = {
        "id": "id",
        "author": "author",
        "organizers": "organizers",
        "starts_at": "startsAt",
        "ends_at": "endsAt",
        "location": "location",
        "external_url": "externalUrl",
        "external_url_label": "externalUrlLabel",
        "created_at": "createdAt",
        "updated_at": "updatedAt",
        "template_id": "templateId",
        "shares": "shares",
        "can_edit": "canEdit",
        "is_user_registered": "isUserRegistered",
        "structured_content": "structuredContent",
    }

    def __init__(
        self,
        id=None,
        author=None,
        organizers=None,
        starts_at=None,
        ends_at=None,
        location=None,
        external_url=None,
        external_url_label=None,
        created_at=None,
        updated_at=None,
        template_id=None,
        shares=None,
        can_edit=None,
        is_user_registered=None,
        structured_content=None,
    ):  # noqa: E501
        """Event - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._author = None
        self._organizers = None
        self._starts_at = None
        self._ends_at = None
        self._location = None
        self._external_url = None
        self._external_url_label = None
        self._created_at = None
        self._updated_at = None
        self._template_id = None
        self._shares = None
        self._can_edit = None
        self._is_user_registered = None
        self._structured_content = None
        self.discriminator = None
        self.id = id
        self.author = author
        if organizers is not None:
            self.organizers = organizers
        self.starts_at = starts_at
        self.ends_at = ends_at
        if location is not None:
            self.location = location
        if external_url is not None:
            self.external_url = external_url
        if external_url_label is not None:
            self.external_url_label = external_url_label
        self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if template_id is not None:
            self.template_id = template_id
        if shares is not None:
            self.shares = shares
        if can_edit is not None:
            self.can_edit = can_edit
        if is_user_registered is not None:
            self.is_user_registered = is_user_registered
        if structured_content is not None:
            self.structured_content = structured_content

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

        The event id  # noqa: E501

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

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

        The event id  # noqa: E501

        :param id: The id of this Event.  # 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 author(self):
        """Gets the author of this Event.  # noqa: E501


        :return: The author of this Event.  # noqa: E501
        :rtype: UserReference
        """
        return self._author

    @author.setter
    def author(self, author):
        """Sets the author of this Event.


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

        self._author = author

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

        The organizers of the event  # noqa: E501

        :return: The organizers of this Event.  # noqa: E501
        :rtype: list[UserReference]
        """
        return self._organizers

    @organizers.setter
    def organizers(self, organizers):
        """Sets the organizers of this Event.

        The organizers of the event  # noqa: E501

        :param organizers: The organizers of this Event.  # noqa: E501
        :type: list[UserReference]
        """

        self._organizers = organizers

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

        The event's start date and time  # noqa: E501

        :return: The starts_at of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._starts_at

    @starts_at.setter
    def starts_at(self, starts_at):
        """Sets the starts_at of this Event.

        The event's start date and time  # noqa: E501

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

        self._starts_at = starts_at

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

        The event's end date and time  # noqa: E501

        :return: The ends_at of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._ends_at

    @ends_at.setter
    def ends_at(self, ends_at):
        """Sets the ends_at of this Event.

        The event's end date and time  # noqa: E501

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

        self._ends_at = ends_at

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

        The event's location, e.g. Yellow Meeting Room. Not to be confused with a localization. Not translatable either.   # noqa: E501

        :return: The location of this Event.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this Event.

        The event's location, e.g. Yellow Meeting Room. Not to be confused with a localization. Not translatable either.   # noqa: E501

        :param location: The location of this Event.  # noqa: E501
        :type: str
        """

        self._location = location

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

        The url used to access an online event  # noqa: E501

        :return: The external_url of this Event.  # noqa: E501
        :rtype: str
        """
        return self._external_url

    @external_url.setter
    def external_url(self, external_url):
        """Sets the external_url of this Event.

        The url used to access an online event  # noqa: E501

        :param external_url: The external_url of this Event.  # noqa: E501
        :type: str
        """

        self._external_url = external_url

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


        :return: The external_url_label of this Event.  # noqa: E501
        :rtype: OneOfEventExternalUrlLabel
        """
        return self._external_url_label

    @external_url_label.setter
    def external_url_label(self, external_url_label):
        """Sets the external_url_label of this Event.


        :param external_url_label: The external_url_label of this Event.  # noqa: E501
        :type: OneOfEventExternalUrlLabel
        """

        self._external_url_label = external_url_label

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

        The event's creation date and time  # noqa: E501

        :return: The created_at of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Event.

        The event's creation date and time  # noqa: E501

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

        self._created_at = created_at

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

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

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

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

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

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

        self._updated_at = updated_at

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

        The id of the template used to display the event  # noqa: E501

        :return: The template_id of this Event.  # noqa: E501
        :rtype: str
        """
        return self._template_id

    @template_id.setter
    def template_id(self, template_id):
        """Sets the template_id of this Event.

        The id of the template used to display the event  # noqa: E501

        :param template_id: The template_id of this Event.  # noqa: E501
        :type: str
        """

        self._template_id = template_id

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


        :return: The shares of this Event.  # noqa: E501
        :rtype: list[EventShare]
        """
        return self._shares

    @shares.setter
    def shares(self, shares):
        """Sets the shares of this Event.


        :param shares: The shares of this Event.  # noqa: E501
        :type: list[EventShare]
        """

        self._shares = shares

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

        Whether the user doing the request can edit the event  # noqa: E501

        :return: The can_edit of this Event.  # noqa: E501
        :rtype: bool
        """
        return self._can_edit

    @can_edit.setter
    def can_edit(self, can_edit):
        """Sets the can_edit of this Event.

        Whether the user doing the request can edit the event  # noqa: E501

        :param can_edit: The can_edit of this Event.  # noqa: E501
        :type: bool
        """

        self._can_edit = can_edit

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

        Whether the user doing the request is registered in the event  # noqa: E501

        :return: The is_user_registered of this Event.  # noqa: E501
        :rtype: bool
        """
        return self._is_user_registered

    @is_user_registered.setter
    def is_user_registered(self, is_user_registered):
        """Sets the is_user_registered of this Event.

        Whether the user doing the request is registered in the event  # noqa: E501

        :param is_user_registered: The is_user_registered of this Event.  # noqa: E501
        :type: bool
        """

        self._is_user_registered = is_user_registered

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


        :return: The structured_content of this Event.  # noqa: E501
        :rtype: StructuredContent
        """
        return self._structured_content

    @structured_content.setter
    def structured_content(self, structured_content):
        """Sets the structured_content of this Event.


        :param structured_content: The structured_content of this Event.  # noqa: E501
        :type: StructuredContent
        """

        self._structured_content = structured_content

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

        return self.__dict__ == other.__dict__

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