Class PutTrainedModelRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.ml.PutTrainedModelRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class PutTrainedModelRequest extends RequestBase implements JsonpSerializable
Enables you to supply a trained model that is not created by data frame analytics.
See Also:
  • Field Details

  • Method Details

    • of

    • compressedDefinition

      @Nullable public final String compressedDefinition()
      The compressed (GZipped and Base64 encoded) inference definition of the model. If compressed_definition is specified, then definition cannot be specified.

      API name: compressed_definition

    • deferDefinitionDecompression

      @Nullable public final Boolean deferDefinitionDecompression()
      If set to true and a compressed_definition is provided, the request defers definition decompression and skips relevant validations.

      API name: defer_definition_decompression

    • definition

      @Nullable public final Definition definition()
      The inference definition for the model. If definition is specified, then compressed_definition cannot be specified.

      API name: definition

    • description

      @Nullable public final String description()
      A human-readable description of the inference trained model.

      API name: description

    • inferenceConfig

      @Nullable public final InferenceConfigCreate inferenceConfig()
      The default configuration for inference. This can be either a regression or classification configuration. It must match the underlying definition.trained_model's target_type. For pre-packaged models such as ELSER the config is not required.

      API name: inference_config

    • input

      @Nullable public final Input input()
      The input field names for the model definition.

      API name: input

    • metadata

      @Nullable public final JsonData metadata()
      An object map that contains metadata about the model.

      API name: metadata

    • modelId

      public final String modelId()
      Required - The unique identifier of the trained model.

      API name: model_id

    • modelSizeBytes

      @Nullable public final Long modelSizeBytes()
      The estimated memory usage in bytes to keep the trained model in memory. This property is supported only if defer_definition_decompression is true or the model definition is not supplied.

      API name: model_size_bytes

    • modelType

      @Nullable public final TrainedModelType modelType()
      The model type.

      API name: model_type

    • platformArchitecture

      @Nullable public final String platformArchitecture()
      The platform architecture (if applicable) of the trained mode. If the model only works on one platform, because it is heavily optimized for a particular processor architecture and OS combination, then this field specifies which. The format of the string must match the platform identifiers used by Elasticsearch, so one of, linux-x86_64, linux-aarch64, darwin-x86_64, darwin-aarch64, or windows-x86_64. For portable models (those that work independent of processor architecture or OS features), leave this field unset.

      API name: platform_architecture

    • tags

      public final List<String> tags()
      An array of tags to organize the model.

      API name: tags

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupPutTrainedModelRequestDeserializer

      protected static void setupPutTrainedModelRequestDeserializer(ObjectDeserializer<PutTrainedModelRequest.Builder> op)