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 Details

    • SavingsPlanToPurchaseExchange

      public SavingsPlanToPurchaseExchange()
      Creates an instance of SavingsPlanToPurchaseExchange class.
  • Method Details

    • savingsPlanOrderId

      public String savingsPlanOrderId()
      Get the savingsPlanOrderId property: Fully qualified id of the savings plan order being purchased.
      Returns:
      the savingsPlanOrderId value.
    • withSavingsPlanOrderId

      public SavingsPlanToPurchaseExchange withSavingsPlanOrderId(String savingsPlanOrderId)
      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

      public String 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

      public SavingsPlanToPurchaseExchange withSavingsPlanId(String savingsPlanId)
      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

      public SavingsPlanPurchaseRequest properties()
      Get the properties property: Request body for savings plan purchase.
      Returns:
      the properties value.
    • withProperties

      public SavingsPlanToPurchaseExchange withProperties(SavingsPlanPurchaseRequest properties)
      Set the properties property: Request body for savings plan purchase.
      Parameters:
      properties - the properties value to set.
      Returns:
      the SavingsPlanToPurchaseExchange object itself.
    • billingCurrencyTotal

      public Price billingCurrencyTotal()
      Get the billingCurrencyTotal property: Pricing information containing the amount and the currency code.
      Returns:
      the billingCurrencyTotal value.
    • withBillingCurrencyTotal

      public SavingsPlanToPurchaseExchange withBillingCurrencyTotal(Price billingCurrencyTotal)
      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

      public OperationStatus status()
      Get the status property: Status of the individual operation.
      Returns:
      the status value.
    • withStatus

      public SavingsPlanToPurchaseExchange withStatus(OperationStatus status)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.