Class ImportLabVirtualMachineRequest
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.ImportLabVirtualMachineRequest
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ImportLabVirtualMachineRequest>
public final class ImportLabVirtualMachineRequest
extends Object
implements com.azure.json.JsonSerializable<ImportLabVirtualMachineRequest>
This represents the payload required to import a virtual machine from a different lab into the current one.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ImportLabVirtualMachineRequest class. -
Method Summary
Modifier and TypeMethodDescriptionGet the destinationVirtualMachineName property: The name of the virtual machine in the destination lab.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ImportLabVirtualMachineRequest from the JsonReader.Get the sourceVirtualMachineResourceId property: The full resource ID of the virtual machine to be imported.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDestinationVirtualMachineName
(String destinationVirtualMachineName) Set the destinationVirtualMachineName property: The name of the virtual machine in the destination lab.withSourceVirtualMachineResourceId
(String sourceVirtualMachineResourceId) Set the sourceVirtualMachineResourceId property: The full resource ID of the virtual machine to be imported.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
-
ImportLabVirtualMachineRequest
public ImportLabVirtualMachineRequest()Creates an instance of ImportLabVirtualMachineRequest class.
-
-
Method Details
-
sourceVirtualMachineResourceId
Get the sourceVirtualMachineResourceId property: The full resource ID of the virtual machine to be imported.- Returns:
- the sourceVirtualMachineResourceId value.
-
withSourceVirtualMachineResourceId
public ImportLabVirtualMachineRequest withSourceVirtualMachineResourceId(String sourceVirtualMachineResourceId) Set the sourceVirtualMachineResourceId property: The full resource ID of the virtual machine to be imported.- Parameters:
sourceVirtualMachineResourceId
- the sourceVirtualMachineResourceId value to set.- Returns:
- the ImportLabVirtualMachineRequest object itself.
-
destinationVirtualMachineName
Get the destinationVirtualMachineName property: The name of the virtual machine in the destination lab.- Returns:
- the destinationVirtualMachineName value.
-
withDestinationVirtualMachineName
public ImportLabVirtualMachineRequest withDestinationVirtualMachineName(String destinationVirtualMachineName) Set the destinationVirtualMachineName property: The name of the virtual machine in the destination lab.- Parameters:
destinationVirtualMachineName
- the destinationVirtualMachineName value to set.- Returns:
- the ImportLabVirtualMachineRequest 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<ImportLabVirtualMachineRequest>
- Throws:
IOException
-
fromJson
public static ImportLabVirtualMachineRequest fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ImportLabVirtualMachineRequest from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ImportLabVirtualMachineRequest 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 ImportLabVirtualMachineRequest.
-