internal static VirtualMachinePatchStatus DeserializeVirtualMachinePatchStatus(JsonElement element)
        {
            Optional <AvailablePatchSummary>               availablePatchSummary        = default;
            Optional <LastPatchInstallationSummary>        lastPatchInstallationSummary = default;
            Optional <IReadOnlyList <InstanceViewStatus> > configurationStatuses        = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("availablePatchSummary"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    availablePatchSummary = AvailablePatchSummary.DeserializeAvailablePatchSummary(property.Value);
                    continue;
                }
                if (property.NameEquals("lastPatchInstallationSummary"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    lastPatchInstallationSummary = LastPatchInstallationSummary.DeserializeLastPatchInstallationSummary(property.Value);
                    continue;
                }
                if (property.NameEquals("configurationStatuses"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <InstanceViewStatus> array = new List <InstanceViewStatus>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(InstanceViewStatus.DeserializeInstanceViewStatus(item));
                    }
                    configurationStatuses = array;
                    continue;
                }
            }
            return(new VirtualMachinePatchStatus(availablePatchSummary.Value, lastPatchInstallationSummary.Value, Optional.ToList(configurationStatuses)));
        }
 internal VirtualMachinePatchStatus(AvailablePatchSummary availablePatchSummary, LastPatchInstallationSummary lastPatchInstallationSummary, IReadOnlyList <InstanceViewStatus> configurationStatuses)
 {
     AvailablePatchSummary        = availablePatchSummary;
     LastPatchInstallationSummary = lastPatchInstallationSummary;
     ConfigurationStatuses        = configurationStatuses;
 }