# generated by datamodel-codegen:
#   filename:  a2a.json
#   timestamp: 2026-04-16T18:25:16+00:00

from __future__ import annotations

from enum import Enum
from typing import Any

from a2a_pydantic.base import A2ABaseModel
from pydantic import AwareDatetime, ConfigDict, Field, RootModel


class A2AProtocolSchemas(RootModel[Any]):
    root: Any = Field(..., title='A2A Protocol Schemas')
    """
    Non-normative JSON Schema bundle extracted from proto definitions.
    """


class Struct(A2ABaseModel):
    model_config = ConfigDict(
        extra='allow',
    )


class Timestamp(RootModel[AwareDatetime]):
    root: AwareDatetime = Field(..., title='Timestamp')


class Value(RootModel[Any]):
    root: Any = Field(..., title='Value')


class APIKeySecurityScheme(A2ABaseModel):
    """
    Defines a security scheme using an API key.
    """
    description: str | None = ''
    """
    An optional description for the security scheme.
    """
    location: str
    """
    The location of the API key. Valid values are "query", "header", or "cookie".
    """
    name: str
    """
    The name of the header, query, or cookie parameter to be used.
    """


class AgentCardSignature(A2ABaseModel):
    """
    AgentCardSignature represents a JWS signature of an AgentCard.
    This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
    """
    header: Struct | None = None
    """
    The unprotected JWS header values.
    """
    protected: str
    """
    (-- api-linter: core::0140::reserved-words=disabled
    aip.dev/not-precedent: Backwards compatibility --)
    Required. The protected JWS header for the signature. This is always a
    base64url-encoded JSON object.
    """
    signature: str
    """
    Required. The computed signature, base64url-encoded.
    """


class AgentExtension(A2ABaseModel):
    """
    A declaration of a protocol extension supported by an Agent.
    """
    description: str | None = ''
    """
    A human-readable description of how this agent uses the extension.
    """
    params: Struct | None = None
    """
    Optional. Extension-specific configuration parameters.
    """
    required: bool | None = False
    """
    If true, the client must understand and comply with the extension's requirements.
    """
    uri: str
    """
    The unique URI identifying the extension.
    """


class AgentInterface(A2ABaseModel):
    """
    Declares a combination of a target URL, transport and protocol version for interacting with the agent.
    This allows agents to expose the same functionality over multiple protocol binding mechanisms.
    """
    protocol_binding: str
    """
    The protocol binding supported at this URL. This is an open form string, to be
    easily extended for other protocol bindings. The core ones officially
    supported are `JSONRPC`, `GRPC` and `HTTP+JSON`.
    """
    protocol_version: str
    """
    The version of the A2A protocol this interface exposes.
    Use the latest supported minor version per major version.
    Examples: "0.3", "1.0"
    """
    tenant: str | None = ''
    """
    Tenant ID to be used in the request when calling the agent.
    """
    url: str
    """
    The URL where this interface is available. Must be a valid absolute HTTPS URL in production.
    Example: "https://api.example.com/a2a/v1", "https://grpc.example.com/a2a"
    """


class AgentProvider(A2ABaseModel):
    """
    Represents the service provider of an agent.
    """
    organization: str
    """
    The name of the agent provider's organization.
    Example: "Google"
    """
    url: str
    """
    A URL for the agent provider's website or relevant documentation.
    Example: "https://ai.google.dev"
    """


class AuthenticationInfo(A2ABaseModel):
    """
    Defines authentication details, used for push notifications.
    """
    credentials: str | None = ''
    """
    Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
    """
    scheme: str
    """
    HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
    Examples: `Bearer`, `Basic`, `Digest`.
    Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
    """


class AuthorizationCodeOAuthFlow(A2ABaseModel):
    """
    Defines configuration details for the OAuth 2.0 Authorization Code flow.
    """
    authorization_url: str
    """
    The authorization URL to be used for this flow.
    """
    pkce_required: bool | None = False
    """
    Indicates if PKCE (RFC 7636) is required for this flow.
    PKCE should always be used for public clients and is recommended for all clients.
    """
    refresh_url: str | None = ''
    """
    The URL to be used for obtaining refresh tokens.
    """
    scopes: dict[str, str]
    """
    The available scopes for the OAuth2 security scheme.
    """
    token_url: str
    """
    The token URL to be used for this flow.
    """


class CancelTaskRequest(A2ABaseModel):
    """
    Represents a request for the `CancelTask` method.
    """
    id: str
    """
    The resource ID of the task to cancel.
    """
    metadata: Struct | None = None
    """
    A flexible key-value map for passing additional context or parameters.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class ClientCredentialsOAuthFlow(A2ABaseModel):
    """
    Defines configuration details for the OAuth 2.0 Client Credentials flow.
    """
    refresh_url: str | None = ''
    """
    The URL to be used for obtaining refresh tokens.
    """
    scopes: dict[str, str]
    """
    The available scopes for the OAuth2 security scheme.
    """
    token_url: str
    """
    The token URL to be used for this flow.
    """


class DeleteTaskPushNotificationConfigRequest(A2ABaseModel):
    """
    Represents a request for the `DeleteTaskPushNotificationConfig` method.
    """
    id: str
    """
    The resource ID of the configuration to delete.
    """
    task_id: str
    """
    The parent task resource ID.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class DeviceCodeOAuthFlow(A2ABaseModel):
    """
    Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).
    This flow is designed for input-constrained devices such as IoT devices,
    and CLI tools where the user authenticates on a separate device.
    """
    device_authorization_url: str
    """
    The device authorization endpoint URL.
    """
    refresh_url: str | None = ''
    """
    The URL to be used for obtaining refresh tokens.
    """
    scopes: dict[str, str]
    """
    The available scopes for the OAuth2 security scheme.
    """
    token_url: str
    """
    The token URL to be used for this flow.
    """


class GetExtendedAgentCardRequest(A2ABaseModel):
    """
    Represents a request for the `GetExtendedAgentCard` method.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class GetTaskPushNotificationConfigRequest(A2ABaseModel):
    """
    Represents a request for the `GetTaskPushNotificationConfig` method.
    """
    id: str
    """
    The resource ID of the configuration to retrieve.
    """
    task_id: str
    """
    The parent task resource ID.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class GetTaskRequest(A2ABaseModel):
    """
    Represents a request for the `GetTask` method.
    """
    history_length: int | None = None
    """
    The maximum number of most recent messages from the task's history to retrieve. An
    unset value means the client does not impose any limit. A value of zero is
    a request to not include any messages. The server MUST NOT return more
    messages than the provided value, but MAY apply a lower limit.
    """
    id: str
    """
    The resource ID of the task to retrieve.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class HTTPAuthSecurityScheme(A2ABaseModel):
    """
    Defines a security scheme using HTTP authentication.
    """
    bearer_format: str | None = ''
    """
    A hint to the client to identify how the bearer token is formatted (e.g., "JWT").
    Primarily for documentation purposes.
    """
    description: str | None = ''
    """
    An optional description for the security scheme.
    """
    scheme: str
    """
    The name of the HTTP Authentication scheme to be used in the Authorization header,
    as defined in RFC7235 (e.g., "Bearer").
    This value should be registered in the IANA Authentication Scheme registry.
    """


class ImplicitOAuthFlow(A2ABaseModel):
    """
    Deprecated: Use Authorization Code + PKCE instead.
    """
    authorization_url: str
    """
    The authorization URL to be used for this flow. This MUST be in the
    form of a URL. The OAuth2 standard requires the use of TLS
    """
    refresh_url: str | None = ''
    """
    The URL to be used for obtaining refresh tokens. This MUST be in the
    form of a URL. The OAuth2 standard requires the use of TLS.
    """
    scopes: dict[str, str]
    """
    The available scopes for the OAuth2 security scheme. A map between the
    scope name and a short description for it. The map MAY be empty.
    """


class ListTaskPushNotificationConfigsRequest(A2ABaseModel):
    """
    Represents a request for the `ListTaskPushNotificationConfigs` method.
    """
    page_size: int | None = 0
    """
    The maximum number of configurations to return.
    """
    page_token: str | None = ''
    """
    A page token received from a previous `ListTaskPushNotificationConfigsRequest` call.
    """
    task_id: str
    """
    The parent task resource ID.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class Role(Enum):
    """
    Identifies the sender of the message.
    """
    role_user = 'ROLE_USER'
    role_agent = 'ROLE_AGENT'


class MutualTlsSecurityScheme(A2ABaseModel):
    """
    Defines a security scheme using mTLS authentication.
    """
    description: str | None = ''
    """
    An optional description for the security scheme.
    """


class OpenIdConnectSecurityScheme(A2ABaseModel):
    """
    Defines a security scheme using OpenID Connect.
    """
    description: str | None = ''
    """
    An optional description for the security scheme.
    """
    open_id_connect_url: str
    """
    The [OpenID Connect Discovery URL](https://openid.net/specs/openid-connect-discovery-1_0.html) for the OIDC provider's metadata.
    """


class Part(A2ABaseModel):
    """
    `Part` represents a container for a section of communication content.
    Parts can be purely textual, some sort of file (image, video, etc) or
    a structured data blob (i.e. JSON).
    """
    data: Value | None = None
    """
    Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
    """
    filename: str | None = ''
    """
    An optional `filename` for the file (e.g., "document.pdf").
    """
    media_type: str | None = ''
    """
    The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
    This field is available for all part types.
    """
    metadata: Struct | None = None
    """
    Optional. metadata associated with this part.
    """
    raw: str | None = None
    """
    The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
    """
    text: str | None = None
    """
    The string content of the `text` part.
    """
    url: str | None = None
    """
    A `url` pointing to the file's content.
    """


class PasswordOAuthFlow(A2ABaseModel):
    """
    Deprecated: Use Authorization Code + PKCE or Device Code.
    """
    refresh_url: str | None = ''
    """
    The URL to be used for obtaining refresh tokens. This MUST be in the
    form of a URL. The OAuth2 standard requires the use of TLS.
    """
    scopes: dict[str, str]
    """
    The available scopes for the OAuth2 security scheme. A map between the
    scope name and a short description for it. The map MAY be empty.
    """
    token_url: str
    """
    The token URL to be used for this flow. This MUST be in the form of a URL.
    The OAuth2 standard requires the use of TLS.
    """


class StringList(A2ABaseModel):
    """
    A list of strings.
    """
    strings: list[str]
    """
    The individual string values.
    """


class SubscribeToTaskRequest(A2ABaseModel):
    """
    Represents a request for the `SubscribeToTask` method.
    """
    id: str
    """
    The resource ID of the task to subscribe to.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class TaskPushNotificationConfig(A2ABaseModel):
    """
    A container associating a push notification configuration with a specific task.
    """
    authentication: AuthenticationInfo | None = None
    """
    Authentication information required to send the notification.
    """
    id: str | None = ''
    """
    The push notification configuration details.
    A unique identifier (e.g. UUID) for this push notification configuration.
    """
    task_id: str
    """
    The ID of the task this configuration is associated with.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID.
    """
    token: str | None = ''
    """
    A token unique for this task or session.
    """
    url: str
    """
    The URL where the notification should be sent.
    """


class TaskState(Enum):
    """
    Defines the lifecycle states of a Task.
    """
    task_state_submitted = 'TASK_STATE_SUBMITTED'
    task_state_working = 'TASK_STATE_WORKING'
    task_state_completed = 'TASK_STATE_COMPLETED'
    task_state_failed = 'TASK_STATE_FAILED'
    task_state_canceled = 'TASK_STATE_CANCELED'
    task_state_input_required = 'TASK_STATE_INPUT_REQUIRED'
    task_state_rejected = 'TASK_STATE_REJECTED'
    task_state_auth_required = 'TASK_STATE_AUTH_REQUIRED'


class AgentCapabilities(A2ABaseModel):
    """
    Defines optional capabilities supported by an agent.
    """
    extended_agent_card: bool | None = None
    """
    Indicates if the agent supports providing an extended agent card when authenticated.
    """
    extensions: list[AgentExtension] | None = None
    """
    A list of protocol extensions supported by the agent.
    """
    push_notifications: bool | None = None
    """
    Indicates if the agent supports sending push notifications for asynchronous task updates.
    """
    streaming: bool | None = None
    """
    Indicates if the agent supports streaming responses.
    """


class Artifact(A2ABaseModel):
    """
    Artifacts represent task outputs.
    """
    artifact_id: str
    """
    Unique identifier (e.g. UUID) for the artifact. It must be unique within a task.
    """
    description: str | None = ''
    """
    Optional. A human readable description of the artifact.
    """
    extensions: list[str] | None = None
    """
    The URIs of extensions that are present or contributed to this Artifact.
    """
    metadata: Struct | None = None
    """
    Optional. Metadata included with the artifact.
    """
    name: str | None = ''
    """
    A human readable name for the artifact.
    """
    parts: list[Part]
    """
    The content of the artifact. Must contain at least one part.
    """


class ListTaskPushNotificationConfigsResponse(A2ABaseModel):
    """
    Represents a successful response for the `ListTaskPushNotificationConfigs`
    method.
    """
    configs: list[TaskPushNotificationConfig] | None = None
    """
    The list of push notification configurations.
    """
    next_page_token: str | None = ''
    """
    A token to retrieve the next page of results, or empty if there are no more results in the list.
    """


class ListTasksRequest(A2ABaseModel):
    """
    Parameters for listing tasks with optional filtering criteria.
    """
    context_id: str | None = ''
    """
    Filter tasks by context ID to get tasks from a specific conversation or session.
    """
    history_length: int | None = None
    """
    The maximum number of messages to include in each task's history.
    """
    include_artifacts: bool | None = None
    """
    Whether to include artifacts in the returned tasks.
    Defaults to false to reduce payload size.
    """
    page_size: int | None = None
    """
    The maximum number of tasks to return. The service may return fewer than this value.
    If unspecified, at most 50 tasks will be returned.
    The minimum value is 1.
    The maximum value is 100.
    """
    page_token: str | None = ''
    """
    A page token, received from a previous `ListTasks` call.
    `ListTasksResponse.next_page_token`.
    Provide this to retrieve the subsequent page.
    """
    status: TaskState | None = None
    """
    Filter tasks by their current status state.
    """
    status_timestamp_after: Timestamp | None = None
    """
    Filter tasks which have a status updated after the provided timestamp in ISO 8601 format (e.g., "2023-10-27T10:00:00Z").
    Only tasks with a status timestamp time greater than or equal to this value will be returned.
    """
    tenant: str | None = ''
    """
    Tenant ID, provided as a path parameter.
    """


class Message(A2ABaseModel):
    """
    `Message` is one unit of communication between client and server. It can be
    associated with a context and/or a task. For server messages, `context_id` must
    be provided, and `task_id` only if a task was created. For client messages, both
    fields are optional, with the caveat that if both are provided, they have to
    match (the `context_id` has to be the one that is set on the task). If only
    `task_id` is provided, the server will infer `context_id` from it.
    """
    context_id: str | None = ''
    """
    Optional. The context id of the message. If set, the message will be associated with the given context.
    """
    extensions: list[str] | None = None
    """
    The URIs of extensions that are present or contributed to this Message.
    """
    message_id: str
    """
    The unique identifier (e.g. UUID) of the message. This is created by the message creator.
    """
    metadata: Struct | None = None
    """
    Optional. Any metadata to provide along with the message.
    """
    parts: list[Part]
    """
    Parts is the container of the message content.
    """
    reference_task_ids: list[str] | None = None
    """
    A list of task IDs that this message references for additional context.
    """
    role: Role = Field(..., title='Role')
    """
    Identifies the sender of the message.
    """
    task_id: str | None = ''
    """
    Optional. The task id of the message. If set, the message will be associated with the given task.
    """


class OAuthFlows(A2ABaseModel):
    """
    Defines the configuration for the supported OAuth 2.0 flows.
    """
    authorization_code: AuthorizationCodeOAuthFlow | None = None
    """
    Configuration for the OAuth Authorization Code flow.
    """
    client_credentials: ClientCredentialsOAuthFlow | None = None
    """
    Configuration for the OAuth Client Credentials flow.
    """
    device_code: DeviceCodeOAuthFlow | None = None
    """
    Configuration for the OAuth Device Code flow.
    """
    implicit: ImplicitOAuthFlow | None = None
    """
    Deprecated: Use Authorization Code + PKCE instead.
    """
    password: PasswordOAuthFlow | None = None
    """
    Deprecated: Use Authorization Code + PKCE or Device Code.
    """


class SecurityRequirement(A2ABaseModel):
    """
    Defines the security requirements for an agent.
    """
    schemes: dict[str, StringList]
    """
    A map of security schemes to the required scopes.
    """


class SendMessageConfiguration(A2ABaseModel):
    """
    Configuration of a send message request.
    """
    accepted_output_modes: list[str] | None = None
    """
    A list of media types the client is prepared to accept for response parts.
    Agents SHOULD use this to tailor their output.
    """
    history_length: int | None = None
    """
    The maximum number of most recent messages from the task's history to retrieve in
    the response. An unset value means the client does not impose any limit. A
    value of zero is a request to not include any messages. The server MUST NOT
    return more messages than the provided value, but MAY apply a lower limit.
    """
    return_immediately: bool | None = False
    """
    If `true`, the operation returns immediately after creating the task,
    even if processing is still in progress.
    If `false` (default), the operation MUST wait until the task reaches a
    terminal (`COMPLETED`, `FAILED`, `CANCELED`, `REJECTED`) or interrupted
    (`INPUT_REQUIRED`, `AUTH_REQUIRED`) state before returning.
    """
    task_push_notification_config: TaskPushNotificationConfig | None = None
    """
    Configuration for the agent to send push notifications for task updates.
    Task id should be empty when sending this configuration in a `SendMessage` request.
    """


class SendMessageRequest(A2ABaseModel):
    """
    Represents a request for the `SendMessage` method.
    """
    configuration: SendMessageConfiguration | None = None
    """
    Configuration for the send request.
    """
    message: Message
    """
    The message to send to the agent.
    """
    metadata: Struct | None = None
    """
    A flexible key-value map for passing additional context or parameters.
    """
    tenant: str | None = ''
    """
    Optional. Tenant ID, provided as a path parameter.
    """


class TaskArtifactUpdateEvent(A2ABaseModel):
    """
    A task delta where an artifact has been generated.
    """
    append: bool | None = False
    """
    If true, the content of this artifact should be appended to a previously
    sent artifact with the same ID.
    """
    artifact: Artifact
    """
    The artifact that was generated or updated.
    """
    context_id: str
    """
    The ID of the context that this task belongs to.
    """
    last_chunk: bool | None = False
    """
    If true, this is the final chunk of the artifact.
    """
    metadata: Struct | None = None
    """
    Optional. Metadata associated with the artifact update.
    """
    task_id: str
    """
    The ID of the task for this artifact.
    """


class TaskStatus(A2ABaseModel):
    """
    A container for the status of a task
    """
    message: Message | None = None
    """
    A message associated with the status.
    """
    state: TaskState
    """
    The current state of this task.
    """
    timestamp: Timestamp | None = None
    """
    ISO 8601 Timestamp when the status was recorded.
    Example: "2023-10-27T10:00:00Z"
    """


class TaskStatusUpdateEvent(A2ABaseModel):
    """
    An event sent by the agent to notify the client of a change in a task's status.
    """
    context_id: str
    """
    The ID of the context that the task belongs to.
    """
    metadata: Struct | None = None
    """
    Optional. Metadata associated with the task update.
    """
    status: TaskStatus
    """
    The new status of the task.
    """
    task_id: str
    """
    The ID of the task that has changed.
    """


class AgentSkill(A2ABaseModel):
    """
    Represents a distinct capability or function that an agent can perform.
    """
    description: str
    """
    A detailed description of the skill.
    """
    examples: list[str] | None = None
    """
    Example prompts or scenarios that this skill can handle.
    """
    id: str
    """
    A unique identifier for the agent's skill.
    """
    input_modes: list[str] | None = None
    """
    The set of supported input media types for this skill, overriding the agent's defaults.
    """
    name: str
    """
    A human-readable name for the skill.
    """
    output_modes: list[str] | None = None
    """
    The set of supported output media types for this skill, overriding the agent's defaults.
    """
    security_requirements: list[SecurityRequirement] | None = None
    """
    Security schemes necessary for this skill.
    """
    tags: list[str]
    """
    A set of keywords describing the skill's capabilities.
    """


class OAuth2SecurityScheme(A2ABaseModel):
    """
    Defines a security scheme using OAuth 2.0.
    """
    description: str | None = ''
    """
    An optional description for the security scheme.
    """
    flows: OAuthFlows
    """
    An object containing configuration information for the supported OAuth 2.0 flows.
    """
    oauth2_metadata_url: str | None = ''
    """
    URL to the OAuth2 authorization server metadata [RFC 8414](https://datatracker.ietf.org/doc/html/rfc8414).
    TLS is required.
    """


class SecurityScheme(A2ABaseModel):
    """
    Defines a security scheme that can be used to secure an agent's endpoints.
    This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object.
    See: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object
    """
    api_key_security_scheme: APIKeySecurityScheme | None = None
    """
    API key-based authentication.
    """
    http_auth_security_scheme: HTTPAuthSecurityScheme | None = None
    """
    HTTP authentication (Basic, Bearer, etc.).
    """
    mtls_security_scheme: MutualTlsSecurityScheme | None = None
    """
    Mutual TLS authentication.
    """
    oauth2_security_scheme: OAuth2SecurityScheme | None = None
    """
    OAuth 2.0 authentication.
    """
    open_id_connect_security_scheme: OpenIdConnectSecurityScheme | None = None
    """
    OpenID Connect authentication.
    """


class Task(A2ABaseModel):
    """
    `Task` is the core unit of action for A2A. It has a current status
    and when results are created for the task they are stored in the
    artifact. If there are multiple turns for a task, these are stored in
    history.
    """
    artifacts: list[Artifact] | None = None
    """
    A set of output artifacts for a `Task`.
    """
    context_id: str | None = ''
    """
    Unique identifier (e.g. UUID) for the contextual collection of interactions
    (tasks and messages).
    """
    history: list[Message] | None = None
    """
    The history of interactions from a `Task`.
    """
    id: str
    """
    Unique identifier (e.g. UUID) for the task, generated by the server for a
    new task.
    """
    metadata: Struct | None = None
    """
    A key/value object to store custom metadata about a task.
    """
    status: TaskStatus
    """
    The current status of a `Task`, including `state` and a `message`.
    """


class AgentCard(A2ABaseModel):
    """
    A self-describing manifest for an agent. It provides essential
    metadata including the agent's identity, capabilities, skills, supported
    communication methods, and security requirements.
    Next ID: 20
    """
    capabilities: AgentCapabilities
    """
    A2A Capability set supported by the agent.
    """
    default_input_modes: list[str]
    """
    The set of interaction modes that the agent supports across all skills.
    This can be overridden per skill. Defined as media types.
    """
    default_output_modes: list[str]
    """
    The media types supported as outputs from this agent.
    """
    description: str
    """
    A human-readable description of the agent, assisting users and other agents
    in understanding its purpose.
    Example: "Agent that helps users with recipes and cooking."
    """
    documentation_url: str | None = None
    """
    A URL providing additional documentation about the agent.
    """
    icon_url: str | None = None
    """
    Optional. A URL to an icon for the agent.
    """
    name: str
    """
    A human readable name for the agent.
    Example: "Recipe Agent"
    """
    provider: AgentProvider | None = None
    """
    The service provider of the agent.
    """
    security_requirements: list[SecurityRequirement] | None = None
    """
    Security requirements for contacting the agent.
    """
    security_schemes: dict[str, SecurityScheme] | None = None
    """
    The security scheme details used for authenticating with this agent.
    """
    signatures: list[AgentCardSignature] | None = None
    """
    JSON Web Signatures computed for this `AgentCard`.
    """
    skills: list[AgentSkill]
    """
    Skills represent the abilities of an agent.
    It is largely a descriptive concept but represents a more focused set of behaviors that the
    agent is likely to succeed at.
    """
    supported_interfaces: list[AgentInterface]
    """
    Ordered list of supported interfaces. The first entry is preferred.
    """
    version: str
    """
    The version of the agent.
    Example: "1.0.0"
    """


class ListTasksResponse(A2ABaseModel):
    """
    Result object for `ListTasks` method containing an array of tasks and pagination information.
    """
    next_page_token: str
    """
    A token to retrieve the next page of results, or empty if there are no more results in the list.
    """
    page_size: int
    """
    The page size used for this response.
    """
    tasks: list[Task]
    """
    Array of tasks matching the specified criteria.
    """
    total_size: int
    """
    Total number of tasks available (before pagination).
    """


class SendMessageResponse(A2ABaseModel):
    """
    Represents the response for the `SendMessage` method.
    """
    message: Message | None = None
    """
    A message from the agent.
    """
    task: Task | None = None
    """
    The task created or updated by the message.
    """


class StreamResponse(A2ABaseModel):
    """
    A wrapper object used in streaming operations to encapsulate different types of response data.
    """
    artifact_update: TaskArtifactUpdateEvent | None = None
    """
    An event indicating a task artifact update.
    """
    message: Message | None = None
    """
    A Message object containing a message from the agent.
    """
    status_update: TaskStatusUpdateEvent | None = None
    """
    An event indicating a task status update.
    """
    task: Task | None = None
    """
    A Task object containing the current state of the task.
    """
