toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (this.id != null) {
    json[r'id'] = this.id;
  } else {
    json[r'id'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
  if (this.value != null) {
    json[r'value'] = this.value;
  } else {
    json[r'value'] = null;
  }
  if (this.unit != null) {
    json[r'unit'] = this.unit;
  } else {
    json[r'unit'] = null;
  }
  if (this.measured != null) {
    json[r'measured'] = this.measured;
  } else {
    json[r'measured'] = null;
  }
  if (this.source_ != null) {
    json[r'source'] = this.source_;
  } else {
    json[r'source'] = null;
  }
  if (this.historyAvailable != null) {
    json[r'history_available'] = this.historyAvailable;
  } else {
    json[r'history_available'] = null;
  }
  if (this.asOf != null) {
    json[r'as_of'] = this.asOf;
  } else {
    json[r'as_of'] = null;
  }
  if (this.note != null) {
    json[r'note'] = this.note;
  } else {
    json[r'note'] = null;
  }
    json[r'recent_history'] = this.recentHistory;
    json[r'history'] = this.history;
  return json;
}