Class ReservationToPurchaseExchange
java.lang.Object
com.azure.resourcemanager.reservations.models.ReservationToPurchaseExchange
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ReservationToPurchaseExchange>
public final class ReservationToPurchaseExchange
extends Object
implements com.azure.json.JsonSerializable<ReservationToPurchaseExchange>
Reservation purchase details.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ReservationToPurchaseExchange 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 ReservationToPurchaseExchange from the JsonReader.Get the properties property: The request for reservation purchase.Get the reservationId property: Fully qualified id of the reservation being purchased.Get the reservationOrderId property: Fully qualified id of the reservationOrder 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
(PurchaseRequest properties) Set the properties property: The request for reservation purchase.withReservationId
(String reservationId) Set the reservationId property: Fully qualified id of the reservation being purchased.withReservationOrderId
(String reservationOrderId) Set the reservationOrderId property: Fully qualified id of the reservationOrder 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
-
ReservationToPurchaseExchange
public ReservationToPurchaseExchange()Creates an instance of ReservationToPurchaseExchange class.
-
-
Method Details
-
reservationOrderId
Get the reservationOrderId property: Fully qualified id of the reservationOrder being purchased.- Returns:
- the reservationOrderId value.
-
withReservationOrderId
Set the reservationOrderId property: Fully qualified id of the reservationOrder being purchased.- Parameters:
reservationOrderId
- the reservationOrderId value to set.- Returns:
- the ReservationToPurchaseExchange object itself.
-
reservationId
Get the reservationId property: Fully qualified id of the reservation being purchased. This value is only guaranteed to be non-null if the purchase is successful.- Returns:
- the reservationId value.
-
withReservationId
Set the reservationId property: Fully qualified id of the reservation being purchased. This value is only guaranteed to be non-null if the purchase is successful.- Parameters:
reservationId
- the reservationId value to set.- Returns:
- the ReservationToPurchaseExchange object itself.
-
properties
Get the properties property: The request for reservation purchase.- Returns:
- the properties value.
-
withProperties
Set the properties property: The request for reservation purchase.- Parameters:
properties
- the properties value to set.- Returns:
- the ReservationToPurchaseExchange 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 ReservationToPurchaseExchange 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 ReservationToPurchaseExchange 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<ReservationToPurchaseExchange>
- Throws:
IOException
-
fromJson
public static ReservationToPurchaseExchange fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ReservationToPurchaseExchange from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ReservationToPurchaseExchange 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 ReservationToPurchaseExchange.
-