# Google Cloud OsLogin V1 Client - Class UpdateSshPublicKeyRequest (2.1.3)

2.1.3 (latest) 2.1.2 2.0.5 1.9.6 1.8.0 1.7.0 1.6.0 1.5.2 1.4.6 Reference documentation and code samples for the Google Cloud OsLogin V1 Client class UpdateSshPublicKeyRequest.

A request message for updating an SSH public key.

Generated from protobuf message `google.cloud.oslogin.v1.UpdateSshPublicKeyRequest`

## Namespace

Google \\ Cloud \\ OsLogin \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`. |
| `↳ ssh_public_key` | `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/Common.SshPublicKey` Required. The SSH public key and expiration time. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Mask to control which fields get updated. Updates all if not present. |

### getName

Required. The fingerprint of the public key to update. Public keys are
identified by their SHA-256 fingerprint. The fingerprint of the public key
is in format `users/{user}/sshPublicKeys/{fingerprint}`.

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

### setName

Required. The fingerprint of the public key to update. Public keys are
identified by their SHA-256 fingerprint. The fingerprint of the public key
is in format `users/{user}/sshPublicKeys/{fingerprint}`.

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

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

### getSshPublicKey

Required. The SSH public key and expiration time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/Common.SshPublicKey|null` |   |

### hasSshPublicKey

### clearSshPublicKey

### setSshPublicKey

Required. The SSH public key and expiration time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/Common.SshPublicKey` |

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

### getUpdateMask

Mask to control which fields get updated. Updates all if not present.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Mask to control which fields get updated. Updates all if not present.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see OsLoginServiceClient::sshPublicKeyName() for help formatting this field. |
| `sshPublicKey` | `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/Common.SshPublicKey` Required. The SSH public key and expiration time. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/V1.UpdateSshPublicKeyRequest` |   |

### static::buildFromNameSshPublicKeyUpdateMask

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`. Please see OsLoginServiceClient::sshPublicKeyName() for help formatting this field. |
| `sshPublicKey` | `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/Common.SshPublicKey` Required. The SSH public key and expiration time. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Mask to control which fields get updated. Updates all if not present. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-oslogin/latest/V1.UpdateSshPublicKeyRequest` |   |