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

from pprint import pformat
from six import iteritems
import re


class PropertySearchV1(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_id': 'str',
        'folder_id': 'str',
        'is_include': 'bool',
        'predicates': 'list[PropertyFilterInputV1]',
        'search_order': 'int',
        'search_type': 'str',
        'types': 'list[str]'
    }

    attribute_map = {
        'ancestor_id': 'ancestorId',
        'folder_id': 'folderId',
        'is_include': 'isInclude',
        'predicates': 'predicates',
        'search_order': 'searchOrder',
        'search_type': 'searchType',
        'types': 'types'
    }

    def __init__(self, ancestor_id=None, folder_id=None, is_include=None, predicates=None, search_order=None, search_type=None, types=None):
        """
        PropertySearchV1 - a model defined in Swagger
        """

        self._ancestor_id = None
        self._folder_id = None
        self._is_include = None
        self._predicates = None
        self._search_order = None
        self._search_type = None
        self._types = None

        if ancestor_id is not None:
          self.ancestor_id = ancestor_id
        if folder_id is not None:
          self.folder_id = folder_id
        if is_include is not None:
          self.is_include = is_include
        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
        if types is not None:
          self.types = types

    @property
    def ancestor_id(self):
        """
        Gets the ancestor_id of this PropertySearchV1.
        If provided, only search for items that are descendants of this asset

        :return: The ancestor_id of this PropertySearchV1.
        :rtype: str
        """
        return self._ancestor_id

    @ancestor_id.setter
    def ancestor_id(self, ancestor_id):
        """
        Sets the ancestor_id of this PropertySearchV1.
        If provided, only search for items that are descendants of this asset

        :param ancestor_id: The ancestor_id of this PropertySearchV1.
        :type: str
        """

        self._ancestor_id = ancestor_id

    @property
    def folder_id(self):
        """
        Gets the folder_id of this PropertySearchV1.
        If provided, only search for items that are scoped to the workbooks contained in this folder

        :return: The folder_id of this PropertySearchV1.
        :rtype: str
        """
        return self._folder_id

    @folder_id.setter
    def folder_id(self, folder_id):
        """
        Sets the folder_id of this PropertySearchV1.
        If provided, only search for items that are scoped to the workbooks contained in this folder

        :param folder_id: The folder_id of this PropertySearchV1.
        :type: str
        """

        self._folder_id = folder_id

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

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

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

        :param is_include: The is_include of this PropertySearchV1.
        :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 predicates(self):
        """
        Gets the predicates of this PropertySearchV1.
        A list of predicates by which to filter the items

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

    @predicates.setter
    def predicates(self, predicates):
        """
        Sets the predicates of this PropertySearchV1.
        A list of predicates by which to filter the items

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

        self._predicates = predicates

    @property
    def search_order(self):
        """
        Gets the search_order of this PropertySearchV1.
        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 PropertySearchV1.
        :rtype: int
        """
        return self._search_order

    @search_order.setter
    def search_order(self, search_order):
        """
        Sets the search_order of this PropertySearchV1.
        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 PropertySearchV1.
        :type: int
        """

        self._search_order = search_order

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

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

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

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

        self._search_type = search_type

    @property
    def types(self):
        """
        Gets the types of this PropertySearchV1.
        A list of types by which to filter the items

        :return: The types of this PropertySearchV1.
        :rtype: list[str]
        """
        return self._types

    @types.setter
    def types(self, types):
        """
        Sets the types of this PropertySearchV1.
        A list of types by which to filter the items

        :param types: The types of this PropertySearchV1.
        :type: list[str]
        """
        if types is None:
            raise ValueError("Invalid value for `types`, must not be `None`")

        self._types = types

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

        return self.__dict__ == other.__dict__

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