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 ChatCompletionFunctions(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, description=None, name=None, parameters=None):  # noqa: E501
        """ChatCompletionFunctions - a model defined in OpenAPI

        :param description: The description of this ChatCompletionFunctions.  # noqa: E501
        :type description: str
        :param name: The name of this ChatCompletionFunctions.  # noqa: E501
        :type name: str
        :param parameters: The parameters of this ChatCompletionFunctions.  # noqa: E501
        :type parameters: Dict[str, object]
        """
        self.openapi_types = {
            'description': str,
            'name': str,
            'parameters': Dict[str, object]
        }

        self.attribute_map = {
            'description': 'description',
            'name': 'name',
            'parameters': 'parameters'
        }

        self._description = description
        self._name = name
        self._parameters = parameters

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

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

    @property
    def description(self) -> str:
        """Gets the description of this ChatCompletionFunctions.

        A description of what the function does, used by the model to choose when and how to call the function.  # noqa: E501

        :return: The description of this ChatCompletionFunctions.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description: str):
        """Sets the description of this ChatCompletionFunctions.

        A description of what the function does, used by the model to choose when and how to call the function.  # noqa: E501

        :param description: The description of this ChatCompletionFunctions.
        :type description: str
        """

        self._description = description

    @property
    def name(self) -> str:
        """Gets the name of this ChatCompletionFunctions.

        The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.  # noqa: E501

        :return: The name of this ChatCompletionFunctions.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name: str):
        """Sets the name of this ChatCompletionFunctions.

        The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.  # noqa: E501

        :param name: The name of this ChatCompletionFunctions.
        :type name: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

    @property
    def parameters(self) -> Dict[str, object]:
        """Gets the parameters of this ChatCompletionFunctions.

        The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.   Omitting `parameters` defines a function with an empty parameter list.  # noqa: E501

        :return: The parameters of this ChatCompletionFunctions.
        :rtype: Dict[str, object]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters: Dict[str, object]):
        """Sets the parameters of this ChatCompletionFunctions.

        The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.   Omitting `parameters` defines a function with an empty parameter list.  # noqa: E501

        :param parameters: The parameters of this ChatCompletionFunctions.
        :type parameters: Dict[str, object]
        """

        self._parameters = parameters
