# 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 TopicSchemaDependson(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 = {
        'depends_on_multiple_instances': 'bool',
        'description': 'str',
        'resource_name': 'str',
        'term': 'list[TopicSchemaTerm]',
        'triggered_by': 'list[str]',
        'with_capture_group': 'list[TopicSchemaWithcapturegroup]'
    }

    attribute_map = {
        'depends_on_multiple_instances': 'depends-on-multiple-instances',
        'description': 'description',
        'resource_name': 'resource-name',
        'term': 'term',
        'triggered_by': 'triggered-by',
        'with_capture_group': 'with-capture-group'
    }

    def __init__(self, depends_on_multiple_instances=None, description=None, resource_name=None, term=None, triggered_by=None, with_capture_group=None):  # noqa: E501
        """TopicSchemaDependson - a model defined in Swagger"""  # noqa: E501

        self._depends_on_multiple_instances = None
        self._description = None
        self._resource_name = None
        self._term = None
        self._triggered_by = None
        self._with_capture_group = None
        self.discriminator = None

        if depends_on_multiple_instances is not None:
            self.depends_on_multiple_instances = depends_on_multiple_instances
        if description is not None:
            self.description = description
        self.resource_name = resource_name
        self.term = term
        if triggered_by is not None:
            self.triggered_by = triggered_by
        if with_capture_group is not None:
            self.with_capture_group = with_capture_group

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

        Depends on multiple instances of the depends-on resource. One to many relationship. Eg: ae interface can be dependent on multiple interfaces  # noqa: E501

        :return: The depends_on_multiple_instances of this TopicSchemaDependson.  # noqa: E501
        :rtype: bool
        """
        return self._depends_on_multiple_instances

    @depends_on_multiple_instances.setter
    def depends_on_multiple_instances(self, depends_on_multiple_instances):
        """Sets the depends_on_multiple_instances of this TopicSchemaDependson.

        Depends on multiple instances of the depends-on resource. One to many relationship. Eg: ae interface can be dependent on multiple interfaces  # noqa: E501

        :param depends_on_multiple_instances: The depends_on_multiple_instances of this TopicSchemaDependson.  # noqa: E501
        :type: bool
        """

        self._depends_on_multiple_instances = depends_on_multiple_instances

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

        Description about the dependency  # noqa: E501

        :return: The description of this TopicSchemaDependson.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TopicSchemaDependson.

        Description about the dependency  # noqa: E501

        :param description: The description of this TopicSchemaDependson.  # noqa: E501
        :type: str
        """

        self._description = description

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

        Name of dependent resource <topic-name>/<resource-name>. Should be of pattern [a-z][a-z-]*(\\.{1}[a-z0-9-]+)*/[a-z][a-z0-9-]*  # noqa: E501

        :return: The resource_name of this TopicSchemaDependson.  # noqa: E501
        :rtype: str
        """
        return self._resource_name

    @resource_name.setter
    def resource_name(self, resource_name):
        """Sets the resource_name of this TopicSchemaDependson.

        Name of dependent resource <topic-name>/<resource-name>. Should be of pattern [a-z][a-z-]*(\\.{1}[a-z0-9-]+)*/[a-z][a-z0-9-]*  # noqa: E501

        :param resource_name: The resource_name of this TopicSchemaDependson.  # noqa: E501
        :type: str
        """
        if resource_name is None:
            raise ValueError("Invalid value for `resource_name`, must not be `None`")  # noqa: E501
        if resource_name is not None and not re.search(r'^[a-z][a-z-]*(\\.{1}[a-z0-9-]+)*\/[a-z][a-z0-9-]*$', resource_name):  # noqa: E501
            raise ValueError(r"Invalid value for `resource_name`, must be a follow pattern or equal to `/^[a-z][a-z-]*(\\.{1}[a-z0-9-]+)*\/[a-z][a-z0-9-]*$/`")  # noqa: E501

        self._resource_name = resource_name

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


        :return: The term of this TopicSchemaDependson.  # noqa: E501
        :rtype: list[TopicSchemaTerm]
        """
        return self._term

    @term.setter
    def term(self, term):
        """Sets the term of this TopicSchemaDependson.


        :param term: The term of this TopicSchemaDependson.  # noqa: E501
        :type: list[TopicSchemaTerm]
        """
        if term is None:
            raise ValueError("Invalid value for `term`, must not be `None`")  # noqa: E501

        self._term = term

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


        :return: The triggered_by of this TopicSchemaDependson.  # noqa: E501
        :rtype: list[str]
        """
        return self._triggered_by

    @triggered_by.setter
    def triggered_by(self, triggered_by):
        """Sets the triggered_by of this TopicSchemaDependson.


        :param triggered_by: The triggered_by of this TopicSchemaDependson.  # noqa: E501
        :type: list[str]
        """

        self._triggered_by = triggered_by

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


        :return: The with_capture_group of this TopicSchemaDependson.  # noqa: E501
        :rtype: list[TopicSchemaWithcapturegroup]
        """
        return self._with_capture_group

    @with_capture_group.setter
    def with_capture_group(self, with_capture_group):
        """Sets the with_capture_group of this TopicSchemaDependson.


        :param with_capture_group: The with_capture_group of this TopicSchemaDependson.  # noqa: E501
        :type: list[TopicSchemaWithcapturegroup]
        """

        self._with_capture_group = with_capture_group

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

        return self.__dict__ == other.__dict__

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