"""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 AnthropicPingTypedDict(TypedDict):
    r"""SSE heartbeat event to keep connection alive"""

    type: Literal["ping"]


class AnthropicPing(BaseModel):
    r"""SSE heartbeat event to keep connection alive"""

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