Class InferenceConfigCreate
java.lang.Object
co.elastic.clients.elasticsearch.ml.InferenceConfigCreate
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<InferenceConfigCreate.Kind,Object>
@JsonpDeserializable
public class InferenceConfigCreate
extends Object
implements TaggedUnion<InferenceConfigCreate.Kind,Object>, JsonpSerializable
Inference configuration provided when storing the model config
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Object_get()_kind()Get the of the kind of variant held by this object.Get theclassificationvariant value.fillMask()Get thefill_maskvariant value.booleanIs this variant instance of kindclassification?booleanIs this variant instance of kindfill_mask?booleanIs this variant instance of kindlearning_to_rank?booleanisNer()Is this variant instance of kindner?booleanIs this variant instance of kindpass_through?booleanIs this variant instance of kindquestion_answering?booleanIs this variant instance of kindregression?booleanIs this variant instance of kindtext_classification?booleanIs this variant instance of kindtext_embedding?booleanIs this variant instance of kindtext_expansion?booleanIs this variant instance of kindzero_shot_classification?Get thelearning_to_rankvariant value.ner()Get thenervariant value.static InferenceConfigCreateGet thepass_throughvariant value.Get thequestion_answeringvariant value.Get theregressionvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidGet thetext_classificationvariant value.Get thetext_embeddingvariant value.Get thetext_expansionvariant value.toString()Get thezero_shot_classificationvariant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
InferenceConfigCreate
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<InferenceConfigCreate.Kind,Object> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<InferenceConfigCreate.Kind,Object>
-
of
public static InferenceConfigCreate of(Function<InferenceConfigCreate.Builder, ObjectBuilder<InferenceConfigCreate>> fn) -
isRegression
public boolean isRegression()Is this variant instance of kindregression? -
regression
Get theregressionvariant value.- Throws:
IllegalStateException- if the current variant is not of theregressionkind.
-
isClassification
public boolean isClassification()Is this variant instance of kindclassification? -
classification
Get theclassificationvariant value.- Throws:
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:
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:
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:
IllegalStateException- if the current variant is not of thefill_maskkind.
-
isLearningToRank
public boolean isLearningToRank()Is this variant instance of kindlearning_to_rank? -
learningToRank
Get thelearning_to_rankvariant value.- Throws:
IllegalStateException- if the current variant is not of thelearning_to_rankkind.
-
isNer
public boolean isNer()Is this variant instance of kindner? -
ner
Get thenervariant value.- Throws:
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:
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:
IllegalStateException- if the current variant is not of thetext_embeddingkind.
-
isTextExpansion
public boolean isTextExpansion()Is this variant instance of kindtext_expansion? -
textExpansion
Get thetext_expansionvariant value.- Throws:
IllegalStateException- if the current variant is not of thetext_expansionkind.
-
isQuestionAnswering
public boolean isQuestionAnswering()Is this variant instance of kindquestion_answering? -
questionAnswering
Get thequestion_answeringvariant value.- Throws:
IllegalStateException- if the current variant is not of thequestion_answeringkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupInferenceConfigCreateDeserializer
protected static void setupInferenceConfigCreateDeserializer(ObjectDeserializer<InferenceConfigCreate.Builder> op)
-