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

from registry.v1 import registry_pb2 as registry_dot_v1_dot_registry__pb2


class RegistryServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Subscribe = channel.stream_stream(
                '/servicebridge.registry.v1.RegistryService/Subscribe',
                request_serializer=registry_dot_v1_dot_registry__pb2.SubscribeRequest.SerializeToString,
                response_deserializer=registry_dot_v1_dot_registry__pb2.SubscribeResponse.FromString,
                _registered_method=True)
        self.Lookup = channel.unary_unary(
                '/servicebridge.registry.v1.RegistryService/Lookup',
                request_serializer=registry_dot_v1_dot_registry__pb2.LookupRequest.SerializeToString,
                response_deserializer=registry_dot_v1_dot_registry__pb2.LookupResponse.FromString,
                _registered_method=True)


class RegistryServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def Subscribe(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Lookup(self, request, context):
        """Missing associated documentation comment in .proto file."""
        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 = {
            'Subscribe': grpc.stream_stream_rpc_method_handler(
                    servicer.Subscribe,
                    request_deserializer=registry_dot_v1_dot_registry__pb2.SubscribeRequest.FromString,
                    response_serializer=registry_dot_v1_dot_registry__pb2.SubscribeResponse.SerializeToString,
            ),
            'Lookup': grpc.unary_unary_rpc_method_handler(
                    servicer.Lookup,
                    request_deserializer=registry_dot_v1_dot_registry__pb2.LookupRequest.FromString,
                    response_serializer=registry_dot_v1_dot_registry__pb2.LookupResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'servicebridge.registry.v1.RegistryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('servicebridge.registry.v1.RegistryService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class RegistryService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Subscribe(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/servicebridge.registry.v1.RegistryService/Subscribe',
            registry_dot_v1_dot_registry__pb2.SubscribeRequest.SerializeToString,
            registry_dot_v1_dot_registry__pb2.SubscribeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Lookup(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,
            '/servicebridge.registry.v1.RegistryService/Lookup',
            registry_dot_v1_dot_registry__pb2.LookupRequest.SerializeToString,
            registry_dot_v1_dot_registry__pb2.LookupResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
