3.19.0 (latest) 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.4.0 2.3.0 2.2.0

    public sealed class Field.Types.TtlConfig : IMessage<Field.Types.TtlConfig>, IEquatable<Field.Types.TtlConfig>, IDeepCloneable<Field.Types.TtlConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore Admin v1 API class Field.Types.TtlConfig.

The TTL (time-to-live) configuration for documents that have this `Field`
set.

A timestamp stored in a TTL-enabled field will be used to determine the
expiration time of the document. The expiration time is the sum
of the timestamp value and the `expiration_offset`.

For Enterprise edition databases, the timestamp value may alternatively be
stored in an array value in the TTL-enabled field.

An expiration time in the past indicates that the document is eligible for
immediate expiration. Using any other data type or leaving the field absent
will disable expiration for the individual document.

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[Field](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.md.txt)[TtlConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.TtlConfig.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Field](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.md.txt)[TtlConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.TtlConfig.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[Field](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.md.txt)[TtlConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Field.Types.TtlConfig.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## 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.Firestore.Admin.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.md.txt)

## Assembly

Google.Cloud.Firestore.Admin.V1.dll

## Constructors

### TtlConfig()

    public TtlConfig()

### TtlConfig(TtlConfig)

    public TtlConfig(Field.Types.TtlConfig other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `FieldTypesTtlConfig` |

## Properties

### ExpirationOffset

    public Duration ExpirationOffset { get; set; }

Optional. The offset, relative to the timestamp value from the
TTL-enabled field, used to determine the document's expiration time.

`expiration_offset.seconds` must be between 0 and 2,147,483,647
inclusive. Values more precise than seconds are rejected.

If unset, defaults to 0, in which case the expiration time is the same
as the timestamp value from the TTL-enabled field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Duration` |   |

### State

    public Field.Types.TtlConfig.Types.State State { get; set; }

Output only. The state of the TTL configuration.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `FieldTypesTtlConfigTypesState` |   |