Class TargetUtilizationScaleSettings

java.lang.Object
com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings
com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings
All Implemented Interfaces:
com.azure.json.JsonSerializable<OnlineScaleSettings>

public final class TargetUtilizationScaleSettings extends OnlineScaleSettings
The TargetUtilizationScaleSettings model.
  • Constructor Details

    • TargetUtilizationScaleSettings

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

    • scaleType

      public ScaleType scaleType()
      Get the scaleType property: [Required] Type of deployment scaling algorithm.
      Overrides:
      scaleType in class OnlineScaleSettings
      Returns:
      the scaleType value.
    • pollingInterval

      public Duration pollingInterval()
      Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.
      Returns:
      the pollingInterval value.
    • withPollingInterval

      public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval)
      Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.
      Parameters:
      pollingInterval - the pollingInterval value to set.
      Returns:
      the TargetUtilizationScaleSettings object itself.
    • targetUtilizationPercentage

      public Integer targetUtilizationPercentage()
      Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler.
      Returns:
      the targetUtilizationPercentage value.
    • withTargetUtilizationPercentage

      public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage)
      Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler.
      Parameters:
      targetUtilizationPercentage - the targetUtilizationPercentage value to set.
      Returns:
      the TargetUtilizationScaleSettings object itself.
    • minInstances

      public Integer minInstances()
      Get the minInstances property: The minimum number of instances to always be present.
      Returns:
      the minInstances value.
    • withMinInstances

      public TargetUtilizationScaleSettings withMinInstances(Integer minInstances)
      Set the minInstances property: The minimum number of instances to always be present.
      Parameters:
      minInstances - the minInstances value to set.
      Returns:
      the TargetUtilizationScaleSettings object itself.
    • maxInstances

      public Integer maxInstances()
      Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances.
      Returns:
      the maxInstances value.
    • withMaxInstances

      public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances)
      Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances.
      Parameters:
      maxInstances - the maxInstances value to set.
      Returns:
      the TargetUtilizationScaleSettings object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class OnlineScaleSettings
      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<OnlineScaleSettings>
      Overrides:
      toJson in class OnlineScaleSettings
      Throws:
      IOException
    • fromJson

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