public class TranslateOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
TranslateOptions.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
modelId |
protected java.lang.String |
source |
protected java.lang.String |
target |
protected java.util.List<java.lang.String> |
text |
Modifier | Constructor and Description |
---|---|
protected |
TranslateOptions(TranslateOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
modelId()
Gets the modelId.
|
TranslateOptions.Builder |
newBuilder()
New builder.
|
java.lang.String |
source()
Gets the source.
|
java.lang.String |
target()
Gets the target.
|
java.util.List<java.lang.String> |
text()
Gets the text.
|
protected java.util.List<java.lang.String> text
protected java.lang.String modelId
protected java.lang.String source
protected java.lang.String target
protected TranslateOptions(TranslateOptions.Builder builder)
public TranslateOptions.Builder newBuilder()
public java.util.List<java.lang.String> text()
Input text in UTF-8 encoding. Multiple entries result in multiple translations in the response.
public java.lang.String modelId()
The model to use for translation. For example, `en-de` selects the IBM-provided base model for English-to-German translation. A model ID overrides the `source` and `target` parameters and is required if you use a custom model. If no model ID is specified, you must specify at least a target language.
public java.lang.String source()
Language code that specifies the language of the input text. If omitted, the service derives the source language from the input text. The input must contain sufficient text for the service to identify the language reliably.
public java.lang.String target()
Language code that specifies the target language for translation. Required if model ID is not specified.