Class InferenceConfigUpdate
java.lang.Object
co.elastic.clients.elasticsearch.ml.InferenceConfigUpdate
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<InferenceConfigUpdate.Kind,java.lang.Object>
@JsonpDeserializable public class InferenceConfigUpdate extends java.lang.Object implements TaggedUnion<InferenceConfigUpdate.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInferenceConfigUpdate.Builderstatic classInferenceConfigUpdate.KindInferenceConfigUpdatevariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<InferenceConfigUpdate>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description InferenceConfigUpdate(InferenceConfigUpdateVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()InferenceConfigUpdate.Kind_kind()Get the of the kind of variant held by this object.ClassificationInferenceOptionsclassification()Get theclassificationvariant value.FillMaskInferenceUpdateOptionsfillMask()Get thefill_maskvariant value.booleanisClassification()Is this variant instance of kindclassification?booleanisFillMask()Is this variant instance of kindfill_mask?booleanisNer()Is this variant instance of kindner?booleanisPassThrough()Is this variant instance of kindpass_through?booleanisQuestionAnswering()Is this variant instance of kindquestion_answering?booleanisRegression()Is this variant instance of kindregression?booleanisTextClassification()Is this variant instance of kindtext_classification?booleanisTextEmbedding()Is this variant instance of kindtext_embedding?booleanisZeroShotClassification()Is this variant instance of kindzero_shot_classification?NerInferenceUpdateOptionsner()Get thenervariant value.static InferenceConfigUpdateof(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn)PassThroughInferenceUpdateOptionspassThrough()Get thepass_throughvariant value.QuestionAnsweringInferenceUpdateOptionsquestionAnswering()Get thequestion_answeringvariant value.RegressionInferenceOptionsregression()Get theregressionvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupInferenceConfigUpdateDeserializer(ObjectDeserializer<InferenceConfigUpdate.Builder> op)TextClassificationInferenceUpdateOptionstextClassification()Get thetext_classificationvariant value.TextEmbeddingInferenceUpdateOptionstextEmbedding()Get thetext_embeddingvariant value.java.lang.StringtoString()ZeroShotClassificationInferenceUpdateOptionszeroShotClassification()Get thezero_shot_classificationvariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
InferenceConfigUpdate
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<InferenceConfigUpdate.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<InferenceConfigUpdate.Kind,java.lang.Object>
-
of
public static InferenceConfigUpdate of(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn) -
isRegression
public boolean isRegression()Is this variant instance of kindregression? -
regression
Get theregressionvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theregressionkind.
-
isClassification
public boolean isClassification()Is this variant instance of kindclassification? -
classification
Get theclassificationvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theclassificationkind.
-
isTextClassification
public boolean isTextClassification()Is this variant instance of kindtext_classification? -
textClassification
Get thetext_classificationvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetext_classificationkind.
-
isZeroShotClassification
public boolean isZeroShotClassification()Is this variant instance of kindzero_shot_classification? -
zeroShotClassification
Get thezero_shot_classificationvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thezero_shot_classificationkind.
-
isFillMask
public boolean isFillMask()Is this variant instance of kindfill_mask? -
fillMask
Get thefill_maskvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefill_maskkind.
-
isNer
public boolean isNer()Is this variant instance of kindner? -
ner
Get thenervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thenerkind.
-
isPassThrough
public boolean isPassThrough()Is this variant instance of kindpass_through? -
passThrough
Get thepass_throughvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thepass_throughkind.
-
isTextEmbedding
public boolean isTextEmbedding()Is this variant instance of kindtext_embedding? -
textEmbedding
Get thetext_embeddingvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thetext_embeddingkind.
-
isQuestionAnswering
public boolean isQuestionAnswering()Is this variant instance of kindquestion_answering? -
questionAnswering
Get thequestion_answeringvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thequestion_answeringkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupInferenceConfigUpdateDeserializer
protected static void setupInferenceConfigUpdateDeserializer(ObjectDeserializer<InferenceConfigUpdate.Builder> op)
-