private void initializeDataDisks() { if (this.inner().storageProfile().dataDisks() == null) { this.inner() .storageProfile() .withDataDisks(new ArrayList<DataDisk>()); } this.isUnmanagedDiskSelected = false; this.managedDataDisks.clear(); this.unmanagedDataDisks = new ArrayList<>(); if (!isManagedDiskEnabled()) { for (DataDisk dataDiskInner : this.storageProfile().dataDisks()) { this.unmanagedDataDisks.add(new UnmanagedDataDiskImpl(dataDiskInner, this)); } } }
private void initializeDataDisks() { if (this.inner().storageProfile().dataDisks() == null) { this.inner() .storageProfile() .withDataDisks(new ArrayList<DataDisk>()); } this.isUnmanagedDiskSelected = false; this.managedDataDisks.clear(); this.unmanagedDataDisks = new ArrayList<>(); if (!isManagedDiskEnabled()) { for (DataDisk dataDiskInner : this.storageProfile().dataDisks()) { this.unmanagedDataDisks.add(new UnmanagedDataDiskImpl(dataDiskInner, this)); } } }
@Override protected VirtualMachineImpl wrapModel(String name) { VirtualMachineInner inner = new VirtualMachineInner(); inner.withStorageProfile(new StorageProfile() .withOsDisk(new OSDisk()) .withDataDisks(new ArrayList<DataDisk>())); inner.withOsProfile(new OSProfile()); inner.withHardwareProfile(new HardwareProfile()); inner.withNetworkProfile(new NetworkProfile() .withNetworkInterfaces(new ArrayList<NetworkInterfaceReference>())); return new VirtualMachineImpl(name, inner, this.manager(), this.storageManager, this.networkManager, this.rbacManager); }
@Override protected VirtualMachineImpl wrapModel(String name) { VirtualMachineInner inner = new VirtualMachineInner(); inner.withStorageProfile(new StorageProfile() .withOsDisk(new OSDisk()) .withDataDisks(new ArrayList<DataDisk>())); inner.withOsProfile(new OSProfile()); inner.withHardwareProfile(new HardwareProfile()); inner.withNetworkProfile(new NetworkProfile() .withNetworkInterfaces(new ArrayList<NetworkInterfaceReference>())); return new VirtualMachineImpl(name, inner, this.manager(), this.storageManager, this.networkManager, this.rbacManager); }
if (isPending()) { if (vmInner.storageProfile().dataDisks() == null) { vmInner.storageProfile().withDataDisks(new ArrayList<DataDisk>()); vmInner.storageProfile().withDataDisks(null);
if (isPending()) { if (vmInner.storageProfile().dataDisks() == null) { vmInner.storageProfile().withDataDisks(new ArrayList<DataDisk>()); vmInner.storageProfile().withDataDisks(null);