Class CapacityReservationInstanceViewWithName
java.lang.Object
com.azure.resourcemanager.compute.models.CapacityReservationInstanceView
com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewWithName
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CapacityReservationInstanceView>
The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the
response to the instance view of a capacity reservation group.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of CapacityReservationInstanceViewWithName class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CapacityReservationInstanceViewWithName from the JsonReader.name()Get the name property: The name of the capacity reservation.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) 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 CapacityReservationInstanceView
statuses, utilizationInfoMethods inherited from class 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
-
CapacityReservationInstanceViewWithName
public CapacityReservationInstanceViewWithName()Creates an instance of CapacityReservationInstanceViewWithName class.
-
-
Method Details
-
name
Get the name property: The name of the capacity reservation.- Returns:
- the name value.
-
withUtilizationInfo
public CapacityReservationInstanceViewWithName withUtilizationInfo(CapacityReservationUtilization utilizationInfo) Set the utilizationInfo property: Unutilized capacity of the capacity reservation.- Overrides:
withUtilizationInfoin classCapacityReservationInstanceView- Parameters:
utilizationInfo- the utilizationInfo value to set.- Returns:
- the CapacityReservationInstanceView object itself.
-
withStatuses
Set the statuses property: The resource status information.- Overrides:
withStatusesin classCapacityReservationInstanceView- Parameters:
statuses- the statuses value to set.- Returns:
- the CapacityReservationInstanceView object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classCapacityReservationInstanceView- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<CapacityReservationInstanceView>- Overrides:
toJsonin classCapacityReservationInstanceView- Throws:
IOException
-
fromJson
public static CapacityReservationInstanceViewWithName fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of CapacityReservationInstanceViewWithName from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CapacityReservationInstanceViewWithName 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 CapacityReservationInstanceViewWithName.
-