# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from voltha_protos import afrouter_pb2 as voltha__protos_dot_afrouter__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetConnection = channel.unary_unary(
                '/afrouter.Configuration/SetConnection',
                request_serializer=voltha__protos_dot_afrouter__pb2.Conn.SerializeToString,
                response_deserializer=voltha__protos_dot_afrouter__pb2.Result.FromString,
                )
        self.SetAffinity = channel.unary_unary(
                '/afrouter.Configuration/SetAffinity',
                request_serializer=voltha__protos_dot_afrouter__pb2.Affinity.SerializeToString,
                response_deserializer=voltha__protos_dot_afrouter__pb2.Result.FromString,
                )
        self.GetGoroutineCount = channel.unary_unary(
                '/afrouter.Configuration/GetGoroutineCount',
                request_serializer=voltha__protos_dot_afrouter__pb2.Empty.SerializeToString,
                response_deserializer=voltha__protos_dot_afrouter__pb2.Count.FromString,
                )


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

    def SetConnection(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 SetAffinity(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 GetGoroutineCount(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_ConfigurationServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetConnection': grpc.unary_unary_rpc_method_handler(
                    servicer.SetConnection,
                    request_deserializer=voltha__protos_dot_afrouter__pb2.Conn.FromString,
                    response_serializer=voltha__protos_dot_afrouter__pb2.Result.SerializeToString,
            ),
            'SetAffinity': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAffinity,
                    request_deserializer=voltha__protos_dot_afrouter__pb2.Affinity.FromString,
                    response_serializer=voltha__protos_dot_afrouter__pb2.Result.SerializeToString,
            ),
            'GetGoroutineCount': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGoroutineCount,
                    request_deserializer=voltha__protos_dot_afrouter__pb2.Empty.FromString,
                    response_serializer=voltha__protos_dot_afrouter__pb2.Count.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'afrouter.Configuration', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def SetConnection(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/afrouter.Configuration/SetConnection',
            voltha__protos_dot_afrouter__pb2.Conn.SerializeToString,
            voltha__protos_dot_afrouter__pb2.Result.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetAffinity(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/afrouter.Configuration/SetAffinity',
            voltha__protos_dot_afrouter__pb2.Affinity.SerializeToString,
            voltha__protos_dot_afrouter__pb2.Result.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetGoroutineCount(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/afrouter.Configuration/GetGoroutineCount',
            voltha__protos_dot_afrouter__pb2.Empty.SerializeToString,
            voltha__protos_dot_afrouter__pb2.Count.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
