# coding: utf-8

"""
    validateapi

    The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class XssProtectionResult(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 = {
        'successful': 'bool',
        'contained_xss': 'bool',
        'original_input': 'str',
        'normalized_result': 'str'
    }

    attribute_map = {
        'successful': 'Successful',
        'contained_xss': 'ContainedXss',
        'original_input': 'OriginalInput',
        'normalized_result': 'NormalizedResult'
    }

    def __init__(self, successful=None, contained_xss=None, original_input=None, normalized_result=None):  # noqa: E501
        """XssProtectionResult - a model defined in Swagger"""  # noqa: E501

        self._successful = None
        self._contained_xss = None
        self._original_input = None
        self._normalized_result = None
        self.discriminator = None

        if successful is not None:
            self.successful = successful
        if contained_xss is not None:
            self.contained_xss = contained_xss
        if original_input is not None:
            self.original_input = original_input
        if normalized_result is not None:
            self.normalized_result = normalized_result

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

        True if the operation was successful, false otherwise  # noqa: E501

        :return: The successful of this XssProtectionResult.  # noqa: E501
        :rtype: bool
        """
        return self._successful

    @successful.setter
    def successful(self, successful):
        """Sets the successful of this XssProtectionResult.

        True if the operation was successful, false otherwise  # noqa: E501

        :param successful: The successful of this XssProtectionResult.  # noqa: E501
        :type: bool
        """

        self._successful = successful

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

        True if the input contained XSS scripting, false otherwise  # noqa: E501

        :return: The contained_xss of this XssProtectionResult.  # noqa: E501
        :rtype: bool
        """
        return self._contained_xss

    @contained_xss.setter
    def contained_xss(self, contained_xss):
        """Sets the contained_xss of this XssProtectionResult.

        True if the input contained XSS scripting, false otherwise  # noqa: E501

        :param contained_xss: The contained_xss of this XssProtectionResult.  # noqa: E501
        :type: bool
        """

        self._contained_xss = contained_xss

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

        Original input string  # noqa: E501

        :return: The original_input of this XssProtectionResult.  # noqa: E501
        :rtype: str
        """
        return self._original_input

    @original_input.setter
    def original_input(self, original_input):
        """Sets the original_input of this XssProtectionResult.

        Original input string  # noqa: E501

        :param original_input: The original_input of this XssProtectionResult.  # noqa: E501
        :type: str
        """

        self._original_input = original_input

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

        Normalized string result, with XSS removed  # noqa: E501

        :return: The normalized_result of this XssProtectionResult.  # noqa: E501
        :rtype: str
        """
        return self._normalized_result

    @normalized_result.setter
    def normalized_result(self, normalized_result):
        """Sets the normalized_result of this XssProtectionResult.

        Normalized string result, with XSS removed  # noqa: E501

        :param normalized_result: The normalized_result of this XssProtectionResult.  # noqa: E501
        :type: str
        """

        self._normalized_result = normalized_result

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

        return self.__dict__ == other.__dict__

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