# 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 ClassificationResult(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, policy_id=None, policy_name=None, tags=None, rule_matches=None):
        """
        ClassificationResult - 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 = {
            'policy_id': 'str',
            'policy_name': 'str',
            'tags': 'list[Tag]',
            'rule_matches': 'list[RuleMatch]'
        }

        self.attribute_map = {
            'policy_id': 'policyId',
            'policy_name': 'policyName',
            'tags': 'tags',
            'rule_matches': 'ruleMatches'
        }

        self._policy_id = policy_id
        self._policy_name = policy_name
        self._tags = tags
        self._rule_matches = rule_matches

    @property
    def policy_id(self):
        """
        Gets the policy_id of this ClassificationResult.
        The identity of the policy that was matched against.

        :return: The policy_id of this ClassificationResult.
        :rtype: str
        """
        return self._policy_id

    @policy_id.setter
    def policy_id(self, policy_id):
        """
        Sets the policy_id of this ClassificationResult.
        The identity of the policy that was matched against.

        :param policy_id: The policy_id of this ClassificationResult.
        :type: str
        """

        self._policy_id = policy_id

    @property
    def policy_name(self):
        """
        Gets the policy_name of this ClassificationResult.
        The name of the policy that was matched against.

        :return: The policy_name of this ClassificationResult.
        :rtype: str
        """
        return self._policy_name

    @policy_name.setter
    def policy_name(self, policy_name):
        """
        Sets the policy_name of this ClassificationResult.
        The name of the policy that was matched against.

        :param policy_name: The policy_name of this ClassificationResult.
        :type: str
        """

        self._policy_name = policy_name

    @property
    def tags(self):
        """
        Gets the tags of this ClassificationResult.
        Suggested tags to represent the policy match.  A client may want to attach the tags to the original document as a way of recording the classification result.

        :return: The tags of this ClassificationResult.
        :rtype: list[Tag]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """
        Sets the tags of this ClassificationResult.
        Suggested tags to represent the policy match.  A client may want to attach the tags to the original document as a way of recording the classification result.

        :param tags: The tags of this ClassificationResult.
        :type: list[Tag]
        """

        self._tags = tags

    @property
    def rule_matches(self):
        """
        Gets the rule_matches of this ClassificationResult.
        Collection of rule matches giving details of how the classification was determined. Optional, so may not be populated.

        :return: The rule_matches of this ClassificationResult.
        :rtype: list[RuleMatch]
        """
        return self._rule_matches

    @rule_matches.setter
    def rule_matches(self, rule_matches):
        """
        Sets the rule_matches of this ClassificationResult.
        Collection of rule matches giving details of how the classification was determined. Optional, so may not be populated.

        :param rule_matches: The rule_matches of this ClassificationResult.
        :type: list[RuleMatch]
        """

        self._rule_matches = rule_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, ClassificationResult):
            return False

        return self.__dict__ == other.__dict__

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