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

from agentanycast.v1 import registry_service_pb2 as agentanycast_dot_v1_dot_registry__service__pb2


class RegistryServiceStub(object):
    """RegistryService is the Skill Registry hosted on the Relay server.
    Agents register their skills upon connecting to the Relay, and other
    agents query the registry to discover peers by capability.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.RegisterSkills = channel.unary_unary(
                '/agentanycast.v1.RegistryService/RegisterSkills',
                request_serializer=agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsRequest.SerializeToString,
                response_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsResponse.FromString,
                _registered_method=True)
        self.UnregisterSkills = channel.unary_unary(
                '/agentanycast.v1.RegistryService/UnregisterSkills',
                request_serializer=agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsRequest.SerializeToString,
                response_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsResponse.FromString,
                _registered_method=True)
        self.DiscoverBySkill = channel.unary_unary(
                '/agentanycast.v1.RegistryService/DiscoverBySkill',
                request_serializer=agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillRequest.SerializeToString,
                response_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillResponse.FromString,
                _registered_method=True)
        self.Heartbeat = channel.unary_unary(
                '/agentanycast.v1.RegistryService/Heartbeat',
                request_serializer=agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatRequest.SerializeToString,
                response_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatResponse.FromString,
                _registered_method=True)


class RegistryServiceServicer(object):
    """RegistryService is the Skill Registry hosted on the Relay server.
    Agents register their skills upon connecting to the Relay, and other
    agents query the registry to discover peers by capability.
    """

    def RegisterSkills(self, request, context):
        """RegisterSkills registers (or refreshes) the calling agent's skills.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UnregisterSkills(self, request, context):
        """UnregisterSkills removes specific skills for the calling agent.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DiscoverBySkill(self, request, context):
        """DiscoverBySkill returns agents that offer the requested skill.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Heartbeat(self, request, context):
        """Heartbeat renews the TTL of a registration without re-sending full data.
        """
        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 = {
            'RegisterSkills': grpc.unary_unary_rpc_method_handler(
                    servicer.RegisterSkills,
                    request_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsRequest.FromString,
                    response_serializer=agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsResponse.SerializeToString,
            ),
            'UnregisterSkills': grpc.unary_unary_rpc_method_handler(
                    servicer.UnregisterSkills,
                    request_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsRequest.FromString,
                    response_serializer=agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsResponse.SerializeToString,
            ),
            'DiscoverBySkill': grpc.unary_unary_rpc_method_handler(
                    servicer.DiscoverBySkill,
                    request_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillRequest.FromString,
                    response_serializer=agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillResponse.SerializeToString,
            ),
            'Heartbeat': grpc.unary_unary_rpc_method_handler(
                    servicer.Heartbeat,
                    request_deserializer=agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatRequest.FromString,
                    response_serializer=agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agentanycast.v1.RegistryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agentanycast.v1.RegistryService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class RegistryService(object):
    """RegistryService is the Skill Registry hosted on the Relay server.
    Agents register their skills upon connecting to the Relay, and other
    agents query the registry to discover peers by capability.
    """

    @staticmethod
    def RegisterSkills(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,
            '/agentanycast.v1.RegistryService/RegisterSkills',
            agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsRequest.SerializeToString,
            agentanycast_dot_v1_dot_registry__service__pb2.RegisterSkillsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UnregisterSkills(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,
            '/agentanycast.v1.RegistryService/UnregisterSkills',
            agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsRequest.SerializeToString,
            agentanycast_dot_v1_dot_registry__service__pb2.UnregisterSkillsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DiscoverBySkill(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,
            '/agentanycast.v1.RegistryService/DiscoverBySkill',
            agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillRequest.SerializeToString,
            agentanycast_dot_v1_dot_registry__service__pb2.DiscoverBySkillResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Heartbeat(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,
            '/agentanycast.v1.RegistryService/Heartbeat',
            agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatRequest.SerializeToString,
            agentanycast_dot_v1_dot_registry__service__pb2.HeartbeatResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
