toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var key = this.key;
  var name = this.name;
  var description = this.description;
  var permissions = this.permissions;

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