# coding: utf-8

"""
    Marketing Emails

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.marketing.emails.configuration import Configuration


class EmailStatisticsData(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 = {"device_breakdown": "dict[str, dict[str, int]]", "qualifier_stats": "dict[str, dict[str, int]]", "counters": "dict[str, int]", "ratios": "dict[str, float]"}

    attribute_map = {"device_breakdown": "deviceBreakdown", "qualifier_stats": "qualifierStats", "counters": "counters", "ratios": "ratios"}

    def __init__(self, device_breakdown=None, qualifier_stats=None, counters=None, ratios=None, local_vars_configuration=None):  # noqa: E501
        """EmailStatisticsData - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._device_breakdown = None
        self._qualifier_stats = None
        self._counters = None
        self._ratios = None
        self.discriminator = None

        self.device_breakdown = device_breakdown
        self.qualifier_stats = qualifier_stats
        self.counters = counters
        self.ratios = ratios

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

        Statistics by device.  # noqa: E501

        :return: The device_breakdown of this EmailStatisticsData.  # noqa: E501
        :rtype: dict[str, dict[str, int]]
        """
        return self._device_breakdown

    @device_breakdown.setter
    def device_breakdown(self, device_breakdown):
        """Sets the device_breakdown of this EmailStatisticsData.

        Statistics by device.  # noqa: E501

        :param device_breakdown: The device_breakdown of this EmailStatisticsData.  # noqa: E501
        :type device_breakdown: dict[str, dict[str, int]]
        """
        if self.local_vars_configuration.client_side_validation and device_breakdown is None:  # noqa: E501
            raise ValueError("Invalid value for `device_breakdown`, must not be `None`")  # noqa: E501

        self._device_breakdown = device_breakdown

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

        Number of emails that were dropped and bounced.  # noqa: E501

        :return: The qualifier_stats of this EmailStatisticsData.  # noqa: E501
        :rtype: dict[str, dict[str, int]]
        """
        return self._qualifier_stats

    @qualifier_stats.setter
    def qualifier_stats(self, qualifier_stats):
        """Sets the qualifier_stats of this EmailStatisticsData.

        Number of emails that were dropped and bounced.  # noqa: E501

        :param qualifier_stats: The qualifier_stats of this EmailStatisticsData.  # noqa: E501
        :type qualifier_stats: dict[str, dict[str, int]]
        """
        if self.local_vars_configuration.client_side_validation and qualifier_stats is None:  # noqa: E501
            raise ValueError("Invalid value for `qualifier_stats`, must not be `None`")  # noqa: E501

        self._qualifier_stats = qualifier_stats

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

        Counters like number of `sent`, `open` or `delivered`.  # noqa: E501

        :return: The counters of this EmailStatisticsData.  # noqa: E501
        :rtype: dict[str, int]
        """
        return self._counters

    @counters.setter
    def counters(self, counters):
        """Sets the counters of this EmailStatisticsData.

        Counters like number of `sent`, `open` or `delivered`.  # noqa: E501

        :param counters: The counters of this EmailStatisticsData.  # noqa: E501
        :type counters: dict[str, int]
        """
        if self.local_vars_configuration.client_side_validation and counters is None:  # noqa: E501
            raise ValueError("Invalid value for `counters`, must not be `None`")  # noqa: E501

        self._counters = counters

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

        Ratios like `openratio` or `clickratio`  # noqa: E501

        :return: The ratios of this EmailStatisticsData.  # noqa: E501
        :rtype: dict[str, float]
        """
        return self._ratios

    @ratios.setter
    def ratios(self, ratios):
        """Sets the ratios of this EmailStatisticsData.

        Ratios like `openratio` or `clickratio`  # noqa: E501

        :param ratios: The ratios of this EmailStatisticsData.  # noqa: E501
        :type ratios: dict[str, float]
        """
        if self.local_vars_configuration.client_side_validation and ratios is None:  # noqa: E501
            raise ValueError("Invalid value for `ratios`, must not be `None`")  # noqa: E501

        self._ratios = ratios

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(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, EmailStatisticsData):
            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, EmailStatisticsData):
            return True

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