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

import ap_packet_pb2 as ap__packet__pb2


class APPacketsStub(object):
  """@defgroup APPackets
  @ingroup System
  The following RPCs are used to register for packets that the
  client is interested in receiving
  @{

  Packet registration operations

  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.APPacketsRegOp = channel.unary_unary(
        '/cheetah.APPackets/APPacketsRegOp',
        request_serializer=ap__packet__pb2.APPacketsRegMsg.SerializeToString,
        response_deserializer=ap__packet__pb2.APPacketsRegMsgRsp.FromString,
        )
    self.APPacketsInitNotif = channel.unary_stream(
        '/cheetah.APPackets/APPacketsInitNotif',
        request_serializer=ap__packet__pb2.APPacketsGetNotifMsg.SerializeToString,
        response_deserializer=ap__packet__pb2.APPacketsMsgRsp.FromString,
        )


class APPacketsServicer(object):
  """@defgroup APPackets
  @ingroup System
  The following RPCs are used to register for packets that the
  client is interested in receiving
  @{

  Packet registration operations

  """

  def APPacketsRegOp(self, request, context):
    """APPacketsRegMsg.Oper = AP_REGOP_REGISTER
    Packet registration: Sends a list of Packet registration messages
    and expects a list of registration responses.

    APPacketsRegMsg.Oper = AP_REGOP_UNREGISTER
    Packet unregistration: Sends a list of Packet unregistration messages
    and expects a list of unregistration responses.

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

  def APPacketsInitNotif(self, request, context):
    """
    Packet notifications


    This call is used to get a stream of packet notifications matching the
    set of registrations performed with APPacketsRegOp().
    The caller must maintain the GRPC channel as long as
    there is interest in packet notifications. Only sessions that were
    created through this API will be notified to caller.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_APPacketsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'APPacketsRegOp': grpc.unary_unary_rpc_method_handler(
          servicer.APPacketsRegOp,
          request_deserializer=ap__packet__pb2.APPacketsRegMsg.FromString,
          response_serializer=ap__packet__pb2.APPacketsRegMsgRsp.SerializeToString,
      ),
      'APPacketsInitNotif': grpc.unary_stream_rpc_method_handler(
          servicer.APPacketsInitNotif,
          request_deserializer=ap__packet__pb2.APPacketsGetNotifMsg.FromString,
          response_serializer=ap__packet__pb2.APPacketsMsgRsp.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'cheetah.APPackets', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
