# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class HostedA2AAgent(UniversalBaseModel):
    """
    Hosted A2A Agent
    """

    type: typing.Literal["hosted-a2a-agent"] = pydantic.Field(default="hosted-a2a-agent")
    """
    Type of agent source
    """

    agent_card_url: str = pydantic.Field()
    """
    Agent Card URL for the A2A Agent
    """

    headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Headers to be sent with the request to the hosted A2A agent. Primarily used for authentication.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
