SecuritySchemeWithProjects.fromJson constructor

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

Implementation

factory SecuritySchemeWithProjects.fromJson(Map<String, Object?> json) {
  return SecuritySchemeWithProjects(
    defaultLevel: (json[r'defaultLevel'] as num?)?.toInt(),
    description: json[r'description'] as String?,
    id: (json[r'id'] as num?)?.toInt() ?? 0,
    name: json[r'name'] as String? ?? '',
    projectIds: (json[r'projectIds'] as List<Object?>?)
            ?.map((i) => (i as num?)?.toInt() ?? 0)
            .toList() ??
        [],
    self: json[r'self'] as String? ?? '',
  );
}