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

import proxy_meta_pb2 as proxy__meta__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateIndex = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/CreateIndex',
                request_serializer=proxy__meta__pb2.CreateIndexRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.CreateIndexResponse.FromString,
                )
        self.UpdateIndex = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/UpdateIndex',
                request_serializer=proxy__meta__pb2.UpdateIndexRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.UpdateIndexResponse.FromString,
                )
        self.UpdateMaxElements = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/UpdateMaxElements',
                request_serializer=proxy__meta__pb2.UpdateMaxElementsRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.UpdateMaxElementsResponse.FromString,
                )
        self.DeleteIndex = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/DeleteIndex',
                request_serializer=proxy__meta__pb2.DeleteIndexRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.DeleteIndexResponse.FromString,
                )
        self.GetIndex = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/GetIndex',
                request_serializer=proxy__meta__pb2.GetIndexRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.GetIndexResponse.FromString,
                )
        self.GetIndexes = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/GetIndexes',
                request_serializer=proxy__meta__pb2.GetIndexesRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.GetIndexesResponse.FromString,
                )
        self.GetIndexNames = channel.unary_unary(
                '/dingodb.pb.proxy.meta.MetaService/GetIndexNames',
                request_serializer=proxy__meta__pb2.GetIndexNamesRequest.SerializeToString,
                response_deserializer=proxy__meta__pb2.GetIndexNamesResponse.FromString,
                )


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

    def CreateIndex(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 UpdateIndex(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 UpdateMaxElements(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 DeleteIndex(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 GetIndex(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 GetIndexes(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 GetIndexNames(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_MetaServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateIndex,
                    request_deserializer=proxy__meta__pb2.CreateIndexRequest.FromString,
                    response_serializer=proxy__meta__pb2.CreateIndexResponse.SerializeToString,
            ),
            'UpdateIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateIndex,
                    request_deserializer=proxy__meta__pb2.UpdateIndexRequest.FromString,
                    response_serializer=proxy__meta__pb2.UpdateIndexResponse.SerializeToString,
            ),
            'UpdateMaxElements': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateMaxElements,
                    request_deserializer=proxy__meta__pb2.UpdateMaxElementsRequest.FromString,
                    response_serializer=proxy__meta__pb2.UpdateMaxElementsResponse.SerializeToString,
            ),
            'DeleteIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteIndex,
                    request_deserializer=proxy__meta__pb2.DeleteIndexRequest.FromString,
                    response_serializer=proxy__meta__pb2.DeleteIndexResponse.SerializeToString,
            ),
            'GetIndex': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIndex,
                    request_deserializer=proxy__meta__pb2.GetIndexRequest.FromString,
                    response_serializer=proxy__meta__pb2.GetIndexResponse.SerializeToString,
            ),
            'GetIndexes': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIndexes,
                    request_deserializer=proxy__meta__pb2.GetIndexesRequest.FromString,
                    response_serializer=proxy__meta__pb2.GetIndexesResponse.SerializeToString,
            ),
            'GetIndexNames': grpc.unary_unary_rpc_method_handler(
                    servicer.GetIndexNames,
                    request_deserializer=proxy__meta__pb2.GetIndexNamesRequest.FromString,
                    response_serializer=proxy__meta__pb2.GetIndexNamesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'dingodb.pb.proxy.meta.MetaService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CreateIndex(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, '/dingodb.pb.proxy.meta.MetaService/CreateIndex',
            proxy__meta__pb2.CreateIndexRequest.SerializeToString,
            proxy__meta__pb2.CreateIndexResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateIndex(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, '/dingodb.pb.proxy.meta.MetaService/UpdateIndex',
            proxy__meta__pb2.UpdateIndexRequest.SerializeToString,
            proxy__meta__pb2.UpdateIndexResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def UpdateMaxElements(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, '/dingodb.pb.proxy.meta.MetaService/UpdateMaxElements',
            proxy__meta__pb2.UpdateMaxElementsRequest.SerializeToString,
            proxy__meta__pb2.UpdateMaxElementsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteIndex(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, '/dingodb.pb.proxy.meta.MetaService/DeleteIndex',
            proxy__meta__pb2.DeleteIndexRequest.SerializeToString,
            proxy__meta__pb2.DeleteIndexResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIndex(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, '/dingodb.pb.proxy.meta.MetaService/GetIndex',
            proxy__meta__pb2.GetIndexRequest.SerializeToString,
            proxy__meta__pb2.GetIndexResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIndexes(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, '/dingodb.pb.proxy.meta.MetaService/GetIndexes',
            proxy__meta__pb2.GetIndexesRequest.SerializeToString,
            proxy__meta__pb2.GetIndexesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetIndexNames(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, '/dingodb.pb.proxy.meta.MetaService/GetIndexNames',
            proxy__meta__pb2.GetIndexNamesRequest.SerializeToString,
            proxy__meta__pb2.GetIndexNamesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
