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 Details

    • AutoscaleProfileInner

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

    • name

      public String name()
      Get the name property: the name of the profile.
      Returns:
      the name value.
    • withName

      public AutoscaleProfileInner withName(String name)
      Set the name property: the name of the profile.
      Parameters:
      name - the name value to set.
      Returns:
      the AutoscaleProfileInner object itself.
    • capacity

      public ScaleCapacity capacity()
      Get the capacity property: the number of instances that can be used during this profile.
      Returns:
      the capacity value.
    • withCapacity

      public AutoscaleProfileInner withCapacity(ScaleCapacity capacity)
      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

      public List<ScaleRuleInner> 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

      public AutoscaleProfileInner withRules(List<ScaleRuleInner> rules)
      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

      public TimeWindow 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

      public AutoscaleProfileInner withFixedDate(TimeWindow fixedDate)
      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

      public Recurrence 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

      public AutoscaleProfileInner withRecurrence(Recurrence recurrence)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.