# coding: utf-8

"""
    DaDaPush Public API

    DaDaPush: Real-time Notifications App Send real-time notifications through our API without coding and maintaining your own app for iOS or Android devices.  # noqa: E501

    The version of the OpenAPI document: v1
    Contact: contacts@dadapush.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class MessagePushRequest(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 = {
        'actions': 'list[Action]',
        'content': 'str',
        'need_push': 'bool',
        'title': 'str'
    }

    attribute_map = {
        'actions': 'actions',
        'content': 'content',
        'need_push': 'needPush',
        'title': 'title'
    }

    def __init__(self, actions=None, content=None, need_push=None, title=None):  # noqa: E501
        """MessagePushRequest - a model defined in OpenAPI"""  # noqa: E501

        self._actions = None
        self._content = None
        self._need_push = None
        self._title = None
        self.discriminator = None

        if actions is not None:
            self.actions = actions
        self.content = content
        self.need_push = need_push
        self.title = title

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

        action size range is 0,3  # noqa: E501

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

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

        action size range is 0,3  # noqa: E501

        :param actions: The actions of this MessagePushRequest.  # noqa: E501
        :type: list[Action]
        """

        self._actions = actions

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

        message content  # noqa: E501

        :return: The content of this MessagePushRequest.  # noqa: E501
        :rtype: str
        """
        return self._content

    @content.setter
    def content(self, content):
        """Sets the content of this MessagePushRequest.

        message content  # noqa: E501

        :param content: The content of this MessagePushRequest.  # noqa: E501
        :type: str
        """
        if content is None:
            raise ValueError("Invalid value for `content`, must not be `None`")  # noqa: E501
        if content is not None and len(content) > 500:
            raise ValueError("Invalid value for `content`, length must be less than or equal to `500`")  # noqa: E501
        if content is not None and len(content) < 1:
            raise ValueError("Invalid value for `content`, length must be greater than or equal to `1`")  # noqa: E501

        self._content = content

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

        when value is false, will not send client push  # noqa: E501

        :return: The need_push of this MessagePushRequest.  # noqa: E501
        :rtype: bool
        """
        return self._need_push

    @need_push.setter
    def need_push(self, need_push):
        """Sets the need_push of this MessagePushRequest.

        when value is false, will not send client push  # noqa: E501

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

        self._need_push = need_push

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

        message title  # noqa: E501

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

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

        message title  # noqa: E501

        :param title: The title of this MessagePushRequest.  # noqa: E501
        :type: str
        """
        if title is None:
            raise ValueError("Invalid value for `title`, must not be `None`")  # noqa: E501
        if title is not None and len(title) > 50:
            raise ValueError("Invalid value for `title`, length must be less than or equal to `50`")  # noqa: E501
        if title is not None and len(title) < 1:
            raise ValueError("Invalid value for `title`, length must be greater than or equal to `1`")  # noqa: E501

        self._title = title

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

        return self.__dict__ == other.__dict__

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