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 Database : IMessage<Database>, IEquatable<Database>, IDeepCloneable<Database>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore Admin v1 API class Database.

A Cloud Firestore Database.

## Inheritance

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

## Implements

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

### Database()

    public Database()

### Database(Database)

    public Database(Database other)

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

## Properties

### AppEngineIntegrationMode

    public Database.Types.AppEngineIntegrationMode AppEngineIntegrationMode { get; set; }

The App Engine integration mode to use for this database.

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

### CmekConfig

    public Database.Types.CmekConfig CmekConfig { get; set; }

Optional. Presence indicates CMEK is enabled for this database.

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

### ConcurrencyMode

    public Database.Types.ConcurrencyMode ConcurrencyMode { get; set; }

The concurrency control mode to use for this database.

If unspecified in a CreateDatabase request, this will default based on the
database edition: Optimistic for Enterprise and Pessimistic for all other
databases.

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

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp at which this database was created. Databases
created before 2016 do not populate create_time.

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

### DatabaseEdition

    public Database.Types.DatabaseEdition DatabaseEdition { get; set; }

Immutable. The edition of the database.

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

### DatabaseName

    public DatabaseName DatabaseName { get; set; }

[DatabaseName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.DatabaseName.md.txt)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Firestore.Admin.V1/latest/Google.Cloud.Firestore.Admin.V1.Database.md.txt#Google_Cloud_Firestore_Admin_V1_Database_Name) resource name property.

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

### DeleteProtectionState

    public Database.Types.DeleteProtectionState DeleteProtectionState { get; set; }

State of delete protection for the database.

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

### DeleteTime

    public Timestamp DeleteTime { get; set; }

Output only. The timestamp at which this database was deleted. Only set if
the database has been deleted.

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

### EarliestVersionTime

    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.

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

### Etag

    public string Etag { get; set; }

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.

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

### FirestoreDataAccessMode

    public Database.Types.DataAccessMode FirestoreDataAccessMode { get; set; }

Optional. The Firestore API data access mode to use for this database. If
not set on write:

- the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition.
- the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.

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

### FreeTier

    public bool FreeTier { get; set; }

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.

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

### HasFreeTier

    public bool HasFreeTier { get; }

Gets whether the "free_tier" field is set

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

### KeyPrefix

    public string KeyPrefix { get; set; }

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).

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

### LocationId

    public string LocationId { get; set; }

The location of the database. Available locations are listed at
<https://cloud.google.com/firestore/docs/locations>.

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

### MongodbCompatibleDataAccessMode

    public Database.Types.DataAccessMode MongodbCompatibleDataAccessMode { get; set; }

Optional. The MongoDB compatible API data access mode to use for this
database. If not set on write, the default value is
DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always
DATA_ACCESS_MODE_DISABLED for Standard Edition.

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

### Name

    public string Name { get; set; }

The resource name of the Database.
Format: `projects/{project}/databases/{database}`

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

### PointInTimeRecoveryEnablement

    public Database.Types.PointInTimeRecoveryEnablement PointInTimeRecoveryEnablement { get; set; }

Whether to enable the PITR feature on this database.

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

### PreviousId

    public string PreviousId { get; set; }

Output only. The database resource's prior database ID. This field is only
populated for deleted databases.

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

### RealtimeUpdatesMode

    public RealtimeUpdatesMode RealtimeUpdatesMode { get; set; }

Immutable. The default Realtime Updates mode to use for this database.

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

### SourceInfo

    public Database.Types.SourceInfo SourceInfo { get; set; }

Output only. Information about the provenance of this database.

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

### Tags

    public MapField<string, string> Tags { get; }

Optional. Input only. Immutable. Tag keys/values directly bound to this
resource. For example:
"123/environment": "production",
"123/costCenter": "marketing"

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

### Type

    public Database.Types.DatabaseType Type { get; set; }

The type of the database.
See <https://cloud.google.com/datastore/docs/firestore-or-datastore> for
information about how to choose.

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

### Uid

    public string Uid { get; set; }

Output only. The system-generated UUID4 for this Database.

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

### UpdateTime

    public Timestamp UpdateTime { get; set; }

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.

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

### VersionRetentionPeriod

    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.

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