# coding: utf-8

"""
    securityapi

    The security APIs help you detect and block security threats.  # 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 StringAutomaticThreatDetection(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',
        'clean_result': 'bool',
        'contained_json_insecure_deserialization_attack': 'bool',
        'contained_xss_threat': 'bool',
        'contained_xxe_threat': 'bool',
        'contained_sql_injection_threat': 'bool',
        'contained_ssrf_threat': 'bool',
        'is_xml': 'bool',
        'is_json': 'bool',
        'is_url': 'bool',
        'original_input': 'str'
    }

    attribute_map = {
        'successful': 'Successful',
        'clean_result': 'CleanResult',
        'contained_json_insecure_deserialization_attack': 'ContainedJsonInsecureDeserializationAttack',
        'contained_xss_threat': 'ContainedXssThreat',
        'contained_xxe_threat': 'ContainedXxeThreat',
        'contained_sql_injection_threat': 'ContainedSqlInjectionThreat',
        'contained_ssrf_threat': 'ContainedSsrfThreat',
        'is_xml': 'IsXML',
        'is_json': 'IsJSON',
        'is_url': 'IsURL',
        'original_input': 'OriginalInput'
    }

    def __init__(self, successful=None, clean_result=None, contained_json_insecure_deserialization_attack=None, contained_xss_threat=None, contained_xxe_threat=None, contained_sql_injection_threat=None, contained_ssrf_threat=None, is_xml=None, is_json=None, is_url=None, original_input=None):  # noqa: E501
        """StringAutomaticThreatDetection - a model defined in Swagger"""  # noqa: E501

        self._successful = None
        self._clean_result = None
        self._contained_json_insecure_deserialization_attack = None
        self._contained_xss_threat = None
        self._contained_xxe_threat = None
        self._contained_sql_injection_threat = None
        self._contained_ssrf_threat = None
        self._is_xml = None
        self._is_json = None
        self._is_url = None
        self._original_input = None
        self.discriminator = None

        if successful is not None:
            self.successful = successful
        if clean_result is not None:
            self.clean_result = clean_result
        if contained_json_insecure_deserialization_attack is not None:
            self.contained_json_insecure_deserialization_attack = contained_json_insecure_deserialization_attack
        if contained_xss_threat is not None:
            self.contained_xss_threat = contained_xss_threat
        if contained_xxe_threat is not None:
            self.contained_xxe_threat = contained_xxe_threat
        if contained_sql_injection_threat is not None:
            self.contained_sql_injection_threat = contained_sql_injection_threat
        if contained_ssrf_threat is not None:
            self.contained_ssrf_threat = contained_ssrf_threat
        if is_xml is not None:
            self.is_xml = is_xml
        if is_json is not None:
            self.is_json = is_json
        if is_url is not None:
            self.is_url = is_url
        if original_input is not None:
            self.original_input = original_input

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

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

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

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

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

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

        self._successful = successful

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


        :return: The clean_result of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._clean_result

    @clean_result.setter
    def clean_result(self, clean_result):
        """Sets the clean_result of this StringAutomaticThreatDetection.


        :param clean_result: The clean_result of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._clean_result = clean_result

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

        True if the input contained Insecure Deserialization JSON, false otherwise  # noqa: E501

        :return: The contained_json_insecure_deserialization_attack of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._contained_json_insecure_deserialization_attack

    @contained_json_insecure_deserialization_attack.setter
    def contained_json_insecure_deserialization_attack(self, contained_json_insecure_deserialization_attack):
        """Sets the contained_json_insecure_deserialization_attack of this StringAutomaticThreatDetection.

        True if the input contained Insecure Deserialization JSON, false otherwise  # noqa: E501

        :param contained_json_insecure_deserialization_attack: The contained_json_insecure_deserialization_attack of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._contained_json_insecure_deserialization_attack = contained_json_insecure_deserialization_attack

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

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

        :return: The contained_xss_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._contained_xss_threat

    @contained_xss_threat.setter
    def contained_xss_threat(self, contained_xss_threat):
        """Sets the contained_xss_threat of this StringAutomaticThreatDetection.

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

        :param contained_xss_threat: The contained_xss_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._contained_xss_threat = contained_xss_threat

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

        True if the input contained XXE attack, false otherwise  # noqa: E501

        :return: The contained_xxe_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._contained_xxe_threat

    @contained_xxe_threat.setter
    def contained_xxe_threat(self, contained_xxe_threat):
        """Sets the contained_xxe_threat of this StringAutomaticThreatDetection.

        True if the input contained XXE attack, false otherwise  # noqa: E501

        :param contained_xxe_threat: The contained_xxe_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._contained_xxe_threat = contained_xxe_threat

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

        True if the input contained SQL Injection attack, false otherwise  # noqa: E501

        :return: The contained_sql_injection_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._contained_sql_injection_threat

    @contained_sql_injection_threat.setter
    def contained_sql_injection_threat(self, contained_sql_injection_threat):
        """Sets the contained_sql_injection_threat of this StringAutomaticThreatDetection.

        True if the input contained SQL Injection attack, false otherwise  # noqa: E501

        :param contained_sql_injection_threat: The contained_sql_injection_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._contained_sql_injection_threat = contained_sql_injection_threat

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

        True if the input contained an Server-Side Request Forgery (SSRF) URL attack, false otherwise  # noqa: E501

        :return: The contained_ssrf_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._contained_ssrf_threat

    @contained_ssrf_threat.setter
    def contained_ssrf_threat(self, contained_ssrf_threat):
        """Sets the contained_ssrf_threat of this StringAutomaticThreatDetection.

        True if the input contained an Server-Side Request Forgery (SSRF) URL attack, false otherwise  # noqa: E501

        :param contained_ssrf_threat: The contained_ssrf_threat of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._contained_ssrf_threat = contained_ssrf_threat

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

        True if the input string is XML, false otherwise  # noqa: E501

        :return: The is_xml of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._is_xml

    @is_xml.setter
    def is_xml(self, is_xml):
        """Sets the is_xml of this StringAutomaticThreatDetection.

        True if the input string is XML, false otherwise  # noqa: E501

        :param is_xml: The is_xml of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._is_xml = is_xml

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

        True if the input string is JSON, false otherwise  # noqa: E501

        :return: The is_json of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._is_json

    @is_json.setter
    def is_json(self, is_json):
        """Sets the is_json of this StringAutomaticThreatDetection.

        True if the input string is JSON, false otherwise  # noqa: E501

        :param is_json: The is_json of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._is_json = is_json

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

        True if the input string is a URL, false otherwise  # noqa: E501

        :return: The is_url of this StringAutomaticThreatDetection.  # noqa: E501
        :rtype: bool
        """
        return self._is_url

    @is_url.setter
    def is_url(self, is_url):
        """Sets the is_url of this StringAutomaticThreatDetection.

        True if the input string is a URL, false otherwise  # noqa: E501

        :param is_url: The is_url of this StringAutomaticThreatDetection.  # noqa: E501
        :type: bool
        """

        self._is_url = is_url

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

        Original input string  # noqa: E501

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

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

        Original input string  # noqa: E501

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

        self._original_input = original_input

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

        return self.__dict__ == other.__dict__

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