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

import grpc

from socialseed_e2e.agents.semantic_analyzer.proto import (
    semantic_analyzer_pb2 as semantic__analyzer__pb2,
)

GRPC_GENERATED_VERSION = "1.76.0"
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},"
        + " but the generated code in semantic_analyzer_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 SemanticAnalyzerStub(object):
    """Semantic Analyzer Service"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Analyze = channel.unary_unary(
            "/semantic_analyzer.SemanticAnalyzer/Analyze",
            request_serializer=semantic__analyzer__pb2.AnalyzeRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.AnalyzeResponse.FromString,
            _registered_method=True,
        )
        self.ExtractIntents = channel.unary_unary(
            "/semantic_analyzer.SemanticAnalyzer/ExtractIntents",
            request_serializer=semantic__analyzer__pb2.ExtractIntentsRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.ExtractIntentsResponse.FromString,
            _registered_method=True,
        )
        self.CaptureState = channel.unary_unary(
            "/semantic_analyzer.SemanticAnalyzer/CaptureState",
            request_serializer=semantic__analyzer__pb2.CaptureStateRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.CaptureStateResponse.FromString,
            _registered_method=True,
        )
        self.DetectDrift = channel.unary_unary(
            "/semantic_analyzer.SemanticAnalyzer/DetectDrift",
            request_serializer=semantic__analyzer__pb2.DetectDriftRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.DetectDriftResponse.FromString,
            _registered_method=True,
        )
        self.GetAnalysisStatus = channel.unary_unary(
            "/semantic_analyzer.SemanticAnalyzer/GetAnalysisStatus",
            request_serializer=semantic__analyzer__pb2.StatusRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.StatusResponse.FromString,
            _registered_method=True,
        )
        self.StreamAnalysisProgress = channel.unary_stream(
            "/semantic_analyzer.SemanticAnalyzer/StreamAnalysisProgress",
            request_serializer=semantic__analyzer__pb2.StreamRequest.SerializeToString,
            response_deserializer=semantic__analyzer__pb2.ProgressUpdate.FromString,
            _registered_method=True,
        )


class SemanticAnalyzerServicer(object):
    """Semantic Analyzer Service"""

    def Analyze(self, request, context):
        """Run complete semantic drift analysis"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ExtractIntents(self, request, context):
        """Extract intent baselines only"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CaptureState(self, request, context):
        """Capture state snapshots"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DetectDrift(self, request, context):
        """Detect drift between states"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetAnalysisStatus(self, request, context):
        """Get analysis status"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def StreamAnalysisProgress(self, request, context):
        """Stream analysis progress"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_SemanticAnalyzerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Analyze": grpc.unary_unary_rpc_method_handler(
            servicer.Analyze,
            request_deserializer=semantic__analyzer__pb2.AnalyzeRequest.FromString,
            response_serializer=semantic__analyzer__pb2.AnalyzeResponse.SerializeToString,
        ),
        "ExtractIntents": grpc.unary_unary_rpc_method_handler(
            servicer.ExtractIntents,
            request_deserializer=semantic__analyzer__pb2.ExtractIntentsRequest.FromString,
            response_serializer=semantic__analyzer__pb2.ExtractIntentsResponse.SerializeToString,
        ),
        "CaptureState": grpc.unary_unary_rpc_method_handler(
            servicer.CaptureState,
            request_deserializer=semantic__analyzer__pb2.CaptureStateRequest.FromString,
            response_serializer=semantic__analyzer__pb2.CaptureStateResponse.SerializeToString,
        ),
        "DetectDrift": grpc.unary_unary_rpc_method_handler(
            servicer.DetectDrift,
            request_deserializer=semantic__analyzer__pb2.DetectDriftRequest.FromString,
            response_serializer=semantic__analyzer__pb2.DetectDriftResponse.SerializeToString,
        ),
        "GetAnalysisStatus": grpc.unary_unary_rpc_method_handler(
            servicer.GetAnalysisStatus,
            request_deserializer=semantic__analyzer__pb2.StatusRequest.FromString,
            response_serializer=semantic__analyzer__pb2.StatusResponse.SerializeToString,
        ),
        "StreamAnalysisProgress": grpc.unary_stream_rpc_method_handler(
            servicer.StreamAnalysisProgress,
            request_deserializer=semantic__analyzer__pb2.StreamRequest.FromString,
            response_serializer=semantic__analyzer__pb2.ProgressUpdate.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "semantic_analyzer.SemanticAnalyzer", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("semantic_analyzer.SemanticAnalyzer", rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
class SemanticAnalyzer(object):
    """Semantic Analyzer Service"""

    @staticmethod
    def Analyze(
        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,
            "/semantic_analyzer.SemanticAnalyzer/Analyze",
            semantic__analyzer__pb2.AnalyzeRequest.SerializeToString,
            semantic__analyzer__pb2.AnalyzeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def ExtractIntents(
        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,
            "/semantic_analyzer.SemanticAnalyzer/ExtractIntents",
            semantic__analyzer__pb2.ExtractIntentsRequest.SerializeToString,
            semantic__analyzer__pb2.ExtractIntentsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def CaptureState(
        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,
            "/semantic_analyzer.SemanticAnalyzer/CaptureState",
            semantic__analyzer__pb2.CaptureStateRequest.SerializeToString,
            semantic__analyzer__pb2.CaptureStateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def DetectDrift(
        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,
            "/semantic_analyzer.SemanticAnalyzer/DetectDrift",
            semantic__analyzer__pb2.DetectDriftRequest.SerializeToString,
            semantic__analyzer__pb2.DetectDriftResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def GetAnalysisStatus(
        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,
            "/semantic_analyzer.SemanticAnalyzer/GetAnalysisStatus",
            semantic__analyzer__pb2.StatusRequest.SerializeToString,
            semantic__analyzer__pb2.StatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def StreamAnalysisProgress(
        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,
            "/semantic_analyzer.SemanticAnalyzer/StreamAnalysisProgress",
            semantic__analyzer__pb2.StreamRequest.SerializeToString,
            semantic__analyzer__pb2.ProgressUpdate.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
