public Timestamp EarliestVersionTime { get; set; }
Output only. The earliest timestamp at which older versions of the data can
be read from the database. See [version_retention_period] above; this field
is populated with now - version_retention_period.
This value is continuously updated, and becomes stale the moment it is
queried. If you are using this value to recover data, make sure to account
for the time from the moment when the value is queried to the moment when
you initiate the recovery.
This checksum is computed by the server based on the value of other
fields, and may be sent on update and delete requests to ensure the
client has an up-to-date value before proceeding.
Output only. Background: Free tier is the ability of a Firestore database
to use a small amount of resources every day without being charged. Once
usage exceeds the free tier limit further usage is charged.
Whether this database can make use of the free tier. Only one database
per project can be eligible for the free tier.
The first (or next) database that is created in a project without a free
tier database will be marked as eligible for the free tier. Databases that
are created while there is a free tier database will not be eligible for
the free tier.
Output only. The key_prefix for this database. This key_prefix is used, in
combination with the project ID ("<key prefix>~<project id>") to construct
the application ID that is returned from the Cloud Datastore APIs in Google
App Engine first generation runtimes.
This value may be empty in which case the appid to use for URL-encoded keys
is the project_id (eg: foo instead of v~foo).
Optional. Input only. Immutable. Tag keys/values directly bound to this
resource. For example:
"123/environment": "production",
"123/costCenter": "marketing"
Output only. The timestamp at which this database was most recently
updated. Note this only includes updates to the database resource and not
data contained by the database.
public Duration VersionRetentionPeriod { get; set; }
Output only. The period during which past versions of data are retained in
the database.
Any [read][google.firestore.v1.GetDocumentRequest.read_time]
or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
a read_time within this window, and will read the state of the database
at that time.
If the PITR feature is enabled, the retention period is 7 days. Otherwise,
the retention period is 1 hour.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides reference information for the \u003ccode\u003eDatabase\u003c/code\u003e class within the Google Cloud Firestore Admin v1 API, including its properties, constructors, inheritance, and implemented interfaces.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eGoogle.Cloud.Firestore.Admin.V1.Database\u003c/code\u003e API is 3.12.0, with several older versions available, down to version 2.2.0, for those needing access to different updates.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDatabase\u003c/code\u003e class represents a Cloud Firestore Database and includes properties such as \u003ccode\u003eAppEngineIntegrationMode\u003c/code\u003e, \u003ccode\u003eCmekConfig\u003c/code\u003e, \u003ccode\u003eConcurrencyMode\u003c/code\u003e, \u003ccode\u003eCreateTime\u003c/code\u003e, \u003ccode\u003eDeleteTime\u003c/code\u003e, and \u003ccode\u003eVersionRetentionPeriod\u003c/code\u003e, among others, allowing the user to configure various aspects of their database.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDatabase\u003c/code\u003e class has many optional settings, including properties for managing data retention, choosing the type of database, enabling the PITR feature, and adding delete protection.\u003c/p\u003e\n"],["\u003cp\u003eThis document highlights the inheritance and implementation details of the \u003ccode\u003eDatabase\u003c/code\u003e class, such as it inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e, providing insight into how it interacts with other parts of the system.\u003c/p\u003e\n"]]],[],null,["# Firestore Admin v1 API - Class Database (3.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.14.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.13.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.12.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.11.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.10.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.9.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.8.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.7.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.6.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.5.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.4.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.3.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.2.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.1.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/3.0.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.4.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.3.0/Google.Cloud.Firestore.Admin.V1.Database)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/2.2.0/Google.Cloud.Firestore.Admin.V1.Database) \n\n public sealed class Database : IMessage\u003cDatabase\u003e, IEquatable\u003cDatabase\u003e, IDeepCloneable\u003cDatabase\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Firestore Admin v1 API class Database.\n\nA Cloud Firestore Database. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Database \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Database](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Database](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Database](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Firestore.Admin.V1](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.Admin.V1.dll\n\nConstructors\n------------\n\n### Database()\n\n public Database()\n\n### Database(Database)\n\n public Database(Database other)\n\nProperties\n----------\n\n### AppEngineIntegrationMode\n\n public Database.Types.AppEngineIntegrationMode AppEngineIntegrationMode { get; set; }\n\nThe App Engine integration mode to use for this database.\n\n### CmekConfig\n\n public Database.Types.CmekConfig CmekConfig { get; set; }\n\nOptional. Presence indicates CMEK is enabled for this database.\n\n### ConcurrencyMode\n\n public Database.Types.ConcurrencyMode ConcurrencyMode { get; set; }\n\nThe concurrency control mode to use for this database.\n\n### CreateTime\n\n public Timestamp CreateTime { get; set; }\n\nOutput only. The timestamp at which this database was created. Databases\ncreated before 2016 do not populate create_time.\n\n### DatabaseEdition\n\n public Database.Types.DatabaseEdition DatabaseEdition { get; set; }\n\nImmutable. The edition of the database.\n\n### DatabaseName\n\n public DatabaseName DatabaseName { get; set; }\n\n[DatabaseName](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.DatabaseName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database#Google_Cloud_Firestore_Admin_V1_Database_Name) resource name property.\n\n### DeleteProtectionState\n\n public Database.Types.DeleteProtectionState DeleteProtectionState { get; set; }\n\nState of delete protection for the database.\n\n### DeleteTime\n\n public Timestamp DeleteTime { get; set; }\n\nOutput only. The timestamp at which this database was deleted. Only set if\nthe database has been deleted.\n\n### EarliestVersionTime\n\n public Timestamp EarliestVersionTime { get; set; }\n\nOutput only. The earliest timestamp at which older versions of the data can\nbe read from the database. See \\[version_retention_period\\] above; this field\nis populated with `now - version_retention_period`.\n\nThis value is continuously updated, and becomes stale the moment it is\nqueried. If you are using this value to recover data, make sure to account\nfor the time from the moment when the value is queried to the moment when\nyou initiate the recovery.\n\n### Etag\n\n public string Etag { get; set; }\n\nThis checksum is computed by the server based on the value of other\nfields, and may be sent on update and delete requests to ensure the\nclient has an up-to-date value before proceeding.\n\n### FreeTier\n\n public bool FreeTier { get; set; }\n\nOutput only. Background: Free tier is the ability of a Firestore database\nto use a small amount of resources every day without being charged. Once\nusage exceeds the free tier limit further usage is charged.\n\nWhether this database can make use of the free tier. Only one database\nper project can be eligible for the free tier.\n\nThe first (or next) database that is created in a project without a free\ntier database will be marked as eligible for the free tier. Databases that\nare created while there is a free tier database will not be eligible for\nthe free tier.\n\n### HasFreeTier\n\n public bool HasFreeTier { get; }\n\nGets whether the \"free_tier\" field is set\n\n### KeyPrefix\n\n public string KeyPrefix { get; set; }\n\nOutput only. The key_prefix for this database. This key_prefix is used, in\ncombination with the project ID (\"\\\u003ckey prefix\\\u003e\\~\\\u003cproject id\\\u003e\") to construct\nthe application ID that is returned from the Cloud Datastore APIs in Google\nApp Engine first generation runtimes.\n\nThis value may be empty in which case the appid to use for URL-encoded keys\nis the project_id (eg: foo instead of v\\~foo).\n\n### LocationId\n\n public string LocationId { get; set; }\n\nThe location of the database. Available locations are listed at\n\u003chttps://cloud.google.com/firestore/docs/locations\u003e.\n\n### Name\n\n public string Name { get; set; }\n\nThe resource name of the Database.\nFormat: `projects/{project}/databases/{database}`\n\n### PointInTimeRecoveryEnablement\n\n public Database.Types.PointInTimeRecoveryEnablement PointInTimeRecoveryEnablement { get; set; }\n\nWhether to enable the PITR feature on this database.\n\n### PreviousId\n\n public string PreviousId { get; set; }\n\nOutput only. The database resource's prior database ID. This field is only\npopulated for deleted databases.\n\n### SourceInfo\n\n public Database.Types.SourceInfo SourceInfo { get; set; }\n\nOutput only. Information about the provenance of this database.\n\n### Tags\n\n public MapField\u003cstring, string\u003e Tags { get; }\n\nOptional. Input only. Immutable. Tag keys/values directly bound to this\nresource. For example:\n\"123/environment\": \"production\",\n\"123/costCenter\": \"marketing\"\n\n### Type\n\n public Database.Types.DatabaseType Type { get; set; }\n\nThe type of the database.\nSee \u003chttps://cloud.google.com/datastore/docs/firestore-or-datastore\u003e for\ninformation about how to choose.\n\n### Uid\n\n public string Uid { get; set; }\n\nOutput only. The system-generated UUID4 for this Database.\n\n### UpdateTime\n\n public Timestamp UpdateTime { get; set; }\n\nOutput only. The timestamp at which this database was most recently\nupdated. Note this only includes updates to the database resource and not\ndata contained by the database.\n\n### VersionRetentionPeriod\n\n public Duration VersionRetentionPeriod { get; set; }\n\nOutput only. The period during which past versions of data are retained in\nthe database.\n\nAny \\[read\\]\\[google.firestore.v1.GetDocumentRequest.read_time\\]\nor \\[query\\]\\[google.firestore.v1.ListDocumentsRequest.read_time\\] can specify\na `read_time` within this window, and will read the state of the database\nat that time.\n\nIf the PITR feature is enabled, the retention period is 7 days. Otherwise,\nthe retention period is 1 hour."]]