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
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

      public final SmoothingModel.Kind _kind()
      Description copied from interface: TaggedUnion
      Get the of the kind of variant held by this object.
      Specified by:
      _kind in interface TaggedUnion<SmoothingModel.Kind,​java.lang.Object>
      Returns:
      the variant kind
    • _get

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<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 kind laplace?
    • laplace

      public LaplaceSmoothingModel laplace()
      Get the laplace variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the laplace kind.
    • isLinearInterpolation

      public boolean isLinearInterpolation()
      Is this variant instance of kind linear_interpolation?
    • linearInterpolation

      public LinearInterpolationSmoothingModel linearInterpolation()
      Get the linear_interpolation variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the linear_interpolation kind.
    • isStupidBackoff

      public boolean isStupidBackoff()
      Is this variant instance of kind stupid_backoff?
    • stupidBackoff

      public StupidBackoffSmoothingModel stupidBackoff()
      Get the stupid_backoff variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the stupid_backoff kind.
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Specified by:
      serialize in interface JsonpSerializable
    • setupSmoothingModelDeserializer

      protected static void setupSmoothingModelDeserializer​(ObjectDeserializer<SmoothingModel.Builder> op)