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

@JsonpDeserializable
public class Schedule
extends java.lang.Object
implements TaggedUnion<java.lang.Object>, TriggerVariant, JsonpSerializable
  • Field Details

  • Constructor Details

  • Method Details

    • _variantType

      public java.lang.String _variantType()
      Trigger variant type
      Specified by:
      _variantType in interface UnionVariant
    • _type

      public java.lang.String _type()
      Description copied from interface: TaggedUnion
      Get the of the type of the variant held by this union object.
      Specified by:
      _type in interface TaggedUnion<java.lang.Object>
      Returns:
      the variant type
    • _get

      public java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<java.lang.Object>
    • 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.
    • daily

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

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

      public java.lang.String interval()
      Get the interval variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the interval kind.
    • 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.
    • 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.
    • 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​(DelegatingDeserializer<Schedule.Builder> op)