toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var name = this.name;
  var icon = this.icon;
  var identifiers = this.identifiers;
  var description = this.description;
  var homepage = this.homepage;
  var type = this.type;
  var metadata = this.metadata;
  var operations = this.operations;
  var permissions = this.permissions;
  var status = this.status;
  var settings = this.settings;
  var theme = this.theme;
  var lookAndFeel = this.lookAndFeel;
  var history = this.history;
  var key = this.key;
  var links = this.links;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (icon != null) {
    json[r'icon'] = icon.toJson();
  }
  if (identifiers != null) {
    json[r'identifiers'] = identifiers.toJson();
  }
  if (description != null) {
    json[r'description'] = description.toJson();
  }
  if (homepage != null) {
    json[r'homepage'] = homepage.toJson();
  }
  if (type != null) {
    json[r'type'] = type;
  }
  if (metadata != null) {
    json[r'metadata'] = metadata.toJson();
  }
  json[r'operations'] = operations.map((i) => i.toJson()).toList();
  json[r'permissions'] = permissions.map((i) => i.toJson()).toList();
  if (status != null) {
    json[r'status'] = status;
  }
  if (settings != null) {
    json[r'settings'] = settings.toJson();
  }
  if (theme != null) {
    json[r'theme'] = theme.toJson();
  }
  if (lookAndFeel != null) {
    json[r'lookAndFeel'] = lookAndFeel.toJson();
  }
  if (history != null) {
    json[r'history'] = history.toJson();
  }
  json[r'key'] = key;
  if (links != null) {
    json[r'links'] = links;
  }
  return json;
}