WorkspaceImage.fromJson constructor
WorkspaceImage.fromJson(
- Map<String, dynamic> json
)
Implementation
factory WorkspaceImage.fromJson(Map<String, dynamic> json) {
return WorkspaceImage(
created: timeStampFromJson(json['Created']),
description: json['Description'] as String?,
errorCode: json['ErrorCode'] as String?,
errorMessage: json['ErrorMessage'] as String?,
imageId: json['ImageId'] as String?,
name: json['Name'] as String?,
operatingSystem: json['OperatingSystem'] != null
? OperatingSystem.fromJson(
json['OperatingSystem'] as Map<String, dynamic>)
: null,
ownerAccountId: json['OwnerAccountId'] as String?,
requiredTenancy: (json['RequiredTenancy'] as String?)
?.toWorkspaceImageRequiredTenancy(),
state: (json['State'] as String?)?.toWorkspaceImageState(),
);
}