# Generated by the protocol buffer compiler.  DO NOT EDIT!

from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)



DESCRIPTOR = descriptor.FileDescriptor(
  name='send-pairing-info.proto',
  package='',
  serialized_pb='\n\x17send-pairing-info.proto\"\xad\x01\n\x18\x44\x65vicePairingInfoMessage\x12:\n\x04info\x18\xee\x01 \x02(\x0b\x32+.DevicePairingInfoMessage.DevicePairingInfo\x1aU\n\x11\x44\x65vicePairingInfo\x12\x15\n\x0c\x64\x65viceSerial\x18\xeb\x01 \x02(\t\x12\x12\n\tdevicePin\x18\xec\x01 \x02(\x0c\x12\x15\n\x0c\x64\x65viceSuffix\x18\xed\x01 \x02(\t')




_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO = descriptor.Descriptor(
  name='DevicePairingInfo',
  full_name='DevicePairingInfoMessage.DevicePairingInfo',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='deviceSerial', full_name='DevicePairingInfoMessage.DevicePairingInfo.deviceSerial', index=0,
      number=235, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='devicePin', full_name='DevicePairingInfoMessage.DevicePairingInfo.devicePin', index=1,
      number=236, type=12, cpp_type=9, label=2,
      has_default_value=False, default_value="",
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='deviceSuffix', full_name='DevicePairingInfoMessage.DevicePairingInfo.deviceSuffix', index=2,
      number=237, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      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,
  extension_ranges=[],
  serialized_start=116,
  serialized_end=201,
)

_DEVICEPAIRINGINFOMESSAGE = descriptor.Descriptor(
  name='DevicePairingInfoMessage',
  full_name='DevicePairingInfoMessage',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='info', full_name='DevicePairingInfoMessage.info', index=0,
      number=238, type=11, cpp_type=10, label=2,
      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=[_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO, ],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=28,
  serialized_end=201,
)

_DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO.containing_type = _DEVICEPAIRINGINFOMESSAGE;
_DEVICEPAIRINGINFOMESSAGE.fields_by_name['info'].message_type = _DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO
DESCRIPTOR.message_types_by_name['DevicePairingInfoMessage'] = _DEVICEPAIRINGINFOMESSAGE

class DevicePairingInfoMessage(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType
  
  class DevicePairingInfo(message.Message):
    __metaclass__ = reflection.GeneratedProtocolMessageType
    DESCRIPTOR = _DEVICEPAIRINGINFOMESSAGE_DEVICEPAIRINGINFO
    
    # @@protoc_insertion_point(class_scope:DevicePairingInfoMessage.DevicePairingInfo)
  DESCRIPTOR = _DEVICEPAIRINGINFOMESSAGE
  
  # @@protoc_insertion_point(class_scope:DevicePairingInfoMessage)

# @@protoc_insertion_point(module_scope)
