toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var defaultSecurityLevelId = this.defaultSecurityLevelId;
  var description = this.description;
  var id = this.id;
  var levels = this.levels;
  var name = this.name;
  var self = this.self;

  final json = <String, Object?>{};
  if (defaultSecurityLevelId != null) {
    json[r'defaultSecurityLevelId'] = defaultSecurityLevelId;
  }
  if (description != null) {
    json[r'description'] = description;
  }
  if (id != null) {
    json[r'id'] = id;
  }
  json[r'levels'] = levels.map((i) => i.toJson()).toList();
  if (name != null) {
    json[r'name'] = name;
  }
  if (self != null) {
    json[r'self'] = self;
  }
  return json;
}