// This file is @generated by prost-build.
/// message/send request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MessageSendRequest {
    #[prost(enumeration = "Role", tag = "1")]
    pub role: i32,
    #[prost(message, repeated, tag = "2")]
    pub parts: ::prost::alloc::vec::Vec<Part>,
    #[prost(string, optional, tag = "3")]
    pub context_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// message/send response
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageSendResponse {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
    #[prost(enumeration = "TaskStatus", tag = "2")]
    pub status: i32,
}
/// tasks/get request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TasksGetRequest {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
}
/// tasks/get response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TasksGetResponse {
    #[prost(message, optional, tag = "1")]
    pub task: ::core::option::Option<Task>,
}
/// tasks/cancel request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TasksCancelRequest {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
}
/// tasks/cancel response
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TasksCancelResponse {
    #[prost(enumeration = "TaskStatus", tag = "1")]
    pub status: i32,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// tasks/list request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TasksListRequest {
    #[prost(enumeration = "TaskStatus", optional, tag = "1")]
    pub status: ::core::option::Option<i32>,
    /// default: 50
    #[prost(uint32, tag = "2")]
    pub limit: u32,
    /// default: 0
    #[prost(uint32, tag = "3")]
    pub offset: u32,
    #[prost(string, optional, tag = "4")]
    pub context_id: ::core::option::Option<::prost::alloc::string::String>,
}
/// tasks/list response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TasksListResponse {
    #[prost(message, repeated, tag = "1")]
    pub tasks: ::prost::alloc::vec::Vec<Task>,
    #[prost(uint32, tag = "2")]
    pub total: u32,
}
/// agent/getAuthenticatedExtendedCard request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAuthenticatedExtendedCardRequest {
    /// JWT token
    #[prost(string, tag = "1")]
    pub token: ::prost::alloc::string::String,
}
/// agent/getAuthenticatedExtendedCard response
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAuthenticatedExtendedCardResponse {
    #[prost(message, optional, tag = "1")]
    pub card: ::core::option::Option<AgentCard>,
    /// JSON string
    #[prost(string, optional, tag = "2")]
    pub extended_metadata: ::core::option::Option<::prost::alloc::string::String>,
}
/// tasks/stream request
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TasksStreamRequest {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
}
/// Task stream event
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TaskStreamEvent {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
    #[prost(enumeration = "TaskStatus", tag = "2")]
    pub status: i32,
    /// RFC3339 format
    #[prost(string, tag = "3")]
    pub timestamp: ::prost::alloc::string::String,
    /// "status_change", "progress_update"
    #[prost(string, optional, tag = "4")]
    pub event_type: ::core::option::Option<::prost::alloc::string::String>,
    /// JSON string
    #[prost(string, optional, tag = "5")]
    pub event_data: ::core::option::Option<::prost::alloc::string::String>,
}
/// Message stream event
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageStreamEvent {
    #[prost(string, tag = "1")]
    pub task_id: ::prost::alloc::string::String,
    #[prost(oneof = "message_stream_event::Event", tags = "2, 3, 4")]
    pub event: ::core::option::Option<message_stream_event::Event>,
}
/// Nested message and enum types in `MessageStreamEvent`.
pub mod message_stream_event {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag = "2")]
        Part(super::Part),
        #[prost(message, tag = "3")]
        Artifact(super::Artifact),
        #[prost(enumeration = "super::TaskStatus", tag = "4")]
        StatusUpdate(i32),
    }
}
/// Task - Represents a unit of work
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration = "TaskStatus", tag = "2")]
    pub status: i32,
    #[prost(message, optional, tag = "3")]
    pub input: ::core::option::Option<TaskInput>,
    #[prost(message, optional, tag = "4")]
    pub output: ::core::option::Option<TaskOutput>,
    #[prost(string, optional, tag = "5")]
    pub context_id: ::core::option::Option<::prost::alloc::string::String>,
    /// RFC3339 timestamp
    #[prost(string, tag = "6")]
    pub created_at: ::prost::alloc::string::String,
    /// RFC3339 timestamp
    #[prost(string, tag = "7")]
    pub updated_at: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "8")]
    pub error: ::core::option::Option<::prost::alloc::string::String>,
}
/// Task input
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskInput {
    #[prost(string, tag = "1")]
    pub prompt: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub parts: ::prost::alloc::vec::Vec<Part>,
    #[prost(message, repeated, tag = "3")]
    pub artifacts: ::prost::alloc::vec::Vec<Artifact>,
}
/// Task output
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaskOutput {
    #[prost(message, repeated, tag = "1")]
    pub messages: ::prost::alloc::vec::Vec<Message>,
    #[prost(message, repeated, tag = "2")]
    pub artifacts: ::prost::alloc::vec::Vec<Artifact>,
}
/// Message - A message in a conversation
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Message {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration = "Role", tag = "2")]
    pub role: i32,
    #[prost(message, repeated, tag = "3")]
    pub parts: ::prost::alloc::vec::Vec<Part>,
    /// RFC3339 format
    #[prost(string, optional, tag = "4")]
    pub timestamp: ::core::option::Option<::prost::alloc::string::String>,
}
/// Part - A content part of a message
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Part {
    #[prost(oneof = "part::PartType", tags = "1, 2, 3, 4, 5")]
    pub part_type: ::core::option::Option<part::PartType>,
}
/// Nested message and enum types in `Part`.
pub mod part {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum PartType {
        #[prost(message, tag = "1")]
        Text(super::TextPart),
        #[prost(message, tag = "2")]
        Image(super::ImagePart),
        #[prost(message, tag = "3")]
        Audio(super::AudioPart),
        #[prost(message, tag = "4")]
        Video(super::VideoPart),
        #[prost(message, tag = "5")]
        File(super::FilePart),
    }
}
/// Text part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TextPart {
    #[prost(string, tag = "1")]
    pub content: ::prost::alloc::string::String,
}
/// Image part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ImagePart {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub mime_type: ::core::option::Option<::prost::alloc::string::String>,
    /// Base64-encoded image data
    #[prost(bytes = "vec", optional, tag = "3")]
    pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// Audio part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AudioPart {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub mime_type: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bytes = "vec", optional, tag = "3")]
    pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// Video part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VideoPart {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub mime_type: ::core::option::Option<::prost::alloc::string::String>,
}
/// File part
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FilePart {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub mime_type: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub url: ::core::option::Option<::prost::alloc::string::String>,
    /// Base64-encoded file data
    #[prost(bytes = "vec", optional, tag = "4")]
    pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
}
/// Artifact - A file or data artifact
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Artifact {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "ArtifactType", tag = "3")]
    pub r#type: i32,
    #[prost(string, optional, tag = "4")]
    pub mime_type: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "5")]
    pub url: ::core::option::Option<::prost::alloc::string::String>,
    /// Base64-encoded data
    #[prost(bytes = "vec", optional, tag = "6")]
    pub data: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
    #[prost(uint64, optional, tag = "7")]
    pub size: ::core::option::Option<u64>,
    /// RFC3339 timestamp
    #[prost(string, optional, tag = "8")]
    pub created_at: ::core::option::Option<::prost::alloc::string::String>,
}
/// Agent Card - Describes an agent's capabilities
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentCard {
    #[prost(string, tag = "1")]
    pub protocol_version: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub preferred_transport: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "6")]
    pub additional_interfaces: ::prost::alloc::vec::Vec<TransportInterface>,
    #[prost(string, tag = "7")]
    pub version: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub capabilities: ::core::option::Option<Capabilities>,
    #[prost(map = "string, message", tag = "9")]
    pub security_schemes: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        SecurityScheme,
    >,
    #[prost(message, repeated, tag = "10")]
    pub security: ::prost::alloc::vec::Vec<SecurityRequirement>,
    #[prost(string, repeated, tag = "11")]
    pub default_input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "12")]
    pub default_output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "13")]
    pub skills: ::prost::alloc::vec::Vec<AgentSkill>,
}
/// Transport interface
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransportInterface {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub transport: ::prost::alloc::string::String,
}
/// Agent capabilities
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Capabilities {
    #[prost(bool, optional, tag = "1")]
    pub streaming: ::core::option::Option<bool>,
    #[prost(bool, optional, tag = "2")]
    pub push_notifications: ::core::option::Option<bool>,
    #[prost(uint64, repeated, tag = "3")]
    pub context_windows: ::prost::alloc::vec::Vec<u64>,
    #[prost(string, repeated, tag = "4")]
    pub modalities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, optional, tag = "5")]
    pub file_attachments: ::core::option::Option<bool>,
}
/// Security scheme
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecurityScheme {
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub scheme: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub bearer_format: ::core::option::Option<::prost::alloc::string::String>,
}
/// Security requirement (key: scheme name, value: scopes)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecurityRequirement {
    #[prost(map = "string, message", tag = "1")]
    pub requirements: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        StringList,
    >,
}
/// String list helper
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StringList {
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Agent skill
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentSkill {
    #[prost(string, optional, tag = "1")]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "4")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "5")]
    pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "6")]
    pub context_requirements: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "7")]
    pub input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "8")]
    pub output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Error response
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ErrorResponse {
    #[prost(int32, tag = "1")]
    pub code: i32,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub details: ::core::option::Option<::prost::alloc::string::String>,
}
/// Task status enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TaskStatus {
    Unspecified = 0,
    Submitted = 1,
    Working = 2,
    InputRequired = 3,
    Completed = 4,
    Failed = 5,
    Cancelled = 6,
}
impl TaskStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TASK_STATUS_UNSPECIFIED",
            Self::Submitted => "TASK_STATUS_SUBMITTED",
            Self::Working => "TASK_STATUS_WORKING",
            Self::InputRequired => "TASK_STATUS_INPUT_REQUIRED",
            Self::Completed => "TASK_STATUS_COMPLETED",
            Self::Failed => "TASK_STATUS_FAILED",
            Self::Cancelled => "TASK_STATUS_CANCELLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TASK_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "TASK_STATUS_SUBMITTED" => Some(Self::Submitted),
            "TASK_STATUS_WORKING" => Some(Self::Working),
            "TASK_STATUS_INPUT_REQUIRED" => Some(Self::InputRequired),
            "TASK_STATUS_COMPLETED" => Some(Self::Completed),
            "TASK_STATUS_FAILED" => Some(Self::Failed),
            "TASK_STATUS_CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
/// Role enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Role {
    Unspecified = 0,
    User = 1,
    Agent = 2,
    System = 3,
}
impl Role {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "ROLE_UNSPECIFIED",
            Self::User => "ROLE_USER",
            Self::Agent => "ROLE_AGENT",
            Self::System => "ROLE_SYSTEM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ROLE_UNSPECIFIED" => Some(Self::Unspecified),
            "ROLE_USER" => Some(Self::User),
            "ROLE_AGENT" => Some(Self::Agent),
            "ROLE_SYSTEM" => Some(Self::System),
            _ => None,
        }
    }
}
/// Artifact type enumeration
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ArtifactType {
    Unspecified = 0,
    Code = 1,
    Document = 2,
    Image = 3,
    Audio = 4,
    Video = 5,
    Archive = 6,
    Other = 7,
}
impl ArtifactType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "ARTIFACT_TYPE_UNSPECIFIED",
            Self::Code => "ARTIFACT_TYPE_CODE",
            Self::Document => "ARTIFACT_TYPE_DOCUMENT",
            Self::Image => "ARTIFACT_TYPE_IMAGE",
            Self::Audio => "ARTIFACT_TYPE_AUDIO",
            Self::Video => "ARTIFACT_TYPE_VIDEO",
            Self::Archive => "ARTIFACT_TYPE_ARCHIVE",
            Self::Other => "ARTIFACT_TYPE_OTHER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ARTIFACT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ARTIFACT_TYPE_CODE" => Some(Self::Code),
            "ARTIFACT_TYPE_DOCUMENT" => Some(Self::Document),
            "ARTIFACT_TYPE_IMAGE" => Some(Self::Image),
            "ARTIFACT_TYPE_AUDIO" => Some(Self::Audio),
            "ARTIFACT_TYPE_VIDEO" => Some(Self::Video),
            "ARTIFACT_TYPE_ARCHIVE" => Some(Self::Archive),
            "ARTIFACT_TYPE_OTHER" => Some(Self::Other),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod a2a_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A2A Protocol Service
    ///
    /// Implements all A2A RPC methods for agent-to-agent communication.
    #[derive(Debug, Clone)]
    pub struct A2aServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl A2aServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
        where
            D: TryInto<tonic::transport::Endpoint>,
            D::Error: Into<StdError>,
        {
            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
            Ok(Self::new(conn))
        }
    }
    impl<T> A2aServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> A2aServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            A2aServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Send a message and create a task (required)
        pub async fn message_send(
            &mut self,
            request: impl tonic::IntoRequest<super::MessageSendRequest>,
        ) -> std::result::Result<
            tonic::Response<super::MessageSendResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/MessageSend",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "MessageSend"));
            self.inner.unary(req, path, codec).await
        }
        /// Get task status (required)
        pub async fn tasks_get(
            &mut self,
            request: impl tonic::IntoRequest<super::TasksGetRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksGetResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/TasksGet",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "TasksGet"));
            self.inner.unary(req, path, codec).await
        }
        /// Cancel a running task (required)
        pub async fn tasks_cancel(
            &mut self,
            request: impl tonic::IntoRequest<super::TasksCancelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksCancelResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/TasksCancel",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "TasksCancel"));
            self.inner.unary(req, path, codec).await
        }
        /// List tasks with filtering (optional)
        pub async fn tasks_list(
            &mut self,
            request: impl tonic::IntoRequest<super::TasksListRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksListResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/TasksList",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "TasksList"));
            self.inner.unary(req, path, codec).await
        }
        /// Get authenticated extended agent card (optional)
        pub async fn agent_get_authenticated_extended_card(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAuthenticatedExtendedCardRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetAuthenticatedExtendedCardResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/AgentGetAuthenticatedExtendedCard",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "miyabi.a2a.v1.A2AService",
                        "AgentGetAuthenticatedExtendedCard",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Server-side streaming for task updates (optional)
        pub async fn tasks_stream(
            &mut self,
            request: impl tonic::IntoRequest<super::TasksStreamRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::TaskStreamEvent>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/TasksStream",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "TasksStream"));
            self.inner.server_streaming(req, path, codec).await
        }
        /// Send a message with streaming response (optional)
        pub async fn message_stream(
            &mut self,
            request: impl tonic::IntoRequest<super::MessageSendRequest>,
        ) -> std::result::Result<
            tonic::Response<tonic::codec::Streaming<super::MessageStreamEvent>>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/miyabi.a2a.v1.A2AService/MessageStream",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("miyabi.a2a.v1.A2AService", "MessageStream"));
            self.inner.server_streaming(req, path, codec).await
        }
    }
}
/// Generated server implementations.
pub mod a2a_service_server {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    /// Generated trait containing gRPC methods that should be implemented for use with A2aServiceServer.
    #[async_trait]
    pub trait A2aService: std::marker::Send + std::marker::Sync + 'static {
        /// Send a message and create a task (required)
        async fn message_send(
            &self,
            request: tonic::Request<super::MessageSendRequest>,
        ) -> std::result::Result<
            tonic::Response<super::MessageSendResponse>,
            tonic::Status,
        >;
        /// Get task status (required)
        async fn tasks_get(
            &self,
            request: tonic::Request<super::TasksGetRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksGetResponse>,
            tonic::Status,
        >;
        /// Cancel a running task (required)
        async fn tasks_cancel(
            &self,
            request: tonic::Request<super::TasksCancelRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksCancelResponse>,
            tonic::Status,
        >;
        /// List tasks with filtering (optional)
        async fn tasks_list(
            &self,
            request: tonic::Request<super::TasksListRequest>,
        ) -> std::result::Result<
            tonic::Response<super::TasksListResponse>,
            tonic::Status,
        >;
        /// Get authenticated extended agent card (optional)
        async fn agent_get_authenticated_extended_card(
            &self,
            request: tonic::Request<super::GetAuthenticatedExtendedCardRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetAuthenticatedExtendedCardResponse>,
            tonic::Status,
        >;
        /// Server streaming response type for the TasksStream method.
        type TasksStreamStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<super::TaskStreamEvent, tonic::Status>,
            >
            + std::marker::Send
            + 'static;
        /// Server-side streaming for task updates (optional)
        async fn tasks_stream(
            &self,
            request: tonic::Request<super::TasksStreamRequest>,
        ) -> std::result::Result<
            tonic::Response<Self::TasksStreamStream>,
            tonic::Status,
        >;
        /// Server streaming response type for the MessageStream method.
        type MessageStreamStream: tonic::codegen::tokio_stream::Stream<
                Item = std::result::Result<super::MessageStreamEvent, tonic::Status>,
            >
            + std::marker::Send
            + 'static;
        /// Send a message with streaming response (optional)
        async fn message_stream(
            &self,
            request: tonic::Request<super::MessageSendRequest>,
        ) -> std::result::Result<
            tonic::Response<Self::MessageStreamStream>,
            tonic::Status,
        >;
    }
    /// A2A Protocol Service
    ///
    /// Implements all A2A RPC methods for agent-to-agent communication.
    #[derive(Debug)]
    pub struct A2aServiceServer<T> {
        inner: Arc<T>,
        accept_compression_encodings: EnabledCompressionEncodings,
        send_compression_encodings: EnabledCompressionEncodings,
        max_decoding_message_size: Option<usize>,
        max_encoding_message_size: Option<usize>,
    }
    impl<T> A2aServiceServer<T> {
        pub fn new(inner: T) -> Self {
            Self::from_arc(Arc::new(inner))
        }
        pub fn from_arc(inner: Arc<T>) -> Self {
            Self {
                inner,
                accept_compression_encodings: Default::default(),
                send_compression_encodings: Default::default(),
                max_decoding_message_size: None,
                max_encoding_message_size: None,
            }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> InterceptedService<Self, F>
        where
            F: tonic::service::Interceptor,
        {
            InterceptedService::new(Self::new(inner), interceptor)
        }
        /// Enable decompressing requests with the given encoding.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.accept_compression_encodings.enable(encoding);
            self
        }
        /// Compress responses with the given encoding, if the client supports it.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.send_compression_encodings.enable(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.max_decoding_message_size = Some(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.max_encoding_message_size = Some(limit);
            self
        }
    }
    impl<T, B> tonic::codegen::Service<http::Request<B>> for A2aServiceServer<T>
    where
        T: A2aService,
        B: Body + std::marker::Send + 'static,
        B::Error: Into<StdError> + std::marker::Send + 'static,
    {
        type Response = http::Response<tonic::body::Body>;
        type Error = std::convert::Infallible;
        type Future = BoxFuture<Self::Response, Self::Error>;
        fn poll_ready(
            &mut self,
            _cx: &mut Context<'_>,
        ) -> Poll<std::result::Result<(), Self::Error>> {
            Poll::Ready(Ok(()))
        }
        fn call(&mut self, req: http::Request<B>) -> Self::Future {
            match req.uri().path() {
                "/miyabi.a2a.v1.A2AService/MessageSend" => {
                    #[allow(non_camel_case_types)]
                    struct MessageSendSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::UnaryService<super::MessageSendRequest>
                    for MessageSendSvc<T> {
                        type Response = super::MessageSendResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::MessageSendRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::message_send(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = MessageSendSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/TasksGet" => {
                    #[allow(non_camel_case_types)]
                    struct TasksGetSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::UnaryService<super::TasksGetRequest>
                    for TasksGetSvc<T> {
                        type Response = super::TasksGetResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TasksGetRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::tasks_get(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = TasksGetSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/TasksCancel" => {
                    #[allow(non_camel_case_types)]
                    struct TasksCancelSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::UnaryService<super::TasksCancelRequest>
                    for TasksCancelSvc<T> {
                        type Response = super::TasksCancelResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TasksCancelRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::tasks_cancel(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = TasksCancelSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/TasksList" => {
                    #[allow(non_camel_case_types)]
                    struct TasksListSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::UnaryService<super::TasksListRequest>
                    for TasksListSvc<T> {
                        type Response = super::TasksListResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TasksListRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::tasks_list(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = TasksListSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/AgentGetAuthenticatedExtendedCard" => {
                    #[allow(non_camel_case_types)]
                    struct AgentGetAuthenticatedExtendedCardSvc<T: A2aService>(
                        pub Arc<T>,
                    );
                    impl<
                        T: A2aService,
                    > tonic::server::UnaryService<
                        super::GetAuthenticatedExtendedCardRequest,
                    > for AgentGetAuthenticatedExtendedCardSvc<T> {
                        type Response = super::GetAuthenticatedExtendedCardResponse;
                        type Future = BoxFuture<
                            tonic::Response<Self::Response>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<
                                super::GetAuthenticatedExtendedCardRequest,
                            >,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::agent_get_authenticated_extended_card(
                                        &inner,
                                        request,
                                    )
                                    .await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = AgentGetAuthenticatedExtendedCardSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.unary(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/TasksStream" => {
                    #[allow(non_camel_case_types)]
                    struct TasksStreamSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::ServerStreamingService<super::TasksStreamRequest>
                    for TasksStreamSvc<T> {
                        type Response = super::TaskStreamEvent;
                        type ResponseStream = T::TasksStreamStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::TasksStreamRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::tasks_stream(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = TasksStreamSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                "/miyabi.a2a.v1.A2AService/MessageStream" => {
                    #[allow(non_camel_case_types)]
                    struct MessageStreamSvc<T: A2aService>(pub Arc<T>);
                    impl<
                        T: A2aService,
                    > tonic::server::ServerStreamingService<super::MessageSendRequest>
                    for MessageStreamSvc<T> {
                        type Response = super::MessageStreamEvent;
                        type ResponseStream = T::MessageStreamStream;
                        type Future = BoxFuture<
                            tonic::Response<Self::ResponseStream>,
                            tonic::Status,
                        >;
                        fn call(
                            &mut self,
                            request: tonic::Request<super::MessageSendRequest>,
                        ) -> Self::Future {
                            let inner = Arc::clone(&self.0);
                            let fut = async move {
                                <T as A2aService>::message_stream(&inner, request).await
                            };
                            Box::pin(fut)
                        }
                    }
                    let accept_compression_encodings = self.accept_compression_encodings;
                    let send_compression_encodings = self.send_compression_encodings;
                    let max_decoding_message_size = self.max_decoding_message_size;
                    let max_encoding_message_size = self.max_encoding_message_size;
                    let inner = self.inner.clone();
                    let fut = async move {
                        let method = MessageStreamSvc(inner);
                        let codec = tonic_prost::ProstCodec::default();
                        let mut grpc = tonic::server::Grpc::new(codec)
                            .apply_compression_config(
                                accept_compression_encodings,
                                send_compression_encodings,
                            )
                            .apply_max_message_size_config(
                                max_decoding_message_size,
                                max_encoding_message_size,
                            );
                        let res = grpc.server_streaming(method, req).await;
                        Ok(res)
                    };
                    Box::pin(fut)
                }
                _ => {
                    Box::pin(async move {
                        let mut response = http::Response::new(
                            tonic::body::Body::default(),
                        );
                        let headers = response.headers_mut();
                        headers
                            .insert(
                                tonic::Status::GRPC_STATUS,
                                (tonic::Code::Unimplemented as i32).into(),
                            );
                        headers
                            .insert(
                                http::header::CONTENT_TYPE,
                                tonic::metadata::GRPC_CONTENT_TYPE,
                            );
                        Ok(response)
                    })
                }
            }
        }
    }
    impl<T> Clone for A2aServiceServer<T> {
        fn clone(&self) -> Self {
            let inner = self.inner.clone();
            Self {
                inner,
                accept_compression_encodings: self.accept_compression_encodings,
                send_compression_encodings: self.send_compression_encodings,
                max_decoding_message_size: self.max_decoding_message_size,
                max_encoding_message_size: self.max_encoding_message_size,
            }
        }
    }
    /// Generated gRPC service name
    pub const SERVICE_NAME: &str = "miyabi.a2a.v1.A2AService";
    impl<T> tonic::server::NamedService for A2aServiceServer<T> {
        const NAME: &'static str = SERVICE_NAME;
    }
}
