# 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 TopicSchemaTerm(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 = {
        'for_every_device': 'TopicSchemaForeverydevice',
        'for_every_network_group': 'TopicSchemaForeverynetworkgroup',
        'get_dependencies_from_cache': 'TopicSchemaGetdependenciesfromcache',
        'locate_resource': 'list[TopicSchemaLocateresource]',
        'next': 'bool',
        'term_name': 'str',
        'user_defined_function': 'TopicSchemaUserdefinedfunction',
        'with_capture_group': 'list[TopicSchemaWithcapturegroup]'
    }

    attribute_map = {
        'for_every_device': 'for-every-device',
        'for_every_network_group': 'for-every-network-group',
        'get_dependencies_from_cache': 'get-dependencies-from-cache',
        'locate_resource': 'locate-resource',
        'next': 'next',
        'term_name': 'term-name',
        'user_defined_function': 'user-defined-function',
        'with_capture_group': 'with-capture-group'
    }

    def __init__(self, for_every_device=None, for_every_network_group=None, get_dependencies_from_cache=None, locate_resource=None, next=None, term_name=None, user_defined_function=None, with_capture_group=None):  # noqa: E501
        """TopicSchemaTerm - a model defined in Swagger"""  # noqa: E501

        self._for_every_device = None
        self._for_every_network_group = None
        self._get_dependencies_from_cache = None
        self._locate_resource = None
        self._next = None
        self._term_name = None
        self._user_defined_function = None
        self._with_capture_group = None
        self.discriminator = None

        if for_every_device is not None:
            self.for_every_device = for_every_device
        if for_every_network_group is not None:
            self.for_every_network_group = for_every_network_group
        if get_dependencies_from_cache is not None:
            self.get_dependencies_from_cache = get_dependencies_from_cache
        if locate_resource is not None:
            self.locate_resource = locate_resource
        if next is not None:
            self.next = next
        self.term_name = term_name
        if user_defined_function is not None:
            self.user_defined_function = user_defined_function
        if with_capture_group is not None:
            self.with_capture_group = with_capture_group

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


        :return: The for_every_device of this TopicSchemaTerm.  # noqa: E501
        :rtype: TopicSchemaForeverydevice
        """
        return self._for_every_device

    @for_every_device.setter
    def for_every_device(self, for_every_device):
        """Sets the for_every_device of this TopicSchemaTerm.


        :param for_every_device: The for_every_device of this TopicSchemaTerm.  # noqa: E501
        :type: TopicSchemaForeverydevice
        """

        self._for_every_device = for_every_device

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


        :return: The for_every_network_group of this TopicSchemaTerm.  # noqa: E501
        :rtype: TopicSchemaForeverynetworkgroup
        """
        return self._for_every_network_group

    @for_every_network_group.setter
    def for_every_network_group(self, for_every_network_group):
        """Sets the for_every_network_group of this TopicSchemaTerm.


        :param for_every_network_group: The for_every_network_group of this TopicSchemaTerm.  # noqa: E501
        :type: TopicSchemaForeverynetworkgroup
        """

        self._for_every_network_group = for_every_network_group

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


        :return: The get_dependencies_from_cache of this TopicSchemaTerm.  # noqa: E501
        :rtype: TopicSchemaGetdependenciesfromcache
        """
        return self._get_dependencies_from_cache

    @get_dependencies_from_cache.setter
    def get_dependencies_from_cache(self, get_dependencies_from_cache):
        """Sets the get_dependencies_from_cache of this TopicSchemaTerm.


        :param get_dependencies_from_cache: The get_dependencies_from_cache of this TopicSchemaTerm.  # noqa: E501
        :type: TopicSchemaGetdependenciesfromcache
        """

        self._get_dependencies_from_cache = get_dependencies_from_cache

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


        :return: The locate_resource of this TopicSchemaTerm.  # noqa: E501
        :rtype: list[TopicSchemaLocateresource]
        """
        return self._locate_resource

    @locate_resource.setter
    def locate_resource(self, locate_resource):
        """Sets the locate_resource of this TopicSchemaTerm.


        :param locate_resource: The locate_resource of this TopicSchemaTerm.  # noqa: E501
        :type: list[TopicSchemaLocateresource]
        """

        self._locate_resource = locate_resource

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

        Continue evaluating next term  # noqa: E501

        :return: The next of this TopicSchemaTerm.  # noqa: E501
        :rtype: bool
        """
        return self._next

    @next.setter
    def next(self, next):
        """Sets the next of this TopicSchemaTerm.

        Continue evaluating next term  # noqa: E501

        :param next: The next of this TopicSchemaTerm.  # noqa: E501
        :type: bool
        """

        self._next = next

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

        Term name. Should be of pattern [a-zA-Z][a-zA-Z0-9-]*  # noqa: E501

        :return: The term_name of this TopicSchemaTerm.  # noqa: E501
        :rtype: str
        """
        return self._term_name

    @term_name.setter
    def term_name(self, term_name):
        """Sets the term_name of this TopicSchemaTerm.

        Term name. Should be of pattern [a-zA-Z][a-zA-Z0-9-]*  # noqa: E501

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

        self._term_name = term_name

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


        :return: The user_defined_function of this TopicSchemaTerm.  # noqa: E501
        :rtype: TopicSchemaUserdefinedfunction
        """
        return self._user_defined_function

    @user_defined_function.setter
    def user_defined_function(self, user_defined_function):
        """Sets the user_defined_function of this TopicSchemaTerm.


        :param user_defined_function: The user_defined_function of this TopicSchemaTerm.  # noqa: E501
        :type: TopicSchemaUserdefinedfunction
        """

        self._user_defined_function = user_defined_function

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


        :return: The with_capture_group of this TopicSchemaTerm.  # 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 TopicSchemaTerm.


        :param with_capture_group: The with_capture_group of this TopicSchemaTerm.  # 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(TopicSchemaTerm, 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, TopicSchemaTerm):
            return False

        return self.__dict__ == other.__dict__

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