ReservationSwapProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.billing.models.ReservationSwapProperties

Implements

public final class ReservationSwapProperties
implements JsonSerializable<ReservationSwapProperties>

Properties of reservation swap.

Constructor Summary

Constructor Description
ReservationSwapProperties()

Creates an instance of ReservationSwapProperties class.

Method Summary

Modifier and Type Method and Description
static ReservationSwapProperties fromJson(JsonReader jsonReader)

Reads an instance of ReservationSwapProperties from the JsonReader.

String swapDestination()

Get the swapDestination property: Reservation resource id that the original resource gets swapped to.

String swapSource()

Get the swapSource property: Resource id of the source reservation that gets swapped.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ReservationSwapProperties withSwapDestination(String swapDestination)

Set the swapDestination property: Reservation resource id that the original resource gets swapped to.

ReservationSwapProperties withSwapSource(String swapSource)

Set the swapSource property: Resource id of the source reservation that gets swapped.

Methods inherited from java.lang.Object

Constructor Details

ReservationSwapProperties

public ReservationSwapProperties()

Creates an instance of ReservationSwapProperties class.

Method Details

fromJson

public static ReservationSwapProperties fromJson(JsonReader jsonReader)

Reads an instance of ReservationSwapProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ReservationSwapProperties 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 ReservationSwapProperties.

swapDestination

public String swapDestination()

Get the swapDestination property: Reservation resource id that the original resource gets swapped to. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Returns:

the swapDestination value.

swapSource

public String swapSource()

Get the swapSource property: Resource id of the source reservation that gets swapped. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Returns:

the swapSource value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withSwapDestination

public ReservationSwapProperties withSwapDestination(String swapDestination)

Set the swapDestination property: Reservation resource id that the original resource gets swapped to. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Parameters:

swapDestination - the swapDestination value to set.

Returns:

the ReservationSwapProperties object itself.

withSwapSource

public ReservationSwapProperties withSwapSource(String swapSource)

Set the swapSource property: Resource id of the source reservation that gets swapped. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Parameters:

swapSource - the swapSource value to set.

Returns:

the ReservationSwapProperties object itself.

Applies to