Map<String, dynamic> toJson() { final Map<String, dynamic> data = <String, dynamic>{}; data['code'] = code; data['type'] = type; return data; }