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

import csle_collector.kafka_manager.kafka_manager_pb2 as kafka__manager__pb2


class KafkaManagerStub(object):
    """Interface exported by the server
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.getKafkaStatus = channel.unary_unary(
                '/KafkaManager/getKafkaStatus',
                request_serializer=kafka__manager__pb2.GetKafkaStatusMsg.SerializeToString,
                response_deserializer=kafka__manager__pb2.KafkaDTO.FromString,
                )
        self.stopKafka = channel.unary_unary(
                '/KafkaManager/stopKafka',
                request_serializer=kafka__manager__pb2.StopKafkaMsg.SerializeToString,
                response_deserializer=kafka__manager__pb2.KafkaDTO.FromString,
                )
        self.startKafka = channel.unary_unary(
                '/KafkaManager/startKafka',
                request_serializer=kafka__manager__pb2.StartKafkaMsg.SerializeToString,
                response_deserializer=kafka__manager__pb2.KafkaDTO.FromString,
                )
        self.createTopic = channel.unary_unary(
                '/KafkaManager/createTopic',
                request_serializer=kafka__manager__pb2.CreateTopicMsg.SerializeToString,
                response_deserializer=kafka__manager__pb2.KafkaDTO.FromString,
                )
        self.deleteTopic = channel.unary_unary(
                '/KafkaManager/deleteTopic',
                request_serializer=kafka__manager__pb2.DeleteTopicMsg.SerializeToString,
                response_deserializer=kafka__manager__pb2.KafkaDTO.FromString,
                )


class KafkaManagerServicer(object):
    """Interface exported by the server
    """

    def getKafkaStatus(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 stopKafka(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 startKafka(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 createTopic(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 deleteTopic(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_KafkaManagerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getKafkaStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.getKafkaStatus,
                    request_deserializer=kafka__manager__pb2.GetKafkaStatusMsg.FromString,
                    response_serializer=kafka__manager__pb2.KafkaDTO.SerializeToString,
            ),
            'stopKafka': grpc.unary_unary_rpc_method_handler(
                    servicer.stopKafka,
                    request_deserializer=kafka__manager__pb2.StopKafkaMsg.FromString,
                    response_serializer=kafka__manager__pb2.KafkaDTO.SerializeToString,
            ),
            'startKafka': grpc.unary_unary_rpc_method_handler(
                    servicer.startKafka,
                    request_deserializer=kafka__manager__pb2.StartKafkaMsg.FromString,
                    response_serializer=kafka__manager__pb2.KafkaDTO.SerializeToString,
            ),
            'createTopic': grpc.unary_unary_rpc_method_handler(
                    servicer.createTopic,
                    request_deserializer=kafka__manager__pb2.CreateTopicMsg.FromString,
                    response_serializer=kafka__manager__pb2.KafkaDTO.SerializeToString,
            ),
            'deleteTopic': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteTopic,
                    request_deserializer=kafka__manager__pb2.DeleteTopicMsg.FromString,
                    response_serializer=kafka__manager__pb2.KafkaDTO.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'KafkaManager', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class KafkaManager(object):
    """Interface exported by the server
    """

    @staticmethod
    def getKafkaStatus(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, '/KafkaManager/getKafkaStatus',
            kafka__manager__pb2.GetKafkaStatusMsg.SerializeToString,
            kafka__manager__pb2.KafkaDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopKafka(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, '/KafkaManager/stopKafka',
            kafka__manager__pb2.StopKafkaMsg.SerializeToString,
            kafka__manager__pb2.KafkaDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startKafka(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, '/KafkaManager/startKafka',
            kafka__manager__pb2.StartKafkaMsg.SerializeToString,
            kafka__manager__pb2.KafkaDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def createTopic(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, '/KafkaManager/createTopic',
            kafka__manager__pb2.CreateTopicMsg.SerializeToString,
            kafka__manager__pb2.KafkaDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteTopic(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, '/KafkaManager/deleteTopic',
            kafka__manager__pb2.DeleteTopicMsg.SerializeToString,
            kafka__manager__pb2.KafkaDTO.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
