DeviceSummary.fromJson constructor

DeviceSummary.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DeviceSummary.fromJson(Map<String, dynamic> json) {
  return DeviceSummary(
    deviceArn: json['DeviceArn'] as String,
    deviceName: json['DeviceName'] as String,
    description: json['Description'] as String?,
    deviceFleetName: json['DeviceFleetName'] as String?,
    iotThingName: json['IotThingName'] as String?,
    latestHeartbeat: timeStampFromJson(json['LatestHeartbeat']),
    models: (json['Models'] as List?)
        ?.whereNotNull()
        .map((e) => EdgeModelSummary.fromJson(e as Map<String, dynamic>))
        .toList(),
    registrationTime: timeStampFromJson(json['RegistrationTime']),
  );
}