from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.openai.v1 import util
from timestep.api.openai.v1.models.base_model import Model


class AssistantToolsFileSearchFileSearch(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, max_num_results=None):  # noqa: E501
        """AssistantToolsFileSearchFileSearch - a model defined in OpenAPI

        :param max_num_results: The max_num_results of this AssistantToolsFileSearchFileSearch.  # noqa: E501
        :type max_num_results: int
        """
        self.openapi_types = {
            'max_num_results': int
        }

        self.attribute_map = {
            'max_num_results': 'max_num_results'
        }

        self._max_num_results = max_num_results

    @classmethod
    def from_dict(cls, dikt) -> 'AssistantToolsFileSearchFileSearch':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The AssistantToolsFileSearch_file_search of this AssistantToolsFileSearchFileSearch.  # noqa: E501
        :rtype: AssistantToolsFileSearchFileSearch
        """
        return util.deserialize_model(dikt, cls)

    @property
    def max_num_results(self) -> int:
        """Gets the max_num_results of this AssistantToolsFileSearchFileSearch.

        The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.  Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.   # noqa: E501

        :return: The max_num_results of this AssistantToolsFileSearchFileSearch.
        :rtype: int
        """
        return self._max_num_results

    @max_num_results.setter
    def max_num_results(self, max_num_results: int):
        """Sets the max_num_results of this AssistantToolsFileSearchFileSearch.

        The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.  Note that the file search tool may output fewer than `max_num_results` results. See the [file search tool documentation](/docs/assistants/tools/file-search/number-of-chunks-returned) for more information.   # noqa: E501

        :param max_num_results: The max_num_results of this AssistantToolsFileSearchFileSearch.
        :type max_num_results: int
        """
        if max_num_results is not None and max_num_results > 50:  # noqa: E501
            raise ValueError("Invalid value for `max_num_results`, must be a value less than or equal to `50`")  # noqa: E501
        if max_num_results is not None and max_num_results < 1:  # noqa: E501
            raise ValueError("Invalid value for `max_num_results`, must be a value greater than or equal to `1`")  # noqa: E501

        self._max_num_results = max_num_results
