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

from github.com.metaprov.modelaapi.services.fileservices.v1 import fileservices_pb2 as github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.UploadChunk = channel.stream_unary(
                '/github.com.metaprov.modelaapi.services.fileservices.v1.FileServicesService/UploadChunk',
                request_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.DataBlock.SerializeToString,
                response_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.UploadResult.FromString,
                )


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

    def UploadChunk(self, request_iterator, context):
        """option (google.api.http).post = "/v1/datasets/{namespace}/{name}:upload";
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_FileServicesServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'UploadChunk': grpc.stream_unary_rpc_method_handler(
                    servicer.UploadChunk,
                    request_deserializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.DataBlock.FromString,
                    response_serializer=github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.UploadResult.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'github.com.metaprov.modelaapi.services.fileservices.v1.FileServicesService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def UploadChunk(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_unary(request_iterator, target, '/github.com.metaprov.modelaapi.services.fileservices.v1.FileServicesService/UploadChunk',
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.DataBlock.SerializeToString,
            github_dot_com_dot_metaprov_dot_modelaapi_dot_services_dot_fileservices_dot_v1_dot_fileservices__pb2.UploadResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
