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.run_step_delta_step_details_tool_calls_object_tool_calls_inner import \
    RunStepDeltaStepDetailsToolCallsObjectToolCallsInner  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, type=None, tool_calls=None):  # noqa: E501
        """RunStepDeltaStepDetailsToolCallsObject - a model defined in OpenAPI

        :param type: The type of this RunStepDeltaStepDetailsToolCallsObject.  # noqa: E501
        :type type: str
        :param tool_calls: The tool_calls of this RunStepDeltaStepDetailsToolCallsObject.  # noqa: E501
        :type tool_calls: List[RunStepDeltaStepDetailsToolCallsObjectToolCallsInner]
        """
        self.openapi_types = {
            'type': str,
            'tool_calls': List[RunStepDeltaStepDetailsToolCallsObjectToolCallsInner]
        }

        self.attribute_map = {
            'type': 'type',
            'tool_calls': 'tool_calls'
        }

        self._type = type
        self._tool_calls = tool_calls

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

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

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

        Always `tool_calls`.  # noqa: E501

        :return: The type of this RunStepDeltaStepDetailsToolCallsObject.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type: str):
        """Sets the type of this RunStepDeltaStepDetailsToolCallsObject.

        Always `tool_calls`.  # noqa: E501

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

        self._type = type

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

        An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.   # noqa: E501

        :return: The tool_calls of this RunStepDeltaStepDetailsToolCallsObject.
        :rtype: List[RunStepDeltaStepDetailsToolCallsObjectToolCallsInner]
        """
        return self._tool_calls

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

        An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search`, or `function`.   # noqa: E501

        :param tool_calls: The tool_calls of this RunStepDeltaStepDetailsToolCallsObject.
        :type tool_calls: List[RunStepDeltaStepDetailsToolCallsObjectToolCallsInner]
        """

        self._tool_calls = tool_calls
