"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .anthropiccontent import AnthropicContent, AnthropicContentTypedDict
from r9s.types import BaseModel
from typing import List, Literal, Union
from typing_extensions import TypeAliasType, TypedDict


AnthropicMessageMessageRole = Literal[
    "user",
    "assistant",
]
r"""Role of the message sender (user or assistant)"""


AnthropicMessageMessageContentTypedDict = TypeAliasType(
    "AnthropicMessageMessageContentTypedDict",
    Union[List[AnthropicContentTypedDict], str],
)
r"""Message content - can be array of content blocks or string"""


AnthropicMessageMessageContent = TypeAliasType(
    "AnthropicMessageMessageContent", Union[List[AnthropicContent], str]
)
r"""Message content - can be array of content blocks or string"""


class AnthropicMessageMessageTypedDict(TypedDict):
    role: AnthropicMessageMessageRole
    r"""Role of the message sender (user or assistant)"""
    content: AnthropicMessageMessageContentTypedDict
    r"""Message content - can be array of content blocks or string"""


class AnthropicMessageMessage(BaseModel):
    role: AnthropicMessageMessageRole
    r"""Role of the message sender (user or assistant)"""

    content: AnthropicMessageMessageContent
    r"""Message content - can be array of content blocks or string"""
