# coding: utf-8

"""
    WakaTime API

    REST API for accessing your WakaTime coding activity stats. - Uses GET for retrieval, POST/PUT/PATCH for modification. - All requests must use HTTPS. - Responses are JSON objects. Data is in the `data` key, errors in `error` or `errors`. - Refer to WakaTime usage guidelines when using the trademark or logo.   # noqa: E501

    OpenAPI spec version: v1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class AggregateStatItem(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 = {
        'name': 'str',
        'is_verified': 'bool',
        'average': 'AggregateStatValue',
        'count': 'AggregateStatCount',
        'max': 'AggregateStatValue',
        'median': 'AggregateStatValue',
        'sum': 'AggregateStatValue'
    }

    attribute_map = {
        'name': 'name',
        'is_verified': 'is_verified',
        'average': 'average',
        'count': 'count',
        'max': 'max',
        'median': 'median',
        'sum': 'sum'
    }

    def __init__(self, name=None, is_verified=None, average=None, count=None, max=None, median=None, sum=None):  # noqa: E501
        """AggregateStatItem - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._is_verified = None
        self._average = None
        self._count = None
        self._max = None
        self._median = None
        self._sum = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if is_verified is not None:
            self.is_verified = is_verified
        if average is not None:
            self.average = average
        if count is not None:
            self.count = count
        if max is not None:
            self.max = max
        if median is not None:
            self.median = median
        if sum is not None:
            self.sum = sum

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


        :return: The name of this AggregateStatItem.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this AggregateStatItem.


        :param name: The name of this AggregateStatItem.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The is_verified of this AggregateStatItem.  # noqa: E501
        :rtype: bool
        """
        return self._is_verified

    @is_verified.setter
    def is_verified(self, is_verified):
        """Sets the is_verified of this AggregateStatItem.


        :param is_verified: The is_verified of this AggregateStatItem.  # noqa: E501
        :type: bool
        """

        self._is_verified = is_verified

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


        :return: The average of this AggregateStatItem.  # noqa: E501
        :rtype: AggregateStatValue
        """
        return self._average

    @average.setter
    def average(self, average):
        """Sets the average of this AggregateStatItem.


        :param average: The average of this AggregateStatItem.  # noqa: E501
        :type: AggregateStatValue
        """

        self._average = average

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


        :return: The count of this AggregateStatItem.  # noqa: E501
        :rtype: AggregateStatCount
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this AggregateStatItem.


        :param count: The count of this AggregateStatItem.  # noqa: E501
        :type: AggregateStatCount
        """

        self._count = count

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


        :return: The max of this AggregateStatItem.  # noqa: E501
        :rtype: AggregateStatValue
        """
        return self._max

    @max.setter
    def max(self, max):
        """Sets the max of this AggregateStatItem.


        :param max: The max of this AggregateStatItem.  # noqa: E501
        :type: AggregateStatValue
        """

        self._max = max

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


        :return: The median of this AggregateStatItem.  # noqa: E501
        :rtype: AggregateStatValue
        """
        return self._median

    @median.setter
    def median(self, median):
        """Sets the median of this AggregateStatItem.


        :param median: The median of this AggregateStatItem.  # noqa: E501
        :type: AggregateStatValue
        """

        self._median = median

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


        :return: The sum of this AggregateStatItem.  # noqa: E501
        :rtype: AggregateStatValue
        """
        return self._sum

    @sum.setter
    def sum(self, sum):
        """Sets the sum of this AggregateStatItem.


        :param sum: The sum of this AggregateStatItem.  # noqa: E501
        :type: AggregateStatValue
        """

        self._sum = sum

    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(AggregateStatItem, 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, AggregateStatItem):
            return False

        return self.__dict__ == other.__dict__

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