3
3
import grpc
4
4
5
5
from . import a2a_pb2 as a2a__pb2
6
+ from google .protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
6
7
7
8
8
9
class A2AServiceStub (object ):
9
10
"""A2AService defines the gRPC version of the A2A protocol. This has a slightly
10
11
different shape than the JSONRPC version to better conform to AIP-127,
11
12
where appropriate. The nouns are AgentCard, Message, Task and
12
- TaskPushNotification .
13
+ TaskPushNotificationConfig .
13
14
- Messages are not a standard resource so there is no get/delete/update/list
14
15
interface, only a send and stream custom methods.
15
16
- 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.
18
19
- AgentCard is a static resource with only a get method.
19
20
fields are not present as they don't comply with AIP rules, and the
20
21
optional history_length on the get task method is not present as it also
@@ -52,38 +53,43 @@ def __init__(self, channel):
52
53
request_serializer = a2a__pb2 .TaskSubscriptionRequest .SerializeToString ,
53
54
response_deserializer = a2a__pb2 .StreamResponse .FromString ,
54
55
_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 ,
58
59
response_deserializer = a2a__pb2 .TaskPushNotificationConfig .FromString ,
59
60
_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 ,
63
64
response_deserializer = a2a__pb2 .TaskPushNotificationConfig .FromString ,
64
65
_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 ,
69
70
_registered_method = True )
70
71
self .GetAgentCard = channel .unary_unary (
71
72
'/a2a.v1.A2AService/GetAgentCard' ,
72
73
request_serializer = a2a__pb2 .GetAgentCardRequest .SerializeToString ,
73
74
response_deserializer = a2a__pb2 .AgentCard .FromString ,
74
75
_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 )
75
81
76
82
77
83
class A2AServiceServicer (object ):
78
84
"""A2AService defines the gRPC version of the A2A protocol. This has a slightly
79
85
different shape than the JSONRPC version to better conform to AIP-127,
80
86
where appropriate. The nouns are AgentCard, Message, Task and
81
- TaskPushNotification .
87
+ TaskPushNotificationConfig .
82
88
- Messages are not a standard resource so there is no get/delete/update/list
83
89
interface, only a send and stream custom methods.
84
90
- 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.
87
93
- AgentCard is a static resource with only a get method.
88
94
fields are not present as they don't comply with AIP rules, and the
89
95
optional history_length on the get task method is not present as it also
@@ -131,21 +137,21 @@ def TaskSubscription(self, request, context):
131
137
context .set_details ('Method not implemented!' )
132
138
raise NotImplementedError ('Method not implemented!' )
133
139
134
- def CreateTaskPushNotification (self , request , context ):
140
+ def CreateTaskPushNotificationConfig (self , request , context ):
135
141
"""Set a push notification config for a task.
136
142
"""
137
143
context .set_code (grpc .StatusCode .UNIMPLEMENTED )
138
144
context .set_details ('Method not implemented!' )
139
145
raise NotImplementedError ('Method not implemented!' )
140
146
141
- def GetTaskPushNotification (self , request , context ):
147
+ def GetTaskPushNotificationConfig (self , request , context ):
142
148
"""Get a push notification config for a task.
143
149
"""
144
150
context .set_code (grpc .StatusCode .UNIMPLEMENTED )
145
151
context .set_details ('Method not implemented!' )
146
152
raise NotImplementedError ('Method not implemented!' )
147
153
148
- def ListTaskPushNotification (self , request , context ):
154
+ def ListTaskPushNotificationConfig (self , request , context ):
149
155
"""Get a list of push notifications configured for a task.
150
156
"""
151
157
context .set_code (grpc .StatusCode .UNIMPLEMENTED )
@@ -159,6 +165,13 @@ def GetAgentCard(self, request, context):
159
165
context .set_details ('Method not implemented!' )
160
166
raise NotImplementedError ('Method not implemented!' )
161
167
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
+
162
175
163
176
def add_A2AServiceServicer_to_server (servicer , server ):
164
177
rpc_method_handlers = {
@@ -187,26 +200,31 @@ def add_A2AServiceServicer_to_server(servicer, server):
187
200
request_deserializer = a2a__pb2 .TaskSubscriptionRequest .FromString ,
188
201
response_serializer = a2a__pb2 .StreamResponse .SerializeToString ,
189
202
),
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 ,
193
206
response_serializer = a2a__pb2 .TaskPushNotificationConfig .SerializeToString ,
194
207
),
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 ,
198
211
response_serializer = a2a__pb2 .TaskPushNotificationConfig .SerializeToString ,
199
212
),
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 ,
204
217
),
205
218
'GetAgentCard' : grpc .unary_unary_rpc_method_handler (
206
219
servicer .GetAgentCard ,
207
220
request_deserializer = a2a__pb2 .GetAgentCardRequest .FromString ,
208
221
response_serializer = a2a__pb2 .AgentCard .SerializeToString ,
209
222
),
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
+ ),
210
228
}
211
229
generic_handler = grpc .method_handlers_generic_handler (
212
230
'a2a.v1.A2AService' , rpc_method_handlers )
@@ -219,12 +237,12 @@ class A2AService(object):
219
237
"""A2AService defines the gRPC version of the A2A protocol. This has a slightly
220
238
different shape than the JSONRPC version to better conform to AIP-127,
221
239
where appropriate. The nouns are AgentCard, Message, Task and
222
- TaskPushNotification .
240
+ TaskPushNotificationConfig .
223
241
- Messages are not a standard resource so there is no get/delete/update/list
224
242
interface, only a send and stream custom methods.
225
243
- 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.
228
246
- AgentCard is a static resource with only a get method.
229
247
fields are not present as they don't comply with AIP rules, and the
230
248
optional history_length on the get task method is not present as it also
@@ -367,7 +385,7 @@ def TaskSubscription(request,
367
385
_registered_method = True )
368
386
369
387
@staticmethod
370
- def CreateTaskPushNotification (request ,
388
+ def CreateTaskPushNotificationConfig (request ,
371
389
target ,
372
390
options = (),
373
391
channel_credentials = None ,
@@ -380,8 +398,8 @@ def CreateTaskPushNotification(request,
380
398
return grpc .experimental .unary_unary (
381
399
request ,
382
400
target ,
383
- '/a2a.v1.A2AService/CreateTaskPushNotification ' ,
384
- a2a__pb2 .CreateTaskPushNotificationRequest .SerializeToString ,
401
+ '/a2a.v1.A2AService/CreateTaskPushNotificationConfig ' ,
402
+ a2a__pb2 .CreateTaskPushNotificationConfigRequest .SerializeToString ,
385
403
a2a__pb2 .TaskPushNotificationConfig .FromString ,
386
404
options ,
387
405
channel_credentials ,
@@ -394,7 +412,7 @@ def CreateTaskPushNotification(request,
394
412
_registered_method = True )
395
413
396
414
@staticmethod
397
- def GetTaskPushNotification (request ,
415
+ def GetTaskPushNotificationConfig (request ,
398
416
target ,
399
417
options = (),
400
418
channel_credentials = None ,
@@ -407,8 +425,8 @@ def GetTaskPushNotification(request,
407
425
return grpc .experimental .unary_unary (
408
426
request ,
409
427
target ,
410
- '/a2a.v1.A2AService/GetTaskPushNotification ' ,
411
- a2a__pb2 .GetTaskPushNotificationRequest .SerializeToString ,
428
+ '/a2a.v1.A2AService/GetTaskPushNotificationConfig ' ,
429
+ a2a__pb2 .GetTaskPushNotificationConfigRequest .SerializeToString ,
412
430
a2a__pb2 .TaskPushNotificationConfig .FromString ,
413
431
options ,
414
432
channel_credentials ,
@@ -421,7 +439,7 @@ def GetTaskPushNotification(request,
421
439
_registered_method = True )
422
440
423
441
@staticmethod
424
- def ListTaskPushNotification (request ,
442
+ def ListTaskPushNotificationConfig (request ,
425
443
target ,
426
444
options = (),
427
445
channel_credentials = None ,
@@ -434,9 +452,9 @@ def ListTaskPushNotification(request,
434
452
return grpc .experimental .unary_unary (
435
453
request ,
436
454
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 ,
440
458
options ,
441
459
channel_credentials ,
442
460
insecure ,
@@ -473,3 +491,30 @@ def GetAgentCard(request,
473
491
timeout ,
474
492
metadata ,
475
493
_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