Class TranslateDocumentOptions
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class TranslateDocumentOptions
extends com.ibm.cloud.sdk.core.service.model.GenericModel
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTranslateDocumentOptions.BuilderBuilder. -
Method Summary
Modifier and Type Method Description StringdocumentId()Gets the documentId.InputStreamfile()Gets the file.StringfileContentType()Gets the fileContentType.Stringfilename()Gets the filename.StringmodelId()Gets the modelId.TranslateDocumentOptions.BuildernewBuilder()New builder.Stringsource()Gets the source.Stringtarget()Gets the target.Methods inherited from class com.ibm.cloud.sdk.core.service.model.GenericModel
equals, hashCode, toString
-
Method Details
-
newBuilder
New builder.- Returns:
- a TranslateDocumentOptions builder
-
file
Gets the file.The contents of the source file to translate. The maximum file size for document translation is 20 MB for service instances on the Standard, Advanced, and Premium plans, and 2 MB for service instances on the Lite plan. For more information, see [Supported file formats (Beta)](https://cloud.ibm.com/docs/language-translator?topic=language-translator-document-translator-tutorial#supported-file-formats).
- Returns:
- the file
-
filename
Gets the filename.The filename for file.
- Returns:
- the filename
-
fileContentType
Gets the fileContentType.The content type of file. Values for this parameter can be obtained from the HttpMediaType class.
- Returns:
- the fileContentType
-
modelId
Gets the 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.
- Returns:
- the modelId
-
source
Gets the source.Language code that specifies the language of the source document. 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.
- Returns:
- the source
-
target
Gets the target.Language code that specifies the target language for translation. Required if model ID is not specified.
- Returns:
- the target
-
documentId
Gets the documentId.To use a previously submitted document as the source for a new translation, enter the `document_id` of the document.
- Returns:
- the documentId
-