Class RetargetScheduleProperties

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

public final class RetargetScheduleProperties extends Object implements com.azure.json.JsonSerializable<RetargetScheduleProperties>
Properties for retargeting a virtual machine schedule.
  • Constructor Details

    • RetargetScheduleProperties

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

    • currentResourceId

      public String currentResourceId()
      Get the currentResourceId property: The resource Id of the virtual machine on which the schedule operates.
      Returns:
      the currentResourceId value.
    • withCurrentResourceId

      public RetargetScheduleProperties withCurrentResourceId(String currentResourceId)
      Set the currentResourceId property: The resource Id of the virtual machine on which the schedule operates.
      Parameters:
      currentResourceId - the currentResourceId value to set.
      Returns:
      the RetargetScheduleProperties object itself.
    • targetResourceId

      public String targetResourceId()
      Get the targetResourceId property: The resource Id of the virtual machine that the schedule should be retargeted to.
      Returns:
      the targetResourceId value.
    • withTargetResourceId

      public RetargetScheduleProperties withTargetResourceId(String targetResourceId)
      Set the targetResourceId property: The resource Id of the virtual machine that the schedule should be retargeted to.
      Parameters:
      targetResourceId - the targetResourceId value to set.
      Returns:
      the RetargetScheduleProperties 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<RetargetScheduleProperties>
      Throws:
      IOException
    • fromJson

      public static RetargetScheduleProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RetargetScheduleProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RetargetScheduleProperties 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 RetargetScheduleProperties.