Class FieldValue

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

@JsonpDeserializable
public class FieldValue
extends java.lang.Object
implements TaggedUnion<FieldValue.Kind,​java.lang.Object>, JsonpSerializable
  • Field Details

  • Method Details

    • of

      public static FieldValue of​(long value)
    • of

      public static FieldValue of​(double value)
    • of

      public static FieldValue of​(boolean value)
    • of

      public static FieldValue of​(java.lang.String value)
    • _kind

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

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

      public java.lang.String _toJsonString()
    • of

      public static FieldValue of​(java.util.function.Consumer<FieldValue.Builder> fn)
    • isDouble

      public boolean isDouble()
      Is this variant instance of kind double?
    • doubleValue

      public double doubleValue()
      Get the double variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the double kind.
    • isLong

      public boolean isLong()
      Is this variant instance of kind long?
    • longValue

      public long longValue()
      Get the long variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the long kind.
    • isBoolean

      public boolean isBoolean()
      Is this variant instance of kind boolean?
    • booleanValue

      public boolean booleanValue()
      Get the boolean variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the boolean kind.
    • isString

      public boolean isString()
      Is this variant instance of kind string?
    • stringValue

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

      public boolean isNull()
      Is this variant instance of kind null?
    • serialize

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