toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var links = this.links;
  var approvers = this.approvers;
  var canAnswerApproval = this.canAnswerApproval;
  var completedDate = this.completedDate;
  var createdDate = this.createdDate;
  var finalDecision = this.finalDecision;
  var id = this.id;
  var name = this.name;

  final json = <String, Object?>{};
  if (links != null) {
    json[r'_links'] = links.toJson();
  }
  json[r'approvers'] = approvers.map((i) => i.toJson()).toList();
  json[r'canAnswerApproval'] = canAnswerApproval;
  if (completedDate != null) {
    json[r'completedDate'] = completedDate.toJson();
  }
  if (createdDate != null) {
    json[r'createdDate'] = createdDate.toJson();
  }
  if (finalDecision != null) {
    json[r'finalDecision'] = finalDecision.value;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  return json;
}