toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var ari = this.ari;
  var id = this.id;
  var name = this.name;
  var elapsedTime = this.elapsedTime;
  var percentageComplete = this.percentageComplete;
  var successful = this.successful;
  var finished = this.finished;
  var messages = this.messages;
  var status = this.status;
  var errors = this.errors;
  var additionalDetails = this.additionalDetails;

  final json = <String, Object?>{};
  if (ari != null) {
    json[r'ari'] = ari;
  }
  json[r'id'] = id;
  json[r'name'] = name.toJson();
  json[r'elapsedTime'] = elapsedTime;
  json[r'percentageComplete'] = percentageComplete;
  json[r'successful'] = successful;
  json[r'finished'] = finished;
  json[r'messages'] = messages.map((i) => i.toJson()).toList();
  if (status != null) {
    json[r'status'] = status;
  }
  json[r'errors'] = errors.map((i) => i.toJson()).toList();
  if (additionalDetails != null) {
    json[r'additionalDetails'] = additionalDetails.toJson();
  }
  return json;
}