Class InferTrainedModelDeploymentRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.InferTrainedModelDeploymentRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<InferTrainedModelDeploymentRequest>
- Enclosing class:
- InferTrainedModelDeploymentRequest
public static class InferTrainedModelDeploymentRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<InferTrainedModelDeploymentRequest>
Builder for
InferTrainedModelDeploymentRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description InferTrainedModelDeploymentRequestbuild()Builds aInferTrainedModelDeploymentRequest.InferTrainedModelDeploymentRequest.Builderdocs(java.util.List<java.util.Map<java.lang.String,java.lang.String>> list)Required - An array of objects to pass to the model for inference.InferTrainedModelDeploymentRequest.Builderdocs(java.util.Map<java.lang.String,java.lang.String> value, java.util.Map<java.lang.String,java.lang.String>... values)Required - An array of objects to pass to the model for inference.InferTrainedModelDeploymentRequest.BuildermodelId(java.lang.String value)Required - The unique identifier of the trained model.InferTrainedModelDeploymentRequest.Buildertimeout(Time value)Controls the amount of time to wait for inference results.InferTrainedModelDeploymentRequest.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.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 InferTrainedModelDeploymentRequest.Builder docs(java.util.List<java.util.Map<java.lang.String,java.lang.String>> list)Required - An array of objects to pass to the model for inference. The objects should contain a field matching your configured trained model input. Typically, the field name istext_field. Currently, only a single value is allowed.API name:
docsAdds all elements of
listtodocs. -
docs
public final InferTrainedModelDeploymentRequest.Builder docs(java.util.Map<java.lang.String,java.lang.String> value, java.util.Map<java.lang.String,java.lang.String>... values)Required - An array of objects to pass to the model for inference. The objects should contain a field matching your configured trained model input. Typically, the field name istext_field. Currently, only a single value is allowed.API name:
docsAdds one or more values to
docs. -
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 InferTrainedModelDeploymentRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Controls the amount of time to wait for inference results.API name:
timeout -
build
Builds aInferTrainedModelDeploymentRequest.- Specified by:
buildin interfaceObjectBuilder<InferTrainedModelDeploymentRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-