internal static CustomPersistentDiskData DeserializeCustomPersistentDiskData(JsonElement element) { Optional <CustomPersistentDiskProperties> customPersistentDiskProperties = default; string storageId = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("customPersistentDiskProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } customPersistentDiskProperties = CustomPersistentDiskProperties.DeserializeCustomPersistentDiskProperties(property.Value); continue; } if (property.NameEquals("storageId")) { storageId = property.Value.GetString(); continue; } } return(new CustomPersistentDiskData(customPersistentDiskProperties.Value, storageId)); }
internal CustomPersistentDiskData(CustomPersistentDiskProperties customPersistentDiskProperties, string storageId) { CustomPersistentDiskProperties = customPersistentDiskProperties; StorageId = storageId; }