ProblemReport constructor

ProblemReport({
  1. String? id,
  2. required String parentThreadId,
  3. List<String>? ack,
  4. required String code,
  5. String? comment,
  6. List<String>? args,
  7. String? escalateTo,
  8. String? replyUrl,
  9. List<String>? replyTo,
  10. String? threadId,
  11. String? from,
  12. List<String>? to,
  13. DateTime? createdTime,
  14. DateTime? expiresTime,
  15. bool pleaseAck = false,
  16. FromPriorJWT? fromPrior,
  17. Map<String, dynamic>? additionalHeaders,
  18. DidcommMessageTyp? typ,
  19. WebRedirect? webRedirect,
  20. ReturnRouteValue? returnRoute,
})

Implementation

ProblemReport({
  String? id,
  required String super.parentThreadId,
  super.ack,
  required this.code,
  this.comment,
  this.args,
  this.escalateTo,
  super.replyUrl,
  super.replyTo,
  super.threadId,
  super.from,
  List<String>? super.to,
  super.createdTime,
  super.expiresTime,
  super.pleaseAck,
  super.fromPrior,
  super.additionalHeaders,
  super.typ,
  super.webRedirect,
  super.returnRoute,
}) : super(
          id: id ?? Uuid().v4(),
          type: DidcommMessages.problemReport,
          body: {}) {
  body['code'] = code;
  if (comment != null) body['comment'] = comment;
  if (args != null) body['args'] = args;
  if (escalateTo != null) body['escalated_to'] = escalateTo;
}