Class Scale
java.lang.Object
com.azure.resourcemanager.appservice.models.Scale
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Scale>
Container App scaling configurations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Scale
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of Scale from the JsonReader.Get the maxReplicas property: Optional.Get the minReplicas property: Optional.rules()
Get the rules property: Scaling rules.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withMaxReplicas
(Integer maxReplicas) Set the maxReplicas property: Optional.withMinReplicas
(Integer minReplicas) Set the minReplicas property: Optional.Set the rules property: Scaling rules.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
-
Scale
public Scale()Creates an instance of Scale class.
-
-
Method Details
-
minReplicas
Get the minReplicas property: Optional. Minimum number of container replicas.- Returns:
- the minReplicas value.
-
withMinReplicas
Set the minReplicas property: Optional. Minimum number of container replicas.- Parameters:
minReplicas
- the minReplicas value to set.- Returns:
- the Scale object itself.
-
maxReplicas
Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set.- Returns:
- the maxReplicas value.
-
withMaxReplicas
Set the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set.- Parameters:
maxReplicas
- the maxReplicas value to set.- Returns:
- the Scale object itself.
-
rules
Get the rules property: Scaling rules.- Returns:
- the rules value.
-
withRules
Set the rules property: Scaling rules.- Parameters:
rules
- the rules value to set.- Returns:
- the Scale 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<Scale>
- Throws:
IOException
-
fromJson
Reads an instance of Scale from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of Scale 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 Scale.
-