# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

    OpenAPI spec version: 4.11.5
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class ContactListQueryFilters(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 = {
        'keywords': 'str',
        'custom_fields': 'list[str]',
        'order_by': 'ContactOrderByEnum'
    }

    attribute_map = {
        'keywords': 'keywords',
        'custom_fields': 'customFields',
        'order_by': 'orderBy'
    }

    def __init__(self, keywords=None, custom_fields=None, order_by=None, _configuration=None):  # noqa: E501
        """ContactListQueryFilters - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._keywords = None
        self._custom_fields = None
        self._order_by = None
        self.discriminator = None

        if keywords is not None:
            self.keywords = keywords
        if custom_fields is not None:
            self.custom_fields = custom_fields
        if order_by is not None:
            self.order_by = order_by

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

        Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.   # noqa: E501

        :return: The keywords of this ContactListQueryFilters.  # noqa: E501
        :rtype: str
        """
        return self._keywords

    @keywords.setter
    def keywords(self, keywords):
        """Sets the keywords of this ContactListQueryFilters.

        Textual search keywords. Sometimes, like in user search, the fields matched depends on what is configured on the products.   # noqa: E501

        :param keywords: The keywords of this ContactListQueryFilters.  # noqa: E501
        :type: str
        """

        self._keywords = keywords

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

        Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon).  For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`.         # noqa: E501

        :return: The custom_fields of this ContactListQueryFilters.  # noqa: E501
        :rtype: list[str]
        """
        return self._custom_fields

    @custom_fields.setter
    def custom_fields(self, custom_fields):
        """Sets the custom_fields of this ContactListQueryFilters.

        Concat custom field values used as filters. Is a comma-separated array, where each part consists in two parts: the internal name (or custom field id) of the field, and a value, both separated by : (colon).  For example, `customFields=field1:value1,field2:value2`. Sometimes multiple values are accepted. In this case, the multiple values are separated by pipes. For example, customFields=field1:valueA|valueB. Enumerated fields accept multiple values, while numeric and date fields also accept ranges, which are two values, pipe-separated. For example, `customFields=tradeType:offer|search,extraDate:2000-01-01|2001-12-31` would match results whose custom field with internal name `tradeType` is either `offer` or `search`, and whose `extraDate` is between January 1, 2000 and December 31, 2001. To specify a single bound in ranges (like birth dates before December 31, 2001), use a pipe in one of the values, like `customValues=extraDate:|2001-12-31`.         # noqa: E501

        :param custom_fields: The custom_fields of this ContactListQueryFilters.  # noqa: E501
        :type: list[str]
        """

        self._custom_fields = custom_fields

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

        Possible options for ordering the results of a contact list. Possible values are: * alphabeticallyAsc: Users are ordered by name (or whatever field is set to format users) in ascending order. * alphabeticallyDesc: Users are ordered by name (or whatever field is set to format users) in descending order. * relevance: This is the default if keywords are used. Best matching users come first.   # noqa: E501

        :return: The order_by of this ContactListQueryFilters.  # noqa: E501
        :rtype: ContactOrderByEnum
        """
        return self._order_by

    @order_by.setter
    def order_by(self, order_by):
        """Sets the order_by of this ContactListQueryFilters.

        Possible options for ordering the results of a contact list. Possible values are: * alphabeticallyAsc: Users are ordered by name (or whatever field is set to format users) in ascending order. * alphabeticallyDesc: Users are ordered by name (or whatever field is set to format users) in descending order. * relevance: This is the default if keywords are used. Best matching users come first.   # noqa: E501

        :param order_by: The order_by of this ContactListQueryFilters.  # noqa: E501
        :type: ContactOrderByEnum
        """

        self._order_by = order_by

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

        for attr, _ in six.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
        if issubclass(ContactListQueryFilters, dict):
            for key, value in self.items():
                result[key] = 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, ContactListQueryFilters):
            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, ContactListQueryFilters):
            return True

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