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

from . import cxmate_pb2 as cxmate__pb2


class cxMateServiceStub(object):
  """********** SERVICE DEFINITION **********

  cxMateService defines a cxMate compatible service implementation
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.StreamNetworks = channel.stream_stream(
        '/proto.cxMateService/StreamNetworks',
        request_serializer=cxmate__pb2.NetworkElement.SerializeToString,
        response_deserializer=cxmate__pb2.NetworkElement.FromString,
        )


class cxMateServiceServicer(object):
  """********** SERVICE DEFINITION **********

  cxMateService defines a cxMate compatible service implementation
  """

  def StreamNetworks(self, request_iterator, context):
    """StreamNetworks transfers one or more networks to and from the service.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_cxMateServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'StreamNetworks': grpc.stream_stream_rpc_method_handler(
          servicer.StreamNetworks,
          request_deserializer=cxmate__pb2.NetworkElement.FromString,
          response_serializer=cxmate__pb2.NetworkElement.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'proto.cxMateService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
