Class VirtualMachineSizeInner
java.lang.Object
com.azure.resourcemanager.compute.fluent.models.VirtualMachineSizeInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineSizeInner>
public final class VirtualMachineSizeInner
extends Object
implements com.azure.json.JsonSerializable<VirtualMachineSizeInner>
Describes the properties of a VM size.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VirtualMachineSizeInner class. -
Method Summary
Modifier and TypeMethodDescriptionstatic VirtualMachineSizeInnerfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualMachineSizeInner from the JsonReader.Get the maxDataDiskCount property: The maximum number of data disks that can be attached to the virtual machine size.Get the memoryInMB property: The amount of memory, in MB, supported by the virtual machine size.name()Get the name property: The name of the virtual machine size.Get the numberOfCores property: The number of cores supported by the virtual machine size.Get the osDiskSizeInMB property: The OS disk size, in MB, allowed by the virtual machine size.Get the resourceDiskSizeInMB property: The resource disk size, in MB, allowed by the virtual machine size.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withMaxDataDiskCount(Integer maxDataDiskCount) Set the maxDataDiskCount property: The maximum number of data disks that can be attached to the virtual machine size.withMemoryInMB(Integer memoryInMB) Set the memoryInMB property: The amount of memory, in MB, supported by the virtual machine size.Set the name property: The name of the virtual machine size.withNumberOfCores(Integer numberOfCores) Set the numberOfCores property: The number of cores supported by the virtual machine size.withOsDiskSizeInMB(Integer osDiskSizeInMB) Set the osDiskSizeInMB property: The OS disk size, in MB, allowed by the virtual machine size.withResourceDiskSizeInMB(Integer resourceDiskSizeInMB) Set the resourceDiskSizeInMB property: The resource disk size, in MB, allowed by the virtual machine size.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VirtualMachineSizeInner
public VirtualMachineSizeInner()Creates an instance of VirtualMachineSizeInner class.
-
-
Method Details
-
name
Get the name property: The name of the virtual machine size.- Returns:
- the name value.
-
withName
Set the name property: The name of the virtual machine size.- Parameters:
name- the name value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
numberOfCores
Get the numberOfCores property: The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list.- Returns:
- the numberOfCores value.
-
withNumberOfCores
Set the numberOfCores property: The number of cores supported by the virtual machine size. For Constrained vCPU capable VM sizes, this number represents the total vCPUs of quota that the VM uses. For accurate vCPU count, please refer to https://docs.microsoft.com/azure/virtual-machines/constrained-vcpu or https://docs.microsoft.com/rest/api/compute/resourceskus/list.- Parameters:
numberOfCores- the numberOfCores value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
osDiskSizeInMB
Get the osDiskSizeInMB property: The OS disk size, in MB, allowed by the virtual machine size.- Returns:
- the osDiskSizeInMB value.
-
withOsDiskSizeInMB
Set the osDiskSizeInMB property: The OS disk size, in MB, allowed by the virtual machine size.- Parameters:
osDiskSizeInMB- the osDiskSizeInMB value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
resourceDiskSizeInMB
Get the resourceDiskSizeInMB property: The resource disk size, in MB, allowed by the virtual machine size.- Returns:
- the resourceDiskSizeInMB value.
-
withResourceDiskSizeInMB
Set the resourceDiskSizeInMB property: The resource disk size, in MB, allowed by the virtual machine size.- Parameters:
resourceDiskSizeInMB- the resourceDiskSizeInMB value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
memoryInMB
Get the memoryInMB property: The amount of memory, in MB, supported by the virtual machine size.- Returns:
- the memoryInMB value.
-
withMemoryInMB
Set the memoryInMB property: The amount of memory, in MB, supported by the virtual machine size.- Parameters:
memoryInMB- the memoryInMB value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
maxDataDiskCount
Get the maxDataDiskCount property: The maximum number of data disks that can be attached to the virtual machine size.- Returns:
- the maxDataDiskCount value.
-
withMaxDataDiskCount
Set the maxDataDiskCount property: The maximum number of data disks that can be attached to the virtual machine size.- Parameters:
maxDataDiskCount- the maxDataDiskCount value to set.- Returns:
- the VirtualMachineSizeInner object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VirtualMachineSizeInner>- Throws:
IOException
-
fromJson
public static VirtualMachineSizeInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of VirtualMachineSizeInner from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of VirtualMachineSizeInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the VirtualMachineSizeInner.
-