Bundle constructor

Bundle({
  1. String? id,
  2. Meta? meta,
  3. List<Extension>? extension,
  4. List<Identifier>? identifier,
  5. bool? active,
  6. String? type,
  7. String? name,
  8. List<CodeableConcept>? code,
  9. List<Participant>? participant,
  10. List<Link>? link,
  11. List<Entry>? entry,
})

Constructs a new Bundle.

Implementation

Bundle({
  String? id,
  Meta? meta,
  List<Extension>? extension,
  List<Identifier>? identifier,
  bool? active,
  String? type,
  String? name,
  List<CodeableConcept>? code,
  List<Participant>? participant,
  List<Link>? link,
  List<Entry>? entry,
}) : this.fromJson(
        JsonObject({
          if (id != null) 'id': JsonString(id),
          if (meta != null) 'meta': meta.json,
          if (extension != null)
            'extension': JsonArray(extension.map((e) => e.json).toList()),
          if (identifier != null)
            'identifier': JsonArray(identifier.map((e) => e.json).toList()),
          if (active != null) 'active': JsonBoolean(active),
          if (type != null) 'type': JsonString(type),
          if (name != null) 'name': JsonString(name),
          if (code != null)
            'code': JsonArray(code.map((e) => e.json).toList()),
          if (participant != null)
            'participant': JsonArray(participant.map((e) => e.json).toList()),
          if (link != null)
            'link': JsonArray(link.map((e) => e.json).toList()),
          if (entry != null)
            'entry': JsonArray(entry.map((e) => e.json).toList()),
        }),
      );