Class ReservationToReturn
java.lang.Object
com.azure.resourcemanager.reservations.models.ReservationToReturn
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ReservationToReturn>
public final class ReservationToReturn
extends Object
implements com.azure.json.JsonSerializable<ReservationToReturn>
Reservation to return.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ReservationToReturn
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ReservationToReturn from the JsonReader.quantity()
Get the quantity property: Quantity to be returned.Get the reservationId property: Fully qualified identifier of the reservation being returned.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withQuantity
(Integer quantity) Set the quantity property: Quantity to be returned.withReservationId
(String reservationId) Set the reservationId property: Fully qualified identifier of the reservation being returned.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
-
ReservationToReturn
public ReservationToReturn()Creates an instance of ReservationToReturn class.
-
-
Method Details
-
reservationId
Get the reservationId property: Fully qualified identifier of the reservation being returned.- Returns:
- the reservationId value.
-
withReservationId
Set the reservationId property: Fully qualified identifier of the reservation being returned.- Parameters:
reservationId
- the reservationId value to set.- Returns:
- the ReservationToReturn object itself.
-
quantity
Get the quantity property: Quantity to be returned. Must be greater than zero.- Returns:
- the quantity value.
-
withQuantity
Set the quantity property: Quantity to be returned. Must be greater than zero.- Parameters:
quantity
- the quantity value to set.- Returns:
- the ReservationToReturn 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<ReservationToReturn>
- Throws:
IOException
-
fromJson
Reads an instance of ReservationToReturn from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ReservationToReturn 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 ReservationToReturn.
-