# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.02.16
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class Message(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': 'str',
        'title': 'str',
        'sub_header': 'str',
        'icon': 'str',
        'image': 'str',
        'text': 'str',
        'uri': 'str',
        'context': 'str',
        'actions': 'list[MessageAction]'
    }

    attribute_map = {
        'id': 'id',
        'title': 'title',
        'sub_header': 'sub_header',
        'icon': 'icon',
        'image': 'image',
        'text': 'text',
        'uri': 'uri',
        'context': 'context',
        'actions': 'actions'
    }

    def __init__(self, id=None, title=None, sub_header=None, icon=None, image=None, text=None, uri=None, context=None, actions=None, local_vars_configuration=None):  # noqa: E501
        """Message - 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._title = None
        self._sub_header = None
        self._icon = None
        self._image = None
        self._text = None
        self._uri = None
        self._context = None
        self._actions = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if title is not None:
            self.title = title
        if sub_header is not None:
            self.sub_header = sub_header
        if icon is not None:
            self.icon = icon
        if image is not None:
            self.image = image
        self.text = text
        if uri is not None:
            self.uri = uri
        if context is not None:
            self.context = context
        if actions is not None:
            self.actions = actions

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

        Unique identifier  # noqa: E501

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

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

        Unique identifier  # noqa: E501

        :param id: The id of this Message.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The title of the message (if medium allows)  # noqa: E501

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

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

        The title of the message (if medium allows)  # noqa: E501

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

        self._title = title

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

        The sub-header of the message (if medium allows)  # noqa: E501

        :return: The sub_header of this Message.  # noqa: E501
        :rtype: str
        """
        return self._sub_header

    @sub_header.setter
    def sub_header(self, sub_header):
        """Sets the sub_header of this Message.

        The sub-header of the message (if medium allows)  # noqa: E501

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

        self._sub_header = sub_header

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

        The icon (uri) of the message (if medium allows)  # noqa: E501

        :return: The icon of this Message.  # noqa: E501
        :rtype: str
        """
        return self._icon

    @icon.setter
    def icon(self, icon):
        """Sets the icon of this Message.

        The icon (uri) of the message (if medium allows)  # noqa: E501

        :param icon: The icon of this Message.  # noqa: E501
        :type: str
        """

        self._icon = icon

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

        The image (uri) of the message (if medium allows)  # noqa: E501

        :return: The image of this Message.  # noqa: E501
        :rtype: str
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this Message.

        The image (uri) of the message (if medium allows)  # noqa: E501

        :param image: The image of this Message.  # noqa: E501
        :type: str
        """

        self._image = image

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

        The text string of the message  # noqa: E501

        :return: The text of this Message.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this Message.

        The text string of the message  # noqa: E501

        :param text: The text of this Message.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and text is None:  # noqa: E501
            raise ValueError("Invalid value for `text`, must not be `None`")  # noqa: E501

        self._text = text

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

        The overall uri of the message (eg if clicked on). In some medium (e.g. Chrome WebPush) we can have individual actions, in others (e.g. Firefox WebPush) we only get the entire message as link.   # noqa: E501

        :return: The uri of this Message.  # noqa: E501
        :rtype: str
        """
        return self._uri

    @uri.setter
    def uri(self, uri):
        """Sets the uri of this Message.

        The overall uri of the message (eg if clicked on). In some medium (e.g. Chrome WebPush) we can have individual actions, in others (e.g. Firefox WebPush) we only get the entire message as link.   # noqa: E501

        :param uri: The uri of this Message.  # noqa: E501
        :type: str
        """

        self._uri = uri

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

        A blob of context, message-type dependent  # noqa: E501

        :return: The context of this Message.  # noqa: E501
        :rtype: str
        """
        return self._context

    @context.setter
    def context(self, context):
        """Sets the context of this Message.

        A blob of context, message-type dependent  # noqa: E501

        :param context: The context of this Message.  # noqa: E501
        :type: str
        """

        self._context = context

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

        A list of action buttons (if supported)  # noqa: E501

        :return: The actions of this Message.  # noqa: E501
        :rtype: list[MessageAction]
        """
        return self._actions

    @actions.setter
    def actions(self, actions):
        """Sets the actions of this Message.

        A list of action buttons (if supported)  # noqa: E501

        :param actions: The actions of this Message.  # noqa: E501
        :type: list[MessageAction]
        """

        self._actions = actions

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

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