# Google Cloud Optimization V1 Client - Class AsyncModelMetadata (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.7.0 0.6.5 0.5.1 0.4.0 0.3.4 0.2.0 0.1.9 Reference documentation and code samples for the Google Cloud Optimization V1 Client class AsyncModelMetadata.

The long running operation metadata for async model related methods.

Generated from protobuf message `google.cloud.optimization.v1.AsyncModelMetadata`

## Namespace

Google \\ Cloud \\ Optimization \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ state` | `int` The state of the current operation. |
| `↳ state_message` | `string` A message providing more details about the current state of the operation. For example, the error message if the operation is failed. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The creation time of the operation. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The last update time of the operation. |

### getState

The state of the current operation.

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

### setState

The state of the current operation.

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

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

### getStateMessage

A message providing more details about the current state of the operation.

For example, the error message if the operation is failed.

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

### setStateMessage

A message providing more details about the current state of the operation.

For example, the error message if the operation is failed.

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

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

### getCreateTime

The creation time of the operation.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

The creation time of the operation.

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

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

### getUpdateTime

The last update time of the operation.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

The last update time of the operation.

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

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