DirectoryDescription.fromJson constructor
DirectoryDescription.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DirectoryDescription.fromJson(Map<String, dynamic> json) {
return DirectoryDescription(
accessUrl: json['AccessUrl'] as String?,
alias: json['Alias'] as String?,
connectSettings: json['ConnectSettings'] != null
? DirectoryConnectSettingsDescription.fromJson(
json['ConnectSettings'] as Map<String, dynamic>)
: null,
description: json['Description'] as String?,
desiredNumberOfDomainControllers:
json['DesiredNumberOfDomainControllers'] as int?,
directoryId: json['DirectoryId'] as String?,
dnsIpAddrs: (json['DnsIpAddrs'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
edition: (json['Edition'] as String?)?.toDirectoryEdition(),
launchTime: timeStampFromJson(json['LaunchTime']),
name: json['Name'] as String?,
ownerDirectoryDescription: json['OwnerDirectoryDescription'] != null
? OwnerDirectoryDescription.fromJson(
json['OwnerDirectoryDescription'] as Map<String, dynamic>)
: null,
radiusSettings: json['RadiusSettings'] != null
? RadiusSettings.fromJson(
json['RadiusSettings'] as Map<String, dynamic>)
: null,
radiusStatus: (json['RadiusStatus'] as String?)?.toRadiusStatus(),
regionsInfo: json['RegionsInfo'] != null
? RegionsInfo.fromJson(json['RegionsInfo'] as Map<String, dynamic>)
: null,
shareMethod: (json['ShareMethod'] as String?)?.toShareMethod(),
shareNotes: json['ShareNotes'] as String?,
shareStatus: (json['ShareStatus'] as String?)?.toShareStatus(),
shortName: json['ShortName'] as String?,
size: (json['Size'] as String?)?.toDirectorySize(),
ssoEnabled: json['SsoEnabled'] as bool?,
stage: (json['Stage'] as String?)?.toDirectoryStage(),
stageLastUpdatedDateTime:
timeStampFromJson(json['StageLastUpdatedDateTime']),
stageReason: json['StageReason'] as String?,
type: (json['Type'] as String?)?.toDirectoryType(),
vpcSettings: json['VpcSettings'] != null
? DirectoryVpcSettingsDescription.fromJson(
json['VpcSettings'] as Map<String, dynamic>)
: null,
);
}