1.0.0 (latest) 1.0.0-beta06

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

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

Describes options for object retention update.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ObjectRetention](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetention), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ObjectRetention](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetention), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ObjectRetention](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetention), [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

### ObjectRetention()

    public ObjectRetention()

### ObjectRetention(ObjectRetention)

    public ObjectRetention(ObjectRetention other)

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

## Properties

### HasRetainUntilTime

    public bool HasRetainUntilTime { get; }

Gets whether the "retain_until_time" field is set

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

### HasRetentionMode

    public bool HasRetentionMode { get; }

Gets whether the "retention_mode" field is set

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

### RetainUntilTime

    public string RetainUntilTime { get; set; }

Required. The time when the object will be retained until. UNSET will clear the retention. Must be specified in RFC 3339 format e.g. YYYY-MM-DD'T'HH:MM:SS.SS'Z' or YYYY-MM-DD'T'HH:MM:SS'Z'.

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

### RetentionMode

    public ObjectRetention.Types.RetentionMode RetentionMode { get; set; }

Required. The retention mode of the object.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetentionhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetention.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.StorageBatchOperations.V1/latest/Google.Cloud.StorageBatchOperations.V1.ObjectRetention.Types.RetentionMode` |   |