# Cloud KMS V1 Client - Class UpdateCryptoKeyRequest (2.9.0)

2.9.0 (latest) 2.8.0 2.7.0 2.6.0 2.5.2 2.4.0 2.3.1 2.2.0 2.1.6 2.0.0 1.23.0 1.22.1 1.21.4 1.20.3 1.19.0 1.18.1 1.17.0 1.16.4 1.15.3 Reference documentation and code samples for the Cloud KMS V1 Client class UpdateCryptoKeyRequest.

Request message for
[KeyManagementService.UpdateCryptoKey](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.Client.KeyManagementServiceClient#_Google_Cloud_Kms_V1_Client_KeyManagementServiceClient__updateCryptoKey__).

Generated from protobuf message `google.cloud.kms.v1.UpdateCryptoKeyRequest`

## Namespace

Google \\ Cloud \\ Kms \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ crypto_key` | `https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey` Required. [CryptoKey](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey) with updated values. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Required. List of fields to be updated in this request. |

### getCryptoKey

Required. [CryptoKey](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey) with updated values.

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

### hasCryptoKey

### clearCryptoKey

### setCryptoKey

Required. [CryptoKey](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey) with updated values.

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

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

### getUpdateMask

Required. List of fields to be updated in this request.

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

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Required. List of fields to be updated in this request.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `cryptoKey` | `https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey` Required. [CryptoKey](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey) with updated values. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Required. List of fields to be updated in this request. |

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