java.lang.Object
co.elastic.clients.elasticsearch.indices.update_aliases.Action
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<Action.Kind,​java.lang.Object>

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

  • Constructor Details

  • Method Details

    • _kind

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

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

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

      public boolean isAdd()
      Is this variant instance of kind add?
    • add

      public AddAction add()
      Get the add variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the add kind.
    • isRemove

      public boolean isRemove()
      Is this variant instance of kind remove?
    • remove

      public RemoveAction remove()
      Get the remove variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the remove kind.
    • isRemoveIndex

      public boolean isRemoveIndex()
      Is this variant instance of kind remove_index?
    • removeIndex

      public RemoveIndexAction removeIndex()
      Get the remove_index variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the remove_index kind.
    • serialize

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

      protected static void setupActionDeserializer​(ObjectDeserializer<Action.Builder> op)