toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = this.id;
json[r'name'] = this.name;
json[r'state'] = this.state;
if (this.website != null) {
json[r'website'] = this.website;
} else {
json[r'website'] = null;
}
if (this.widthMm != null) {
json[r'width_mm'] = this.widthMm;
} else {
json[r'width_mm'] = null;
}
if (this.heightMm != null) {
json[r'height_mm'] = this.heightMm;
} else {
json[r'height_mm'] = null;
}
if (this.depthMm != null) {
json[r'depth_mm'] = this.depthMm;
} else {
json[r'depth_mm'] = null;
}
if (this.model != null) {
json[r'model'] = this.model;
} else {
json[r'model'] = null;
}
json[r'created'] = this.created.toUtc().toIso8601String();
json[r'modified'] = this.modified.toUtc().toIso8601String();
json[r'files'] = this.files;
json[r'comments'] = this.comments;
return json;
}