# coding: utf-8

"""
    Cherwell REST API

    Unofficial Python Cherwell REST API library.  # noqa: E501

    The version of the OpenAPI document: 9.3.2
    Contact: See AUTHORS.
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from pycherwell.configuration import Configuration


class QuickSearchItem(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 = {
        'ascending': 'bool',
        'changed_limits': 'list[ChangedLimit]',
        'changed_option': 'str',
        'display_name': 'str',
        'gallery_image': 'str',
        'has_any_options': 'bool',
        'non_final_state_option': 'str',
        'search_any_words_option': 'str',
        'search_attachments_option': 'str',
        'search_related_option': 'str',
        'search_target_id': 'str',
        'search_target_type': 'str',
        'selected_changed_limit': 'ChangedLimit',
        'selected_sort_by_field_id': 'str',
        'sort_by_fields': 'list[KeyValuePairStringString]',
        'sort_by_option': 'str',
        'watermark_text': 'str'
    }

    attribute_map = {
        'ascending': 'ascending',
        'changed_limits': 'changedLimits',
        'changed_option': 'changedOption',
        'display_name': 'displayName',
        'gallery_image': 'galleryImage',
        'has_any_options': 'hasAnyOptions',
        'non_final_state_option': 'nonFinalStateOption',
        'search_any_words_option': 'searchAnyWordsOption',
        'search_attachments_option': 'searchAttachmentsOption',
        'search_related_option': 'searchRelatedOption',
        'search_target_id': 'searchTargetId',
        'search_target_type': 'searchTargetType',
        'selected_changed_limit': 'selectedChangedLimit',
        'selected_sort_by_field_id': 'selectedSortByFieldId',
        'sort_by_fields': 'sortByFields',
        'sort_by_option': 'sortByOption',
        'watermark_text': 'watermarkText'
    }

    def __init__(self, ascending=None, changed_limits=None, changed_option=None, display_name=None, gallery_image=None, has_any_options=None, non_final_state_option=None, search_any_words_option=None, search_attachments_option=None, search_related_option=None, search_target_id=None, search_target_type=None, selected_changed_limit=None, selected_sort_by_field_id=None, sort_by_fields=None, sort_by_option=None, watermark_text=None, local_vars_configuration=None):  # noqa: E501
        """QuickSearchItem - 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._ascending = None
        self._changed_limits = None
        self._changed_option = None
        self._display_name = None
        self._gallery_image = None
        self._has_any_options = None
        self._non_final_state_option = None
        self._search_any_words_option = None
        self._search_attachments_option = None
        self._search_related_option = None
        self._search_target_id = None
        self._search_target_type = None
        self._selected_changed_limit = None
        self._selected_sort_by_field_id = None
        self._sort_by_fields = None
        self._sort_by_option = None
        self._watermark_text = None
        self.discriminator = None

        if ascending is not None:
            self.ascending = ascending
        if changed_limits is not None:
            self.changed_limits = changed_limits
        if changed_option is not None:
            self.changed_option = changed_option
        if display_name is not None:
            self.display_name = display_name
        if gallery_image is not None:
            self.gallery_image = gallery_image
        if has_any_options is not None:
            self.has_any_options = has_any_options
        if non_final_state_option is not None:
            self.non_final_state_option = non_final_state_option
        if search_any_words_option is not None:
            self.search_any_words_option = search_any_words_option
        if search_attachments_option is not None:
            self.search_attachments_option = search_attachments_option
        if search_related_option is not None:
            self.search_related_option = search_related_option
        if search_target_id is not None:
            self.search_target_id = search_target_id
        if search_target_type is not None:
            self.search_target_type = search_target_type
        if selected_changed_limit is not None:
            self.selected_changed_limit = selected_changed_limit
        if selected_sort_by_field_id is not None:
            self.selected_sort_by_field_id = selected_sort_by_field_id
        if sort_by_fields is not None:
            self.sort_by_fields = sort_by_fields
        if sort_by_option is not None:
            self.sort_by_option = sort_by_option
        if watermark_text is not None:
            self.watermark_text = watermark_text

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


        :return: The ascending of this QuickSearchItem.  # noqa: E501
        :rtype: bool
        """
        return self._ascending

    @ascending.setter
    def ascending(self, ascending):
        """Sets the ascending of this QuickSearchItem.


        :param ascending: The ascending of this QuickSearchItem.  # noqa: E501
        :type: bool
        """

        self._ascending = ascending

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


        :return: The changed_limits of this QuickSearchItem.  # noqa: E501
        :rtype: list[ChangedLimit]
        """
        return self._changed_limits

    @changed_limits.setter
    def changed_limits(self, changed_limits):
        """Sets the changed_limits of this QuickSearchItem.


        :param changed_limits: The changed_limits of this QuickSearchItem.  # noqa: E501
        :type: list[ChangedLimit]
        """

        self._changed_limits = changed_limits

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


        :return: The changed_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._changed_option

    @changed_option.setter
    def changed_option(self, changed_option):
        """Sets the changed_option of this QuickSearchItem.


        :param changed_option: The changed_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and changed_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `changed_option` ({0}), must be one of {1}"  # noqa: E501
                .format(changed_option, allowed_values)
            )

        self._changed_option = changed_option

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


        :return: The display_name of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this QuickSearchItem.


        :param display_name: The display_name of this QuickSearchItem.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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


        :return: The gallery_image of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._gallery_image

    @gallery_image.setter
    def gallery_image(self, gallery_image):
        """Sets the gallery_image of this QuickSearchItem.


        :param gallery_image: The gallery_image of this QuickSearchItem.  # noqa: E501
        :type: str
        """

        self._gallery_image = gallery_image

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


        :return: The has_any_options of this QuickSearchItem.  # noqa: E501
        :rtype: bool
        """
        return self._has_any_options

    @has_any_options.setter
    def has_any_options(self, has_any_options):
        """Sets the has_any_options of this QuickSearchItem.


        :param has_any_options: The has_any_options of this QuickSearchItem.  # noqa: E501
        :type: bool
        """

        self._has_any_options = has_any_options

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


        :return: The non_final_state_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._non_final_state_option

    @non_final_state_option.setter
    def non_final_state_option(self, non_final_state_option):
        """Sets the non_final_state_option of this QuickSearchItem.


        :param non_final_state_option: The non_final_state_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and non_final_state_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `non_final_state_option` ({0}), must be one of {1}"  # noqa: E501
                .format(non_final_state_option, allowed_values)
            )

        self._non_final_state_option = non_final_state_option

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


        :return: The search_any_words_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._search_any_words_option

    @search_any_words_option.setter
    def search_any_words_option(self, search_any_words_option):
        """Sets the search_any_words_option of this QuickSearchItem.


        :param search_any_words_option: The search_any_words_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and search_any_words_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `search_any_words_option` ({0}), must be one of {1}"  # noqa: E501
                .format(search_any_words_option, allowed_values)
            )

        self._search_any_words_option = search_any_words_option

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


        :return: The search_attachments_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._search_attachments_option

    @search_attachments_option.setter
    def search_attachments_option(self, search_attachments_option):
        """Sets the search_attachments_option of this QuickSearchItem.


        :param search_attachments_option: The search_attachments_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and search_attachments_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `search_attachments_option` ({0}), must be one of {1}"  # noqa: E501
                .format(search_attachments_option, allowed_values)
            )

        self._search_attachments_option = search_attachments_option

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


        :return: The search_related_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._search_related_option

    @search_related_option.setter
    def search_related_option(self, search_related_option):
        """Sets the search_related_option of this QuickSearchItem.


        :param search_related_option: The search_related_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and search_related_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `search_related_option` ({0}), must be one of {1}"  # noqa: E501
                .format(search_related_option, allowed_values)
            )

        self._search_related_option = search_related_option

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


        :return: The search_target_id of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._search_target_id

    @search_target_id.setter
    def search_target_id(self, search_target_id):
        """Sets the search_target_id of this QuickSearchItem.


        :param search_target_id: The search_target_id of this QuickSearchItem.  # noqa: E501
        :type: str
        """

        self._search_target_id = search_target_id

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


        :return: The search_target_type of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._search_target_type

    @search_target_type.setter
    def search_target_type(self, search_target_type):
        """Sets the search_target_type of this QuickSearchItem.


        :param search_target_type: The search_target_type of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["BusOb", "DocRepository"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and search_target_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `search_target_type` ({0}), must be one of {1}"  # noqa: E501
                .format(search_target_type, allowed_values)
            )

        self._search_target_type = search_target_type

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


        :return: The selected_changed_limit of this QuickSearchItem.  # noqa: E501
        :rtype: ChangedLimit
        """
        return self._selected_changed_limit

    @selected_changed_limit.setter
    def selected_changed_limit(self, selected_changed_limit):
        """Sets the selected_changed_limit of this QuickSearchItem.


        :param selected_changed_limit: The selected_changed_limit of this QuickSearchItem.  # noqa: E501
        :type: ChangedLimit
        """

        self._selected_changed_limit = selected_changed_limit

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


        :return: The selected_sort_by_field_id of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._selected_sort_by_field_id

    @selected_sort_by_field_id.setter
    def selected_sort_by_field_id(self, selected_sort_by_field_id):
        """Sets the selected_sort_by_field_id of this QuickSearchItem.


        :param selected_sort_by_field_id: The selected_sort_by_field_id of this QuickSearchItem.  # noqa: E501
        :type: str
        """

        self._selected_sort_by_field_id = selected_sort_by_field_id

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


        :return: The sort_by_fields of this QuickSearchItem.  # noqa: E501
        :rtype: list[KeyValuePairStringString]
        """
        return self._sort_by_fields

    @sort_by_fields.setter
    def sort_by_fields(self, sort_by_fields):
        """Sets the sort_by_fields of this QuickSearchItem.


        :param sort_by_fields: The sort_by_fields of this QuickSearchItem.  # noqa: E501
        :type: list[KeyValuePairStringString]
        """

        self._sort_by_fields = sort_by_fields

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


        :return: The sort_by_option of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._sort_by_option

    @sort_by_option.setter
    def sort_by_option(self, sort_by_option):
        """Sets the sort_by_option of this QuickSearchItem.


        :param sort_by_option: The sort_by_option of this QuickSearchItem.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Use", "Display", "UseAndDisplay"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and sort_by_option not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `sort_by_option` ({0}), must be one of {1}"  # noqa: E501
                .format(sort_by_option, allowed_values)
            )

        self._sort_by_option = sort_by_option

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


        :return: The watermark_text of this QuickSearchItem.  # noqa: E501
        :rtype: str
        """
        return self._watermark_text

    @watermark_text.setter
    def watermark_text(self, watermark_text):
        """Sets the watermark_text of this QuickSearchItem.


        :param watermark_text: The watermark_text of this QuickSearchItem.  # noqa: E501
        :type: str
        """

        self._watermark_text = watermark_text

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

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