Map<String, Object?> toJson() { var number = this.number; var units = this.units; final json = <String, Object?>{}; json[r'number'] = number; json[r'units'] = units.value; return json; }