Class ExchangeResponseProperties

java.lang.Object
com.azure.resourcemanager.reservations.models.ExchangeResponseProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<ExchangeResponseProperties>

public final class ExchangeResponseProperties extends Object implements com.azure.json.JsonSerializable<ExchangeResponseProperties>
Exchange response properties.
  • Constructor Details

    • ExchangeResponseProperties

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

    • sessionId

      public String sessionId()
      Get the sessionId property: Exchange session identifier.
      Returns:
      the sessionId value.
    • withSessionId

      public ExchangeResponseProperties withSessionId(String sessionId)
      Set the sessionId property: Exchange session identifier.
      Parameters:
      sessionId - the sessionId value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • netPayable

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

      public ExchangeResponseProperties withNetPayable(Price netPayable)
      Set the netPayable property: Pricing information containing the amount and the currency code.
      Parameters:
      netPayable - the netPayable value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • refundsTotal

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

      public ExchangeResponseProperties withRefundsTotal(Price refundsTotal)
      Set the refundsTotal property: Pricing information containing the amount and the currency code.
      Parameters:
      refundsTotal - the refundsTotal value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • purchasesTotal

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

      public ExchangeResponseProperties withPurchasesTotal(Price purchasesTotal)
      Set the purchasesTotal property: Pricing information containing the amount and the currency code.
      Parameters:
      purchasesTotal - the purchasesTotal value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • reservationsToPurchase

      public List<ReservationToPurchaseExchange> reservationsToPurchase()
      Get the reservationsToPurchase property: Details of the reservations being purchased.
      Returns:
      the reservationsToPurchase value.
    • withReservationsToPurchase

      public ExchangeResponseProperties withReservationsToPurchase(List<ReservationToPurchaseExchange> reservationsToPurchase)
      Set the reservationsToPurchase property: Details of the reservations being purchased.
      Parameters:
      reservationsToPurchase - the reservationsToPurchase value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • savingsPlansToPurchase

      public List<SavingsPlanToPurchaseExchange> savingsPlansToPurchase()
      Get the savingsPlansToPurchase property: Details of the savings plans being purchased.
      Returns:
      the savingsPlansToPurchase value.
    • withSavingsPlansToPurchase

      public ExchangeResponseProperties withSavingsPlansToPurchase(List<SavingsPlanToPurchaseExchange> savingsPlansToPurchase)
      Set the savingsPlansToPurchase property: Details of the savings plans being purchased.
      Parameters:
      savingsPlansToPurchase - the savingsPlansToPurchase value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • reservationsToExchange

      public List<ReservationToReturnForExchange> reservationsToExchange()
      Get the reservationsToExchange property: Details of the reservations being returned.
      Returns:
      the reservationsToExchange value.
    • withReservationsToExchange

      public ExchangeResponseProperties withReservationsToExchange(List<ReservationToReturnForExchange> reservationsToExchange)
      Set the reservationsToExchange property: Details of the reservations being returned.
      Parameters:
      reservationsToExchange - the reservationsToExchange value to set.
      Returns:
      the ExchangeResponseProperties object itself.
    • policyResult

      public ExchangePolicyErrors policyResult()
      Get the policyResult property: Exchange policy errors.
      Returns:
      the policyResult value.
    • withPolicyResult

      public ExchangeResponseProperties withPolicyResult(ExchangePolicyErrors policyResult)
      Set the policyResult property: Exchange policy errors.
      Parameters:
      policyResult - the policyResult value to set.
      Returns:
      the ExchangeResponseProperties 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<ExchangeResponseProperties>
      Throws:
      IOException
    • fromJson

      public static ExchangeResponseProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ExchangeResponseProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ExchangeResponseProperties 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 ExchangeResponseProperties.