Class ScheduleTimeOfDay

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

@JsonpDeserializable
public class ScheduleTimeOfDay
extends java.lang.Object
implements TaggedUnion<ScheduleTimeOfDay.Kind,​java.lang.Object>, JsonpSerializable
A time of day, expressed either as hh:mm, noon, midnight, or an hour/minutes structure.
See Also:
API specification
  • Field Details

  • Method Details

    • _kind

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

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

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

      public boolean isText()
      Is this variant instance of kind text?
    • text

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

      public boolean isHourMinute()
      Is this variant instance of kind hour_minute?
    • hourMinute

      public HourAndMinute hourMinute()
      Get the hour_minute variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the hour_minute kind.
    • serialize

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

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object