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 Details

    • ReservationToReturn

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

    • reservationId

      public String reservationId()
      Get the reservationId property: Fully qualified identifier of the reservation being returned.
      Returns:
      the reservationId value.
    • withReservationId

      public ReservationToReturn withReservationId(String reservationId)
      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

      public Integer quantity()
      Get the quantity property: Quantity to be returned. Must be greater than zero.
      Returns:
      the quantity value.
    • withQuantity

      public ReservationToReturn withQuantity(Integer quantity)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ReservationToReturn>
      Throws:
      IOException
    • fromJson

      public static ReservationToReturn fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.