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

from alphagenome.protos import dna_model_service_pb2 as alphagenome_dot_protos_dot_dna__model__service__pb2

GRPC_GENERATED_VERSION = '1.67.1'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in alphagenome/protos/dna_model_service_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class DnaModelServiceStub(object):
    """Service for making predictions with DNA models.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.PredictSequence = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictSequence',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceResponse.FromString,
                _registered_method=True)
        self.PredictInterval = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictInterval',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalResponse.FromString,
                _registered_method=True)
        self.PredictVariant = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictVariant',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantResponse.FromString,
                _registered_method=True)
        self.ScoreInterval = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreInterval',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalResponse.FromString,
                _registered_method=True)
        self.ScoreVariant = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreVariant',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantResponse.FromString,
                _registered_method=True)
        self.ScoreIsmVariant = channel.stream_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreIsmVariant',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantResponse.FromString,
                _registered_method=True)
        self.GetMetadata = channel.unary_stream(
                '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/GetMetadata',
                request_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataRequest.SerializeToString,
                response_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataResponse.FromString,
                _registered_method=True)


class DnaModelServiceServicer(object):
    """Service for making predictions with DNA models.
    """

    def PredictSequence(self, request_iterator, context):
        """Makes a prediction for DNA sequence.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PredictInterval(self, request_iterator, context):
        """Make prediction for a single genomic interval.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PredictVariant(self, request_iterator, context):
        """Make variant effect predictions for a genomic interval.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ScoreInterval(self, request_iterator, context):
        """Score a genomic interval.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ScoreVariant(self, request_iterator, context):
        """Score a variant for a genomic interval.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ScoreIsmVariant(self, request_iterator, context):
        """Score ISM variant effect predictions for a genomic interval.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMetadata(self, request, context):
        """Get metadata for the model.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_DnaModelServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PredictSequence': grpc.stream_stream_rpc_method_handler(
                    servicer.PredictSequence,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceResponse.SerializeToString,
            ),
            'PredictInterval': grpc.stream_stream_rpc_method_handler(
                    servicer.PredictInterval,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalResponse.SerializeToString,
            ),
            'PredictVariant': grpc.stream_stream_rpc_method_handler(
                    servicer.PredictVariant,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantResponse.SerializeToString,
            ),
            'ScoreInterval': grpc.stream_stream_rpc_method_handler(
                    servicer.ScoreInterval,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalResponse.SerializeToString,
            ),
            'ScoreVariant': grpc.stream_stream_rpc_method_handler(
                    servicer.ScoreVariant,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantResponse.SerializeToString,
            ),
            'ScoreIsmVariant': grpc.stream_stream_rpc_method_handler(
                    servicer.ScoreIsmVariant,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantResponse.SerializeToString,
            ),
            'GetMetadata': grpc.unary_stream_rpc_method_handler(
                    servicer.GetMetadata,
                    request_deserializer=alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataRequest.FromString,
                    response_serializer=alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'google.gdm.gdmscience.alphagenome.v1main.DnaModelService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('google.gdm.gdmscience.alphagenome.v1main.DnaModelService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class DnaModelService(object):
    """Service for making predictions with DNA models.
    """

    @staticmethod
    def PredictSequence(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictSequence',
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictSequenceResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PredictInterval(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictInterval',
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictIntervalResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PredictVariant(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/PredictVariant',
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.PredictVariantResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ScoreInterval(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreInterval',
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIntervalResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ScoreVariant(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreVariant',
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreVariantResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ScoreIsmVariant(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/ScoreIsmVariant',
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.ScoreIsmVariantResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMetadata(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,
            '/google.gdm.gdmscience.alphagenome.v1main.DnaModelService/GetMetadata',
            alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataRequest.SerializeToString,
            alphagenome_dot_protos_dot_dna__model__service__pb2.MetadataResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
