# 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 CategoryStat(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',
        'total_seconds': 'float',
        'percent': 'float',
        'digital': 'str',
        'text': 'str',
        'hours': 'int',
        'minutes': 'int',
        'seconds': 'int'
    }

    attribute_map = {
        'name': 'name',
        'total_seconds': 'total_seconds',
        'percent': 'percent',
        'digital': 'digital',
        'text': 'text',
        'hours': 'hours',
        'minutes': 'minutes',
        'seconds': 'seconds'
    }

    def __init__(self, name=None, total_seconds=None, percent=None, digital=None, text=None, hours=None, minutes=None, seconds=None):  # noqa: E501
        """CategoryStat - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._total_seconds = None
        self._percent = None
        self._digital = None
        self._text = None
        self._hours = None
        self._minutes = None
        self._seconds = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if total_seconds is not None:
            self.total_seconds = total_seconds
        if percent is not None:
            self.percent = percent
        if digital is not None:
            self.digital = digital
        if text is not None:
            self.text = text
        if hours is not None:
            self.hours = hours
        if minutes is not None:
            self.minutes = minutes
        if seconds is not None:
            self.seconds = seconds

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

        Name of the category (e.g., \"Coding\", \"Debugging\").  # noqa: E501

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

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

        Name of the category (e.g., \"Coding\", \"Debugging\").  # noqa: E501

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

        self._name = name

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

        Total coding activity as seconds.  # noqa: E501

        :return: The total_seconds of this CategoryStat.  # noqa: E501
        :rtype: float
        """
        return self._total_seconds

    @total_seconds.setter
    def total_seconds(self, total_seconds):
        """Sets the total_seconds of this CategoryStat.

        Total coding activity as seconds.  # noqa: E501

        :param total_seconds: The total_seconds of this CategoryStat.  # noqa: E501
        :type: float
        """

        self._total_seconds = total_seconds

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

        Percent of time spent in this category.  # noqa: E501

        :return: The percent of this CategoryStat.  # noqa: E501
        :rtype: float
        """
        return self._percent

    @percent.setter
    def percent(self, percent):
        """Sets the percent of this CategoryStat.

        Percent of time spent in this category.  # noqa: E501

        :param percent: The percent of this CategoryStat.  # noqa: E501
        :type: float
        """

        self._percent = percent

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

        Total coding activity for this category in digital clock format.  # noqa: E501

        :return: The digital of this CategoryStat.  # noqa: E501
        :rtype: str
        """
        return self._digital

    @digital.setter
    def digital(self, digital):
        """Sets the digital of this CategoryStat.

        Total coding activity for this category in digital clock format.  # noqa: E501

        :param digital: The digital of this CategoryStat.  # noqa: E501
        :type: str
        """

        self._digital = digital

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

        Total coding activity in human readable format.  # noqa: E501

        :return: The text of this CategoryStat.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this CategoryStat.

        Total coding activity in human readable format.  # noqa: E501

        :param text: The text of this CategoryStat.  # noqa: E501
        :type: str
        """

        self._text = text

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

        Hours portion of coding activity for this category.  # noqa: E501

        :return: The hours of this CategoryStat.  # noqa: E501
        :rtype: int
        """
        return self._hours

    @hours.setter
    def hours(self, hours):
        """Sets the hours of this CategoryStat.

        Hours portion of coding activity for this category.  # noqa: E501

        :param hours: The hours of this CategoryStat.  # noqa: E501
        :type: int
        """

        self._hours = hours

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

        Minutes portion of coding activity for this category.  # noqa: E501

        :return: The minutes of this CategoryStat.  # noqa: E501
        :rtype: int
        """
        return self._minutes

    @minutes.setter
    def minutes(self, minutes):
        """Sets the minutes of this CategoryStat.

        Minutes portion of coding activity for this category.  # noqa: E501

        :param minutes: The minutes of this CategoryStat.  # noqa: E501
        :type: int
        """

        self._minutes = minutes

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

        Seconds portion of coding activity for this category.  # noqa: E501

        :return: The seconds of this CategoryStat.  # noqa: E501
        :rtype: int
        """
        return self._seconds

    @seconds.setter
    def seconds(self, seconds):
        """Sets the seconds of this CategoryStat.

        Seconds portion of coding activity for this category.  # noqa: E501

        :param seconds: The seconds of this CategoryStat.  # noqa: E501
        :type: int
        """

        self._seconds = seconds

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

        return self.__dict__ == other.__dict__

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