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

from avikom.unity import asset_bundle_pb2 as avikom_dot_unity_dot_asset__bundle__pb2
from avikom.unity import asset_bundle_service_pb2 as avikom_dot_unity_dot_asset__bundle__service__pb2


class AssetBundleServiceStub(object):
    """
    Provides an interface to request AssetBundles from a server. 
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_stream(
                '/avikom.unity.AssetBundleService/Get',
                request_serializer=avikom_dot_unity_dot_asset__bundle__service__pb2.AssetBundleQuery.SerializeToString,
                response_deserializer=avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.FromString,
                )


class AssetBundleServiceServicer(object):
    """
    Provides an interface to request AssetBundles from a server. 
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def Get(self, request, context):
        """returns an asset bundle in binary chunks
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AssetBundleServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_stream_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=avikom_dot_unity_dot_asset__bundle__service__pb2.AssetBundleQuery.FromString,
                    response_serializer=avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.unity.AssetBundleService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AssetBundleService(object):
    """
    Provides an interface to request AssetBundles from a server. 
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def Get(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, '/avikom.unity.AssetBundleService/Get',
            avikom_dot_unity_dot_asset__bundle__service__pb2.AssetBundleQuery.SerializeToString,
            avikom_dot_unity_dot_asset__bundle__pb2.AssetBundle.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
