# 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 ContactListDataForSearch(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 = {
        'custom_fields': 'list[CustomFieldDetailed]',
        'fields_in_search': 'list[str]',
        'address_fields_in_search': 'list[AddressQueryFieldEnum]',
        'fields_in_list': 'list[str]',
        'query': 'ContactListQueryFilters',
        'has_visible_fields': 'bool',
        'has_editable_fields': 'bool'
    }

    attribute_map = {
        'custom_fields': 'customFields',
        'fields_in_search': 'fieldsInSearch',
        'address_fields_in_search': 'addressFieldsInSearch',
        'fields_in_list': 'fieldsInList',
        'query': 'query',
        'has_visible_fields': 'hasVisibleFields',
        'has_editable_fields': 'hasEditableFields'
    }

    def __init__(self, custom_fields=None, fields_in_search=None, address_fields_in_search=None, fields_in_list=None, query=None, has_visible_fields=None, has_editable_fields=None, _configuration=None):  # noqa: E501
        """ContactListDataForSearch - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._custom_fields = None
        self._fields_in_search = None
        self._address_fields_in_search = None
        self._fields_in_list = None
        self._query = None
        self._has_visible_fields = None
        self._has_editable_fields = None
        self.discriminator = None

        if custom_fields is not None:
            self.custom_fields = custom_fields
        if fields_in_search is not None:
            self.fields_in_search = fields_in_search
        if address_fields_in_search is not None:
            self.address_fields_in_search = address_fields_in_search
        if fields_in_list is not None:
            self.fields_in_list = fields_in_list
        if query is not None:
            self.query = query
        if has_visible_fields is not None:
            self.has_visible_fields = has_visible_fields
        if has_editable_fields is not None:
            self.has_editable_fields = has_editable_fields

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

        The list of contact custom fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)    # noqa: E501

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

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

        The list of contact custom fields that are either to be used as search filter (if its internal name is present on `fieldsInSearch`) and / or in the result list (if its internal name is present on `fieldsInList`)    # noqa: E501

        :param custom_fields: The custom_fields of this ContactListDataForSearch.  # noqa: E501
        :type: list[CustomFieldDetailed]
        """

        self._custom_fields = custom_fields

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

        The internal names of the contact custom fields that should be used as search filters (separated fields, not keywords)   # noqa: E501

        :return: The fields_in_search of this ContactListDataForSearch.  # noqa: E501
        :rtype: list[str]
        """
        return self._fields_in_search

    @fields_in_search.setter
    def fields_in_search(self, fields_in_search):
        """Sets the fields_in_search of this ContactListDataForSearch.

        The internal names of the contact custom fields that should be used as search filters (separated fields, not keywords)   # noqa: E501

        :param fields_in_search: The fields_in_search of this ContactListDataForSearch.  # noqa: E501
        :type: list[str]
        """

        self._fields_in_search = fields_in_search

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

        Fields which can be used when filtering by user address, by using the `address.<addressField>` name Possibles values for each array element are: * address: Filters by any field in the street address: `addressLine1`, `addressLine2`, `street`, `buildingNumber` or `complement`   * city: Filters by city name * country: Filters by country, represented as 2-letter, uppercase, ISO 3166-1 code (exact match) * neighborhood: Filters by neighborhood name  * poBox: Filters by post-office box (exact match) * region: Filters by region or state * zip: Filters by zip (postal) code (exact match)   # noqa: E501

        :return: The address_fields_in_search of this ContactListDataForSearch.  # noqa: E501
        :rtype: list[AddressQueryFieldEnum]
        """
        return self._address_fields_in_search

    @address_fields_in_search.setter
    def address_fields_in_search(self, address_fields_in_search):
        """Sets the address_fields_in_search of this ContactListDataForSearch.

        Fields which can be used when filtering by user address, by using the `address.<addressField>` name Possibles values for each array element are: * address: Filters by any field in the street address: `addressLine1`, `addressLine2`, `street`, `buildingNumber` or `complement`   * city: Filters by city name * country: Filters by country, represented as 2-letter, uppercase, ISO 3166-1 code (exact match) * neighborhood: Filters by neighborhood name  * poBox: Filters by post-office box (exact match) * region: Filters by region or state * zip: Filters by zip (postal) code (exact match)   # noqa: E501

        :param address_fields_in_search: The address_fields_in_search of this ContactListDataForSearch.  # noqa: E501
        :type: list[AddressQueryFieldEnum]
        """

        self._address_fields_in_search = address_fields_in_search

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

        The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list   # noqa: E501

        :return: The fields_in_list of this ContactListDataForSearch.  # noqa: E501
        :rtype: list[str]
        """
        return self._fields_in_list

    @fields_in_list.setter
    def fields_in_list(self, fields_in_list):
        """Sets the fields_in_list of this ContactListDataForSearch.

        The internal names of the contact custom fields that will be returned together with each record, and should be shown in the result list   # noqa: E501

        :param fields_in_list: The fields_in_list of this ContactListDataForSearch.  # noqa: E501
        :type: list[str]
        """

        self._fields_in_list = fields_in_list

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

        Default query filters for searching records   # noqa: E501

        :return: The query of this ContactListDataForSearch.  # noqa: E501
        :rtype: ContactListQueryFilters
        """
        return self._query

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

        Default query filters for searching records   # noqa: E501

        :param query: The query of this ContactListDataForSearch.  # noqa: E501
        :type: ContactListQueryFilters
        """

        self._query = query

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

        This flag can be used to know whether selecting a contact in the  contact list should show direclty the user profile or a contact details page to show additional custom fields.   # noqa: E501

        :return: The has_visible_fields of this ContactListDataForSearch.  # noqa: E501
        :rtype: bool
        """
        return self._has_visible_fields

    @has_visible_fields.setter
    def has_visible_fields(self, has_visible_fields):
        """Sets the has_visible_fields of this ContactListDataForSearch.

        This flag can be used to know whether selecting a contact in the  contact list should show direclty the user profile or a contact details page to show additional custom fields.   # noqa: E501

        :param has_visible_fields: The has_visible_fields of this ContactListDataForSearch.  # noqa: E501
        :type: bool
        """

        self._has_visible_fields = has_visible_fields

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

        This flag can be used to know whether the contact should be added directly to the user's contact list or a page should be shown for the user to fill in the contact custom fields.   # noqa: E501

        :return: The has_editable_fields of this ContactListDataForSearch.  # noqa: E501
        :rtype: bool
        """
        return self._has_editable_fields

    @has_editable_fields.setter
    def has_editable_fields(self, has_editable_fields):
        """Sets the has_editable_fields of this ContactListDataForSearch.

        This flag can be used to know whether the contact should be added directly to the user's contact list or a page should be shown for the user to fill in the contact custom fields.   # noqa: E501

        :param has_editable_fields: The has_editable_fields of this ContactListDataForSearch.  # noqa: E501
        :type: bool
        """

        self._has_editable_fields = has_editable_fields

    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(ContactListDataForSearch, 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, ContactListDataForSearch):
            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, ContactListDataForSearch):
            return True

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