Reference documentation and code samples for the Cloud Translation V3 Client class Example.
A sentence pair.
Generated from protobuf messagegoogle.cloud.translation.v3.Example
Namespace
Google \ Cloud \ Translate \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. The resource name of the example, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}
↳ source_text
string
Sentence in source language.
↳ target_text
string
Sentence in target language.
↳ usage
string
Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.
getName
Output only. The resource name of the example, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}
Returns
Type
Description
string
setName
Output only. The resource name of the example, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSourceText
Sentence in source language.
Returns
Type
Description
string
setSourceText
Sentence in source language.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTargetText
Sentence in target language.
Returns
Type
Description
string
setTargetText
Sentence in target language.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUsage
Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.
Returns
Type
Description
string
setUsage
Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Translation V3 Client - Class Example (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-translate/latest/V3.Example)\n- [2.0.2](/php/docs/reference/cloud-translate/2.0.2/V3.Example)\n- [1.21.0](/php/docs/reference/cloud-translate/1.21.0/V3.Example)\n- [1.20.2](/php/docs/reference/cloud-translate/1.20.2/V3.Example)\n- [1.19.0](/php/docs/reference/cloud-translate/1.19.0/V3.Example)\n- [1.18.1](/php/docs/reference/cloud-translate/1.18.1/V3.Example)\n- [1.17.7](/php/docs/reference/cloud-translate/1.17.7/V3.Example)\n- [1.16.0](/php/docs/reference/cloud-translate/1.16.0/V3.Example)\n- [1.15.4](/php/docs/reference/cloud-translate/1.15.4/V3.Example)\n- [1.14.3](/php/docs/reference/cloud-translate/1.14.3/V3.Example)\n- [1.13.3](/php/docs/reference/cloud-translate/1.13.3/V3.Example)\n- [1.12.12](/php/docs/reference/cloud-translate/1.12.12/V3.Example) \nReference documentation and code samples for the Cloud Translation V3 Client class Example.\n\nA sentence pair.\n\nGenerated from protobuf message `google.cloud.translation.v3.Example`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Translate \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. The resource name of the example, in form of\n`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}`\n\n### setName\n\nOutput only. The resource name of the example, in form of\n`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}`\n\n### getSourceText\n\nSentence in source language.\n\n### setSourceText\n\nSentence in source language.\n\n### getTargetText\n\nSentence in target language.\n\n### setTargetText\n\nSentence in target language.\n\n### getUsage\n\nOutput only. Usage of the sentence pair. Options are TRAIN\\|VALIDATION\\|TEST.\n\n### setUsage\n\nOutput only. Usage of the sentence pair. Options are TRAIN\\|VALIDATION\\|TEST."]]