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 Summary
ConstructorsConstructorDescriptionCreates an instance of RefundRequestProperties class. -
Method Summary
Modifier and TypeMethodDescriptionstatic RefundRequestProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of RefundRequestProperties from the JsonReader.Get the reservationToReturn property: Reservation to return.Get the returnReason property: The reason of returning the reservation.scope()
Get the scope property: The scope of the refund, e.g.Get the sessionId property: SessionId that was returned by CalculateRefund API.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withReservationToReturn
(ReservationToReturn reservationToReturn) Set the reservationToReturn property: Reservation to return.withReturnReason
(String returnReason) Set the returnReason property: The reason of returning the reservation.Set the scope property: The scope of the refund, e.g.withSessionId
(String sessionId) Set the sessionId property: SessionId that was returned by CalculateRefund API.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
-
RefundRequestProperties
public RefundRequestProperties()Creates an instance of RefundRequestProperties class.
-
-
Method Details
-
sessionId
Get the sessionId property: SessionId that was returned by CalculateRefund API.- Returns:
- the sessionId value.
-
withSessionId
Set the sessionId property: SessionId that was returned by CalculateRefund API.- Parameters:
sessionId
- the sessionId value to set.- Returns:
- the RefundRequestProperties object itself.
-
scope
Get the scope property: The scope of the refund, e.g. Reservation.- Returns:
- the scope value.
-
withScope
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
Get the reservationToReturn property: Reservation to return.- Returns:
- the reservationToReturn value.
-
withReservationToReturn
Set the reservationToReturn property: Reservation to return.- Parameters:
reservationToReturn
- the reservationToReturn value to set.- Returns:
- the RefundRequestProperties object itself.
-
returnReason
Get the returnReason property: The reason of returning the reservation.- Returns:
- the returnReason value.
-
withReturnReason
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
- Specified by:
toJson
in interfacecom.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.
-