11from collections .abc import AsyncGenerator , AsyncIterator , Callable
2- from types import TracebackType
32from typing import Any
43
5- from typing_extensions import Self
6-
74from a2a .client .client import (
85 Client ,
96 ClientCallContext ,
@@ -51,19 +48,6 @@ def __init__(
5148 self ._config = config
5249 self ._transport = transport
5350
54- async def __aenter__ (self ) -> Self :
55- """Enters the async context manager, returning the client itself."""
56- return self
57-
58- async def __aexit__ (
59- self ,
60- exc_type : type [BaseException ] | None ,
61- exc_val : BaseException | None ,
62- exc_tb : TracebackType | None ,
63- ) -> None :
64- """Exits the async context manager, ensuring close() is called."""
65- await self .close ()
66-
6751 async def send_message (
6852 self ,
6953 request : Message ,
@@ -208,7 +192,7 @@ async def cancel_task(
208192 request , context = context , extensions = extensions
209193 )
210194
211- async def set_task_callback (
195+ async def create_task_push_notification_config (
212196 self ,
213197 request : CreateTaskPushNotificationConfigRequest ,
214198 * ,
@@ -225,11 +209,11 @@ async def set_task_callback(
225209 Returns:
226210 The created or updated `TaskPushNotificationConfig` object.
227211 """
228- return await self ._transport .set_task_callback (
212+ return await self ._transport .create_task_push_notification_config (
229213 request , context = context , extensions = extensions
230214 )
231215
232- async def get_task_callback (
216+ async def get_task_push_notification_config (
233217 self ,
234218 request : GetTaskPushNotificationConfigRequest ,
235219 * ,
@@ -246,11 +230,11 @@ async def get_task_callback(
246230 Returns:
247231 A `TaskPushNotificationConfig` object containing the configuration.
248232 """
249- return await self ._transport .get_task_callback (
233+ return await self ._transport .get_task_push_notification_config (
250234 request , context = context , extensions = extensions
251235 )
252236
253- async def list_task_callback (
237+ async def list_task_push_notification_configs (
254238 self ,
255239 request : ListTaskPushNotificationConfigsRequest ,
256240 * ,
@@ -267,11 +251,11 @@ async def list_task_callback(
267251 Returns:
268252 A `ListTaskPushNotificationConfigsResponse` object.
269253 """
270- return await self ._transport .list_task_callback (
254+ return await self ._transport .list_task_push_notification_configs (
271255 request , context = context , extensions = extensions
272256 )
273257
274- async def delete_task_callback (
258+ async def delete_task_push_notification_config (
275259 self ,
276260 request : DeleteTaskPushNotificationConfigRequest ,
277261 * ,
@@ -285,7 +269,7 @@ async def delete_task_callback(
285269 context: The client call context.
286270 extensions: List of extensions to be activated.
287271 """
288- await self ._transport .delete_task_callback (
272+ await self ._transport .delete_task_push_notification_config (
289273 request , context = context , extensions = extensions
290274 )
291275
0 commit comments