Cloud Translation V3 Client - Class DocumentTranslation (1.16.0)

Reference documentation and code samples for the Cloud Translation V3 Client class DocumentTranslation.

A translated document message.

Generated from protobuf message google.cloud.translation.v3.DocumentTranslation

Namespace

Google \ Cloud \ Translate \ V3

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ byte_stream_outputs array

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.

↳ mime_type string

The translated document's mime type.

↳ detected_language_code string

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.

getByteStreamOutputs

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.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setByteStreamOutputs

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.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getMimeType

The translated document's mime type.

Returns
TypeDescription
string

setMimeType

The translated document's mime type.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

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.

Returns
TypeDescription
string

setDetectedLanguageCode

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this