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

from capiscio_mcp._proto.gen.capiscio.v1 import registry_pb2 as capiscio_dot_v1_dot_registry__pb2


class RegistryServiceStub(object):
    """RegistryService handles agent registration and discovery
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAgent = channel.unary_unary(
                '/capiscio.v1.RegistryService/GetAgent',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.GetAgentRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.GetAgentResponse.FromString,
                _registered_method=True)
        self.SearchAgents = channel.unary_unary(
                '/capiscio.v1.RegistryService/SearchAgents',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.SearchAgentsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.SearchAgentsResponse.FromString,
                _registered_method=True)
        self.RegisterAgent = channel.unary_unary(
                '/capiscio.v1.RegistryService/RegisterAgent',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.RegisterAgentRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.RegisterAgentResponse.FromString,
                _registered_method=True)
        self.UpdateAgent = channel.unary_unary(
                '/capiscio.v1.RegistryService/UpdateAgent',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.UpdateAgentRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.UpdateAgentResponse.FromString,
                _registered_method=True)
        self.DeregisterAgent = channel.unary_unary(
                '/capiscio.v1.RegistryService/DeregisterAgent',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.DeregisterAgentRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.DeregisterAgentResponse.FromString,
                _registered_method=True)
        self.VerifyRegistration = channel.unary_unary(
                '/capiscio.v1.RegistryService/VerifyRegistration',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationResponse.FromString,
                _registered_method=True)
        self.ListAgents = channel.unary_unary(
                '/capiscio.v1.RegistryService/ListAgents',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.ListAgentsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.ListAgentsResponse.FromString,
                _registered_method=True)
        self.GetStats = channel.unary_unary(
                '/capiscio.v1.RegistryService/GetStats',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.GetStatsRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.GetStatsResponse.FromString,
                _registered_method=True)
        self.Ping = channel.unary_unary(
                '/capiscio.v1.RegistryService/Ping',
                request_serializer=capiscio_dot_v1_dot_registry__pb2.PingRequest.SerializeToString,
                response_deserializer=capiscio_dot_v1_dot_registry__pb2.PingResponse.FromString,
                _registered_method=True)


class RegistryServiceServicer(object):
    """RegistryService handles agent registration and discovery
    """

    def GetAgent(self, request, context):
        """Get an agent card by DID
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SearchAgents(self, request, context):
        """Search for agents
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RegisterAgent(self, request, context):
        """Register a new agent
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateAgent(self, request, context):
        """Update an existing agent
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeregisterAgent(self, request, context):
        """Deregister an agent
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyRegistration(self, request, context):
        """Verify agent registration
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAgents(self, request, context):
        """List agents (with pagination)
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetStats(self, request, context):
        """Get registry statistics
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Ping(self, request, context):
        """Ping registry health
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RegistryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAgent,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.GetAgentRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.GetAgentResponse.SerializeToString,
            ),
            'SearchAgents': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchAgents,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.SearchAgentsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.SearchAgentsResponse.SerializeToString,
            ),
            'RegisterAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterAgent,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.RegisterAgentRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.RegisterAgentResponse.SerializeToString,
            ),
            'UpdateAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateAgent,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.UpdateAgentRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.UpdateAgentResponse.SerializeToString,
            ),
            'DeregisterAgent': grpc.unary_unary_rpc_method_handler(
                    servicer.DeregisterAgent,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.DeregisterAgentRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.DeregisterAgentResponse.SerializeToString,
            ),
            'VerifyRegistration': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyRegistration,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationResponse.SerializeToString,
            ),
            'ListAgents': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAgents,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.ListAgentsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.ListAgentsResponse.SerializeToString,
            ),
            'GetStats': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStats,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.GetStatsRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.GetStatsResponse.SerializeToString,
            ),
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=capiscio_dot_v1_dot_registry__pb2.PingRequest.FromString,
                    response_serializer=capiscio_dot_v1_dot_registry__pb2.PingResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'capiscio.v1.RegistryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('capiscio.v1.RegistryService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class RegistryService(object):
    """RegistryService handles agent registration and discovery
    """

    @staticmethod
    def GetAgent(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,
            '/capiscio.v1.RegistryService/GetAgent',
            capiscio_dot_v1_dot_registry__pb2.GetAgentRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.GetAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SearchAgents(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,
            '/capiscio.v1.RegistryService/SearchAgents',
            capiscio_dot_v1_dot_registry__pb2.SearchAgentsRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.SearchAgentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RegisterAgent(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,
            '/capiscio.v1.RegistryService/RegisterAgent',
            capiscio_dot_v1_dot_registry__pb2.RegisterAgentRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.RegisterAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateAgent(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,
            '/capiscio.v1.RegistryService/UpdateAgent',
            capiscio_dot_v1_dot_registry__pb2.UpdateAgentRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.UpdateAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeregisterAgent(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,
            '/capiscio.v1.RegistryService/DeregisterAgent',
            capiscio_dot_v1_dot_registry__pb2.DeregisterAgentRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.DeregisterAgentResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyRegistration(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,
            '/capiscio.v1.RegistryService/VerifyRegistration',
            capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.VerifyRegistrationResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListAgents(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,
            '/capiscio.v1.RegistryService/ListAgents',
            capiscio_dot_v1_dot_registry__pb2.ListAgentsRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.ListAgentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStats(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,
            '/capiscio.v1.RegistryService/GetStats',
            capiscio_dot_v1_dot_registry__pb2.GetStatsRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.GetStatsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Ping(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,
            '/capiscio.v1.RegistryService/Ping',
            capiscio_dot_v1_dot_registry__pb2.PingRequest.SerializeToString,
            capiscio_dot_v1_dot_registry__pb2.PingResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
