toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var automaticRefreshMs = this.automaticRefreshMs;
  var description = this.description;
  var editPermissions = this.editPermissions;
  var id = this.id;
  var isFavourite = this.isFavourite;
  var isWritable = this.isWritable;
  var name = this.name;
  var owner = this.owner;
  var popularity = this.popularity;
  var rank = this.rank;
  var self = this.self;
  var sharePermissions = this.sharePermissions;
  var systemDashboard = this.systemDashboard;
  var view = this.view;

  final json = <String, Object?>{};
  if (automaticRefreshMs != null) {
    json[r'automaticRefreshMs'] = automaticRefreshMs;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  json[r'editPermissions'] = editPermissions.map((i) => i.toJson()).toList();
  if (id != null) {
    json[r'id'] = id;
  }
  json[r'isFavourite'] = isFavourite;
  json[r'isWritable'] = isWritable;
  if (name != null) {
    json[r'name'] = name;
  }
  if (owner != null) {
    json[r'owner'] = owner.toJson();
  }
  if (popularity != null) {
    json[r'popularity'] = popularity;
  }
  if (rank != null) {
    json[r'rank'] = rank;
  }
  if (self != null) {
    json[r'self'] = self;
  }
  json[r'sharePermissions'] =
      sharePermissions.map((i) => i.toJson()).toList();
  json[r'systemDashboard'] = systemDashboard;
  if (view != null) {
    json[r'view'] = view;
  }
  return json;
}