Cloud Translation V3 Client - Class AdaptiveMtTranslateResponse (1.20.0)

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

An AdaptiveMtTranslate response.

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

Namespace

Google \ Cloud \ Translate \ V3

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ translations array<Google\Cloud\Translate\V3\AdaptiveMtTranslation>

Output only. The translation.

↳ language_code string

Output only. The translation's language code.

↳ glossary_translations array<Google\Cloud\Translate\V3\AdaptiveMtTranslation>

Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.

getTranslations

Output only. The translation.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTranslations

Output only. The translation.

Parameter
Name Description
var array<Google\Cloud\Translate\V3\AdaptiveMtTranslation>
Returns
Type Description
$this

getLanguageCode

Output only. The translation's language code.

Returns
Type Description
string

setLanguageCode

Output only. The translation's language code.

Parameter
Name Description
var string
Returns
Type Description
$this

getGlossaryTranslations

Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setGlossaryTranslations

Text translation response if a glossary is provided in the request. This could be the same as 'translation' above if no terms apply.

Parameter
Name Description
var array<Google\Cloud\Translate\V3\AdaptiveMtTranslation>
Returns
Type Description
$this