# coding: utf-8

"""
    ARLAS Tagger API

    (Un)Tag fields of ARLAS collections

    OpenAPI spec version: 11.0.1
    Contact: contact@gisaia.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Filter(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 = {
        'f': 'list[list[Expression]]',
        'q': 'list[list[str]]',
        'pwithin': 'list[list[str]]',
        'gwithin': 'list[list[str]]',
        'gintersect': 'list[list[str]]',
        'notpwithin': 'list[list[str]]',
        'notgwithin': 'list[list[str]]',
        'notgintersect': 'list[list[str]]',
        'dateformat': 'str'
    }

    attribute_map = {
        'f': 'f',
        'q': 'q',
        'pwithin': 'pwithin',
        'gwithin': 'gwithin',
        'gintersect': 'gintersect',
        'notpwithin': 'notpwithin',
        'notgwithin': 'notgwithin',
        'notgintersect': 'notgintersect',
        'dateformat': 'dateformat'
    }

    def __init__(self, f=None, q=None, pwithin=None, gwithin=None, gintersect=None, notpwithin=None, notgwithin=None, notgintersect=None, dateformat=None):
        """
        Filter - a model defined in Swagger
        """

        self._f = None
        self._q = None
        self._pwithin = None
        self._gwithin = None
        self._gintersect = None
        self._notpwithin = None
        self._notgwithin = None
        self._notgintersect = None
        self._dateformat = None

        if f is not None:
          self.f = f
        if q is not None:
          self.q = q
        if pwithin is not None:
          self.pwithin = pwithin
        if gwithin is not None:
          self.gwithin = gwithin
        if gintersect is not None:
          self.gintersect = gintersect
        if notpwithin is not None:
          self.notpwithin = notpwithin
        if notgwithin is not None:
          self.notgwithin = notgwithin
        if notgintersect is not None:
          self.notgintersect = notgintersect
        if dateformat is not None:
          self.dateformat = dateformat

    @property
    def f(self):
        """
        Gets the f of this Filter.

        :return: The f of this Filter.
        :rtype: list[list[Expression]]
        """
        return self._f

    @f.setter
    def f(self, f):
        """
        Sets the f of this Filter.

        :param f: The f of this Filter.
        :type: list[list[Expression]]
        """

        self._f = f

    @property
    def q(self):
        """
        Gets the q of this Filter.

        :return: The q of this Filter.
        :rtype: list[list[str]]
        """
        return self._q

    @q.setter
    def q(self, q):
        """
        Sets the q of this Filter.

        :param q: The q of this Filter.
        :type: list[list[str]]
        """

        self._q = q

    @property
    def pwithin(self):
        """
        Gets the pwithin of this Filter.

        :return: The pwithin of this Filter.
        :rtype: list[list[str]]
        """
        return self._pwithin

    @pwithin.setter
    def pwithin(self, pwithin):
        """
        Sets the pwithin of this Filter.

        :param pwithin: The pwithin of this Filter.
        :type: list[list[str]]
        """

        self._pwithin = pwithin

    @property
    def gwithin(self):
        """
        Gets the gwithin of this Filter.

        :return: The gwithin of this Filter.
        :rtype: list[list[str]]
        """
        return self._gwithin

    @gwithin.setter
    def gwithin(self, gwithin):
        """
        Sets the gwithin of this Filter.

        :param gwithin: The gwithin of this Filter.
        :type: list[list[str]]
        """

        self._gwithin = gwithin

    @property
    def gintersect(self):
        """
        Gets the gintersect of this Filter.

        :return: The gintersect of this Filter.
        :rtype: list[list[str]]
        """
        return self._gintersect

    @gintersect.setter
    def gintersect(self, gintersect):
        """
        Sets the gintersect of this Filter.

        :param gintersect: The gintersect of this Filter.
        :type: list[list[str]]
        """

        self._gintersect = gintersect

    @property
    def notpwithin(self):
        """
        Gets the notpwithin of this Filter.

        :return: The notpwithin of this Filter.
        :rtype: list[list[str]]
        """
        return self._notpwithin

    @notpwithin.setter
    def notpwithin(self, notpwithin):
        """
        Sets the notpwithin of this Filter.

        :param notpwithin: The notpwithin of this Filter.
        :type: list[list[str]]
        """

        self._notpwithin = notpwithin

    @property
    def notgwithin(self):
        """
        Gets the notgwithin of this Filter.

        :return: The notgwithin of this Filter.
        :rtype: list[list[str]]
        """
        return self._notgwithin

    @notgwithin.setter
    def notgwithin(self, notgwithin):
        """
        Sets the notgwithin of this Filter.

        :param notgwithin: The notgwithin of this Filter.
        :type: list[list[str]]
        """

        self._notgwithin = notgwithin

    @property
    def notgintersect(self):
        """
        Gets the notgintersect of this Filter.

        :return: The notgintersect of this Filter.
        :rtype: list[list[str]]
        """
        return self._notgintersect

    @notgintersect.setter
    def notgintersect(self, notgintersect):
        """
        Sets the notgintersect of this Filter.

        :param notgintersect: The notgintersect of this Filter.
        :type: list[list[str]]
        """

        self._notgintersect = notgintersect

    @property
    def dateformat(self):
        """
        Gets the dateformat of this Filter.

        :return: The dateformat of this Filter.
        :rtype: str
        """
        return self._dateformat

    @dateformat.setter
    def dateformat(self, dateformat):
        """
        Sets the dateformat of this Filter.

        :param dateformat: The dateformat of this Filter.
        :type: str
        """

        self._dateformat = dateformat

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

        return self.__dict__ == other.__dict__

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