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

from . import context_pb2 as context__pb2
from . import monitoring_pb2 as monitoring__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.NotifyServiceUpdate = channel.unary_unary(
                '/centralized_attack_detector.CentralizedAttackDetectorService/NotifyServiceUpdate',
                request_serializer=context__pb2.Service.SerializeToString,
                response_deserializer=context__pb2.Empty.FromString,
                )
        self.DetectAttack = channel.unary_unary(
                '/centralized_attack_detector.CentralizedAttackDetectorService/DetectAttack',
                request_serializer=context__pb2.Empty.SerializeToString,
                response_deserializer=context__pb2.Empty.FromString,
                )
        self.ReportSummarizedKpi = channel.unary_unary(
                '/centralized_attack_detector.CentralizedAttackDetectorService/ReportSummarizedKpi',
                request_serializer=monitoring__pb2.KpiList.SerializeToString,
                response_deserializer=context__pb2.Empty.FromString,
                )
        self.ReportKpi = channel.unary_unary(
                '/centralized_attack_detector.CentralizedAttackDetectorService/ReportKpi',
                request_serializer=monitoring__pb2.KpiList.SerializeToString,
                response_deserializer=context__pb2.Empty.FromString,
                )


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

    def NotifyServiceUpdate(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 DetectAttack(self, request, context):
        """rpc that triggers the attack detection loop
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReportSummarizedKpi(self, request, context):
        """rpc called by the distributed component to report KPIs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReportKpi(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_CentralizedAttackDetectorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'NotifyServiceUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.NotifyServiceUpdate,
                    request_deserializer=context__pb2.Service.FromString,
                    response_serializer=context__pb2.Empty.SerializeToString,
            ),
            'DetectAttack': grpc.unary_unary_rpc_method_handler(
                    servicer.DetectAttack,
                    request_deserializer=context__pb2.Empty.FromString,
                    response_serializer=context__pb2.Empty.SerializeToString,
            ),
            'ReportSummarizedKpi': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportSummarizedKpi,
                    request_deserializer=monitoring__pb2.KpiList.FromString,
                    response_serializer=context__pb2.Empty.SerializeToString,
            ),
            'ReportKpi': grpc.unary_unary_rpc_method_handler(
                    servicer.ReportKpi,
                    request_deserializer=monitoring__pb2.KpiList.FromString,
                    response_serializer=context__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'centralized_attack_detector.CentralizedAttackDetectorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def NotifyServiceUpdate(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, '/centralized_attack_detector.CentralizedAttackDetectorService/NotifyServiceUpdate',
            context__pb2.Service.SerializeToString,
            context__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DetectAttack(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, '/centralized_attack_detector.CentralizedAttackDetectorService/DetectAttack',
            context__pb2.Empty.SerializeToString,
            context__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportSummarizedKpi(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, '/centralized_attack_detector.CentralizedAttackDetectorService/ReportSummarizedKpi',
            monitoring__pb2.KpiList.SerializeToString,
            context__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReportKpi(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, '/centralized_attack_detector.CentralizedAttackDetectorService/ReportKpi',
            monitoring__pb2.KpiList.SerializeToString,
            context__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
