# 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 analysis_pb2 as analysis__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/oi.papi.AnalysisApi/create',
                request_serializer=analysis__pb2.AnalysisCreateRequest.SerializeToString,
                response_deserializer=analysis__pb2.AnalysisCreateResponse.FromString,
                )
        self.get = channel.unary_unary(
                '/oi.papi.AnalysisApi/get',
                request_serializer=analysis__pb2.AnalysisGetRequest.SerializeToString,
                response_deserializer=analysis__pb2.AnalysisGetResponse.FromString,
                )
        self.list = channel.unary_unary(
                '/oi.papi.AnalysisApi/list',
                request_serializer=analysis__pb2.AnalysisListRequest.SerializeToString,
                response_deserializer=analysis__pb2.AnalysisListResponse.FromString,
                )


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

    def create(self, request, context):
        """
        Create a top level Analysis object.
        This object is lightweight and is used to connect all versions of an Analysis together.
        Once an Analysis has been created, an AnalysisVersion must be created using a manifest.
        Next an AnalysisConfig may be created to specify a particular configuration of an AnalysisVersion, which can be used in an AnalysisComputation.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        Retrieve the metadata of a particular analysis.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        Retrieve the metadata for all Analyses that this user has access to and that match the provided search filters, if any.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AnalysisApiServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=analysis__pb2.AnalysisCreateRequest.FromString,
                    response_serializer=analysis__pb2.AnalysisCreateResponse.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=analysis__pb2.AnalysisGetRequest.FromString,
                    response_serializer=analysis__pb2.AnalysisGetResponse.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=analysis__pb2.AnalysisListRequest.FromString,
                    response_serializer=analysis__pb2.AnalysisListResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'oi.papi.AnalysisApi', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def create(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.AnalysisApi/create',
            analysis__pb2.AnalysisCreateRequest.SerializeToString,
            analysis__pb2.AnalysisCreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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.AnalysisApi/get',
            analysis__pb2.AnalysisGetRequest.SerializeToString,
            analysis__pb2.AnalysisGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(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.AnalysisApi/list',
            analysis__pb2.AnalysisListRequest.SerializeToString,
            analysis__pb2.AnalysisListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
