Cloud Translation V3 Client - Class TranslateTextResponse (1.15.4)

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
NameDescription
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
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTranslations

Text translation responses with no glossary applied.

This field has the same length as contents.

Parameter
NameDescription
var array<Google\Cloud\Translate\V3\Translation>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var array<Google\Cloud\Translate\V3\Translation>
Returns
TypeDescription
$this