java.lang.Object
co.elastic.clients.elasticsearch.ml.put_trained_model.Preprocessor
All Implemented Interfaces:
JsonpSerializable, TaggedUnion<Preprocessor.Kind,​java.lang.Object>

@JsonpDeserializable
public class Preprocessor
extends java.lang.Object
implements TaggedUnion<Preprocessor.Kind,​java.lang.Object>, JsonpSerializable
See Also:
API specification
  • Field Details

  • Constructor Details

  • Method Details

    • _kind

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

      public final java.lang.Object _get()
      Specified by:
      _get in interface TaggedUnion<Preprocessor.Kind,​java.lang.Object>
    • of

      public static Preprocessor of​(java.util.function.Function<Preprocessor.Builder,​ObjectBuilder<Preprocessor>> fn)
    • isFrequencyEncoding

      public boolean isFrequencyEncoding()
      Is this variant instance of kind frequency_encoding?
    • frequencyEncoding

      public FrequencyEncodingPreprocessor frequencyEncoding()
      Get the frequency_encoding variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the frequency_encoding kind.
    • isOneHotEncoding

      public boolean isOneHotEncoding()
      Is this variant instance of kind one_hot_encoding?
    • oneHotEncoding

      public OneHotEncodingPreprocessor oneHotEncoding()
      Get the one_hot_encoding variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the one_hot_encoding kind.
    • isTargetMeanEncoding

      public boolean isTargetMeanEncoding()
      Is this variant instance of kind target_mean_encoding?
    • targetMeanEncoding

      public TargetMeanEncodingPreprocessor targetMeanEncoding()
      Get the target_mean_encoding variant value.
      Throws:
      java.lang.IllegalStateException - if the current variant is not of the target_mean_encoding kind.
    • serialize

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

      protected static void setupPreprocessorDeserializer​(ObjectDeserializer<Preprocessor.Builder> op)