# coding: utf-8

from pprint import pformat
from six import iteritems
import re


class InlineResponse2005(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, end_date=None, partisan_affiliation=None, sample_subpopulation=None, partisanship=None, question_text=None, mode=None, observations=None, margin_of_error=None, response_text=None, poll_slug=None, pollster_label=None, value=None, survey_house=None, start_date=None):
        """
        InlineResponse2005 - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'end_date': 'date',
            'partisan_affiliation': 'str',
            'sample_subpopulation': 'str',
            'partisanship': 'str',
            'question_text': 'str',
            'mode': 'str',
            'observations': 'int',
            'margin_of_error': 'int',
            'response_text': 'str',
            'poll_slug': 'str',
            'pollster_label': 'str',
            'value': 'float',
            'survey_house': 'str',
            'start_date': 'date'
        }

        self.attribute_map = {
            'end_date': 'end_date',
            'partisan_affiliation': 'partisan_affiliation',
            'sample_subpopulation': 'sample_subpopulation',
            'partisanship': 'partisanship',
            'question_text': 'question_text',
            'mode': 'mode',
            'observations': 'observations',
            'margin_of_error': 'margin_of_error',
            'response_text': 'response_text',
            'poll_slug': 'poll_slug',
            'pollster_label': 'pollster_label',
            'value': 'value',
            'survey_house': 'survey_house',
            'start_date': 'start_date'
        }

        self._end_date = end_date
        self._partisan_affiliation = partisan_affiliation
        self._sample_subpopulation = sample_subpopulation
        self._partisanship = partisanship
        self._question_text = question_text
        self._mode = mode
        self._observations = observations
        self._margin_of_error = margin_of_error
        self._response_text = response_text
        self._poll_slug = poll_slug
        self._pollster_label = pollster_label
        self._value = value
        self._survey_house = survey_house
        self._start_date = start_date


    @property
    def end_date(self):
        """
        Gets the end_date of this InlineResponse2005.
        Last day of the range of days the survey house conducted the poll

        :return: The end_date of this InlineResponse2005.
        :rtype: date
        """
        return self._end_date

    @property
    def partisan_affiliation(self):
        """
        Gets the partisan_affiliation of this InlineResponse2005.
        `None` if `partisanship` is `Nonpartisan`; otherwise one of `Dem`, `Rep` or `Other`

        :return: The partisan_affiliation of this InlineResponse2005.
        :rtype: str
        """
        return self._partisan_affiliation

    @property
    def sample_subpopulation(self):
        """
        Gets the sample_subpopulation of this InlineResponse2005.
        One of Adults, Adults - Democrat, Adults - Republican, Adults - independent, Registered Voters, Registered Voters - Democrat, Registered Voters - Republican, Registered Voters - independent, Likely Voters, Likely Voters - Democrat, Likely Voters - Republican, Likely Voters - independent

        :return: The sample_subpopulation of this InlineResponse2005.
        :rtype: str
        """
        return self._sample_subpopulation

    @property
    def partisanship(self):
        """
        Gets the partisanship of this InlineResponse2005.
        One of `Nonpartisan`, `Pollster` (the survey house is partisan), `Sponsor` (the survey house is nonpartisan, but the sponsor is partisan)

        :return: The partisanship of this InlineResponse2005.
        :rtype: str
        """
        return self._partisanship

    @property
    def question_text(self):
        """
        Gets the question_text of this InlineResponse2005.
        The exact text of the poll question, if the survey house provided it and Pollster editors entered it.

        :return: The question_text of this InlineResponse2005.
        :rtype: str
        """
        return self._question_text

    @property
    def mode(self):
        """
        Gets the mode of this InlineResponse2005.
        One of `Automated Phone`, `Internet`, `IVR/Live Phone`, etc.

        :return: The mode of this InlineResponse2005.
        :rtype: str
        """
        return self._mode

    @property
    def observations(self):
        """
        Gets the observations of this InlineResponse2005.
        Number of respondents in this sample subpopulation, or `null` (the empty string, in a TSV) if the survey house did not report it

        :return: The observations of this InlineResponse2005.
        :rtype: int
        """
        return self._observations

    @property
    def margin_of_error(self):
        """
        Gets the margin_of_error of this InlineResponse2005.
        Margin of error in this sample subpopulation, or `null` (the empty string, in a TSV) if the survey house did not report it

        :return: The margin_of_error of this InlineResponse2005.
        :rtype: int
        """
        return self._margin_of_error

    @property
    def response_text(self):
        """
        Gets the response_text of this InlineResponse2005.
        Response text, as published by the survey house

        :return: The response_text of this InlineResponse2005.
        :rtype: str
        """
        return self._response_text

    @property
    def poll_slug(self):
        """
        Gets the poll_slug of this InlineResponse2005.
        String that uniquely identifies a Poll

        :return: The poll_slug of this InlineResponse2005.
        :rtype: str
        """
        return self._poll_slug

    @property
    def pollster_label(self):
        """
        Gets the pollster_label of this InlineResponse2005.
        Label Pollster uses on its Question (i.e., a column header in `poll-responses-clean.tsv`)

        :return: The pollster_label of this InlineResponse2005.
        :rtype: str
        """
        return self._pollster_label

    @property
    def value(self):
        """
        Gets the value of this InlineResponse2005.
        Value for this group of respondents, from 0 to 100.

        :return: The value of this InlineResponse2005.
        :rtype: float
        """
        return self._value

    @property
    def survey_house(self):
        """
        Gets the survey_house of this InlineResponse2005.
        Name of the survey house (e.g., `Gallup`)

        :return: The survey_house of this InlineResponse2005.
        :rtype: str
        """
        return self._survey_house

    @property
    def start_date(self):
        """
        Gets the start_date of this InlineResponse2005.
        First day of the range of days the survey house conducted the poll

        :return: The start_date of this InlineResponse2005.
        :rtype: date
        """
        return self._start_date

    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
        """
        return self.__dict__ == other.__dict__

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