Class AutoscaleProfileInner
java.lang.Object
com.azure.resourcemanager.monitor.fluent.models.AutoscaleProfileInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AutoscaleProfileInner>
public final class AutoscaleProfileInner
extends Object
implements com.azure.json.JsonSerializable<AutoscaleProfileInner>
Autoscale profile.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapacity()
Get the capacity property: the number of instances that can be used during this profile.Get the fixedDate property: the specific date-time for the profile.static AutoscaleProfileInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AutoscaleProfileInner from the JsonReader.name()
Get the name property: the name of the profile.Get the recurrence property: the repeating times at which this profile begins.rules()
Get the rules property: the collection of rules that provide the triggers and parameters for the scaling action.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withCapacity
(ScaleCapacity capacity) Set the capacity property: the number of instances that can be used during this profile.withFixedDate
(TimeWindow fixedDate) Set the fixedDate property: the specific date-time for the profile.Set the name property: the name of the profile.withRecurrence
(Recurrence recurrence) Set the recurrence property: the repeating times at which this profile begins.withRules
(List<ScaleRuleInner> rules) Set the rules property: the collection of rules that provide the triggers and parameters for the scaling action.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
-
AutoscaleProfileInner
public AutoscaleProfileInner()Creates an instance of AutoscaleProfileInner class.
-
-
Method Details
-
name
Get the name property: the name of the profile.- Returns:
- the name value.
-
withName
Set the name property: the name of the profile.- Parameters:
name
- the name value to set.- Returns:
- the AutoscaleProfileInner object itself.
-
capacity
Get the capacity property: the number of instances that can be used during this profile.- Returns:
- the capacity value.
-
withCapacity
Set the capacity property: the number of instances that can be used during this profile.- Parameters:
capacity
- the capacity value to set.- Returns:
- the AutoscaleProfileInner object itself.
-
rules
Get the rules property: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.- Returns:
- the rules value.
-
withRules
Set the rules property: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified.- Parameters:
rules
- the rules value to set.- Returns:
- the AutoscaleProfileInner object itself.
-
fixedDate
Get the fixedDate property: the specific date-time for the profile. This element is not used if the Recurrence element is used.- Returns:
- the fixedDate value.
-
withFixedDate
Set the fixedDate property: the specific date-time for the profile. This element is not used if the Recurrence element is used.- Parameters:
fixedDate
- the fixedDate value to set.- Returns:
- the AutoscaleProfileInner object itself.
-
recurrence
Get the recurrence property: the repeating times at which this profile begins. This element is not used if the FixedDate element is used.- Returns:
- the recurrence value.
-
withRecurrence
Set the recurrence property: the repeating times at which this profile begins. This element is not used if the FixedDate element is used.- Parameters:
recurrence
- the recurrence value to set.- Returns:
- the AutoscaleProfileInner 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<AutoscaleProfileInner>
- Throws:
IOException
-
fromJson
public static AutoscaleProfileInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AutoscaleProfileInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AutoscaleProfileInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the AutoscaleProfileInner.
-