# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class UserNotificationResource(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 = {
        'data': 'object',
        'notification_id': 'str',
        'notification_type_id': 'str',
        'recipient': 'str',
        'recipient_type': 'str',
        'retrieve_date': 'int',
        'send_date': 'int',
        'status': 'str',
        'user_id': 'int'
    }

    attribute_map = {
        'data': 'data',
        'notification_id': 'notification_id',
        'notification_type_id': 'notification_type_id',
        'recipient': 'recipient',
        'recipient_type': 'recipient_type',
        'retrieve_date': 'retrieve_date',
        'send_date': 'send_date',
        'status': 'status',
        'user_id': 'user_id'
    }

    def __init__(self, data=None, notification_id=None, notification_type_id=None, recipient=None, recipient_type=None, retrieve_date=None, send_date=None, status=None, user_id=None):
        """
        UserNotificationResource - a model defined in Swagger
        """

        self._data = None
        self._notification_id = None
        self._notification_type_id = None
        self._recipient = None
        self._recipient_type = None
        self._retrieve_date = None
        self._send_date = None
        self._status = None
        self._user_id = None
        self.discriminator = None

        if data is not None:
          self.data = data
        self.notification_id = notification_id
        self.notification_type_id = notification_type_id
        self.recipient = recipient
        self.recipient_type = recipient_type
        if retrieve_date is not None:
          self.retrieve_date = retrieve_date
        if send_date is not None:
          self.send_date = send_date
        if status is not None:
          self.status = status
        self.user_id = user_id

    @property
    def data(self):
        """
        Gets the data of this UserNotificationResource.
        The data to send and fill templates

        :return: The data of this UserNotificationResource.
        :rtype: object
        """
        return self._data

    @data.setter
    def data(self, data):
        """
        Sets the data of this UserNotificationResource.
        The data to send and fill templates

        :param data: The data of this UserNotificationResource.
        :type: object
        """

        self._data = data

    @property
    def notification_id(self):
        """
        Gets the notification_id of this UserNotificationResource.
        The id of the notification

        :return: The notification_id of this UserNotificationResource.
        :rtype: str
        """
        return self._notification_id

    @notification_id.setter
    def notification_id(self, notification_id):
        """
        Sets the notification_id of this UserNotificationResource.
        The id of the notification

        :param notification_id: The notification_id of this UserNotificationResource.
        :type: str
        """
        if notification_id is None:
            raise ValueError("Invalid value for `notification_id`, must not be `None`")

        self._notification_id = notification_id

    @property
    def notification_type_id(self):
        """
        Gets the notification_type_id of this UserNotificationResource.
        The id of the notification type

        :return: The notification_type_id of this UserNotificationResource.
        :rtype: str
        """
        return self._notification_type_id

    @notification_type_id.setter
    def notification_type_id(self, notification_type_id):
        """
        Sets the notification_type_id of this UserNotificationResource.
        The id of the notification type

        :param notification_type_id: The notification_type_id of this UserNotificationResource.
        :type: str
        """
        if notification_type_id is None:
            raise ValueError("Invalid value for `notification_type_id`, must not be `None`")

        self._notification_type_id = notification_type_id

    @property
    def recipient(self):
        """
        Gets the recipient of this UserNotificationResource.
        The id of the recipient, dependent on the recipient_type. The user's id or the topic's id

        :return: The recipient of this UserNotificationResource.
        :rtype: str
        """
        return self._recipient

    @recipient.setter
    def recipient(self, recipient):
        """
        Sets the recipient of this UserNotificationResource.
        The id of the recipient, dependent on the recipient_type. The user's id or the topic's id

        :param recipient: The recipient of this UserNotificationResource.
        :type: str
        """
        if recipient is None:
            raise ValueError("Invalid value for `recipient`, must not be `None`")

        self._recipient = recipient

    @property
    def recipient_type(self):
        """
        Gets the recipient_type of this UserNotificationResource.
        The type of recipient for the notification. Either a user, or all users in a topic

        :return: The recipient_type of this UserNotificationResource.
        :rtype: str
        """
        return self._recipient_type

    @recipient_type.setter
    def recipient_type(self, recipient_type):
        """
        Sets the recipient_type of this UserNotificationResource.
        The type of recipient for the notification. Either a user, or all users in a topic

        :param recipient_type: The recipient_type of this UserNotificationResource.
        :type: str
        """
        if recipient_type is None:
            raise ValueError("Invalid value for `recipient_type`, must not be `None`")
        allowed_values = ["user", "topic"]
        if recipient_type not in allowed_values:
            raise ValueError(
                "Invalid value for `recipient_type` ({0}), must be one of {1}"
                .format(recipient_type, allowed_values)
            )

        self._recipient_type = recipient_type

    @property
    def retrieve_date(self):
        """
        Gets the retrieve_date of this UserNotificationResource.
        The date this notification was first retrieved

        :return: The retrieve_date of this UserNotificationResource.
        :rtype: int
        """
        return self._retrieve_date

    @retrieve_date.setter
    def retrieve_date(self, retrieve_date):
        """
        Sets the retrieve_date of this UserNotificationResource.
        The date this notification was first retrieved

        :param retrieve_date: The retrieve_date of this UserNotificationResource.
        :type: int
        """

        self._retrieve_date = retrieve_date

    @property
    def send_date(self):
        """
        Gets the send_date of this UserNotificationResource.
        The date this notification was sent

        :return: The send_date of this UserNotificationResource.
        :rtype: int
        """
        return self._send_date

    @send_date.setter
    def send_date(self, send_date):
        """
        Sets the send_date of this UserNotificationResource.
        The date this notification was sent

        :param send_date: The send_date of this UserNotificationResource.
        :type: int
        """

        self._send_date = send_date

    @property
    def status(self):
        """
        Gets the status of this UserNotificationResource.
        The user's status for this notification

        :return: The status of this UserNotificationResource.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """
        Sets the status of this UserNotificationResource.
        The user's status for this notification

        :param status: The status of this UserNotificationResource.
        :type: str
        """
        allowed_values = ["pending", "read", "hidden"]
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"
                .format(status, allowed_values)
            )

        self._status = status

    @property
    def user_id(self):
        """
        Gets the user_id of this UserNotificationResource.
        The id of the user

        :return: The user_id of this UserNotificationResource.
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """
        Sets the user_id of this UserNotificationResource.
        The id of the user

        :param user_id: The user_id of this UserNotificationResource.
        :type: int
        """
        if user_id is None:
            raise ValueError("Invalid value for `user_id`, must not be `None`")

        self._user_id = user_id

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, UserNotificationResource):
            return False

        return self.__dict__ == other.__dict__

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