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 Details

    • CustomImagePropertiesFromVm

      public CustomImagePropertiesFromVm()
      Creates an instance of CustomImagePropertiesFromVm class.
  • Method Details

    • sourceVmId

      public String sourceVmId()
      Get the sourceVmId property: The source vm identifier.
      Returns:
      the sourceVmId value.
    • withSourceVmId

      public CustomImagePropertiesFromVm withSourceVmId(String sourceVmId)
      Set the sourceVmId property: The source vm identifier.
      Parameters:
      sourceVmId - the sourceVmId value to set.
      Returns:
      the CustomImagePropertiesFromVm object itself.
    • windowsOsInfo

      public WindowsOsInfo windowsOsInfo()
      Get the windowsOsInfo property: The Windows OS information of the VM.
      Returns:
      the windowsOsInfo value.
    • withWindowsOsInfo

      public CustomImagePropertiesFromVm withWindowsOsInfo(WindowsOsInfo windowsOsInfo)
      Set the windowsOsInfo property: The Windows OS information of the VM.
      Parameters:
      windowsOsInfo - the windowsOsInfo value to set.
      Returns:
      the CustomImagePropertiesFromVm object itself.
    • linuxOsInfo

      public LinuxOsInfo linuxOsInfo()
      Get the linuxOsInfo property: The Linux OS information of the VM.
      Returns:
      the linuxOsInfo value.
    • withLinuxOsInfo

      public CustomImagePropertiesFromVm withLinuxOsInfo(LinuxOsInfo linuxOsInfo)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.