Class ScheduleEntry

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

public final class ScheduleEntry extends Object implements com.azure.json.JsonSerializable<ScheduleEntry>
Patch schedule entry for a Premium Redis Cache.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Get the dayOfWeek property: Day of the week when a cache can be patched.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ScheduleEntry from the JsonReader.
    Get the maintenanceWindow property: ISO8601 timespan specifying how much time cache patching can take.
    int
    Get the startHourUtc property: Start hour after which cache patching can start.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the dayOfWeek property: Day of the week when a cache can be patched.
    withMaintenanceWindow(Duration maintenanceWindow)
    Set the maintenanceWindow property: ISO8601 timespan specifying how much time cache patching can take.
    withStartHourUtc(int startHourUtc)
    Set the startHourUtc property: Start hour after which cache patching can start.

    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

    • ScheduleEntry

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

    • dayOfWeek

      public DayOfWeek dayOfWeek()
      Get the dayOfWeek property: Day of the week when a cache can be patched.
      Returns:
      the dayOfWeek value.
    • withDayOfWeek

      public ScheduleEntry withDayOfWeek(DayOfWeek dayOfWeek)
      Set the dayOfWeek property: Day of the week when a cache can be patched.
      Parameters:
      dayOfWeek - the dayOfWeek value to set.
      Returns:
      the ScheduleEntry object itself.
    • startHourUtc

      public int startHourUtc()
      Get the startHourUtc property: Start hour after which cache patching can start.
      Returns:
      the startHourUtc value.
    • withStartHourUtc

      public ScheduleEntry withStartHourUtc(int startHourUtc)
      Set the startHourUtc property: Start hour after which cache patching can start.
      Parameters:
      startHourUtc - the startHourUtc value to set.
      Returns:
      the ScheduleEntry object itself.
    • maintenanceWindow

      public Duration maintenanceWindow()
      Get the maintenanceWindow property: ISO8601 timespan specifying how much time cache patching can take.
      Returns:
      the maintenanceWindow value.
    • withMaintenanceWindow

      public ScheduleEntry withMaintenanceWindow(Duration maintenanceWindow)
      Set the maintenanceWindow property: ISO8601 timespan specifying how much time cache patching can take.
      Parameters:
      maintenanceWindow - the maintenanceWindow value to set.
      Returns:
      the ScheduleEntry 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<ScheduleEntry>
      Throws:
      IOException
    • fromJson

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