@Override public VirtualMachineImpl withWinRM(WinRMListener listener) { if (this.inner().osProfile().windowsConfiguration().winRM() == null) { WinRMConfiguration winRMConfiguration = new WinRMConfiguration(); this.inner().osProfile().windowsConfiguration().withWinRM(winRMConfiguration); } this.inner().osProfile() .windowsConfiguration() .winRM() .listeners() .add(listener); return this; }
@Override public VirtualMachineImpl withoutAutoUpdate() { this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(false); return this; }
@Override public VirtualMachineImpl withoutVMAgent() { this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(false); return this; }
@Override public VirtualMachineImpl withSpecificWindowsImageVersion(ImageReference imageReference) { this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE); this.inner().storageProfile().withImageReference(imageReference); this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration()); // sets defaults for "Stored(User)Image" or "VM(Platform)Image" this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true); this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true); return this; }
@Override public VirtualMachineImpl withTimeZone(String timeZone) { this.inner().osProfile().windowsConfiguration().withTimeZone(timeZone); return this; }
@Override public boolean isWindowsAutoUpdateEnabled() { if (this.inner().osProfile().windowsConfiguration() != null) { return Utils.toPrimitiveBoolean(this.inner().osProfile().windowsConfiguration().enableAutomaticUpdates()); } return false; }
@Override public String windowsTimeZone() { if (this.inner().osProfile().windowsConfiguration() != null) { return this.inner().osProfile().windowsConfiguration().timeZone(); } return null; }
@Override public boolean isWindowsVMAgentProvisioned() { if (this.inner().osProfile().windowsConfiguration() != null) { return Utils.toPrimitiveBoolean(this.inner().osProfile().windowsConfiguration().provisionVMAgent()); } return false; }
@Override public VirtualMachineImpl withSpecificWindowsImageVersion(ImageReference imageReference) { this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE); this.inner().storageProfile().withImageReference(imageReference); this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration()); // sets defaults for "Stored(User)Image" or "VM(Platform)Image" this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true); this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true); return this; }
@Override public VirtualMachineImpl withTimeZone(String timeZone) { this.inner().osProfile().windowsConfiguration().withTimeZone(timeZone); return this; }
@Override public boolean isWindowsAutoUpdateEnabled() { if (this.inner().osProfile().windowsConfiguration() != null) { return Utils.toPrimitiveBoolean(this.inner().osProfile().windowsConfiguration().enableAutomaticUpdates()); } return false; }
@Override public String windowsTimeZone() { if (this.inner().osProfile().windowsConfiguration() != null) { return this.inner().osProfile().windowsConfiguration().timeZone(); } return null; }
@Override public boolean isWindowsVMAgentProvisioned() { if (this.inner().osProfile().windowsConfiguration() != null) { return Utils.toPrimitiveBoolean(this.inner().osProfile().windowsConfiguration().provisionVMAgent()); } return false; }
@Override public VirtualMachineImpl withWindowsCustomImage(String customImageId) { ImageReference imageReferenceInner = new ImageReference(); imageReferenceInner.withId(customImageId); this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE); this.inner().storageProfile().withImageReference(imageReferenceInner); this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration()); // sets defaults for "Stored(User)Image", "VM(Platform | Custom | Gallery)Image" this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true); this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true); return this; }
@Override public VirtualMachineImpl withWinRM(WinRMListener listener) { if (this.inner().osProfile().windowsConfiguration().winRM() == null) { WinRMConfiguration winRMConfiguration = new WinRMConfiguration(); this.inner().osProfile().windowsConfiguration().withWinRM(winRMConfiguration); } this.inner().osProfile() .windowsConfiguration() .winRM() .listeners() .add(listener); return this; }
@Override public VirtualMachineImpl withoutAutoUpdate() { this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(false); return this; }
@Override public VirtualMachineImpl withoutVMAgent() { this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(false); return this; }
@Override public VirtualMachineScaleSetImpl withTimeZone(String timeZone) { this.inner() .virtualMachineProfile() .osProfile().windowsConfiguration().withTimeZone(timeZone); return this; }
@Override public VirtualMachineImpl withWindowsCustomImage(String customImageId) { ImageReference imageReferenceInner = new ImageReference(); imageReferenceInner.withId(customImageId); this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE); this.inner().storageProfile().withImageReference(imageReferenceInner); this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration()); // sets defaults for "Stored(User)Image", "VM(Platform | Custom | Gallery)Image" this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true); this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true); return this; }
@Override public VirtualMachineScaleSetImpl withWinRM(WinRMListener listener) { if (this.inner().virtualMachineProfile().osProfile().windowsConfiguration().winRM() == null) { WinRMConfiguration winRMConfiguration = new WinRMConfiguration(); this.inner() .virtualMachineProfile() .osProfile().windowsConfiguration().withWinRM(winRMConfiguration); } this.inner() .virtualMachineProfile() .osProfile() .windowsConfiguration() .winRM() .listeners() .add(listener); return this; }