# 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 . import sdk_pb2 as sdk__pb2

GRPC_GENERATED_VERSION = '1.68.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},'
        + f' but the generated code in sdk_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 TruffleSDKStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Infer = channel.unary_stream(
                '/sdk.TruffleSDK/Infer',
                request_serializer=sdk__pb2.GenerateRequest.SerializeToString,
                response_deserializer=sdk__pb2.TokenResponse.FromString,
                _registered_method=True)
        self.InferSync = channel.unary_unary(
                '/sdk.TruffleSDK/InferSync',
                request_serializer=sdk__pb2.GenerateRequest.SerializeToString,
                response_deserializer=sdk__pb2.GenerateResponse.FromString,
                _registered_method=True)
        self.GetModels = channel.unary_unary(
                '/sdk.TruffleSDK/GetModels',
                request_serializer=sdk__pb2.GetModelsRequest.SerializeToString,
                response_deserializer=sdk__pb2.GetModelsResponse.FromString,
                _registered_method=True)
        self.Embed = channel.unary_unary(
                '/sdk.TruffleSDK/Embed',
                request_serializer=sdk__pb2.EmbedRequest.SerializeToString,
                response_deserializer=sdk__pb2.EmbedResponse.FromString,
                _registered_method=True)
        self.AskUser = channel.unary_unary(
                '/sdk.TruffleSDK/AskUser',
                request_serializer=sdk__pb2.UserRequest.SerializeToString,
                response_deserializer=sdk__pb2.UserResponse.FromString,
                _registered_method=True)
        self.ToolUpdate = channel.unary_unary(
                '/sdk.TruffleSDK/ToolUpdate',
                request_serializer=sdk__pb2.ToolUpdateRequest.SerializeToString,
                response_deserializer=sdk__pb2.SDKResponse.FromString,
                _registered_method=True)
        self.SystemTool = channel.unary_unary(
                '/sdk.TruffleSDK/SystemTool',
                request_serializer=sdk__pb2.SystemToolRequest.SerializeToString,
                response_deserializer=sdk__pb2.SystemToolResponse.FromString,
                _registered_method=True)
        self.GlobalVars = channel.unary_unary(
                '/sdk.TruffleSDK/GlobalVars',
                request_serializer=sdk__pb2.GlobalsRequest.SerializeToString,
                response_deserializer=sdk__pb2.GlobalsResponse.FromString,
                _registered_method=True)


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

    def Infer(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 InferSync(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 GetModels(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 Embed(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 AskUser(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 ToolUpdate(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 SystemTool(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 GlobalVars(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_TruffleSDKServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Infer': grpc.unary_stream_rpc_method_handler(
                    servicer.Infer,
                    request_deserializer=sdk__pb2.GenerateRequest.FromString,
                    response_serializer=sdk__pb2.TokenResponse.SerializeToString,
            ),
            'InferSync': grpc.unary_unary_rpc_method_handler(
                    servicer.InferSync,
                    request_deserializer=sdk__pb2.GenerateRequest.FromString,
                    response_serializer=sdk__pb2.GenerateResponse.SerializeToString,
            ),
            'GetModels': grpc.unary_unary_rpc_method_handler(
                    servicer.GetModels,
                    request_deserializer=sdk__pb2.GetModelsRequest.FromString,
                    response_serializer=sdk__pb2.GetModelsResponse.SerializeToString,
            ),
            'Embed': grpc.unary_unary_rpc_method_handler(
                    servicer.Embed,
                    request_deserializer=sdk__pb2.EmbedRequest.FromString,
                    response_serializer=sdk__pb2.EmbedResponse.SerializeToString,
            ),
            'AskUser': grpc.unary_unary_rpc_method_handler(
                    servicer.AskUser,
                    request_deserializer=sdk__pb2.UserRequest.FromString,
                    response_serializer=sdk__pb2.UserResponse.SerializeToString,
            ),
            'ToolUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.ToolUpdate,
                    request_deserializer=sdk__pb2.ToolUpdateRequest.FromString,
                    response_serializer=sdk__pb2.SDKResponse.SerializeToString,
            ),
            'SystemTool': grpc.unary_unary_rpc_method_handler(
                    servicer.SystemTool,
                    request_deserializer=sdk__pb2.SystemToolRequest.FromString,
                    response_serializer=sdk__pb2.SystemToolResponse.SerializeToString,
            ),
            'GlobalVars': grpc.unary_unary_rpc_method_handler(
                    servicer.GlobalVars,
                    request_deserializer=sdk__pb2.GlobalsRequest.FromString,
                    response_serializer=sdk__pb2.GlobalsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'sdk.TruffleSDK', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('sdk.TruffleSDK', rpc_method_handlers)


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

    @staticmethod
    def Infer(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,
            '/sdk.TruffleSDK/Infer',
            sdk__pb2.GenerateRequest.SerializeToString,
            sdk__pb2.TokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def InferSync(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,
            '/sdk.TruffleSDK/InferSync',
            sdk__pb2.GenerateRequest.SerializeToString,
            sdk__pb2.GenerateResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetModels(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,
            '/sdk.TruffleSDK/GetModels',
            sdk__pb2.GetModelsRequest.SerializeToString,
            sdk__pb2.GetModelsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Embed(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,
            '/sdk.TruffleSDK/Embed',
            sdk__pb2.EmbedRequest.SerializeToString,
            sdk__pb2.EmbedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def AskUser(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,
            '/sdk.TruffleSDK/AskUser',
            sdk__pb2.UserRequest.SerializeToString,
            sdk__pb2.UserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ToolUpdate(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,
            '/sdk.TruffleSDK/ToolUpdate',
            sdk__pb2.ToolUpdateRequest.SerializeToString,
            sdk__pb2.SDKResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SystemTool(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,
            '/sdk.TruffleSDK/SystemTool',
            sdk__pb2.SystemToolRequest.SerializeToString,
            sdk__pb2.SystemToolResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GlobalVars(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,
            '/sdk.TruffleSDK/GlobalVars',
            sdk__pb2.GlobalsRequest.SerializeToString,
            sdk__pb2.GlobalsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
