toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var name = this.name;
  var type = this.type;
  var filterId = this.filterId;
  var location = this.location;

  final json = <String, Object?>{};
  if (name != null) {
    json[r'name'] = name;
  }
  if (type != null) {
    json[r'type'] = type.value;
  }
  if (filterId != null) {
    json[r'filterId'] = filterId;
  }
  if (location != null) {
    json[r'location'] = location.toJson();
  }
  return json;
}