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

from ttn.github_com.TheThingsNetwork.api.protocol.lorawan import device_pb2 as github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.GetDevice = channel.unary_unary(
        '/lorawan.DeviceManager/GetDevice',
        request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.DeviceIdentifier.SerializeToString,
        response_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.Device.FromString,
        )
    self.SetDevice = channel.unary_unary(
        '/lorawan.DeviceManager/SetDevice',
        request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.Device.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
    self.DeleteDevice = channel.unary_unary(
        '/lorawan.DeviceManager/DeleteDevice',
        request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.DeviceIdentifier.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


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

  def GetDevice(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 SetDevice(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 DeleteDevice(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_DeviceManagerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'GetDevice': grpc.unary_unary_rpc_method_handler(
          servicer.GetDevice,
          request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.DeviceIdentifier.FromString,
          response_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.Device.SerializeToString,
      ),
      'SetDevice': grpc.unary_unary_rpc_method_handler(
          servicer.SetDevice,
          request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.Device.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
      'DeleteDevice': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteDevice,
          request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.DeviceIdentifier.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'lorawan.DeviceManager', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
