def METHOD_NAME(self, rule):
    return {
        'id': rule.id,
        'row_number': rule.row_number,
        'description': rule.description,
        'input_entries': [self.input_entry_to_dict(entry) for entry in rule.inputEntries],
        'output_entries': [self.output_entry_to_dict(entry) for entry in rule.outputEntries],
    }