# 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 ServeReplicaMetric(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 = {
        'latency_p95_ms': 'float',
        'qps': 'float',
        'request_count': 'float',
        'error_count': 'float'
    }

    attribute_map = {
        'latency_p95_ms': 'latency_p95_ms',
        'qps': 'qps',
        'request_count': 'request_count',
        'error_count': 'error_count'
    }

    def __init__(self, latency_p95_ms=None, qps=None, request_count=None, error_count=None, local_vars_configuration=None):  # noqa: E501
        """ServeReplicaMetric - 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._latency_p95_ms = None
        self._qps = None
        self._request_count = None
        self._error_count = None
        self.discriminator = None

        if latency_p95_ms is not None:
            self.latency_p95_ms = latency_p95_ms
        if qps is not None:
            self.qps = qps
        if request_count is not None:
            self.request_count = request_count
        if error_count is not None:
            self.error_count = error_count

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

        The p95 processing latency of this replica  # noqa: E501

        :return: The latency_p95_ms of this ServeReplicaMetric.  # noqa: E501
        :rtype: float
        """
        return self._latency_p95_ms

    @latency_p95_ms.setter
    def latency_p95_ms(self, latency_p95_ms):
        """Sets the latency_p95_ms of this ServeReplicaMetric.

        The p95 processing latency of this replica  # noqa: E501

        :param latency_p95_ms: The latency_p95_ms of this ServeReplicaMetric.  # noqa: E501
        :type: float
        """

        self._latency_p95_ms = latency_p95_ms

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

        The queries per second for this replica  # noqa: E501

        :return: The qps of this ServeReplicaMetric.  # noqa: E501
        :rtype: float
        """
        return self._qps

    @qps.setter
    def qps(self, qps):
        """Sets the qps of this ServeReplicaMetric.

        The queries per second for this replica  # noqa: E501

        :param qps: The qps of this ServeReplicaMetric.  # noqa: E501
        :type: float
        """

        self._qps = qps

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

        The count of request for this replica   # noqa: E501

        :return: The request_count of this ServeReplicaMetric.  # noqa: E501
        :rtype: float
        """
        return self._request_count

    @request_count.setter
    def request_count(self, request_count):
        """Sets the request_count of this ServeReplicaMetric.

        The count of request for this replica   # noqa: E501

        :param request_count: The request_count of this ServeReplicaMetric.  # noqa: E501
        :type: float
        """

        self._request_count = request_count

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

        The count of errors for this replica   # noqa: E501

        :return: The error_count of this ServeReplicaMetric.  # noqa: E501
        :rtype: float
        """
        return self._error_count

    @error_count.setter
    def error_count(self, error_count):
        """Sets the error_count of this ServeReplicaMetric.

        The count of errors for this replica   # noqa: E501

        :param error_count: The error_count of this ServeReplicaMetric.  # noqa: E501
        :type: float
        """

        self._error_count = error_count

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

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