toJson method

Map<String, Object?> toJson()

Implementation

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

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