Describes options for object rewrite.

| JSON representation |
|---|
| ``` { "kmsKey": string, "storageClass": enum (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/RewriteObject#StorageClass`) } ``` |

| Fields ||
|---|---|
| `kmsKey` | `string` Optional. Resource name of the Cloud KMS key that is used to encrypt the object. The Cloud KMS key must be located in the same location as the object. For details, see [customer-managed encryption keys](https://cloud.google.com/storage/docs/encryption/customer-managed-keys#add-object-key). Format: `projects/{projectId}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` For example: `projects/123456/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key`. The object will be rewritten and set with the specified KMS key. |
| `storageClass` | ``enum (`https://docs.cloud.google.com/storage/docs/storagebatchoperations/reference/rest/v1/RewriteObject#StorageClass`)`` Optional. Rewrites the object to the specified storage class. Setting this field will perform a full byte copy of the object if the storage class is different from the object's current storage class. If Autoclass is enabled on the bucket, storage class changes are ignored by Cloud Storage. |

## StorageClass

The Google Cloud Storage class of an object. For more details, see [Storage classes](https://cloud.google.com/storage/docs/storage-classes). New storage classes can be added in the future.

| Enums ||
|---|---|
| `STORAGE_CLASS_UNSPECIFIED` | The storage class is not specified. |
| `STANDARD` | Standard storage class. |
| `NEARLINE` | Nearline storage class. |
| `COLDLINE` | Coldline storage class. |
| `ARCHIVE` | Archive storage class. |