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 Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description InferTrainedModelRequestbuild()Builds aInferTrainedModelRequest.InferTrainedModelRequest.Builderdocs(java.util.List<java.util.Map<java.lang.String,JsonData>> list)Required - An array of objects to pass to the model for inference.InferTrainedModelRequest.Builderdocs(java.util.Map<java.lang.String,JsonData> value, java.util.Map<java.lang.String,JsonData>... values)Required - An array of objects to pass to the model for inference.InferTrainedModelRequest.BuilderinferenceConfig(InferenceConfigUpdate value)The inference configuration updates to apply on the API callInferTrainedModelRequest.BuilderinferenceConfig(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn)The inference configuration updates to apply on the API callInferTrainedModelRequest.BuildermodelId(java.lang.String value)Required - The unique identifier of the trained model.protected InferTrainedModelRequest.Builderself()InferTrainedModelRequest.Buildertimeout(Time value)Controls the amount of time to wait for inference results.InferTrainedModelRequest.Buildertimeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Controls the amount of time to wait for inference results.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
docs
public final InferTrainedModelRequest.Builder docs(java.util.List<java.util.Map<java.lang.String,JsonData>> list)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 all elements of
listtodocs. -
docs
public final InferTrainedModelRequest.Builder docs(java.util.Map<java.lang.String,JsonData> value, java.util.Map<java.lang.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. -
inferenceConfig
public final InferTrainedModelRequest.Builder inferenceConfig(@Nullable InferenceConfigUpdate value)The inference configuration updates to apply on the API callAPI name:
inference_config -
inferenceConfig
public final InferTrainedModelRequest.Builder inferenceConfig(java.util.function.Function<InferenceConfigUpdate.Builder,ObjectBuilder<InferenceConfigUpdate>> fn)The inference configuration updates to apply on the API callAPI name:
inference_config -
modelId
Required - The unique identifier of the trained model.API name:
model_id -
timeout
Controls the amount of time to wait for inference results.API name:
timeout -
timeout
public final InferTrainedModelRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Controls the amount of time to wait for inference results.API name:
timeout -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<InferTrainedModelRequest.Builder>
-
build
Builds aInferTrainedModelRequest.- Specified by:
buildin interfaceObjectBuilder<InferTrainedModelRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-