Skip to main content

a2a_pb/gen/
lf.a2a.v1.rs

1// This file is @generated by prost-build.
2/// Configuration of a send message request.
3#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct SendMessageConfiguration {
5    /// A list of media types the client is prepared to accept for response parts.
6    /// Agents SHOULD use this to tailor their output.
7    #[prost(string, repeated, tag = "1")]
8    pub accepted_output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9    /// Configuration for the agent to send push notifications for task updates.
10    /// Task id should be empty when sending this configuration in a `SendMessage` request.
11    #[prost(message, optional, tag = "2")]
12    pub task_push_notification_config: ::core::option::Option<
13        TaskPushNotificationConfig,
14    >,
15    /// The maximum number of most recent messages from the task's history to retrieve in
16    /// the response. An unset value means the client does not impose any limit. A
17    /// value of zero is a request to not include any messages. The server MUST NOT
18    /// return more messages than the provided value, but MAY apply a lower limit.
19    #[prost(int32, optional, tag = "3")]
20    pub history_length: ::core::option::Option<i32>,
21    /// If `true`, the operation returns immediately after creating the task,
22    /// even if processing is still in progress.
23    /// If `false` (default), the operation MUST wait until the task reaches a
24    /// terminal (`COMPLETED`, `FAILED`, `CANCELED`, `REJECTED`) or interrupted
25    /// (`INPUT_REQUIRED`, `AUTH_REQUIRED`) state before returning.
26    #[prost(bool, tag = "4")]
27    pub return_immediately: bool,
28}
29/// `Task` is the core unit of action for A2A. It has a current status
30/// and when results are created for the task they are stored in the
31/// artifact. If there are multiple turns for a task, these are stored in
32/// history.
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct Task {
35    /// Unique identifier (e.g. UUID) for the task, generated by the server for a
36    /// new task.
37    #[prost(string, tag = "1")]
38    pub id: ::prost::alloc::string::String,
39    /// Unique identifier (e.g. UUID) for the contextual collection of interactions
40    /// (tasks and messages).
41    #[prost(string, tag = "2")]
42    pub context_id: ::prost::alloc::string::String,
43    /// The current status of a `Task`, including `state` and a `message`.
44    #[prost(message, optional, tag = "3")]
45    pub status: ::core::option::Option<TaskStatus>,
46    /// A set of output artifacts for a `Task`.
47    #[prost(message, repeated, tag = "4")]
48    pub artifacts: ::prost::alloc::vec::Vec<Artifact>,
49    /// protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
50    /// The history of interactions from a `Task`.
51    #[prost(message, repeated, tag = "5")]
52    pub history: ::prost::alloc::vec::Vec<Message>,
53    /// protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
54    /// A key/value object to store custom metadata about a task.
55    #[prost(message, optional, tag = "6")]
56    pub metadata: ::core::option::Option<::prost_types::Struct>,
57}
58/// A container for the status of a task
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct TaskStatus {
61    /// The current state of this task.
62    #[prost(enumeration = "TaskState", tag = "1")]
63    pub state: i32,
64    /// A message associated with the status.
65    #[prost(message, optional, tag = "2")]
66    pub message: ::core::option::Option<Message>,
67    /// ISO 8601 Timestamp when the status was recorded.
68    /// Example: "2023-10-27T10:00:00Z"
69    #[prost(message, optional, tag = "3")]
70    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
71}
72/// `Part` represents a container for a section of communication content.
73/// Parts can be purely textual, some sort of file (image, video, etc) or
74/// a structured data blob (i.e. JSON).
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct Part {
77    /// Optional. metadata associated with this part.
78    #[prost(message, optional, tag = "5")]
79    pub metadata: ::core::option::Option<::prost_types::Struct>,
80    /// An optional `filename` for the file (e.g., "document.pdf").
81    #[prost(string, tag = "6")]
82    pub filename: ::prost::alloc::string::String,
83    /// The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
84    /// This field is available for all part types.
85    #[prost(string, tag = "7")]
86    pub media_type: ::prost::alloc::string::String,
87    #[prost(oneof = "part::Content", tags = "1, 2, 3, 4")]
88    pub content: ::core::option::Option<part::Content>,
89}
90/// Nested message and enum types in `Part`.
91pub mod part {
92    #[derive(Clone, PartialEq, ::prost::Oneof)]
93    pub enum Content {
94        /// The string content of the `text` part.
95        #[prost(string, tag = "1")]
96        Text(::prost::alloc::string::String),
97        /// The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
98        #[prost(bytes, tag = "2")]
99        Raw(::prost::alloc::vec::Vec<u8>),
100        /// A `url` pointing to the file's content.
101        #[prost(string, tag = "3")]
102        Url(::prost::alloc::string::String),
103        /// Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
104        #[prost(message, tag = "4")]
105        Data(::prost_types::Value),
106    }
107}
108/// `Message` is one unit of communication between client and server. It can be
109/// associated with a context and/or a task. For server messages, `context_id` must
110/// be provided, and `task_id` only if a task was created. For client messages, both
111/// fields are optional, with the caveat that if both are provided, they have to
112/// match (the `context_id` has to be the one that is set on the task). If only
113/// `task_id` is provided, the server will infer `context_id` from it.
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct Message {
116    /// The unique identifier (e.g. UUID) of the message. This is created by the message creator.
117    #[prost(string, tag = "1")]
118    pub message_id: ::prost::alloc::string::String,
119    /// Optional. The context id of the message. If set, the message will be associated with the given context.
120    #[prost(string, tag = "2")]
121    pub context_id: ::prost::alloc::string::String,
122    /// Optional. The task id of the message. If set, the message will be associated with the given task.
123    #[prost(string, tag = "3")]
124    pub task_id: ::prost::alloc::string::String,
125    /// Identifies the sender of the message.
126    #[prost(enumeration = "Role", tag = "4")]
127    pub role: i32,
128    /// Parts is the container of the message content.
129    #[prost(message, repeated, tag = "5")]
130    pub parts: ::prost::alloc::vec::Vec<Part>,
131    /// Optional. Any metadata to provide along with the message.
132    #[prost(message, optional, tag = "6")]
133    pub metadata: ::core::option::Option<::prost_types::Struct>,
134    /// The URIs of extensions that are present or contributed to this Message.
135    #[prost(string, repeated, tag = "7")]
136    pub extensions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
137    /// A list of task IDs that this message references for additional context.
138    #[prost(string, repeated, tag = "8")]
139    pub reference_task_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140}
141/// Artifacts represent task outputs.
142#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct Artifact {
144    /// Unique identifier (e.g. UUID) for the artifact. It must be unique within a task.
145    #[prost(string, tag = "1")]
146    pub artifact_id: ::prost::alloc::string::String,
147    /// A human readable name for the artifact.
148    #[prost(string, tag = "2")]
149    pub name: ::prost::alloc::string::String,
150    /// Optional. A human readable description of the artifact.
151    #[prost(string, tag = "3")]
152    pub description: ::prost::alloc::string::String,
153    /// The content of the artifact. Must contain at least one part.
154    #[prost(message, repeated, tag = "4")]
155    pub parts: ::prost::alloc::vec::Vec<Part>,
156    /// Optional. Metadata included with the artifact.
157    #[prost(message, optional, tag = "5")]
158    pub metadata: ::core::option::Option<::prost_types::Struct>,
159    /// The URIs of extensions that are present or contributed to this Artifact.
160    #[prost(string, repeated, tag = "6")]
161    pub extensions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
162}
163/// An event sent by the agent to notify the client of a change in a task's status.
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct TaskStatusUpdateEvent {
166    /// The ID of the task that has changed.
167    #[prost(string, tag = "1")]
168    pub task_id: ::prost::alloc::string::String,
169    /// The ID of the context that the task belongs to.
170    #[prost(string, tag = "2")]
171    pub context_id: ::prost::alloc::string::String,
172    /// The new status of the task.
173    #[prost(message, optional, tag = "3")]
174    pub status: ::core::option::Option<TaskStatus>,
175    /// Optional. Metadata associated with the task update.
176    #[prost(message, optional, tag = "4")]
177    pub metadata: ::core::option::Option<::prost_types::Struct>,
178}
179/// A task delta where an artifact has been generated.
180#[derive(Clone, PartialEq, ::prost::Message)]
181pub struct TaskArtifactUpdateEvent {
182    /// The ID of the task for this artifact.
183    #[prost(string, tag = "1")]
184    pub task_id: ::prost::alloc::string::String,
185    /// The ID of the context that this task belongs to.
186    #[prost(string, tag = "2")]
187    pub context_id: ::prost::alloc::string::String,
188    /// The artifact that was generated or updated.
189    #[prost(message, optional, tag = "3")]
190    pub artifact: ::core::option::Option<Artifact>,
191    /// If true, the content of this artifact should be appended to a previously
192    /// sent artifact with the same ID.
193    #[prost(bool, tag = "4")]
194    pub append: bool,
195    /// If true, this is the final chunk of the artifact.
196    #[prost(bool, tag = "5")]
197    pub last_chunk: bool,
198    /// Optional. Metadata associated with the artifact update.
199    #[prost(message, optional, tag = "6")]
200    pub metadata: ::core::option::Option<::prost_types::Struct>,
201}
202/// Defines authentication details, used for push notifications.
203#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
204pub struct AuthenticationInfo {
205    /// HTTP Authentication Scheme from the [IANA registry](<https://www.iana.org/assignments/http-authschemes/>).
206    /// Examples: `Bearer`, `Basic`, `Digest`.
207    /// Scheme names are case-insensitive per [RFC 9110 Section 11.1](<https://www.rfc-editor.org/rfc/rfc9110#section-11.1>).
208    #[prost(string, tag = "1")]
209    pub scheme: ::prost::alloc::string::String,
210    /// Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
211    #[prost(string, tag = "2")]
212    pub credentials: ::prost::alloc::string::String,
213}
214/// Declares a combination of a target URL, transport and protocol version for interacting with the agent.
215/// This allows agents to expose the same functionality over multiple protocol binding mechanisms.
216#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
217pub struct AgentInterface {
218    /// The URL where this interface is available. Must be a valid absolute HTTPS URL in production.
219    /// Example: "<https://api.example.com/a2a/v1",> "<https://grpc.example.com/a2a">
220    #[prost(string, tag = "1")]
221    pub url: ::prost::alloc::string::String,
222    /// The protocol binding supported at this URL. This is an open form string, to be
223    /// easily extended for other protocol bindings. The core ones officially
224    /// supported are `JSONRPC`, `GRPC` and `HTTP+JSON`.
225    #[prost(string, tag = "2")]
226    pub protocol_binding: ::prost::alloc::string::String,
227    /// Tenant ID to be used in the request when calling the agent.
228    #[prost(string, tag = "3")]
229    pub tenant: ::prost::alloc::string::String,
230    /// The version of the A2A protocol this interface exposes.
231    /// Use the latest supported minor version per major version.
232    /// Examples: "0.3", "1.0"
233    #[prost(string, tag = "4")]
234    pub protocol_version: ::prost::alloc::string::String,
235}
236/// A self-describing manifest for an agent. It provides essential
237/// metadata including the agent's identity, capabilities, skills, supported
238/// communication methods, and security requirements.
239/// Next ID: 20
240#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct AgentCard {
242    /// A human readable name for the agent.
243    /// Example: "Recipe Agent"
244    #[prost(string, tag = "1")]
245    pub name: ::prost::alloc::string::String,
246    /// A human-readable description of the agent, assisting users and other agents
247    /// in understanding its purpose.
248    /// Example: "Agent that helps users with recipes and cooking."
249    #[prost(string, tag = "2")]
250    pub description: ::prost::alloc::string::String,
251    /// Ordered list of supported interfaces. The first entry is preferred.
252    #[prost(message, repeated, tag = "3")]
253    pub supported_interfaces: ::prost::alloc::vec::Vec<AgentInterface>,
254    /// The service provider of the agent.
255    #[prost(message, optional, tag = "4")]
256    pub provider: ::core::option::Option<AgentProvider>,
257    /// The version of the agent.
258    /// Example: "1.0.0"
259    #[prost(string, tag = "5")]
260    pub version: ::prost::alloc::string::String,
261    /// A URL providing additional documentation about the agent.
262    #[prost(string, optional, tag = "6")]
263    pub documentation_url: ::core::option::Option<::prost::alloc::string::String>,
264    /// A2A Capability set supported by the agent.
265    #[prost(message, optional, tag = "7")]
266    pub capabilities: ::core::option::Option<AgentCapabilities>,
267    /// The security scheme details used for authenticating with this agent.
268    #[prost(map = "string, message", tag = "8")]
269    pub security_schemes: ::std::collections::HashMap<
270        ::prost::alloc::string::String,
271        SecurityScheme,
272    >,
273    /// Security requirements for contacting the agent.
274    #[prost(message, repeated, tag = "9")]
275    pub security_requirements: ::prost::alloc::vec::Vec<SecurityRequirement>,
276    /// protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
277    /// The set of interaction modes that the agent supports across all skills.
278    /// This can be overridden per skill. Defined as media types.
279    #[prost(string, repeated, tag = "10")]
280    pub default_input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
281    /// The media types supported as outputs from this agent.
282    #[prost(string, repeated, tag = "11")]
283    pub default_output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
284    /// Skills represent the abilities of an agent.
285    /// It is largely a descriptive concept but represents a more focused set of behaviors that the
286    /// agent is likely to succeed at.
287    #[prost(message, repeated, tag = "12")]
288    pub skills: ::prost::alloc::vec::Vec<AgentSkill>,
289    /// JSON Web Signatures computed for this `AgentCard`.
290    #[prost(message, repeated, tag = "13")]
291    pub signatures: ::prost::alloc::vec::Vec<AgentCardSignature>,
292    /// Optional. A URL to an icon for the agent.
293    #[prost(string, optional, tag = "14")]
294    pub icon_url: ::core::option::Option<::prost::alloc::string::String>,
295}
296/// Represents the service provider of an agent.
297#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
298pub struct AgentProvider {
299    /// A URL for the agent provider's website or relevant documentation.
300    /// Example: "<https://ai.google.dev">
301    #[prost(string, tag = "1")]
302    pub url: ::prost::alloc::string::String,
303    /// The name of the agent provider's organization.
304    /// Example: "Google"
305    #[prost(string, tag = "2")]
306    pub organization: ::prost::alloc::string::String,
307}
308/// Defines optional capabilities supported by an agent.
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct AgentCapabilities {
311    /// Indicates if the agent supports streaming responses.
312    #[prost(bool, optional, tag = "1")]
313    pub streaming: ::core::option::Option<bool>,
314    /// Indicates if the agent supports sending push notifications for asynchronous task updates.
315    #[prost(bool, optional, tag = "2")]
316    pub push_notifications: ::core::option::Option<bool>,
317    /// A list of protocol extensions supported by the agent.
318    #[prost(message, repeated, tag = "3")]
319    pub extensions: ::prost::alloc::vec::Vec<AgentExtension>,
320    /// Indicates if the agent supports providing an extended agent card when authenticated.
321    #[prost(bool, optional, tag = "4")]
322    pub extended_agent_card: ::core::option::Option<bool>,
323}
324/// A declaration of a protocol extension supported by an Agent.
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct AgentExtension {
327    /// The unique URI identifying the extension.
328    #[prost(string, tag = "1")]
329    pub uri: ::prost::alloc::string::String,
330    /// A human-readable description of how this agent uses the extension.
331    #[prost(string, tag = "2")]
332    pub description: ::prost::alloc::string::String,
333    /// If true, the client must understand and comply with the extension's requirements.
334    #[prost(bool, tag = "3")]
335    pub required: bool,
336    /// Optional. Extension-specific configuration parameters.
337    #[prost(message, optional, tag = "4")]
338    pub params: ::core::option::Option<::prost_types::Struct>,
339}
340/// Represents a distinct capability or function that an agent can perform.
341#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct AgentSkill {
343    /// A unique identifier for the agent's skill.
344    #[prost(string, tag = "1")]
345    pub id: ::prost::alloc::string::String,
346    /// A human-readable name for the skill.
347    #[prost(string, tag = "2")]
348    pub name: ::prost::alloc::string::String,
349    /// A detailed description of the skill.
350    #[prost(string, tag = "3")]
351    pub description: ::prost::alloc::string::String,
352    /// A set of keywords describing the skill's capabilities.
353    #[prost(string, repeated, tag = "4")]
354    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
355    /// Example prompts or scenarios that this skill can handle.
356    #[prost(string, repeated, tag = "5")]
357    pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
358    /// The set of supported input media types for this skill, overriding the agent's defaults.
359    #[prost(string, repeated, tag = "6")]
360    pub input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
361    /// The set of supported output media types for this skill, overriding the agent's defaults.
362    #[prost(string, repeated, tag = "7")]
363    pub output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
364    /// Security schemes necessary for this skill.
365    #[prost(message, repeated, tag = "8")]
366    pub security_requirements: ::prost::alloc::vec::Vec<SecurityRequirement>,
367}
368/// AgentCardSignature represents a JWS signature of an AgentCard.
369/// This follows the JSON format of an RFC 7515 JSON Web Signature (JWS).
370#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct AgentCardSignature {
372    /// (-- api-linter: core::0140::reserved-words=disabled
373    /// aip.dev/not-precedent: Backwards compatibility --)
374    /// Required. The protected JWS header for the signature. This is always a
375    /// base64url-encoded JSON object.
376    #[prost(string, tag = "1")]
377    pub protected: ::prost::alloc::string::String,
378    /// Required. The computed signature, base64url-encoded.
379    #[prost(string, tag = "2")]
380    pub signature: ::prost::alloc::string::String,
381    /// The unprotected JWS header values.
382    #[prost(message, optional, tag = "3")]
383    pub header: ::core::option::Option<::prost_types::Struct>,
384}
385/// A container associating a push notification configuration with a specific task.
386#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
387pub struct TaskPushNotificationConfig {
388    /// Optional. Tenant ID.
389    #[prost(string, tag = "1")]
390    pub tenant: ::prost::alloc::string::String,
391    /// The push notification configuration details.
392    /// A unique identifier (e.g. UUID) for this push notification configuration.
393    #[prost(string, tag = "2")]
394    pub id: ::prost::alloc::string::String,
395    /// The ID of the task this configuration is associated with.
396    #[prost(string, tag = "3")]
397    pub task_id: ::prost::alloc::string::String,
398    /// The URL where the notification should be sent.
399    #[prost(string, tag = "4")]
400    pub url: ::prost::alloc::string::String,
401    /// A token unique for this task or session.
402    #[prost(string, tag = "5")]
403    pub token: ::prost::alloc::string::String,
404    /// Authentication information required to send the notification.
405    #[prost(message, optional, tag = "6")]
406    pub authentication: ::core::option::Option<AuthenticationInfo>,
407}
408/// protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
409/// A list of strings.
410#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
411pub struct StringList {
412    /// The individual string values.
413    #[prost(string, repeated, tag = "1")]
414    pub list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
415}
416/// Defines the security requirements for an agent.
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct SecurityRequirement {
419    /// A map of security schemes to the required scopes.
420    #[prost(map = "string, message", tag = "1")]
421    pub schemes: ::std::collections::HashMap<::prost::alloc::string::String, StringList>,
422}
423/// Defines a security scheme that can be used to secure an agent's endpoints.
424/// This is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object.
425/// See: <https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object>
426#[derive(Clone, PartialEq, ::prost::Message)]
427pub struct SecurityScheme {
428    #[prost(oneof = "security_scheme::Scheme", tags = "1, 2, 3, 4, 5")]
429    pub scheme: ::core::option::Option<security_scheme::Scheme>,
430}
431/// Nested message and enum types in `SecurityScheme`.
432pub mod security_scheme {
433    #[derive(Clone, PartialEq, ::prost::Oneof)]
434    pub enum Scheme {
435        /// API key-based authentication.
436        #[prost(message, tag = "1")]
437        ApiKeySecurityScheme(super::ApiKeySecurityScheme),
438        /// HTTP authentication (Basic, Bearer, etc.).
439        #[prost(message, tag = "2")]
440        HttpAuthSecurityScheme(super::HttpAuthSecurityScheme),
441        /// OAuth 2.0 authentication.
442        #[prost(message, tag = "3")]
443        Oauth2SecurityScheme(super::OAuth2SecurityScheme),
444        /// OpenID Connect authentication.
445        #[prost(message, tag = "4")]
446        OpenIdConnectSecurityScheme(super::OpenIdConnectSecurityScheme),
447        /// Mutual TLS authentication.
448        #[prost(message, tag = "5")]
449        MtlsSecurityScheme(super::MutualTlsSecurityScheme),
450    }
451}
452/// Defines a security scheme using an API key.
453#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
454pub struct ApiKeySecurityScheme {
455    /// An optional description for the security scheme.
456    #[prost(string, tag = "1")]
457    pub description: ::prost::alloc::string::String,
458    /// The location of the API key. Valid values are "query", "header", or "cookie".
459    #[prost(string, tag = "2")]
460    pub location: ::prost::alloc::string::String,
461    /// The name of the header, query, or cookie parameter to be used.
462    #[prost(string, tag = "3")]
463    pub name: ::prost::alloc::string::String,
464}
465/// Defines a security scheme using HTTP authentication.
466#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
467pub struct HttpAuthSecurityScheme {
468    /// An optional description for the security scheme.
469    #[prost(string, tag = "1")]
470    pub description: ::prost::alloc::string::String,
471    /// The name of the HTTP Authentication scheme to be used in the Authorization header,
472    /// as defined in RFC7235 (e.g., "Bearer").
473    /// This value should be registered in the IANA Authentication Scheme registry.
474    #[prost(string, tag = "2")]
475    pub scheme: ::prost::alloc::string::String,
476    /// A hint to the client to identify how the bearer token is formatted (e.g., "JWT").
477    /// Primarily for documentation purposes.
478    #[prost(string, tag = "3")]
479    pub bearer_format: ::prost::alloc::string::String,
480}
481/// Defines a security scheme using OAuth 2.0.
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct OAuth2SecurityScheme {
484    /// An optional description for the security scheme.
485    #[prost(string, tag = "1")]
486    pub description: ::prost::alloc::string::String,
487    /// An object containing configuration information for the supported OAuth 2.0 flows.
488    #[prost(message, optional, tag = "2")]
489    pub flows: ::core::option::Option<OAuthFlows>,
490    /// URL to the OAuth2 authorization server metadata [RFC 8414](<https://datatracker.ietf.org/doc/html/rfc8414>).
491    /// TLS is required.
492    #[prost(string, tag = "3")]
493    pub oauth2_metadata_url: ::prost::alloc::string::String,
494}
495/// Defines a security scheme using OpenID Connect.
496#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
497pub struct OpenIdConnectSecurityScheme {
498    /// An optional description for the security scheme.
499    #[prost(string, tag = "1")]
500    pub description: ::prost::alloc::string::String,
501    /// The [OpenID Connect Discovery URL](<https://openid.net/specs/openid-connect-discovery-1_0.html>) for the OIDC provider's metadata.
502    #[prost(string, tag = "2")]
503    pub open_id_connect_url: ::prost::alloc::string::String,
504}
505/// Defines a security scheme using mTLS authentication.
506#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
507pub struct MutualTlsSecurityScheme {
508    /// An optional description for the security scheme.
509    #[prost(string, tag = "1")]
510    pub description: ::prost::alloc::string::String,
511}
512/// Defines the configuration for the supported OAuth 2.0 flows.
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct OAuthFlows {
515    #[prost(oneof = "o_auth_flows::Flow", tags = "1, 2, 3, 4, 5")]
516    pub flow: ::core::option::Option<o_auth_flows::Flow>,
517}
518/// Nested message and enum types in `OAuthFlows`.
519pub mod o_auth_flows {
520    #[derive(Clone, PartialEq, ::prost::Oneof)]
521    pub enum Flow {
522        /// Configuration for the OAuth Authorization Code flow.
523        #[prost(message, tag = "1")]
524        AuthorizationCode(super::AuthorizationCodeOAuthFlow),
525        /// Configuration for the OAuth Client Credentials flow.
526        #[prost(message, tag = "2")]
527        ClientCredentials(super::ClientCredentialsOAuthFlow),
528        /// Deprecated: Use Authorization Code + PKCE instead.
529        #[deprecated]
530        #[prost(message, tag = "3")]
531        Implicit(super::ImplicitOAuthFlow),
532        /// Deprecated: Use Authorization Code + PKCE or Device Code.
533        #[deprecated]
534        #[prost(message, tag = "4")]
535        Password(super::PasswordOAuthFlow),
536        /// Configuration for the OAuth Device Code flow.
537        #[prost(message, tag = "5")]
538        DeviceCode(super::DeviceCodeOAuthFlow),
539    }
540}
541/// Defines configuration details for the OAuth 2.0 Authorization Code flow.
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct AuthorizationCodeOAuthFlow {
544    /// The authorization URL to be used for this flow.
545    #[prost(string, tag = "1")]
546    pub authorization_url: ::prost::alloc::string::String,
547    /// The token URL to be used for this flow.
548    #[prost(string, tag = "2")]
549    pub token_url: ::prost::alloc::string::String,
550    /// The URL to be used for obtaining refresh tokens.
551    #[prost(string, tag = "3")]
552    pub refresh_url: ::prost::alloc::string::String,
553    /// The available scopes for the OAuth2 security scheme.
554    #[prost(map = "string, string", tag = "4")]
555    pub scopes: ::std::collections::HashMap<
556        ::prost::alloc::string::String,
557        ::prost::alloc::string::String,
558    >,
559    /// Indicates if PKCE (RFC 7636) is required for this flow.
560    /// PKCE should always be used for public clients and is recommended for all clients.
561    #[prost(bool, tag = "5")]
562    pub pkce_required: bool,
563}
564/// Defines configuration details for the OAuth 2.0 Client Credentials flow.
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct ClientCredentialsOAuthFlow {
567    /// The token URL to be used for this flow.
568    #[prost(string, tag = "1")]
569    pub token_url: ::prost::alloc::string::String,
570    /// The URL to be used for obtaining refresh tokens.
571    #[prost(string, tag = "2")]
572    pub refresh_url: ::prost::alloc::string::String,
573    /// The available scopes for the OAuth2 security scheme.
574    #[prost(map = "string, string", tag = "3")]
575    pub scopes: ::std::collections::HashMap<
576        ::prost::alloc::string::String,
577        ::prost::alloc::string::String,
578    >,
579}
580/// Deprecated: Use Authorization Code + PKCE instead.
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct ImplicitOAuthFlow {
583    /// The authorization URL to be used for this flow. This MUST be in the
584    /// form of a URL. The OAuth2 standard requires the use of TLS
585    #[prost(string, tag = "1")]
586    pub authorization_url: ::prost::alloc::string::String,
587    /// The URL to be used for obtaining refresh tokens. This MUST be in the
588    /// form of a URL. The OAuth2 standard requires the use of TLS.
589    #[prost(string, tag = "2")]
590    pub refresh_url: ::prost::alloc::string::String,
591    /// The available scopes for the OAuth2 security scheme. A map between the
592    /// scope name and a short description for it. The map MAY be empty.
593    #[prost(map = "string, string", tag = "3")]
594    pub scopes: ::std::collections::HashMap<
595        ::prost::alloc::string::String,
596        ::prost::alloc::string::String,
597    >,
598}
599/// Deprecated: Use Authorization Code + PKCE or Device Code.
600#[derive(Clone, PartialEq, ::prost::Message)]
601pub struct PasswordOAuthFlow {
602    /// The token URL to be used for this flow. This MUST be in the form of a URL.
603    /// The OAuth2 standard requires the use of TLS.
604    #[prost(string, tag = "1")]
605    pub token_url: ::prost::alloc::string::String,
606    /// The URL to be used for obtaining refresh tokens. This MUST be in the
607    /// form of a URL. The OAuth2 standard requires the use of TLS.
608    #[prost(string, tag = "2")]
609    pub refresh_url: ::prost::alloc::string::String,
610    /// The available scopes for the OAuth2 security scheme. A map between the
611    /// scope name and a short description for it. The map MAY be empty.
612    #[prost(map = "string, string", tag = "3")]
613    pub scopes: ::std::collections::HashMap<
614        ::prost::alloc::string::String,
615        ::prost::alloc::string::String,
616    >,
617}
618/// Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).
619/// This flow is designed for input-constrained devices such as IoT devices,
620/// and CLI tools where the user authenticates on a separate device.
621#[derive(Clone, PartialEq, ::prost::Message)]
622pub struct DeviceCodeOAuthFlow {
623    /// The device authorization endpoint URL.
624    #[prost(string, tag = "1")]
625    pub device_authorization_url: ::prost::alloc::string::String,
626    /// The token URL to be used for this flow.
627    #[prost(string, tag = "2")]
628    pub token_url: ::prost::alloc::string::String,
629    /// The URL to be used for obtaining refresh tokens.
630    #[prost(string, tag = "3")]
631    pub refresh_url: ::prost::alloc::string::String,
632    /// The available scopes for the OAuth2 security scheme.
633    #[prost(map = "string, string", tag = "4")]
634    pub scopes: ::std::collections::HashMap<
635        ::prost::alloc::string::String,
636        ::prost::alloc::string::String,
637    >,
638}
639/// Represents a request for the `SendMessage` method.
640#[derive(Clone, PartialEq, ::prost::Message)]
641pub struct SendMessageRequest {
642    /// Optional. Tenant ID, provided as a path parameter.
643    #[prost(string, tag = "1")]
644    pub tenant: ::prost::alloc::string::String,
645    /// The message to send to the agent.
646    #[prost(message, optional, tag = "2")]
647    pub message: ::core::option::Option<Message>,
648    /// Configuration for the send request.
649    #[prost(message, optional, tag = "3")]
650    pub configuration: ::core::option::Option<SendMessageConfiguration>,
651    /// A flexible key-value map for passing additional context or parameters.
652    #[prost(message, optional, tag = "4")]
653    pub metadata: ::core::option::Option<::prost_types::Struct>,
654}
655/// Represents a request for the `GetTask` method.
656#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct GetTaskRequest {
658    /// Optional. Tenant ID, provided as a path parameter.
659    #[prost(string, tag = "1")]
660    pub tenant: ::prost::alloc::string::String,
661    /// The resource ID of the task to retrieve.
662    #[prost(string, tag = "2")]
663    pub id: ::prost::alloc::string::String,
664    /// The maximum number of most recent messages from the task's history to retrieve. An
665    /// unset value means the client does not impose any limit. A value of zero is
666    /// a request to not include any messages. The server MUST NOT return more
667    /// messages than the provided value, but MAY apply a lower limit.
668    #[prost(int32, optional, tag = "3")]
669    pub history_length: ::core::option::Option<i32>,
670}
671/// Parameters for listing tasks with optional filtering criteria.
672#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
673pub struct ListTasksRequest {
674    /// Tenant ID, provided as a path parameter.
675    #[prost(string, tag = "1")]
676    pub tenant: ::prost::alloc::string::String,
677    /// Filter tasks by context ID to get tasks from a specific conversation or session.
678    #[prost(string, tag = "2")]
679    pub context_id: ::prost::alloc::string::String,
680    /// Filter tasks by their current status state.
681    #[prost(enumeration = "TaskState", tag = "3")]
682    pub status: i32,
683    /// The maximum number of tasks to return. The service may return fewer than this value.
684    /// If unspecified, at most 50 tasks will be returned.
685    /// The minimum value is 1.
686    /// The maximum value is 100.
687    #[prost(int32, optional, tag = "4")]
688    pub page_size: ::core::option::Option<i32>,
689    /// A page token, received from a previous `ListTasks` call.
690    /// `ListTasksResponse.next_page_token`.
691    /// Provide this to retrieve the subsequent page.
692    #[prost(string, tag = "5")]
693    pub page_token: ::prost::alloc::string::String,
694    /// The maximum number of messages to include in each task's history.
695    #[prost(int32, optional, tag = "6")]
696    pub history_length: ::core::option::Option<i32>,
697    /// Filter tasks which have a status updated after the provided timestamp in ISO 8601 format (e.g., "2023-10-27T10:00:00Z").
698    /// Only tasks with a status timestamp time greater than or equal to this value will be returned.
699    #[prost(message, optional, tag = "7")]
700    pub status_timestamp_after: ::core::option::Option<::prost_types::Timestamp>,
701    /// Whether to include artifacts in the returned tasks.
702    /// Defaults to false to reduce payload size.
703    #[prost(bool, optional, tag = "8")]
704    pub include_artifacts: ::core::option::Option<bool>,
705}
706/// Result object for `ListTasks` method containing an array of tasks and pagination information.
707#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct ListTasksResponse {
709    /// Array of tasks matching the specified criteria.
710    #[prost(message, repeated, tag = "1")]
711    pub tasks: ::prost::alloc::vec::Vec<Task>,
712    /// A token to retrieve the next page of results, or empty if there are no more results in the list.
713    #[prost(string, tag = "2")]
714    pub next_page_token: ::prost::alloc::string::String,
715    /// The page size used for this response.
716    #[prost(int32, tag = "3")]
717    pub page_size: i32,
718    /// Total number of tasks available (before pagination).
719    #[prost(int32, tag = "4")]
720    pub total_size: i32,
721}
722/// Represents a request for the `CancelTask` method.
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct CancelTaskRequest {
725    /// Optional. Tenant ID, provided as a path parameter.
726    #[prost(string, tag = "1")]
727    pub tenant: ::prost::alloc::string::String,
728    /// The resource ID of the task to cancel.
729    #[prost(string, tag = "2")]
730    pub id: ::prost::alloc::string::String,
731    /// A flexible key-value map for passing additional context or parameters.
732    #[prost(message, optional, tag = "3")]
733    pub metadata: ::core::option::Option<::prost_types::Struct>,
734}
735/// Represents a request for the `GetTaskPushNotificationConfig` method.
736#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
737pub struct GetTaskPushNotificationConfigRequest {
738    /// Optional. Tenant ID, provided as a path parameter.
739    #[prost(string, tag = "1")]
740    pub tenant: ::prost::alloc::string::String,
741    /// The parent task resource ID.
742    #[prost(string, tag = "2")]
743    pub task_id: ::prost::alloc::string::String,
744    /// The resource ID of the configuration to retrieve.
745    #[prost(string, tag = "3")]
746    pub id: ::prost::alloc::string::String,
747}
748/// Represents a request for the `DeleteTaskPushNotificationConfig` method.
749#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
750pub struct DeleteTaskPushNotificationConfigRequest {
751    /// Optional. Tenant ID, provided as a path parameter.
752    #[prost(string, tag = "1")]
753    pub tenant: ::prost::alloc::string::String,
754    /// The parent task resource ID.
755    #[prost(string, tag = "2")]
756    pub task_id: ::prost::alloc::string::String,
757    /// The resource ID of the configuration to delete.
758    #[prost(string, tag = "3")]
759    pub id: ::prost::alloc::string::String,
760}
761/// Represents a request for the `SubscribeToTask` method.
762#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
763pub struct SubscribeToTaskRequest {
764    /// Optional. Tenant ID, provided as a path parameter.
765    #[prost(string, tag = "1")]
766    pub tenant: ::prost::alloc::string::String,
767    /// The resource ID of the task to subscribe to.
768    #[prost(string, tag = "2")]
769    pub id: ::prost::alloc::string::String,
770}
771/// Represents a request for the `ListTaskPushNotificationConfigs` method.
772#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
773pub struct ListTaskPushNotificationConfigsRequest {
774    /// Optional. Tenant ID, provided as a path parameter.
775    #[prost(string, tag = "4")]
776    pub tenant: ::prost::alloc::string::String,
777    /// The parent task resource ID.
778    #[prost(string, tag = "1")]
779    pub task_id: ::prost::alloc::string::String,
780    /// The maximum number of configurations to return.
781    #[prost(int32, tag = "2")]
782    pub page_size: i32,
783    /// A page token received from a previous `ListTaskPushNotificationConfigsRequest` call.
784    #[prost(string, tag = "3")]
785    pub page_token: ::prost::alloc::string::String,
786}
787/// Represents a request for the `GetExtendedAgentCard` method.
788#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
789pub struct GetExtendedAgentCardRequest {
790    /// Optional. Tenant ID, provided as a path parameter.
791    #[prost(string, tag = "1")]
792    pub tenant: ::prost::alloc::string::String,
793}
794/// Represents the response for the `SendMessage` method.
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct SendMessageResponse {
797    /// The payload of the response.
798    #[prost(oneof = "send_message_response::Payload", tags = "1, 2")]
799    pub payload: ::core::option::Option<send_message_response::Payload>,
800}
801/// Nested message and enum types in `SendMessageResponse`.
802pub mod send_message_response {
803    /// The payload of the response.
804    #[derive(Clone, PartialEq, ::prost::Oneof)]
805    pub enum Payload {
806        /// The task created or updated by the message.
807        #[prost(message, tag = "1")]
808        Task(super::Task),
809        /// A message from the agent.
810        #[prost(message, tag = "2")]
811        Message(super::Message),
812    }
813}
814/// A wrapper object used in streaming operations to encapsulate different types of response data.
815#[derive(Clone, PartialEq, ::prost::Message)]
816pub struct StreamResponse {
817    /// The payload of the stream response.
818    #[prost(oneof = "stream_response::Payload", tags = "1, 2, 3, 4")]
819    pub payload: ::core::option::Option<stream_response::Payload>,
820}
821/// Nested message and enum types in `StreamResponse`.
822pub mod stream_response {
823    /// The payload of the stream response.
824    #[derive(Clone, PartialEq, ::prost::Oneof)]
825    pub enum Payload {
826        /// A Task object containing the current state of the task.
827        #[prost(message, tag = "1")]
828        Task(super::Task),
829        /// A Message object containing a message from the agent.
830        #[prost(message, tag = "2")]
831        Message(super::Message),
832        /// An event indicating a task status update.
833        #[prost(message, tag = "3")]
834        StatusUpdate(super::TaskStatusUpdateEvent),
835        /// An event indicating a task artifact update.
836        #[prost(message, tag = "4")]
837        ArtifactUpdate(super::TaskArtifactUpdateEvent),
838    }
839}
840/// Represents a successful response for the `ListTaskPushNotificationConfigs`
841/// method.
842#[derive(Clone, PartialEq, ::prost::Message)]
843pub struct ListTaskPushNotificationConfigsResponse {
844    /// The list of push notification configurations.
845    #[prost(message, repeated, tag = "1")]
846    pub configs: ::prost::alloc::vec::Vec<TaskPushNotificationConfig>,
847    /// A token to retrieve the next page of results, or empty if there are no more results in the list.
848    #[prost(string, tag = "2")]
849    pub next_page_token: ::prost::alloc::string::String,
850}
851/// Defines the possible lifecycle states of a `Task`.
852#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
853#[repr(i32)]
854pub enum TaskState {
855    /// The task is in an unknown or indeterminate state.
856    Unspecified = 0,
857    /// Indicates that a task has been successfully submitted and acknowledged.
858    Submitted = 1,
859    /// Indicates that a task is actively being processed by the agent.
860    Working = 2,
861    /// Indicates that a task has finished successfully. This is a terminal state.
862    Completed = 3,
863    /// Indicates that a task has finished with an error. This is a terminal state.
864    Failed = 4,
865    /// Indicates that a task was canceled before completion. This is a terminal state.
866    Canceled = 5,
867    /// Indicates that the agent requires additional user input to proceed. This is an interrupted state.
868    InputRequired = 6,
869    /// Indicates that the agent has decided to not perform the task.
870    /// This may be done during initial task creation or later once an agent
871    /// has determined it can't or won't proceed. This is a terminal state.
872    Rejected = 7,
873    /// Indicates that authentication is required to proceed. This is an interrupted state.
874    AuthRequired = 8,
875}
876impl TaskState {
877    /// String value of the enum field names used in the ProtoBuf definition.
878    ///
879    /// The values are not transformed in any way and thus are considered stable
880    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
881    pub fn as_str_name(&self) -> &'static str {
882        match self {
883            Self::Unspecified => "TASK_STATE_UNSPECIFIED",
884            Self::Submitted => "TASK_STATE_SUBMITTED",
885            Self::Working => "TASK_STATE_WORKING",
886            Self::Completed => "TASK_STATE_COMPLETED",
887            Self::Failed => "TASK_STATE_FAILED",
888            Self::Canceled => "TASK_STATE_CANCELED",
889            Self::InputRequired => "TASK_STATE_INPUT_REQUIRED",
890            Self::Rejected => "TASK_STATE_REJECTED",
891            Self::AuthRequired => "TASK_STATE_AUTH_REQUIRED",
892        }
893    }
894    /// Creates an enum from field names used in the ProtoBuf definition.
895    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
896        match value {
897            "TASK_STATE_UNSPECIFIED" => Some(Self::Unspecified),
898            "TASK_STATE_SUBMITTED" => Some(Self::Submitted),
899            "TASK_STATE_WORKING" => Some(Self::Working),
900            "TASK_STATE_COMPLETED" => Some(Self::Completed),
901            "TASK_STATE_FAILED" => Some(Self::Failed),
902            "TASK_STATE_CANCELED" => Some(Self::Canceled),
903            "TASK_STATE_INPUT_REQUIRED" => Some(Self::InputRequired),
904            "TASK_STATE_REJECTED" => Some(Self::Rejected),
905            "TASK_STATE_AUTH_REQUIRED" => Some(Self::AuthRequired),
906            _ => None,
907        }
908    }
909}
910/// Defines the sender of a message in A2A protocol communication.
911#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
912#[repr(i32)]
913pub enum Role {
914    /// The role is unspecified.
915    Unspecified = 0,
916    /// The message is from the client to the server.
917    User = 1,
918    /// The message is from the server to the client.
919    Agent = 2,
920}
921impl Role {
922    /// String value of the enum field names used in the ProtoBuf definition.
923    ///
924    /// The values are not transformed in any way and thus are considered stable
925    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
926    pub fn as_str_name(&self) -> &'static str {
927        match self {
928            Self::Unspecified => "ROLE_UNSPECIFIED",
929            Self::User => "ROLE_USER",
930            Self::Agent => "ROLE_AGENT",
931        }
932    }
933    /// Creates an enum from field names used in the ProtoBuf definition.
934    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
935        match value {
936            "ROLE_UNSPECIFIED" => Some(Self::Unspecified),
937            "ROLE_USER" => Some(Self::User),
938            "ROLE_AGENT" => Some(Self::Agent),
939            _ => None,
940        }
941    }
942}
943/// Generated client implementations.
944pub mod a2a_service_client {
945    #![allow(
946        unused_variables,
947        dead_code,
948        missing_docs,
949        clippy::wildcard_imports,
950        clippy::let_unit_value,
951    )]
952    use tonic::codegen::*;
953    use tonic::codegen::http::Uri;
954    /// Provides operations for interacting with agents using the A2A protocol.
955    #[derive(Debug, Clone)]
956    pub struct A2aServiceClient<T> {
957        inner: tonic::client::Grpc<T>,
958    }
959    impl A2aServiceClient<tonic::transport::Channel> {
960        /// Attempt to create a new client by connecting to a given endpoint.
961        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
962        where
963            D: TryInto<tonic::transport::Endpoint>,
964            D::Error: Into<StdError>,
965        {
966            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
967            Ok(Self::new(conn))
968        }
969    }
970    impl<T> A2aServiceClient<T>
971    where
972        T: tonic::client::GrpcService<tonic::body::Body>,
973        T::Error: Into<StdError>,
974        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
975        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
976    {
977        pub fn new(inner: T) -> Self {
978            let inner = tonic::client::Grpc::new(inner);
979            Self { inner }
980        }
981        pub fn with_origin(inner: T, origin: Uri) -> Self {
982            let inner = tonic::client::Grpc::with_origin(inner, origin);
983            Self { inner }
984        }
985        pub fn with_interceptor<F>(
986            inner: T,
987            interceptor: F,
988        ) -> A2aServiceClient<InterceptedService<T, F>>
989        where
990            F: tonic::service::Interceptor,
991            T::ResponseBody: Default,
992            T: tonic::codegen::Service<
993                http::Request<tonic::body::Body>,
994                Response = http::Response<
995                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
996                >,
997            >,
998            <T as tonic::codegen::Service<
999                http::Request<tonic::body::Body>,
1000            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1001        {
1002            A2aServiceClient::new(InterceptedService::new(inner, interceptor))
1003        }
1004        /// Compress requests with the given encoding.
1005        ///
1006        /// This requires the server to support it otherwise it might respond with an
1007        /// error.
1008        #[must_use]
1009        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1010            self.inner = self.inner.send_compressed(encoding);
1011            self
1012        }
1013        /// Enable decompressing responses.
1014        #[must_use]
1015        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1016            self.inner = self.inner.accept_compressed(encoding);
1017            self
1018        }
1019        /// Limits the maximum size of a decoded message.
1020        ///
1021        /// Default: `4MB`
1022        #[must_use]
1023        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1024            self.inner = self.inner.max_decoding_message_size(limit);
1025            self
1026        }
1027        /// Limits the maximum size of an encoded message.
1028        ///
1029        /// Default: `usize::MAX`
1030        #[must_use]
1031        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1032            self.inner = self.inner.max_encoding_message_size(limit);
1033            self
1034        }
1035        /// Sends a message to an agent.
1036        pub async fn send_message(
1037            &mut self,
1038            request: impl tonic::IntoRequest<super::SendMessageRequest>,
1039        ) -> std::result::Result<
1040            tonic::Response<super::SendMessageResponse>,
1041            tonic::Status,
1042        > {
1043            self.inner
1044                .ready()
1045                .await
1046                .map_err(|e| {
1047                    tonic::Status::unknown(
1048                        format!("Service was not ready: {}", e.into()),
1049                    )
1050                })?;
1051            let codec = tonic_prost::ProstCodec::default();
1052            let path = http::uri::PathAndQuery::from_static(
1053                "/lf.a2a.v1.A2AService/SendMessage",
1054            );
1055            let mut req = request.into_request();
1056            req.extensions_mut()
1057                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "SendMessage"));
1058            self.inner.unary(req, path, codec).await
1059        }
1060        /// Sends a streaming message to an agent, allowing for real-time interaction and status updates.
1061        /// Streaming version of `SendMessage`
1062        pub async fn send_streaming_message(
1063            &mut self,
1064            request: impl tonic::IntoRequest<super::SendMessageRequest>,
1065        ) -> std::result::Result<
1066            tonic::Response<tonic::codec::Streaming<super::StreamResponse>>,
1067            tonic::Status,
1068        > {
1069            self.inner
1070                .ready()
1071                .await
1072                .map_err(|e| {
1073                    tonic::Status::unknown(
1074                        format!("Service was not ready: {}", e.into()),
1075                    )
1076                })?;
1077            let codec = tonic_prost::ProstCodec::default();
1078            let path = http::uri::PathAndQuery::from_static(
1079                "/lf.a2a.v1.A2AService/SendStreamingMessage",
1080            );
1081            let mut req = request.into_request();
1082            req.extensions_mut()
1083                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "SendStreamingMessage"));
1084            self.inner.server_streaming(req, path, codec).await
1085        }
1086        /// Gets the latest state of a task.
1087        pub async fn get_task(
1088            &mut self,
1089            request: impl tonic::IntoRequest<super::GetTaskRequest>,
1090        ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status> {
1091            self.inner
1092                .ready()
1093                .await
1094                .map_err(|e| {
1095                    tonic::Status::unknown(
1096                        format!("Service was not ready: {}", e.into()),
1097                    )
1098                })?;
1099            let codec = tonic_prost::ProstCodec::default();
1100            let path = http::uri::PathAndQuery::from_static(
1101                "/lf.a2a.v1.A2AService/GetTask",
1102            );
1103            let mut req = request.into_request();
1104            req.extensions_mut()
1105                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "GetTask"));
1106            self.inner.unary(req, path, codec).await
1107        }
1108        /// Lists tasks that match the specified filter.
1109        pub async fn list_tasks(
1110            &mut self,
1111            request: impl tonic::IntoRequest<super::ListTasksRequest>,
1112        ) -> std::result::Result<
1113            tonic::Response<super::ListTasksResponse>,
1114            tonic::Status,
1115        > {
1116            self.inner
1117                .ready()
1118                .await
1119                .map_err(|e| {
1120                    tonic::Status::unknown(
1121                        format!("Service was not ready: {}", e.into()),
1122                    )
1123                })?;
1124            let codec = tonic_prost::ProstCodec::default();
1125            let path = http::uri::PathAndQuery::from_static(
1126                "/lf.a2a.v1.A2AService/ListTasks",
1127            );
1128            let mut req = request.into_request();
1129            req.extensions_mut()
1130                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "ListTasks"));
1131            self.inner.unary(req, path, codec).await
1132        }
1133        /// Cancels a task in progress.
1134        pub async fn cancel_task(
1135            &mut self,
1136            request: impl tonic::IntoRequest<super::CancelTaskRequest>,
1137        ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status> {
1138            self.inner
1139                .ready()
1140                .await
1141                .map_err(|e| {
1142                    tonic::Status::unknown(
1143                        format!("Service was not ready: {}", e.into()),
1144                    )
1145                })?;
1146            let codec = tonic_prost::ProstCodec::default();
1147            let path = http::uri::PathAndQuery::from_static(
1148                "/lf.a2a.v1.A2AService/CancelTask",
1149            );
1150            let mut req = request.into_request();
1151            req.extensions_mut()
1152                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "CancelTask"));
1153            self.inner.unary(req, path, codec).await
1154        }
1155        /// Subscribes to task updates for tasks not in a terminal state.
1156        /// Returns `UnsupportedOperationError` if the task is already in a terminal state (completed, failed, canceled, rejected).
1157        pub async fn subscribe_to_task(
1158            &mut self,
1159            request: impl tonic::IntoRequest<super::SubscribeToTaskRequest>,
1160        ) -> std::result::Result<
1161            tonic::Response<tonic::codec::Streaming<super::StreamResponse>>,
1162            tonic::Status,
1163        > {
1164            self.inner
1165                .ready()
1166                .await
1167                .map_err(|e| {
1168                    tonic::Status::unknown(
1169                        format!("Service was not ready: {}", e.into()),
1170                    )
1171                })?;
1172            let codec = tonic_prost::ProstCodec::default();
1173            let path = http::uri::PathAndQuery::from_static(
1174                "/lf.a2a.v1.A2AService/SubscribeToTask",
1175            );
1176            let mut req = request.into_request();
1177            req.extensions_mut()
1178                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "SubscribeToTask"));
1179            self.inner.server_streaming(req, path, codec).await
1180        }
1181        /// (-- api-linter: client-libraries::4232::required-fields=disabled
1182        /// api-linter: core::0133::method-signature=disabled
1183        /// api-linter: core::0133::request-message-name=disabled
1184        /// aip.dev/not-precedent: method_signature preserved for backwards compatibility --)
1185        /// Creates a push notification config for a task.
1186        pub async fn create_task_push_notification_config(
1187            &mut self,
1188            request: impl tonic::IntoRequest<super::TaskPushNotificationConfig>,
1189        ) -> std::result::Result<
1190            tonic::Response<super::TaskPushNotificationConfig>,
1191            tonic::Status,
1192        > {
1193            self.inner
1194                .ready()
1195                .await
1196                .map_err(|e| {
1197                    tonic::Status::unknown(
1198                        format!("Service was not ready: {}", e.into()),
1199                    )
1200                })?;
1201            let codec = tonic_prost::ProstCodec::default();
1202            let path = http::uri::PathAndQuery::from_static(
1203                "/lf.a2a.v1.A2AService/CreateTaskPushNotificationConfig",
1204            );
1205            let mut req = request.into_request();
1206            req.extensions_mut()
1207                .insert(
1208                    GrpcMethod::new(
1209                        "lf.a2a.v1.A2AService",
1210                        "CreateTaskPushNotificationConfig",
1211                    ),
1212                );
1213            self.inner.unary(req, path, codec).await
1214        }
1215        /// Gets a push notification config for a task.
1216        pub async fn get_task_push_notification_config(
1217            &mut self,
1218            request: impl tonic::IntoRequest<super::GetTaskPushNotificationConfigRequest>,
1219        ) -> std::result::Result<
1220            tonic::Response<super::TaskPushNotificationConfig>,
1221            tonic::Status,
1222        > {
1223            self.inner
1224                .ready()
1225                .await
1226                .map_err(|e| {
1227                    tonic::Status::unknown(
1228                        format!("Service was not ready: {}", e.into()),
1229                    )
1230                })?;
1231            let codec = tonic_prost::ProstCodec::default();
1232            let path = http::uri::PathAndQuery::from_static(
1233                "/lf.a2a.v1.A2AService/GetTaskPushNotificationConfig",
1234            );
1235            let mut req = request.into_request();
1236            req.extensions_mut()
1237                .insert(
1238                    GrpcMethod::new(
1239                        "lf.a2a.v1.A2AService",
1240                        "GetTaskPushNotificationConfig",
1241                    ),
1242                );
1243            self.inner.unary(req, path, codec).await
1244        }
1245        /// Get a list of push notifications configured for a task.
1246        pub async fn list_task_push_notification_configs(
1247            &mut self,
1248            request: impl tonic::IntoRequest<
1249                super::ListTaskPushNotificationConfigsRequest,
1250            >,
1251        ) -> std::result::Result<
1252            tonic::Response<super::ListTaskPushNotificationConfigsResponse>,
1253            tonic::Status,
1254        > {
1255            self.inner
1256                .ready()
1257                .await
1258                .map_err(|e| {
1259                    tonic::Status::unknown(
1260                        format!("Service was not ready: {}", e.into()),
1261                    )
1262                })?;
1263            let codec = tonic_prost::ProstCodec::default();
1264            let path = http::uri::PathAndQuery::from_static(
1265                "/lf.a2a.v1.A2AService/ListTaskPushNotificationConfigs",
1266            );
1267            let mut req = request.into_request();
1268            req.extensions_mut()
1269                .insert(
1270                    GrpcMethod::new(
1271                        "lf.a2a.v1.A2AService",
1272                        "ListTaskPushNotificationConfigs",
1273                    ),
1274                );
1275            self.inner.unary(req, path, codec).await
1276        }
1277        /// Gets the extended agent card for the authenticated agent.
1278        pub async fn get_extended_agent_card(
1279            &mut self,
1280            request: impl tonic::IntoRequest<super::GetExtendedAgentCardRequest>,
1281        ) -> std::result::Result<tonic::Response<super::AgentCard>, tonic::Status> {
1282            self.inner
1283                .ready()
1284                .await
1285                .map_err(|e| {
1286                    tonic::Status::unknown(
1287                        format!("Service was not ready: {}", e.into()),
1288                    )
1289                })?;
1290            let codec = tonic_prost::ProstCodec::default();
1291            let path = http::uri::PathAndQuery::from_static(
1292                "/lf.a2a.v1.A2AService/GetExtendedAgentCard",
1293            );
1294            let mut req = request.into_request();
1295            req.extensions_mut()
1296                .insert(GrpcMethod::new("lf.a2a.v1.A2AService", "GetExtendedAgentCard"));
1297            self.inner.unary(req, path, codec).await
1298        }
1299        /// Deletes a push notification config for a task.
1300        pub async fn delete_task_push_notification_config(
1301            &mut self,
1302            request: impl tonic::IntoRequest<
1303                super::DeleteTaskPushNotificationConfigRequest,
1304            >,
1305        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
1306            self.inner
1307                .ready()
1308                .await
1309                .map_err(|e| {
1310                    tonic::Status::unknown(
1311                        format!("Service was not ready: {}", e.into()),
1312                    )
1313                })?;
1314            let codec = tonic_prost::ProstCodec::default();
1315            let path = http::uri::PathAndQuery::from_static(
1316                "/lf.a2a.v1.A2AService/DeleteTaskPushNotificationConfig",
1317            );
1318            let mut req = request.into_request();
1319            req.extensions_mut()
1320                .insert(
1321                    GrpcMethod::new(
1322                        "lf.a2a.v1.A2AService",
1323                        "DeleteTaskPushNotificationConfig",
1324                    ),
1325                );
1326            self.inner.unary(req, path, codec).await
1327        }
1328    }
1329}
1330/// Generated server implementations.
1331pub mod a2a_service_server {
1332    #![allow(
1333        unused_variables,
1334        dead_code,
1335        missing_docs,
1336        clippy::wildcard_imports,
1337        clippy::let_unit_value,
1338    )]
1339    use tonic::codegen::*;
1340    /// Generated trait containing gRPC methods that should be implemented for use with A2aServiceServer.
1341    #[async_trait]
1342    pub trait A2aService: std::marker::Send + std::marker::Sync + 'static {
1343        /// Sends a message to an agent.
1344        async fn send_message(
1345            &self,
1346            request: tonic::Request<super::SendMessageRequest>,
1347        ) -> std::result::Result<
1348            tonic::Response<super::SendMessageResponse>,
1349            tonic::Status,
1350        >;
1351        /// Server streaming response type for the SendStreamingMessage method.
1352        type SendStreamingMessageStream: tonic::codegen::tokio_stream::Stream<
1353                Item = std::result::Result<super::StreamResponse, tonic::Status>,
1354            >
1355            + std::marker::Send
1356            + 'static;
1357        /// Sends a streaming message to an agent, allowing for real-time interaction and status updates.
1358        /// Streaming version of `SendMessage`
1359        async fn send_streaming_message(
1360            &self,
1361            request: tonic::Request<super::SendMessageRequest>,
1362        ) -> std::result::Result<
1363            tonic::Response<Self::SendStreamingMessageStream>,
1364            tonic::Status,
1365        >;
1366        /// Gets the latest state of a task.
1367        async fn get_task(
1368            &self,
1369            request: tonic::Request<super::GetTaskRequest>,
1370        ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status>;
1371        /// Lists tasks that match the specified filter.
1372        async fn list_tasks(
1373            &self,
1374            request: tonic::Request<super::ListTasksRequest>,
1375        ) -> std::result::Result<
1376            tonic::Response<super::ListTasksResponse>,
1377            tonic::Status,
1378        >;
1379        /// Cancels a task in progress.
1380        async fn cancel_task(
1381            &self,
1382            request: tonic::Request<super::CancelTaskRequest>,
1383        ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status>;
1384        /// Server streaming response type for the SubscribeToTask method.
1385        type SubscribeToTaskStream: tonic::codegen::tokio_stream::Stream<
1386                Item = std::result::Result<super::StreamResponse, tonic::Status>,
1387            >
1388            + std::marker::Send
1389            + 'static;
1390        /// Subscribes to task updates for tasks not in a terminal state.
1391        /// Returns `UnsupportedOperationError` if the task is already in a terminal state (completed, failed, canceled, rejected).
1392        async fn subscribe_to_task(
1393            &self,
1394            request: tonic::Request<super::SubscribeToTaskRequest>,
1395        ) -> std::result::Result<
1396            tonic::Response<Self::SubscribeToTaskStream>,
1397            tonic::Status,
1398        >;
1399        /// (-- api-linter: client-libraries::4232::required-fields=disabled
1400        /// api-linter: core::0133::method-signature=disabled
1401        /// api-linter: core::0133::request-message-name=disabled
1402        /// aip.dev/not-precedent: method_signature preserved for backwards compatibility --)
1403        /// Creates a push notification config for a task.
1404        async fn create_task_push_notification_config(
1405            &self,
1406            request: tonic::Request<super::TaskPushNotificationConfig>,
1407        ) -> std::result::Result<
1408            tonic::Response<super::TaskPushNotificationConfig>,
1409            tonic::Status,
1410        >;
1411        /// Gets a push notification config for a task.
1412        async fn get_task_push_notification_config(
1413            &self,
1414            request: tonic::Request<super::GetTaskPushNotificationConfigRequest>,
1415        ) -> std::result::Result<
1416            tonic::Response<super::TaskPushNotificationConfig>,
1417            tonic::Status,
1418        >;
1419        /// Get a list of push notifications configured for a task.
1420        async fn list_task_push_notification_configs(
1421            &self,
1422            request: tonic::Request<super::ListTaskPushNotificationConfigsRequest>,
1423        ) -> std::result::Result<
1424            tonic::Response<super::ListTaskPushNotificationConfigsResponse>,
1425            tonic::Status,
1426        >;
1427        /// Gets the extended agent card for the authenticated agent.
1428        async fn get_extended_agent_card(
1429            &self,
1430            request: tonic::Request<super::GetExtendedAgentCardRequest>,
1431        ) -> std::result::Result<tonic::Response<super::AgentCard>, tonic::Status>;
1432        /// Deletes a push notification config for a task.
1433        async fn delete_task_push_notification_config(
1434            &self,
1435            request: tonic::Request<super::DeleteTaskPushNotificationConfigRequest>,
1436        ) -> std::result::Result<tonic::Response<()>, tonic::Status>;
1437    }
1438    /// Provides operations for interacting with agents using the A2A protocol.
1439    #[derive(Debug)]
1440    pub struct A2aServiceServer<T> {
1441        inner: Arc<T>,
1442        accept_compression_encodings: EnabledCompressionEncodings,
1443        send_compression_encodings: EnabledCompressionEncodings,
1444        max_decoding_message_size: Option<usize>,
1445        max_encoding_message_size: Option<usize>,
1446    }
1447    impl<T> A2aServiceServer<T> {
1448        pub fn new(inner: T) -> Self {
1449            Self::from_arc(Arc::new(inner))
1450        }
1451        pub fn from_arc(inner: Arc<T>) -> Self {
1452            Self {
1453                inner,
1454                accept_compression_encodings: Default::default(),
1455                send_compression_encodings: Default::default(),
1456                max_decoding_message_size: None,
1457                max_encoding_message_size: None,
1458            }
1459        }
1460        pub fn with_interceptor<F>(
1461            inner: T,
1462            interceptor: F,
1463        ) -> InterceptedService<Self, F>
1464        where
1465            F: tonic::service::Interceptor,
1466        {
1467            InterceptedService::new(Self::new(inner), interceptor)
1468        }
1469        /// Enable decompressing requests with the given encoding.
1470        #[must_use]
1471        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1472            self.accept_compression_encodings.enable(encoding);
1473            self
1474        }
1475        /// Compress responses with the given encoding, if the client supports it.
1476        #[must_use]
1477        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1478            self.send_compression_encodings.enable(encoding);
1479            self
1480        }
1481        /// Limits the maximum size of a decoded message.
1482        ///
1483        /// Default: `4MB`
1484        #[must_use]
1485        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1486            self.max_decoding_message_size = Some(limit);
1487            self
1488        }
1489        /// Limits the maximum size of an encoded message.
1490        ///
1491        /// Default: `usize::MAX`
1492        #[must_use]
1493        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1494            self.max_encoding_message_size = Some(limit);
1495            self
1496        }
1497    }
1498    impl<T, B> tonic::codegen::Service<http::Request<B>> for A2aServiceServer<T>
1499    where
1500        T: A2aService,
1501        B: Body + std::marker::Send + 'static,
1502        B::Error: Into<StdError> + std::marker::Send + 'static,
1503    {
1504        type Response = http::Response<tonic::body::Body>;
1505        type Error = std::convert::Infallible;
1506        type Future = BoxFuture<Self::Response, Self::Error>;
1507        fn poll_ready(
1508            &mut self,
1509            _cx: &mut Context<'_>,
1510        ) -> Poll<std::result::Result<(), Self::Error>> {
1511            Poll::Ready(Ok(()))
1512        }
1513        fn call(&mut self, req: http::Request<B>) -> Self::Future {
1514            match req.uri().path() {
1515                "/lf.a2a.v1.A2AService/SendMessage" => {
1516                    #[allow(non_camel_case_types)]
1517                    struct SendMessageSvc<T: A2aService>(pub Arc<T>);
1518                    impl<
1519                        T: A2aService,
1520                    > tonic::server::UnaryService<super::SendMessageRequest>
1521                    for SendMessageSvc<T> {
1522                        type Response = super::SendMessageResponse;
1523                        type Future = BoxFuture<
1524                            tonic::Response<Self::Response>,
1525                            tonic::Status,
1526                        >;
1527                        fn call(
1528                            &mut self,
1529                            request: tonic::Request<super::SendMessageRequest>,
1530                        ) -> Self::Future {
1531                            let inner = Arc::clone(&self.0);
1532                            let fut = async move {
1533                                <T as A2aService>::send_message(&inner, request).await
1534                            };
1535                            Box::pin(fut)
1536                        }
1537                    }
1538                    let accept_compression_encodings = self.accept_compression_encodings;
1539                    let send_compression_encodings = self.send_compression_encodings;
1540                    let max_decoding_message_size = self.max_decoding_message_size;
1541                    let max_encoding_message_size = self.max_encoding_message_size;
1542                    let inner = self.inner.clone();
1543                    let fut = async move {
1544                        let method = SendMessageSvc(inner);
1545                        let codec = tonic_prost::ProstCodec::default();
1546                        let mut grpc = tonic::server::Grpc::new(codec)
1547                            .apply_compression_config(
1548                                accept_compression_encodings,
1549                                send_compression_encodings,
1550                            )
1551                            .apply_max_message_size_config(
1552                                max_decoding_message_size,
1553                                max_encoding_message_size,
1554                            );
1555                        let res = grpc.unary(method, req).await;
1556                        Ok(res)
1557                    };
1558                    Box::pin(fut)
1559                }
1560                "/lf.a2a.v1.A2AService/SendStreamingMessage" => {
1561                    #[allow(non_camel_case_types)]
1562                    struct SendStreamingMessageSvc<T: A2aService>(pub Arc<T>);
1563                    impl<
1564                        T: A2aService,
1565                    > tonic::server::ServerStreamingService<super::SendMessageRequest>
1566                    for SendStreamingMessageSvc<T> {
1567                        type Response = super::StreamResponse;
1568                        type ResponseStream = T::SendStreamingMessageStream;
1569                        type Future = BoxFuture<
1570                            tonic::Response<Self::ResponseStream>,
1571                            tonic::Status,
1572                        >;
1573                        fn call(
1574                            &mut self,
1575                            request: tonic::Request<super::SendMessageRequest>,
1576                        ) -> Self::Future {
1577                            let inner = Arc::clone(&self.0);
1578                            let fut = async move {
1579                                <T as A2aService>::send_streaming_message(&inner, request)
1580                                    .await
1581                            };
1582                            Box::pin(fut)
1583                        }
1584                    }
1585                    let accept_compression_encodings = self.accept_compression_encodings;
1586                    let send_compression_encodings = self.send_compression_encodings;
1587                    let max_decoding_message_size = self.max_decoding_message_size;
1588                    let max_encoding_message_size = self.max_encoding_message_size;
1589                    let inner = self.inner.clone();
1590                    let fut = async move {
1591                        let method = SendStreamingMessageSvc(inner);
1592                        let codec = tonic_prost::ProstCodec::default();
1593                        let mut grpc = tonic::server::Grpc::new(codec)
1594                            .apply_compression_config(
1595                                accept_compression_encodings,
1596                                send_compression_encodings,
1597                            )
1598                            .apply_max_message_size_config(
1599                                max_decoding_message_size,
1600                                max_encoding_message_size,
1601                            );
1602                        let res = grpc.server_streaming(method, req).await;
1603                        Ok(res)
1604                    };
1605                    Box::pin(fut)
1606                }
1607                "/lf.a2a.v1.A2AService/GetTask" => {
1608                    #[allow(non_camel_case_types)]
1609                    struct GetTaskSvc<T: A2aService>(pub Arc<T>);
1610                    impl<
1611                        T: A2aService,
1612                    > tonic::server::UnaryService<super::GetTaskRequest>
1613                    for GetTaskSvc<T> {
1614                        type Response = super::Task;
1615                        type Future = BoxFuture<
1616                            tonic::Response<Self::Response>,
1617                            tonic::Status,
1618                        >;
1619                        fn call(
1620                            &mut self,
1621                            request: tonic::Request<super::GetTaskRequest>,
1622                        ) -> Self::Future {
1623                            let inner = Arc::clone(&self.0);
1624                            let fut = async move {
1625                                <T as A2aService>::get_task(&inner, request).await
1626                            };
1627                            Box::pin(fut)
1628                        }
1629                    }
1630                    let accept_compression_encodings = self.accept_compression_encodings;
1631                    let send_compression_encodings = self.send_compression_encodings;
1632                    let max_decoding_message_size = self.max_decoding_message_size;
1633                    let max_encoding_message_size = self.max_encoding_message_size;
1634                    let inner = self.inner.clone();
1635                    let fut = async move {
1636                        let method = GetTaskSvc(inner);
1637                        let codec = tonic_prost::ProstCodec::default();
1638                        let mut grpc = tonic::server::Grpc::new(codec)
1639                            .apply_compression_config(
1640                                accept_compression_encodings,
1641                                send_compression_encodings,
1642                            )
1643                            .apply_max_message_size_config(
1644                                max_decoding_message_size,
1645                                max_encoding_message_size,
1646                            );
1647                        let res = grpc.unary(method, req).await;
1648                        Ok(res)
1649                    };
1650                    Box::pin(fut)
1651                }
1652                "/lf.a2a.v1.A2AService/ListTasks" => {
1653                    #[allow(non_camel_case_types)]
1654                    struct ListTasksSvc<T: A2aService>(pub Arc<T>);
1655                    impl<
1656                        T: A2aService,
1657                    > tonic::server::UnaryService<super::ListTasksRequest>
1658                    for ListTasksSvc<T> {
1659                        type Response = super::ListTasksResponse;
1660                        type Future = BoxFuture<
1661                            tonic::Response<Self::Response>,
1662                            tonic::Status,
1663                        >;
1664                        fn call(
1665                            &mut self,
1666                            request: tonic::Request<super::ListTasksRequest>,
1667                        ) -> Self::Future {
1668                            let inner = Arc::clone(&self.0);
1669                            let fut = async move {
1670                                <T as A2aService>::list_tasks(&inner, request).await
1671                            };
1672                            Box::pin(fut)
1673                        }
1674                    }
1675                    let accept_compression_encodings = self.accept_compression_encodings;
1676                    let send_compression_encodings = self.send_compression_encodings;
1677                    let max_decoding_message_size = self.max_decoding_message_size;
1678                    let max_encoding_message_size = self.max_encoding_message_size;
1679                    let inner = self.inner.clone();
1680                    let fut = async move {
1681                        let method = ListTasksSvc(inner);
1682                        let codec = tonic_prost::ProstCodec::default();
1683                        let mut grpc = tonic::server::Grpc::new(codec)
1684                            .apply_compression_config(
1685                                accept_compression_encodings,
1686                                send_compression_encodings,
1687                            )
1688                            .apply_max_message_size_config(
1689                                max_decoding_message_size,
1690                                max_encoding_message_size,
1691                            );
1692                        let res = grpc.unary(method, req).await;
1693                        Ok(res)
1694                    };
1695                    Box::pin(fut)
1696                }
1697                "/lf.a2a.v1.A2AService/CancelTask" => {
1698                    #[allow(non_camel_case_types)]
1699                    struct CancelTaskSvc<T: A2aService>(pub Arc<T>);
1700                    impl<
1701                        T: A2aService,
1702                    > tonic::server::UnaryService<super::CancelTaskRequest>
1703                    for CancelTaskSvc<T> {
1704                        type Response = super::Task;
1705                        type Future = BoxFuture<
1706                            tonic::Response<Self::Response>,
1707                            tonic::Status,
1708                        >;
1709                        fn call(
1710                            &mut self,
1711                            request: tonic::Request<super::CancelTaskRequest>,
1712                        ) -> Self::Future {
1713                            let inner = Arc::clone(&self.0);
1714                            let fut = async move {
1715                                <T as A2aService>::cancel_task(&inner, request).await
1716                            };
1717                            Box::pin(fut)
1718                        }
1719                    }
1720                    let accept_compression_encodings = self.accept_compression_encodings;
1721                    let send_compression_encodings = self.send_compression_encodings;
1722                    let max_decoding_message_size = self.max_decoding_message_size;
1723                    let max_encoding_message_size = self.max_encoding_message_size;
1724                    let inner = self.inner.clone();
1725                    let fut = async move {
1726                        let method = CancelTaskSvc(inner);
1727                        let codec = tonic_prost::ProstCodec::default();
1728                        let mut grpc = tonic::server::Grpc::new(codec)
1729                            .apply_compression_config(
1730                                accept_compression_encodings,
1731                                send_compression_encodings,
1732                            )
1733                            .apply_max_message_size_config(
1734                                max_decoding_message_size,
1735                                max_encoding_message_size,
1736                            );
1737                        let res = grpc.unary(method, req).await;
1738                        Ok(res)
1739                    };
1740                    Box::pin(fut)
1741                }
1742                "/lf.a2a.v1.A2AService/SubscribeToTask" => {
1743                    #[allow(non_camel_case_types)]
1744                    struct SubscribeToTaskSvc<T: A2aService>(pub Arc<T>);
1745                    impl<
1746                        T: A2aService,
1747                    > tonic::server::ServerStreamingService<
1748                        super::SubscribeToTaskRequest,
1749                    > for SubscribeToTaskSvc<T> {
1750                        type Response = super::StreamResponse;
1751                        type ResponseStream = T::SubscribeToTaskStream;
1752                        type Future = BoxFuture<
1753                            tonic::Response<Self::ResponseStream>,
1754                            tonic::Status,
1755                        >;
1756                        fn call(
1757                            &mut self,
1758                            request: tonic::Request<super::SubscribeToTaskRequest>,
1759                        ) -> Self::Future {
1760                            let inner = Arc::clone(&self.0);
1761                            let fut = async move {
1762                                <T as A2aService>::subscribe_to_task(&inner, request).await
1763                            };
1764                            Box::pin(fut)
1765                        }
1766                    }
1767                    let accept_compression_encodings = self.accept_compression_encodings;
1768                    let send_compression_encodings = self.send_compression_encodings;
1769                    let max_decoding_message_size = self.max_decoding_message_size;
1770                    let max_encoding_message_size = self.max_encoding_message_size;
1771                    let inner = self.inner.clone();
1772                    let fut = async move {
1773                        let method = SubscribeToTaskSvc(inner);
1774                        let codec = tonic_prost::ProstCodec::default();
1775                        let mut grpc = tonic::server::Grpc::new(codec)
1776                            .apply_compression_config(
1777                                accept_compression_encodings,
1778                                send_compression_encodings,
1779                            )
1780                            .apply_max_message_size_config(
1781                                max_decoding_message_size,
1782                                max_encoding_message_size,
1783                            );
1784                        let res = grpc.server_streaming(method, req).await;
1785                        Ok(res)
1786                    };
1787                    Box::pin(fut)
1788                }
1789                "/lf.a2a.v1.A2AService/CreateTaskPushNotificationConfig" => {
1790                    #[allow(non_camel_case_types)]
1791                    struct CreateTaskPushNotificationConfigSvc<T: A2aService>(
1792                        pub Arc<T>,
1793                    );
1794                    impl<
1795                        T: A2aService,
1796                    > tonic::server::UnaryService<super::TaskPushNotificationConfig>
1797                    for CreateTaskPushNotificationConfigSvc<T> {
1798                        type Response = super::TaskPushNotificationConfig;
1799                        type Future = BoxFuture<
1800                            tonic::Response<Self::Response>,
1801                            tonic::Status,
1802                        >;
1803                        fn call(
1804                            &mut self,
1805                            request: tonic::Request<super::TaskPushNotificationConfig>,
1806                        ) -> Self::Future {
1807                            let inner = Arc::clone(&self.0);
1808                            let fut = async move {
1809                                <T as A2aService>::create_task_push_notification_config(
1810                                        &inner,
1811                                        request,
1812                                    )
1813                                    .await
1814                            };
1815                            Box::pin(fut)
1816                        }
1817                    }
1818                    let accept_compression_encodings = self.accept_compression_encodings;
1819                    let send_compression_encodings = self.send_compression_encodings;
1820                    let max_decoding_message_size = self.max_decoding_message_size;
1821                    let max_encoding_message_size = self.max_encoding_message_size;
1822                    let inner = self.inner.clone();
1823                    let fut = async move {
1824                        let method = CreateTaskPushNotificationConfigSvc(inner);
1825                        let codec = tonic_prost::ProstCodec::default();
1826                        let mut grpc = tonic::server::Grpc::new(codec)
1827                            .apply_compression_config(
1828                                accept_compression_encodings,
1829                                send_compression_encodings,
1830                            )
1831                            .apply_max_message_size_config(
1832                                max_decoding_message_size,
1833                                max_encoding_message_size,
1834                            );
1835                        let res = grpc.unary(method, req).await;
1836                        Ok(res)
1837                    };
1838                    Box::pin(fut)
1839                }
1840                "/lf.a2a.v1.A2AService/GetTaskPushNotificationConfig" => {
1841                    #[allow(non_camel_case_types)]
1842                    struct GetTaskPushNotificationConfigSvc<T: A2aService>(pub Arc<T>);
1843                    impl<
1844                        T: A2aService,
1845                    > tonic::server::UnaryService<
1846                        super::GetTaskPushNotificationConfigRequest,
1847                    > for GetTaskPushNotificationConfigSvc<T> {
1848                        type Response = super::TaskPushNotificationConfig;
1849                        type Future = BoxFuture<
1850                            tonic::Response<Self::Response>,
1851                            tonic::Status,
1852                        >;
1853                        fn call(
1854                            &mut self,
1855                            request: tonic::Request<
1856                                super::GetTaskPushNotificationConfigRequest,
1857                            >,
1858                        ) -> Self::Future {
1859                            let inner = Arc::clone(&self.0);
1860                            let fut = async move {
1861                                <T as A2aService>::get_task_push_notification_config(
1862                                        &inner,
1863                                        request,
1864                                    )
1865                                    .await
1866                            };
1867                            Box::pin(fut)
1868                        }
1869                    }
1870                    let accept_compression_encodings = self.accept_compression_encodings;
1871                    let send_compression_encodings = self.send_compression_encodings;
1872                    let max_decoding_message_size = self.max_decoding_message_size;
1873                    let max_encoding_message_size = self.max_encoding_message_size;
1874                    let inner = self.inner.clone();
1875                    let fut = async move {
1876                        let method = GetTaskPushNotificationConfigSvc(inner);
1877                        let codec = tonic_prost::ProstCodec::default();
1878                        let mut grpc = tonic::server::Grpc::new(codec)
1879                            .apply_compression_config(
1880                                accept_compression_encodings,
1881                                send_compression_encodings,
1882                            )
1883                            .apply_max_message_size_config(
1884                                max_decoding_message_size,
1885                                max_encoding_message_size,
1886                            );
1887                        let res = grpc.unary(method, req).await;
1888                        Ok(res)
1889                    };
1890                    Box::pin(fut)
1891                }
1892                "/lf.a2a.v1.A2AService/ListTaskPushNotificationConfigs" => {
1893                    #[allow(non_camel_case_types)]
1894                    struct ListTaskPushNotificationConfigsSvc<T: A2aService>(pub Arc<T>);
1895                    impl<
1896                        T: A2aService,
1897                    > tonic::server::UnaryService<
1898                        super::ListTaskPushNotificationConfigsRequest,
1899                    > for ListTaskPushNotificationConfigsSvc<T> {
1900                        type Response = super::ListTaskPushNotificationConfigsResponse;
1901                        type Future = BoxFuture<
1902                            tonic::Response<Self::Response>,
1903                            tonic::Status,
1904                        >;
1905                        fn call(
1906                            &mut self,
1907                            request: tonic::Request<
1908                                super::ListTaskPushNotificationConfigsRequest,
1909                            >,
1910                        ) -> Self::Future {
1911                            let inner = Arc::clone(&self.0);
1912                            let fut = async move {
1913                                <T as A2aService>::list_task_push_notification_configs(
1914                                        &inner,
1915                                        request,
1916                                    )
1917                                    .await
1918                            };
1919                            Box::pin(fut)
1920                        }
1921                    }
1922                    let accept_compression_encodings = self.accept_compression_encodings;
1923                    let send_compression_encodings = self.send_compression_encodings;
1924                    let max_decoding_message_size = self.max_decoding_message_size;
1925                    let max_encoding_message_size = self.max_encoding_message_size;
1926                    let inner = self.inner.clone();
1927                    let fut = async move {
1928                        let method = ListTaskPushNotificationConfigsSvc(inner);
1929                        let codec = tonic_prost::ProstCodec::default();
1930                        let mut grpc = tonic::server::Grpc::new(codec)
1931                            .apply_compression_config(
1932                                accept_compression_encodings,
1933                                send_compression_encodings,
1934                            )
1935                            .apply_max_message_size_config(
1936                                max_decoding_message_size,
1937                                max_encoding_message_size,
1938                            );
1939                        let res = grpc.unary(method, req).await;
1940                        Ok(res)
1941                    };
1942                    Box::pin(fut)
1943                }
1944                "/lf.a2a.v1.A2AService/GetExtendedAgentCard" => {
1945                    #[allow(non_camel_case_types)]
1946                    struct GetExtendedAgentCardSvc<T: A2aService>(pub Arc<T>);
1947                    impl<
1948                        T: A2aService,
1949                    > tonic::server::UnaryService<super::GetExtendedAgentCardRequest>
1950                    for GetExtendedAgentCardSvc<T> {
1951                        type Response = super::AgentCard;
1952                        type Future = BoxFuture<
1953                            tonic::Response<Self::Response>,
1954                            tonic::Status,
1955                        >;
1956                        fn call(
1957                            &mut self,
1958                            request: tonic::Request<super::GetExtendedAgentCardRequest>,
1959                        ) -> Self::Future {
1960                            let inner = Arc::clone(&self.0);
1961                            let fut = async move {
1962                                <T as A2aService>::get_extended_agent_card(&inner, request)
1963                                    .await
1964                            };
1965                            Box::pin(fut)
1966                        }
1967                    }
1968                    let accept_compression_encodings = self.accept_compression_encodings;
1969                    let send_compression_encodings = self.send_compression_encodings;
1970                    let max_decoding_message_size = self.max_decoding_message_size;
1971                    let max_encoding_message_size = self.max_encoding_message_size;
1972                    let inner = self.inner.clone();
1973                    let fut = async move {
1974                        let method = GetExtendedAgentCardSvc(inner);
1975                        let codec = tonic_prost::ProstCodec::default();
1976                        let mut grpc = tonic::server::Grpc::new(codec)
1977                            .apply_compression_config(
1978                                accept_compression_encodings,
1979                                send_compression_encodings,
1980                            )
1981                            .apply_max_message_size_config(
1982                                max_decoding_message_size,
1983                                max_encoding_message_size,
1984                            );
1985                        let res = grpc.unary(method, req).await;
1986                        Ok(res)
1987                    };
1988                    Box::pin(fut)
1989                }
1990                "/lf.a2a.v1.A2AService/DeleteTaskPushNotificationConfig" => {
1991                    #[allow(non_camel_case_types)]
1992                    struct DeleteTaskPushNotificationConfigSvc<T: A2aService>(
1993                        pub Arc<T>,
1994                    );
1995                    impl<
1996                        T: A2aService,
1997                    > tonic::server::UnaryService<
1998                        super::DeleteTaskPushNotificationConfigRequest,
1999                    > for DeleteTaskPushNotificationConfigSvc<T> {
2000                        type Response = ();
2001                        type Future = BoxFuture<
2002                            tonic::Response<Self::Response>,
2003                            tonic::Status,
2004                        >;
2005                        fn call(
2006                            &mut self,
2007                            request: tonic::Request<
2008                                super::DeleteTaskPushNotificationConfigRequest,
2009                            >,
2010                        ) -> Self::Future {
2011                            let inner = Arc::clone(&self.0);
2012                            let fut = async move {
2013                                <T as A2aService>::delete_task_push_notification_config(
2014                                        &inner,
2015                                        request,
2016                                    )
2017                                    .await
2018                            };
2019                            Box::pin(fut)
2020                        }
2021                    }
2022                    let accept_compression_encodings = self.accept_compression_encodings;
2023                    let send_compression_encodings = self.send_compression_encodings;
2024                    let max_decoding_message_size = self.max_decoding_message_size;
2025                    let max_encoding_message_size = self.max_encoding_message_size;
2026                    let inner = self.inner.clone();
2027                    let fut = async move {
2028                        let method = DeleteTaskPushNotificationConfigSvc(inner);
2029                        let codec = tonic_prost::ProstCodec::default();
2030                        let mut grpc = tonic::server::Grpc::new(codec)
2031                            .apply_compression_config(
2032                                accept_compression_encodings,
2033                                send_compression_encodings,
2034                            )
2035                            .apply_max_message_size_config(
2036                                max_decoding_message_size,
2037                                max_encoding_message_size,
2038                            );
2039                        let res = grpc.unary(method, req).await;
2040                        Ok(res)
2041                    };
2042                    Box::pin(fut)
2043                }
2044                _ => {
2045                    Box::pin(async move {
2046                        let mut response = http::Response::new(
2047                            tonic::body::Body::default(),
2048                        );
2049                        let headers = response.headers_mut();
2050                        headers
2051                            .insert(
2052                                tonic::Status::GRPC_STATUS,
2053                                (tonic::Code::Unimplemented as i32).into(),
2054                            );
2055                        headers
2056                            .insert(
2057                                http::header::CONTENT_TYPE,
2058                                tonic::metadata::GRPC_CONTENT_TYPE,
2059                            );
2060                        Ok(response)
2061                    })
2062                }
2063            }
2064        }
2065    }
2066    impl<T> Clone for A2aServiceServer<T> {
2067        fn clone(&self) -> Self {
2068            let inner = self.inner.clone();
2069            Self {
2070                inner,
2071                accept_compression_encodings: self.accept_compression_encodings,
2072                send_compression_encodings: self.send_compression_encodings,
2073                max_decoding_message_size: self.max_decoding_message_size,
2074                max_encoding_message_size: self.max_encoding_message_size,
2075            }
2076        }
2077    }
2078    /// Generated gRPC service name
2079    pub const SERVICE_NAME: &str = "lf.a2a.v1.A2AService";
2080    impl<T> tonic::server::NamedService for A2aServiceServer<T> {
2081        const NAME: &'static str = SERVICE_NAME;
2082    }
2083}