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 \ V3Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string[]
|
Returns | |
---|---|
Type | Description |
$this |
getMimeType
The translated document's mime type.
Returns | |
---|---|
Type | Description |
string |
setMimeType
The translated document's mime type.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |