1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct SendMessageConfiguration {
5 #[prost(string, repeated, tag = "1")]
8 pub accepted_output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9 #[prost(message, optional, tag = "2")]
12 pub task_push_notification_config: ::core::option::Option<
13 TaskPushNotificationConfig,
14 >,
15 #[prost(int32, optional, tag = "3")]
20 pub history_length: ::core::option::Option<i32>,
21 #[prost(bool, tag = "4")]
27 pub return_immediately: bool,
28}
29#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct Task {
35 #[prost(string, tag = "1")]
38 pub id: ::prost::alloc::string::String,
39 #[prost(string, tag = "2")]
42 pub context_id: ::prost::alloc::string::String,
43 #[prost(message, optional, tag = "3")]
45 pub status: ::core::option::Option<TaskStatus>,
46 #[prost(message, repeated, tag = "4")]
48 pub artifacts: ::prost::alloc::vec::Vec<Artifact>,
49 #[prost(message, repeated, tag = "5")]
52 pub history: ::prost::alloc::vec::Vec<Message>,
53 #[prost(message, optional, tag = "6")]
56 pub metadata: ::core::option::Option<::prost_types::Struct>,
57}
58#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct TaskStatus {
61 #[prost(enumeration = "TaskState", tag = "1")]
63 pub state: i32,
64 #[prost(message, optional, tag = "2")]
66 pub message: ::core::option::Option<Message>,
67 #[prost(message, optional, tag = "3")]
70 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct Part {
77 #[prost(message, optional, tag = "5")]
79 pub metadata: ::core::option::Option<::prost_types::Struct>,
80 #[prost(string, tag = "6")]
82 pub filename: ::prost::alloc::string::String,
83 #[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}
90pub mod part {
92 #[derive(Clone, PartialEq, ::prost::Oneof)]
93 pub enum Content {
94 #[prost(string, tag = "1")]
96 Text(::prost::alloc::string::String),
97 #[prost(bytes, tag = "2")]
99 Raw(::prost::alloc::vec::Vec<u8>),
100 #[prost(string, tag = "3")]
102 Url(::prost::alloc::string::String),
103 #[prost(message, tag = "4")]
105 Data(::prost_types::Value),
106 }
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct Message {
116 #[prost(string, tag = "1")]
118 pub message_id: ::prost::alloc::string::String,
119 #[prost(string, tag = "2")]
121 pub context_id: ::prost::alloc::string::String,
122 #[prost(string, tag = "3")]
124 pub task_id: ::prost::alloc::string::String,
125 #[prost(enumeration = "Role", tag = "4")]
127 pub role: i32,
128 #[prost(message, repeated, tag = "5")]
130 pub parts: ::prost::alloc::vec::Vec<Part>,
131 #[prost(message, optional, tag = "6")]
133 pub metadata: ::core::option::Option<::prost_types::Struct>,
134 #[prost(string, repeated, tag = "7")]
136 pub extensions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
137 #[prost(string, repeated, tag = "8")]
139 pub reference_task_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140}
141#[derive(Clone, PartialEq, ::prost::Message)]
143pub struct Artifact {
144 #[prost(string, tag = "1")]
146 pub artifact_id: ::prost::alloc::string::String,
147 #[prost(string, tag = "2")]
149 pub name: ::prost::alloc::string::String,
150 #[prost(string, tag = "3")]
152 pub description: ::prost::alloc::string::String,
153 #[prost(message, repeated, tag = "4")]
155 pub parts: ::prost::alloc::vec::Vec<Part>,
156 #[prost(message, optional, tag = "5")]
158 pub metadata: ::core::option::Option<::prost_types::Struct>,
159 #[prost(string, repeated, tag = "6")]
161 pub extensions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct TaskStatusUpdateEvent {
166 #[prost(string, tag = "1")]
168 pub task_id: ::prost::alloc::string::String,
169 #[prost(string, tag = "2")]
171 pub context_id: ::prost::alloc::string::String,
172 #[prost(message, optional, tag = "3")]
174 pub status: ::core::option::Option<TaskStatus>,
175 #[prost(message, optional, tag = "4")]
177 pub metadata: ::core::option::Option<::prost_types::Struct>,
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
181pub struct TaskArtifactUpdateEvent {
182 #[prost(string, tag = "1")]
184 pub task_id: ::prost::alloc::string::String,
185 #[prost(string, tag = "2")]
187 pub context_id: ::prost::alloc::string::String,
188 #[prost(message, optional, tag = "3")]
190 pub artifact: ::core::option::Option<Artifact>,
191 #[prost(bool, tag = "4")]
194 pub append: bool,
195 #[prost(bool, tag = "5")]
197 pub last_chunk: bool,
198 #[prost(message, optional, tag = "6")]
200 pub metadata: ::core::option::Option<::prost_types::Struct>,
201}
202#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
204pub struct AuthenticationInfo {
205 #[prost(string, tag = "1")]
209 pub scheme: ::prost::alloc::string::String,
210 #[prost(string, tag = "2")]
212 pub credentials: ::prost::alloc::string::String,
213}
214#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
217pub struct AgentInterface {
218 #[prost(string, tag = "1")]
221 pub url: ::prost::alloc::string::String,
222 #[prost(string, tag = "2")]
226 pub protocol_binding: ::prost::alloc::string::String,
227 #[prost(string, tag = "3")]
229 pub tenant: ::prost::alloc::string::String,
230 #[prost(string, tag = "4")]
234 pub protocol_version: ::prost::alloc::string::String,
235}
236#[derive(Clone, PartialEq, ::prost::Message)]
241pub struct AgentCard {
242 #[prost(string, tag = "1")]
245 pub name: ::prost::alloc::string::String,
246 #[prost(string, tag = "2")]
250 pub description: ::prost::alloc::string::String,
251 #[prost(message, repeated, tag = "3")]
253 pub supported_interfaces: ::prost::alloc::vec::Vec<AgentInterface>,
254 #[prost(message, optional, tag = "4")]
256 pub provider: ::core::option::Option<AgentProvider>,
257 #[prost(string, tag = "5")]
260 pub version: ::prost::alloc::string::String,
261 #[prost(string, optional, tag = "6")]
263 pub documentation_url: ::core::option::Option<::prost::alloc::string::String>,
264 #[prost(message, optional, tag = "7")]
266 pub capabilities: ::core::option::Option<AgentCapabilities>,
267 #[prost(map = "string, message", tag = "8")]
269 pub security_schemes: ::std::collections::HashMap<
270 ::prost::alloc::string::String,
271 SecurityScheme,
272 >,
273 #[prost(message, repeated, tag = "9")]
275 pub security_requirements: ::prost::alloc::vec::Vec<SecurityRequirement>,
276 #[prost(string, repeated, tag = "10")]
280 pub default_input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
281 #[prost(string, repeated, tag = "11")]
283 pub default_output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
284 #[prost(message, repeated, tag = "12")]
288 pub skills: ::prost::alloc::vec::Vec<AgentSkill>,
289 #[prost(message, repeated, tag = "13")]
291 pub signatures: ::prost::alloc::vec::Vec<AgentCardSignature>,
292 #[prost(string, optional, tag = "14")]
294 pub icon_url: ::core::option::Option<::prost::alloc::string::String>,
295}
296#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
298pub struct AgentProvider {
299 #[prost(string, tag = "1")]
302 pub url: ::prost::alloc::string::String,
303 #[prost(string, tag = "2")]
306 pub organization: ::prost::alloc::string::String,
307}
308#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct AgentCapabilities {
311 #[prost(bool, optional, tag = "1")]
313 pub streaming: ::core::option::Option<bool>,
314 #[prost(bool, optional, tag = "2")]
316 pub push_notifications: ::core::option::Option<bool>,
317 #[prost(message, repeated, tag = "3")]
319 pub extensions: ::prost::alloc::vec::Vec<AgentExtension>,
320 #[prost(bool, optional, tag = "4")]
322 pub extended_agent_card: ::core::option::Option<bool>,
323}
324#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct AgentExtension {
327 #[prost(string, tag = "1")]
329 pub uri: ::prost::alloc::string::String,
330 #[prost(string, tag = "2")]
332 pub description: ::prost::alloc::string::String,
333 #[prost(bool, tag = "3")]
335 pub required: bool,
336 #[prost(message, optional, tag = "4")]
338 pub params: ::core::option::Option<::prost_types::Struct>,
339}
340#[derive(Clone, PartialEq, ::prost::Message)]
342pub struct AgentSkill {
343 #[prost(string, tag = "1")]
345 pub id: ::prost::alloc::string::String,
346 #[prost(string, tag = "2")]
348 pub name: ::prost::alloc::string::String,
349 #[prost(string, tag = "3")]
351 pub description: ::prost::alloc::string::String,
352 #[prost(string, repeated, tag = "4")]
354 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
355 #[prost(string, repeated, tag = "5")]
357 pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
358 #[prost(string, repeated, tag = "6")]
360 pub input_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
361 #[prost(string, repeated, tag = "7")]
363 pub output_modes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
364 #[prost(message, repeated, tag = "8")]
366 pub security_requirements: ::prost::alloc::vec::Vec<SecurityRequirement>,
367}
368#[derive(Clone, PartialEq, ::prost::Message)]
371pub struct AgentCardSignature {
372 #[prost(string, tag = "1")]
377 pub protected: ::prost::alloc::string::String,
378 #[prost(string, tag = "2")]
380 pub signature: ::prost::alloc::string::String,
381 #[prost(message, optional, tag = "3")]
383 pub header: ::core::option::Option<::prost_types::Struct>,
384}
385#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
387pub struct TaskPushNotificationConfig {
388 #[prost(string, tag = "1")]
390 pub tenant: ::prost::alloc::string::String,
391 #[prost(string, tag = "2")]
394 pub id: ::prost::alloc::string::String,
395 #[prost(string, tag = "3")]
397 pub task_id: ::prost::alloc::string::String,
398 #[prost(string, tag = "4")]
400 pub url: ::prost::alloc::string::String,
401 #[prost(string, tag = "5")]
403 pub token: ::prost::alloc::string::String,
404 #[prost(message, optional, tag = "6")]
406 pub authentication: ::core::option::Option<AuthenticationInfo>,
407}
408#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
411pub struct StringList {
412 #[prost(string, repeated, tag = "1")]
414 pub list: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
415}
416#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct SecurityRequirement {
419 #[prost(map = "string, message", tag = "1")]
421 pub schemes: ::std::collections::HashMap<::prost::alloc::string::String, StringList>,
422}
423#[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}
431pub mod security_scheme {
433 #[derive(Clone, PartialEq, ::prost::Oneof)]
434 pub enum Scheme {
435 #[prost(message, tag = "1")]
437 ApiKeySecurityScheme(super::ApiKeySecurityScheme),
438 #[prost(message, tag = "2")]
440 HttpAuthSecurityScheme(super::HttpAuthSecurityScheme),
441 #[prost(message, tag = "3")]
443 Oauth2SecurityScheme(super::OAuth2SecurityScheme),
444 #[prost(message, tag = "4")]
446 OpenIdConnectSecurityScheme(super::OpenIdConnectSecurityScheme),
447 #[prost(message, tag = "5")]
449 MtlsSecurityScheme(super::MutualTlsSecurityScheme),
450 }
451}
452#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
454pub struct ApiKeySecurityScheme {
455 #[prost(string, tag = "1")]
457 pub description: ::prost::alloc::string::String,
458 #[prost(string, tag = "2")]
460 pub location: ::prost::alloc::string::String,
461 #[prost(string, tag = "3")]
463 pub name: ::prost::alloc::string::String,
464}
465#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
467pub struct HttpAuthSecurityScheme {
468 #[prost(string, tag = "1")]
470 pub description: ::prost::alloc::string::String,
471 #[prost(string, tag = "2")]
475 pub scheme: ::prost::alloc::string::String,
476 #[prost(string, tag = "3")]
479 pub bearer_format: ::prost::alloc::string::String,
480}
481#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct OAuth2SecurityScheme {
484 #[prost(string, tag = "1")]
486 pub description: ::prost::alloc::string::String,
487 #[prost(message, optional, tag = "2")]
489 pub flows: ::core::option::Option<OAuthFlows>,
490 #[prost(string, tag = "3")]
493 pub oauth2_metadata_url: ::prost::alloc::string::String,
494}
495#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
497pub struct OpenIdConnectSecurityScheme {
498 #[prost(string, tag = "1")]
500 pub description: ::prost::alloc::string::String,
501 #[prost(string, tag = "2")]
503 pub open_id_connect_url: ::prost::alloc::string::String,
504}
505#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
507pub struct MutualTlsSecurityScheme {
508 #[prost(string, tag = "1")]
510 pub description: ::prost::alloc::string::String,
511}
512#[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}
518pub mod o_auth_flows {
520 #[derive(Clone, PartialEq, ::prost::Oneof)]
521 pub enum Flow {
522 #[prost(message, tag = "1")]
524 AuthorizationCode(super::AuthorizationCodeOAuthFlow),
525 #[prost(message, tag = "2")]
527 ClientCredentials(super::ClientCredentialsOAuthFlow),
528 #[deprecated]
530 #[prost(message, tag = "3")]
531 Implicit(super::ImplicitOAuthFlow),
532 #[deprecated]
534 #[prost(message, tag = "4")]
535 Password(super::PasswordOAuthFlow),
536 #[prost(message, tag = "5")]
538 DeviceCode(super::DeviceCodeOAuthFlow),
539 }
540}
541#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct AuthorizationCodeOAuthFlow {
544 #[prost(string, tag = "1")]
546 pub authorization_url: ::prost::alloc::string::String,
547 #[prost(string, tag = "2")]
549 pub token_url: ::prost::alloc::string::String,
550 #[prost(string, tag = "3")]
552 pub refresh_url: ::prost::alloc::string::String,
553 #[prost(map = "string, string", tag = "4")]
555 pub scopes: ::std::collections::HashMap<
556 ::prost::alloc::string::String,
557 ::prost::alloc::string::String,
558 >,
559 #[prost(bool, tag = "5")]
562 pub pkce_required: bool,
563}
564#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct ClientCredentialsOAuthFlow {
567 #[prost(string, tag = "1")]
569 pub token_url: ::prost::alloc::string::String,
570 #[prost(string, tag = "2")]
572 pub refresh_url: ::prost::alloc::string::String,
573 #[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#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct ImplicitOAuthFlow {
583 #[prost(string, tag = "1")]
586 pub authorization_url: ::prost::alloc::string::String,
587 #[prost(string, tag = "2")]
590 pub refresh_url: ::prost::alloc::string::String,
591 #[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#[derive(Clone, PartialEq, ::prost::Message)]
601pub struct PasswordOAuthFlow {
602 #[prost(string, tag = "1")]
605 pub token_url: ::prost::alloc::string::String,
606 #[prost(string, tag = "2")]
609 pub refresh_url: ::prost::alloc::string::String,
610 #[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#[derive(Clone, PartialEq, ::prost::Message)]
622pub struct DeviceCodeOAuthFlow {
623 #[prost(string, tag = "1")]
625 pub device_authorization_url: ::prost::alloc::string::String,
626 #[prost(string, tag = "2")]
628 pub token_url: ::prost::alloc::string::String,
629 #[prost(string, tag = "3")]
631 pub refresh_url: ::prost::alloc::string::String,
632 #[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#[derive(Clone, PartialEq, ::prost::Message)]
641pub struct SendMessageRequest {
642 #[prost(string, tag = "1")]
644 pub tenant: ::prost::alloc::string::String,
645 #[prost(message, optional, tag = "2")]
647 pub message: ::core::option::Option<Message>,
648 #[prost(message, optional, tag = "3")]
650 pub configuration: ::core::option::Option<SendMessageConfiguration>,
651 #[prost(message, optional, tag = "4")]
653 pub metadata: ::core::option::Option<::prost_types::Struct>,
654}
655#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
657pub struct GetTaskRequest {
658 #[prost(string, tag = "1")]
660 pub tenant: ::prost::alloc::string::String,
661 #[prost(string, tag = "2")]
663 pub id: ::prost::alloc::string::String,
664 #[prost(int32, optional, tag = "3")]
669 pub history_length: ::core::option::Option<i32>,
670}
671#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
673pub struct ListTasksRequest {
674 #[prost(string, tag = "1")]
676 pub tenant: ::prost::alloc::string::String,
677 #[prost(string, tag = "2")]
679 pub context_id: ::prost::alloc::string::String,
680 #[prost(enumeration = "TaskState", tag = "3")]
682 pub status: i32,
683 #[prost(int32, optional, tag = "4")]
688 pub page_size: ::core::option::Option<i32>,
689 #[prost(string, tag = "5")]
693 pub page_token: ::prost::alloc::string::String,
694 #[prost(int32, optional, tag = "6")]
696 pub history_length: ::core::option::Option<i32>,
697 #[prost(message, optional, tag = "7")]
700 pub status_timestamp_after: ::core::option::Option<::prost_types::Timestamp>,
701 #[prost(bool, optional, tag = "8")]
704 pub include_artifacts: ::core::option::Option<bool>,
705}
706#[derive(Clone, PartialEq, ::prost::Message)]
708pub struct ListTasksResponse {
709 #[prost(message, repeated, tag = "1")]
711 pub tasks: ::prost::alloc::vec::Vec<Task>,
712 #[prost(string, tag = "2")]
714 pub next_page_token: ::prost::alloc::string::String,
715 #[prost(int32, tag = "3")]
717 pub page_size: i32,
718 #[prost(int32, tag = "4")]
720 pub total_size: i32,
721}
722#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct CancelTaskRequest {
725 #[prost(string, tag = "1")]
727 pub tenant: ::prost::alloc::string::String,
728 #[prost(string, tag = "2")]
730 pub id: ::prost::alloc::string::String,
731 #[prost(message, optional, tag = "3")]
733 pub metadata: ::core::option::Option<::prost_types::Struct>,
734}
735#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
737pub struct GetTaskPushNotificationConfigRequest {
738 #[prost(string, tag = "1")]
740 pub tenant: ::prost::alloc::string::String,
741 #[prost(string, tag = "2")]
743 pub task_id: ::prost::alloc::string::String,
744 #[prost(string, tag = "3")]
746 pub id: ::prost::alloc::string::String,
747}
748#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
750pub struct DeleteTaskPushNotificationConfigRequest {
751 #[prost(string, tag = "1")]
753 pub tenant: ::prost::alloc::string::String,
754 #[prost(string, tag = "2")]
756 pub task_id: ::prost::alloc::string::String,
757 #[prost(string, tag = "3")]
759 pub id: ::prost::alloc::string::String,
760}
761#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
763pub struct SubscribeToTaskRequest {
764 #[prost(string, tag = "1")]
766 pub tenant: ::prost::alloc::string::String,
767 #[prost(string, tag = "2")]
769 pub id: ::prost::alloc::string::String,
770}
771#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
773pub struct ListTaskPushNotificationConfigsRequest {
774 #[prost(string, tag = "4")]
776 pub tenant: ::prost::alloc::string::String,
777 #[prost(string, tag = "1")]
779 pub task_id: ::prost::alloc::string::String,
780 #[prost(int32, tag = "2")]
782 pub page_size: i32,
783 #[prost(string, tag = "3")]
785 pub page_token: ::prost::alloc::string::String,
786}
787#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
789pub struct GetExtendedAgentCardRequest {
790 #[prost(string, tag = "1")]
792 pub tenant: ::prost::alloc::string::String,
793}
794#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct SendMessageResponse {
797 #[prost(oneof = "send_message_response::Payload", tags = "1, 2")]
799 pub payload: ::core::option::Option<send_message_response::Payload>,
800}
801pub mod send_message_response {
803 #[derive(Clone, PartialEq, ::prost::Oneof)]
805 pub enum Payload {
806 #[prost(message, tag = "1")]
808 Task(super::Task),
809 #[prost(message, tag = "2")]
811 Message(super::Message),
812 }
813}
814#[derive(Clone, PartialEq, ::prost::Message)]
816pub struct StreamResponse {
817 #[prost(oneof = "stream_response::Payload", tags = "1, 2, 3, 4")]
819 pub payload: ::core::option::Option<stream_response::Payload>,
820}
821pub mod stream_response {
823 #[derive(Clone, PartialEq, ::prost::Oneof)]
825 pub enum Payload {
826 #[prost(message, tag = "1")]
828 Task(super::Task),
829 #[prost(message, tag = "2")]
831 Message(super::Message),
832 #[prost(message, tag = "3")]
834 StatusUpdate(super::TaskStatusUpdateEvent),
835 #[prost(message, tag = "4")]
837 ArtifactUpdate(super::TaskArtifactUpdateEvent),
838 }
839}
840#[derive(Clone, PartialEq, ::prost::Message)]
843pub struct ListTaskPushNotificationConfigsResponse {
844 #[prost(message, repeated, tag = "1")]
846 pub configs: ::prost::alloc::vec::Vec<TaskPushNotificationConfig>,
847 #[prost(string, tag = "2")]
849 pub next_page_token: ::prost::alloc::string::String,
850}
851#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
853#[repr(i32)]
854pub enum TaskState {
855 Unspecified = 0,
857 Submitted = 1,
859 Working = 2,
861 Completed = 3,
863 Failed = 4,
865 Canceled = 5,
867 InputRequired = 6,
869 Rejected = 7,
873 AuthRequired = 8,
875}
876impl TaskState {
877 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 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#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
912#[repr(i32)]
913pub enum Role {
914 Unspecified = 0,
916 User = 1,
918 Agent = 2,
920}
921impl Role {
922 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 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}
943pub 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 #[derive(Debug, Clone)]
956 pub struct A2aServiceClient<T> {
957 inner: tonic::client::Grpc<T>,
958 }
959 impl A2aServiceClient<tonic::transport::Channel> {
960 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 #[must_use]
1009 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1010 self.inner = self.inner.send_compressed(encoding);
1011 self
1012 }
1013 #[must_use]
1015 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1016 self.inner = self.inner.accept_compressed(encoding);
1017 self
1018 }
1019 #[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 #[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 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 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 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 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 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 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 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 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 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 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 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}
1330pub 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 #[async_trait]
1342 pub trait A2aService: std::marker::Send + std::marker::Sync + 'static {
1343 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 type SendStreamingMessageStream: tonic::codegen::tokio_stream::Stream<
1353 Item = std::result::Result<super::StreamResponse, tonic::Status>,
1354 >
1355 + std::marker::Send
1356 + 'static;
1357 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 async fn get_task(
1368 &self,
1369 request: tonic::Request<super::GetTaskRequest>,
1370 ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status>;
1371 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 async fn cancel_task(
1381 &self,
1382 request: tonic::Request<super::CancelTaskRequest>,
1383 ) -> std::result::Result<tonic::Response<super::Task>, tonic::Status>;
1384 type SubscribeToTaskStream: tonic::codegen::tokio_stream::Stream<
1386 Item = std::result::Result<super::StreamResponse, tonic::Status>,
1387 >
1388 + std::marker::Send
1389 + 'static;
1390 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 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 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 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 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 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 #[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 #[must_use]
1471 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1472 self.accept_compression_encodings.enable(encoding);
1473 self
1474 }
1475 #[must_use]
1477 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1478 self.send_compression_encodings.enable(encoding);
1479 self
1480 }
1481 #[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 #[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 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}