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 Details

    • CalculateExchangeRequestProperties

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

    • reservationsToPurchase

      public List<PurchaseRequest> 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

      public List<SavingsPlanPurchaseRequest> 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

      public List<ReservationToReturn> 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

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