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

from kaskada.kaskada.v1alpha import file_service_pb2 as kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetMetadata = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.FileService/GetMetadata',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataResponse.FromString,
                )
        self.MergeMetadata = channel.unary_unary(
                '/kaskada.kaskada.v1alpha.FileService/MergeMetadata',
                request_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataRequest.SerializeToString,
                response_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataResponse.FromString,
                )


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

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

    def MergeMetadata(self, request, context):
        """Incorporate additional files into the table schema.

        This is initially planned to perform a *widening* merge. Specifically, this
        should be used when the table schema is "all (compatible) columns in any of
        the files", with `null` values when the file doesn't contain that column.

        We may add a separate method for checking file schemas against a fixed
        table schema, or make that a property of the merge request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_FileServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetadata,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataResponse.SerializeToString,
            ),
            'MergeMetadata': grpc.unary_unary_rpc_method_handler(
                    servicer.MergeMetadata,
                    request_deserializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataRequest.FromString,
                    response_serializer=kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kaskada.kaskada.v1alpha.FileService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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_unary(request, target, '/kaskada.kaskada.v1alpha.FileService/GetMetadata',
            kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.GetMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MergeMetadata(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, '/kaskada.kaskada.v1alpha.FileService/MergeMetadata',
            kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataRequest.SerializeToString,
            kaskada_dot_kaskada_dot_v1alpha_dot_file__service__pb2.MergeMetadataResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
