Class CalculateExchangeRequestProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.CalculateExchangeRequestProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CalculateExchangeRequestProperties>
public final class CalculateExchangeRequestProperties
extends Object
implements com.azure.json.JsonSerializable<CalculateExchangeRequestProperties>
Calculate exchange request properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CalculateExchangeRequestProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CalculateExchangeRequestProperties from the JsonReader.Get the reservationsToExchange property: List of reservations that are being returned in this exchange.Get the reservationsToPurchase property: List of reservations that are being purchased in this exchange.Get the savingsPlansToPurchase property: List of savings plans that are being purchased in this exchange.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withReservationsToExchange
(List<ReservationToReturn> reservationsToExchange) Set the reservationsToExchange property: List of reservations that are being returned in this exchange.withReservationsToPurchase
(List<PurchaseRequest> reservationsToPurchase) Set the reservationsToPurchase property: List of reservations that are being purchased in this exchange.withSavingsPlansToPurchase
(List<SavingsPlanPurchaseRequest> savingsPlansToPurchase) Set the savingsPlansToPurchase property: List of savings plans that are being purchased in this exchange.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
-
CalculateExchangeRequestProperties
public CalculateExchangeRequestProperties()Creates an instance of CalculateExchangeRequestProperties class.
-
-
Method Details
-
reservationsToPurchase
Get the reservationsToPurchase property: List of reservations that are being purchased in this exchange.- Returns:
- the reservationsToPurchase value.
-
withReservationsToPurchase
public CalculateExchangeRequestProperties withReservationsToPurchase(List<PurchaseRequest> reservationsToPurchase) Set the reservationsToPurchase property: List of reservations that are being purchased in this exchange.- Parameters:
reservationsToPurchase
- the reservationsToPurchase value to set.- Returns:
- the CalculateExchangeRequestProperties object itself.
-
savingsPlansToPurchase
Get the savingsPlansToPurchase property: List of savings plans that are being purchased in this exchange.- Returns:
- the savingsPlansToPurchase value.
-
withSavingsPlansToPurchase
public CalculateExchangeRequestProperties withSavingsPlansToPurchase(List<SavingsPlanPurchaseRequest> savingsPlansToPurchase) Set the savingsPlansToPurchase property: List of savings plans that are being purchased in this exchange.- Parameters:
savingsPlansToPurchase
- the savingsPlansToPurchase value to set.- Returns:
- the CalculateExchangeRequestProperties object itself.
-
reservationsToExchange
Get the reservationsToExchange property: List of reservations that are being returned in this exchange.- Returns:
- the reservationsToExchange value.
-
withReservationsToExchange
public CalculateExchangeRequestProperties withReservationsToExchange(List<ReservationToReturn> reservationsToExchange) Set the reservationsToExchange property: List of reservations that are being returned in this exchange.- Parameters:
reservationsToExchange
- the reservationsToExchange value to set.- Returns:
- the CalculateExchangeRequestProperties 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<CalculateExchangeRequestProperties>
- Throws:
IOException
-
fromJson
public static CalculateExchangeRequestProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CalculateExchangeRequestProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of CalculateExchangeRequestProperties 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 CalculateExchangeRequestProperties.
-