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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NlpInferenceConfigUpdate.Builder
static class
NlpInferenceConfigUpdate.Kind
NlpInferenceConfigUpdate
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<NlpInferenceConfigUpdate>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description NlpInferenceConfigUpdate(NlpInferenceConfigUpdateVariant value)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
NlpInferenceConfigUpdate.Kind
_kind()
Get the of the kind of variant held by this object.FillMaskInferenceUpdateOptions
fillMask()
Get thefill_mask
variant value.boolean
isFillMask()
Is this variant instance of kindfill_mask
?boolean
isNer()
Is this variant instance of kindner
?boolean
isPassThrough()
Is this variant instance of kindpass_through
?boolean
isTextClassification()
Is this variant instance of kindtext_classification
?boolean
isTextEmbedding()
Is this variant instance of kindtext_embedding
?boolean
isZeroShotClassification()
Is this variant instance of kindzero_shot_classification
?NerInferenceUpdateOptions
ner()
Get thener
variant value.static NlpInferenceConfigUpdate
of(java.util.function.Function<NlpInferenceConfigUpdate.Builder,ObjectBuilder<NlpInferenceConfigUpdate>> fn)
PassThroughInferenceUpdateOptions
passThrough()
Get thepass_through
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupNlpInferenceConfigUpdateDeserializer(ObjectDeserializer<NlpInferenceConfigUpdate.Builder> op)
TextClassificationInferenceUpdateOptions
textClassification()
Get thetext_classification
variant value.TextEmbeddingInferenceUpdateOptions
textEmbedding()
Get thetext_embedding
variant value.ZeroShotClassificationInferenceUpdateOptions
zeroShotClassification()
Get thezero_shot_classification
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
NlpInferenceConfigUpdate
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<NlpInferenceConfigUpdate.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<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 kindtext_classification
? -
textClassification
Get thetext_classification
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetext_classification
kind.
-
isZeroShotClassification
public boolean isZeroShotClassification()Is this variant instance of kindzero_shot_classification
? -
zeroShotClassification
Get thezero_shot_classification
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thezero_shot_classification
kind.
-
isFillMask
public boolean isFillMask()Is this variant instance of kindfill_mask
? -
fillMask
Get thefill_mask
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefill_mask
kind.
-
isNer
public boolean isNer()Is this variant instance of kindner
? -
ner
Get thener
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thener
kind.
-
isPassThrough
public boolean isPassThrough()Is this variant instance of kindpass_through
? -
passThrough
Get thepass_through
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thepass_through
kind.
-
isTextEmbedding
public boolean isTextEmbedding()Is this variant instance of kindtext_embedding
? -
textEmbedding
Get thetext_embedding
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thetext_embedding
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupNlpInferenceConfigUpdateDeserializer
protected static void setupNlpInferenceConfigUpdateDeserializer(ObjectDeserializer<NlpInferenceConfigUpdate.Builder> op)
-