# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import common_pb2 as common__pb2
from . import schema_pb2 as schema__pb2
from . import service_msg_pb2 as service__msg__pb2


class MilvusServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateCollection = channel.unary_unary(
        '/milvus.proto.service.MilvusService/CreateCollection',
        request_serializer=schema__pb2.CollectionSchema.SerializeToString,
        response_deserializer=common__pb2.Status.FromString,
        )
    self.DropCollection = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DropCollection',
        request_serializer=service__msg__pb2.CollectionName.SerializeToString,
        response_deserializer=common__pb2.Status.FromString,
        )
    self.HasCollection = channel.unary_unary(
        '/milvus.proto.service.MilvusService/HasCollection',
        request_serializer=service__msg__pb2.CollectionName.SerializeToString,
        response_deserializer=service__msg__pb2.BoolResponse.FromString,
        )
    self.DescribeCollection = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DescribeCollection',
        request_serializer=service__msg__pb2.CollectionName.SerializeToString,
        response_deserializer=service__msg__pb2.CollectionDescription.FromString,
        )
    self.ShowCollections = channel.unary_unary(
        '/milvus.proto.service.MilvusService/ShowCollections',
        request_serializer=common__pb2.Empty.SerializeToString,
        response_deserializer=service__msg__pb2.StringListResponse.FromString,
        )
    self.CreatePartition = channel.unary_unary(
        '/milvus.proto.service.MilvusService/CreatePartition',
        request_serializer=service__msg__pb2.PartitionName.SerializeToString,
        response_deserializer=common__pb2.Status.FromString,
        )
    self.DropPartition = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DropPartition',
        request_serializer=service__msg__pb2.PartitionName.SerializeToString,
        response_deserializer=common__pb2.Status.FromString,
        )
    self.HasPartition = channel.unary_unary(
        '/milvus.proto.service.MilvusService/HasPartition',
        request_serializer=service__msg__pb2.PartitionName.SerializeToString,
        response_deserializer=service__msg__pb2.BoolResponse.FromString,
        )
    self.DescribePartition = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DescribePartition',
        request_serializer=service__msg__pb2.PartitionName.SerializeToString,
        response_deserializer=service__msg__pb2.PartitionDescription.FromString,
        )
    self.ShowPartitions = channel.unary_unary(
        '/milvus.proto.service.MilvusService/ShowPartitions',
        request_serializer=service__msg__pb2.CollectionName.SerializeToString,
        response_deserializer=service__msg__pb2.StringListResponse.FromString,
        )
    self.Insert = channel.unary_unary(
        '/milvus.proto.service.MilvusService/Insert',
        request_serializer=service__msg__pb2.RowBatch.SerializeToString,
        response_deserializer=service__msg__pb2.IntegerRangeResponse.FromString,
        )
    self.Search = channel.unary_unary(
        '/milvus.proto.service.MilvusService/Search',
        request_serializer=service__msg__pb2.Query.SerializeToString,
        response_deserializer=service__msg__pb2.QueryResult.FromString,
        )
    self.CreateIndex = channel.unary_unary(
        '/milvus.proto.service.MilvusService/CreateIndex',
        request_serializer=service__msg__pb2.IndexParam.SerializeToString,
        response_deserializer=common__pb2.Status.FromString,
        )
    self.DescribeIndex = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DescribeIndex',
        request_serializer=service__msg__pb2.DescribeIndexRequest.SerializeToString,
        response_deserializer=service__msg__pb2.DescribeIndexResponse.FromString,
        )
    self.DescribeIndexProgress = channel.unary_unary(
        '/milvus.proto.service.MilvusService/DescribeIndexProgress',
        request_serializer=service__msg__pb2.DescribeIndexProgressRequest.SerializeToString,
        response_deserializer=service__msg__pb2.BoolResponse.FromString,
        )


class MilvusServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def CreateCollection(self, request, context):
    """*
    @brief This method is used to create collection

    @param CollectionSchema, use to provide collection information to be created.

    @return Status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DropCollection(self, request, context):
    """*
    @brief This method is used to delete collection.

    @param CollectionName, collection name is going to be deleted.

    @return Status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def HasCollection(self, request, context):
    """*
    @brief This method is used to test collection existence.

    @param CollectionName, collection name is going to be tested.

    @return BoolResponse
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DescribeCollection(self, request, context):
    """*
    @brief This method is used to get collection schema.

    @param CollectionName, target collection name.

    @return CollectionDescription
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ShowCollections(self, request, context):
    """*
    @brief This method is used to list all collections.

    @return CollectionNameList
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreatePartition(self, request, context):
    """*
    @brief This method is used to create partition

    @return Status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DropPartition(self, request, context):
    """*
    @brief This method is used to drop partition

    @return Status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def HasPartition(self, request, context):
    """*
    @brief This method is used to test partition existence.

    @return BoolResponse
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DescribePartition(self, request, context):
    """*
    @brief This method is used to get basic partition infomation.

    @return PartitionDescription
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ShowPartitions(self, request, context):
    """*
    @brief This method is used to show partition information

    @param CollectionName, target collection name.

    @return StringListResponse
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Insert(self, request, context):
    """*
    @brief This method is used to add vector array to collection.

    @param RowBatch, insert rows.

    @return IntegerRangeResponse contains id of the inserted rows.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Search(self, request, context):
    """*
    @brief This method is used to query vector in collection.

    @param Query.

    @return QueryResult
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateIndex(self, request, context):
    """*
    @brief This method is used to build index by collection in sync mode.

    @param IndexParam, index paramters.

    @return Status
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DescribeIndex(self, request, context):
    """*
    @brief This method is used to describe index

    @param IndexParam, target index.

    @return IndexParam
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DescribeIndexProgress(self, request, context):
    """*
    @brief This method is used to query index building progress

    @param IndexParam, target index.

    @return IndexParam
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_MilvusServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateCollection': grpc.unary_unary_rpc_method_handler(
          servicer.CreateCollection,
          request_deserializer=schema__pb2.CollectionSchema.FromString,
          response_serializer=common__pb2.Status.SerializeToString,
      ),
      'DropCollection': grpc.unary_unary_rpc_method_handler(
          servicer.DropCollection,
          request_deserializer=service__msg__pb2.CollectionName.FromString,
          response_serializer=common__pb2.Status.SerializeToString,
      ),
      'HasCollection': grpc.unary_unary_rpc_method_handler(
          servicer.HasCollection,
          request_deserializer=service__msg__pb2.CollectionName.FromString,
          response_serializer=service__msg__pb2.BoolResponse.SerializeToString,
      ),
      'DescribeCollection': grpc.unary_unary_rpc_method_handler(
          servicer.DescribeCollection,
          request_deserializer=service__msg__pb2.CollectionName.FromString,
          response_serializer=service__msg__pb2.CollectionDescription.SerializeToString,
      ),
      'ShowCollections': grpc.unary_unary_rpc_method_handler(
          servicer.ShowCollections,
          request_deserializer=common__pb2.Empty.FromString,
          response_serializer=service__msg__pb2.StringListResponse.SerializeToString,
      ),
      'CreatePartition': grpc.unary_unary_rpc_method_handler(
          servicer.CreatePartition,
          request_deserializer=service__msg__pb2.PartitionName.FromString,
          response_serializer=common__pb2.Status.SerializeToString,
      ),
      'DropPartition': grpc.unary_unary_rpc_method_handler(
          servicer.DropPartition,
          request_deserializer=service__msg__pb2.PartitionName.FromString,
          response_serializer=common__pb2.Status.SerializeToString,
      ),
      'HasPartition': grpc.unary_unary_rpc_method_handler(
          servicer.HasPartition,
          request_deserializer=service__msg__pb2.PartitionName.FromString,
          response_serializer=service__msg__pb2.BoolResponse.SerializeToString,
      ),
      'DescribePartition': grpc.unary_unary_rpc_method_handler(
          servicer.DescribePartition,
          request_deserializer=service__msg__pb2.PartitionName.FromString,
          response_serializer=service__msg__pb2.PartitionDescription.SerializeToString,
      ),
      'ShowPartitions': grpc.unary_unary_rpc_method_handler(
          servicer.ShowPartitions,
          request_deserializer=service__msg__pb2.CollectionName.FromString,
          response_serializer=service__msg__pb2.StringListResponse.SerializeToString,
      ),
      'Insert': grpc.unary_unary_rpc_method_handler(
          servicer.Insert,
          request_deserializer=service__msg__pb2.RowBatch.FromString,
          response_serializer=service__msg__pb2.IntegerRangeResponse.SerializeToString,
      ),
      'Search': grpc.unary_unary_rpc_method_handler(
          servicer.Search,
          request_deserializer=service__msg__pb2.Query.FromString,
          response_serializer=service__msg__pb2.QueryResult.SerializeToString,
      ),
      'CreateIndex': grpc.unary_unary_rpc_method_handler(
          servicer.CreateIndex,
          request_deserializer=service__msg__pb2.IndexParam.FromString,
          response_serializer=common__pb2.Status.SerializeToString,
      ),
      'DescribeIndex': grpc.unary_unary_rpc_method_handler(
          servicer.DescribeIndex,
          request_deserializer=service__msg__pb2.DescribeIndexRequest.FromString,
          response_serializer=service__msg__pb2.DescribeIndexResponse.SerializeToString,
      ),
      'DescribeIndexProgress': grpc.unary_unary_rpc_method_handler(
          servicer.DescribeIndexProgress,
          request_deserializer=service__msg__pb2.DescribeIndexProgressRequest.FromString,
          response_serializer=service__msg__pb2.BoolResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'milvus.proto.service.MilvusService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
