# coding: utf-8

"""
    Canopy.Api

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from canopy.openapi.configuration import Configuration


class ListFilter(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'items_per_page': 'int',
        'continuation_token': 'str',
        'order_by_custom_property': 'object',
        'order_by_property': 'OrderByProperty',
        'order_by_descending': 'bool',
        'filter_name': 'str',
        'query': 'ListFilterQuery',
        'include_if_delete_requested': 'bool',
        'include_if_has_parent_worksheet': 'bool'
    }

    attribute_map = {
        'items_per_page': 'itemsPerPage',
        'continuation_token': 'continuationToken',
        'order_by_custom_property': 'orderByCustomProperty',
        'order_by_property': 'orderByProperty',
        'order_by_descending': 'orderByDescending',
        'filter_name': 'filterName',
        'query': 'query',
        'include_if_delete_requested': 'includeIfDeleteRequested',
        'include_if_has_parent_worksheet': 'includeIfHasParentWorksheet'
    }

    def __init__(self, items_per_page=None, continuation_token=None, order_by_custom_property=None, order_by_property=None, order_by_descending=None, filter_name=None, query=None, include_if_delete_requested=None, include_if_has_parent_worksheet=None, local_vars_configuration=None):  # noqa: E501
        """ListFilter - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._items_per_page = None
        self._continuation_token = None
        self._order_by_custom_property = None
        self._order_by_property = None
        self._order_by_descending = None
        self._filter_name = None
        self._query = None
        self._include_if_delete_requested = None
        self._include_if_has_parent_worksheet = None
        self.discriminator = None

        if items_per_page is not None:
            self.items_per_page = items_per_page
        self.continuation_token = continuation_token
        self.order_by_custom_property = order_by_custom_property
        self.order_by_property = order_by_property
        if order_by_descending is not None:
            self.order_by_descending = order_by_descending
        self.filter_name = filter_name
        self.query = query
        if include_if_delete_requested is not None:
            self.include_if_delete_requested = include_if_delete_requested
        if include_if_has_parent_worksheet is not None:
            self.include_if_has_parent_worksheet = include_if_has_parent_worksheet

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


        :return: The items_per_page of this ListFilter.  # noqa: E501
        :rtype: int
        """
        return self._items_per_page

    @items_per_page.setter
    def items_per_page(self, items_per_page):
        """Sets the items_per_page of this ListFilter.


        :param items_per_page: The items_per_page of this ListFilter.  # noqa: E501
        :type items_per_page: int
        """

        self._items_per_page = items_per_page

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


        :return: The continuation_token of this ListFilter.  # noqa: E501
        :rtype: str
        """
        return self._continuation_token

    @continuation_token.setter
    def continuation_token(self, continuation_token):
        """Sets the continuation_token of this ListFilter.


        :param continuation_token: The continuation_token of this ListFilter.  # noqa: E501
        :type continuation_token: str
        """

        self._continuation_token = continuation_token

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


        :return: The order_by_custom_property of this ListFilter.  # noqa: E501
        :rtype: object
        """
        return self._order_by_custom_property

    @order_by_custom_property.setter
    def order_by_custom_property(self, order_by_custom_property):
        """Sets the order_by_custom_property of this ListFilter.


        :param order_by_custom_property: The order_by_custom_property of this ListFilter.  # noqa: E501
        :type order_by_custom_property: object
        """

        self._order_by_custom_property = order_by_custom_property

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


        :return: The order_by_property of this ListFilter.  # noqa: E501
        :rtype: OrderByProperty
        """
        return self._order_by_property

    @order_by_property.setter
    def order_by_property(self, order_by_property):
        """Sets the order_by_property of this ListFilter.


        :param order_by_property: The order_by_property of this ListFilter.  # noqa: E501
        :type order_by_property: OrderByProperty
        """

        self._order_by_property = order_by_property

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


        :return: The order_by_descending of this ListFilter.  # noqa: E501
        :rtype: bool
        """
        return self._order_by_descending

    @order_by_descending.setter
    def order_by_descending(self, order_by_descending):
        """Sets the order_by_descending of this ListFilter.


        :param order_by_descending: The order_by_descending of this ListFilter.  # noqa: E501
        :type order_by_descending: bool
        """

        self._order_by_descending = order_by_descending

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


        :return: The filter_name of this ListFilter.  # noqa: E501
        :rtype: str
        """
        return self._filter_name

    @filter_name.setter
    def filter_name(self, filter_name):
        """Sets the filter_name of this ListFilter.


        :param filter_name: The filter_name of this ListFilter.  # noqa: E501
        :type filter_name: str
        """

        self._filter_name = filter_name

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


        :return: The query of this ListFilter.  # noqa: E501
        :rtype: ListFilterQuery
        """
        return self._query

    @query.setter
    def query(self, query):
        """Sets the query of this ListFilter.


        :param query: The query of this ListFilter.  # noqa: E501
        :type query: ListFilterQuery
        """

        self._query = query

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


        :return: The include_if_delete_requested of this ListFilter.  # noqa: E501
        :rtype: bool
        """
        return self._include_if_delete_requested

    @include_if_delete_requested.setter
    def include_if_delete_requested(self, include_if_delete_requested):
        """Sets the include_if_delete_requested of this ListFilter.


        :param include_if_delete_requested: The include_if_delete_requested of this ListFilter.  # noqa: E501
        :type include_if_delete_requested: bool
        """

        self._include_if_delete_requested = include_if_delete_requested

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


        :return: The include_if_has_parent_worksheet of this ListFilter.  # noqa: E501
        :rtype: bool
        """
        return self._include_if_has_parent_worksheet

    @include_if_has_parent_worksheet.setter
    def include_if_has_parent_worksheet(self, include_if_has_parent_worksheet):
        """Sets the include_if_has_parent_worksheet of this ListFilter.


        :param include_if_has_parent_worksheet: The include_if_has_parent_worksheet of this ListFilter.  # noqa: E501
        :type include_if_has_parent_worksheet: bool
        """

        self._include_if_has_parent_worksheet = include_if_has_parent_worksheet

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ListFilter):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
