# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    The version of the OpenAPI document: 2020.03.10
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from allegro_api.configuration import Configuration


class OfferRating(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 = {
        'average_score': 'str',
        'score_distribution': 'list[OfferRatingScoreDistribution]',
        'total_responses': 'int',
        'size_feedback': 'list[OfferRatingSizeFeedback]'
    }

    attribute_map = {
        'average_score': 'averageScore',
        'score_distribution': 'scoreDistribution',
        'total_responses': 'totalResponses',
        'size_feedback': 'sizeFeedback'
    }

    def __init__(self, average_score=None, score_distribution=None, total_responses=None, size_feedback=None, local_vars_configuration=None):  # noqa: E501
        """OfferRating - 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._average_score = None
        self._score_distribution = None
        self._total_responses = None
        self._size_feedback = None
        self.discriminator = None

        if average_score is not None:
            self.average_score = average_score
        if score_distribution is not None:
            self.score_distribution = score_distribution
        if total_responses is not None:
            self.total_responses = total_responses
        if size_feedback is not None:
            self.size_feedback = size_feedback

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

        Average score of offer rating.  # noqa: E501

        :return: The average_score of this OfferRating.  # noqa: E501
        :rtype: str
        """
        return self._average_score

    @average_score.setter
    def average_score(self, average_score):
        """Sets the average_score of this OfferRating.

        Average score of offer rating.  # noqa: E501

        :param average_score: The average_score of this OfferRating.  # noqa: E501
        :type: str
        """

        self._average_score = average_score

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

        List score distribution with count.  # noqa: E501

        :return: The score_distribution of this OfferRating.  # noqa: E501
        :rtype: list[OfferRatingScoreDistribution]
        """
        return self._score_distribution

    @score_distribution.setter
    def score_distribution(self, score_distribution):
        """Sets the score_distribution of this OfferRating.

        List score distribution with count.  # noqa: E501

        :param score_distribution: The score_distribution of this OfferRating.  # noqa: E501
        :type: list[OfferRatingScoreDistribution]
        """

        self._score_distribution = score_distribution

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

        Number of total responses.  # noqa: E501

        :return: The total_responses of this OfferRating.  # noqa: E501
        :rtype: int
        """
        return self._total_responses

    @total_responses.setter
    def total_responses(self, total_responses):
        """Sets the total_responses of this OfferRating.

        Number of total responses.  # noqa: E501

        :param total_responses: The total_responses of this OfferRating.  # noqa: E501
        :type: int
        """

        self._total_responses = total_responses

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

        List of size feedback.  # noqa: E501

        :return: The size_feedback of this OfferRating.  # noqa: E501
        :rtype: list[OfferRatingSizeFeedback]
        """
        return self._size_feedback

    @size_feedback.setter
    def size_feedback(self, size_feedback):
        """Sets the size_feedback of this OfferRating.

        List of size feedback.  # noqa: E501

        :param size_feedback: The size_feedback of this OfferRating.  # noqa: E501
        :type: list[OfferRatingSizeFeedback]
        """

        self._size_feedback = size_feedback

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

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