Implementation
Map<String, dynamic> get asMap {
final map = {
'metric': name,
'points': value,
'type': typeAsString,
'host': host,
};
if (interval != null) {
map['interval'] = interval;
}
if (tags != null && tags!.isNotEmpty) {
map['tags'] = tags;
}
return map;
}