# 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 Metric(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 = {
        'name': 'str',
        'current_value': 'float',
        'max_over_time': 'float',
        'min_over_time': 'float',
        'median_over_time': 'float',
        'rate': 'float',
        'max_rate': 'float',
        'min_rate': 'float',
        'median_rate': 'float'
    }

    attribute_map = {
        'name': 'name',
        'current_value': 'current_value',
        'max_over_time': 'max_over_time',
        'min_over_time': 'min_over_time',
        'median_over_time': 'median_over_time',
        'rate': 'rate',
        'max_rate': 'max_rate',
        'min_rate': 'min_rate',
        'median_rate': 'median_rate'
    }

    def __init__(self, name=None, current_value=None, max_over_time=None, min_over_time=None, median_over_time=None, rate=None, max_rate=None, min_rate=None, median_rate=None, local_vars_configuration=None):  # noqa: E501
        """Metric - 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._name = None
        self._current_value = None
        self._max_over_time = None
        self._min_over_time = None
        self._median_over_time = None
        self._rate = None
        self._max_rate = None
        self._min_rate = None
        self._median_rate = None
        self.discriminator = None

        self.name = name
        if current_value is not None:
            self.current_value = current_value
        if max_over_time is not None:
            self.max_over_time = max_over_time
        if min_over_time is not None:
            self.min_over_time = min_over_time
        if median_over_time is not None:
            self.median_over_time = median_over_time
        if rate is not None:
            self.rate = rate
        if max_rate is not None:
            self.max_rate = max_rate
        if min_rate is not None:
            self.min_rate = min_rate
        if median_rate is not None:
            self.median_rate = median_rate

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


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

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


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

        self._name = name

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


        :return: The current_value of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._current_value

    @current_value.setter
    def current_value(self, current_value):
        """Sets the current_value of this Metric.


        :param current_value: The current_value of this Metric.  # noqa: E501
        :type: float
        """

        self._current_value = current_value

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


        :return: The max_over_time of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._max_over_time

    @max_over_time.setter
    def max_over_time(self, max_over_time):
        """Sets the max_over_time of this Metric.


        :param max_over_time: The max_over_time of this Metric.  # noqa: E501
        :type: float
        """

        self._max_over_time = max_over_time

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


        :return: The min_over_time of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._min_over_time

    @min_over_time.setter
    def min_over_time(self, min_over_time):
        """Sets the min_over_time of this Metric.


        :param min_over_time: The min_over_time of this Metric.  # noqa: E501
        :type: float
        """

        self._min_over_time = min_over_time

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


        :return: The median_over_time of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._median_over_time

    @median_over_time.setter
    def median_over_time(self, median_over_time):
        """Sets the median_over_time of this Metric.


        :param median_over_time: The median_over_time of this Metric.  # noqa: E501
        :type: float
        """

        self._median_over_time = median_over_time

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


        :return: The rate of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """Sets the rate of this Metric.


        :param rate: The rate of this Metric.  # noqa: E501
        :type: float
        """

        self._rate = rate

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


        :return: The max_rate of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._max_rate

    @max_rate.setter
    def max_rate(self, max_rate):
        """Sets the max_rate of this Metric.


        :param max_rate: The max_rate of this Metric.  # noqa: E501
        :type: float
        """

        self._max_rate = max_rate

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


        :return: The min_rate of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._min_rate

    @min_rate.setter
    def min_rate(self, min_rate):
        """Sets the min_rate of this Metric.


        :param min_rate: The min_rate of this Metric.  # noqa: E501
        :type: float
        """

        self._min_rate = min_rate

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


        :return: The median_rate of this Metric.  # noqa: E501
        :rtype: float
        """
        return self._median_rate

    @median_rate.setter
    def median_rate(self, median_rate):
        """Sets the median_rate of this Metric.


        :param median_rate: The median_rate of this Metric.  # noqa: E501
        :type: float
        """

        self._median_rate = median_rate

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

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