SecurityScheme.fromJson constructor

SecurityScheme.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory SecurityScheme.fromJson(Map<String, Object?> json) {
  return SecurityScheme(
    defaultSecurityLevelId:
        (json[r'defaultSecurityLevelId'] as num?)?.toInt(),
    description: json[r'description'] as String?,
    id: (json[r'id'] as num?)?.toInt(),
    levels: (json[r'levels'] as List<Object?>?)
            ?.map((i) => SecurityLevel.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    name: json[r'name'] as String?,
    self: json[r'self'] as String?,
  );
}