# 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 PollResponseResource(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 = {
        'answer': 'str',
        'answered_date': 'int',
        'id': 'str',
        'poll_id': 'str',
        'user': 'SimpleUserResource'
    }

    attribute_map = {
        'answer': 'answer',
        'answered_date': 'answered_date',
        'id': 'id',
        'poll_id': 'poll_id',
        'user': 'user'
    }

    def __init__(self, answer=None, answered_date=None, id=None, poll_id=None, user=None):
        """
        PollResponseResource - a model defined in Swagger
        """

        self._answer = None
        self._answered_date = None
        self._id = None
        self._poll_id = None
        self._user = None
        self.discriminator = None

        self.answer = answer
        if answered_date is not None:
          self.answered_date = answered_date
        if id is not None:
          self.id = id
        self.poll_id = poll_id
        self.user = user

    @property
    def answer(self):
        """
        Gets the answer of this PollResponseResource.
        The answer to the poll

        :return: The answer of this PollResponseResource.
        :rtype: str
        """
        return self._answer

    @answer.setter
    def answer(self, answer):
        """
        Sets the answer of this PollResponseResource.
        The answer to the poll

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

        self._answer = answer

    @property
    def answered_date(self):
        """
        Gets the answered_date of this PollResponseResource.
        The date the poll was answered, in seconds since unix epoc

        :return: The answered_date of this PollResponseResource.
        :rtype: int
        """
        return self._answered_date

    @answered_date.setter
    def answered_date(self, answered_date):
        """
        Sets the answered_date of this PollResponseResource.
        The date the poll was answered, in seconds since unix epoc

        :param answered_date: The answered_date of this PollResponseResource.
        :type: int
        """

        self._answered_date = answered_date

    @property
    def id(self):
        """
        Gets the id of this PollResponseResource.
        The id of the poll response

        :return: The id of this PollResponseResource.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this PollResponseResource.
        The id of the poll response

        :param id: The id of this PollResponseResource.
        :type: str
        """

        self._id = id

    @property
    def poll_id(self):
        """
        Gets the poll_id of this PollResponseResource.
        The id of the poll

        :return: The poll_id of this PollResponseResource.
        :rtype: str
        """
        return self._poll_id

    @poll_id.setter
    def poll_id(self, poll_id):
        """
        Sets the poll_id of this PollResponseResource.
        The id of the poll

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

        self._poll_id = poll_id

    @property
    def user(self):
        """
        Gets the user of this PollResponseResource.
        The user

        :return: The user of this PollResponseResource.
        :rtype: SimpleUserResource
        """
        return self._user

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

        :param user: The user of this PollResponseResource.
        :type: SimpleUserResource
        """
        if user is None:
            raise ValueError("Invalid value for `user`, must not be `None`")

        self._user = user

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

        return self.__dict__ == other.__dict__

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