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.create_message_request import \
    CreateMessageRequest  # noqa: E501
from timestep.api.openai.v1.models.create_thread_request_tool_resources import \
    CreateThreadRequestToolResources  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, messages=None, tool_resources=None, metadata=None):  # noqa: E501
        """CreateThreadRequest - a model defined in OpenAPI

        :param messages: The messages of this CreateThreadRequest.  # noqa: E501
        :type messages: List[CreateMessageRequest]
        :param tool_resources: The tool_resources of this CreateThreadRequest.  # noqa: E501
        :type tool_resources: CreateThreadRequestToolResources
        :param metadata: The metadata of this CreateThreadRequest.  # noqa: E501
        :type metadata: object
        """
        self.openapi_types = {
            'messages': List[CreateMessageRequest],
            'tool_resources': CreateThreadRequestToolResources,
            'metadata': object
        }

        self.attribute_map = {
            'messages': 'messages',
            'tool_resources': 'tool_resources',
            'metadata': 'metadata'
        }

        self._messages = messages
        self._tool_resources = tool_resources
        self._metadata = metadata

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

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

    @property
    def messages(self) -> List[CreateMessageRequest]:
        """Gets the messages of this CreateThreadRequest.

        A list of [messages](/docs/api-reference/messages) to start the thread with.  # noqa: E501

        :return: The messages of this CreateThreadRequest.
        :rtype: List[CreateMessageRequest]
        """
        return self._messages

    @messages.setter
    def messages(self, messages: List[CreateMessageRequest]):
        """Sets the messages of this CreateThreadRequest.

        A list of [messages](/docs/api-reference/messages) to start the thread with.  # noqa: E501

        :param messages: The messages of this CreateThreadRequest.
        :type messages: List[CreateMessageRequest]
        """

        self._messages = messages

    @property
    def tool_resources(self) -> CreateThreadRequestToolResources:
        """Gets the tool_resources of this CreateThreadRequest.


        :return: The tool_resources of this CreateThreadRequest.
        :rtype: CreateThreadRequestToolResources
        """
        return self._tool_resources

    @tool_resources.setter
    def tool_resources(self, tool_resources: CreateThreadRequestToolResources):
        """Sets the tool_resources of this CreateThreadRequest.


        :param tool_resources: The tool_resources of this CreateThreadRequest.
        :type tool_resources: CreateThreadRequestToolResources
        """

        self._tool_resources = tool_resources

    @property
    def metadata(self) -> object:
        """Gets the metadata of this CreateThreadRequest.

        Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.   # noqa: E501

        :return: The metadata of this CreateThreadRequest.
        :rtype: object
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata: object):
        """Sets the metadata of this CreateThreadRequest.

        Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.   # noqa: E501

        :param metadata: The metadata of this CreateThreadRequest.
        :type metadata: object
        """

        self._metadata = metadata
