# 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='update-capabilities.proto',
  package='',
  serialized_pb='\n\x19update-capabilities.proto\"\x98\x03\n UpdateCapabilitiesCommandMessage\x12\x43\n\x0c\x63\x61pabilities\x18\xea\x01 \x03(\x0b\x32,.UpdateCapabilitiesCommandMessage.Capability\x1a\x1a\n\x04Name\x12\x12\n\ncomponents\x18\x08 \x03(\x0c\x1aG\n\x15\x43\x61pabilitiesParameter\x12\x16\n\rparameterType\x18\xe4\x01 \x02(\t\x12\x16\n\rparameterDesc\x18\xe5\x01 \x01(\t\x1a\xc9\x01\n\nCapability\x12>\n\rcommandPrefix\x18\xe6\x01 \x02(\x0b\x32&.UpdateCapabilitiesCommandMessage.Name\x12\x11\n\x08keywords\x18\xe7\x01 \x03(\t\x12O\n\rparameterDesc\x18\xe8\x01 \x03(\x0b\x32\x37.UpdateCapabilitiesCommandMessage.CapabilitiesParameter\x12\x17\n\x0eneedsSignature\x18\xe9\x01 \x01(\x08')




_UPDATECAPABILITIESCOMMANDMESSAGE_NAME = descriptor.Descriptor(
  name='Name',
  full_name='UpdateCapabilitiesCommandMessage.Name',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='components', full_name='UpdateCapabilitiesCommandMessage.Name.components', index=0,
      number=8, type=12, cpp_type=9, 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,
  extension_ranges=[],
  serialized_start=135,
  serialized_end=161,
)

_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER = descriptor.Descriptor(
  name='CapabilitiesParameter',
  full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='parameterType', full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter.parameterType', index=0,
      number=228, 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='parameterDesc', full_name='UpdateCapabilitiesCommandMessage.CapabilitiesParameter.parameterDesc', index=1,
      number=229, type=9, cpp_type=9, label=1,
      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=163,
  serialized_end=234,
)

_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY = descriptor.Descriptor(
  name='Capability',
  full_name='UpdateCapabilitiesCommandMessage.Capability',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='commandPrefix', full_name='UpdateCapabilitiesCommandMessage.Capability.commandPrefix', index=0,
      number=230, 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),
    descriptor.FieldDescriptor(
      name='keywords', full_name='UpdateCapabilitiesCommandMessage.Capability.keywords', index=1,
      number=231, type=9, cpp_type=9, 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),
    descriptor.FieldDescriptor(
      name='parameterDesc', full_name='UpdateCapabilitiesCommandMessage.Capability.parameterDesc', index=2,
      number=232, 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),
    descriptor.FieldDescriptor(
      name='needsSignature', full_name='UpdateCapabilitiesCommandMessage.Capability.needsSignature', index=3,
      number=233, type=8, cpp_type=7, label=1,
      has_default_value=False, default_value=False,
      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=237,
  serialized_end=438,
)

_UPDATECAPABILITIESCOMMANDMESSAGE = descriptor.Descriptor(
  name='UpdateCapabilitiesCommandMessage',
  full_name='UpdateCapabilitiesCommandMessage',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='capabilities', full_name='UpdateCapabilitiesCommandMessage.capabilities', index=0,
      number=234, 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=[_UPDATECAPABILITIESCOMMANDMESSAGE_NAME, _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER, _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY, ],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=30,
  serialized_end=438,
)

_UPDATECAPABILITIESCOMMANDMESSAGE_NAME.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.fields_by_name['commandPrefix'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_NAME
_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.fields_by_name['parameterDesc'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER
_UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY.containing_type = _UPDATECAPABILITIESCOMMANDMESSAGE;
_UPDATECAPABILITIESCOMMANDMESSAGE.fields_by_name['capabilities'].message_type = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY
DESCRIPTOR.message_types_by_name['UpdateCapabilitiesCommandMessage'] = _UPDATECAPABILITIESCOMMANDMESSAGE

class UpdateCapabilitiesCommandMessage(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType
  
  class Name(message.Message):
    __metaclass__ = reflection.GeneratedProtocolMessageType
    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_NAME
    
    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.Name)
  
  class CapabilitiesParameter(message.Message):
    __metaclass__ = reflection.GeneratedProtocolMessageType
    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITIESPARAMETER
    
    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.CapabilitiesParameter)
  
  class Capability(message.Message):
    __metaclass__ = reflection.GeneratedProtocolMessageType
    DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE_CAPABILITY
    
    # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage.Capability)
  DESCRIPTOR = _UPDATECAPABILITIESCOMMANDMESSAGE
  
  # @@protoc_insertion_point(class_scope:UpdateCapabilitiesCommandMessage)

# @@protoc_insertion_point(module_scope)
