Class InferenceConfig
java.lang.Object
co.elastic.clients.elasticsearch.ingest.InferenceConfig
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<InferenceConfig.Kind,java.lang.Object>
@JsonpDeserializable public class InferenceConfig extends java.lang.Object implements TaggedUnion<InferenceConfig.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInferenceConfig.Builderstatic classInferenceConfig.KindInferenceConfigvariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<InferenceConfig>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description InferenceConfig(InferenceConfigVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()InferenceConfig.Kind_kind()Get the of the kind of variant held by this object.InferenceConfigClassificationclassification()Get theclassificationvariant value.booleanisClassification()Is this variant instance of kindclassification?booleanisRegression()Is this variant instance of kindregression?static InferenceConfigof(java.util.function.Function<InferenceConfig.Builder,ObjectBuilder<InferenceConfig>> fn)InferenceConfigRegressionregression()Get theregressionvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupInferenceConfigDeserializer(ObjectDeserializer<InferenceConfig.Builder> op)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
InferenceConfig
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<InferenceConfig.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<InferenceConfig.Kind,java.lang.Object>
-
of
public static InferenceConfig of(java.util.function.Function<InferenceConfig.Builder,ObjectBuilder<InferenceConfig>> 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.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
setupInferenceConfigDeserializer
protected static void setupInferenceConfigDeserializer(ObjectDeserializer<InferenceConfig.Builder> op)
-