Class TimeOfDay

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

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

  • Method Details

    • _kind

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

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

      public static TimeOfDay of​(java.util.function.Function<TimeOfDay.Builder,​ObjectBuilder<TimeOfDay>> 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