OTAUpdateInfo.fromJson constructor
OTAUpdateInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
factory OTAUpdateInfo.fromJson(Map<String, dynamic> json) {
return OTAUpdateInfo(
additionalParameters:
(json['additionalParameters'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
awsIotJobArn: json['awsIotJobArn'] as String?,
awsIotJobId: json['awsIotJobId'] as String?,
awsJobExecutionsRolloutConfig:
json['awsJobExecutionsRolloutConfig'] != null
? AwsJobExecutionsRolloutConfig.fromJson(
json['awsJobExecutionsRolloutConfig'] as Map<String, dynamic>)
: null,
awsJobPresignedUrlConfig: json['awsJobPresignedUrlConfig'] != null
? AwsJobPresignedUrlConfig.fromJson(
json['awsJobPresignedUrlConfig'] as Map<String, dynamic>)
: null,
creationDate: timeStampFromJson(json['creationDate']),
description: json['description'] as String?,
errorInfo: json['errorInfo'] != null
? ErrorInfo.fromJson(json['errorInfo'] as Map<String, dynamic>)
: null,
lastModifiedDate: timeStampFromJson(json['lastModifiedDate']),
otaUpdateArn: json['otaUpdateArn'] as String?,
otaUpdateFiles: (json['otaUpdateFiles'] as List?)
?.whereNotNull()
.map((e) => OTAUpdateFile.fromJson(e as Map<String, dynamic>))
.toList(),
otaUpdateId: json['otaUpdateId'] as String?,
otaUpdateStatus:
(json['otaUpdateStatus'] as String?)?.toOTAUpdateStatus(),
protocols: (json['protocols'] as List?)
?.whereNotNull()
.map((e) => (e as String).toProtocol())
.toList(),
targetSelection:
(json['targetSelection'] as String?)?.toTargetSelection(),
targets: (json['targets'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
);
}