Interface DocumentTranslationOrBuilder (2.4.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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for detectedLanguageCode.

getMimeType()

public abstract String getMimeType()

The translated document's mime type.

string mime_type = 2;

Returns
TypeDescription
String

The mimeType.

getMimeTypeBytes()

public abstract ByteString getMimeTypeBytes()

The translated document's mime type.

string mime_type = 2;

Returns
TypeDescription
ByteString

The bytes for mimeType.