# coding: utf-8

"""
    Robust Intelligence REST API

    API methods for Robust Intelligence. Users must authenticate using the `X-Firewall-Api-Key` for all the firewall methods and `rime-api-key` for all other methods.  # 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 GenerativefirewallIndividualRulesConfig(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 = {
        'off_topic': 'GenerativefirewallOffTopicRuleConfig',
        'pii_detection_input': 'GenerativefirewallPiiDetectionRuleConfig',
        'pii_detection_output': 'GenerativefirewallPiiDetectionRuleConfig',
        'token_counter_input': 'GenerativefirewallTokenCounterRuleConfig',
        'token_counter_output': 'GenerativefirewallTokenCounterRuleConfig',
        'unknown_external_source': 'GenerativefirewallUnknownExternalSourceRuleConfig',
        'language_detection': 'GenerativefirewallLanguageDetectionRuleConfig',
        'prompt_injection': 'GenerativefirewallPromptInjectionRuleConfig',
        'toxicity_rule_config_input': 'GenerativefirewallToxicityRuleConfig',
        'toxicity_rule_config_output': 'GenerativefirewallToxicityRuleConfig',
        'code_detection': 'GenerativefirewallCodeDetectionRuleConfig'
    }

    attribute_map = {
        'off_topic': 'offTopic',
        'pii_detection_input': 'piiDetectionInput',
        'pii_detection_output': 'piiDetectionOutput',
        'token_counter_input': 'tokenCounterInput',
        'token_counter_output': 'tokenCounterOutput',
        'unknown_external_source': 'unknownExternalSource',
        'language_detection': 'languageDetection',
        'prompt_injection': 'promptInjection',
        'toxicity_rule_config_input': 'toxicityRuleConfigInput',
        'toxicity_rule_config_output': 'toxicityRuleConfigOutput',
        'code_detection': 'codeDetection'
    }

    def __init__(self, off_topic=None, pii_detection_input=None, pii_detection_output=None, token_counter_input=None, token_counter_output=None, unknown_external_source=None, language_detection=None, prompt_injection=None, toxicity_rule_config_input=None, toxicity_rule_config_output=None, code_detection=None):  # noqa: E501
        """GenerativefirewallIndividualRulesConfig - a model defined in Swagger"""  # noqa: E501
        self._off_topic = None
        self._pii_detection_input = None
        self._pii_detection_output = None
        self._token_counter_input = None
        self._token_counter_output = None
        self._unknown_external_source = None
        self._language_detection = None
        self._prompt_injection = None
        self._toxicity_rule_config_input = None
        self._toxicity_rule_config_output = None
        self._code_detection = None
        self.discriminator = None
        if off_topic is not None:
            self.off_topic = off_topic
        if pii_detection_input is not None:
            self.pii_detection_input = pii_detection_input
        if pii_detection_output is not None:
            self.pii_detection_output = pii_detection_output
        if token_counter_input is not None:
            self.token_counter_input = token_counter_input
        if token_counter_output is not None:
            self.token_counter_output = token_counter_output
        if unknown_external_source is not None:
            self.unknown_external_source = unknown_external_source
        if language_detection is not None:
            self.language_detection = language_detection
        if prompt_injection is not None:
            self.prompt_injection = prompt_injection
        if toxicity_rule_config_input is not None:
            self.toxicity_rule_config_input = toxicity_rule_config_input
        if toxicity_rule_config_output is not None:
            self.toxicity_rule_config_output = toxicity_rule_config_output
        if code_detection is not None:
            self.code_detection = code_detection

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


        :return: The off_topic of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallOffTopicRuleConfig
        """
        return self._off_topic

    @off_topic.setter
    def off_topic(self, off_topic):
        """Sets the off_topic of this GenerativefirewallIndividualRulesConfig.


        :param off_topic: The off_topic of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallOffTopicRuleConfig
        """

        self._off_topic = off_topic

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


        :return: The pii_detection_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallPiiDetectionRuleConfig
        """
        return self._pii_detection_input

    @pii_detection_input.setter
    def pii_detection_input(self, pii_detection_input):
        """Sets the pii_detection_input of this GenerativefirewallIndividualRulesConfig.


        :param pii_detection_input: The pii_detection_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallPiiDetectionRuleConfig
        """

        self._pii_detection_input = pii_detection_input

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


        :return: The pii_detection_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallPiiDetectionRuleConfig
        """
        return self._pii_detection_output

    @pii_detection_output.setter
    def pii_detection_output(self, pii_detection_output):
        """Sets the pii_detection_output of this GenerativefirewallIndividualRulesConfig.


        :param pii_detection_output: The pii_detection_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallPiiDetectionRuleConfig
        """

        self._pii_detection_output = pii_detection_output

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


        :return: The token_counter_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallTokenCounterRuleConfig
        """
        return self._token_counter_input

    @token_counter_input.setter
    def token_counter_input(self, token_counter_input):
        """Sets the token_counter_input of this GenerativefirewallIndividualRulesConfig.


        :param token_counter_input: The token_counter_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallTokenCounterRuleConfig
        """

        self._token_counter_input = token_counter_input

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


        :return: The token_counter_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallTokenCounterRuleConfig
        """
        return self._token_counter_output

    @token_counter_output.setter
    def token_counter_output(self, token_counter_output):
        """Sets the token_counter_output of this GenerativefirewallIndividualRulesConfig.


        :param token_counter_output: The token_counter_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallTokenCounterRuleConfig
        """

        self._token_counter_output = token_counter_output

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


        :return: The unknown_external_source of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallUnknownExternalSourceRuleConfig
        """
        return self._unknown_external_source

    @unknown_external_source.setter
    def unknown_external_source(self, unknown_external_source):
        """Sets the unknown_external_source of this GenerativefirewallIndividualRulesConfig.


        :param unknown_external_source: The unknown_external_source of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallUnknownExternalSourceRuleConfig
        """

        self._unknown_external_source = unknown_external_source

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


        :return: The language_detection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallLanguageDetectionRuleConfig
        """
        return self._language_detection

    @language_detection.setter
    def language_detection(self, language_detection):
        """Sets the language_detection of this GenerativefirewallIndividualRulesConfig.


        :param language_detection: The language_detection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallLanguageDetectionRuleConfig
        """

        self._language_detection = language_detection

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


        :return: The prompt_injection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallPromptInjectionRuleConfig
        """
        return self._prompt_injection

    @prompt_injection.setter
    def prompt_injection(self, prompt_injection):
        """Sets the prompt_injection of this GenerativefirewallIndividualRulesConfig.


        :param prompt_injection: The prompt_injection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallPromptInjectionRuleConfig
        """

        self._prompt_injection = prompt_injection

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


        :return: The toxicity_rule_config_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallToxicityRuleConfig
        """
        return self._toxicity_rule_config_input

    @toxicity_rule_config_input.setter
    def toxicity_rule_config_input(self, toxicity_rule_config_input):
        """Sets the toxicity_rule_config_input of this GenerativefirewallIndividualRulesConfig.


        :param toxicity_rule_config_input: The toxicity_rule_config_input of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallToxicityRuleConfig
        """

        self._toxicity_rule_config_input = toxicity_rule_config_input

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


        :return: The toxicity_rule_config_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallToxicityRuleConfig
        """
        return self._toxicity_rule_config_output

    @toxicity_rule_config_output.setter
    def toxicity_rule_config_output(self, toxicity_rule_config_output):
        """Sets the toxicity_rule_config_output of this GenerativefirewallIndividualRulesConfig.


        :param toxicity_rule_config_output: The toxicity_rule_config_output of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallToxicityRuleConfig
        """

        self._toxicity_rule_config_output = toxicity_rule_config_output

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


        :return: The code_detection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :rtype: GenerativefirewallCodeDetectionRuleConfig
        """
        return self._code_detection

    @code_detection.setter
    def code_detection(self, code_detection):
        """Sets the code_detection of this GenerativefirewallIndividualRulesConfig.


        :param code_detection: The code_detection of this GenerativefirewallIndividualRulesConfig.  # noqa: E501
        :type: GenerativefirewallCodeDetectionRuleConfig
        """

        self._code_detection = code_detection

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

        return self.__dict__ == other.__dict__

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