# coding: utf-8

"""
    Harbor API

    These APIs provide services for manipulating Harbor project.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from harbor_client.configuration import Configuration


class Metrics(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 = {
        'task_count': 'int',
        'success_task_count': 'int',
        'error_task_count': 'int',
        'pending_task_count': 'int',
        'running_task_count': 'int',
        'scheduled_task_count': 'int',
        'stopped_task_count': 'int'
    }

    attribute_map = {
        'task_count': 'task_count',
        'success_task_count': 'success_task_count',
        'error_task_count': 'error_task_count',
        'pending_task_count': 'pending_task_count',
        'running_task_count': 'running_task_count',
        'scheduled_task_count': 'scheduled_task_count',
        'stopped_task_count': 'stopped_task_count'
    }

    def __init__(self, task_count=None, success_task_count=None, error_task_count=None, pending_task_count=None, running_task_count=None, scheduled_task_count=None, stopped_task_count=None, _configuration=None):  # noqa: E501
        """Metrics - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._task_count = None
        self._success_task_count = None
        self._error_task_count = None
        self._pending_task_count = None
        self._running_task_count = None
        self._scheduled_task_count = None
        self._stopped_task_count = None
        self.discriminator = None

        if task_count is not None:
            self.task_count = task_count
        if success_task_count is not None:
            self.success_task_count = success_task_count
        if error_task_count is not None:
            self.error_task_count = error_task_count
        if pending_task_count is not None:
            self.pending_task_count = pending_task_count
        if running_task_count is not None:
            self.running_task_count = running_task_count
        if scheduled_task_count is not None:
            self.scheduled_task_count = scheduled_task_count
        if stopped_task_count is not None:
            self.stopped_task_count = stopped_task_count

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

        The count of task  # noqa: E501

        :return: The task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._task_count

    @task_count.setter
    def task_count(self, task_count):
        """Sets the task_count of this Metrics.

        The count of task  # noqa: E501

        :param task_count: The task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._task_count = task_count

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

        The count of success task  # noqa: E501

        :return: The success_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._success_task_count

    @success_task_count.setter
    def success_task_count(self, success_task_count):
        """Sets the success_task_count of this Metrics.

        The count of success task  # noqa: E501

        :param success_task_count: The success_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._success_task_count = success_task_count

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

        The count of error task  # noqa: E501

        :return: The error_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._error_task_count

    @error_task_count.setter
    def error_task_count(self, error_task_count):
        """Sets the error_task_count of this Metrics.

        The count of error task  # noqa: E501

        :param error_task_count: The error_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._error_task_count = error_task_count

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

        The count of pending task  # noqa: E501

        :return: The pending_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._pending_task_count

    @pending_task_count.setter
    def pending_task_count(self, pending_task_count):
        """Sets the pending_task_count of this Metrics.

        The count of pending task  # noqa: E501

        :param pending_task_count: The pending_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._pending_task_count = pending_task_count

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

        The count of running task  # noqa: E501

        :return: The running_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._running_task_count

    @running_task_count.setter
    def running_task_count(self, running_task_count):
        """Sets the running_task_count of this Metrics.

        The count of running task  # noqa: E501

        :param running_task_count: The running_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._running_task_count = running_task_count

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

        The count of scheduled task  # noqa: E501

        :return: The scheduled_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._scheduled_task_count

    @scheduled_task_count.setter
    def scheduled_task_count(self, scheduled_task_count):
        """Sets the scheduled_task_count of this Metrics.

        The count of scheduled task  # noqa: E501

        :param scheduled_task_count: The scheduled_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._scheduled_task_count = scheduled_task_count

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

        The count of stopped task  # noqa: E501

        :return: The stopped_task_count of this Metrics.  # noqa: E501
        :rtype: int
        """
        return self._stopped_task_count

    @stopped_task_count.setter
    def stopped_task_count(self, stopped_task_count):
        """Sets the stopped_task_count of this Metrics.

        The count of stopped task  # noqa: E501

        :param stopped_task_count: The stopped_task_count of this Metrics.  # noqa: E501
        :type: int
        """

        self._stopped_task_count = stopped_task_count

    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(Metrics, 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, Metrics):
            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, Metrics):
            return True

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