Class MachineInstallPatchesParameters

java.lang.Object
com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters
All Implemented Interfaces:
com.azure.json.JsonSerializable<MachineInstallPatchesParameters>

public final class MachineInstallPatchesParameters extends Object implements com.azure.json.JsonSerializable<MachineInstallPatchesParameters>
Input for InstallPatches as directly received by the API.
  • Constructor Details

    • MachineInstallPatchesParameters

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

    • maximumDuration

      public Duration maximumDuration()
      Get the maximumDuration property: Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours).
      Returns:
      the maximumDuration value.
    • withMaximumDuration

      public MachineInstallPatchesParameters withMaximumDuration(Duration maximumDuration)
      Set the maximumDuration property: Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours).
      Parameters:
      maximumDuration - the maximumDuration value to set.
      Returns:
      the MachineInstallPatchesParameters object itself.
    • rebootSetting

      public VMGuestPatchRebootSetting rebootSetting()
      Get the rebootSetting property: Defines when it is acceptable to reboot a VM during a software update operation.
      Returns:
      the rebootSetting value.
    • withRebootSetting

      public MachineInstallPatchesParameters withRebootSetting(VMGuestPatchRebootSetting rebootSetting)
      Set the rebootSetting property: Defines when it is acceptable to reboot a VM during a software update operation.
      Parameters:
      rebootSetting - the rebootSetting value to set.
      Returns:
      the MachineInstallPatchesParameters object itself.
    • windowsParameters

      public WindowsParameters windowsParameters()
      Get the windowsParameters property: Input for InstallPatches on a Windows VM, as directly received by the API.
      Returns:
      the windowsParameters value.
    • withWindowsParameters

      public MachineInstallPatchesParameters withWindowsParameters(WindowsParameters windowsParameters)
      Set the windowsParameters property: Input for InstallPatches on a Windows VM, as directly received by the API.
      Parameters:
      windowsParameters - the windowsParameters value to set.
      Returns:
      the MachineInstallPatchesParameters object itself.
    • linuxParameters

      public LinuxParameters linuxParameters()
      Get the linuxParameters property: Input for InstallPatches on a Linux VM, as directly received by the API.
      Returns:
      the linuxParameters value.
    • withLinuxParameters

      public MachineInstallPatchesParameters withLinuxParameters(LinuxParameters linuxParameters)
      Set the linuxParameters property: Input for InstallPatches on a Linux VM, as directly received by the API.
      Parameters:
      linuxParameters - the linuxParameters value to set.
      Returns:
      the MachineInstallPatchesParameters 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<MachineInstallPatchesParameters>
      Throws:
      IOException
    • fromJson

      public static MachineInstallPatchesParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MachineInstallPatchesParameters from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MachineInstallPatchesParameters if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the MachineInstallPatchesParameters.