# REST Resource: projects.locations.datasets

- [Resource: Dataset](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#Dataset)
  - [JSON representation](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#Dataset.SCHEMA_REPRESENTATION)
- [TranslationDatasetMetadata](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TranslationDatasetMetadata)
  - [JSON representation](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TranslationDatasetMetadata.SCHEMA_REPRESENTATION)
- [ImageClassificationDatasetMetadata](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ImageClassificationDatasetMetadata)
  - [JSON representation](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ImageClassificationDatasetMetadata.SCHEMA_REPRESENTATION)
- [ClassificationType](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ClassificationType)
- [TextClassificationDatasetMetadata](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TextClassificationDatasetMetadata)
  - [JSON representation](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TextClassificationDatasetMetadata.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#METHODS_SUMMARY)

## Resource: Dataset

A workspace for solving a single, particular machine learning (ML) problem. A workspace contains examples that may be annotated.

| JSON representation ||
|---|---|
| ``` { "name": string, "displayName": string, "exampleCount": number, "createTime": string, // Union field `dataset_metadata` can be only one of the following: "translationDatasetMetadata": { object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TranslationDatasetMetadata`) }, "imageClassificationDatasetMetadata": { object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ImageClassificationDatasetMetadata`) }, "textClassificationDatasetMetadata": { object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TextClassificationDatasetMetadata`) } // End of list of possible types for union field `dataset_metadata`. } ``` |

| Fields ||
|---|---|---|
| `name` | `string` Output only. The resource name of the dataset. Form: `projects/{project_id}/locations/{locationId}/datasets/{datasetId}` |
| `displayName` | `string` Required. 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. |
| `exampleCount` | `number` Output only. The number of examples in the dataset. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Timestamp when this dataset was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: `"2014-10-02T15:01:23.045123456Z"`. <br /> |
| Union field `dataset_metadata`. Required. The dataset metadata that is specific to the problem type. `dataset_metadata` can be only one of the following: |||
| `translationDatasetMetadata` | ``object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TranslationDatasetMetadata`)`` Metadata for a dataset used for translation. |
| `imageClassificationDatasetMetadata` | ``object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ImageClassificationDatasetMetadata`)`` Metadata for a dataset used for image classification. |
| `textClassificationDatasetMetadata` | ``object(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#TextClassificationDatasetMetadata`)`` Metadata for a dataset used for text classification. |

## TranslationDatasetMetadata

Dataset metadata that is specific to translation.

| JSON representation ||
|---|---|
| ``` { "sourceLanguageCode": string, "targetLanguageCode": string } ``` |

| Fields ||
|---|---|
| `sourceLanguageCode` | `string` Required. The BCP-47 language code of the source language. |
| `targetLanguageCode` | `string` Required. The BCP-47 language code of the target language. |

## ImageClassificationDatasetMetadata

Dataset metadata that is specific to image classification.

| JSON representation ||
|---|---|
| ``` { "classificationType": enum(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ClassificationType`) } ``` |

| Fields ||
|---|---|
| `classificationType` | ``enum(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ClassificationType`)`` Required. Type of the classification problem. |

## ClassificationType

Type of the classification problem.

| Enums ||
|---|---|
| `CLASSIFICATION_TYPE_UNSPECIFIED` | Should not be used, an un-set enum has this value by default. |
| `MULTICLASS` | At most one label is allowed per example. |
| `MULTILABEL` | Multiple labels are allowed for one example. |

## TextClassificationDatasetMetadata

Dataset metadata for classification.

| JSON representation ||
|---|---|
| ``` { "classificationType": enum(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ClassificationType`) } ``` |

| Fields ||
|---|---|
| `classificationType` | ``enum(`https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets#ClassificationType`)`` Required. Type of the classification problem. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/create` | Creates a dataset. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/delete` | Deletes a dataset and all of its contents. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/get` | Gets a dataset. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/getIamPolicy` | Gets the access control policy for a resource. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/importData` | Imports data into a dataset. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/list` | Lists datasets in a project. |
| ### `https://docs.cloud.google.com/translate/automl/docs/reference/rest/v1beta1/projects.locations.datasets/setIamPolicy` | Sets the access control policy on the specified resource. |