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

import olcarpc.generated.flow_map_service_pb2 as flow__map__service__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
import olcarpc.generated.olca_pb2 as olca__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Delete = channel.unary_unary(
                '/protolca.services.FlowMapService/Delete',
                request_serializer=flow__map__service__pb2.ProtoFlowMapName.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Get = channel.unary_unary(
                '/protolca.services.FlowMapService/Get',
                request_serializer=flow__map__service__pb2.ProtoFlowMapName.SerializeToString,
                response_deserializer=olca__pb2.ProtoFlowMap.FromString,
                )
        self.GetAll = channel.unary_stream(
                '/protolca.services.FlowMapService/GetAll',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=flow__map__service__pb2.ProtoFlowMapName.FromString,
                )
        self.Put = channel.unary_unary(
                '/protolca.services.FlowMapService/Put',
                request_serializer=olca__pb2.ProtoFlowMap.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


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

    def Delete(self, request, context):
        """Delete the flow map with the given name.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get the flow map with the given name form the database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAll(self, request, context):
        """Get the information (basically just the names) of all flow maps that are
        available in the database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Put(self, request, context):
        """Inserts the given flow map into the database. It overwrites an existing
        flow map if there is a flow map with the same name already available in the
        database.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_FlowMapServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=flow__map__service__pb2.ProtoFlowMapName.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=flow__map__service__pb2.ProtoFlowMapName.FromString,
                    response_serializer=olca__pb2.ProtoFlowMap.SerializeToString,
            ),
            'GetAll': grpc.unary_stream_rpc_method_handler(
                    servicer.GetAll,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=flow__map__service__pb2.ProtoFlowMapName.SerializeToString,
            ),
            'Put': grpc.unary_unary_rpc_method_handler(
                    servicer.Put,
                    request_deserializer=olca__pb2.ProtoFlowMap.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protolca.services.FlowMapService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Delete(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, '/protolca.services.FlowMapService/Delete',
            flow__map__service__pb2.ProtoFlowMapName.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Get(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, '/protolca.services.FlowMapService/Get',
            flow__map__service__pb2.ProtoFlowMapName.SerializeToString,
            olca__pb2.ProtoFlowMap.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAll(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, '/protolca.services.FlowMapService/GetAll',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            flow__map__service__pb2.ProtoFlowMapName.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Put(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, '/protolca.services.FlowMapService/Put',
            olca__pb2.ProtoFlowMap.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
