Class ScaleCapacity

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

public final class ScaleCapacity extends Object implements com.azure.json.JsonSerializable<ScaleCapacity>
The number of instances that can be used during this profile.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ScaleCapacity class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the defaultProperty property: the number of instances that will be set if metrics are not available for evaluation.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ScaleCapacity from the JsonReader.
    Get the maximum property: the maximum number of instances for the resource.
    Get the minimum property: the minimum number of instances for the resource.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDefaultProperty(String defaultProperty)
    Set the defaultProperty property: the number of instances that will be set if metrics are not available for evaluation.
    Set the maximum property: the maximum number of instances for the resource.
    Set the minimum property: the minimum number of instances for the resource.

    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

    • ScaleCapacity

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

    • minimum

      public String minimum()
      Get the minimum property: the minimum number of instances for the resource.
      Returns:
      the minimum value.
    • withMinimum

      public ScaleCapacity withMinimum(String minimum)
      Set the minimum property: the minimum number of instances for the resource.
      Parameters:
      minimum - the minimum value to set.
      Returns:
      the ScaleCapacity object itself.
    • maximum

      public String maximum()
      Get the maximum property: the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription.
      Returns:
      the maximum value.
    • withMaximum

      public ScaleCapacity withMaximum(String maximum)
      Set the maximum property: the maximum number of instances for the resource. The actual maximum number of instances is limited by the cores that are available in the subscription.
      Parameters:
      maximum - the maximum value to set.
      Returns:
      the ScaleCapacity object itself.
    • defaultProperty

      public String defaultProperty()
      Get the defaultProperty property: the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default.
      Returns:
      the defaultProperty value.
    • withDefaultProperty

      public ScaleCapacity withDefaultProperty(String defaultProperty)
      Set the defaultProperty property: the number of instances that will be set if metrics are not available for evaluation. The default is only used if the current instance count is lower than the default.
      Parameters:
      defaultProperty - the defaultProperty value to set.
      Returns:
      the ScaleCapacity 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<ScaleCapacity>
      Throws:
      IOException
    • fromJson

      public static ScaleCapacity fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ScaleCapacity from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ScaleCapacity 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 ScaleCapacity.