java.lang.Object
com.azure.resourcemanager.appservice.models.Scale
All Implemented Interfaces:
com.azure.json.JsonSerializable<Scale>

public final class Scale extends Object implements com.azure.json.JsonSerializable<Scale>
Container App scaling configurations.
  • Constructor Details

    • Scale

      public Scale()
      Creates an instance of Scale class.
  • Method Details

    • minReplicas

      public Integer minReplicas()
      Get the minReplicas property: Optional. Minimum number of container replicas.
      Returns:
      the minReplicas value.
    • withMinReplicas

      public Scale withMinReplicas(Integer minReplicas)
      Set the minReplicas property: Optional. Minimum number of container replicas.
      Parameters:
      minReplicas - the minReplicas value to set.
      Returns:
      the Scale object itself.
    • maxReplicas

      public Integer maxReplicas()
      Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set.
      Returns:
      the maxReplicas value.
    • withMaxReplicas

      public Scale withMaxReplicas(Integer maxReplicas)
      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

      public List<ScaleRule> rules()
      Get the rules property: Scaling rules.
      Returns:
      the rules value.
    • withRules

      public Scale withRules(List<ScaleRule> rules)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<Scale>
      Throws:
      IOException
    • fromJson

      public static Scale fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.