# coding: utf-8

"""
    The Selling Partner API for CustomerFeedback

    The Selling Partner API for Customer Feedback (Customer Feedback API) provides information about customer reviews and returns at both the item and browse node level.

    The version of the OpenAPI document: 2024-06-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class ChildAsinMentionMetrics(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 = {
        'asin': 'str',
        'number_of_mentions': 'int',
    }

    attribute_map = {
        'asin': 'asin',
        'number_of_mentions': 'numberOfMentions',
    }

    def __init__(self, asin=None, number_of_mentions=None, _configuration=None):  # noqa: E501
        """ChildAsinMentionMetrics - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._asin = None
        self._number_of_mentions = None
        self.discriminator = None

        self.asin = asin
        self.number_of_mentions = number_of_mentions

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

        The child ASIN of the requested item.  # noqa: E501

        :return: The asin of this ChildAsinMentionMetrics.  # noqa: E501
        :rtype: str
        """
        return self._asin

    @asin.setter
    def asin(self, asin):
        """Sets the asin of this ChildAsinMentionMetrics.

        The child ASIN of the requested item.  # noqa: E501

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

        self._asin = asin

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

        The number of times reviews of the child ASIN mention the topic.  # noqa: E501

        :return: The number_of_mentions of this ChildAsinMentionMetrics.  # noqa: E501
        :rtype: int
        """
        return self._number_of_mentions

    @number_of_mentions.setter
    def number_of_mentions(self, number_of_mentions):
        """Sets the number_of_mentions of this ChildAsinMentionMetrics.

        The number of times reviews of the child ASIN mention the topic.  # noqa: E501

        :param number_of_mentions: The number_of_mentions of this ChildAsinMentionMetrics.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and number_of_mentions is None:
            raise ValueError("Invalid value for `number_of_mentions`, must not be `None`")  # noqa: E501

        self._number_of_mentions = number_of_mentions

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

        for attr, _ in six.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
        if issubclass(ChildAsinMentionMetrics, dict):
            for key, value in self.items():
                result[key] = 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, ChildAsinMentionMetrics):
            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, ChildAsinMentionMetrics):
            return True

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