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

from data_grpc_service.protos import detection_instance_data_api_pb2 as data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CacheDetectionInstancesDataByImageId = channel.unary_unary(
                '/DetectionInstanceDataApi/CacheDetectionInstancesDataByImageId',
                request_serializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdRequest.SerializeToString,
                response_deserializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdResponse.FromString,
                )
        self.GetDetectionInstanceDataById = channel.unary_stream(
                '/DetectionInstanceDataApi/GetDetectionInstanceDataById',
                request_serializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdRequest.SerializeToString,
                response_deserializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdResponse.FromString,
                )


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

    def CacheDetectionInstancesDataByImageId(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 GetDetectionInstanceDataById(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_DetectionInstanceDataApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CacheDetectionInstancesDataByImageId': grpc.unary_unary_rpc_method_handler(
                    servicer.CacheDetectionInstancesDataByImageId,
                    request_deserializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdRequest.FromString,
                    response_serializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdResponse.SerializeToString,
            ),
            'GetDetectionInstanceDataById': grpc.unary_stream_rpc_method_handler(
                    servicer.GetDetectionInstanceDataById,
                    request_deserializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdRequest.FromString,
                    response_serializer=data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'DetectionInstanceDataApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CacheDetectionInstancesDataByImageId(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, '/DetectionInstanceDataApi/CacheDetectionInstancesDataByImageId',
            data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdRequest.SerializeToString,
            data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.CacheDetectionInstancesDataByImageIdResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDetectionInstanceDataById(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_stream(request, target, '/DetectionInstanceDataApi/GetDetectionInstanceDataById',
            data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdRequest.SerializeToString,
            data__grpc__service_dot_protos_dot_detection__instance__data__api__pb2.GetDetectionInstanceDataByIdResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
