Map<String, dynamic> toJson() { final partyName = this.partyName; final nameAssigner = this.nameAssigner; return { 'PartyName': partyName, if (nameAssigner != null) 'NameAssigner': nameAssigner, }; }