Class ReservationMergeProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.ReservationMergeProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ReservationMergeProperties>
public final class ReservationMergeProperties
extends Object
implements com.azure.json.JsonSerializable<ReservationMergeProperties>
Properties of reservation merge.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ReservationMergeProperties class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReservationMergeProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ReservationMergeProperties from the JsonReader.Get the mergeDestination property: Reservation resource id Created due to the merge.Get the mergeSources property: Resource ids of the source reservation's merged to form this reservation.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withMergeDestination
(String mergeDestination) Set the mergeDestination property: Reservation resource id Created due to the merge.withMergeSources
(List<String> mergeSources) Set the mergeSources property: Resource ids of the source reservation's merged to form this reservation.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
-
ReservationMergeProperties
public ReservationMergeProperties()Creates an instance of ReservationMergeProperties class.
-
-
Method Details
-
mergeDestination
Get the mergeDestination property: Reservation resource id Created due to the merge. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Returns:
- the mergeDestination value.
-
withMergeDestination
Set the mergeDestination property: Reservation resource id Created due to the merge. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Parameters:
mergeDestination
- the mergeDestination value to set.- Returns:
- the ReservationMergeProperties object itself.
-
mergeSources
Get the mergeSources property: Resource ids of the source reservation's merged to form this reservation. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Returns:
- the mergeSources value.
-
withMergeSources
Set the mergeSources property: Resource ids of the source reservation's merged to form this reservation. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Parameters:
mergeSources
- the mergeSources value to set.- Returns:
- the ReservationMergeProperties 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<ReservationMergeProperties>
- Throws:
IOException
-
fromJson
public static ReservationMergeProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ReservationMergeProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ReservationMergeProperties 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 ReservationMergeProperties.
-