Class RefundRequestProperties

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

public final class RefundRequestProperties extends Object implements com.azure.json.JsonSerializable<RefundRequestProperties>
Properties needed for refund request including the session id from calculate refund, the scope, the reservation to be returned and the return reason.
  • Constructor Details

    • RefundRequestProperties

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

    • sessionId

      public String sessionId()
      Get the sessionId property: SessionId that was returned by CalculateRefund API.
      Returns:
      the sessionId value.
    • withSessionId

      public RefundRequestProperties withSessionId(String sessionId)
      Set the sessionId property: SessionId that was returned by CalculateRefund API.
      Parameters:
      sessionId - the sessionId value to set.
      Returns:
      the RefundRequestProperties object itself.
    • scope

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

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

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

      public RefundRequestProperties withReservationToReturn(ReservationToReturn reservationToReturn)
      Set the reservationToReturn property: Reservation to return.
      Parameters:
      reservationToReturn - the reservationToReturn value to set.
      Returns:
      the RefundRequestProperties object itself.
    • returnReason

      public String returnReason()
      Get the returnReason property: The reason of returning the reservation.
      Returns:
      the returnReason value.
    • withReturnReason

      public RefundRequestProperties withReturnReason(String returnReason)
      Set the returnReason property: The reason of returning the reservation.
      Parameters:
      returnReason - the returnReason value to set.
      Returns:
      the RefundRequestProperties 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<RefundRequestProperties>
      Throws:
      IOException
    • fromJson

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