Class Disk
java.lang.Object
com.azure.resourcemanager.hybridcompute.models.Disk
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Disk>
Describes a disk on the machine.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiskType()Get the diskType property: The type of the disk.static DiskfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Disk from the JsonReader.Get the generatedId property: The generated ID of the disk.id()Get the id property: The ID of the disk.Get the maxSizeInBytes property: The size of the disk, in bytes.name()Get the name property: The name of the disk.path()Get the path property: The path of the disk.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the usedSpaceInBytes property: The amount of space used on the disk, in bytes.voidvalidate()Validates the instance.withDiskType(String diskType) Set the diskType property: The type of the disk.withGeneratedId(String generatedId) Set the generatedId property: The generated ID of the disk.Set the id property: The ID of the disk.withMaxSizeInBytes(Long maxSizeInBytes) Set the maxSizeInBytes property: The size of the disk, in bytes.Set the name property: The name of the disk.Set the path property: The path of the disk.withUsedSpaceInBytes(Long usedSpaceInBytes) Set the usedSpaceInBytes property: The amount of space used on the disk, in bytes.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
-
Disk
public Disk()Creates an instance of Disk class.
-
-
Method Details
-
path
Get the path property: The path of the disk.- Returns:
- the path value.
-
withPath
Set the path property: The path of the disk.- Parameters:
path- the path value to set.- Returns:
- the Disk object itself.
-
diskType
Get the diskType property: The type of the disk.- Returns:
- the diskType value.
-
withDiskType
Set the diskType property: The type of the disk.- Parameters:
diskType- the diskType value to set.- Returns:
- the Disk object itself.
-
generatedId
Get the generatedId property: The generated ID of the disk.- Returns:
- the generatedId value.
-
withGeneratedId
Set the generatedId property: The generated ID of the disk.- Parameters:
generatedId- the generatedId value to set.- Returns:
- the Disk object itself.
-
id
Get the id property: The ID of the disk.- Returns:
- the id value.
-
withId
Set the id property: The ID of the disk.- Parameters:
id- the id value to set.- Returns:
- the Disk object itself.
-
name
Get the name property: The name of the disk.- Returns:
- the name value.
-
withName
Set the name property: The name of the disk.- Parameters:
name- the name value to set.- Returns:
- the Disk object itself.
-
maxSizeInBytes
Get the maxSizeInBytes property: The size of the disk, in bytes.- Returns:
- the maxSizeInBytes value.
-
withMaxSizeInBytes
Set the maxSizeInBytes property: The size of the disk, in bytes.- Parameters:
maxSizeInBytes- the maxSizeInBytes value to set.- Returns:
- the Disk object itself.
-
usedSpaceInBytes
Get the usedSpaceInBytes property: The amount of space used on the disk, in bytes.- Returns:
- the usedSpaceInBytes value.
-
withUsedSpaceInBytes
Set the usedSpaceInBytes property: The amount of space used on the disk, in bytes.- Parameters:
usedSpaceInBytes- the usedSpaceInBytes value to set.- Returns:
- the Disk 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<Disk>- Throws:
IOException
-
fromJson
Reads an instance of Disk from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Disk 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 Disk.
-