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

from python_pachyderm.proto.admin import admin_pb2 as client_dot_admin_dot_admin__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Extract = channel.unary_stream(
        '/admin.API/Extract',
        request_serializer=client_dot_admin_dot_admin__pb2.ExtractRequest.SerializeToString,
        response_deserializer=client_dot_admin_dot_admin__pb2.Op.FromString,
        )
    self.ExtractPipeline = channel.unary_unary(
        '/admin.API/ExtractPipeline',
        request_serializer=client_dot_admin_dot_admin__pb2.ExtractPipelineRequest.SerializeToString,
        response_deserializer=client_dot_admin_dot_admin__pb2.Op.FromString,
        )
    self.Restore = channel.stream_unary(
        '/admin.API/Restore',
        request_serializer=client_dot_admin_dot_admin__pb2.RestoreRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.InspectCluster = channel.unary_unary(
        '/admin.API/InspectCluster',
        request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        response_deserializer=client_dot_admin_dot_admin__pb2.ClusterInfo.FromString,
        )


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

  def Extract(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ExtractPipeline(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Restore(self, request_iterator, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def InspectCluster(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_APIServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Extract': grpc.unary_stream_rpc_method_handler(
          servicer.Extract,
          request_deserializer=client_dot_admin_dot_admin__pb2.ExtractRequest.FromString,
          response_serializer=client_dot_admin_dot_admin__pb2.Op.SerializeToString,
      ),
      'ExtractPipeline': grpc.unary_unary_rpc_method_handler(
          servicer.ExtractPipeline,
          request_deserializer=client_dot_admin_dot_admin__pb2.ExtractPipelineRequest.FromString,
          response_serializer=client_dot_admin_dot_admin__pb2.Op.SerializeToString,
      ),
      'Restore': grpc.stream_unary_rpc_method_handler(
          servicer.Restore,
          request_deserializer=client_dot_admin_dot_admin__pb2.RestoreRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'InspectCluster': grpc.unary_unary_rpc_method_handler(
          servicer.InspectCluster,
          request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
          response_serializer=client_dot_admin_dot_admin__pb2.ClusterInfo.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'admin.API', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
