ImageBuilder.fromJson constructor
ImageBuilder.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ImageBuilder.fromJson(Map<String, dynamic> json) {
return ImageBuilder(
name: json['Name'] as String,
accessEndpoints: (json['AccessEndpoints'] as List?)
?.whereNotNull()
.map((e) => AccessEndpoint.fromJson(e as Map<String, dynamic>))
.toList(),
appstreamAgentVersion: json['AppstreamAgentVersion'] as String?,
arn: json['Arn'] as String?,
createdTime: timeStampFromJson(json['CreatedTime']),
description: json['Description'] as String?,
displayName: json['DisplayName'] as String?,
domainJoinInfo: json['DomainJoinInfo'] != null
? DomainJoinInfo.fromJson(
json['DomainJoinInfo'] as Map<String, dynamic>)
: null,
enableDefaultInternetAccess: json['EnableDefaultInternetAccess'] as bool?,
iamRoleArn: json['IamRoleArn'] as String?,
imageArn: json['ImageArn'] as String?,
imageBuilderErrors: (json['ImageBuilderErrors'] as List?)
?.whereNotNull()
.map((e) => ResourceError.fromJson(e as Map<String, dynamic>))
.toList(),
instanceType: json['InstanceType'] as String?,
networkAccessConfiguration: json['NetworkAccessConfiguration'] != null
? NetworkAccessConfiguration.fromJson(
json['NetworkAccessConfiguration'] as Map<String, dynamic>)
: null,
platform: (json['Platform'] as String?)?.toPlatformType(),
state: (json['State'] as String?)?.toImageBuilderState(),
stateChangeReason: json['StateChangeReason'] != null
? ImageBuilderStateChangeReason.fromJson(
json['StateChangeReason'] as Map<String, dynamic>)
: null,
vpcConfig: json['VpcConfig'] != null
? VpcConfig.fromJson(json['VpcConfig'] as Map<String, dynamic>)
: null,
);
}