toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var name = this.name;
  var statuses = this.statuses;
  var min = this.min;
  var max = this.max;

  final json = <String, Object?>{};
  if (name != null) {
    json[r'name'] = name;
  }
  json[r'statuses'] = statuses.map((i) => i.toJson()).toList();
  if (min != null) {
    json[r'min'] = min;
  }
  if (max != null) {
    json[r'max'] = max;
  }
  return json;
}