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

from terrascope_api.models import result_pb2 as result__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.get = channel.unary_unary(
                '/oi.papi.ResultApi/get',
                request_serializer=result__pb2.ResultGetRequest.SerializeToString,
                response_deserializer=result__pb2.ResultGetResponse.FromString,
                )
        self.export = channel.unary_unary(
                '/oi.papi.ResultApi/export',
                request_serializer=result__pb2.ResultExportRequest.SerializeToString,
                response_deserializer=result__pb2.ResultExportResponse.FromString,
                )


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

    def get(self, request, context):
        """
        Retrieve the Results for the specified AlgorithmComputation that match the specified filters.
        Results cannot be queried for an AnalysisComputation.
        Instead, pass in each algorithm_computation_id in the Analysis to retrieve the Results.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def export(self, request, context):
        """
        Export the more detailed version of Results.
        This endpoint accepts 1 or more algorithm_computation_ids and packages the results together into a single downloadable zip file placed in S3.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ResultApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=result__pb2.ResultGetRequest.FromString,
                    response_serializer=result__pb2.ResultGetResponse.SerializeToString,
            ),
            'export': grpc.unary_unary_rpc_method_handler(
                    servicer.export,
                    request_deserializer=result__pb2.ResultExportRequest.FromString,
                    response_serializer=result__pb2.ResultExportResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.ResultApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def get(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, '/oi.papi.ResultApi/get',
            result__pb2.ResultGetRequest.SerializeToString,
            result__pb2.ResultGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def export(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, '/oi.papi.ResultApi/export',
            result__pb2.ResultExportRequest.SerializeToString,
            result__pb2.ResultExportResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
