Class AutoscaleSettingResourcePatch
java.lang.Object
com.azure.resourcemanager.monitor.models.AutoscaleSettingResourcePatch
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AutoscaleSettingResourcePatch>
public final class AutoscaleSettingResourcePatch
extends Object
implements com.azure.json.JsonSerializable<AutoscaleSettingResourcePatch>
The autoscale setting object for patch operations.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AutoscaleSettingResourcePatch class. -
Method Summary
Modifier and TypeMethodDescriptionenabled()
Get the enabled property: the enabled flag.fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AutoscaleSettingResourcePatch from the JsonReader.name()
Get the name property: the name of the autoscale setting.Get the notifications property: the collection of notifications.Get the predictiveAutoscalePolicy property: the predictive autoscale policy mode.profiles()
Get the profiles property: the collection of automatic scaling profiles that specify different scaling parameters for different time periods.tags()
Get the tags property: Resource tags.Get the targetResourceLocation property: the location of the resource that the autoscale setting should be added to.Get the targetResourceUri property: the resource identifier of the resource that the autoscale setting should be added to.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withEnabled
(Boolean enabled) Set the enabled property: the enabled flag.Set the name property: the name of the autoscale setting.withNotifications
(List<AutoscaleNotification> notifications) Set the notifications property: the collection of notifications.withPredictiveAutoscalePolicy
(PredictiveAutoscalePolicy predictiveAutoscalePolicy) Set the predictiveAutoscalePolicy property: the predictive autoscale policy mode.withProfiles
(List<AutoscaleProfileInner> profiles) Set the profiles property: the collection of automatic scaling profiles that specify different scaling parameters for different time periods.Set the tags property: Resource tags.withTargetResourceLocation
(String targetResourceLocation) Set the targetResourceLocation property: the location of the resource that the autoscale setting should be added to.withTargetResourceUri
(String targetResourceUri) Set the targetResourceUri property: the resource identifier of the resource that the autoscale setting should be added to.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
-
AutoscaleSettingResourcePatch
public AutoscaleSettingResourcePatch()Creates an instance of AutoscaleSettingResourcePatch class.
-
-
Method Details
-
tags
Get the tags property: Resource tags.- Returns:
- the tags value.
-
withTags
Set the tags property: Resource tags.- Parameters:
tags
- the tags value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
profiles
Get the profiles property: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.- Returns:
- the profiles value.
-
withProfiles
Set the profiles property: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.- Parameters:
profiles
- the profiles value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
notifications
Get the notifications property: the collection of notifications.- Returns:
- the notifications value.
-
withNotifications
Set the notifications property: the collection of notifications.- Parameters:
notifications
- the notifications value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
enabled
Get the enabled property: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.- Returns:
- the enabled value.
-
withEnabled
Set the enabled property: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'.- Parameters:
enabled
- the enabled value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
predictiveAutoscalePolicy
Get the predictiveAutoscalePolicy property: the predictive autoscale policy mode.- Returns:
- the predictiveAutoscalePolicy value.
-
withPredictiveAutoscalePolicy
public AutoscaleSettingResourcePatch withPredictiveAutoscalePolicy(PredictiveAutoscalePolicy predictiveAutoscalePolicy) Set the predictiveAutoscalePolicy property: the predictive autoscale policy mode.- Parameters:
predictiveAutoscalePolicy
- the predictiveAutoscalePolicy value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
name
Get the name property: the name of the autoscale setting.- Returns:
- the name value.
-
withName
Set the name property: the name of the autoscale setting.- Parameters:
name
- the name value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
targetResourceUri
Get the targetResourceUri property: the resource identifier of the resource that the autoscale setting should be added to.- Returns:
- the targetResourceUri value.
-
withTargetResourceUri
Set the targetResourceUri property: the resource identifier of the resource that the autoscale setting should be added to.- Parameters:
targetResourceUri
- the targetResourceUri value to set.- Returns:
- the AutoscaleSettingResourcePatch object itself.
-
targetResourceLocation
Get the targetResourceLocation property: the location of the resource that the autoscale setting should be added to.- Returns:
- the targetResourceLocation value.
-
withTargetResourceLocation
Set the targetResourceLocation property: the location of the resource that the autoscale setting should be added to.- Parameters:
targetResourceLocation
- the targetResourceLocation value to set.- Returns:
- the AutoscaleSettingResourcePatch 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<AutoscaleSettingResourcePatch>
- Throws:
IOException
-
fromJson
public static AutoscaleSettingResourcePatch fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AutoscaleSettingResourcePatch from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AutoscaleSettingResourcePatch 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 AutoscaleSettingResourcePatch.
-