# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: weaviate.proto.v1/weaviate.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client

if typing.TYPE_CHECKING:
    import grpclib.server

import weaviate.proto.v1.batch_pb2
import weaviate.proto.v1.batch_delete_pb2
import weaviate.proto.v1.search_get_pb2
import weaviate.proto.v1.tenants_pb2
import weaviate.proto.v1.weaviate_pb2


class WeaviateBase(abc.ABC):
    @abc.abstractmethod
    async def Search(
        self,
        stream: "grpclib.server.Stream[weaviate.proto.v1.search_get_pb2.SearchRequest, weaviate.proto.v1.search_get_pb2.SearchReply]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def BatchObjects(
        self,
        stream: "grpclib.server.Stream[weaviate.proto.v1.batch_pb2.BatchObjectsRequest, weaviate.proto.v1.batch_pb2.BatchObjectsReply]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def BatchDelete(
        self,
        stream: "grpclib.server.Stream[weaviate.proto.v1.batch_delete_pb2.BatchDeleteRequest, weaviate.proto.v1.batch_delete_pb2.BatchDeleteReply]",
    ) -> None:
        pass

    @abc.abstractmethod
    async def TenantsGet(
        self,
        stream: "grpclib.server.Stream[weaviate.proto.v1.tenants_pb2.TenantsGetRequest, weaviate.proto.v1.tenants_pb2.TenantsGetReply]",
    ) -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            "/weaviate.v1.Weaviate/Search": grpclib.const.Handler(
                self.Search,
                grpclib.const.Cardinality.UNARY_UNARY,
                weaviate.proto.v1.search_get_pb2.SearchRequest,
                weaviate.proto.v1.search_get_pb2.SearchReply,
            ),
            "/weaviate.v1.Weaviate/BatchObjects": grpclib.const.Handler(
                self.BatchObjects,
                grpclib.const.Cardinality.UNARY_UNARY,
                weaviate.proto.v1.batch_pb2.BatchObjectsRequest,
                weaviate.proto.v1.batch_pb2.BatchObjectsReply,
            ),
            "/weaviate.v1.Weaviate/BatchDelete": grpclib.const.Handler(
                self.BatchDelete,
                grpclib.const.Cardinality.UNARY_UNARY,
                weaviate.proto.v1.batch_delete_pb2.BatchDeleteRequest,
                weaviate.proto.v1.batch_delete_pb2.BatchDeleteReply,
            ),
            "/weaviate.v1.Weaviate/TenantsGet": grpclib.const.Handler(
                self.TenantsGet,
                grpclib.const.Cardinality.UNARY_UNARY,
                weaviate.proto.v1.tenants_pb2.TenantsGetRequest,
                weaviate.proto.v1.tenants_pb2.TenantsGetReply,
            ),
        }


class WeaviateStub:
    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.Search = grpclib.client.UnaryUnaryMethod(
            channel,
            "/weaviate.v1.Weaviate/Search",
            weaviate.proto.v1.search_get_pb2.SearchRequest,
            weaviate.proto.v1.search_get_pb2.SearchReply,
        )
        self.BatchObjects = grpclib.client.UnaryUnaryMethod(
            channel,
            "/weaviate.v1.Weaviate/BatchObjects",
            weaviate.proto.v1.batch_pb2.BatchObjectsRequest,
            weaviate.proto.v1.batch_pb2.BatchObjectsReply,
        )
        self.BatchDelete = grpclib.client.UnaryUnaryMethod(
            channel,
            "/weaviate.v1.Weaviate/BatchDelete",
            weaviate.proto.v1.batch_delete_pb2.BatchDeleteRequest,
            weaviate.proto.v1.batch_delete_pb2.BatchDeleteReply,
        )
        self.TenantsGet = grpclib.client.UnaryUnaryMethod(
            channel,
            "/weaviate.v1.Weaviate/TenantsGet",
            weaviate.proto.v1.tenants_pb2.TenantsGetRequest,
            weaviate.proto.v1.tenants_pb2.TenantsGetReply,
        )
