StorageVersionStatus.fromJson constructor
Creates a StorageVersionStatus from JSON data.
Implementation
factory StorageVersionStatus.fromJson(Map<String, dynamic> json) {
final tempCommonEncodingVersionJson = json['commonEncodingVersion'];
final tempConditionsJson = json['conditions'];
final tempStorageVersionsJson = json['storageVersions'];
final String? tempCommonEncodingVersion = tempCommonEncodingVersionJson;
final List<StorageVersionCondition>? tempConditions =
tempConditionsJson != null
? List<dynamic>.from(tempConditionsJson)
.map(
(e) => StorageVersionCondition.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
final List<ServerStorageVersion>? tempStorageVersions =
tempStorageVersionsJson != null
? List<dynamic>.from(tempStorageVersionsJson)
.map(
(e) => ServerStorageVersion.fromJson(
Map<String, dynamic>.from(e),
),
)
.toList()
: null;
return StorageVersionStatus(
commonEncodingVersion: tempCommonEncodingVersion,
conditions: tempConditions,
storageVersions: tempStorageVersions,
);
}