# Google Cloud Build V2 Client - Class UpdateConnectionRequest (1.1.2)

1.1.2 (latest) 1.1.1 1.0.4 0.16.3 0.15.0 0.14.0 0.13.2 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.3 0.6.1 0.5.1 0.4.0 0.3.8 Reference documentation and code samples for the Google Cloud Build V2 Client class UpdateConnectionRequest.

Message for updating a Connection.

Generated from protobuf message `google.devtools.cloudbuild.v2.UpdateConnectionRequest`

## Namespace

Google \\ Cloud \\ Build \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ connection` | `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.Connection` Required. The Connection to update. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` The list of fields to be updated. |
| `↳ allow_missing` | `bool` If set to true, and the connection is not found a new connection will be created. In this situation `update_mask` is ignored. The creation will succeed only if the input connection has all the necessary information (e.g a github_config with both user_oauth_token and installation_id properties). |
| `↳ etag` | `string` The current etag of the connection. If an etag is provided and does not match the current etag of the connection, update will be blocked and an ABORTED error will be returned. |

### getConnection

Required. The Connection to update.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.Connection|null` |   |

### hasConnection

### clearConnection

### setConnection

Required. The Connection to update.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.Connection` |

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

### getUpdateMask

The list of fields to be updated.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

The list of fields to be updated.

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

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

### getAllowMissing

If set to true, and the connection is not found a new connection
will be created. In this situation `update_mask` is ignored.

The creation will succeed only if the input connection has all the
necessary information (e.g a github_config with both user_oauth_token and
installation_id properties).

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

### setAllowMissing

If set to true, and the connection is not found a new connection
will be created. In this situation `update_mask` is ignored.

The creation will succeed only if the input connection has all the
necessary information (e.g a github_config with both user_oauth_token and
installation_id properties).

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

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

### getEtag

The current etag of the connection.

If an etag is provided and does not match the current etag of the
connection, update will be blocked and an ABORTED error will be returned.

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

### setEtag

The current etag of the connection.

If an etag is provided and does not match the current etag of the
connection, update will be blocked and an ABORTED error will be returned.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `connection` | `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.Connection` Required. The Connection to update. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` The list of fields to be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-build/latest/V2.UpdateConnectionRequest` |   |