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
from timestep.api.openai.v1.models.chat_completion_message_tool_call import \
    ChatCompletionMessageToolCall  # noqa: E501
from timestep.api.openai.v1.models.chat_completion_request_assistant_message_function_call import \
    ChatCompletionRequestAssistantMessageFunctionCall  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, content=None, role=None, name=None, tool_calls=None, function_call=None, weight=None):  # noqa: E501
        """FineTuneChatCompletionRequestAssistantMessage - a model defined in OpenAPI

        :param content: The content of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type content: str
        :param role: The role of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type role: str
        :param name: The name of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type name: str
        :param tool_calls: The tool_calls of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type tool_calls: List[ChatCompletionMessageToolCall]
        :param function_call: The function_call of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type function_call: ChatCompletionRequestAssistantMessageFunctionCall
        :param weight: The weight of this FineTuneChatCompletionRequestAssistantMessage.  # noqa: E501
        :type weight: int
        """
        self.openapi_types = {
            'content': str,
            'role': str,
            'name': str,
            'tool_calls': List[ChatCompletionMessageToolCall],
            'function_call': ChatCompletionRequestAssistantMessageFunctionCall,
            'weight': int
        }

        self.attribute_map = {
            'content': 'content',
            'role': 'role',
            'name': 'name',
            'tool_calls': 'tool_calls',
            'function_call': 'function_call',
            'weight': 'weight'
        }

        self._content = content
        self._role = role
        self._name = name
        self._tool_calls = tool_calls
        self._function_call = function_call
        self._weight = weight

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

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

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

        The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.   # noqa: E501

        :return: The content of this FineTuneChatCompletionRequestAssistantMessage.
        :rtype: str
        """
        return self._content

    @content.setter
    def content(self, content: str):
        """Sets the content of this FineTuneChatCompletionRequestAssistantMessage.

        The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.   # noqa: E501

        :param content: The content of this FineTuneChatCompletionRequestAssistantMessage.
        :type content: str
        """

        self._content = content

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

        The role of the messages author, in this case `assistant`.  # noqa: E501

        :return: The role of this FineTuneChatCompletionRequestAssistantMessage.
        :rtype: str
        """
        return self._role

    @role.setter
    def role(self, role: str):
        """Sets the role of this FineTuneChatCompletionRequestAssistantMessage.

        The role of the messages author, in this case `assistant`.  # noqa: E501

        :param role: The role of this FineTuneChatCompletionRequestAssistantMessage.
        :type role: str
        """
        allowed_values = ["assistant"]  # noqa: E501
        if role not in allowed_values:
            raise ValueError(
                "Invalid value for `role` ({0}), must be one of {1}"
                .format(role, allowed_values)
            )

        self._role = role

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

        An optional name for the participant. Provides the model information to differentiate between participants of the same role.  # noqa: E501

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

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

        An optional name for the participant. Provides the model information to differentiate between participants of the same role.  # noqa: E501

        :param name: The name of this FineTuneChatCompletionRequestAssistantMessage.
        :type name: str
        """

        self._name = name

    @property
    def tool_calls(self) -> List[ChatCompletionMessageToolCall]:
        """Gets the tool_calls of this FineTuneChatCompletionRequestAssistantMessage.

        The tool calls generated by the model, such as function calls.  # noqa: E501

        :return: The tool_calls of this FineTuneChatCompletionRequestAssistantMessage.
        :rtype: List[ChatCompletionMessageToolCall]
        """
        return self._tool_calls

    @tool_calls.setter
    def tool_calls(self, tool_calls: List[ChatCompletionMessageToolCall]):
        """Sets the tool_calls of this FineTuneChatCompletionRequestAssistantMessage.

        The tool calls generated by the model, such as function calls.  # noqa: E501

        :param tool_calls: The tool_calls of this FineTuneChatCompletionRequestAssistantMessage.
        :type tool_calls: List[ChatCompletionMessageToolCall]
        """

        self._tool_calls = tool_calls

    @property
    def function_call(self) -> ChatCompletionRequestAssistantMessageFunctionCall:
        """Gets the function_call of this FineTuneChatCompletionRequestAssistantMessage.


        :return: The function_call of this FineTuneChatCompletionRequestAssistantMessage.
        :rtype: ChatCompletionRequestAssistantMessageFunctionCall
        """
        return self._function_call

    @function_call.setter
    def function_call(self, function_call: ChatCompletionRequestAssistantMessageFunctionCall):
        """Sets the function_call of this FineTuneChatCompletionRequestAssistantMessage.


        :param function_call: The function_call of this FineTuneChatCompletionRequestAssistantMessage.
        :type function_call: ChatCompletionRequestAssistantMessageFunctionCall
        """

        self._function_call = function_call

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

        Controls whether the assistant message is trained against (0 or 1)  # noqa: E501

        :return: The weight of this FineTuneChatCompletionRequestAssistantMessage.
        :rtype: int
        """
        return self._weight

    @weight.setter
    def weight(self, weight: int):
        """Sets the weight of this FineTuneChatCompletionRequestAssistantMessage.

        Controls whether the assistant message is trained against (0 or 1)  # noqa: E501

        :param weight: The weight of this FineTuneChatCompletionRequestAssistantMessage.
        :type weight: int
        """
        allowed_values = [0, 1]  # noqa: E501
        if weight not in allowed_values:
            raise ValueError(
                "Invalid value for `weight` ({0}), must be one of {1}"
                .format(weight, allowed_values)
            )

        self._weight = weight
