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

from pprint import pformat
from six import iteritems
import re


class ItemSearchInputV1(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 = {
        'asset': 'str',
        'filters': 'list[str]',
        'include_properties': 'list[str]',
        'limit': 'int',
        'offset': 'int',
        'order_by_fields': 'list[str]',
        'scope': 'list[str]',
        'types': 'list[str]'
    }

    attribute_map = {
        'asset': 'asset',
        'filters': 'filters',
        'include_properties': 'includeProperties',
        'limit': 'limit',
        'offset': 'offset',
        'order_by_fields': 'orderByFields',
        'scope': 'scope',
        'types': 'types'
    }

    def __init__(self, asset=None, filters=None, include_properties=None, limit=40, offset=0, order_by_fields=None, scope=None, types=None):
        """
        ItemSearchInputV1 - a model defined in Swagger
        """

        self._asset = None
        self._filters = None
        self._include_properties = None
        self._limit = None
        self._offset = None
        self._order_by_fields = None
        self._scope = None
        self._types = None

        if asset is not None:
          self.asset = asset
        if filters is not None:
          self.filters = filters
        if include_properties is not None:
          self.include_properties = include_properties
        if limit is not None:
          self.limit = limit
        if offset is not None:
          self.offset = offset
        if order_by_fields is not None:
          self.order_by_fields = order_by_fields
        if scope is not None:
          self.scope = scope
        if types is not None:
          self.types = types

    @property
    def asset(self):
        """
        Gets the asset of this ItemSearchInputV1.
        An ID that limits the results to items which are in the tree below the Asset referenced by the ID.

        :return: The asset of this ItemSearchInputV1.
        :rtype: str
        """
        return self._asset

    @asset.setter
    def asset(self, asset):
        """
        Sets the asset of this ItemSearchInputV1.
        An ID that limits the results to items which are in the tree below the Asset referenced by the ID.

        :param asset: The asset of this ItemSearchInputV1.
        :type: str
        """

        self._asset = asset

    @property
    def filters(self):
        """
        Gets the filters of this ItemSearchInputV1.
        A list of item filters to reduce the result set. To logical AND multiple filters, use <b>\"filter1 && filter2</b>\" on a single line. To logical OR multiple filters, put each onto a new line. Filters can include any of the following options:<br><b>Empty</b>: returns the first ceiling number of items<br><b>\"value\"</b>: name or description of the item contains the case-insensitive value<br><b>\"field==value\"</b>: specified field exactly matches the case-sensitive value or regex<br><b>\"field~=value\"</b>: specified field contains the case-insensitive value or case-sensitive regex<br>To search for all items in the desired scope you may also use \"\\*\" character as filter.<br><b>Example:</b> Find items where (name or description contains case-insensitive \"bulb\" AND description contains case-insensitive \"area a\") OR (items hosted by datasource \"Example Data\" where name exactly matches the regex \".\\*[ABC]_Temperature\")<br><b>bulb && Description~=area a</b><br><b>Datasource ID==Example Data && Name==/.\\*[ABC]_Temperature/</b><br>To allow items with the 'unsearchable' property to be returned, include <b>\"@includeUnsearchable\"</b> on its own line<br>To exclude globally scoped items when using the \"scope\" filter include <b>\"@excludeGloballyScoped\"</b> on its own line. own line. Use a type filter with only one item type for the best performance. Some combinations of item types are not allowed and must be split into separate searches.

        :return: The filters of this ItemSearchInputV1.
        :rtype: list[str]
        """
        return self._filters

    @filters.setter
    def filters(self, filters):
        """
        Sets the filters of this ItemSearchInputV1.
        A list of item filters to reduce the result set. To logical AND multiple filters, use <b>\"filter1 && filter2</b>\" on a single line. To logical OR multiple filters, put each onto a new line. Filters can include any of the following options:<br><b>Empty</b>: returns the first ceiling number of items<br><b>\"value\"</b>: name or description of the item contains the case-insensitive value<br><b>\"field==value\"</b>: specified field exactly matches the case-sensitive value or regex<br><b>\"field~=value\"</b>: specified field contains the case-insensitive value or case-sensitive regex<br>To search for all items in the desired scope you may also use \"\\*\" character as filter.<br><b>Example:</b> Find items where (name or description contains case-insensitive \"bulb\" AND description contains case-insensitive \"area a\") OR (items hosted by datasource \"Example Data\" where name exactly matches the regex \".\\*[ABC]_Temperature\")<br><b>bulb && Description~=area a</b><br><b>Datasource ID==Example Data && Name==/.\\*[ABC]_Temperature/</b><br>To allow items with the 'unsearchable' property to be returned, include <b>\"@includeUnsearchable\"</b> on its own line<br>To exclude globally scoped items when using the \"scope\" filter include <b>\"@excludeGloballyScoped\"</b> on its own line. own line. Use a type filter with only one item type for the best performance. Some combinations of item types are not allowed and must be split into separate searches.

        :param filters: The filters of this ItemSearchInputV1.
        :type: list[str]
        """

        self._filters = filters

    @property
    def include_properties(self):
        """
        Gets the include_properties of this ItemSearchInputV1.
        A list of one or more case-sensitive item properties to include in every item this search finds. Use a single entry set to <b>\"@allProperties\"</b> to specify that all item properties should be returned. Specified properties not present for an item are simply omitted and do not cause errors.

        :return: The include_properties of this ItemSearchInputV1.
        :rtype: list[str]
        """
        return self._include_properties

    @include_properties.setter
    def include_properties(self, include_properties):
        """
        Sets the include_properties of this ItemSearchInputV1.
        A list of one or more case-sensitive item properties to include in every item this search finds. Use a single entry set to <b>\"@allProperties\"</b> to specify that all item properties should be returned. Specified properties not present for an item are simply omitted and do not cause errors.

        :param include_properties: The include_properties of this ItemSearchInputV1.
        :type: list[str]
        """

        self._include_properties = include_properties

    @property
    def limit(self):
        """
        Gets the limit of this ItemSearchInputV1.
        The pagination limit, the total number of collection items that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned.

        :return: The limit of this ItemSearchInputV1.
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """
        Sets the limit of this ItemSearchInputV1.
        The pagination limit, the total number of collection items that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned.

        :param limit: The limit of this ItemSearchInputV1.
        :type: int
        """

        self._limit = limit

    @property
    def offset(self):
        """
        Gets the offset of this ItemSearchInputV1.
        The pagination offset, the index of the first collection item that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned.

        :return: The offset of this ItemSearchInputV1.
        :rtype: int
        """
        return self._offset

    @offset.setter
    def offset(self, offset):
        """
        Sets the offset of this ItemSearchInputV1.
        The pagination offset, the index of the first collection item that will be returned in this page of results. When using limit or offset values to query different item subsets it is important to sort the results using orderBy. Otherwise inconsistent results may be returned.

        :param offset: The offset of this ItemSearchInputV1.
        :type: int
        """

        self._offset = offset

    @property
    def order_by_fields(self):
        """
        Gets the order_by_fields of this ItemSearchInputV1.
        An optional list of one or more fields used to sort the results.

        :return: The order_by_fields of this ItemSearchInputV1.
        :rtype: list[str]
        """
        return self._order_by_fields

    @order_by_fields.setter
    def order_by_fields(self, order_by_fields):
        """
        Sets the order_by_fields of this ItemSearchInputV1.
        An optional list of one or more fields used to sort the results.

        :param order_by_fields: The order_by_fields of this ItemSearchInputV1.
        :type: list[str]
        """

        self._order_by_fields = order_by_fields

    @property
    def scope(self):
        """
        Gets the scope of this ItemSearchInputV1.
        IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded

        :return: The scope of this ItemSearchInputV1.
        :rtype: list[str]
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """
        Sets the scope of this ItemSearchInputV1.
        IDs that limit the results to those which are in the global scope or are scoped to the items referenced by the IDs. <br>The following item types can act as a scope: <b>Workbook</b><br>If the scope is set to the Empty GUID then the scoped items are excluded

        :param scope: The scope of this ItemSearchInputV1.
        :type: list[str]
        """

        self._scope = scope

    @property
    def types(self):
        """
        Gets the types of this ItemSearchInputV1.
        A list of one or more case-sensitive item types which will restrict results to only those items that exactly match, or are children of, one of the specified types. If no types are provided then items of any type are returned

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

    @types.setter
    def types(self, types):
        """
        Sets the types of this ItemSearchInputV1.
        A list of one or more case-sensitive item types which will restrict results to only those items that exactly match, or are children of, one of the specified types. If no types are provided then items of any type are returned

        :param types: The types of this ItemSearchInputV1.
        :type: list[str]
        """

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

        return self.__dict__ == other.__dict__

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