# 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 RimeCategoryTestResult(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 = {
        'id': 'str',
        'severity': 'RimeSeverity',
        'suggestion': 'RimeSuggestion',
        'category_metrics': 'list[RimeCategoryMetric]',
        'test_batch_types': 'list[str]',
        'description': 'str',
        'severity_counts': 'RimeSeverityCounts',
        'failing_test_types': 'list[str]',
        'duration': 'float',
        'category_importance': 'float',
        'risk_category': 'RiskscoreRiskCategoryType',
        'test_category': 'TestrunTestCategoryType'
    }

    attribute_map = {
        'id': 'id',
        'severity': 'severity',
        'suggestion': 'suggestion',
        'category_metrics': 'categoryMetrics',
        'test_batch_types': 'testBatchTypes',
        'description': 'description',
        'severity_counts': 'severityCounts',
        'failing_test_types': 'failingTestTypes',
        'duration': 'duration',
        'category_importance': 'categoryImportance',
        'risk_category': 'riskCategory',
        'test_category': 'testCategory'
    }

    def __init__(self, id=None, severity=None, suggestion=None, category_metrics=None, test_batch_types=None, description=None, severity_counts=None, failing_test_types=None, duration=None, category_importance=None, risk_category=None, test_category=None):  # noqa: E501
        """RimeCategoryTestResult - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._severity = None
        self._suggestion = None
        self._category_metrics = None
        self._test_batch_types = None
        self._description = None
        self._severity_counts = None
        self._failing_test_types = None
        self._duration = None
        self._category_importance = None
        self._risk_category = None
        self._test_category = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if severity is not None:
            self.severity = severity
        if suggestion is not None:
            self.suggestion = suggestion
        if category_metrics is not None:
            self.category_metrics = category_metrics
        if test_batch_types is not None:
            self.test_batch_types = test_batch_types
        if description is not None:
            self.description = description
        if severity_counts is not None:
            self.severity_counts = severity_counts
        if failing_test_types is not None:
            self.failing_test_types = failing_test_types
        if duration is not None:
            self.duration = duration
        if category_importance is not None:
            self.category_importance = category_importance
        if risk_category is not None:
            self.risk_category = risk_category
        if test_category is not None:
            self.test_category = test_category

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

        When combined with the test run ID, this uniquely identifies a category test result.  # noqa: E501

        :return: The id of this RimeCategoryTestResult.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this RimeCategoryTestResult.

        When combined with the test run ID, this uniquely identifies a category test result.  # noqa: E501

        :param id: The id of this RimeCategoryTestResult.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The severity of this RimeCategoryTestResult.  # noqa: E501
        :rtype: RimeSeverity
        """
        return self._severity

    @severity.setter
    def severity(self, severity):
        """Sets the severity of this RimeCategoryTestResult.


        :param severity: The severity of this RimeCategoryTestResult.  # noqa: E501
        :type: RimeSeverity
        """

        self._severity = severity

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


        :return: The suggestion of this RimeCategoryTestResult.  # noqa: E501
        :rtype: RimeSuggestion
        """
        return self._suggestion

    @suggestion.setter
    def suggestion(self, suggestion):
        """Sets the suggestion of this RimeCategoryTestResult.


        :param suggestion: The suggestion of this RimeCategoryTestResult.  # noqa: E501
        :type: RimeSuggestion
        """

        self._suggestion = suggestion

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

        Category metrics are aggregated or important metrics for the category.  # noqa: E501

        :return: The category_metrics of this RimeCategoryTestResult.  # noqa: E501
        :rtype: list[RimeCategoryMetric]
        """
        return self._category_metrics

    @category_metrics.setter
    def category_metrics(self, category_metrics):
        """Sets the category_metrics of this RimeCategoryTestResult.

        Category metrics are aggregated or important metrics for the category.  # noqa: E501

        :param category_metrics: The category_metrics of this RimeCategoryTestResult.  # noqa: E501
        :type: list[RimeCategoryMetric]
        """

        self._category_metrics = category_metrics

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

        List of the tests in the category.  # noqa: E501

        :return: The test_batch_types of this RimeCategoryTestResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._test_batch_types

    @test_batch_types.setter
    def test_batch_types(self, test_batch_types):
        """Sets the test_batch_types of this RimeCategoryTestResult.

        List of the tests in the category.  # noqa: E501

        :param test_batch_types: The test_batch_types of this RimeCategoryTestResult.  # noqa: E501
        :type: list[str]
        """

        self._test_batch_types = test_batch_types

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

        Human-readable description of the category test result.  # noqa: E501

        :return: The description of this RimeCategoryTestResult.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this RimeCategoryTestResult.

        Human-readable description of the category test result.  # noqa: E501

        :param description: The description of this RimeCategoryTestResult.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The severity_counts of this RimeCategoryTestResult.  # noqa: E501
        :rtype: RimeSeverityCounts
        """
        return self._severity_counts

    @severity_counts.setter
    def severity_counts(self, severity_counts):
        """Sets the severity_counts of this RimeCategoryTestResult.


        :param severity_counts: The severity_counts of this RimeCategoryTestResult.  # noqa: E501
        :type: RimeSeverityCounts
        """

        self._severity_counts = severity_counts

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

        List of all the failing test types.  # noqa: E501

        :return: The failing_test_types of this RimeCategoryTestResult.  # noqa: E501
        :rtype: list[str]
        """
        return self._failing_test_types

    @failing_test_types.setter
    def failing_test_types(self, failing_test_types):
        """Sets the failing_test_types of this RimeCategoryTestResult.

        List of all the failing test types.  # noqa: E501

        :param failing_test_types: The failing_test_types of this RimeCategoryTestResult.  # noqa: E501
        :type: list[str]
        """

        self._failing_test_types = failing_test_types

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

        Duration is the total time in seconds for tests in that category.  # noqa: E501

        :return: The duration of this RimeCategoryTestResult.  # noqa: E501
        :rtype: float
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this RimeCategoryTestResult.

        Duration is the total time in seconds for tests in that category.  # noqa: E501

        :param duration: The duration of this RimeCategoryTestResult.  # noqa: E501
        :type: float
        """

        self._duration = duration

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

        The relative importance of the category.  # noqa: E501

        :return: The category_importance of this RimeCategoryTestResult.  # noqa: E501
        :rtype: float
        """
        return self._category_importance

    @category_importance.setter
    def category_importance(self, category_importance):
        """Sets the category_importance of this RimeCategoryTestResult.

        The relative importance of the category.  # noqa: E501

        :param category_importance: The category_importance of this RimeCategoryTestResult.  # noqa: E501
        :type: float
        """

        self._category_importance = category_importance

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


        :return: The risk_category of this RimeCategoryTestResult.  # noqa: E501
        :rtype: RiskscoreRiskCategoryType
        """
        return self._risk_category

    @risk_category.setter
    def risk_category(self, risk_category):
        """Sets the risk_category of this RimeCategoryTestResult.


        :param risk_category: The risk_category of this RimeCategoryTestResult.  # noqa: E501
        :type: RiskscoreRiskCategoryType
        """

        self._risk_category = risk_category

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


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

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


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

        self._test_category = test_category

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

        return self.__dict__ == other.__dict__

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