# coding: utf-8

"""
    Veritas Information Classifier (VIC)

    APIs

    OpenAPI spec version: Resource Specific
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class RuleMatch(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, rule_id=None, rule_name=None, confidence=None, count=None, content_matches=None):
        """
        RuleMatch - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'rule_id': 'str',
            'rule_name': 'str',
            'confidence': 'float',
            'count': 'int',
            'content_matches': 'list[ContentMatch]'
        }

        self.attribute_map = {
            'rule_id': 'ruleId',
            'rule_name': 'ruleName',
            'confidence': 'confidence',
            'count': 'count',
            'content_matches': 'contentMatches'
        }

        self._rule_id = rule_id
        self._rule_name = rule_name
        self._confidence = confidence
        self._count = count
        self._content_matches = content_matches

    @property
    def rule_id(self):
        """
        Gets the rule_id of this RuleMatch.

        :return: The rule_id of this RuleMatch.
        :rtype: str
        """
        return self._rule_id

    @rule_id.setter
    def rule_id(self, rule_id):
        """
        Sets the rule_id of this RuleMatch.

        :param rule_id: The rule_id of this RuleMatch.
        :type: str
        """

        self._rule_id = rule_id

    @property
    def rule_name(self):
        """
        Gets the rule_name of this RuleMatch.

        :return: The rule_name of this RuleMatch.
        :rtype: str
        """
        return self._rule_name

    @rule_name.setter
    def rule_name(self, rule_name):
        """
        Sets the rule_name of this RuleMatch.

        :param rule_name: The rule_name of this RuleMatch.
        :type: str
        """

        self._rule_name = rule_name

    @property
    def confidence(self):
        """
        Gets the confidence of this RuleMatch.
        Confidence in the rule match, as a percentage.  A higher value means a higher likelihood that the content matches the intent of the rule.

        :return: The confidence of this RuleMatch.
        :rtype: float
        """
        return self._confidence

    @confidence.setter
    def confidence(self, confidence):
        """
        Sets the confidence of this RuleMatch.
        Confidence in the rule match, as a percentage.  A higher value means a higher likelihood that the content matches the intent of the rule.

        :param confidence: The confidence of this RuleMatch.
        :type: float
        """

        self._confidence = confidence

    @property
    def count(self):
        """
        Gets the count of this RuleMatch.
        The number of individual content matches within the rule match.

        :return: The count of this RuleMatch.
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """
        Sets the count of this RuleMatch.
        The number of individual content matches within the rule match.

        :param count: The count of this RuleMatch.
        :type: int
        """

        self._count = count

    @property
    def content_matches(self):
        """
        Gets the content_matches of this RuleMatch.
        A collection of content matches within the overall rule match, if known.  May be empty for certain types of rule.

        :return: The content_matches of this RuleMatch.
        :rtype: list[ContentMatch]
        """
        return self._content_matches

    @content_matches.setter
    def content_matches(self, content_matches):
        """
        Sets the content_matches of this RuleMatch.
        A collection of content matches within the overall rule match, if known.  May be empty for certain types of rule.

        :param content_matches: The content_matches of this RuleMatch.
        :type: list[ContentMatch]
        """

        self._content_matches = content_matches

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, RuleMatch):
            return False

        return self.__dict__ == other.__dict__

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