Class CustomImagePropertiesFromVm
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.CustomImagePropertiesFromVm
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CustomImagePropertiesFromVm>
public final class CustomImagePropertiesFromVm
extends Object
implements com.azure.json.JsonSerializable<CustomImagePropertiesFromVm>
Properties for creating a custom image from a virtual machine.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CustomImagePropertiesFromVm class. -
Method Summary
Modifier and TypeMethodDescriptionstatic CustomImagePropertiesFromVm
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CustomImagePropertiesFromVm from the JsonReader.Get the linuxOsInfo property: The Linux OS information of the VM.Get the sourceVmId property: The source vm identifier.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Get the windowsOsInfo property: The Windows OS information of the VM.withLinuxOsInfo
(LinuxOsInfo linuxOsInfo) Set the linuxOsInfo property: The Linux OS information of the VM.withSourceVmId
(String sourceVmId) Set the sourceVmId property: The source vm identifier.withWindowsOsInfo
(WindowsOsInfo windowsOsInfo) Set the windowsOsInfo property: The Windows OS information of the VM.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CustomImagePropertiesFromVm
public CustomImagePropertiesFromVm()Creates an instance of CustomImagePropertiesFromVm class.
-
-
Method Details
-
sourceVmId
Get the sourceVmId property: The source vm identifier.- Returns:
- the sourceVmId value.
-
withSourceVmId
Set the sourceVmId property: The source vm identifier.- Parameters:
sourceVmId
- the sourceVmId value to set.- Returns:
- the CustomImagePropertiesFromVm object itself.
-
windowsOsInfo
Get the windowsOsInfo property: The Windows OS information of the VM.- Returns:
- the windowsOsInfo value.
-
withWindowsOsInfo
Set the windowsOsInfo property: The Windows OS information of the VM.- Parameters:
windowsOsInfo
- the windowsOsInfo value to set.- Returns:
- the CustomImagePropertiesFromVm object itself.
-
linuxOsInfo
Get the linuxOsInfo property: The Linux OS information of the VM.- Returns:
- the linuxOsInfo value.
-
withLinuxOsInfo
Set the linuxOsInfo property: The Linux OS information of the VM.- Parameters:
linuxOsInfo
- the linuxOsInfo value to set.- Returns:
- the CustomImagePropertiesFromVm object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<CustomImagePropertiesFromVm>
- Throws:
IOException
-
fromJson
public static CustomImagePropertiesFromVm fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CustomImagePropertiesFromVm from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of CustomImagePropertiesFromVm 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 CustomImagePropertiesFromVm.
-