# Cloud Translation V3 Client - Class Model (2.3.0)

2.3.0 (latest) 2.2.0 2.1.2 2.0.3 1.21.0 1.20.2 1.19.0 1.18.1 1.17.7 1.16.0 1.15.4 1.14.3 1.13.3 1.12.12 Reference documentation and code samples for the Cloud Translation V3 Client class Model.

A trained translation model.

Generated from protobuf message `google.cloud.translation.v3.Model`

## 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 model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}` |
| `↳ display_name` | `string` The name of the model 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. |
| `↳ dataset` | `string` The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}` |
| `↳ source_language_code` | `string` Output only. The BCP-47 language code of the source language. |
| `↳ target_language_code` | `string` Output only. The BCP-47 language code of the target language. |
| `↳ train_example_count` | `int` Output only. Number of examples (sentence pairs) used to train the model. |
| `↳ validate_example_count` | `int` Output only. Number of examples (sentence pairs) used to validate the model. |
| `↳ test_example_count` | `int` Output only. Number of examples (sentence pairs) used to test the model. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the model resource was created, which is also when the training started. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when this model was last updated. |

### getName

The resource name of the model, in form of
`projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The resource name of the model, in form of
`projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisplayName

The name of the model 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 model 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` |   |

### getDataset

The dataset from which the model is trained, in form of
`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDataset

The dataset from which the model is trained, in form of
`projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceLanguageCode

Output only. The BCP-47 language code of the source language.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSourceLanguageCode

Output only. The BCP-47 language code of the source language.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTargetLanguageCode

Output only. The BCP-47 language code of the target language.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setTargetLanguageCode

Output only. The BCP-47 language code of the target language.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTrainExampleCount

Output only. Number of examples (sentence pairs) used to train the model.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTrainExampleCount

Output only. Number of examples (sentence pairs) used to train the model.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getValidateExampleCount

Output only. Number of examples (sentence pairs) used to validate the
model.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setValidateExampleCount

Output only. Number of examples (sentence pairs) used to validate the
model.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTestExampleCount

Output only. Number of examples (sentence pairs) used to test the model.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTestExampleCount

Output only. Number of examples (sentence pairs) used to test the model.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. Timestamp when the model resource was created, which is also
when the training started.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the model resource was created, which is also
when the training started.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUpdateTime

Output only. Timestamp when this model was last updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp when this model was last updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |