Class SmoothingModel
java.lang.Object
co.elastic.clients.elasticsearch.core.search.SmoothingModel
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<SmoothingModel.Kind,java.lang.Object>
@JsonpDeserializable public class SmoothingModel extends java.lang.Object implements TaggedUnion<SmoothingModel.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmoothingModel.Builder
static class
SmoothingModel.Kind
SmoothingModel
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SmoothingModel>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description SmoothingModel(SmoothingModelVariant value)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
SmoothingModel.Kind
_kind()
Get the of the kind of variant held by this object.boolean
isLaplace()
Is this variant instance of kindlaplace
?boolean
isLinearInterpolation()
Is this variant instance of kindlinear_interpolation
?boolean
isStupidBackoff()
Is this variant instance of kindstupid_backoff
?LaplaceSmoothingModel
laplace()
Get thelaplace
variant value.LinearInterpolationSmoothingModel
linearInterpolation()
Get thelinear_interpolation
variant value.static SmoothingModel
of(java.util.function.Function<SmoothingModel.Builder,ObjectBuilder<SmoothingModel>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupSmoothingModelDeserializer(ObjectDeserializer<SmoothingModel.Builder> op)
StupidBackoffSmoothingModel
stupidBackoff()
Get thestupid_backoff
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
-
SmoothingModel
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<SmoothingModel.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<SmoothingModel.Kind,java.lang.Object>
-
of
public static SmoothingModel of(java.util.function.Function<SmoothingModel.Builder,ObjectBuilder<SmoothingModel>> fn) -
isLaplace
public boolean isLaplace()Is this variant instance of kindlaplace
? -
laplace
Get thelaplace
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelaplace
kind.
-
isLinearInterpolation
public boolean isLinearInterpolation()Is this variant instance of kindlinear_interpolation
? -
linearInterpolation
Get thelinear_interpolation
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thelinear_interpolation
kind.
-
isStupidBackoff
public boolean isStupidBackoff()Is this variant instance of kindstupid_backoff
? -
stupidBackoff
Get thestupid_backoff
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thestupid_backoff
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupSmoothingModelDeserializer
protected static void setupSmoothingModelDeserializer(ObjectDeserializer<SmoothingModel.Builder> op)
-