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

from ..proto import base_pb2 as proto_dot_base__pb2
from ..proto import memory_pb2 as proto_dot_memory__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Read = channel.unary_unary(
                '/memory.Memory/Read',
                request_serializer=proto_dot_memory__pb2.AddressAndSizePair.SerializeToString,
                response_deserializer=proto_dot_base__pb2.BinaryData.FromString,
                )
        self.Write = channel.unary_unary(
                '/memory.Memory/Write',
                request_serializer=proto_dot_memory__pb2.MemoryWriteParam.SerializeToString,
                response_deserializer=proto_dot_base__pb2.UnsignedNumberValue.FromString,
                )
        self.IsValidPtr = channel.unary_unary(
                '/memory.Memory/IsValidPtr',
                request_serializer=proto_dot_base__pb2.Address.SerializeToString,
                response_deserializer=proto_dot_base__pb2.Boolean.FromString,
                )
        self.RemoteAlloc = channel.unary_unary(
                '/memory.Memory/RemoteAlloc',
                request_serializer=proto_dot_memory__pb2.AddressAndSizePair.SerializeToString,
                response_deserializer=proto_dot_base__pb2.Address.FromString,
                )
        self.RemoteFree = channel.unary_unary(
                '/memory.Memory/RemoteFree',
                request_serializer=proto_dot_base__pb2.Address.SerializeToString,
                response_deserializer=proto_dot_base__pb2.Boolean.FromString,
                )
        self.GetProtect = channel.unary_unary(
                '/memory.Memory/GetProtect',
                request_serializer=proto_dot_base__pb2.Address.SerializeToString,
                response_deserializer=proto_dot_base__pb2.UnsignedNumberValue.FromString,
                )
        self.GetBase = channel.unary_unary(
                '/memory.Memory/GetBase',
                request_serializer=proto_dot_base__pb2.Address.SerializeToString,
                response_deserializer=proto_dot_base__pb2.Address.FromString,
                )
        self.GetSize = channel.unary_unary(
                '/memory.Memory/GetSize',
                request_serializer=proto_dot_base__pb2.Address.SerializeToString,
                response_deserializer=proto_dot_base__pb2.UnsignedNumberValue.FromString,
                )


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

    def Read(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 Write(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 IsValidPtr(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 RemoteAlloc(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 RemoteFree(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 GetProtect(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 GetBase(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 GetSize(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_MemoryServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Read': grpc.unary_unary_rpc_method_handler(
                    servicer.Read,
                    request_deserializer=proto_dot_memory__pb2.AddressAndSizePair.FromString,
                    response_serializer=proto_dot_base__pb2.BinaryData.SerializeToString,
            ),
            'Write': grpc.unary_unary_rpc_method_handler(
                    servicer.Write,
                    request_deserializer=proto_dot_memory__pb2.MemoryWriteParam.FromString,
                    response_serializer=proto_dot_base__pb2.UnsignedNumberValue.SerializeToString,
            ),
            'IsValidPtr': grpc.unary_unary_rpc_method_handler(
                    servicer.IsValidPtr,
                    request_deserializer=proto_dot_base__pb2.Address.FromString,
                    response_serializer=proto_dot_base__pb2.Boolean.SerializeToString,
            ),
            'RemoteAlloc': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoteAlloc,
                    request_deserializer=proto_dot_memory__pb2.AddressAndSizePair.FromString,
                    response_serializer=proto_dot_base__pb2.Address.SerializeToString,
            ),
            'RemoteFree': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoteFree,
                    request_deserializer=proto_dot_base__pb2.Address.FromString,
                    response_serializer=proto_dot_base__pb2.Boolean.SerializeToString,
            ),
            'GetProtect': grpc.unary_unary_rpc_method_handler(
                    servicer.GetProtect,
                    request_deserializer=proto_dot_base__pb2.Address.FromString,
                    response_serializer=proto_dot_base__pb2.UnsignedNumberValue.SerializeToString,
            ),
            'GetBase': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBase,
                    request_deserializer=proto_dot_base__pb2.Address.FromString,
                    response_serializer=proto_dot_base__pb2.Address.SerializeToString,
            ),
            'GetSize': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSize,
                    request_deserializer=proto_dot_base__pb2.Address.FromString,
                    response_serializer=proto_dot_base__pb2.UnsignedNumberValue.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'memory.Memory', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Read(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, '/memory.Memory/Read',
            proto_dot_memory__pb2.AddressAndSizePair.SerializeToString,
            proto_dot_base__pb2.BinaryData.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Write(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, '/memory.Memory/Write',
            proto_dot_memory__pb2.MemoryWriteParam.SerializeToString,
            proto_dot_base__pb2.UnsignedNumberValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def IsValidPtr(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, '/memory.Memory/IsValidPtr',
            proto_dot_base__pb2.Address.SerializeToString,
            proto_dot_base__pb2.Boolean.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoteAlloc(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, '/memory.Memory/RemoteAlloc',
            proto_dot_memory__pb2.AddressAndSizePair.SerializeToString,
            proto_dot_base__pb2.Address.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoteFree(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, '/memory.Memory/RemoteFree',
            proto_dot_base__pb2.Address.SerializeToString,
            proto_dot_base__pb2.Boolean.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetProtect(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, '/memory.Memory/GetProtect',
            proto_dot_base__pb2.Address.SerializeToString,
            proto_dot_base__pb2.UnsignedNumberValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBase(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, '/memory.Memory/GetBase',
            proto_dot_base__pb2.Address.SerializeToString,
            proto_dot_base__pb2.Address.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSize(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, '/memory.Memory/GetSize',
            proto_dot_base__pb2.Address.SerializeToString,
            proto_dot_base__pb2.UnsignedNumberValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
