Class NlpInferenceConfigUpdate

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

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

  • Constructor Details

  • Method Details

    • _kind

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

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

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

      public boolean isTextClassification()
      Is this variant instance of kind text_classification?
    • textClassification

      public TextClassificationInferenceUpdateOptions textClassification()
      Get the text_classification variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the text_classification kind.
    • isZeroShotClassification

      public boolean isZeroShotClassification()
      Is this variant instance of kind zero_shot_classification?
    • zeroShotClassification

      public ZeroShotClassificationInferenceUpdateOptions zeroShotClassification()
      Get the zero_shot_classification variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the zero_shot_classification kind.
    • isFillMask

      public boolean isFillMask()
      Is this variant instance of kind fill_mask?
    • fillMask

      public FillMaskInferenceUpdateOptions fillMask()
      Get the fill_mask variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the fill_mask kind.
    • isNer

      public boolean isNer()
      Is this variant instance of kind ner?
    • ner

      Get the ner variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the ner kind.
    • isPassThrough

      public boolean isPassThrough()
      Is this variant instance of kind pass_through?
    • passThrough

      public PassThroughInferenceUpdateOptions passThrough()
      Get the pass_through variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the pass_through kind.
    • isTextEmbedding

      public boolean isTextEmbedding()
      Is this variant instance of kind text_embedding?
    • textEmbedding

      public TextEmbeddingInferenceUpdateOptions textEmbedding()
      Get the text_embedding variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the text_embedding kind.
    • serialize

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

      protected static void setupNlpInferenceConfigUpdateDeserializer​(ObjectDeserializer<NlpInferenceConfigUpdate.Builder> op)