# coding: utf-8

"""
    Robust Intelligence REST API

    API methods for Robust Intelligence. Users must authenticate using the `rime-api-key` header.  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: dev@robustintelligence.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class TestRunMetricsCategorySummaryMetric(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 = {
        'test_category': 'TestrunTestCategoryType',
        'category_id': 'str',
        'name': 'str',
        'value': 'float'
    }

    attribute_map = {
        'test_category': 'testCategory',
        'category_id': 'categoryId',
        'name': 'name',
        'value': 'value'
    }

    def __init__(self, test_category=None, category_id=None, name=None, value=None):  # noqa: E501
        """TestRunMetricsCategorySummaryMetric - a model defined in Swagger"""  # noqa: E501
        self._test_category = None
        self._category_id = None
        self._name = None
        self._value = None
        self.discriminator = None
        if test_category is not None:
            self.test_category = test_category
        if category_id is not None:
            self.category_id = category_id
        if name is not None:
            self.name = name
        if value is not None:
            self.value = value

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


        :return: The test_category of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :rtype: TestrunTestCategoryType
        """
        return self._test_category

    @test_category.setter
    def test_category(self, test_category):
        """Sets the test_category of this TestRunMetricsCategorySummaryMetric.


        :param test_category: The test_category of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :type: TestrunTestCategoryType
        """

        self._test_category = test_category

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

        The string field `category` is deprecated in v2.1 and will be removed in v2.3. Please use the enum field test_category instead, which provides the same info.  # noqa: E501

        :return: The category_id of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :rtype: str
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this TestRunMetricsCategorySummaryMetric.

        The string field `category` is deprecated in v2.1 and will be removed in v2.3. Please use the enum field test_category instead, which provides the same info.  # noqa: E501

        :param category_id: The category_id of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :type: str
        """

        self._category_id = category_id

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

        The name of the category.  # noqa: E501

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

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

        The name of the category.  # noqa: E501

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

        self._name = name

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

        The value of the metric over the specified category.  # noqa: E501

        :return: The value of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :rtype: float
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this TestRunMetricsCategorySummaryMetric.

        The value of the metric over the specified category.  # noqa: E501

        :param value: The value of this TestRunMetricsCategorySummaryMetric.  # noqa: E501
        :type: float
        """

        self._value = value

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

        return self.__dict__ == other.__dict__

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