Reference documentation and code samples for the Cloud Translation V3 Client class Dataset.
A dataset that hosts the examples (sentence pairs) used for translation
models.
Generated from protobuf messagegoogle.cloud.translation.v3.Dataset
Namespace
Google \ Cloud \ Translate \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
The resource name of the dataset, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}
↳ display_name
string
The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
↳ source_language_code
string
The BCP-47 language code of the source language.
↳ target_language_code
string
The BCP-47 language code of the target language.
↳ example_count
int
Output only. The number of examples in the dataset.
↳ train_example_count
int
Output only. Number of training examples (sentence pairs).
↳ validate_example_count
int
Output only. Number of validation examples (sentence pairs).
↳ test_example_count
int
Output only. Number of test examples (sentence pairs).
Output only. Timestamp when this dataset was last updated.
getName
The resource name of the dataset, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}
Returns
Type
Description
string
setName
The resource name of the dataset, in form ofprojects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisplayName
The name of the dataset to show in the interface. The name can be
up to 32 characters long and can consist only of ASCII Latin letters A-Z
and a-z, underscores (_), and ASCII digits 0-9.
Returns
Type
Description
string
setDisplayName
The name of the dataset to show in the interface. The name can be
up to 32 characters long and can consist only of ASCII Latin letters A-Z
and a-z, underscores (_), and ASCII digits 0-9.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getSourceLanguageCode
The BCP-47 language code of the source language.
Returns
Type
Description
string
setSourceLanguageCode
The BCP-47 language code of the source language.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTargetLanguageCode
The BCP-47 language code of the target language.
Returns
Type
Description
string
setTargetLanguageCode
The BCP-47 language code of the target language.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getExampleCount
Output only. The number of examples in the dataset.
Returns
Type
Description
int
setExampleCount
Output only. The number of examples in the dataset.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getTrainExampleCount
Output only. Number of training examples (sentence pairs).
Returns
Type
Description
int
setTrainExampleCount
Output only. Number of training examples (sentence pairs).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getValidateExampleCount
Output only. Number of validation examples (sentence pairs).
Returns
Type
Description
int
setValidateExampleCount
Output only. Number of validation examples (sentence pairs).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getTestExampleCount
Output only. Number of test examples (sentence pairs).
Returns
Type
Description
int
setTestExampleCount
Output only. Number of test examples (sentence pairs).
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getCreateTime
Output only. Timestamp when this dataset was created.
[[["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-09 UTC."],[],[],null,["# Cloud Translation V3 Client - Class Dataset (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-translate/latest/V3.Dataset)\n- [2.0.2](/php/docs/reference/cloud-translate/2.0.2/V3.Dataset)\n- [1.21.0](/php/docs/reference/cloud-translate/1.21.0/V3.Dataset)\n- [1.20.2](/php/docs/reference/cloud-translate/1.20.2/V3.Dataset)\n- [1.19.0](/php/docs/reference/cloud-translate/1.19.0/V3.Dataset)\n- [1.18.1](/php/docs/reference/cloud-translate/1.18.1/V3.Dataset)\n- [1.17.7](/php/docs/reference/cloud-translate/1.17.7/V3.Dataset)\n- [1.16.0](/php/docs/reference/cloud-translate/1.16.0/V3.Dataset)\n- [1.15.4](/php/docs/reference/cloud-translate/1.15.4/V3.Dataset)\n- [1.14.3](/php/docs/reference/cloud-translate/1.14.3/V3.Dataset)\n- [1.13.3](/php/docs/reference/cloud-translate/1.13.3/V3.Dataset)\n- [1.12.12](/php/docs/reference/cloud-translate/1.12.12/V3.Dataset) \nReference documentation and code samples for the Cloud Translation V3 Client class Dataset.\n\nA dataset that hosts the examples (sentence pairs) used for translation\nmodels.\n\nGenerated from protobuf message `google.cloud.translation.v3.Dataset`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Translate \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nThe resource name of the dataset, in form of\n`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`\n\n### setName\n\nThe resource name of the dataset, in form of\n`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`\n\n### getDisplayName\n\nThe name of the dataset to show in the interface. The name can be\nup to 32 characters long and can consist only of ASCII Latin letters A-Z\nand a-z, underscores (_), and ASCII digits 0-9.\n\n### setDisplayName\n\nThe name of the dataset to show in the interface. The name can be\nup to 32 characters long and can consist only of ASCII Latin letters A-Z\nand a-z, underscores (_), and ASCII digits 0-9.\n\n### getSourceLanguageCode\n\nThe BCP-47 language code of the source language.\n\n### setSourceLanguageCode\n\nThe BCP-47 language code of the source language.\n\n### getTargetLanguageCode\n\nThe BCP-47 language code of the target language.\n\n### setTargetLanguageCode\n\nThe BCP-47 language code of the target language.\n\n### getExampleCount\n\nOutput only. The number of examples in the dataset.\n\n### setExampleCount\n\nOutput only. The number of examples in the dataset.\n\n### getTrainExampleCount\n\nOutput only. Number of training examples (sentence pairs).\n\n### setTrainExampleCount\n\nOutput only. Number of training examples (sentence pairs).\n\n### getValidateExampleCount\n\nOutput only. Number of validation examples (sentence pairs).\n\n### setValidateExampleCount\n\nOutput only. Number of validation examples (sentence pairs).\n\n### getTestExampleCount\n\nOutput only. Number of test examples (sentence pairs).\n\n### setTestExampleCount\n\nOutput only. Number of test examples (sentence pairs).\n\n### getCreateTime\n\nOutput only. Timestamp when this dataset was created.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Timestamp when this dataset was created.\n\n### getUpdateTime\n\nOutput only. Timestamp when this dataset was last updated.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. Timestamp when this dataset was last updated."]]