# coding: utf-8

"""
    Sparks OpenAPI

    Generated documentation for the Logicdrop Sparks API and OpenAPI clients.  Logicdrop Sparks lets users build rules, analyze data, and automate documents.  Use it to make decisions faster, generate documents better, and learn from your data.  ### Documentation - [User Documentation](https://docs.logicdrop.com)  ### Modules - [Sparks Compute](https://docs.logicdrop.com/rules/introduction) - [Sparks Decision Tables](https://docs.logicdrop.com/rules/authoring-decision-tables) - [Sparks Documents](https://docs.logicdrop.com/documents/introduction)  ### Clients - [OpenAPI Clients](https://docs.logicdrop.com/development/sample-clients)  ### Security - [Authorizing API Requests](https://docs.logicdrop.com/development/authorization)   # noqa: E501

    The version of the OpenAPI document: v_VERSION_._BUILD_
    Contact: support@logicdrop.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from logicdrop.sparks.openapi.configuration import Configuration


class QuerySource(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 = {
        'properties': 'dict(str, object)',
        'parameters': 'list[QueryParameter]',
        'name': 'str',
        'source': 'str',
        'ignore_nulls': 'bool',
        'ignore_case': 'bool',
        'debug': 'bool',
        'limit': 'int',
        'exclude': 'bool',
        'expects': 'str',
        'projections': 'list[str]',
        'ordering': 'list[OrderedQueryField]',
        'criteria': 'list[CriteriaQueryFieldObject]'
    }

    attribute_map = {
        'properties': 'properties',
        'parameters': 'parameters',
        'name': 'name',
        'source': 'source',
        'ignore_nulls': 'ignoreNulls',
        'ignore_case': 'ignoreCase',
        'debug': 'debug',
        'limit': 'limit',
        'exclude': 'exclude',
        'expects': 'expects',
        'projections': 'projections',
        'ordering': 'ordering',
        'criteria': 'criteria'
    }

    def __init__(self, properties=None, parameters=None, name=None, source=None, ignore_nulls=None, ignore_case=None, debug=None, limit=None, exclude=None, expects=None, projections=None, ordering=None, criteria=None, local_vars_configuration=None):  # noqa: E501
        """QuerySource - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._properties = None
        self._parameters = None
        self._name = None
        self._source = None
        self._ignore_nulls = None
        self._ignore_case = None
        self._debug = None
        self._limit = None
        self._exclude = None
        self._expects = None
        self._projections = None
        self._ordering = None
        self._criteria = None
        self.discriminator = None

        if properties is not None:
            self.properties = properties
        if parameters is not None:
            self.parameters = parameters
        if name is not None:
            self.name = name
        if source is not None:
            self.source = source
        if ignore_nulls is not None:
            self.ignore_nulls = ignore_nulls
        if ignore_case is not None:
            self.ignore_case = ignore_case
        if debug is not None:
            self.debug = debug
        if limit is not None:
            self.limit = limit
        if exclude is not None:
            self.exclude = exclude
        if expects is not None:
            self.expects = expects
        if projections is not None:
            self.projections = projections
        if ordering is not None:
            self.ordering = ordering
        if criteria is not None:
            self.criteria = criteria

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


        :return: The properties of this QuerySource.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this QuerySource.


        :param properties: The properties of this QuerySource.  # noqa: E501
        :type: dict(str, object)
        """

        self._properties = properties

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


        :return: The parameters of this QuerySource.  # noqa: E501
        :rtype: list[QueryParameter]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """Sets the parameters of this QuerySource.


        :param parameters: The parameters of this QuerySource.  # noqa: E501
        :type: list[QueryParameter]
        """

        self._parameters = parameters

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


        :return: The name of this QuerySource.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this QuerySource.


        :param name: The name of this QuerySource.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The source of this QuerySource.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this QuerySource.


        :param source: The source of this QuerySource.  # noqa: E501
        :type: str
        """

        self._source = source

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


        :return: The ignore_nulls of this QuerySource.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_nulls

    @ignore_nulls.setter
    def ignore_nulls(self, ignore_nulls):
        """Sets the ignore_nulls of this QuerySource.


        :param ignore_nulls: The ignore_nulls of this QuerySource.  # noqa: E501
        :type: bool
        """

        self._ignore_nulls = ignore_nulls

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


        :return: The ignore_case of this QuerySource.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_case

    @ignore_case.setter
    def ignore_case(self, ignore_case):
        """Sets the ignore_case of this QuerySource.


        :param ignore_case: The ignore_case of this QuerySource.  # noqa: E501
        :type: bool
        """

        self._ignore_case = ignore_case

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


        :return: The debug of this QuerySource.  # noqa: E501
        :rtype: bool
        """
        return self._debug

    @debug.setter
    def debug(self, debug):
        """Sets the debug of this QuerySource.


        :param debug: The debug of this QuerySource.  # noqa: E501
        :type: bool
        """

        self._debug = debug

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


        :return: The limit of this QuerySource.  # noqa: E501
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """Sets the limit of this QuerySource.


        :param limit: The limit of this QuerySource.  # noqa: E501
        :type: int
        """

        self._limit = limit

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


        :return: The exclude of this QuerySource.  # noqa: E501
        :rtype: bool
        """
        return self._exclude

    @exclude.setter
    def exclude(self, exclude):
        """Sets the exclude of this QuerySource.


        :param exclude: The exclude of this QuerySource.  # noqa: E501
        :type: bool
        """

        self._exclude = exclude

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


        :return: The expects of this QuerySource.  # noqa: E501
        :rtype: str
        """
        return self._expects

    @expects.setter
    def expects(self, expects):
        """Sets the expects of this QuerySource.


        :param expects: The expects of this QuerySource.  # noqa: E501
        :type: str
        """

        self._expects = expects

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


        :return: The projections of this QuerySource.  # noqa: E501
        :rtype: list[str]
        """
        return self._projections

    @projections.setter
    def projections(self, projections):
        """Sets the projections of this QuerySource.


        :param projections: The projections of this QuerySource.  # noqa: E501
        :type: list[str]
        """

        self._projections = projections

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


        :return: The ordering of this QuerySource.  # noqa: E501
        :rtype: list[OrderedQueryField]
        """
        return self._ordering

    @ordering.setter
    def ordering(self, ordering):
        """Sets the ordering of this QuerySource.


        :param ordering: The ordering of this QuerySource.  # noqa: E501
        :type: list[OrderedQueryField]
        """

        self._ordering = ordering

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


        :return: The criteria of this QuerySource.  # noqa: E501
        :rtype: list[CriteriaQueryFieldObject]
        """
        return self._criteria

    @criteria.setter
    def criteria(self, criteria):
        """Sets the criteria of this QuerySource.


        :param criteria: The criteria of this QuerySource.  # noqa: E501
        :type: list[CriteriaQueryFieldObject]
        """

        self._criteria = criteria

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

        for attr, _ in six.iteritems(self.openapi_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 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, QuerySource):
            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, QuerySource):
            return True

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