Class TextClassificationInferenceUpdateOptions.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<TextClassificationInferenceUpdateOptions.Builder>
co.elastic.clients.elasticsearch.ml.TextClassificationInferenceUpdateOptions.Builder
- All Implemented Interfaces:
WithJson<TextClassificationInferenceUpdateOptions.Builder>
,ObjectBuilder<TextClassificationInferenceUpdateOptions>
- Enclosing class:
- TextClassificationInferenceUpdateOptions
public static class TextClassificationInferenceUpdateOptions.Builder extends WithJsonObjectBuilderBase<TextClassificationInferenceUpdateOptions.Builder> implements ObjectBuilder<TextClassificationInferenceUpdateOptions>
Builder for
TextClassificationInferenceUpdateOptions
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description TextClassificationInferenceUpdateOptions
build()
Builds aTextClassificationInferenceUpdateOptions
.TextClassificationInferenceUpdateOptions.Builder
classificationLabels(java.lang.String value, java.lang.String... values)
Classification labels to apply other than the stored labels.TextClassificationInferenceUpdateOptions.Builder
classificationLabels(java.util.List<java.lang.String> list)
Classification labels to apply other than the stored labels.TextClassificationInferenceUpdateOptions.Builder
numTopClasses(java.lang.Integer value)
Specifies the number of top class predictions to return.TextClassificationInferenceUpdateOptions.Builder
resultsField(java.lang.String value)
The field that is added to incoming documents to contain the inference prediction.protected TextClassificationInferenceUpdateOptions.Builder
self()
TextClassificationInferenceUpdateOptions.Builder
tokenization(NlpTokenizationUpdateOptions value)
The tokenization options to update when inferringTextClassificationInferenceUpdateOptions.Builder
tokenization(java.util.function.Function<NlpTokenizationUpdateOptions.Builder,ObjectBuilder<NlpTokenizationUpdateOptions>> fn)
The tokenization options to update when inferringMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
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
-
numTopClasses
public final TextClassificationInferenceUpdateOptions.Builder numTopClasses(@Nullable java.lang.Integer value)Specifies the number of top class predictions to return. Defaults to 0.API name:
num_top_classes
-
tokenization
public final TextClassificationInferenceUpdateOptions.Builder tokenization(@Nullable NlpTokenizationUpdateOptions value)The tokenization options to update when inferringAPI name:
tokenization
-
tokenization
public final TextClassificationInferenceUpdateOptions.Builder tokenization(java.util.function.Function<NlpTokenizationUpdateOptions.Builder,ObjectBuilder<NlpTokenizationUpdateOptions>> fn)The tokenization options to update when inferringAPI name:
tokenization
-
resultsField
public final TextClassificationInferenceUpdateOptions.Builder resultsField(@Nullable java.lang.String value)The field that is added to incoming documents to contain the inference prediction. Defaults to predicted_value.API name:
results_field
-
classificationLabels
public final TextClassificationInferenceUpdateOptions.Builder classificationLabels(java.util.List<java.lang.String> list)Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labelsAPI name:
classification_labels
Adds all elements of
list
toclassificationLabels
. -
classificationLabels
public final TextClassificationInferenceUpdateOptions.Builder classificationLabels(java.lang.String value, java.lang.String... values)Classification labels to apply other than the stored labels. Must have the same deminsions as the default configured labelsAPI name:
classification_labels
Adds one or more values to
classificationLabels
. -
self
- Specified by:
self
in classWithJsonObjectBuilderBase<TextClassificationInferenceUpdateOptions.Builder>
-
build
Builds aTextClassificationInferenceUpdateOptions
.- Specified by:
build
in interfaceObjectBuilder<TextClassificationInferenceUpdateOptions>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-