Interface DocumentTranslationOrBuilder (2.46.0)

public interface DocumentTranslationOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getByteStreamOutputs(int index)

public abstract ByteString getByteStreamOutputs(int index)

The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.

repeated bytes byte_stream_outputs = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
ByteString

The byteStreamOutputs at the given index.

getByteStreamOutputsCount()

public abstract int getByteStreamOutputsCount()

The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.

repeated bytes byte_stream_outputs = 1;

Returns
Type Description
int

The count of byteStreamOutputs.

getByteStreamOutputsList()

public abstract List<ByteString> getByteStreamOutputsList()

The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.

repeated bytes byte_stream_outputs = 1;

Returns
Type Description
List<ByteString>

A list containing the byteStreamOutputs.

getDetectedLanguageCode()

public abstract String getDetectedLanguageCode()

The detected language for the input document. If the user did not provide the source language for the input document, this field will have the language code automatically detected. If the source language was passed, auto-detection of the language does not occur and this field is empty.

string detected_language_code = 3;

Returns
Type Description
String

The detectedLanguageCode.

getDetectedLanguageCodeBytes()

public abstract ByteString getDetectedLanguageCodeBytes()

The detected language for the input document. If the user did not provide the source language for the input document, this field will have the language code automatically detected. If the source language was passed, auto-detection of the language does not occur and this field is empty.

string detected_language_code = 3;

Returns
Type Description
ByteString

The bytes for detectedLanguageCode.

getMimeType()

public abstract String getMimeType()

The translated document's mime type.

string mime_type = 2;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public abstract ByteString getMimeTypeBytes()

The translated document's mime type.

string mime_type = 2;

Returns
Type Description
ByteString

The bytes for mimeType.