# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: github_com/TheThingsNetwork/api/networkserver/networkserver.proto

import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from ttn.github_com.gogo.protobuf.gogoproto import gogo_pb2 as github__com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2
from ttn.github_com.TheThingsNetwork.api import api_pb2 as github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2
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 ttn.github_com.TheThingsNetwork.api.broker import broker_pb2 as github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2
from ttn.github_com.TheThingsNetwork.api.handler import handler_pb2 as github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2


DESCRIPTOR = _descriptor.FileDescriptor(
  name='github_com/TheThingsNetwork/api/networkserver/networkserver.proto',
  package='networkserver',
  syntax='proto3',
  serialized_pb=_b('\nAgithub_com/TheThingsNetwork/api/networkserver/networkserver.proto\x12\rnetworkserver\x1a-github_com/gogo/protobuf/gogoproto/gogo.proto\x1a)github_com/TheThingsNetwork/api/api.proto\x1a=github_com/TheThingsNetwork/api/protocol/lorawan/device.proto\x1a\x33github_com/TheThingsNetwork/api/broker/broker.proto\x1a\x35github_com/TheThingsNetwork/api/handler/handler.proto\"m\n\x0e\x44\x65vicesRequest\x12L\n\x08\x64\x65v_addr\x18\x01 \x01(\x0c\x42:\xc8\xde\x1f\x00\xda\xde\x1f\x32github_com/TheThingsNetwork/ttn/core/types.DevAddr\x12\r\n\x05\x66_cnt\x18\x02 \x01(\r\"3\n\x0f\x44\x65vicesResponse\x12 \n\x07results\x18\x01 \x03(\x0b\x32\x0f.lorawan.Device\"\x0f\n\rStatusRequest\"\xe8\x01\n\x06Status\x12&\n\x06system\x18\x01 \x01(\x0b\x32\x10.api.SystemStatsB\x04\xc8\xde\x1f\x00\x12,\n\tcomponent\x18\x02 \x01(\x0b\x32\x13.api.ComponentStatsB\x04\xc8\xde\x1f\x00\x12\x1a\n\x06uplink\x18\x0b \x01(\x0b\x32\n.api.Rates\x12\x1c\n\x08\x64ownlink\x18\x0c \x01(\x0b\x32\n.api.Rates\x12\x1f\n\x0b\x61\x63tivations\x18\r \x01(\x0b\x32\n.api.Rates\x12-\n\x13\x64\x65vices_per_address\x18\x15 \x01(\x0b\x32\x10.api.Percentiles2\xab\x03\n\rNetworkServer\x12K\n\nGetDevices\x12\x1d.networkserver.DevicesRequest\x1a\x1e.networkserver.DevicesResponse\x12m\n\x11PrepareActivation\x12+.broker.DeduplicatedDeviceActivationRequest\x1a+.broker.DeduplicatedDeviceActivationRequest\x12P\n\x08\x41\x63tivate\x12!.handler.DeviceActivationResponse\x1a!.handler.DeviceActivationResponse\x12N\n\x06Uplink\x12!.broker.DeduplicatedUplinkMessage\x1a!.broker.DeduplicatedUplinkMessage\x12<\n\x08\x44ownlink\x12\x17.broker.DownlinkMessage\x1a\x17.broker.DownlinkMessage2X\n\x14NetworkServerManager\x12@\n\tGetStatus\x12\x1c.networkserver.StatusRequest\x1a\x15.networkserver.StatusB\x86\x01\n&org.thethingsnetwork.api.networkserverB\x0cMonitorProtoP\x01Z-github_com/TheThingsNetwork/api/networkserver\xaa\x02\x1cTheThingsNetwork.API.Monitorb\x06proto3')
  ,
  dependencies=[github__com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2.DESCRIPTOR,github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2.DESCRIPTOR,github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DESCRIPTOR,github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DESCRIPTOR,])




_DEVICESREQUEST = _descriptor.Descriptor(
  name='DevicesRequest',
  full_name='networkserver.DevicesRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='dev_addr', full_name='networkserver.DevicesRequest.dev_addr', index=0,
      number=1, type=12, cpp_type=9, label=1,
      has_default_value=False, default_value=_b(""),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000\332\336\0372github_com/TheThingsNetwork/ttn/core/types.DevAddr'))),
    _descriptor.FieldDescriptor(
      name='f_cnt', full_name='networkserver.DevicesRequest.f_cnt', index=1,
      number=2, type=13, cpp_type=3, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=345,
  serialized_end=454,
)


_DEVICESRESPONSE = _descriptor.Descriptor(
  name='DevicesResponse',
  full_name='networkserver.DevicesResponse',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='results', full_name='networkserver.DevicesResponse.results', index=0,
      number=1, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=456,
  serialized_end=507,
)


_STATUSREQUEST = _descriptor.Descriptor(
  name='StatusRequest',
  full_name='networkserver.StatusRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=509,
  serialized_end=524,
)


_STATUS = _descriptor.Descriptor(
  name='Status',
  full_name='networkserver.Status',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    _descriptor.FieldDescriptor(
      name='system', full_name='networkserver.Status.system', index=0,
      number=1, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000'))),
    _descriptor.FieldDescriptor(
      name='component', full_name='networkserver.Status.component', index=1,
      number=2, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000'))),
    _descriptor.FieldDescriptor(
      name='uplink', full_name='networkserver.Status.uplink', index=2,
      number=11, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='downlink', full_name='networkserver.Status.downlink', index=3,
      number=12, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='activations', full_name='networkserver.Status.activations', index=4,
      number=13, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    _descriptor.FieldDescriptor(
      name='devices_per_address', full_name='networkserver.Status.devices_per_address', index=5,
      number=21, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=527,
  serialized_end=759,
)

_DEVICESRESPONSE.fields_by_name['results'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_protocol_dot_lorawan_dot_device__pb2._DEVICE
_STATUS.fields_by_name['system'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._SYSTEMSTATS
_STATUS.fields_by_name['component'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._COMPONENTSTATS
_STATUS.fields_by_name['uplink'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._RATES
_STATUS.fields_by_name['downlink'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._RATES
_STATUS.fields_by_name['activations'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._RATES
_STATUS.fields_by_name['devices_per_address'].message_type = github__com_dot_TheThingsNetwork_dot_api_dot_api__pb2._PERCENTILES
DESCRIPTOR.message_types_by_name['DevicesRequest'] = _DEVICESREQUEST
DESCRIPTOR.message_types_by_name['DevicesResponse'] = _DEVICESRESPONSE
DESCRIPTOR.message_types_by_name['StatusRequest'] = _STATUSREQUEST
DESCRIPTOR.message_types_by_name['Status'] = _STATUS
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

DevicesRequest = _reflection.GeneratedProtocolMessageType('DevicesRequest', (_message.Message,), dict(
  DESCRIPTOR = _DEVICESREQUEST,
  __module__ = 'github_com.TheThingsNetwork.api.networkserver.networkserver_pb2'
  # @@protoc_insertion_point(class_scope:networkserver.DevicesRequest)
  ))
_sym_db.RegisterMessage(DevicesRequest)

DevicesResponse = _reflection.GeneratedProtocolMessageType('DevicesResponse', (_message.Message,), dict(
  DESCRIPTOR = _DEVICESRESPONSE,
  __module__ = 'github_com.TheThingsNetwork.api.networkserver.networkserver_pb2'
  # @@protoc_insertion_point(class_scope:networkserver.DevicesResponse)
  ))
_sym_db.RegisterMessage(DevicesResponse)

StatusRequest = _reflection.GeneratedProtocolMessageType('StatusRequest', (_message.Message,), dict(
  DESCRIPTOR = _STATUSREQUEST,
  __module__ = 'github_com.TheThingsNetwork.api.networkserver.networkserver_pb2'
  # @@protoc_insertion_point(class_scope:networkserver.StatusRequest)
  ))
_sym_db.RegisterMessage(StatusRequest)

Status = _reflection.GeneratedProtocolMessageType('Status', (_message.Message,), dict(
  DESCRIPTOR = _STATUS,
  __module__ = 'github_com.TheThingsNetwork.api.networkserver.networkserver_pb2'
  # @@protoc_insertion_point(class_scope:networkserver.Status)
  ))
_sym_db.RegisterMessage(Status)


DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n&org.thethingsnetwork.api.networkserverB\014MonitorProtoP\001Z-github_com/TheThingsNetwork/api/networkserver\252\002\034TheThingsNetwork.API.Monitor'))
_DEVICESREQUEST.fields_by_name['dev_addr'].has_options = True
_DEVICESREQUEST.fields_by_name['dev_addr']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000\332\336\0372github_com/TheThingsNetwork/ttn/core/types.DevAddr'))
_STATUS.fields_by_name['system'].has_options = True
_STATUS.fields_by_name['system']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000'))
_STATUS.fields_by_name['component'].has_options = True
_STATUS.fields_by_name['component']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\310\336\037\000'))

_NETWORKSERVER = _descriptor.ServiceDescriptor(
  name='NetworkServer',
  full_name='networkserver.NetworkServer',
  file=DESCRIPTOR,
  index=0,
  options=None,
  serialized_start=762,
  serialized_end=1189,
  methods=[
  _descriptor.MethodDescriptor(
    name='GetDevices',
    full_name='networkserver.NetworkServer.GetDevices',
    index=0,
    containing_service=None,
    input_type=_DEVICESREQUEST,
    output_type=_DEVICESRESPONSE,
    options=None,
  ),
  _descriptor.MethodDescriptor(
    name='PrepareActivation',
    full_name='networkserver.NetworkServer.PrepareActivation',
    index=1,
    containing_service=None,
    input_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DEDUPLICATEDDEVICEACTIVATIONREQUEST,
    output_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DEDUPLICATEDDEVICEACTIVATIONREQUEST,
    options=None,
  ),
  _descriptor.MethodDescriptor(
    name='Activate',
    full_name='networkserver.NetworkServer.Activate',
    index=2,
    containing_service=None,
    input_type=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2._DEVICEACTIVATIONRESPONSE,
    output_type=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2._DEVICEACTIVATIONRESPONSE,
    options=None,
  ),
  _descriptor.MethodDescriptor(
    name='Uplink',
    full_name='networkserver.NetworkServer.Uplink',
    index=3,
    containing_service=None,
    input_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DEDUPLICATEDUPLINKMESSAGE,
    output_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DEDUPLICATEDUPLINKMESSAGE,
    options=None,
  ),
  _descriptor.MethodDescriptor(
    name='Downlink',
    full_name='networkserver.NetworkServer.Downlink',
    index=4,
    containing_service=None,
    input_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DOWNLINKMESSAGE,
    output_type=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2._DOWNLINKMESSAGE,
    options=None,
  ),
])
_sym_db.RegisterServiceDescriptor(_NETWORKSERVER)

DESCRIPTOR.services_by_name['NetworkServer'] = _NETWORKSERVER


_NETWORKSERVERMANAGER = _descriptor.ServiceDescriptor(
  name='NetworkServerManager',
  full_name='networkserver.NetworkServerManager',
  file=DESCRIPTOR,
  index=1,
  options=None,
  serialized_start=1191,
  serialized_end=1279,
  methods=[
  _descriptor.MethodDescriptor(
    name='GetStatus',
    full_name='networkserver.NetworkServerManager.GetStatus',
    index=0,
    containing_service=None,
    input_type=_STATUSREQUEST,
    output_type=_STATUS,
    options=None,
  ),
])
_sym_db.RegisterServiceDescriptor(_NETWORKSERVERMANAGER)

DESCRIPTOR.services_by_name['NetworkServerManager'] = _NETWORKSERVERMANAGER

try:
  # THESE ELEMENTS WILL BE DEPRECATED.
  # Please use the generated *_pb2_grpc.py files instead.
  import grpc
  from grpc.beta import implementations as beta_implementations
  from grpc.beta import interfaces as beta_interfaces
  from grpc.framework.common import cardinality
  from grpc.framework.interfaces.face import utilities as face_utilities


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

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

      Args:
        channel: A grpc.Channel.
      """
      self.GetDevices = channel.unary_unary(
          '/networkserver.NetworkServer/GetDevices',
          request_serializer=DevicesRequest.SerializeToString,
          response_deserializer=DevicesResponse.FromString,
          )
      self.PrepareActivation = channel.unary_unary(
          '/networkserver.NetworkServer/PrepareActivation',
          request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.SerializeToString,
          response_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.FromString,
          )
      self.Activate = channel.unary_unary(
          '/networkserver.NetworkServer/Activate',
          request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.SerializeToString,
          response_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.FromString,
          )
      self.Uplink = channel.unary_unary(
          '/networkserver.NetworkServer/Uplink',
          request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.SerializeToString,
          response_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.FromString,
          )
      self.Downlink = channel.unary_unary(
          '/networkserver.NetworkServer/Downlink',
          request_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.SerializeToString,
          response_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.FromString,
          )


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

    def GetDevices(self, request, context):
      """Broker requests devices with DevAddr and matching FCnt (or disabled FCnt check)
      """
      context.set_code(grpc.StatusCode.UNIMPLEMENTED)
      context.set_details('Method not implemented!')
      raise NotImplementedError('Method not implemented!')

    def PrepareActivation(self, request, context):
      """Broker requests device activation "template" from Network Server
      """
      context.set_code(grpc.StatusCode.UNIMPLEMENTED)
      context.set_details('Method not implemented!')
      raise NotImplementedError('Method not implemented!')

    def Activate(self, request, context):
      """Broker confirms device activation (after response from Handler)
      """
      context.set_code(grpc.StatusCode.UNIMPLEMENTED)
      context.set_details('Method not implemented!')
      raise NotImplementedError('Method not implemented!')

    def Uplink(self, request, context):
      """Broker informs Network Server about Uplink
      """
      context.set_code(grpc.StatusCode.UNIMPLEMENTED)
      context.set_details('Method not implemented!')
      raise NotImplementedError('Method not implemented!')

    def Downlink(self, request, context):
      """Broker informs Network Server about Downlink, NetworkServer may add MAC commands and re-set MIC
      """
      context.set_code(grpc.StatusCode.UNIMPLEMENTED)
      context.set_details('Method not implemented!')
      raise NotImplementedError('Method not implemented!')


  def add_NetworkServerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetDevices': grpc.unary_unary_rpc_method_handler(
            servicer.GetDevices,
            request_deserializer=DevicesRequest.FromString,
            response_serializer=DevicesResponse.SerializeToString,
        ),
        'PrepareActivation': grpc.unary_unary_rpc_method_handler(
            servicer.PrepareActivation,
            request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.FromString,
            response_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.SerializeToString,
        ),
        'Activate': grpc.unary_unary_rpc_method_handler(
            servicer.Activate,
            request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.FromString,
            response_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.SerializeToString,
        ),
        'Uplink': grpc.unary_unary_rpc_method_handler(
            servicer.Uplink,
            request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.FromString,
            response_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.SerializeToString,
        ),
        'Downlink': grpc.unary_unary_rpc_method_handler(
            servicer.Downlink,
            request_deserializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.FromString,
            response_serializer=github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'networkserver.NetworkServer', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


  class NetworkServerManagerStub(object):
    """The NetworkServerManager service provides configuration and monitoring
    functionality
    """

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

      Args:
        channel: A grpc.Channel.
      """
      self.GetStatus = channel.unary_unary(
          '/networkserver.NetworkServerManager/GetStatus',
          request_serializer=StatusRequest.SerializeToString,
          response_deserializer=Status.FromString,
          )


  class NetworkServerManagerServicer(object):
    """The NetworkServerManager service provides configuration and monitoring
    functionality
    """

    def GetStatus(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_NetworkServerManagerServicer_to_server(servicer, server):
    rpc_method_handlers = {
        'GetStatus': grpc.unary_unary_rpc_method_handler(
            servicer.GetStatus,
            request_deserializer=StatusRequest.FromString,
            response_serializer=Status.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        'networkserver.NetworkServerManager', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


  class BetaNetworkServerServicer(object):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This class was generated
    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
    # missing associated documentation comment in .proto file
    pass
    def GetDevices(self, request, context):
      """Broker requests devices with DevAddr and matching FCnt (or disabled FCnt check)
      """
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
    def PrepareActivation(self, request, context):
      """Broker requests device activation "template" from Network Server
      """
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
    def Activate(self, request, context):
      """Broker confirms device activation (after response from Handler)
      """
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
    def Uplink(self, request, context):
      """Broker informs Network Server about Uplink
      """
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
    def Downlink(self, request, context):
      """Broker informs Network Server about Downlink, NetworkServer may add MAC commands and re-set MIC
      """
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)


  class BetaNetworkServerStub(object):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This class was generated
    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
    # missing associated documentation comment in .proto file
    pass
    def GetDevices(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      """Broker requests devices with DevAddr and matching FCnt (or disabled FCnt check)
      """
      raise NotImplementedError()
    GetDevices.future = None
    def PrepareActivation(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      """Broker requests device activation "template" from Network Server
      """
      raise NotImplementedError()
    PrepareActivation.future = None
    def Activate(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      """Broker confirms device activation (after response from Handler)
      """
      raise NotImplementedError()
    Activate.future = None
    def Uplink(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      """Broker informs Network Server about Uplink
      """
      raise NotImplementedError()
    Uplink.future = None
    def Downlink(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      """Broker informs Network Server about Downlink, NetworkServer may add MAC commands and re-set MIC
      """
      raise NotImplementedError()
    Downlink.future = None


  def beta_create_NetworkServer_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('networkserver.NetworkServer', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.FromString,
      ('networkserver.NetworkServer', 'Downlink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.FromString,
      ('networkserver.NetworkServer', 'GetDevices'): DevicesRequest.FromString,
      ('networkserver.NetworkServer', 'PrepareActivation'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.FromString,
      ('networkserver.NetworkServer', 'Uplink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.FromString,
    }
    response_serializers = {
      ('networkserver.NetworkServer', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.SerializeToString,
      ('networkserver.NetworkServer', 'Downlink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.SerializeToString,
      ('networkserver.NetworkServer', 'GetDevices'): DevicesResponse.SerializeToString,
      ('networkserver.NetworkServer', 'PrepareActivation'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.SerializeToString,
      ('networkserver.NetworkServer', 'Uplink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.SerializeToString,
    }
    method_implementations = {
      ('networkserver.NetworkServer', 'Activate'): face_utilities.unary_unary_inline(servicer.Activate),
      ('networkserver.NetworkServer', 'Downlink'): face_utilities.unary_unary_inline(servicer.Downlink),
      ('networkserver.NetworkServer', 'GetDevices'): face_utilities.unary_unary_inline(servicer.GetDevices),
      ('networkserver.NetworkServer', 'PrepareActivation'): face_utilities.unary_unary_inline(servicer.PrepareActivation),
      ('networkserver.NetworkServer', 'Uplink'): face_utilities.unary_unary_inline(servicer.Uplink),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)


  def beta_create_NetworkServer_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('networkserver.NetworkServer', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.SerializeToString,
      ('networkserver.NetworkServer', 'Downlink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.SerializeToString,
      ('networkserver.NetworkServer', 'GetDevices'): DevicesRequest.SerializeToString,
      ('networkserver.NetworkServer', 'PrepareActivation'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.SerializeToString,
      ('networkserver.NetworkServer', 'Uplink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.SerializeToString,
    }
    response_deserializers = {
      ('networkserver.NetworkServer', 'Activate'): github__com_dot_TheThingsNetwork_dot_api_dot_handler_dot_handler__pb2.DeviceActivationResponse.FromString,
      ('networkserver.NetworkServer', 'Downlink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DownlinkMessage.FromString,
      ('networkserver.NetworkServer', 'GetDevices'): DevicesResponse.FromString,
      ('networkserver.NetworkServer', 'PrepareActivation'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedDeviceActivationRequest.FromString,
      ('networkserver.NetworkServer', 'Uplink'): github__com_dot_TheThingsNetwork_dot_api_dot_broker_dot_broker__pb2.DeduplicatedUplinkMessage.FromString,
    }
    cardinalities = {
      'Activate': cardinality.Cardinality.UNARY_UNARY,
      'Downlink': cardinality.Cardinality.UNARY_UNARY,
      'GetDevices': cardinality.Cardinality.UNARY_UNARY,
      'PrepareActivation': cardinality.Cardinality.UNARY_UNARY,
      'Uplink': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'networkserver.NetworkServer', cardinalities, options=stub_options)


  class BetaNetworkServerManagerServicer(object):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This class was generated
    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
    """The NetworkServerManager service provides configuration and monitoring
    functionality
    """
    def GetStatus(self, request, context):
      # missing associated documentation comment in .proto file
      pass
      context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)


  class BetaNetworkServerManagerStub(object):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This class was generated
    only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
    """The NetworkServerManager service provides configuration and monitoring
    functionality
    """
    def GetStatus(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
      # missing associated documentation comment in .proto file
      pass
      raise NotImplementedError()
    GetStatus.future = None


  def beta_create_NetworkServerManager_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_deserializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.FromString,
    }
    response_serializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): Status.SerializeToString,
    }
    method_implementations = {
      ('networkserver.NetworkServerManager', 'GetStatus'): face_utilities.unary_unary_inline(servicer.GetStatus),
    }
    server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
    return beta_implementations.server(method_implementations, options=server_options)


  def beta_create_NetworkServerManager_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
    """The Beta API is deprecated for 0.15.0 and later.

    It is recommended to use the GA API (classes and functions in this
    file not marked beta) for all further purposes. This function was
    generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
    request_serializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): StatusRequest.SerializeToString,
    }
    response_deserializers = {
      ('networkserver.NetworkServerManager', 'GetStatus'): Status.FromString,
    }
    cardinalities = {
      'GetStatus': cardinality.Cardinality.UNARY_UNARY,
    }
    stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
    return beta_implementations.dynamic_stub(channel, 'networkserver.NetworkServerManager', cardinalities, options=stub_options)
except ImportError:
  pass
# @@protoc_insertion_point(module_scope)
