33import grpc
44
55from . import a2a_pb2 as a2a__pb2
6+ from google .protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
67
78
89class A2AServiceStub (object ):
910 """A2AService defines the gRPC version of the A2A protocol. This has a slightly
1011 different shape than the JSONRPC version to better conform to AIP-127,
1112 where appropriate. The nouns are AgentCard, Message, Task and
12- TaskPushNotification .
13+ TaskPushNotificationConfig .
1314 - Messages are not a standard resource so there is no get/delete/update/list
1415 interface, only a send and stream custom methods.
1516 - Tasks have a get interface and custom cancel and subscribe methods.
16- - TaskPushNotification are a resource whose parent is a task. They have get,
17- list and create methods.
17+ - TaskPushNotificationConfig are a resource whose parent is a task.
18+ They have get, list and create methods.
1819 - AgentCard is a static resource with only a get method.
1920 fields are not present as they don't comply with AIP rules, and the
2021 optional history_length on the get task method is not present as it also
@@ -52,38 +53,43 @@ def __init__(self, channel):
5253 request_serializer = a2a__pb2 .TaskSubscriptionRequest .SerializeToString ,
5354 response_deserializer = a2a__pb2 .StreamResponse .FromString ,
5455 _registered_method = True )
55- self .CreateTaskPushNotification = channel .unary_unary (
56- '/a2a.v1.A2AService/CreateTaskPushNotification ' ,
57- request_serializer = a2a__pb2 .CreateTaskPushNotificationRequest .SerializeToString ,
56+ self .CreateTaskPushNotificationConfig = channel .unary_unary (
57+ '/a2a.v1.A2AService/CreateTaskPushNotificationConfig ' ,
58+ request_serializer = a2a__pb2 .CreateTaskPushNotificationConfigRequest .SerializeToString ,
5859 response_deserializer = a2a__pb2 .TaskPushNotificationConfig .FromString ,
5960 _registered_method = True )
60- self .GetTaskPushNotification = channel .unary_unary (
61- '/a2a.v1.A2AService/GetTaskPushNotification ' ,
62- request_serializer = a2a__pb2 .GetTaskPushNotificationRequest .SerializeToString ,
61+ self .GetTaskPushNotificationConfig = channel .unary_unary (
62+ '/a2a.v1.A2AService/GetTaskPushNotificationConfig ' ,
63+ request_serializer = a2a__pb2 .GetTaskPushNotificationConfigRequest .SerializeToString ,
6364 response_deserializer = a2a__pb2 .TaskPushNotificationConfig .FromString ,
6465 _registered_method = True )
65- self .ListTaskPushNotification = channel .unary_unary (
66- '/a2a.v1.A2AService/ListTaskPushNotification ' ,
67- request_serializer = a2a__pb2 .ListTaskPushNotificationRequest .SerializeToString ,
68- response_deserializer = a2a__pb2 .ListTaskPushNotificationResponse .FromString ,
66+ self .ListTaskPushNotificationConfig = channel .unary_unary (
67+ '/a2a.v1.A2AService/ListTaskPushNotificationConfig ' ,
68+ request_serializer = a2a__pb2 .ListTaskPushNotificationConfigRequest .SerializeToString ,
69+ response_deserializer = a2a__pb2 .ListTaskPushNotificationConfigResponse .FromString ,
6970 _registered_method = True )
7071 self .GetAgentCard = channel .unary_unary (
7172 '/a2a.v1.A2AService/GetAgentCard' ,
7273 request_serializer = a2a__pb2 .GetAgentCardRequest .SerializeToString ,
7374 response_deserializer = a2a__pb2 .AgentCard .FromString ,
7475 _registered_method = True )
76+ self .DeleteTaskPushNotificationConfig = channel .unary_unary (
77+ '/a2a.v1.A2AService/DeleteTaskPushNotificationConfig' ,
78+ request_serializer = a2a__pb2 .DeleteTaskPushNotificationConfigRequest .SerializeToString ,
79+ response_deserializer = google_dot_protobuf_dot_empty__pb2 .Empty .FromString ,
80+ _registered_method = True )
7581
7682
7783class A2AServiceServicer (object ):
7884 """A2AService defines the gRPC version of the A2A protocol. This has a slightly
7985 different shape than the JSONRPC version to better conform to AIP-127,
8086 where appropriate. The nouns are AgentCard, Message, Task and
81- TaskPushNotification .
87+ TaskPushNotificationConfig .
8288 - Messages are not a standard resource so there is no get/delete/update/list
8389 interface, only a send and stream custom methods.
8490 - Tasks have a get interface and custom cancel and subscribe methods.
85- - TaskPushNotification are a resource whose parent is a task. They have get,
86- list and create methods.
91+ - TaskPushNotificationConfig are a resource whose parent is a task.
92+ They have get, list and create methods.
8793 - AgentCard is a static resource with only a get method.
8894 fields are not present as they don't comply with AIP rules, and the
8995 optional history_length on the get task method is not present as it also
@@ -131,21 +137,21 @@ def TaskSubscription(self, request, context):
131137 context .set_details ('Method not implemented!' )
132138 raise NotImplementedError ('Method not implemented!' )
133139
134- def CreateTaskPushNotification (self , request , context ):
140+ def CreateTaskPushNotificationConfig (self , request , context ):
135141 """Set a push notification config for a task.
136142 """
137143 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
138144 context .set_details ('Method not implemented!' )
139145 raise NotImplementedError ('Method not implemented!' )
140146
141- def GetTaskPushNotification (self , request , context ):
147+ def GetTaskPushNotificationConfig (self , request , context ):
142148 """Get a push notification config for a task.
143149 """
144150 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
145151 context .set_details ('Method not implemented!' )
146152 raise NotImplementedError ('Method not implemented!' )
147153
148- def ListTaskPushNotification (self , request , context ):
154+ def ListTaskPushNotificationConfig (self , request , context ):
149155 """Get a list of push notifications configured for a task.
150156 """
151157 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
@@ -159,6 +165,13 @@ def GetAgentCard(self, request, context):
159165 context .set_details ('Method not implemented!' )
160166 raise NotImplementedError ('Method not implemented!' )
161167
168+ def DeleteTaskPushNotificationConfig (self , request , context ):
169+ """Delete a push notification config for a task.
170+ """
171+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
172+ context .set_details ('Method not implemented!' )
173+ raise NotImplementedError ('Method not implemented!' )
174+
162175
163176def add_A2AServiceServicer_to_server (servicer , server ):
164177 rpc_method_handlers = {
@@ -187,26 +200,31 @@ def add_A2AServiceServicer_to_server(servicer, server):
187200 request_deserializer = a2a__pb2 .TaskSubscriptionRequest .FromString ,
188201 response_serializer = a2a__pb2 .StreamResponse .SerializeToString ,
189202 ),
190- 'CreateTaskPushNotification ' : grpc .unary_unary_rpc_method_handler (
191- servicer .CreateTaskPushNotification ,
192- request_deserializer = a2a__pb2 .CreateTaskPushNotificationRequest .FromString ,
203+ 'CreateTaskPushNotificationConfig ' : grpc .unary_unary_rpc_method_handler (
204+ servicer .CreateTaskPushNotificationConfig ,
205+ request_deserializer = a2a__pb2 .CreateTaskPushNotificationConfigRequest .FromString ,
193206 response_serializer = a2a__pb2 .TaskPushNotificationConfig .SerializeToString ,
194207 ),
195- 'GetTaskPushNotification ' : grpc .unary_unary_rpc_method_handler (
196- servicer .GetTaskPushNotification ,
197- request_deserializer = a2a__pb2 .GetTaskPushNotificationRequest .FromString ,
208+ 'GetTaskPushNotificationConfig ' : grpc .unary_unary_rpc_method_handler (
209+ servicer .GetTaskPushNotificationConfig ,
210+ request_deserializer = a2a__pb2 .GetTaskPushNotificationConfigRequest .FromString ,
198211 response_serializer = a2a__pb2 .TaskPushNotificationConfig .SerializeToString ,
199212 ),
200- 'ListTaskPushNotification ' : grpc .unary_unary_rpc_method_handler (
201- servicer .ListTaskPushNotification ,
202- request_deserializer = a2a__pb2 .ListTaskPushNotificationRequest .FromString ,
203- response_serializer = a2a__pb2 .ListTaskPushNotificationResponse .SerializeToString ,
213+ 'ListTaskPushNotificationConfig ' : grpc .unary_unary_rpc_method_handler (
214+ servicer .ListTaskPushNotificationConfig ,
215+ request_deserializer = a2a__pb2 .ListTaskPushNotificationConfigRequest .FromString ,
216+ response_serializer = a2a__pb2 .ListTaskPushNotificationConfigResponse .SerializeToString ,
204217 ),
205218 'GetAgentCard' : grpc .unary_unary_rpc_method_handler (
206219 servicer .GetAgentCard ,
207220 request_deserializer = a2a__pb2 .GetAgentCardRequest .FromString ,
208221 response_serializer = a2a__pb2 .AgentCard .SerializeToString ,
209222 ),
223+ 'DeleteTaskPushNotificationConfig' : grpc .unary_unary_rpc_method_handler (
224+ servicer .DeleteTaskPushNotificationConfig ,
225+ request_deserializer = a2a__pb2 .DeleteTaskPushNotificationConfigRequest .FromString ,
226+ response_serializer = google_dot_protobuf_dot_empty__pb2 .Empty .SerializeToString ,
227+ ),
210228 }
211229 generic_handler = grpc .method_handlers_generic_handler (
212230 'a2a.v1.A2AService' , rpc_method_handlers )
@@ -219,12 +237,12 @@ class A2AService(object):
219237 """A2AService defines the gRPC version of the A2A protocol. This has a slightly
220238 different shape than the JSONRPC version to better conform to AIP-127,
221239 where appropriate. The nouns are AgentCard, Message, Task and
222- TaskPushNotification .
240+ TaskPushNotificationConfig .
223241 - Messages are not a standard resource so there is no get/delete/update/list
224242 interface, only a send and stream custom methods.
225243 - Tasks have a get interface and custom cancel and subscribe methods.
226- - TaskPushNotification are a resource whose parent is a task. They have get,
227- list and create methods.
244+ - TaskPushNotificationConfig are a resource whose parent is a task.
245+ They have get, list and create methods.
228246 - AgentCard is a static resource with only a get method.
229247 fields are not present as they don't comply with AIP rules, and the
230248 optional history_length on the get task method is not present as it also
@@ -367,7 +385,7 @@ def TaskSubscription(request,
367385 _registered_method = True )
368386
369387 @staticmethod
370- def CreateTaskPushNotification (request ,
388+ def CreateTaskPushNotificationConfig (request ,
371389 target ,
372390 options = (),
373391 channel_credentials = None ,
@@ -380,8 +398,8 @@ def CreateTaskPushNotification(request,
380398 return grpc .experimental .unary_unary (
381399 request ,
382400 target ,
383- '/a2a.v1.A2AService/CreateTaskPushNotification ' ,
384- a2a__pb2 .CreateTaskPushNotificationRequest .SerializeToString ,
401+ '/a2a.v1.A2AService/CreateTaskPushNotificationConfig ' ,
402+ a2a__pb2 .CreateTaskPushNotificationConfigRequest .SerializeToString ,
385403 a2a__pb2 .TaskPushNotificationConfig .FromString ,
386404 options ,
387405 channel_credentials ,
@@ -394,7 +412,7 @@ def CreateTaskPushNotification(request,
394412 _registered_method = True )
395413
396414 @staticmethod
397- def GetTaskPushNotification (request ,
415+ def GetTaskPushNotificationConfig (request ,
398416 target ,
399417 options = (),
400418 channel_credentials = None ,
@@ -407,8 +425,8 @@ def GetTaskPushNotification(request,
407425 return grpc .experimental .unary_unary (
408426 request ,
409427 target ,
410- '/a2a.v1.A2AService/GetTaskPushNotification ' ,
411- a2a__pb2 .GetTaskPushNotificationRequest .SerializeToString ,
428+ '/a2a.v1.A2AService/GetTaskPushNotificationConfig ' ,
429+ a2a__pb2 .GetTaskPushNotificationConfigRequest .SerializeToString ,
412430 a2a__pb2 .TaskPushNotificationConfig .FromString ,
413431 options ,
414432 channel_credentials ,
@@ -421,7 +439,7 @@ def GetTaskPushNotification(request,
421439 _registered_method = True )
422440
423441 @staticmethod
424- def ListTaskPushNotification (request ,
442+ def ListTaskPushNotificationConfig (request ,
425443 target ,
426444 options = (),
427445 channel_credentials = None ,
@@ -434,9 +452,9 @@ def ListTaskPushNotification(request,
434452 return grpc .experimental .unary_unary (
435453 request ,
436454 target ,
437- '/a2a.v1.A2AService/ListTaskPushNotification ' ,
438- a2a__pb2 .ListTaskPushNotificationRequest .SerializeToString ,
439- a2a__pb2 .ListTaskPushNotificationResponse .FromString ,
455+ '/a2a.v1.A2AService/ListTaskPushNotificationConfig ' ,
456+ a2a__pb2 .ListTaskPushNotificationConfigRequest .SerializeToString ,
457+ a2a__pb2 .ListTaskPushNotificationConfigResponse .FromString ,
440458 options ,
441459 channel_credentials ,
442460 insecure ,
@@ -473,3 +491,30 @@ def GetAgentCard(request,
473491 timeout ,
474492 metadata ,
475493 _registered_method = True )
494+
495+ @staticmethod
496+ def DeleteTaskPushNotificationConfig (request ,
497+ target ,
498+ options = (),
499+ channel_credentials = None ,
500+ call_credentials = None ,
501+ insecure = False ,
502+ compression = None ,
503+ wait_for_ready = None ,
504+ timeout = None ,
505+ metadata = None ):
506+ return grpc .experimental .unary_unary (
507+ request ,
508+ target ,
509+ '/a2a.v1.A2AService/DeleteTaskPushNotificationConfig' ,
510+ a2a__pb2 .DeleteTaskPushNotificationConfigRequest .SerializeToString ,
511+ google_dot_protobuf_dot_empty__pb2 .Empty .FromString ,
512+ options ,
513+ channel_credentials ,
514+ insecure ,
515+ call_credentials ,
516+ compression ,
517+ wait_for_ready ,
518+ timeout ,
519+ metadata ,
520+ _registered_method = True )
0 commit comments