/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.compute; import com.microsoft.azure.management.compute.implementation.ManagedDiskParametersInner; import com.fasterxml.jackson.annotation.JsonProperty; /** * Describes an Operating System disk. */ public class OSDisk { /** * The Operating System type. Possible values include: 'Windows', 'Linux'. */ @JsonProperty(value = "osType") private OperatingSystemTypes osType; /** * The disk encryption settings. */ @JsonProperty(value = "encryptionSettings") private DiskEncryptionSettings encryptionSettings; /** * The disk name. */ @JsonProperty(value = "name") private String name; /** * The virtual hard disk. */ @JsonProperty(value = "vhd") private VirtualHardDisk vhd; /** * The source user image virtual hard disk. The virtual hard disk will be * copied before using it to attach to the virtual machine. If SourceImage * is provided, the destination virtual hard disk must not exist. */ @JsonProperty(value = "image") private VirtualHardDisk image; /** * The caching type. Possible values include: 'None', 'ReadOnly', * 'ReadWrite'. */ @JsonProperty(value = "caching") private CachingTypes caching; /** * The create option. Possible values include: 'fromImage', 'empty', * 'attach'. */ @JsonProperty(value = "createOption", required = true) private DiskCreateOptionTypes createOption; /** * The initial disk size, in GB, for blank data disks, and the new desired * size for resizing existing OS and data disks. */ @JsonProperty(value = "diskSizeGB") private Integer diskSizeGB; /** * The managed disk parameters. */ @JsonProperty(value = "managedDisk") private ManagedDiskParametersInner managedDisk; /** * Get the osType value. * * @return the osType value */ public OperatingSystemTypes osType() { return this.osType; } /** * Set the osType value. * * @param osType the osType value to set * @return the OSDisk object itself. */ public OSDisk withOsType(OperatingSystemTypes osType) { this.osType = osType; return this; } /** * Get the encryptionSettings value. * * @return the encryptionSettings value */ public DiskEncryptionSettings encryptionSettings() { return this.encryptionSettings; } /** * Set the encryptionSettings value. * * @param encryptionSettings the encryptionSettings value to set * @return the OSDisk object itself. */ public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings) { this.encryptionSettings = encryptionSettings; return this; } /** * Get the name value. * * @return the name value */ public String name() { return this.name; } /** * Set the name value. * * @param name the name value to set * @return the OSDisk object itself. */ public OSDisk withName(String name) { this.name = name; return this; } /** * Get the vhd value. * * @return the vhd value */ public VirtualHardDisk vhd() { return this.vhd; } /** * Set the vhd value. * * @param vhd the vhd value to set * @return the OSDisk object itself. */ public OSDisk withVhd(VirtualHardDisk vhd) { this.vhd = vhd; return this; } /** * Get the image value. * * @return the image value */ public VirtualHardDisk image() { return this.image; } /** * Set the image value. * * @param image the image value to set * @return the OSDisk object itself. */ public OSDisk withImage(VirtualHardDisk image) { this.image = image; return this; } /** * Get the caching value. * * @return the caching value */ public CachingTypes caching() { return this.caching; } /** * Set the caching value. * * @param caching the caching value to set * @return the OSDisk object itself. */ public OSDisk withCaching(CachingTypes caching) { this.caching = caching; return this; } /** * Get the createOption value. * * @return the createOption value */ public DiskCreateOptionTypes createOption() { return this.createOption; } /** * Set the createOption value. * * @param createOption the createOption value to set * @return the OSDisk object itself. */ public OSDisk withCreateOption(DiskCreateOptionTypes createOption) { this.createOption = createOption; return this; } /** * Get the diskSizeGB value. * * @return the diskSizeGB value */ public Integer diskSizeGB() { return this.diskSizeGB; } /** * Set the diskSizeGB value. * * @param diskSizeGB the diskSizeGB value to set * @return the OSDisk object itself. */ public OSDisk withDiskSizeGB(Integer diskSizeGB) { this.diskSizeGB = diskSizeGB; return this; } /** * Get the managedDisk value. * * @return the managedDisk value */ public ManagedDiskParametersInner managedDisk() { return this.managedDisk; } /** * Set the managedDisk value. * * @param managedDisk the managedDisk value to set * @return the OSDisk object itself. */ public OSDisk withManagedDisk(ManagedDiskParametersInner managedDisk) { this.managedDisk = managedDisk; return this; } }