Map<String, dynamic> toWire() => { 'generation': generation, 'commands': commands.map((c) => c.toWire()).toList(), };