# 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 AggregateStats(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 = {
        'categories': 'list[AggregateStatItem]',
        'daily_average': 'AggregateDailyAverage',
        'editors': 'list[AggregateStatItem]',
        'languages': 'list[AggregateStatItem]',
        'operating_systems': 'list[AggregateStatItem]',
        'total': 'AggregateTotal',
        'range': 'Range',
        'timeout': 'int',
        'writes_only': 'bool'
    }

    attribute_map = {
        'categories': 'categories',
        'daily_average': 'daily_average',
        'editors': 'editors',
        'languages': 'languages',
        'operating_systems': 'operating_systems',
        'total': 'total',
        'range': 'range',
        'timeout': 'timeout',
        'writes_only': 'writes_only'
    }

    def __init__(self, categories=None, daily_average=None, editors=None, languages=None, operating_systems=None, total=None, range=None, timeout=None, writes_only=None):  # noqa: E501
        """AggregateStats - a model defined in Swagger"""  # noqa: E501
        self._categories = None
        self._daily_average = None
        self._editors = None
        self._languages = None
        self._operating_systems = None
        self._total = None
        self._range = None
        self._timeout = None
        self._writes_only = None
        self.discriminator = None
        if categories is not None:
            self.categories = categories
        if daily_average is not None:
            self.daily_average = daily_average
        if editors is not None:
            self.editors = editors
        if languages is not None:
            self.languages = languages
        if operating_systems is not None:
            self.operating_systems = operating_systems
        if total is not None:
            self.total = total
        if range is not None:
            self.range = range
        if timeout is not None:
            self.timeout = timeout
        if writes_only is not None:
            self.writes_only = writes_only

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


        :return: The categories of this AggregateStats.  # noqa: E501
        :rtype: list[AggregateStatItem]
        """
        return self._categories

    @categories.setter
    def categories(self, categories):
        """Sets the categories of this AggregateStats.


        :param categories: The categories of this AggregateStats.  # noqa: E501
        :type: list[AggregateStatItem]
        """

        self._categories = categories

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


        :return: The daily_average of this AggregateStats.  # noqa: E501
        :rtype: AggregateDailyAverage
        """
        return self._daily_average

    @daily_average.setter
    def daily_average(self, daily_average):
        """Sets the daily_average of this AggregateStats.


        :param daily_average: The daily_average of this AggregateStats.  # noqa: E501
        :type: AggregateDailyAverage
        """

        self._daily_average = daily_average

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


        :return: The editors of this AggregateStats.  # noqa: E501
        :rtype: list[AggregateStatItem]
        """
        return self._editors

    @editors.setter
    def editors(self, editors):
        """Sets the editors of this AggregateStats.


        :param editors: The editors of this AggregateStats.  # noqa: E501
        :type: list[AggregateStatItem]
        """

        self._editors = editors

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


        :return: The languages of this AggregateStats.  # noqa: E501
        :rtype: list[AggregateStatItem]
        """
        return self._languages

    @languages.setter
    def languages(self, languages):
        """Sets the languages of this AggregateStats.


        :param languages: The languages of this AggregateStats.  # noqa: E501
        :type: list[AggregateStatItem]
        """

        self._languages = languages

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


        :return: The operating_systems of this AggregateStats.  # noqa: E501
        :rtype: list[AggregateStatItem]
        """
        return self._operating_systems

    @operating_systems.setter
    def operating_systems(self, operating_systems):
        """Sets the operating_systems of this AggregateStats.


        :param operating_systems: The operating_systems of this AggregateStats.  # noqa: E501
        :type: list[AggregateStatItem]
        """

        self._operating_systems = operating_systems

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


        :return: The total of this AggregateStats.  # noqa: E501
        :rtype: AggregateTotal
        """
        return self._total

    @total.setter
    def total(self, total):
        """Sets the total of this AggregateStats.


        :param total: The total of this AggregateStats.  # noqa: E501
        :type: AggregateTotal
        """

        self._total = total

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


        :return: The range of this AggregateStats.  # noqa: E501
        :rtype: Range
        """
        return self._range

    @range.setter
    def range(self, range):
        """Sets the range of this AggregateStats.


        :param range: The range of this AggregateStats.  # noqa: E501
        :type: Range
        """

        self._range = range

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


        :return: The timeout of this AggregateStats.  # noqa: E501
        :rtype: int
        """
        return self._timeout

    @timeout.setter
    def timeout(self, timeout):
        """Sets the timeout of this AggregateStats.


        :param timeout: The timeout of this AggregateStats.  # noqa: E501
        :type: int
        """

        self._timeout = timeout

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


        :return: The writes_only of this AggregateStats.  # noqa: E501
        :rtype: bool
        """
        return self._writes_only

    @writes_only.setter
    def writes_only(self, writes_only):
        """Sets the writes_only of this AggregateStats.


        :param writes_only: The writes_only of this AggregateStats.  # noqa: E501
        :type: bool
        """

        self._writes_only = writes_only

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

        return self.__dict__ == other.__dict__

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