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 classSmoothingModel.Builderstatic classSmoothingModel.KindSmoothingModelvariant 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.booleanisLaplace()Is this variant instance of kindlaplace?booleanisLinearInterpolation()Is this variant instance of kindlinear_interpolation?booleanisStupidBackoff()Is this variant instance of kindstupid_backoff?LaplaceSmoothingModellaplace()Get thelaplacevariant value.LinearInterpolationSmoothingModellinearInterpolation()Get thelinear_interpolationvariant value.static SmoothingModelof(java.util.function.Function<SmoothingModel.Builder,ObjectBuilder<SmoothingModel>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupSmoothingModelDeserializer(ObjectDeserializer<SmoothingModel.Builder> op)StupidBackoffSmoothingModelstupidBackoff()Get thestupid_backoffvariant 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:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<SmoothingModel.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin 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 thelaplacevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thelaplacekind.
-
isLinearInterpolation
public boolean isLinearInterpolation()Is this variant instance of kindlinear_interpolation? -
linearInterpolation
Get thelinear_interpolationvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thelinear_interpolationkind.
-
isStupidBackoff
public boolean isStupidBackoff()Is this variant instance of kindstupid_backoff? -
stupidBackoff
Get thestupid_backoffvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thestupid_backoffkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
setupSmoothingModelDeserializer
protected static void setupSmoothingModelDeserializer(ObjectDeserializer<SmoothingModel.Builder> op)
-