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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Object
_get()
_kind()
Get the of the kind of variant held by this object.Get theclassification
variant value.fillMask()
Get thefill_mask
variant value.boolean
Is this variant instance of kindclassification
?boolean
Is this variant instance of kindfill_mask
?boolean
isNer()
Is this variant instance of kindner
?boolean
Is this variant instance of kindpass_through
?boolean
Is this variant instance of kindquestion_answering
?boolean
Is this variant instance of kindregression
?boolean
Is this variant instance of kindtext_classification
?boolean
Is this variant instance of kindtext_embedding
?boolean
Is this variant instance of kindtext_expansion
?boolean
Is this variant instance of kindzero_shot_classification
?ner()
Get thener
variant value.static InferenceConfigCreate
Get thepass_through
variant value.Get thequestion_answering
variant value.Get theregression
variant value.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
Get thetext_classification
variant value.Get thetext_embedding
variant value.Get thetext_expansion
variant value.toString()
Get thezero_shot_classification
variant value.
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
InferenceConfigCreate
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<InferenceConfigCreate.Kind,
Object> - Returns:
- the variant kind
-
_get
- Specified by:
_get
in 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 theregression
variant value.- Throws:
IllegalStateException
- if the current variant is not of theregression
kind.
-
isClassification
public boolean isClassification()Is this variant instance of kindclassification
? -
classification
Get theclassification
variant value.- Throws:
IllegalStateException
- if the current variant is not of theclassification
kind.
-
isTextClassification
public boolean isTextClassification()Is this variant instance of kindtext_classification
? -
textClassification
Get thetext_classification
variant value.- Throws:
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:
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:
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:
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:
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:
IllegalStateException
- if the current variant is not of thetext_embedding
kind.
-
isTextExpansion
public boolean isTextExpansion()Is this variant instance of kindtext_expansion
? -
textExpansion
Get thetext_expansion
variant value.- Throws:
IllegalStateException
- if the current variant is not of thetext_expansion
kind.
-
isQuestionAnswering
public boolean isQuestionAnswering()Is this variant instance of kindquestion_answering
? -
questionAnswering
Get thequestion_answering
variant value.- Throws:
IllegalStateException
- if the current variant is not of thequestion_answering
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
toString
-
setupInferenceConfigCreateDeserializer
protected static void setupInferenceConfigCreateDeserializer(ObjectDeserializer<InferenceConfigCreate.Builder> op)
-