Map<String, dynamic> toJson() { return { 'sequence': sequence, 'block_identifier': blockIdentifier.toJson(), 'type': type, }..removeWhere((key, value) => value == null); }