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

from scavenger.model import CodeBasePublication_pb2 as com_dot_navercorp_dot_scavenger_dot_model_dot_CodeBasePublication__pb2
from scavenger.model import GetConfig_pb2 as com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2
from scavenger.model import GrpcAgentService_pb2 as com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2
from scavenger.model import InvocationDataPublication_pb2 as com_dot_navercorp_dot_scavenger_dot_model_dot_InvocationDataPublication__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.PollConfig = channel.unary_unary(
                '/GrpcAgentService/PollConfig',
                request_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigRequest.SerializeToString,
                response_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigResponse.FromString,
                )
        self.SendCodeBasePublication = channel.unary_unary(
                '/GrpcAgentService/SendCodeBasePublication',
                request_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_CodeBasePublication__pb2.CodeBasePublication.SerializeToString,
                response_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.FromString,
                )
        self.SendInvocationDataPublication = channel.unary_unary(
                '/GrpcAgentService/SendInvocationDataPublication',
                request_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_InvocationDataPublication__pb2.InvocationDataPublication.SerializeToString,
                response_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.FromString,
                )


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

    def PollConfig(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 SendCodeBasePublication(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 SendInvocationDataPublication(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_GrpcAgentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PollConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.PollConfig,
                    request_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigRequest.FromString,
                    response_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigResponse.SerializeToString,
            ),
            'SendCodeBasePublication': grpc.unary_unary_rpc_method_handler(
                    servicer.SendCodeBasePublication,
                    request_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_CodeBasePublication__pb2.CodeBasePublication.FromString,
                    response_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.SerializeToString,
            ),
            'SendInvocationDataPublication': grpc.unary_unary_rpc_method_handler(
                    servicer.SendInvocationDataPublication,
                    request_deserializer=com_dot_navercorp_dot_scavenger_dot_model_dot_InvocationDataPublication__pb2.InvocationDataPublication.FromString,
                    response_serializer=com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'GrpcAgentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def PollConfig(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, '/GrpcAgentService/PollConfig',
            com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigRequest.SerializeToString,
            com_dot_navercorp_dot_scavenger_dot_model_dot_GetConfig__pb2.GetConfigResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendCodeBasePublication(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, '/GrpcAgentService/SendCodeBasePublication',
            com_dot_navercorp_dot_scavenger_dot_model_dot_CodeBasePublication__pb2.CodeBasePublication.SerializeToString,
            com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendInvocationDataPublication(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, '/GrpcAgentService/SendInvocationDataPublication',
            com_dot_navercorp_dot_scavenger_dot_model_dot_InvocationDataPublication__pb2.InvocationDataPublication.SerializeToString,
            com_dot_navercorp_dot_scavenger_dot_model_dot_GrpcAgentService__pb2.PublicationResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
