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

from pprint import pformat
from six import iteritems
import re


class HierarchySearchV1(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 = {
        'ancestor_predicates': 'list[AncestorFilterInputV1]',
        'fixed_list_predicates': 'list[FixedListFilterInputV1]',
        'hierarchy_id': 'str',
        'is_include': 'bool',
        'level': 'int',
        'predicates': 'list[PropertyFilterInputV1]',
        'search_order': 'int',
        'search_type': 'str'
    }

    attribute_map = {
        'ancestor_predicates': 'ancestorPredicates',
        'fixed_list_predicates': 'fixedListPredicates',
        'hierarchy_id': 'hierarchyId',
        'is_include': 'isInclude',
        'level': 'level',
        'predicates': 'predicates',
        'search_order': 'searchOrder',
        'search_type': 'searchType'
    }

    def __init__(self, ancestor_predicates=None, fixed_list_predicates=None, hierarchy_id=None, is_include=None, level=None, predicates=None, search_order=None, search_type=None):
        """
        HierarchySearchV1 - a model defined in Swagger
        """

        self._ancestor_predicates = None
        self._fixed_list_predicates = None
        self._hierarchy_id = None
        self._is_include = None
        self._level = None
        self._predicates = None
        self._search_order = None
        self._search_type = None

        if ancestor_predicates is not None:
          self.ancestor_predicates = ancestor_predicates
        if fixed_list_predicates is not None:
          self.fixed_list_predicates = fixed_list_predicates
        if hierarchy_id is not None:
          self.hierarchy_id = hierarchy_id
        if is_include is not None:
          self.is_include = is_include
        if level is not None:
          self.level = level
        if predicates is not None:
          self.predicates = predicates
        if search_order is not None:
          self.search_order = search_order
        if search_type is not None:
          self.search_type = search_type

    @property
    def ancestor_predicates(self):
        """
        Gets the ancestor_predicates of this HierarchySearchV1.
        A list of ancestor predicates by which to filter the items. Can include value filters and filters using a hierarchy's source table columns to specify an ancestor. Each predicate specifies property filters for an ancestor and an optional level (1 = direct parent, 2 = grandparent, etc.).

        :return: The ancestor_predicates of this HierarchySearchV1.
        :rtype: list[AncestorFilterInputV1]
        """
        return self._ancestor_predicates

    @ancestor_predicates.setter
    def ancestor_predicates(self, ancestor_predicates):
        """
        Sets the ancestor_predicates of this HierarchySearchV1.
        A list of ancestor predicates by which to filter the items. Can include value filters and filters using a hierarchy's source table columns to specify an ancestor. Each predicate specifies property filters for an ancestor and an optional level (1 = direct parent, 2 = grandparent, etc.).

        :param ancestor_predicates: The ancestor_predicates of this HierarchySearchV1.
        :type: list[AncestorFilterInputV1]
        """

        self._ancestor_predicates = ancestor_predicates

    @property
    def fixed_list_predicates(self):
        """
        Gets the fixed_list_predicates of this HierarchySearchV1.
        A list of predicates by which to filter the items. Can include filters on item properties and filters using a hierarchy's source table column names.

        :return: The fixed_list_predicates of this HierarchySearchV1.
        :rtype: list[FixedListFilterInputV1]
        """
        return self._fixed_list_predicates

    @fixed_list_predicates.setter
    def fixed_list_predicates(self, fixed_list_predicates):
        """
        Sets the fixed_list_predicates of this HierarchySearchV1.
        A list of predicates by which to filter the items. Can include filters on item properties and filters using a hierarchy's source table column names.

        :param fixed_list_predicates: The fixed_list_predicates of this HierarchySearchV1.
        :type: list[FixedListFilterInputV1]
        """

        self._fixed_list_predicates = fixed_list_predicates

    @property
    def hierarchy_id(self):
        """
        Gets the hierarchy_id of this HierarchySearchV1.
        A hierarchy id that will be used to find nodes for hierarchy events. This search can only be used if includeHierarchy is true in the ItemFinderInputV1.

        :return: The hierarchy_id of this HierarchySearchV1.
        :rtype: str
        """
        return self._hierarchy_id

    @hierarchy_id.setter
    def hierarchy_id(self, hierarchy_id):
        """
        Sets the hierarchy_id of this HierarchySearchV1.
        A hierarchy id that will be used to find nodes for hierarchy events. This search can only be used if includeHierarchy is true in the ItemFinderInputV1.

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

        self._hierarchy_id = hierarchy_id

    @property
    def is_include(self):
        """
        Gets the is_include of this HierarchySearchV1.
        If true the items found by this configuration will be included in the output, if false then the results will be excluded from the output (even if found by another finder configuration)

        :return: The is_include of this HierarchySearchV1.
        :rtype: bool
        """
        return self._is_include

    @is_include.setter
    def is_include(self, is_include):
        """
        Sets the is_include of this HierarchySearchV1.
        If true the items found by this configuration will be included in the output, if false then the results will be excluded from the output (even if found by another finder configuration)

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

        self._is_include = is_include

    @property
    def level(self):
        """
        Gets the level of this HierarchySearchV1.
        The level of the hierarchy use for finding hierarchy nodes.

        :return: The level of this HierarchySearchV1.
        :rtype: int
        """
        return self._level

    @level.setter
    def level(self, level):
        """
        Sets the level of this HierarchySearchV1.
        The level of the hierarchy use for finding hierarchy nodes.

        :param level: The level of this HierarchySearchV1.
        :type: int
        """

        self._level = level

    @property
    def predicates(self):
        """
        Gets the predicates of this HierarchySearchV1.
        A list of predicates by which to filter the items. Can include filters on item properties and filters using a hierarchy's source table column names.

        :return: The predicates of this HierarchySearchV1.
        :rtype: list[PropertyFilterInputV1]
        """
        return self._predicates

    @predicates.setter
    def predicates(self, predicates):
        """
        Sets the predicates of this HierarchySearchV1.
        A list of predicates by which to filter the items. Can include filters on item properties and filters using a hierarchy's source table column names.

        :param predicates: The predicates of this HierarchySearchV1.
        :type: list[PropertyFilterInputV1]
        """

        self._predicates = predicates

    @property
    def search_order(self):
        """
        Gets the search_order of this HierarchySearchV1.
        The order in which this search should be executed. When the same item appears in multiple searches, the search with the highest order value wins. If not specified, searches are ordered by their creation time (UUID).

        :return: The search_order of this HierarchySearchV1.
        :rtype: int
        """
        return self._search_order

    @search_order.setter
    def search_order(self, search_order):
        """
        Sets the search_order of this HierarchySearchV1.
        The order in which this search should be executed. When the same item appears in multiple searches, the search with the highest order value wins. If not specified, searches are ordered by their creation time (UUID).

        :param search_order: The search_order of this HierarchySearchV1.
        :type: int
        """

        self._search_order = search_order

    @property
    def search_type(self):
        """
        Gets the search_type of this HierarchySearchV1.
        The type of finder

        :return: The search_type of this HierarchySearchV1.
        :rtype: str
        """
        return self._search_type

    @search_type.setter
    def search_type(self, search_type):
        """
        Sets the search_type of this HierarchySearchV1.
        The type of finder

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

        self._search_type = search_type

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

        return self.__dict__ == other.__dict__

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