# Google Cloud Functions V2 Client - Class OperationMetadata (2.1.3)

2.1.3 (latest) 2.1.2 2.0.6 1.7.0 1.6.5 1.5.0 1.4.2 1.3.1 1.2.0 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Functions V2 Client class OperationMetadata.

Represents the metadata of the long-running operation.

Generated from protobuf message `google.cloud.functions.v2.OperationMetadata`

## Namespace

Google \\ Cloud \\ Functions \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time the operation was created. |
| `↳ end_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time the operation finished running. |
| `↳ target` | `string` Server-defined resource path for the target of the operation. |
| `↳ verb` | `string` Name of the verb executed by the operation. |
| `↳ status_detail` | `string` Human-readable status of the operation, if any. |
| `↳ cancel_requested` | `bool` Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a [google.rpc.Status.code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html#_Google_Rpc_Status__getCode__) of 1, corresponding to `Code.CANCELLED`. |
| `↳ api_version` | `string` API version used to start the operation. |
| `↳ request_resource` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Any` The original request that started the operation. |
| `↳ stages` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.Stage>` Mechanism for reporting in-progress stages |
| `↳ source_token` | `string` An identifier for Firebase function sources. Disclaimer: This field is only supported for Firebase function deployments. |
| `↳ build_name` | `string` The build name of the function for create and update operations. |
| `↳ operation_type` | `int` The operation type. |

### getCreateTime

The time the operation was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

The time the operation was created.

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

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

### getEndTime

The time the operation finished running.

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

### hasEndTime

### clearEndTime

### setEndTime

The time the operation finished running.

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

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

### getTarget

Server-defined resource path for the target of the operation.

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

### setTarget

Server-defined resource path for the target of the operation.

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

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

### getVerb

Name of the verb executed by the operation.

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

### setVerb

Name of the verb executed by the operation.

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

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

### getStatusDetail

Human-readable status of the operation, if any.

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

### setStatusDetail

Human-readable status of the operation, if any.

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

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

### getCancelRequested

Identifies whether the user has requested cancellation
of the operation. Operations that have successfully been cancelled
have
google.longrunning.Operation.error
value with a [google.rpc.Status.code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html#_Google_Rpc_Status__getCode__) of 1,
corresponding to `Code.CANCELLED`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setCancelRequested

Identifies whether the user has requested cancellation
of the operation. Operations that have successfully been cancelled
have
google.longrunning.Operation.error
value with a [google.rpc.Status.code](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html#_Google_Rpc_Status__getCode__) of 1,
corresponding to `Code.CANCELLED`.

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

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

### getApiVersion

API version used to start the operation.

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

### setApiVersion

API version used to start the operation.

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

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

### getRequestResource

The original request that started the operation.

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

### hasRequestResource

### clearRequestResource

### setRequestResource

The original request that started the operation.

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

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

### getStages

Mechanism for reporting in-progress stages

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.Stage>` |   |

### setStages

Mechanism for reporting in-progress stages

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.Stage>` |

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

### getSourceToken

An identifier for Firebase function sources. Disclaimer: This field is only
supported for Firebase function deployments.

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

### setSourceToken

An identifier for Firebase function sources. Disclaimer: This field is only
supported for Firebase function deployments.

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

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

### getBuildName

The build name of the function for create and update operations.

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

### setBuildName

The build name of the function for create and update operations.

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

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

### getOperationType

The operation type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OperationType](https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.OperationType). |

### setOperationType

The operation type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OperationType](https://docs.cloud.google.com/php/docs/reference/cloud-functions/latest/V2.OperationType). |

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