# coding: utf-8

"""
    Mantium API

    Mantium API Documentation  # noqa: E501

    The version of the OpenAPI document: 1.0.976
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from mantium_spec.configuration import Configuration


class ApplicationTopKQueryRequest(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 = {
        'query': 'str',
        'chat_session_id': 'str',
        'retriever_top_k': 'int',
        'reader_top_k': 'int'
    }

    attribute_map = {
        'query': 'query',
        'chat_session_id': 'chat_session_id',
        'retriever_top_k': 'retriever_top_k',
        'reader_top_k': 'reader_top_k'
    }

    def __init__(self, query=None, chat_session_id=None, retriever_top_k=10, reader_top_k=5, local_vars_configuration=None):  # noqa: E501
        """ApplicationTopKQueryRequest - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._query = None
        self._chat_session_id = None
        self._retriever_top_k = None
        self._reader_top_k = None
        self.discriminator = None

        self.query = query
        if chat_session_id is not None:
            self.chat_session_id = chat_session_id
        if retriever_top_k is not None:
            self.retriever_top_k = retriever_top_k
        if reader_top_k is not None:
            self.reader_top_k = reader_top_k

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


        :return: The query of this ApplicationTopKQueryRequest.  # noqa: E501
        :rtype: str
        """
        return self._query

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


        :param query: The query of this ApplicationTopKQueryRequest.  # noqa: E501
        :type query: str
        """
        if self.local_vars_configuration.client_side_validation and query is None:  # noqa: E501
            raise ValueError("Invalid value for `query`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                query is not None and len(query) < 3):
            raise ValueError("Invalid value for `query`, length must be greater than or equal to `3`")  # noqa: E501

        self._query = query

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


        :return: The chat_session_id of this ApplicationTopKQueryRequest.  # noqa: E501
        :rtype: str
        """
        return self._chat_session_id

    @chat_session_id.setter
    def chat_session_id(self, chat_session_id):
        """Sets the chat_session_id of this ApplicationTopKQueryRequest.


        :param chat_session_id: The chat_session_id of this ApplicationTopKQueryRequest.  # noqa: E501
        :type chat_session_id: str
        """

        self._chat_session_id = chat_session_id

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


        :return: The retriever_top_k of this ApplicationTopKQueryRequest.  # noqa: E501
        :rtype: int
        """
        return self._retriever_top_k

    @retriever_top_k.setter
    def retriever_top_k(self, retriever_top_k):
        """Sets the retriever_top_k of this ApplicationTopKQueryRequest.


        :param retriever_top_k: The retriever_top_k of this ApplicationTopKQueryRequest.  # noqa: E501
        :type retriever_top_k: int
        """

        self._retriever_top_k = retriever_top_k

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


        :return: The reader_top_k of this ApplicationTopKQueryRequest.  # noqa: E501
        :rtype: int
        """
        return self._reader_top_k

    @reader_top_k.setter
    def reader_top_k(self, reader_top_k):
        """Sets the reader_top_k of this ApplicationTopKQueryRequest.


        :param reader_top_k: The reader_top_k of this ApplicationTopKQueryRequest.  # noqa: E501
        :type reader_top_k: int
        """

        self._reader_top_k = reader_top_k

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, ApplicationTopKQueryRequest):
            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, ApplicationTopKQueryRequest):
            return True

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