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

import rsa_pb2 as rsa__pb2


class SecureMessagingStub(object):
    """

    Google says that python ignores the package directive 

    package ousystems


    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetPublicKey = channel.unary_unary(
                '/SecureMessaging/GetPublicKey',
                request_serializer=rsa__pb2.NullMsg.SerializeToString,
                response_deserializer=rsa__pb2.PublicKey.FromString,
                )
        self.SendEncryptedMessage = channel.unary_unary(
                '/SecureMessaging/SendEncryptedMessage',
                request_serializer=rsa__pb2.EncryptedMessage.SerializeToString,
                response_deserializer=rsa__pb2.MsgAck.FromString,
                )


class SecureMessagingServicer(object):
    """

    Google says that python ignores the package directive 

    package ousystems


    """

    def GetPublicKey(self, request, context):
        """Requests and returns the Public Key
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendEncryptedMessage(self, request, context):
        """Receives an Encrypt a message
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SecureMessagingServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetPublicKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPublicKey,
                    request_deserializer=rsa__pb2.NullMsg.FromString,
                    response_serializer=rsa__pb2.PublicKey.SerializeToString,
            ),
            'SendEncryptedMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendEncryptedMessage,
                    request_deserializer=rsa__pb2.EncryptedMessage.FromString,
                    response_serializer=rsa__pb2.MsgAck.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'SecureMessaging', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SecureMessaging(object):
    """

    Google says that python ignores the package directive 

    package ousystems


    """

    @staticmethod
    def GetPublicKey(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, '/SecureMessaging/GetPublicKey',
            rsa__pb2.NullMsg.SerializeToString,
            rsa__pb2.PublicKey.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendEncryptedMessage(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, '/SecureMessaging/SendEncryptedMessage',
            rsa__pb2.EncryptedMessage.SerializeToString,
            rsa__pb2.MsgAck.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SayHello = channel.unary_unary(
                '/Greeter/SayHello',
                request_serializer=rsa__pb2.HelloRequest.SerializeToString,
                response_deserializer=rsa__pb2.HelloReply.FromString,
                )


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

    def SayHello(self, request, context):
        """sends a greeting
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GreeterServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SayHello': grpc.unary_unary_rpc_method_handler(
                    servicer.SayHello,
                    request_deserializer=rsa__pb2.HelloRequest.FromString,
                    response_serializer=rsa__pb2.HelloReply.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Greeter', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SayHello(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, '/Greeter/SayHello',
            rsa__pb2.HelloRequest.SerializeToString,
            rsa__pb2.HelloReply.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
