def _AddEnumValues(descriptor, cls):
for enum_type in descriptor.enum_types:<EOL><INDENT>setattr(cls, enum_type.name, enum_type_wrapper.EnumTypeWrapper(enum_type))<EOL>for enum_value in enum_type.values:<EOL><INDENT>setattr(cls, enum_value.name, enum_value.number)<EOL><DEDENT><DEDENT>
Sets class-level attributes for all enum fields defined in this message.

    Also exporting a class-level object that can name enum values.

    Args:
      descriptor: Descriptor object for this message type.
      cls: Class we're constructing for this message type.