Cloud Translation V3 Client - Class TranslateTextResponse (1.17.7)

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

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

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\Translation>

Text translation responses with no glossary applied. This field has the same length as contents.

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

Text translation responses if a glossary is provided in the request. This can be the same as translations if no terms apply. This field has the same length as contents.

getTranslations

Text translation responses with no glossary applied.

This field has the same length as contents.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTranslations

Text translation responses with no glossary applied.

This field has the same length as contents.

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

getGlossaryTranslations

Text translation responses if a glossary is provided in the request.

This can be the same as translations if no terms apply. This field has the same length as contents.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setGlossaryTranslations

Text translation responses if a glossary is provided in the request.

This can be the same as translations if no terms apply. This field has the same length as contents.

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