public class TranslateDocumentOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
Modifier and Type | Class and Description |
---|---|
static class |
TranslateDocumentOptions.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
documentId |
protected java.io.InputStream |
file |
protected java.lang.String |
fileContentType |
protected java.lang.String |
filename |
protected java.lang.String |
modelId |
protected java.lang.String |
source |
protected java.lang.String |
target |
Modifier | Constructor and Description |
---|---|
protected |
TranslateDocumentOptions(TranslateDocumentOptions.Builder builder) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
documentId()
Gets the documentId.
|
java.io.InputStream |
file()
Gets the file.
|
java.lang.String |
fileContentType()
Gets the fileContentType.
|
java.lang.String |
filename()
Gets the filename.
|
java.lang.String |
modelId()
Gets the modelId.
|
TranslateDocumentOptions.Builder |
newBuilder()
New builder.
|
java.lang.String |
source()
Gets the source.
|
java.lang.String |
target()
Gets the target.
|
protected java.io.InputStream file
protected java.lang.String filename
protected java.lang.String fileContentType
protected java.lang.String modelId
protected java.lang.String source
protected java.lang.String target
protected java.lang.String documentId
protected TranslateDocumentOptions(TranslateDocumentOptions.Builder builder)
public TranslateDocumentOptions.Builder newBuilder()
public java.io.InputStream file()
The contents of the source file to translate.
[Supported file types](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats)
Maximum file size: **20 MB**.
public java.lang.String filename()
The filename for file.
public java.lang.String fileContentType()
The content type of file. Values for this parameter can be obtained from the HttpMediaType class.
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 a target language.
public java.lang.String source()
Language code that specifies the language of the source document.
public java.lang.String target()
Language code that specifies the target language for translation. Required if model ID is not specified.
public java.lang.String documentId()
To use a previously submitted document as the source for a new translation, enter the `document_id` of the document.