Class ScheduleBasedConfig

java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig
All Implemented Interfaces:
com.azure.json.JsonSerializable<ScheduleBasedConfig>

public final class ScheduleBasedConfig extends Object implements com.azure.json.JsonSerializable<ScheduleBasedConfig>
Profile of schedule based Autoscale.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    int
    Get the defaultCount property: Setting default node count of current schedule configuration.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ScheduleBasedConfig from the JsonReader.
    Get the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple rules within the schedule across days and times (start/end).
    Get the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withDefaultCount(int defaultCount)
    Set the defaultCount property: Setting default node count of current schedule configuration.
    Set the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple rules within the schedule across days and times (start/end).
    withTimeZone(String timeZone)
    Set the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration.

    Methods inherited from class 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

    • ScheduleBasedConfig

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

    • timeZone

      public String timeZone()
      Get the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration.
      Returns:
      the timeZone value.
    • withTimeZone

      public ScheduleBasedConfig withTimeZone(String timeZone)
      Set the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule based autoscale configuration.
      Parameters:
      timeZone - the timeZone value to set.
      Returns:
      the ScheduleBasedConfig object itself.
    • defaultCount

      public int defaultCount()
      Get the defaultCount property: Setting default node count of current schedule configuration. Default node count specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale down).
      Returns:
      the defaultCount value.
    • withDefaultCount

      public ScheduleBasedConfig withDefaultCount(int defaultCount)
      Set the defaultCount property: Setting default node count of current schedule configuration. Default node count specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale down).
      Parameters:
      defaultCount - the defaultCount value to set.
      Returns:
      the ScheduleBasedConfig object itself.
    • schedules

      public List<Schedule> schedules()
      Get the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple rules within the schedule across days and times (start/end).
      Returns:
      the schedules value.
    • withSchedules

      public ScheduleBasedConfig withSchedules(List<Schedule> schedules)
      Set the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user has a choice to set multiple rules within the schedule across days and times (start/end).
      Parameters:
      schedules - the schedules value to set.
      Returns:
      the ScheduleBasedConfig 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<ScheduleBasedConfig>
      Throws:
      IOException
    • fromJson

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