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 Summary
ConstructorsConstructorDescriptionCreates an instance of RetargetScheduleProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the currentResourceId property: The resource Id of the virtual machine on which the schedule operates.static RetargetScheduleProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of RetargetScheduleProperties from the JsonReader.Get the targetResourceId property: The resource Id of the virtual machine that the schedule should be retargeted to.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withCurrentResourceId
(String currentResourceId) Set the currentResourceId property: The resource Id of the virtual machine on which the schedule operates.withTargetResourceId
(String targetResourceId) Set the targetResourceId property: The resource Id of the virtual machine that the schedule should be retargeted to.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
-
RetargetScheduleProperties
public RetargetScheduleProperties()Creates an instance of RetargetScheduleProperties class.
-
-
Method Details
-
currentResourceId
Get the currentResourceId property: The resource Id of the virtual machine on which the schedule operates.- Returns:
- the currentResourceId value.
-
withCurrentResourceId
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
Get the targetResourceId property: The resource Id of the virtual machine that the schedule should be retargeted to.- Returns:
- the targetResourceId value.
-
withTargetResourceId
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
- Specified by:
toJson
in interfacecom.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.
-