"""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


class AnthropicImageSourceURLTypedDict(TypedDict):
    url: str
    r"""URL of the image to fetch"""
    type: Literal["url"]


class AnthropicImageSourceURL(BaseModel):
    url: str
    r"""URL of the image to fetch"""

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