Patch.fromJson constructor

Patch.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Patch.fromJson(Map<String, dynamic> json) {
  return Patch(
    advisoryIds: (json['AdvisoryIds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    arch: json['Arch'] as String?,
    bugzillaIds: (json['BugzillaIds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    cVEIds: (json['CVEIds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    classification: json['Classification'] as String?,
    contentUrl: json['ContentUrl'] as String?,
    description: json['Description'] as String?,
    epoch: json['Epoch'] as int?,
    id: json['Id'] as String?,
    kbNumber: json['KbNumber'] as String?,
    language: json['Language'] as String?,
    msrcNumber: json['MsrcNumber'] as String?,
    msrcSeverity: json['MsrcSeverity'] as String?,
    name: json['Name'] as String?,
    product: json['Product'] as String?,
    productFamily: json['ProductFamily'] as String?,
    release: json['Release'] as String?,
    releaseDate: timeStampFromJson(json['ReleaseDate']),
    repository: json['Repository'] as String?,
    severity: json['Severity'] as String?,
    title: json['Title'] as String?,
    vendor: json['Vendor'] as String?,
    version: json['Version'] as String?,
  );
}