# 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 UserRatingSummaryResponse(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_rates': 'AverageRates',
        'not_recommended': 'UserRatingSummaryResponseNotRecommended',
        'recommended': 'UserRatingSummaryResponseRecommended',
        'recommended_percentage': 'str'
    }

    attribute_map = {
        'average_rates': 'averageRates',
        'not_recommended': 'notRecommended',
        'recommended': 'recommended',
        'recommended_percentage': 'recommendedPercentage'
    }

    def __init__(self, average_rates=None, not_recommended=None, recommended=None, recommended_percentage=None, local_vars_configuration=None):  # noqa: E501
        """UserRatingSummaryResponse - 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_rates = None
        self._not_recommended = None
        self._recommended = None
        self._recommended_percentage = None
        self.discriminator = None

        if average_rates is not None:
            self.average_rates = average_rates
        self.not_recommended = not_recommended
        self.recommended = recommended
        self.recommended_percentage = recommended_percentage

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


        :return: The average_rates of this UserRatingSummaryResponse.  # noqa: E501
        :rtype: AverageRates
        """
        return self._average_rates

    @average_rates.setter
    def average_rates(self, average_rates):
        """Sets the average_rates of this UserRatingSummaryResponse.


        :param average_rates: The average_rates of this UserRatingSummaryResponse.  # noqa: E501
        :type: AverageRates
        """

        self._average_rates = average_rates

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


        :return: The not_recommended of this UserRatingSummaryResponse.  # noqa: E501
        :rtype: UserRatingSummaryResponseNotRecommended
        """
        return self._not_recommended

    @not_recommended.setter
    def not_recommended(self, not_recommended):
        """Sets the not_recommended of this UserRatingSummaryResponse.


        :param not_recommended: The not_recommended of this UserRatingSummaryResponse.  # noqa: E501
        :type: UserRatingSummaryResponseNotRecommended
        """
        if self.local_vars_configuration.client_side_validation and not_recommended is None:  # noqa: E501
            raise ValueError("Invalid value for `not_recommended`, must not be `None`")  # noqa: E501

        self._not_recommended = not_recommended

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


        :return: The recommended of this UserRatingSummaryResponse.  # noqa: E501
        :rtype: UserRatingSummaryResponseRecommended
        """
        return self._recommended

    @recommended.setter
    def recommended(self, recommended):
        """Sets the recommended of this UserRatingSummaryResponse.


        :param recommended: The recommended of this UserRatingSummaryResponse.  # noqa: E501
        :type: UserRatingSummaryResponseRecommended
        """
        if self.local_vars_configuration.client_side_validation and recommended is None:  # noqa: E501
            raise ValueError("Invalid value for `recommended`, must not be `None`")  # noqa: E501

        self._recommended = recommended

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

        Percentage of unique buyers recommending the seller.  # noqa: E501

        :return: The recommended_percentage of this UserRatingSummaryResponse.  # noqa: E501
        :rtype: str
        """
        return self._recommended_percentage

    @recommended_percentage.setter
    def recommended_percentage(self, recommended_percentage):
        """Sets the recommended_percentage of this UserRatingSummaryResponse.

        Percentage of unique buyers recommending the seller.  # noqa: E501

        :param recommended_percentage: The recommended_percentage of this UserRatingSummaryResponse.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and recommended_percentage is None:  # noqa: E501
            raise ValueError("Invalid value for `recommended_percentage`, must not be `None`")  # noqa: E501

        self._recommended_percentage = recommended_percentage

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

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