Class SavingsPlanToPurchaseExchange
java.lang.Object
com.azure.resourcemanager.reservations.models.SavingsPlanToPurchaseExchange
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SavingsPlanToPurchaseExchange>
public final class SavingsPlanToPurchaseExchange
extends Object
implements com.azure.json.JsonSerializable<SavingsPlanToPurchaseExchange>
Savings plan purchase details.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of SavingsPlanToPurchaseExchange class. -
Method Summary
Modifier and TypeMethodDescriptionGet the billingCurrencyTotal property: Pricing information containing the amount and the currency code.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of SavingsPlanToPurchaseExchange from the JsonReader.Get the properties property: Request body for savings plan purchase.Get the savingsPlanId property: Fully qualified id of the savings plan being purchased.Get the savingsPlanOrderId property: Fully qualified id of the savings plan order being purchased.status()
Get the status property: Status of the individual operation.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withBillingCurrencyTotal
(Price billingCurrencyTotal) Set the billingCurrencyTotal property: Pricing information containing the amount and the currency code.withProperties
(SavingsPlanPurchaseRequest properties) Set the properties property: Request body for savings plan purchase.withSavingsPlanId
(String savingsPlanId) Set the savingsPlanId property: Fully qualified id of the savings plan being purchased.withSavingsPlanOrderId
(String savingsPlanOrderId) Set the savingsPlanOrderId property: Fully qualified id of the savings plan order being purchased.withStatus
(OperationStatus status) Set the status property: Status of the individual operation.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
-
SavingsPlanToPurchaseExchange
public SavingsPlanToPurchaseExchange()Creates an instance of SavingsPlanToPurchaseExchange class.
-
-
Method Details
-
savingsPlanOrderId
Get the savingsPlanOrderId property: Fully qualified id of the savings plan order being purchased.- Returns:
- the savingsPlanOrderId value.
-
withSavingsPlanOrderId
Set the savingsPlanOrderId property: Fully qualified id of the savings plan order being purchased.- Parameters:
savingsPlanOrderId
- the savingsPlanOrderId value to set.- Returns:
- the SavingsPlanToPurchaseExchange object itself.
-
savingsPlanId
Get the savingsPlanId property: Fully qualified id of the savings plan being purchased. This value is only guaranteed to be non-null if the purchase is successful.- Returns:
- the savingsPlanId value.
-
withSavingsPlanId
Set the savingsPlanId property: Fully qualified id of the savings plan being purchased. This value is only guaranteed to be non-null if the purchase is successful.- Parameters:
savingsPlanId
- the savingsPlanId value to set.- Returns:
- the SavingsPlanToPurchaseExchange object itself.
-
properties
Get the properties property: Request body for savings plan purchase.- Returns:
- the properties value.
-
withProperties
Set the properties property: Request body for savings plan purchase.- Parameters:
properties
- the properties value to set.- Returns:
- the SavingsPlanToPurchaseExchange object itself.
-
billingCurrencyTotal
Get the billingCurrencyTotal property: Pricing information containing the amount and the currency code.- Returns:
- the billingCurrencyTotal value.
-
withBillingCurrencyTotal
Set the billingCurrencyTotal property: Pricing information containing the amount and the currency code.- Parameters:
billingCurrencyTotal
- the billingCurrencyTotal value to set.- Returns:
- the SavingsPlanToPurchaseExchange object itself.
-
status
Get the status property: Status of the individual operation.- Returns:
- the status value.
-
withStatus
Set the status property: Status of the individual operation.- Parameters:
status
- the status value to set.- Returns:
- the SavingsPlanToPurchaseExchange 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<SavingsPlanToPurchaseExchange>
- Throws:
IOException
-
fromJson
public static SavingsPlanToPurchaseExchange fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of SavingsPlanToPurchaseExchange from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of SavingsPlanToPurchaseExchange 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 SavingsPlanToPurchaseExchange.
-