Detector.fromJson constructor

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

Implementation

factory Detector.fromJson(Map<String, dynamic> json) {
  return Detector(
    creationTime: timeStampFromJson(json['creationTime']),
    detectorModelName: json['detectorModelName'] as String?,
    detectorModelVersion: json['detectorModelVersion'] as String?,
    keyValue: json['keyValue'] as String?,
    lastUpdateTime: timeStampFromJson(json['lastUpdateTime']),
    state: json['state'] != null
        ? DetectorState.fromJson(json['state'] as Map<String, dynamic>)
        : null,
  );
}