SplitRequest Class

  • java.lang.Object
    • com.azure.resourcemanager.reservations.models.SplitRequest

Implements

public final class SplitRequest
implements JsonSerializable<SplitRequest>

The request for reservation split.

Constructor Summary

Constructor Description
SplitRequest()

Creates an instance of SplitRequest class.

Method Summary

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

Reads an instance of SplitRequest from the JsonReader.

List<Integer> quantities()

Get the quantities property: List of the quantities in the new reservations to create.

String reservationId()

Get the reservationId property: Resource id of the reservation to be split.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SplitRequest withQuantities(List<Integer> quantities)

Set the quantities property: List of the quantities in the new reservations to create.

SplitRequest withReservationId(String reservationId)

Set the reservationId property: Resource id of the reservation to be split.

Methods inherited from java.lang.Object

Constructor Details

SplitRequest

public SplitRequest()

Creates an instance of SplitRequest class.

Method Details

fromJson

public static SplitRequest fromJson(JsonReader jsonReader)

Reads an instance of SplitRequest from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

quantities

public List<Integer> quantities()

Get the quantities property: List of the quantities in the new reservations to create.

Returns:

the quantities value.

reservationId

public String reservationId()

Get the reservationId property: Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Returns:

the reservationId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withQuantities

public SplitRequest withQuantities(List<Integer> quantities)

Set the quantities property: List of the quantities in the new reservations to create.

Parameters:

quantities - the quantities value to set.

Returns:

the SplitRequest object itself.

withReservationId

public SplitRequest withReservationId(String reservationId)

Set the reservationId property: Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Parameters:

reservationId - the reservationId value to set.

Returns:

the SplitRequest object itself.

Applies to