# Google Cloud Container V1 Client - Class Operation (2.10.0)

2.10.0 (latest) 2.9.0 2.8.1 2.7.0 2.6.1 2.5.0 2.4.0 2.3.4 2.2.1 2.1.0 2.0.0 1.33.0 1.32.0 1.31.0 1.30.3 1.24.0 1.23.0 1.22.0 1.21.1 1.20.0 1.19.0 1.18.0 1.17.1 1.16.0 1.15.0 1.14.0 1.13.1 1.12.1 1.10.3 1.9.1 Reference documentation and code samples for the Google Cloud Container V1 Client class Operation.

This operation resource represents operations that may have happened or are
happening on the cluster. All fields are output only.

Generated from protobuf message `google.container.v1.Operation`

## Namespace

Google \\ Cloud \\ Container \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The server-assigned ID for the operation. |
| `↳ zone` | `string` Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the operation is taking place. This field is deprecated, use location instead. |
| `↳ operation_type` | `int` Output only. The operation type. |
| `↳ status` | `int` Output only. The current status of the operation. |
| `↳ detail` | `string` Output only. Detailed operation progress, if available. |
| `↳ status_message` | `string` Output only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead. |
| `↳ self_link` | `string` Output only. Server-defined URI for the operation. Example: `https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`. |
| `↳ target_link` | `string` Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - ## `https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster` ## `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np` `https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node` |
| `↳ location` | `string` Output only. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) or [region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available) in which the cluster resides. |
| `↳ start_time` | `string` Output only. The time the operation started, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. |
| `↳ end_time` | `string` Output only. The time the operation completed, in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format. |
| `↳ progress` | `https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.OperationProgress` Output only. Progress information for an operation. |
| `↳ cluster_conditions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.StatusCondition>` Which conditions caused the current cluster state. Deprecated. Use field error instead. |
| `↳ nodepool_conditions` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.StatusCondition>` Which conditions caused the current node pool state. Deprecated. Use field error instead. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` The error result of the operation in case of failure. |

### getName

Output only. The server-assigned ID for the operation.

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

### setName

Output only. The server-assigned ID for the operation.

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

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

### getZone

Output only. The name of the Google Compute Engine
[zone](https://cloud.google.com/compute/docs/zones#available)
in which the operation is taking place. This field is deprecated, use
location instead.

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

### setZone

Output only. The name of the Google Compute Engine
[zone](https://cloud.google.com/compute/docs/zones#available)
in which the operation is taking place. This field is deprecated, use
location instead.

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

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

### getOperationType

Output only. The operation type.

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

### setOperationType

Output only. The operation type.

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

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

### getStatus

Output only. The current status of the operation.

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

### setStatus

Output only. The current status of the operation.

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

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

### getDetail

Output only. Detailed operation progress, if available.

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

### setDetail

Output only. Detailed operation progress, if available.

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

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

### getStatusMessage

Output only. If an error has occurred, a textual description of the error.

Deprecated. Use the field error instead.

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

### setStatusMessage

Output only. If an error has occurred, a textual description of the error.

Deprecated. Use the field error instead.

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

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

### getSelfLink

Output only. Server-defined URI for the operation. Example:
`https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.

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

### setSelfLink

Output only. Server-defined URI for the operation. Example:
`https://container.googleapis.com/v1alpha1/projects/123/locations/us-central1/operations/operation-123`.

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

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

### getTargetLink

Output only. Server-defined URI for the target of the operation. The format
of this is a URI to the resource being modified (such as a cluster, node
pool, or node). For node pool repairs, there may be multiple nodes being
repaired, but only one will be the target.

Examples:
-

# #

`https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster`

# #

`https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`
`https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`

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

### setTargetLink

Output only. Server-defined URI for the target of the operation. The format
of this is a URI to the resource being modified (such as a cluster, node
pool, or node). For node pool repairs, there may be multiple nodes being
repaired, but only one will be the target.

Examples:
-

# #

`https://container.googleapis.com/v1/projects/123/locations/us-central1/clusters/my-cluster`

# #

`https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np`
`https://container.googleapis.com/v1/projects/123/zones/us-central1-c/clusters/my-cluster/nodePools/my-np/node/my-node`

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

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

### getLocation

Output only. The name of the Google Compute Engine
[zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
or
[region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
in which the cluster resides.

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

### setLocation

Output only. The name of the Google Compute Engine
[zone](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
or
[region](https://cloud.google.com/compute/docs/regions-zones/regions-zones#available)
in which the cluster resides.

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

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

### getStartTime

Output only. The time the operation started, in
[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.

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

### setStartTime

Output only. The time the operation started, in
[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.

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

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

### getEndTime

Output only. The time the operation completed, in
[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.

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

### setEndTime

Output only. The time the operation completed, in
[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.

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

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

### getProgress

Output only. Progress information for an operation.

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

### hasProgress

### clearProgress

### setProgress

Output only. Progress information for an operation.

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

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

### getClusterConditions

Which conditions caused the current cluster state.

Deprecated. Use field error instead.

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

### setClusterConditions

Which conditions caused the current cluster state.

Deprecated. Use field error instead.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.StatusCondition>` |

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

### getNodepoolConditions

Which conditions caused the current node pool state.

Deprecated. Use field error instead.

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

### setNodepoolConditions

Which conditions caused the current node pool state.

Deprecated. Use field error instead.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-container/latest/V1.StatusCondition>` |

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

### getError

The error result of the operation in case of failure.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### clearError

### setError

The error result of the operation in case of failure.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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