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 Summary
ConstructorsConstructorDescriptionCreates an instance of CalculateRefundRequestProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of CalculateRefundRequestProperties from the JsonReader.Get the reservationToReturn property: Reservation to return.scope()
Get the scope property: The scope of the refund, e.g.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.Set the scope property: The scope of the refund, e.g.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
-
CalculateRefundRequestProperties
public CalculateRefundRequestProperties()Creates an instance of CalculateRefundRequestProperties class.
-
-
Method Details
-
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 CalculateRefundRequestProperties object itself.
-
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
- Specified by:
toJson
in interfacecom.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.
-