UpdatePatchBaselineResult.fromJson constructor

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

Implementation

factory UpdatePatchBaselineResult.fromJson(Map<String, dynamic> json) {
  return UpdatePatchBaselineResult(
    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(),
    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(),
  );
}