1.0.0 (latest) 1.0.0-beta06

    public sealed class RewriteObject : IMessage<RewriteObject>, IEquatable<RewriteObject>, IDeepCloneable<RewriteObject>, IBufferMessage, IMessage

Reference documentation and code samples for the Storage Batch Operations v1 API class RewriteObject.

Describes options for object rewrite.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> RewriteObject

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RewriteObject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.RewriteObject), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RewriteObject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.RewriteObject), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RewriteObject](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.RewriteObject), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.StorageBatchOperations.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1)

## Assembly

Google.Cloud.StorageBatchOperations.V1.dll

## Constructors

### RewriteObject()

    public RewriteObject()

### RewriteObject(RewriteObject)

    public RewriteObject(RewriteObject other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.RewriteObject` |

## Properties

### HasKmsKey

    public bool HasKmsKey { get; }

Gets whether the "kms_key" field is set

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### KmsKey

    public string KmsKey { get; set; }

Required. Resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Refer to <https://cloud.google.com/storage/docs/encryption/using-customer-managed-keys#add-object-key> for additional documentation. Format: projects/{project}/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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### KmsKeyAsCryptoKeyName

    public CryptoKeyName KmsKeyAsCryptoKeyName { get; set; }

[CryptoKeyName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.CryptoKeyName)-typed view over the [KmsKey](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.RewriteObject#Google_Cloud_StorageBatchOperations_V1_RewriteObject_KmsKey) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.CryptoKeyName` |   |