GetPatchBaselineResult.fromJson constructor

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

Implementation

factory GetPatchBaselineResult.fromJson(Map<String, dynamic> json) {
  return GetPatchBaselineResult(
    approvalRules: json['ApprovalRules'] != null
        ? PatchRuleGroup.fromJson(
            json['ApprovalRules'] as Map<String, dynamic>)
        : null,
    approvedPatches: (json['ApprovedPatches'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    approvedPatchesComplianceLevel:
        (json['ApprovedPatchesComplianceLevel'] as String?)
            ?.toPatchComplianceLevel(),
    approvedPatchesEnableNonSecurity:
        json['ApprovedPatchesEnableNonSecurity'] as bool?,
    baselineId: json['BaselineId'] as String?,
    createdDate: timeStampFromJson(json['CreatedDate']),
    description: json['Description'] as String?,
    globalFilters: json['GlobalFilters'] != null
        ? PatchFilterGroup.fromJson(
            json['GlobalFilters'] as Map<String, dynamic>)
        : null,
    modifiedDate: timeStampFromJson(json['ModifiedDate']),
    name: json['Name'] as String?,
    operatingSystem:
        (json['OperatingSystem'] as String?)?.toOperatingSystem(),
    patchGroups: (json['PatchGroups'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    rejectedPatches: (json['RejectedPatches'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    rejectedPatchesAction:
        (json['RejectedPatchesAction'] as String?)?.toPatchAction(),
    sources: (json['Sources'] as List?)
        ?.whereNotNull()
        .map((e) => PatchSource.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}