@override Object toJson() { return { 'contents': encodeList(contents), if (searchKeyGenerationMethod != null) 'searchKeyGenerationMethod': searchKeyGenerationMethod!.toJson(), }; }