java.lang.Object
co.elastic.clients.elasticsearch.watcher.Schedule
All Implemented Interfaces:
TriggerVariant, JsonpSerializable, TaggedUnion<Schedule.Kind,​java.lang.Object>

@JsonpDeserializable
public class Schedule
extends java.lang.Object
implements TaggedUnion<Schedule.Kind,​java.lang.Object>, TriggerVariant, JsonpSerializable
See Also:
API specification
  • Field Details

  • Constructor Details

  • Method Details

    • _triggerKind

      public Trigger.Kind _triggerKind()
      Trigger variant kind.
      Specified by:
      _triggerKind in interface TriggerVariant
    • _kind

      public final Schedule.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<Schedule.Kind,​java.lang.Object>
      Returns:
      the variant kind
    • _get

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<Schedule.Kind,​java.lang.Object>
    • of

      public static Schedule of​(java.util.function.Function<Schedule.Builder,​ObjectBuilder<Schedule>> fn)
    • isCron

      public boolean isCron()
      Is this variant instance of kind cron?
    • cron

      public java.lang.String cron()
      Get the cron variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the cron kind.
    • isDaily

      public boolean isDaily()
      Is this variant instance of kind daily?
    • daily

      public DailySchedule daily()
      Get the daily variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the daily kind.
    • isHourly

      public boolean isHourly()
      Is this variant instance of kind hourly?
    • hourly

      public HourlySchedule hourly()
      Get the hourly variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the hourly kind.
    • isInterval

      public boolean isInterval()
      Is this variant instance of kind interval?
    • interval

      public Time interval()
      Get the interval variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the interval kind.
    • isMonthly

      public boolean isMonthly()
      Is this variant instance of kind monthly?
    • monthly

      public java.util.List<TimeOfMonth> monthly()
      Get the monthly variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the monthly kind.
    • isWeekly

      public boolean isWeekly()
      Is this variant instance of kind weekly?
    • weekly

      public java.util.List<TimeOfWeek> weekly()
      Get the weekly variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the weekly kind.
    • isYearly

      public boolean isYearly()
      Is this variant instance of kind yearly?
    • yearly

      public java.util.List<TimeOfYear> yearly()
      Get the yearly variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the yearly kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupScheduleDeserializer

      protected static void setupScheduleDeserializer​(ObjectDeserializer<Schedule.Builder> op)