# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import a2a_pb2 as a2a__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class A2AServiceStub(object):
    """Provides operations for interacting with agents using the A2A protocol.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.SendMessage = channel.unary_unary(
                '/lf.a2a.v1.A2AService/SendMessage',
                request_serializer=a2a__pb2.SendMessageRequest.SerializeToString,
                response_deserializer=a2a__pb2.SendMessageResponse.FromString,
                _registered_method=True)
        self.SendStreamingMessage = channel.unary_stream(
                '/lf.a2a.v1.A2AService/SendStreamingMessage',
                request_serializer=a2a__pb2.SendMessageRequest.SerializeToString,
                response_deserializer=a2a__pb2.StreamResponse.FromString,
                _registered_method=True)
        self.GetTask = channel.unary_unary(
                '/lf.a2a.v1.A2AService/GetTask',
                request_serializer=a2a__pb2.GetTaskRequest.SerializeToString,
                response_deserializer=a2a__pb2.Task.FromString,
                _registered_method=True)
        self.ListTasks = channel.unary_unary(
                '/lf.a2a.v1.A2AService/ListTasks',
                request_serializer=a2a__pb2.ListTasksRequest.SerializeToString,
                response_deserializer=a2a__pb2.ListTasksResponse.FromString,
                _registered_method=True)
        self.CancelTask = channel.unary_unary(
                '/lf.a2a.v1.A2AService/CancelTask',
                request_serializer=a2a__pb2.CancelTaskRequest.SerializeToString,
                response_deserializer=a2a__pb2.Task.FromString,
                _registered_method=True)
        self.SubscribeToTask = channel.unary_stream(
                '/lf.a2a.v1.A2AService/SubscribeToTask',
                request_serializer=a2a__pb2.SubscribeToTaskRequest.SerializeToString,
                response_deserializer=a2a__pb2.StreamResponse.FromString,
                _registered_method=True)
        self.CreateTaskPushNotificationConfig = channel.unary_unary(
                '/lf.a2a.v1.A2AService/CreateTaskPushNotificationConfig',
                request_serializer=a2a__pb2.TaskPushNotificationConfig.SerializeToString,
                response_deserializer=a2a__pb2.TaskPushNotificationConfig.FromString,
                _registered_method=True)
        self.GetTaskPushNotificationConfig = channel.unary_unary(
                '/lf.a2a.v1.A2AService/GetTaskPushNotificationConfig',
                request_serializer=a2a__pb2.GetTaskPushNotificationConfigRequest.SerializeToString,
                response_deserializer=a2a__pb2.TaskPushNotificationConfig.FromString,
                _registered_method=True)
        self.ListTaskPushNotificationConfigs = channel.unary_unary(
                '/lf.a2a.v1.A2AService/ListTaskPushNotificationConfigs',
                request_serializer=a2a__pb2.ListTaskPushNotificationConfigsRequest.SerializeToString,
                response_deserializer=a2a__pb2.ListTaskPushNotificationConfigsResponse.FromString,
                _registered_method=True)
        self.GetExtendedAgentCard = channel.unary_unary(
                '/lf.a2a.v1.A2AService/GetExtendedAgentCard',
                request_serializer=a2a__pb2.GetExtendedAgentCardRequest.SerializeToString,
                response_deserializer=a2a__pb2.AgentCard.FromString,
                _registered_method=True)
        self.DeleteTaskPushNotificationConfig = channel.unary_unary(
                '/lf.a2a.v1.A2AService/DeleteTaskPushNotificationConfig',
                request_serializer=a2a__pb2.DeleteTaskPushNotificationConfigRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)


class A2AServiceServicer(object):
    """Provides operations for interacting with agents using the A2A protocol.
    """

    def SendMessage(self, request, context):
        """Sends a message to an agent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendStreamingMessage(self, request, context):
        """Sends a streaming message to an agent, allowing for real-time interaction and status updates.
        Streaming version of `SendMessage`
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTask(self, request, context):
        """Gets the latest state of a task.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTasks(self, request, context):
        """Lists tasks that match the specified filter.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CancelTask(self, request, context):
        """Cancels a task in progress.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SubscribeToTask(self, request, context):
        """Subscribes to task updates for tasks not in a terminal state.
        Returns `UnsupportedOperationError` if the task is already in a terminal state (completed, failed, canceled, rejected).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateTaskPushNotificationConfig(self, request, context):
        """(-- api-linter: client-libraries::4232::required-fields=disabled
        api-linter: core::0133::method-signature=disabled
        api-linter: core::0133::request-message-name=disabled
        aip.dev/not-precedent: method_signature preserved for backwards compatibility --)
        Creates a push notification config for a task.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetTaskPushNotificationConfig(self, request, context):
        """Gets a push notification config for a task.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListTaskPushNotificationConfigs(self, request, context):
        """Get a list of push notifications configured for a task.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetExtendedAgentCard(self, request, context):
        """Gets the extended agent card for the authenticated agent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteTaskPushNotificationConfig(self, request, context):
        """Deletes a push notification config for a task.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_A2AServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SendMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendMessage,
                    request_deserializer=a2a__pb2.SendMessageRequest.FromString,
                    response_serializer=a2a__pb2.SendMessageResponse.SerializeToString,
            ),
            'SendStreamingMessage': grpc.unary_stream_rpc_method_handler(
                    servicer.SendStreamingMessage,
                    request_deserializer=a2a__pb2.SendMessageRequest.FromString,
                    response_serializer=a2a__pb2.StreamResponse.SerializeToString,
            ),
            'GetTask': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTask,
                    request_deserializer=a2a__pb2.GetTaskRequest.FromString,
                    response_serializer=a2a__pb2.Task.SerializeToString,
            ),
            'ListTasks': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTasks,
                    request_deserializer=a2a__pb2.ListTasksRequest.FromString,
                    response_serializer=a2a__pb2.ListTasksResponse.SerializeToString,
            ),
            'CancelTask': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelTask,
                    request_deserializer=a2a__pb2.CancelTaskRequest.FromString,
                    response_serializer=a2a__pb2.Task.SerializeToString,
            ),
            'SubscribeToTask': grpc.unary_stream_rpc_method_handler(
                    servicer.SubscribeToTask,
                    request_deserializer=a2a__pb2.SubscribeToTaskRequest.FromString,
                    response_serializer=a2a__pb2.StreamResponse.SerializeToString,
            ),
            'CreateTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateTaskPushNotificationConfig,
                    request_deserializer=a2a__pb2.TaskPushNotificationConfig.FromString,
                    response_serializer=a2a__pb2.TaskPushNotificationConfig.SerializeToString,
            ),
            'GetTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTaskPushNotificationConfig,
                    request_deserializer=a2a__pb2.GetTaskPushNotificationConfigRequest.FromString,
                    response_serializer=a2a__pb2.TaskPushNotificationConfig.SerializeToString,
            ),
            'ListTaskPushNotificationConfigs': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTaskPushNotificationConfigs,
                    request_deserializer=a2a__pb2.ListTaskPushNotificationConfigsRequest.FromString,
                    response_serializer=a2a__pb2.ListTaskPushNotificationConfigsResponse.SerializeToString,
            ),
            'GetExtendedAgentCard': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExtendedAgentCard,
                    request_deserializer=a2a__pb2.GetExtendedAgentCardRequest.FromString,
                    response_serializer=a2a__pb2.AgentCard.SerializeToString,
            ),
            'DeleteTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTaskPushNotificationConfig,
                    request_deserializer=a2a__pb2.DeleteTaskPushNotificationConfigRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'lf.a2a.v1.A2AService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('lf.a2a.v1.A2AService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class A2AService(object):
    """Provides operations for interacting with agents using the A2A protocol.
    """

    @staticmethod
    def SendMessage(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/SendMessage',
            a2a__pb2.SendMessageRequest.SerializeToString,
            a2a__pb2.SendMessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendStreamingMessage(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(
            request,
            target,
            '/lf.a2a.v1.A2AService/SendStreamingMessage',
            a2a__pb2.SendMessageRequest.SerializeToString,
            a2a__pb2.StreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTask(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/GetTask',
            a2a__pb2.GetTaskRequest.SerializeToString,
            a2a__pb2.Task.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTasks(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/ListTasks',
            a2a__pb2.ListTasksRequest.SerializeToString,
            a2a__pb2.ListTasksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelTask(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/CancelTask',
            a2a__pb2.CancelTaskRequest.SerializeToString,
            a2a__pb2.Task.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SubscribeToTask(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(
            request,
            target,
            '/lf.a2a.v1.A2AService/SubscribeToTask',
            a2a__pb2.SubscribeToTaskRequest.SerializeToString,
            a2a__pb2.StreamResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateTaskPushNotificationConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/CreateTaskPushNotificationConfig',
            a2a__pb2.TaskPushNotificationConfig.SerializeToString,
            a2a__pb2.TaskPushNotificationConfig.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTaskPushNotificationConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/GetTaskPushNotificationConfig',
            a2a__pb2.GetTaskPushNotificationConfigRequest.SerializeToString,
            a2a__pb2.TaskPushNotificationConfig.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListTaskPushNotificationConfigs(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/ListTaskPushNotificationConfigs',
            a2a__pb2.ListTaskPushNotificationConfigsRequest.SerializeToString,
            a2a__pb2.ListTaskPushNotificationConfigsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetExtendedAgentCard(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/GetExtendedAgentCard',
            a2a__pb2.GetExtendedAgentCardRequest.SerializeToString,
            a2a__pb2.AgentCard.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteTaskPushNotificationConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/lf.a2a.v1.A2AService/DeleteTaskPushNotificationConfig',
            a2a__pb2.DeleteTaskPushNotificationConfigRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
