BlueprintTemplate.fromJson constructor
Implementation
factory BlueprintTemplate.fromJson(Map<String, Object?> json) {
return BlueprintTemplate(
templateId: json[r'templateId'] as String? ?? '',
originalTemplate: BlueprintTemplateOriginalTemplate.fromJson(
json[r'originalTemplate'] as Map<String, Object?>? ?? const {}),
referencingBlueprint: json[r'referencingBlueprint'] as String? ?? '',
name: json[r'name'] as String? ?? '',
description: json[r'description'] as String? ?? '',
space: json[r'space'] as Map<String, Object?>?,
labels: (json[r'labels'] as List<Object?>?)
?.map(
(i) => Label.fromJson(i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
templateType: json[r'templateType'] as String? ?? '',
editorVersion: json[r'editorVersion'] as String?,
body: json[r'body'] != null
? ContentTemplateBody.fromJson(json[r'body']! as Map<String, Object?>)
: null,
expandable: json[r'_expandable'] != null
? BlueprintTemplateExpandable.fromJson(
json[r'_expandable']! as Map<String, Object?>)
: null,
links: GenericLinks.fromJson(
json[r'_links'] as Map<String, Object?>? ?? const {}),
);
}