DeviceType.fromJson constructor

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

Implementation

factory DeviceType.fromJson(Map<String, dynamic> json) {
  return DeviceType(
    deviceAttributes: (json['DeviceAttributes'] as List?)
        ?.whereNotNull()
        .map((e) => AttributeType.fromJson(e as Map<String, dynamic>))
        .toList(),
    deviceCreateDate: timeStampFromJson(json['DeviceCreateDate']),
    deviceKey: json['DeviceKey'] as String?,
    deviceLastAuthenticatedDate:
        timeStampFromJson(json['DeviceLastAuthenticatedDate']),
    deviceLastModifiedDate: timeStampFromJson(json['DeviceLastModifiedDate']),
  );
}