Class PatchModel
java.lang.Object
com.azure.resourcemanager.reservations.models.PatchModel
- All Implemented Interfaces:
com.azure.json.JsonSerializable<PatchModel>
The request for reservation patch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the appliedScopeProperties property: Properties specific to applied scope type.Get the appliedScopes property: List of the subscriptions that the benefit will be applied.Get the appliedScopeType property: Type of the Applied Scope.static PatchModel
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PatchModel from the JsonReader.Get the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group.name()
Get the name property: Display name of the reservation.renew()
Get the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.Get the renewProperties property: The renewProperties property.Get the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAppliedScopeProperties
(AppliedScopeProperties appliedScopeProperties) Set the appliedScopeProperties property: Properties specific to applied scope type.withAppliedScopes
(List<String> appliedScopes) Set the appliedScopes property: List of the subscriptions that the benefit will be applied.withAppliedScopeType
(AppliedScopeType appliedScopeType) Set the appliedScopeType property: Type of the Applied Scope.withInstanceFlexibility
(InstanceFlexibility instanceFlexibility) Set the instanceFlexibility property: Turning this on will apply the reservation discount to other VMs in the same VM size group.Set the name property: Display name of the reservation.Set the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.withRenewProperties
(PatchPropertiesRenewProperties renewProperties) Set the renewProperties property: The renewProperties property.withReviewDateTime
(OffsetDateTime reviewDateTime) Set the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.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
-
PatchModel
public PatchModel()Creates an instance of PatchModel class.
-
-
Method Details
-
appliedScopeType
Get the appliedScopeType property: Type of the Applied Scope.- Returns:
- the appliedScopeType value.
-
withAppliedScopeType
Set the appliedScopeType property: Type of the Applied Scope.- Parameters:
appliedScopeType
- the appliedScopeType value to set.- Returns:
- the PatchModel object itself.
-
appliedScopes
Get the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.- Returns:
- the appliedScopes value.
-
withAppliedScopes
Set the appliedScopes property: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.- Parameters:
appliedScopes
- the appliedScopes value to set.- Returns:
- the PatchModel object itself.
-
appliedScopeProperties
Get the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.- Returns:
- the appliedScopeProperties value.
-
withAppliedScopeProperties
Set the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.- Parameters:
appliedScopeProperties
- the appliedScopeProperties value to set.- Returns:
- the PatchModel object itself.
-
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
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 PatchModel object itself.
-
name
Get the name property: Display name of the reservation.- Returns:
- the name value.
-
withName
Set the name property: Display name of the reservation.- Parameters:
name
- the name value to set.- Returns:
- the PatchModel object itself.
-
renew
Get the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.- Returns:
- the renew value.
-
withRenew
Set the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.- Parameters:
renew
- the renew value to set.- Returns:
- the PatchModel object itself.
-
renewProperties
Get the renewProperties property: The renewProperties property.- Returns:
- the renewProperties value.
-
withRenewProperties
Set the renewProperties property: The renewProperties property.- Parameters:
renewProperties
- the renewProperties value to set.- Returns:
- the PatchModel object itself.
-
reviewDateTime
Get the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.- Returns:
- the reviewDateTime value.
-
withReviewDateTime
Set the reviewDateTime property: This is the date-time when the Azure hybrid benefit needs to be reviewed.- Parameters:
reviewDateTime
- the reviewDateTime value to set.- Returns:
- the PatchModel 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<PatchModel>
- Throws:
IOException
-
fromJson
Reads an instance of PatchModel from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of PatchModel 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 PatchModel.
-