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

import db_crud_pb2 as db__crud__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddData = channel.unary_unary(
                '/DataService/AddData',
                request_serializer=db__crud__pb2.AddParam.SerializeToString,
                response_deserializer=db__crud__pb2.AddRes.FromString,
                )
        self.ModData = channel.unary_unary(
                '/DataService/ModData',
                request_serializer=db__crud__pb2.ModParam.SerializeToString,
                response_deserializer=db__crud__pb2.ModRes.FromString,
                )
        self.DelData = channel.unary_unary(
                '/DataService/DelData',
                request_serializer=db__crud__pb2.DelParam.SerializeToString,
                response_deserializer=db__crud__pb2.DelRes.FromString,
                )
        self.SelData = channel.unary_unary(
                '/DataService/SelData',
                request_serializer=db__crud__pb2.SelParam.SerializeToString,
                response_deserializer=db__crud__pb2.SelRes.FromString,
                )


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

    def AddData(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 ModData(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 DelData(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 SelData(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_DataServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'AddData': grpc.unary_unary_rpc_method_handler(
                    servicer.AddData,
                    request_deserializer=db__crud__pb2.AddParam.FromString,
                    response_serializer=db__crud__pb2.AddRes.SerializeToString,
            ),
            'ModData': grpc.unary_unary_rpc_method_handler(
                    servicer.ModData,
                    request_deserializer=db__crud__pb2.ModParam.FromString,
                    response_serializer=db__crud__pb2.ModRes.SerializeToString,
            ),
            'DelData': grpc.unary_unary_rpc_method_handler(
                    servicer.DelData,
                    request_deserializer=db__crud__pb2.DelParam.FromString,
                    response_serializer=db__crud__pb2.DelRes.SerializeToString,
            ),
            'SelData': grpc.unary_unary_rpc_method_handler(
                    servicer.SelData,
                    request_deserializer=db__crud__pb2.SelParam.FromString,
                    response_serializer=db__crud__pb2.SelRes.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'DataService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AddData(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, '/DataService/AddData',
            db__crud__pb2.AddParam.SerializeToString,
            db__crud__pb2.AddRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ModData(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, '/DataService/ModData',
            db__crud__pb2.ModParam.SerializeToString,
            db__crud__pb2.ModRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DelData(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, '/DataService/DelData',
            db__crud__pb2.DelParam.SerializeToString,
            db__crud__pb2.DelRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SelData(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, '/DataService/SelData',
            db__crud__pb2.SelParam.SerializeToString,
            db__crud__pb2.SelRes.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
