Class InferTrainedModelRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
co.elastic.clients.elasticsearch.ml.InferTrainedModelRequest.Builder
- All Implemented Interfaces:
- WithJson<InferTrainedModelRequest.Builder>,- ObjectBuilder<InferTrainedModelRequest>
- Enclosing class:
- InferTrainedModelRequest
public static class InferTrainedModelRequest.Builder
extends RequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
implements ObjectBuilder<InferTrainedModelRequest>
Builder for 
InferTrainedModelRequest.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aInferTrainedModelRequest.Required - An array of objects to pass to the model for inference.Required - An array of objects to pass to the model for inference.The inference configuration updates to apply on the API callThe inference configuration updates to apply on the API callThe inference configuration updates to apply on the API callRequired - The unique identifier of the trained model.protected InferTrainedModelRequest.Builderself()Controls the amount of time to wait for inference results.Controls the amount of time to wait for inference results.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
docsRequired - An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name istext_field. Currently, for NLP models, only a single value is allowed.API name: docsAdds all elements of listtodocs.
- 
docspublic final InferTrainedModelRequest.Builder docs(Map<String, JsonData> value, Map<String, JsonData>... values) Required - An array of objects to pass to the model for inference. The objects should contain a fields matching your configured trained model input. Typically, for NLP models, the field name istext_field. Currently, for NLP models, only a single value is allowed.API name: docsAdds one or more values to docs.
- 
inferenceConfigpublic final InferTrainedModelRequest.Builder inferenceConfig(@Nullable InferenceConfigUpdate value) The inference configuration updates to apply on the API callAPI name: inference_config
- 
inferenceConfigpublic final InferTrainedModelRequest.Builder inferenceConfig(Function<InferenceConfigUpdate.Builder, ObjectBuilder<InferenceConfigUpdate>> fn) The inference configuration updates to apply on the API callAPI name: inference_config
- 
inferenceConfigThe inference configuration updates to apply on the API callAPI name: inference_config
- 
modelIdRequired - The unique identifier of the trained model.API name: model_id
- 
timeoutControls the amount of time to wait for inference results.API name: timeout
- 
timeoutpublic final InferTrainedModelRequest.Builder timeout(Function<Time.Builder, ObjectBuilder<Time>> fn) Controls the amount of time to wait for inference results.API name: timeout
- 
self- Specified by:
- selfin class- RequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
 
- 
buildBuilds aInferTrainedModelRequest.- Specified by:
- buildin interface- ObjectBuilder<InferTrainedModelRequest>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-