Workspace.fromJson constructor
Workspace.fromJson(
- Map<String, dynamic> json
)
Implementation
factory Workspace.fromJson(Map<String, dynamic> json) {
return Workspace(
bundleId: json['BundleId'] as String?,
computerName: json['ComputerName'] as String?,
directoryId: json['DirectoryId'] as String?,
errorCode: json['ErrorCode'] as String?,
errorMessage: json['ErrorMessage'] as String?,
ipAddress: json['IpAddress'] as String?,
modificationStates: (json['ModificationStates'] as List?)
?.whereNotNull()
.map((e) => ModificationState.fromJson(e as Map<String, dynamic>))
.toList(),
rootVolumeEncryptionEnabled: json['RootVolumeEncryptionEnabled'] as bool?,
state: (json['State'] as String?)?.toWorkspaceState(),
subnetId: json['SubnetId'] as String?,
userName: json['UserName'] as String?,
userVolumeEncryptionEnabled: json['UserVolumeEncryptionEnabled'] as bool?,
volumeEncryptionKey: json['VolumeEncryptionKey'] as String?,
workspaceId: json['WorkspaceId'] as String?,
workspaceProperties: json['WorkspaceProperties'] != null
? WorkspaceProperties.fromJson(
json['WorkspaceProperties'] as Map<String, dynamic>)
: null,
);
}