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

from grpc_helper.api import common_pb2 as grpc__helper_dot_api_dot_common__pb2
from grpc_helper.api import server_pb2 as grpc__helper_dot_api_dot_server__pb2


class RpcServerServiceStub(object):
    """Generic server behavior handling service
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.info = channel.unary_unary(
                '/RpcServerService/info',
                request_serializer=grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_server__pb2.MultiServiceInfo.FromString,
                )
        self.shutdown = channel.unary_unary(
                '/RpcServerService/shutdown',
                request_serializer=grpc__helper_dot_api_dot_server__pb2.ShutdownRequest.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
                )
        self.proxy_register = channel.unary_unary(
                '/RpcServerService/proxy_register',
                request_serializer=grpc__helper_dot_api_dot_server__pb2.ProxyRegisterRequest.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
                )
        self.proxy_forget = channel.unary_unary(
                '/RpcServerService/proxy_forget',
                request_serializer=grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
                )


class RpcServerServiceServicer(object):
    """Generic server behavior handling service
    """

    def info(self, request, context):
        """Get information
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def shutdown(self, request, context):
        """Graceful shutdown request
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def proxy_register(self, request, context):
        """Register proxy services
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def proxy_forget(self, request, context):
        """Forget previously registered proxy services
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RpcServerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'info': grpc.unary_unary_rpc_method_handler(
                    servicer.info,
                    request_deserializer=grpc__helper_dot_api_dot_common__pb2.Filter.FromString,
                    response_serializer=grpc__helper_dot_api_dot_server__pb2.MultiServiceInfo.SerializeToString,
            ),
            'shutdown': grpc.unary_unary_rpc_method_handler(
                    servicer.shutdown,
                    request_deserializer=grpc__helper_dot_api_dot_server__pb2.ShutdownRequest.FromString,
                    response_serializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.SerializeToString,
            ),
            'proxy_register': grpc.unary_unary_rpc_method_handler(
                    servicer.proxy_register,
                    request_deserializer=grpc__helper_dot_api_dot_server__pb2.ProxyRegisterRequest.FromString,
                    response_serializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.SerializeToString,
            ),
            'proxy_forget': grpc.unary_unary_rpc_method_handler(
                    servicer.proxy_forget,
                    request_deserializer=grpc__helper_dot_api_dot_common__pb2.Filter.FromString,
                    response_serializer=grpc__helper_dot_api_dot_common__pb2.ResultStatus.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'RpcServerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RpcServerService(object):
    """Generic server behavior handling service
    """

    @staticmethod
    def info(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, '/RpcServerService/info',
            grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
            grpc__helper_dot_api_dot_server__pb2.MultiServiceInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def shutdown(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, '/RpcServerService/shutdown',
            grpc__helper_dot_api_dot_server__pb2.ShutdownRequest.SerializeToString,
            grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def proxy_register(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, '/RpcServerService/proxy_register',
            grpc__helper_dot_api_dot_server__pb2.ProxyRegisterRequest.SerializeToString,
            grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def proxy_forget(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, '/RpcServerService/proxy_forget',
            grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
            grpc__helper_dot_api_dot_common__pb2.ResultStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
