code: def __parameter_enum(self, param):
      
      if isinstance(param, messages.EnumField):
        return [enum_entry[0] for enum_entry in sorted(
            param.type.to_dict().items(), key=lambda v: v[1])]
docs: Returns enum descriptor of a parameter if it is an enum.
  
      An enum descriptor is a list of keys.
  
      Args:
        param: A simple field.
  
      Returns:
        The enum descriptor for the field, if it's an enum descriptor, else
            returns None.