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

import RelayService_pb2 as RelayService__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetTopicStream = channel.unary_stream(
                '/nP.grpc.relayServiceProto.RelayService/GetTopicStream',
                request_serializer=RelayService__pb2.ShortMsg.SerializeToString,
                response_deserializer=RelayService__pb2.FullMsg.FromString,
                )
        self.PublishTopic = channel.unary_unary(
                '/nP.grpc.relayServiceProto.RelayService/PublishTopic',
                request_serializer=RelayService__pb2.FullMsg.SerializeToString,
                response_deserializer=RelayService__pb2.ShortMsg.FromString,
                )


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

    def GetTopicStream(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 PublishTopic(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_RelayServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetTopicStream': grpc.unary_stream_rpc_method_handler(
                    servicer.GetTopicStream,
                    request_deserializer=RelayService__pb2.ShortMsg.FromString,
                    response_serializer=RelayService__pb2.FullMsg.SerializeToString,
            ),
            'PublishTopic': grpc.unary_unary_rpc_method_handler(
                    servicer.PublishTopic,
                    request_deserializer=RelayService__pb2.FullMsg.FromString,
                    response_serializer=RelayService__pb2.ShortMsg.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nP.grpc.relayServiceProto.RelayService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetTopicStream(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, '/nP.grpc.relayServiceProto.RelayService/GetTopicStream',
            RelayService__pb2.ShortMsg.SerializeToString,
            RelayService__pb2.FullMsg.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PublishTopic(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, '/nP.grpc.relayServiceProto.RelayService/PublishTopic',
            RelayService__pb2.FullMsg.SerializeToString,
            RelayService__pb2.ShortMsg.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
