# 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 featureform.proto import serving_pb2 as featureform_dot_proto_dot_serving__pb2

GRPC_GENERATED_VERSION = '1.75.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 featureform/proto/serving_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 FeatureStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.TrainingData = channel.unary_stream(
                '/featureform.serving.proto.Feature/TrainingData',
                request_serializer=featureform_dot_proto_dot_serving__pb2.TrainingDataRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.TrainingDataRows.FromString,
                _registered_method=True)
        self.TrainTestSplit = channel.stream_stream(
                '/featureform.serving.proto.Feature/TrainTestSplit',
                request_serializer=featureform_dot_proto_dot_serving__pb2.TrainTestSplitRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.BatchTrainTestSplitResponse.FromString,
                _registered_method=True)
        self.TrainingDataColumns = channel.unary_unary(
                '/featureform.serving.proto.Feature/TrainingDataColumns',
                request_serializer=featureform_dot_proto_dot_serving__pb2.TrainingDataColumnsRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.TrainingColumns.FromString,
                _registered_method=True)
        self.FeatureServe = channel.unary_unary(
                '/featureform.serving.proto.Feature/FeatureServe',
                request_serializer=featureform_dot_proto_dot_serving__pb2.FeatureServeRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.FeatureRow.FromString,
                _registered_method=True)
        self.SourceData = channel.unary_stream(
                '/featureform.serving.proto.Feature/SourceData',
                request_serializer=featureform_dot_proto_dot_serving__pb2.SourceDataRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.SourceDataRows.FromString,
                _registered_method=True)
        self.SourceColumns = channel.unary_unary(
                '/featureform.serving.proto.Feature/SourceColumns',
                request_serializer=featureform_dot_proto_dot_serving__pb2.SourceColumnRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.SourceDataColumns.FromString,
                _registered_method=True)
        self.Nearest = channel.unary_unary(
                '/featureform.serving.proto.Feature/Nearest',
                request_serializer=featureform_dot_proto_dot_serving__pb2.NearestRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.NearestResponse.FromString,
                _registered_method=True)
        self.BatchFeatureServe = channel.unary_stream(
                '/featureform.serving.proto.Feature/BatchFeatureServe',
                request_serializer=featureform_dot_proto_dot_serving__pb2.BatchFeatureServeRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.BatchFeatureRows.FromString,
                _registered_method=True)
        self.GetResourceLocation = channel.unary_unary(
                '/featureform.serving.proto.Feature/GetResourceLocation',
                request_serializer=featureform_dot_proto_dot_serving__pb2.ResourceIdRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.ResourceLocation.FromString,
                _registered_method=True)
        self.ServeFeatureView = channel.unary_unary(
                '/featureform.serving.proto.Feature/ServeFeatureView',
                request_serializer=featureform_dot_proto_dot_serving__pb2.FeatureViewServeRequest.SerializeToString,
                response_deserializer=featureform_dot_proto_dot_serving__pb2.FeatureViewRows.FromString,
                _registered_method=True)


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

    def TrainingData(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 TrainTestSplit(self, request_iterator, 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 TrainingDataColumns(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 FeatureServe(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 SourceData(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 SourceColumns(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 Nearest(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 BatchFeatureServe(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 GetResourceLocation(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 ServeFeatureView(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_FeatureServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TrainingData': grpc.unary_stream_rpc_method_handler(
                    servicer.TrainingData,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.TrainingDataRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.TrainingDataRows.SerializeToString,
            ),
            'TrainTestSplit': grpc.stream_stream_rpc_method_handler(
                    servicer.TrainTestSplit,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.TrainTestSplitRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.BatchTrainTestSplitResponse.SerializeToString,
            ),
            'TrainingDataColumns': grpc.unary_unary_rpc_method_handler(
                    servicer.TrainingDataColumns,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.TrainingDataColumnsRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.TrainingColumns.SerializeToString,
            ),
            'FeatureServe': grpc.unary_unary_rpc_method_handler(
                    servicer.FeatureServe,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.FeatureServeRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.FeatureRow.SerializeToString,
            ),
            'SourceData': grpc.unary_stream_rpc_method_handler(
                    servicer.SourceData,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.SourceDataRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.SourceDataRows.SerializeToString,
            ),
            'SourceColumns': grpc.unary_unary_rpc_method_handler(
                    servicer.SourceColumns,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.SourceColumnRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.SourceDataColumns.SerializeToString,
            ),
            'Nearest': grpc.unary_unary_rpc_method_handler(
                    servicer.Nearest,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.NearestRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.NearestResponse.SerializeToString,
            ),
            'BatchFeatureServe': grpc.unary_stream_rpc_method_handler(
                    servicer.BatchFeatureServe,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.BatchFeatureServeRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.BatchFeatureRows.SerializeToString,
            ),
            'GetResourceLocation': grpc.unary_unary_rpc_method_handler(
                    servicer.GetResourceLocation,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.ResourceIdRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.ResourceLocation.SerializeToString,
            ),
            'ServeFeatureView': grpc.unary_unary_rpc_method_handler(
                    servicer.ServeFeatureView,
                    request_deserializer=featureform_dot_proto_dot_serving__pb2.FeatureViewServeRequest.FromString,
                    response_serializer=featureform_dot_proto_dot_serving__pb2.FeatureViewRows.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'featureform.serving.proto.Feature', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('featureform.serving.proto.Feature', rpc_method_handlers)


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

    @staticmethod
    def TrainingData(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,
            '/featureform.serving.proto.Feature/TrainingData',
            featureform_dot_proto_dot_serving__pb2.TrainingDataRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.TrainingDataRows.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TrainTestSplit(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,
            '/featureform.serving.proto.Feature/TrainTestSplit',
            featureform_dot_proto_dot_serving__pb2.TrainTestSplitRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.BatchTrainTestSplitResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TrainingDataColumns(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,
            '/featureform.serving.proto.Feature/TrainingDataColumns',
            featureform_dot_proto_dot_serving__pb2.TrainingDataColumnsRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.TrainingColumns.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def FeatureServe(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,
            '/featureform.serving.proto.Feature/FeatureServe',
            featureform_dot_proto_dot_serving__pb2.FeatureServeRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.FeatureRow.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SourceData(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,
            '/featureform.serving.proto.Feature/SourceData',
            featureform_dot_proto_dot_serving__pb2.SourceDataRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.SourceDataRows.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SourceColumns(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,
            '/featureform.serving.proto.Feature/SourceColumns',
            featureform_dot_proto_dot_serving__pb2.SourceColumnRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.SourceDataColumns.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Nearest(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,
            '/featureform.serving.proto.Feature/Nearest',
            featureform_dot_proto_dot_serving__pb2.NearestRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.NearestResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def BatchFeatureServe(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,
            '/featureform.serving.proto.Feature/BatchFeatureServe',
            featureform_dot_proto_dot_serving__pb2.BatchFeatureServeRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.BatchFeatureRows.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetResourceLocation(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,
            '/featureform.serving.proto.Feature/GetResourceLocation',
            featureform_dot_proto_dot_serving__pb2.ResourceIdRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.ResourceLocation.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ServeFeatureView(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,
            '/featureform.serving.proto.Feature/ServeFeatureView',
            featureform_dot_proto_dot_serving__pb2.FeatureViewServeRequest.SerializeToString,
            featureform_dot_proto_dot_serving__pb2.FeatureViewRows.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
