toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var name = this.name;
  var parentId = this.parentId;
  var parentName = this.parentName;
  var typeName = this.typeName;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (parentId != null) {
    json[r'parentId'] = parentId;
  }
  if (parentName != null) {
    json[r'parentName'] = parentName;
  }
  if (typeName != null) {
    json[r'typeName'] = typeName;
  }
  return json;
}