# coding: utf-8

"""
    Seeq REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

from pprint import pformat
from six import iteritems
import re


class ColumnRuleTextReplacementInputV1(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 = {
        'column_index_replacement': 'int',
        'column_index_source_text': 'int',
        'regex': 'str',
        'remove_non_matches': 'bool',
        'replacement': 'str'
    }

    attribute_map = {
        'column_index_replacement': 'columnIndexReplacement',
        'column_index_source_text': 'columnIndexSourceText',
        'regex': 'regex',
        'remove_non_matches': 'removeNonMatches',
        'replacement': 'replacement'
    }

    def __init__(self, column_index_replacement=None, column_index_source_text=None, regex=None, remove_non_matches=None, replacement=None):
        """
        ColumnRuleTextReplacementInputV1 - a model defined in Swagger
        """

        self._column_index_replacement = None
        self._column_index_source_text = None
        self._regex = None
        self._remove_non_matches = None
        self._replacement = None

        if column_index_replacement is not None:
          self.column_index_replacement = column_index_replacement
        if column_index_source_text is not None:
          self.column_index_source_text = column_index_source_text
        if regex is not None:
          self.regex = regex
        if remove_non_matches is not None:
          self.remove_non_matches = remove_non_matches
        if replacement is not None:
          self.replacement = replacement

    @property
    def column_index_replacement(self):
        """
        Gets the column_index_replacement of this ColumnRuleTextReplacementInputV1.
        The index of the column that contains the value to replace regex matches with. This will take priority over the optional replacement text. The column index is 1-based.

        :return: The column_index_replacement of this ColumnRuleTextReplacementInputV1.
        :rtype: int
        """
        return self._column_index_replacement

    @column_index_replacement.setter
    def column_index_replacement(self, column_index_replacement):
        """
        Sets the column_index_replacement of this ColumnRuleTextReplacementInputV1.
        The index of the column that contains the value to replace regex matches with. This will take priority over the optional replacement text. The column index is 1-based.

        :param column_index_replacement: The column_index_replacement of this ColumnRuleTextReplacementInputV1.
        :type: int
        """

        self._column_index_replacement = column_index_replacement

    @property
    def column_index_source_text(self):
        """
        Gets the column_index_source_text of this ColumnRuleTextReplacementInputV1.
        The index of the column that contains the source text to apply regex replacement to. The column index is 1-based.

        :return: The column_index_source_text of this ColumnRuleTextReplacementInputV1.
        :rtype: int
        """
        return self._column_index_source_text

    @column_index_source_text.setter
    def column_index_source_text(self, column_index_source_text):
        """
        Sets the column_index_source_text of this ColumnRuleTextReplacementInputV1.
        The index of the column that contains the source text to apply regex replacement to. The column index is 1-based.

        :param column_index_source_text: The column_index_source_text of this ColumnRuleTextReplacementInputV1.
        :type: int
        """
        if column_index_source_text is None:
            raise ValueError("Invalid value for `column_index_source_text`, must not be `None`")

        self._column_index_source_text = column_index_source_text

    @property
    def regex(self):
        """
        Gets the regex of this ColumnRuleTextReplacementInputV1.
        The regular expression to apply to the column to that is the source for the string conversionThe matches to the regular expression will be replaced with the string value of the column or replacement text that is provided.

        :return: The regex of this ColumnRuleTextReplacementInputV1.
        :rtype: str
        """
        return self._regex

    @regex.setter
    def regex(self, regex):
        """
        Sets the regex of this ColumnRuleTextReplacementInputV1.
        The regular expression to apply to the column to that is the source for the string conversionThe matches to the regular expression will be replaced with the string value of the column or replacement text that is provided.

        :param regex: The regex of this ColumnRuleTextReplacementInputV1.
        :type: str
        """
        if regex is None:
            raise ValueError("Invalid value for `regex`, must not be `None`")

        self._regex = regex

    @property
    def remove_non_matches(self):
        """
        Gets the remove_non_matches of this ColumnRuleTextReplacementInputV1.
        Boolean indicator that non-matches should be removed from the output. If true, the rule will return null if the source string does not match the regex pattern. If false, the source string will be returned unmodified if it does not match the regex pattern.

        :return: The remove_non_matches of this ColumnRuleTextReplacementInputV1.
        :rtype: bool
        """
        return self._remove_non_matches

    @remove_non_matches.setter
    def remove_non_matches(self, remove_non_matches):
        """
        Sets the remove_non_matches of this ColumnRuleTextReplacementInputV1.
        Boolean indicator that non-matches should be removed from the output. If true, the rule will return null if the source string does not match the regex pattern. If false, the source string will be returned unmodified if it does not match the regex pattern.

        :param remove_non_matches: The remove_non_matches of this ColumnRuleTextReplacementInputV1.
        :type: bool
        """
        if remove_non_matches is None:
            raise ValueError("Invalid value for `remove_non_matches`, must not be `None`")

        self._remove_non_matches = remove_non_matches

    @property
    def replacement(self):
        """
        Gets the replacement of this ColumnRuleTextReplacementInputV1.
        Constant replacement text to apply to any regex matches against the source string.  A column replacement value if it exists will take precedence over this.

        :return: The replacement of this ColumnRuleTextReplacementInputV1.
        :rtype: str
        """
        return self._replacement

    @replacement.setter
    def replacement(self, replacement):
        """
        Sets the replacement of this ColumnRuleTextReplacementInputV1.
        Constant replacement text to apply to any regex matches against the source string.  A column replacement value if it exists will take precedence over this.

        :param replacement: The replacement of this ColumnRuleTextReplacementInputV1.
        :type: str
        """

        self._replacement = replacement

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

        return self.__dict__ == other.__dict__

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