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 -
Method Summary
Modifier and TypeMethodDescriptionintGet the defaultCount property: Setting default node count of current schedule configuration.static ScheduleBasedConfigfromJson(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).timeZone()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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDefaultCount(int defaultCount) Set the defaultCount property: Setting default node count of current schedule configuration.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).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, waitMethods 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
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
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
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
-
withSchedules
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
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ScheduleBasedConfig>- Throws:
IOException
-
fromJson
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.
-