Class CalculateExchangeResponseProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.CalculateExchangeResponseProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CalculateExchangeResponseProperties>
public final class CalculateExchangeResponseProperties
extends Object
implements com.azure.json.JsonSerializable<CalculateExchangeResponseProperties>
CalculateExchange response properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CalculateExchangeResponseProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CalculateExchangeResponseProperties from the JsonReader.Get the netPayable property: Pricing information containing the amount and the currency code.Get the policyResult property: Exchange policy errors.Get the purchasesTotal property: Pricing information containing the amount and the currency code.Get the refundsTotal property: Pricing information containing the amount and the currency code.Get the reservationsToExchange property: Details of the reservations being returned.Get the reservationsToPurchase property: Details of the reservations being purchased.Get the savingsPlansToPurchase property: Details of the savings plans being purchased.Get the sessionId property: Exchange session identifier.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withNetPayable
(Price netPayable) Set the netPayable property: Pricing information containing the amount and the currency code.withPolicyResult
(ExchangePolicyErrors policyResult) Set the policyResult property: Exchange policy errors.withPurchasesTotal
(Price purchasesTotal) Set the purchasesTotal property: Pricing information containing the amount and the currency code.withRefundsTotal
(Price refundsTotal) Set the refundsTotal property: Pricing information containing the amount and the currency code.withReservationsToExchange
(List<ReservationToExchange> reservationsToExchange) Set the reservationsToExchange property: Details of the reservations being returned.withReservationsToPurchase
(List<ReservationToPurchaseCalculateExchange> reservationsToPurchase) Set the reservationsToPurchase property: Details of the reservations being purchased.withSavingsPlansToPurchase
(List<SavingsPlanToPurchaseCalculateExchange> savingsPlansToPurchase) Set the savingsPlansToPurchase property: Details of the savings plans being purchased.withSessionId
(String sessionId) Set the sessionId property: Exchange session identifier.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
-
CalculateExchangeResponseProperties
public CalculateExchangeResponseProperties()Creates an instance of CalculateExchangeResponseProperties class.
-
-
Method Details
-
sessionId
Get the sessionId property: Exchange session identifier.- Returns:
- the sessionId value.
-
withSessionId
Set the sessionId property: Exchange session identifier.- Parameters:
sessionId
- the sessionId value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
netPayable
Get the netPayable property: Pricing information containing the amount and the currency code.- Returns:
- the netPayable value.
-
withNetPayable
Set the netPayable property: Pricing information containing the amount and the currency code.- Parameters:
netPayable
- the netPayable value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
refundsTotal
Get the refundsTotal property: Pricing information containing the amount and the currency code.- Returns:
- the refundsTotal value.
-
withRefundsTotal
Set the refundsTotal property: Pricing information containing the amount and the currency code.- Parameters:
refundsTotal
- the refundsTotal value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
purchasesTotal
Get the purchasesTotal property: Pricing information containing the amount and the currency code.- Returns:
- the purchasesTotal value.
-
withPurchasesTotal
Set the purchasesTotal property: Pricing information containing the amount and the currency code.- Parameters:
purchasesTotal
- the purchasesTotal value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
reservationsToPurchase
Get the reservationsToPurchase property: Details of the reservations being purchased.- Returns:
- the reservationsToPurchase value.
-
withReservationsToPurchase
public CalculateExchangeResponseProperties withReservationsToPurchase(List<ReservationToPurchaseCalculateExchange> reservationsToPurchase) Set the reservationsToPurchase property: Details of the reservations being purchased.- Parameters:
reservationsToPurchase
- the reservationsToPurchase value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
savingsPlansToPurchase
Get the savingsPlansToPurchase property: Details of the savings plans being purchased.- Returns:
- the savingsPlansToPurchase value.
-
withSavingsPlansToPurchase
public CalculateExchangeResponseProperties withSavingsPlansToPurchase(List<SavingsPlanToPurchaseCalculateExchange> savingsPlansToPurchase) Set the savingsPlansToPurchase property: Details of the savings plans being purchased.- Parameters:
savingsPlansToPurchase
- the savingsPlansToPurchase value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
reservationsToExchange
Get the reservationsToExchange property: Details of the reservations being returned.- Returns:
- the reservationsToExchange value.
-
withReservationsToExchange
public CalculateExchangeResponseProperties withReservationsToExchange(List<ReservationToExchange> reservationsToExchange) Set the reservationsToExchange property: Details of the reservations being returned.- Parameters:
reservationsToExchange
- the reservationsToExchange value to set.- Returns:
- the CalculateExchangeResponseProperties object itself.
-
policyResult
Get the policyResult property: Exchange policy errors.- Returns:
- the policyResult value.
-
withPolicyResult
Set the policyResult property: Exchange policy errors.- Parameters:
policyResult
- the policyResult value to set.- Returns:
- the CalculateExchangeResponseProperties 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<CalculateExchangeResponseProperties>
- Throws:
IOException
-
fromJson
public static CalculateExchangeResponseProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CalculateExchangeResponseProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of CalculateExchangeResponseProperties 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 CalculateExchangeResponseProperties.
-