Class PurchaseRequestPropertiesReservedResourceProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.PurchaseRequestPropertiesReservedResourceProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PurchaseRequestPropertiesReservedResourceProperties>
public final class PurchaseRequestPropertiesReservedResourceProperties
extends Object
implements com.azure.json.JsonSerializable<PurchaseRequestPropertiesReservedResourceProperties>
Properties specific to each reserved resource type. Not required if not applicable.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of PurchaseRequestPropertiesReservedResourceProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PurchaseRequestPropertiesReservedResourceProperties from the JsonReader.Get the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withInstanceFlexibility
(InstanceFlexibility instanceFlexibility) Set the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group.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
-
PurchaseRequestPropertiesReservedResourceProperties
public PurchaseRequestPropertiesReservedResourceProperties()Creates an instance of PurchaseRequestPropertiesReservedResourceProperties class.
-
-
Method Details
-
instanceFlexibility
Get the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.- Returns:
- the instanceFlexibility value.
-
withInstanceFlexibility
public PurchaseRequestPropertiesReservedResourceProperties withInstanceFlexibility(InstanceFlexibility instanceFlexibility) Set the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.- Parameters:
instanceFlexibility
- the instanceFlexibility value to set.- Returns:
- the PurchaseRequestPropertiesReservedResourceProperties 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<PurchaseRequestPropertiesReservedResourceProperties>
- Throws:
IOException
-
fromJson
public static PurchaseRequestPropertiesReservedResourceProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of PurchaseRequestPropertiesReservedResourceProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PurchaseRequestPropertiesReservedResourceProperties 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 PurchaseRequestPropertiesReservedResourceProperties.
-