# coding: utf-8

"""
    Robust Intelligence REST API

    API methods for Robust Intelligence. Users must authenticate using the `rime-api-key` header.  # 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 GenerativefirewallFlaggedSubstring(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 = {
        'request_body_component': 'FlaggedSubstringRequestBodyComponent',
        'context_index': 'str',
        'substring_start_index': 'str',
        'substring_end_index': 'str'
    }

    attribute_map = {
        'request_body_component': 'requestBodyComponent',
        'context_index': 'contextIndex',
        'substring_start_index': 'substringStartIndex',
        'substring_end_index': 'substringEndIndex'
    }

    def __init__(self, request_body_component=None, context_index=None, substring_start_index=None, substring_end_index=None):  # noqa: E501
        """GenerativefirewallFlaggedSubstring - a model defined in Swagger"""  # noqa: E501
        self._request_body_component = None
        self._context_index = None
        self._substring_start_index = None
        self._substring_end_index = None
        self.discriminator = None
        if request_body_component is not None:
            self.request_body_component = request_body_component
        if context_index is not None:
            self.context_index = context_index
        if substring_start_index is not None:
            self.substring_start_index = substring_start_index
        if substring_end_index is not None:
            self.substring_end_index = substring_end_index

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


        :return: The request_body_component of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :rtype: FlaggedSubstringRequestBodyComponent
        """
        return self._request_body_component

    @request_body_component.setter
    def request_body_component(self, request_body_component):
        """Sets the request_body_component of this GenerativefirewallFlaggedSubstring.


        :param request_body_component: The request_body_component of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :type: FlaggedSubstringRequestBodyComponent
        """

        self._request_body_component = request_body_component

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

        Context index denotes which of the texts in the contexts provided in the validate request contains the substring.  # noqa: E501

        :return: The context_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :rtype: str
        """
        return self._context_index

    @context_index.setter
    def context_index(self, context_index):
        """Sets the context_index of this GenerativefirewallFlaggedSubstring.

        Context index denotes which of the texts in the contexts provided in the validate request contains the substring.  # noqa: E501

        :param context_index: The context_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :type: str
        """

        self._context_index = context_index

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


        :return: The substring_start_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :rtype: str
        """
        return self._substring_start_index

    @substring_start_index.setter
    def substring_start_index(self, substring_start_index):
        """Sets the substring_start_index of this GenerativefirewallFlaggedSubstring.


        :param substring_start_index: The substring_start_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :type: str
        """

        self._substring_start_index = substring_start_index

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


        :return: The substring_end_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :rtype: str
        """
        return self._substring_end_index

    @substring_end_index.setter
    def substring_end_index(self, substring_end_index):
        """Sets the substring_end_index of this GenerativefirewallFlaggedSubstring.


        :param substring_end_index: The substring_end_index of this GenerativefirewallFlaggedSubstring.  # noqa: E501
        :type: str
        """

        self._substring_end_index = substring_end_index

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

        return self.__dict__ == other.__dict__

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