# 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.58.1-v202509300326-CD
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from pprint import pformat
from six import iteritems
import re


class ColumnRuleTextExtractorInputV1(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': 'int',
        'regex': 'str'
    }

    attribute_map = {
        'column_index': 'columnIndex',
        'regex': 'regex'
    }

    def __init__(self, column_index=None, regex=None):
        """
        ColumnRuleTextExtractorInputV1 - a model defined in Swagger
        """

        self._column_index = None
        self._regex = None

        if column_index is not None:
          self.column_index = column_index
        if regex is not None:
          self.regex = regex

    @property
    def column_index(self):
        """
        Gets the column_index of this ColumnRuleTextExtractorInputV1.
        The index of the column that references the string to extract information from. The column index is 1-based

        :return: The column_index of this ColumnRuleTextExtractorInputV1.
        :rtype: int
        """
        return self._column_index

    @column_index.setter
    def column_index(self, column_index):
        """
        Sets the column_index of this ColumnRuleTextExtractorInputV1.
        The index of the column that references the string to extract information from. The column index is 1-based

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

        self._column_index = column_index

    @property
    def regex(self):
        """
        Gets the regex of this ColumnRuleTextExtractorInputV1.
        The regular expression to apply to the column to extract information from. If the regular expression has no capture groups, () are added around the entire string to form a capturegroup including everything in the passed in string. Only a single capture group is supported.

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

    @regex.setter
    def regex(self, regex):
        """
        Sets the regex of this ColumnRuleTextExtractorInputV1.
        The regular expression to apply to the column to extract information from. If the regular expression has no capture groups, () are added around the entire string to form a capturegroup including everything in the passed in string. Only a single capture group is supported.

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

        self._regex = regex

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

        return self.__dict__ == other.__dict__

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