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