Class CapacityReservationInstanceView
java.lang.Object
com.azure.resourcemanager.compute.models.CapacityReservationInstanceView
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CapacityReservationInstanceView>
- Direct Known Subclasses:
CapacityReservationInstanceViewWithName
public class CapacityReservationInstanceView
extends Object
implements com.azure.json.JsonSerializable<CapacityReservationInstanceView>
The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity
reservation that is managed by the platform and can change outside of control plane operations.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CapacityReservationInstanceView class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CapacityReservationInstanceView from the JsonReader.statuses()Get the statuses property: The resource status information.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the utilizationInfo property: Unutilized capacity of the capacity reservation.voidvalidate()Validates the instance.withStatuses(List<InstanceViewStatus> statuses) Set the statuses property: The resource status information.withUtilizationInfo(CapacityReservationUtilization utilizationInfo) Set the utilizationInfo property: Unutilized capacity of the capacity reservation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
CapacityReservationInstanceView
public CapacityReservationInstanceView()Creates an instance of CapacityReservationInstanceView class.
-
-
Method Details
-
utilizationInfo
Get the utilizationInfo property: Unutilized capacity of the capacity reservation.- Returns:
- the utilizationInfo value.
-
withUtilizationInfo
public CapacityReservationInstanceView withUtilizationInfo(CapacityReservationUtilization utilizationInfo) Set the utilizationInfo property: Unutilized capacity of the capacity reservation.- Parameters:
utilizationInfo- the utilizationInfo value to set.- Returns:
- the CapacityReservationInstanceView object itself.
-
statuses
Get the statuses property: The resource status information.- Returns:
- the statuses value.
-
withStatuses
Set the statuses property: The resource status information.- Parameters:
statuses- the statuses value to set.- Returns:
- the CapacityReservationInstanceView object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CapacityReservationInstanceView>- Throws:
IOException
-
fromJson
public static CapacityReservationInstanceView fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CapacityReservationInstanceView from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CapacityReservationInstanceView 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 CapacityReservationInstanceView.
-