toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.unit != null) {
json[r'unit'] = this.unit;
} else {
json[r'unit'] = null;
}
if (this.channel != null) {
json[r'channel'] = this.channel;
} else {
json[r'channel'] = null;
}
if (this.lastValue != null) {
json[r'lastValue'] = this.lastValue;
} else {
json[r'lastValue'] = null;
}
if (this.lastValueTime != null) {
json[r'lastValueTime'] = this.lastValueTime!.toUtc().toIso8601String();
} else {
json[r'lastValueTime'] = null;
}
if (this.lastValueOriginalTime != null) {
json[r'lastValueOriginalTime'] = this.lastValueOriginalTime!.toUtc().toIso8601String();
} else {
json[r'lastValueOriginalTime'] = null;
}
return json;
}