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

from apeman.dal.tsdb import tsdb_pb2 as apeman_dot_dal_dot_tsdb_dot_tsdb__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.createDatafeed = channel.unary_unary(
                '/com.apeman.dal.TsdbService/createDatafeed',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedResponse.FromString,
                )
        self.deleteDatafeed = channel.unary_unary(
                '/com.apeman.dal.TsdbService/deleteDatafeed',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedResponse.FromString,
                )
        self.getDatafeed = channel.unary_unary(
                '/com.apeman.dal.TsdbService/getDatafeed',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedResponse.FromString,
                )
        self.listDatafeed = channel.unary_unary(
                '/com.apeman.dal.TsdbService/listDatafeed',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedResponse.FromString,
                )
        self.putData = channel.unary_unary(
                '/com.apeman.dal.TsdbService/putData',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataResponse.FromString,
                )
        self.getData = channel.unary_unary(
                '/com.apeman.dal.TsdbService/getData',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataResponse.FromString,
                )
        self.getDataAsJson = channel.unary_unary(
                '/com.apeman.dal.TsdbService/getDataAsJson',
                request_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.SerializeToString,
                response_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ResultAsJson.FromString,
                )


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

    def createDatafeed(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 deleteDatafeed(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 getDatafeed(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 listDatafeed(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 putData(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 getData(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 getDataAsJson(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_TsdbServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'createDatafeed': grpc.unary_unary_rpc_method_handler(
                    servicer.createDatafeed,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedResponse.SerializeToString,
            ),
            'deleteDatafeed': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteDatafeed,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedResponse.SerializeToString,
            ),
            'getDatafeed': grpc.unary_unary_rpc_method_handler(
                    servicer.getDatafeed,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedResponse.SerializeToString,
            ),
            'listDatafeed': grpc.unary_unary_rpc_method_handler(
                    servicer.listDatafeed,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedResponse.SerializeToString,
            ),
            'putData': grpc.unary_unary_rpc_method_handler(
                    servicer.putData,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataResponse.SerializeToString,
            ),
            'getData': grpc.unary_unary_rpc_method_handler(
                    servicer.getData,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataResponse.SerializeToString,
            ),
            'getDataAsJson': grpc.unary_unary_rpc_method_handler(
                    servicer.getDataAsJson,
                    request_deserializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.FromString,
                    response_serializer=apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ResultAsJson.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'com.apeman.dal.TsdbService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def createDatafeed(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, '/com.apeman.dal.TsdbService/createDatafeed',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.CreateDatafeedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def deleteDatafeed(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, '/com.apeman.dal.TsdbService/deleteDatafeed',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.DeleteDatafeedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getDatafeed(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, '/com.apeman.dal.TsdbService/getDatafeed',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDatafeedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def listDatafeed(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, '/com.apeman.dal.TsdbService/listDatafeed',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ListDatafeedResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def putData(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, '/com.apeman.dal.TsdbService/putData',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.PutDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getData(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, '/com.apeman.dal.TsdbService/getData',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getDataAsJson(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, '/com.apeman.dal.TsdbService/getDataAsJson',
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.GetDataRequest.SerializeToString,
            apeman_dot_dal_dot_tsdb_dot_tsdb__pb2.ResultAsJson.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
