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

from __future__ import annotations
import pydantic
from pydantic.functional_validators import AfterValidator
from r9s.types import BaseModel
from r9s.utils import validate_const
from typing import Literal
from typing_extensions import Annotated, TypedDict


AnthropicDocumentSourceBase64MediaType = Literal[
    "application/pdf",
    "text/plain",
]
r"""Document MIME type"""


class AnthropicDocumentSourceBase64TypedDict(TypedDict):
    media_type: AnthropicDocumentSourceBase64MediaType
    r"""Document MIME type"""
    data: str
    r"""Base64-encoded document data"""
    type: Literal["base64"]


class AnthropicDocumentSourceBase64(BaseModel):
    media_type: AnthropicDocumentSourceBase64MediaType
    r"""Document MIME type"""

    data: str
    r"""Base64-encoded document data"""

    TYPE: Annotated[
        Annotated[Literal["base64"], AfterValidator(validate_const("base64"))],
        pydantic.Field(alias="type"),
    ] = "base64"
