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

import common_pb2 as common__pb2
import topology_edge_pb2 as topology__edge__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.rpc_get_topology_edge = channel.unary_unary(
        '/topology_edge/rpc_get_topology_edge',
        request_serializer=topology__edge__pb2.req_edge_key.SerializeToString,
        response_deserializer=topology__edge__pb2.res_topology_edge.FromString,
        )
    self.rpc_list_topology_edges = channel.stream_stream(
        '/topology_edge/rpc_list_topology_edges',
        request_serializer=topology__edge__pb2.req_edge_key.SerializeToString,
        response_deserializer=topology__edge__pb2.res_topology_edge.FromString,
        )
    self.rpc_regsiter_topology_edge = channel.unary_unary(
        '/topology_edge/rpc_regsiter_topology_edge',
        request_serializer=topology__edge__pb2.res_topology_edge.SerializeToString,
        response_deserializer=topology__edge__pb2.res_topology_edge.FromString,
        )
    self.rpc_unregister_topology_edge = channel.unary_unary(
        '/topology_edge/rpc_unregister_topology_edge',
        request_serializer=topology__edge__pb2.req_edge_key.SerializeToString,
        response_deserializer=common__pb2.null.FromString,
        )


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

  def rpc_get_topology_edge(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 rpc_list_topology_edges(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 rpc_regsiter_topology_edge(self, request, context):
    """reserved rpc function, we define it, but do not implement them
    in case we draw the topologies mannually
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def rpc_unregister_topology_edge(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_topology_edgeServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'rpc_get_topology_edge': grpc.unary_unary_rpc_method_handler(
          servicer.rpc_get_topology_edge,
          request_deserializer=topology__edge__pb2.req_edge_key.FromString,
          response_serializer=topology__edge__pb2.res_topology_edge.SerializeToString,
      ),
      'rpc_list_topology_edges': grpc.stream_stream_rpc_method_handler(
          servicer.rpc_list_topology_edges,
          request_deserializer=topology__edge__pb2.req_edge_key.FromString,
          response_serializer=topology__edge__pb2.res_topology_edge.SerializeToString,
      ),
      'rpc_regsiter_topology_edge': grpc.unary_unary_rpc_method_handler(
          servicer.rpc_regsiter_topology_edge,
          request_deserializer=topology__edge__pb2.res_topology_edge.FromString,
          response_serializer=topology__edge__pb2.res_topology_edge.SerializeToString,
      ),
      'rpc_unregister_topology_edge': grpc.unary_unary_rpc_method_handler(
          servicer.rpc_unregister_topology_edge,
          request_deserializer=topology__edge__pb2.req_edge_key.FromString,
          response_serializer=common__pb2.null.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'topology_edge', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
