Map<String, dynamic> toJson() { final functionArn = this.functionArn; final payload = this.payload; return { 'functionArn': functionArn, if (payload != null) 'payload': payload, }; }