# coding: utf-8

"""
    Paragon Insights APIs

    API interface for PI application  # noqa: E501

    OpenAPI spec version: 4.0.0
    Contact: healthbot-feedback@juniper.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class TopicSchemaWithcapturegroup(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 = {
        'capture_group_name': 'str',
        'expression': 'str',
        'field_name': 'str',
        'ignore_case': 'bool'
    }

    attribute_map = {
        'capture_group_name': 'capture-group-name',
        'expression': 'expression',
        'field_name': 'field-name',
        'ignore_case': 'ignore-case'
    }

    def __init__(self, capture_group_name=None, expression=None, field_name=None, ignore_case=None):  # noqa: E501
        """TopicSchemaWithcapturegroup - a model defined in Swagger"""  # noqa: E501

        self._capture_group_name = None
        self._expression = None
        self._field_name = None
        self._ignore_case = None
        self.discriminator = None

        self.capture_group_name = capture_group_name
        if expression is not None:
            self.expression = expression
        if field_name is not None:
            self.field_name = field_name
        if ignore_case is not None:
            self.ignore_case = ignore_case

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

        Name of the capture group. Should be of pattern [a-zA-Z][a-zA-Z0-9-]*  # noqa: E501

        :return: The capture_group_name of this TopicSchemaWithcapturegroup.  # noqa: E501
        :rtype: str
        """
        return self._capture_group_name

    @capture_group_name.setter
    def capture_group_name(self, capture_group_name):
        """Sets the capture_group_name of this TopicSchemaWithcapturegroup.

        Name of the capture group. Should be of pattern [a-zA-Z][a-zA-Z0-9-]*  # noqa: E501

        :param capture_group_name: The capture_group_name of this TopicSchemaWithcapturegroup.  # noqa: E501
        :type: str
        """
        if capture_group_name is None:
            raise ValueError("Invalid value for `capture_group_name`, must not be `None`")  # noqa: E501
        if capture_group_name is not None and len(capture_group_name) > 64:
            raise ValueError("Invalid value for `capture_group_name`, length must be less than or equal to `64`")  # noqa: E501
        if capture_group_name is not None and len(capture_group_name) < 1:
            raise ValueError("Invalid value for `capture_group_name`, length must be greater than or equal to `1`")  # noqa: E501
        if capture_group_name is not None and not re.search(r'^[a-zA-Z][a-zA-Z0-9-]*$', capture_group_name):  # noqa: E501
            raise ValueError(r"Invalid value for `capture_group_name`, must be a follow pattern or equal to `/^[a-zA-Z][a-zA-Z0-9-]*$/`")  # noqa: E501

        self._capture_group_name = capture_group_name

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

        Regular expression to extract sub strings  # noqa: E501

        :return: The expression of this TopicSchemaWithcapturegroup.  # noqa: E501
        :rtype: str
        """
        return self._expression

    @expression.setter
    def expression(self, expression):
        """Sets the expression of this TopicSchemaWithcapturegroup.

        Regular expression to extract sub strings  # noqa: E501

        :param expression: The expression of this TopicSchemaWithcapturegroup.  # noqa: E501
        :type: str
        """

        self._expression = expression

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

        Name of the local or depending resource field name  # noqa: E501

        :return: The field_name of this TopicSchemaWithcapturegroup.  # noqa: E501
        :rtype: str
        """
        return self._field_name

    @field_name.setter
    def field_name(self, field_name):
        """Sets the field_name of this TopicSchemaWithcapturegroup.

        Name of the local or depending resource field name  # noqa: E501

        :param field_name: The field_name of this TopicSchemaWithcapturegroup.  # noqa: E501
        :type: str
        """

        self._field_name = field_name

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

        If true, regex match with be case insensitive  # noqa: E501

        :return: The ignore_case of this TopicSchemaWithcapturegroup.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_case

    @ignore_case.setter
    def ignore_case(self, ignore_case):
        """Sets the ignore_case of this TopicSchemaWithcapturegroup.

        If true, regex match with be case insensitive  # noqa: E501

        :param ignore_case: The ignore_case of this TopicSchemaWithcapturegroup.  # noqa: E501
        :type: bool
        """

        self._ignore_case = ignore_case

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

        return self.__dict__ == other.__dict__

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