# Cloud AutoML V1 Client - Class Model (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.6.5 1.5.4 1.4.17 Reference documentation and code samples for the Cloud AutoML V1 Client class Model.

API proto representing a trained machine learning model.

Generated from protobuf message `google.cloud.automl.v1.Model`

## Namespace

Google \\ Cloud \\ AutoMl \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ translation_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TranslationModelMetadata` Metadata for translation models. |
| `↳ image_classification_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageClassificationModelMetadata` Metadata for image classification models. |
| `↳ text_classification_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextClassificationModelMetadata` Metadata for text classification models. |
| `↳ image_object_detection_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageObjectDetectionModelMetadata` Metadata for image object detection models. |
| `↳ text_extraction_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextExtractionModelMetadata` Metadata for text extraction models. |
| `↳ text_sentiment_model_metadata` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSentimentModelMetadata` Metadata for text sentiment models. |
| `↳ name` | `string` Output only. Resource name of the model. Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` |
| `↳ display_name` | `string` Required. 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. It must start with a letter. |
| `↳ dataset_id` | `string` Required. The resource ID of the dataset used to create the model. The dataset must come from the same ancestor project and location. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the model training finished and can be used for prediction. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when this model was last updated. |
| `↳ deployment_state` | `int` Output only. Deployment state of the model. A model can only serve prediction requests after it gets deployed. |
| `↳ etag` | `string` Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. The labels with user-defined metadata to organize your model. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See <https://goo.gl/xmQnxf> for more information on and examples of labels. |

### getTranslationModelMetadata

Metadata for translation models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TranslationModelMetadata|null` |   |

### hasTranslationModelMetadata

### setTranslationModelMetadata

Metadata for translation models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TranslationModelMetadata` |

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

### getImageClassificationModelMetadata

Metadata for image classification models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageClassificationModelMetadata|null` |   |

### hasImageClassificationModelMetadata

### setImageClassificationModelMetadata

Metadata for image classification models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageClassificationModelMetadata` |

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

### getTextClassificationModelMetadata

Metadata for text classification models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextClassificationModelMetadata|null` |   |

### hasTextClassificationModelMetadata

### setTextClassificationModelMetadata

Metadata for text classification models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextClassificationModelMetadata` |

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

### getImageObjectDetectionModelMetadata

Metadata for image object detection models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageObjectDetectionModelMetadata|null` |   |

### hasImageObjectDetectionModelMetadata

### setImageObjectDetectionModelMetadata

Metadata for image object detection models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.ImageObjectDetectionModelMetadata` |

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

### getTextExtractionModelMetadata

Metadata for text extraction models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextExtractionModelMetadata|null` |   |

### hasTextExtractionModelMetadata

### setTextExtractionModelMetadata

Metadata for text extraction models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextExtractionModelMetadata` |

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

### getTextSentimentModelMetadata

Metadata for text sentiment models.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSentimentModelMetadata|null` |   |

### hasTextSentimentModelMetadata

### setTextSentimentModelMetadata

Metadata for text sentiment models.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.TextSentimentModelMetadata` |

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

### getName

Output only. Resource name of the model.

Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`

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

### setName

Output only. Resource name of the model.

Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`

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

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

### getDisplayName

Required. 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. It must start with a letter.

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

### setDisplayName

Required. 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. It must start with a letter.

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

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

### getDatasetId

Required. The resource ID of the dataset used to create the model. The dataset must
come from the same ancestor project and location.

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

### setDatasetId

Required. The resource ID of the dataset used to create the model. The dataset must
come from the same ancestor project and location.

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

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

### getCreateTime

Output only. Timestamp when the model training finished and can be used for prediction.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the model training finished and can be used for prediction.

| **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` |   |

### getDeploymentState

Output only. Deployment state of the model. A model can only serve
prediction requests after it gets deployed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [DeploymentState](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.Model.DeploymentState). |

### setDeploymentState

Output only. Deployment state of the model. A model can only serve
prediction requests after it gets deployed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [DeploymentState](https://docs.cloud.google.com/php/docs/reference/cloud-automl/latest/V1.Model.DeploymentState). |

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

### getEtag

Used to perform a consistent read-modify-write updates. If not set, a blind
"overwrite" update happens.

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

### setEtag

Used to perform a consistent read-modify-write updates. If not set, a blind
"overwrite" update happens.

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

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

### getLabels

Optional. The labels with user-defined metadata to organize your model.

Label keys and values can be no longer than 64 characters
(Unicode codepoints), can only contain lowercase letters, numeric
characters, underscores and dashes. International characters are allowed.
Label values are optional. Label keys must start with a letter.
See <https://goo.gl/xmQnxf> for more information on and examples of labels.

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

### setLabels

Optional. The labels with user-defined metadata to organize your model.

Label keys and values can be no longer than 64 characters
(Unicode codepoints), can only contain lowercase letters, numeric
characters, underscores and dashes. International characters are allowed.
Label values are optional. Label keys must start with a letter.
See <https://goo.gl/xmQnxf> for more information on and examples of labels.

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

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

### getModelMetadata

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