# coding: utf-8

"""
    Managed Ray API

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

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


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class TaskGroupedAggregateMetrics(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 = {
        'total': 'int',
        'count_finished': 'int',
        'count_failed': 'int',
        'count_running': 'int',
        'count_pending_schedule': 'int',
        'count_pending_dep': 'int',
        'max_duration_ts_ns': 'int',
        'min_duration_ts_ns': 'int',
        'avg_duration_ts_ns': 'int',
        'max_execution_ns': 'int',
        'min_execution_ns': 'int',
        'avg_execution_ns': 'int'
    }

    attribute_map = {
        'total': 'total',
        'count_finished': 'count_finished',
        'count_failed': 'count_failed',
        'count_running': 'count_running',
        'count_pending_schedule': 'count_pending_schedule',
        'count_pending_dep': 'count_pending_dep',
        'max_duration_ts_ns': 'max_duration_ts_ns',
        'min_duration_ts_ns': 'min_duration_ts_ns',
        'avg_duration_ts_ns': 'avg_duration_ts_ns',
        'max_execution_ns': 'max_execution_ns',
        'min_execution_ns': 'min_execution_ns',
        'avg_execution_ns': 'avg_execution_ns'
    }

    def __init__(self, total=None, count_finished=None, count_failed=None, count_running=None, count_pending_schedule=None, count_pending_dep=None, max_duration_ts_ns=None, min_duration_ts_ns=None, avg_duration_ts_ns=None, max_execution_ns=None, min_execution_ns=None, avg_execution_ns=None, local_vars_configuration=None):  # noqa: E501
        """TaskGroupedAggregateMetrics - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._total = None
        self._count_finished = None
        self._count_failed = None
        self._count_running = None
        self._count_pending_schedule = None
        self._count_pending_dep = None
        self._max_duration_ts_ns = None
        self._min_duration_ts_ns = None
        self._avg_duration_ts_ns = None
        self._max_execution_ns = None
        self._min_execution_ns = None
        self._avg_execution_ns = None
        self.discriminator = None

        self.total = total
        self.count_finished = count_finished
        self.count_failed = count_failed
        self.count_running = count_running
        self.count_pending_schedule = count_pending_schedule
        self.count_pending_dep = count_pending_dep
        self.max_duration_ts_ns = max_duration_ts_ns
        self.min_duration_ts_ns = min_duration_ts_ns
        self.avg_duration_ts_ns = avg_duration_ts_ns
        if max_execution_ns is not None:
            self.max_execution_ns = max_execution_ns
        if min_execution_ns is not None:
            self.min_execution_ns = min_execution_ns
        if avg_execution_ns is not None:
            self.avg_execution_ns = avg_execution_ns

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


        :return: The total of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._total

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


        :param total: The total of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and total is None:  # noqa: E501
            raise ValueError("Invalid value for `total`, must not be `None`")  # noqa: E501

        self._total = total

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


        :return: The count_finished of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._count_finished

    @count_finished.setter
    def count_finished(self, count_finished):
        """Sets the count_finished of this TaskGroupedAggregateMetrics.


        :param count_finished: The count_finished of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and count_finished is None:  # noqa: E501
            raise ValueError("Invalid value for `count_finished`, must not be `None`")  # noqa: E501

        self._count_finished = count_finished

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


        :return: The count_failed of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._count_failed

    @count_failed.setter
    def count_failed(self, count_failed):
        """Sets the count_failed of this TaskGroupedAggregateMetrics.


        :param count_failed: The count_failed of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and count_failed is None:  # noqa: E501
            raise ValueError("Invalid value for `count_failed`, must not be `None`")  # noqa: E501

        self._count_failed = count_failed

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


        :return: The count_running of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._count_running

    @count_running.setter
    def count_running(self, count_running):
        """Sets the count_running of this TaskGroupedAggregateMetrics.


        :param count_running: The count_running of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and count_running is None:  # noqa: E501
            raise ValueError("Invalid value for `count_running`, must not be `None`")  # noqa: E501

        self._count_running = count_running

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


        :return: The count_pending_schedule of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._count_pending_schedule

    @count_pending_schedule.setter
    def count_pending_schedule(self, count_pending_schedule):
        """Sets the count_pending_schedule of this TaskGroupedAggregateMetrics.


        :param count_pending_schedule: The count_pending_schedule of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and count_pending_schedule is None:  # noqa: E501
            raise ValueError("Invalid value for `count_pending_schedule`, must not be `None`")  # noqa: E501

        self._count_pending_schedule = count_pending_schedule

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


        :return: The count_pending_dep of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._count_pending_dep

    @count_pending_dep.setter
    def count_pending_dep(self, count_pending_dep):
        """Sets the count_pending_dep of this TaskGroupedAggregateMetrics.


        :param count_pending_dep: The count_pending_dep of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and count_pending_dep is None:  # noqa: E501
            raise ValueError("Invalid value for `count_pending_dep`, must not be `None`")  # noqa: E501

        self._count_pending_dep = count_pending_dep

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


        :return: The max_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._max_duration_ts_ns

    @max_duration_ts_ns.setter
    def max_duration_ts_ns(self, max_duration_ts_ns):
        """Sets the max_duration_ts_ns of this TaskGroupedAggregateMetrics.


        :param max_duration_ts_ns: The max_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and max_duration_ts_ns is None:  # noqa: E501
            raise ValueError("Invalid value for `max_duration_ts_ns`, must not be `None`")  # noqa: E501

        self._max_duration_ts_ns = max_duration_ts_ns

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


        :return: The min_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._min_duration_ts_ns

    @min_duration_ts_ns.setter
    def min_duration_ts_ns(self, min_duration_ts_ns):
        """Sets the min_duration_ts_ns of this TaskGroupedAggregateMetrics.


        :param min_duration_ts_ns: The min_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and min_duration_ts_ns is None:  # noqa: E501
            raise ValueError("Invalid value for `min_duration_ts_ns`, must not be `None`")  # noqa: E501

        self._min_duration_ts_ns = min_duration_ts_ns

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


        :return: The avg_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._avg_duration_ts_ns

    @avg_duration_ts_ns.setter
    def avg_duration_ts_ns(self, avg_duration_ts_ns):
        """Sets the avg_duration_ts_ns of this TaskGroupedAggregateMetrics.


        :param avg_duration_ts_ns: The avg_duration_ts_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and avg_duration_ts_ns is None:  # noqa: E501
            raise ValueError("Invalid value for `avg_duration_ts_ns`, must not be `None`")  # noqa: E501

        self._avg_duration_ts_ns = avg_duration_ts_ns

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


        :return: The max_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._max_execution_ns

    @max_execution_ns.setter
    def max_execution_ns(self, max_execution_ns):
        """Sets the max_execution_ns of this TaskGroupedAggregateMetrics.


        :param max_execution_ns: The max_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """

        self._max_execution_ns = max_execution_ns

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


        :return: The min_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._min_execution_ns

    @min_execution_ns.setter
    def min_execution_ns(self, min_execution_ns):
        """Sets the min_execution_ns of this TaskGroupedAggregateMetrics.


        :param min_execution_ns: The min_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """

        self._min_execution_ns = min_execution_ns

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


        :return: The avg_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :rtype: int
        """
        return self._avg_execution_ns

    @avg_execution_ns.setter
    def avg_execution_ns(self, avg_execution_ns):
        """Sets the avg_execution_ns of this TaskGroupedAggregateMetrics.


        :param avg_execution_ns: The avg_execution_ns of this TaskGroupedAggregateMetrics.  # noqa: E501
        :type: int
        """

        self._avg_execution_ns = avg_execution_ns

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

        for attr, _ in six.iteritems(self.openapi_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

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

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