internal static EncryptionImages DeserializeEncryptionImages(JsonElement element) { Optional <OSDiskImageEncryption> osDiskImage = default; Optional <IList <DataDiskImageEncryption> > dataDiskImages = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("osDiskImage")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } osDiskImage = OSDiskImageEncryption.DeserializeOSDiskImageEncryption(property.Value); continue; } if (property.NameEquals("dataDiskImages")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <DataDiskImageEncryption> array = new List <DataDiskImageEncryption>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(DataDiskImageEncryption.DeserializeDataDiskImageEncryption(item)); } dataDiskImages = array; continue; } } return(new EncryptionImages(osDiskImage.Value, Optional.ToList(dataDiskImages))); }
internal EncryptionImages(OSDiskImageEncryption osDiskImage, IList <DataDiskImageEncryption> dataDiskImages) { OSDiskImage = osDiskImage; DataDiskImages = dataDiskImages; }