Class StartTrainedModelDeploymentRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.elasticsearch.ml.StartTrainedModelDeploymentRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<StartTrainedModelDeploymentRequest>
- Enclosing class:
- StartTrainedModelDeploymentRequest
public static class StartTrainedModelDeploymentRequest.Builder extends ObjectBuilderBase implements ObjectBuilder<StartTrainedModelDeploymentRequest>
Builder for
StartTrainedModelDeploymentRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description StartTrainedModelDeploymentRequest
build()
Builds aStartTrainedModelDeploymentRequest
.StartTrainedModelDeploymentRequest.Builder
inferenceThreads(java.lang.Integer value)
Specifies the number of threads that are used by the inference process.StartTrainedModelDeploymentRequest.Builder
modelId(java.lang.String value)
Required - The unique identifier of the trained model.StartTrainedModelDeploymentRequest.Builder
modelThreads(java.lang.Integer value)
Specifies the number of threads that are used when sending inference requests to the model.StartTrainedModelDeploymentRequest.Builder
queueCapacity(java.lang.Integer value)
Specifies the number of inference requests that are allowed in the queue.StartTrainedModelDeploymentRequest.Builder
timeout(Time value)
Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.Builder
timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)
Specifies the amount of time to wait for the model to deploy.StartTrainedModelDeploymentRequest.Builder
waitFor(DeploymentAllocationState value)
Specifies the allocation status to wait for before returning.Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
inferenceThreads
public final StartTrainedModelDeploymentRequest.Builder inferenceThreads(@Nullable java.lang.Integer value)Specifies the number of threads that are used by the inference process. If you increase this value, inference speed generally increases. However, the actual number of threads is limited by the number of available CPU cores.API name:
inference_threads
-
modelId
Required - The unique identifier of the trained model. Currently, only PyTorch models are supported.API name:
model_id
-
modelThreads
public final StartTrainedModelDeploymentRequest.Builder modelThreads(@Nullable java.lang.Integer value)Specifies the number of threads that are used when sending inference requests to the model. If you increase this value, throughput generally increases.API name:
model_threads
-
queueCapacity
public final StartTrainedModelDeploymentRequest.Builder queueCapacity(@Nullable java.lang.Integer value)Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error.API name:
queue_capacity
-
timeout
Specifies the amount of time to wait for the model to deploy.API name:
timeout
-
timeout
public final StartTrainedModelDeploymentRequest.Builder timeout(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specifies the amount of time to wait for the model to deploy.API name:
timeout
-
waitFor
public final StartTrainedModelDeploymentRequest.Builder waitFor(@Nullable DeploymentAllocationState value)Specifies the allocation status to wait for before returning.API name:
wait_for
-
build
Builds aStartTrainedModelDeploymentRequest
.- Specified by:
build
in interfaceObjectBuilder<StartTrainedModelDeploymentRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-