toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var type = this.type;
  var watcher = this.watcher;
  var spaceKey = this.spaceKey;
  var labelName = this.labelName;
  var prefix = this.prefix;

  final json = <String, Object?>{};
  json[r'type'] = type;
  json[r'watcher'] = watcher.toJson();
  if (spaceKey != null) {
    json[r'spaceKey'] = spaceKey;
  }
  if (labelName != null) {
    json[r'labelName'] = labelName;
  }
  if (prefix != null) {
    json[r'prefix'] = prefix;
  }
  return json;
}