Version.fromJson constructor

Version.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Version.fromJson(Map<String, dynamic> json) {
  return Version(
    applicationId: json['applicationId'] as String,
    creationTime: json['creationTime'] as String,
    parameterDefinitions: (json['parameterDefinitions'] as List)
        .whereNotNull()
        .map((e) => ParameterDefinition.fromJson(e as Map<String, dynamic>))
        .toList(),
    requiredCapabilities: (json['requiredCapabilities'] as List)
        .whereNotNull()
        .map((e) => (e as String).toCapability())
        .toList(),
    resourcesSupported: json['resourcesSupported'] as bool,
    semanticVersion: json['semanticVersion'] as String,
    templateUrl: json['templateUrl'] as String,
    sourceCodeArchiveUrl: json['sourceCodeArchiveUrl'] as String?,
    sourceCodeUrl: json['sourceCodeUrl'] as String?,
  );
}