ContentCreateSpace.fromJson constructor
Implementation
factory ContentCreateSpace.fromJson(Map<String, Object?> json) {
return ContentCreateSpace(
id: (json[r'id'] as num?)?.toInt(),
name: json[r'name'] as String?,
icon: json[r'icon'] != null
? Icon.fromJson(json[r'icon']! as Map<String, Object?>)
: null,
identifiers: json[r'identifiers'] != null
? GlobalSpaceIdentifier.fromJson(
json[r'identifiers']! as Map<String, Object?>)
: null,
description: json[r'description'] != null
? ContentCreateSpaceDescription.fromJson(
json[r'description']! as Map<String, Object?>)
: null,
homepage: json[r'homepage'] != null
? Content.fromJson(json[r'homepage']! as Map<String, Object?>)
: null,
type: json[r'type'] as String?,
metadata: json[r'metadata'] != null
? ContentCreateSpaceMetadata.fromJson(
json[r'metadata']! as Map<String, Object?>)
: null,
operations: (json[r'operations'] as List<Object?>?)
?.map((i) => OperationCheckResult.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
permissions: (json[r'permissions'] as List<Object?>?)
?.map((i) => SpacePermission.fromJson(
i as Map<String, Object?>? ?? const {}))
.toList() ??
[],
status: json[r'status'] as String?,
settings: json[r'settings'] != null
? SpaceSettings.fromJson(json[r'settings']! as Map<String, Object?>)
: null,
theme: json[r'theme'] != null
? Theme.fromJson(json[r'theme']! as Map<String, Object?>)
: null,
lookAndFeel: json[r'lookAndFeel'] != null
? LookAndFeel.fromJson(json[r'lookAndFeel']! as Map<String, Object?>)
: null,
history: json[r'history'] != null
? ContentCreateSpaceHistory.fromJson(
json[r'history']! as Map<String, Object?>)
: null,
key: json[r'key'] as String? ?? '',
links: json[r'links'] as Map<String, Object?>?,
);
}