Class CalculateRefundRequestProperties

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

public final class CalculateRefundRequestProperties extends Object implements com.azure.json.JsonSerializable<CalculateRefundRequestProperties>
Properties needed for calculate refund including the scope and the reservation to be returned.
  • Constructor Details

    • CalculateRefundRequestProperties

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

    • scope

      public String scope()
      Get the scope property: The scope of the refund, e.g. Reservation.
      Returns:
      the scope value.
    • withScope

      public CalculateRefundRequestProperties withScope(String scope)
      Set the scope property: The scope of the refund, e.g. Reservation.
      Parameters:
      scope - the scope value to set.
      Returns:
      the CalculateRefundRequestProperties object itself.
    • reservationToReturn

      public ReservationToReturn reservationToReturn()
      Get the reservationToReturn property: Reservation to return.
      Returns:
      the reservationToReturn value.
    • withReservationToReturn

      public CalculateRefundRequestProperties withReservationToReturn(ReservationToReturn reservationToReturn)
      Set the reservationToReturn property: Reservation to return.
      Parameters:
      reservationToReturn - the reservationToReturn value to set.
      Returns:
      the CalculateRefundRequestProperties 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<CalculateRefundRequestProperties>
      Throws:
      IOException
    • fromJson

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