@google-cloud/firestore-api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/build/protos/google/firestore/admin/v1/backup.proto +112 -0
- package/build/protos/google/firestore/admin/v1/database.proto +403 -0
- package/build/protos/google/firestore/admin/v1/field.proto +154 -0
- package/build/protos/google/firestore/admin/v1/firestore_admin.proto +1229 -0
- package/build/protos/google/firestore/admin/v1/index.proto +378 -0
- package/build/protos/google/firestore/admin/v1/location.proto +30 -0
- package/build/protos/google/firestore/admin/v1/operation.proto +330 -0
- package/build/protos/google/firestore/admin/v1/realtime_updates.proto +40 -0
- package/build/protos/google/firestore/admin/v1/schedule.proto +95 -0
- package/build/protos/google/firestore/admin/v1/snapshot.proto +53 -0
- package/build/protos/google/firestore/admin/v1/user_creds.proto +86 -0
- package/build/protos/google/firestore/v1/aggregation_result.proto +43 -0
- package/build/protos/google/firestore/v1/bloom_filter.proto +73 -0
- package/build/protos/google/firestore/v1/common.proto +111 -0
- package/build/protos/google/firestore/v1/document.proto +247 -0
- package/build/protos/google/firestore/v1/explain_stats.proto +41 -0
- package/build/protos/google/firestore/v1/firestore.proto +1237 -0
- package/build/protos/google/firestore/v1/pipeline.proto +43 -0
- package/build/protos/google/firestore/v1/query.proto +600 -0
- package/build/protos/google/firestore/v1/query_profile.proto +92 -0
- package/build/protos/google/firestore/v1/write.proto +286 -0
- package/build/protos/google/firestore/v1beta1/common.proto +82 -0
- package/build/protos/google/firestore/v1beta1/document.proto +149 -0
- package/build/protos/google/firestore/v1beta1/firestore.proto +900 -0
- package/build/protos/google/firestore/v1beta1/query.proto +300 -0
- package/build/protos/google/firestore/v1beta1/undeliverable_first_gen_event.proto +75 -0
- package/build/protos/google/firestore/v1beta1/write.proto +258 -0
- package/build/protos/protos.d.ts +35648 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +13 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/firestore_admin_client.d.ts +1925 -0
- package/build/src/v1/firestore_admin_client.js +2734 -0
- package/build/src/v1/firestore_admin_client.js.map +1 -0
- package/build/src/v1/firestore_admin_client_config.json +172 -0
- package/build/src/v1/firestore_admin_proto_list.json +13 -0
- package/build/src/v1/firestore_client.d.ts +1204 -0
- package/build/src/v1/firestore_client.js +1605 -0
- package/build/src/v1/firestore_client.js.map +1 -0
- package/build/src/v1/firestore_client_config.json +135 -0
- package/build/src/v1/firestore_proto_list.json +12 -0
- package/build/src/v1/gapic_metadata.json +351 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +25 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1beta1/firestore_client.d.ts +930 -0
- package/build/src/v1beta1/firestore_client.js +1310 -0
- package/build/src/v1beta1/firestore_client.js.map +1 -0
- package/build/src/v1beta1/firestore_client_config.json +99 -0
- package/build/src/v1beta1/firestore_proto_list.json +8 -0
- package/build/src/v1beta1/gapic_metadata.json +165 -0
- package/build/src/v1beta1/index.d.ts +1 -0
- package/build/src/v1beta1/index.js +23 -0
- package/build/src/v1beta1/index.js.map +1 -0
- package/package.json +65 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
|
+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
|
+
|
|
5
|
+
# [Cloud Firestore API: Nodejs Client][homepage]
|
|
6
|
+
|
|
7
|
+
> [!IMPORTANT]
|
|
8
|
+
> **Internal API Client**: This library (`@google-cloud/firestore-api`) is an auto-generated, lightweight GAPIC layer designed as a dependency for the official handwritten client library. End users should install and import **[@google-cloud/firestore](https://www.npmjs.com/package/@google-cloud/firestore)** instead.
|
|
9
|
+
|
|
10
|
+
[//]: # "releaseLevel"
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.org/package/@google-cloud/firestore-api)
|
|
13
|
+
|
|
14
|
+
Cloud Firestore API client for Node.js
|
|
15
|
+
|
|
16
|
+
[//]: # "partials.introduction"
|
|
17
|
+
|
|
18
|
+
A comprehensive list of changes in each version may be found in
|
|
19
|
+
[the CHANGELOG][homepage_changelog].
|
|
20
|
+
|
|
21
|
+
* [Cloud Firestore API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/firestore/latest)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Read more about the client libraries for Cloud APIs, including the older
|
|
25
|
+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
26
|
+
|
|
27
|
+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
|
|
28
|
+
|
|
29
|
+
**Table of contents:**
|
|
30
|
+
|
|
31
|
+
* [Quickstart](#quickstart)
|
|
32
|
+
* [Before you begin](#before-you-begin)
|
|
33
|
+
* [Installing the client library](#installing-the-client-library)
|
|
34
|
+
|
|
35
|
+
* [Versioning](#versioning)
|
|
36
|
+
* [Contributing](#contributing)
|
|
37
|
+
* [License](#license)
|
|
38
|
+
|
|
39
|
+
## Quickstart
|
|
40
|
+
### Before you begin
|
|
41
|
+
|
|
42
|
+
1. [Select or create a Cloud Platform project][projects].
|
|
43
|
+
1. [Enable billing for your project][billing].
|
|
44
|
+
1. [Enable the Cloud Firestore API API][enable_api].
|
|
45
|
+
1. [Set up authentication][auth] so you can access the
|
|
46
|
+
API from your local workstation.
|
|
47
|
+
### Installing the client library
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install @google-cloud/firestore-api
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
[//]: # "partials.body"
|
|
54
|
+
|
|
55
|
+
## Samples
|
|
56
|
+
|
|
57
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
58
|
+
|
|
59
|
+
[//]: # "samples"
|
|
60
|
+
|
|
61
|
+
## Supported Node.js Versions
|
|
62
|
+
|
|
63
|
+
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
|
64
|
+
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
|
65
|
+
Node.js.
|
|
66
|
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
|
67
|
+
as soon as possible to an actively supported LTS version.
|
|
68
|
+
|
|
69
|
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
|
70
|
+
best-efforts basis with the following warnings:
|
|
71
|
+
|
|
72
|
+
* Legacy versions are not tested in continuous integration.
|
|
73
|
+
* Some security patches and features cannot be backported.
|
|
74
|
+
* Dependencies cannot be kept up-to-date.
|
|
75
|
+
|
|
76
|
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
|
77
|
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
|
78
|
+
The dist-tags follow the naming convention `legacy-(version)`.
|
|
79
|
+
For example, `npm install @google-cloud/firestore-api@legacy-8` installs client libraries
|
|
80
|
+
for versions compatible with Node.js 8.
|
|
81
|
+
|
|
82
|
+
## Versioning
|
|
83
|
+
|
|
84
|
+
This library follows [Semantic Versioning](http://semver.org/).
|
|
85
|
+
|
|
86
|
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
87
|
+
|
|
88
|
+
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
89
|
+
|
|
90
|
+
## Contributing
|
|
91
|
+
|
|
92
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
|
|
93
|
+
|
|
94
|
+
Please note that this `README.md`
|
|
95
|
+
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
96
|
+
are generated from a central template.
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
Apache Version 2.0
|
|
101
|
+
|
|
102
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
|
|
103
|
+
|
|
104
|
+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
105
|
+
[projects]: https://console.cloud.google.com/project
|
|
106
|
+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
107
|
+
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=firestore.googleapis.com
|
|
108
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
109
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-firestore-api/samples
|
|
110
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-firestore-api/CHANGELOG.md
|
|
111
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-firestore-api
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.firestore.admin.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/protobuf/timestamp.proto";
|
|
22
|
+
|
|
23
|
+
option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
|
|
24
|
+
option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb";
|
|
25
|
+
option java_multiple_files = true;
|
|
26
|
+
option java_outer_classname = "BackupProto";
|
|
27
|
+
option java_package = "com.google.firestore.admin.v1";
|
|
28
|
+
option objc_class_prefix = "GCFS";
|
|
29
|
+
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
|
|
30
|
+
option ruby_package = "Google::Cloud::Firestore::Admin::V1";
|
|
31
|
+
|
|
32
|
+
// A Backup of a Cloud Firestore Database.
|
|
33
|
+
//
|
|
34
|
+
// The backup contains all documents and index configurations for the given
|
|
35
|
+
// database at a specific point in time.
|
|
36
|
+
message Backup {
|
|
37
|
+
option (google.api.resource) = {
|
|
38
|
+
type: "firestore.googleapis.com/Backup"
|
|
39
|
+
pattern: "projects/{project}/locations/{location}/backups/{backup}"
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Backup specific statistics.
|
|
43
|
+
message Stats {
|
|
44
|
+
// Output only. Summation of the size of all documents and index entries in
|
|
45
|
+
// the backup, measured in bytes.
|
|
46
|
+
int64 size_bytes = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
47
|
+
|
|
48
|
+
// Output only. The total number of documents contained in the backup.
|
|
49
|
+
int64 document_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
50
|
+
|
|
51
|
+
// Output only. The total number of index entries contained in the backup.
|
|
52
|
+
int64 index_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Indicate the current state of the backup.
|
|
56
|
+
enum State {
|
|
57
|
+
// The state is unspecified.
|
|
58
|
+
STATE_UNSPECIFIED = 0;
|
|
59
|
+
|
|
60
|
+
// The pending backup is still being created. Operations on the
|
|
61
|
+
// backup will be rejected in this state.
|
|
62
|
+
CREATING = 1;
|
|
63
|
+
|
|
64
|
+
// The backup is complete and ready to use.
|
|
65
|
+
READY = 2;
|
|
66
|
+
|
|
67
|
+
// The backup is not available at this moment.
|
|
68
|
+
NOT_AVAILABLE = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Output only. The unique resource name of the Backup.
|
|
72
|
+
//
|
|
73
|
+
// Format is `projects/{project}/locations/{location}/backups/{backup}`.
|
|
74
|
+
//
|
|
75
|
+
// The location in the name will be the Standard Managed Multi-Region (SMMR)
|
|
76
|
+
// location (e.g. `us`) if the backup was created with an SMMR location, or
|
|
77
|
+
// the Google Managed Multi-Region (GMMR) location (e.g. `nam5`) if the backup
|
|
78
|
+
// was created with a GMMR location.
|
|
79
|
+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
80
|
+
|
|
81
|
+
// Output only. Name of the Firestore database that the backup is from.
|
|
82
|
+
//
|
|
83
|
+
// Format is `projects/{project}/databases/{database}`.
|
|
84
|
+
string database = 2 [
|
|
85
|
+
(google.api.field_behavior) = OUTPUT_ONLY,
|
|
86
|
+
(google.api.resource_reference) = {
|
|
87
|
+
type: "firestore.googleapis.com/Database"
|
|
88
|
+
}
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
// Output only. The system-generated UUID4 for the Firestore database that the
|
|
92
|
+
// backup is from.
|
|
93
|
+
string database_uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
94
|
+
|
|
95
|
+
// Output only. The backup contains an externally consistent copy of the
|
|
96
|
+
// database at this time.
|
|
97
|
+
google.protobuf.Timestamp snapshot_time = 3
|
|
98
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
99
|
+
|
|
100
|
+
// Output only. The timestamp at which this backup expires.
|
|
101
|
+
google.protobuf.Timestamp expire_time = 4
|
|
102
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
103
|
+
|
|
104
|
+
// Output only. Statistics about the backup.
|
|
105
|
+
//
|
|
106
|
+
// This data only becomes available after the backup is fully materialized to
|
|
107
|
+
// secondary storage. This field will be empty till then.
|
|
108
|
+
Stats stats = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
109
|
+
|
|
110
|
+
// Output only. The current state of the backup.
|
|
111
|
+
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
112
|
+
}
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
// Copyright 2026 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.firestore.admin.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/firestore/admin/v1/realtime_updates.proto";
|
|
22
|
+
import "google/protobuf/duration.proto";
|
|
23
|
+
import "google/protobuf/timestamp.proto";
|
|
24
|
+
|
|
25
|
+
option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
|
|
26
|
+
option go_package = "cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb";
|
|
27
|
+
option java_multiple_files = true;
|
|
28
|
+
option java_outer_classname = "DatabaseProto";
|
|
29
|
+
option java_package = "com.google.firestore.admin.v1";
|
|
30
|
+
option objc_class_prefix = "GCFS";
|
|
31
|
+
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
|
|
32
|
+
option ruby_package = "Google::Cloud::Firestore::Admin::V1";
|
|
33
|
+
option (google.api.resource_definition) = {
|
|
34
|
+
type: "firestore.googleapis.com/Operation"
|
|
35
|
+
pattern: "projects/{project}/databases/{database}/operations/{operation}"
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// A Cloud Firestore Database.
|
|
39
|
+
message Database {
|
|
40
|
+
option (google.api.resource) = {
|
|
41
|
+
type: "firestore.googleapis.com/Database"
|
|
42
|
+
pattern: "projects/{project}/databases/{database}"
|
|
43
|
+
style: DECLARATIVE_FRIENDLY
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// The type of the database.
|
|
47
|
+
// See https://cloud.google.com/datastore/docs/firestore-or-datastore for
|
|
48
|
+
// information about how to choose.
|
|
49
|
+
//
|
|
50
|
+
// Mode changes are only allowed if the database is empty.
|
|
51
|
+
enum DatabaseType {
|
|
52
|
+
// Not used.
|
|
53
|
+
DATABASE_TYPE_UNSPECIFIED = 0;
|
|
54
|
+
|
|
55
|
+
// Firestore Native Mode
|
|
56
|
+
FIRESTORE_NATIVE = 1;
|
|
57
|
+
|
|
58
|
+
// Firestore in Datastore Mode.
|
|
59
|
+
DATASTORE_MODE = 2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The type of concurrency control mode for transactions.
|
|
63
|
+
enum ConcurrencyMode {
|
|
64
|
+
// Not used.
|
|
65
|
+
CONCURRENCY_MODE_UNSPECIFIED = 0;
|
|
66
|
+
|
|
67
|
+
// Use optimistic concurrency control by default. This mode is available
|
|
68
|
+
// for Cloud Firestore databases.
|
|
69
|
+
//
|
|
70
|
+
// This is the default setting for Cloud Firestore Enterprise Edition
|
|
71
|
+
// databases.
|
|
72
|
+
OPTIMISTIC = 1;
|
|
73
|
+
|
|
74
|
+
// Use pessimistic concurrency control by default. This mode is available
|
|
75
|
+
// for Cloud Firestore databases.
|
|
76
|
+
//
|
|
77
|
+
// This is the default setting for Cloud Firestore Standard Edition
|
|
78
|
+
// databases.
|
|
79
|
+
PESSIMISTIC = 2;
|
|
80
|
+
|
|
81
|
+
// Use optimistic concurrency control with entity groups by default.
|
|
82
|
+
//
|
|
83
|
+
// This mode is enabled for some databases that were automatically upgraded
|
|
84
|
+
// from Cloud Datastore to Cloud Firestore with Datastore Mode.
|
|
85
|
+
//
|
|
86
|
+
// It is not recommended for any new databases, and not supported for
|
|
87
|
+
// Firestore Native databases.
|
|
88
|
+
OPTIMISTIC_WITH_ENTITY_GROUPS = 3;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// Point In Time Recovery feature enablement.
|
|
92
|
+
enum PointInTimeRecoveryEnablement {
|
|
93
|
+
// Not used.
|
|
94
|
+
POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0;
|
|
95
|
+
|
|
96
|
+
// Reads are supported on selected versions of the data from within the past
|
|
97
|
+
// 7 days:
|
|
98
|
+
//
|
|
99
|
+
// * Reads against any timestamp within the past hour
|
|
100
|
+
// * Reads against 1-minute snapshots beyond 1 hour and within 7 days
|
|
101
|
+
//
|
|
102
|
+
// `version_retention_period` and `earliest_version_time` can be
|
|
103
|
+
// used to determine the supported versions.
|
|
104
|
+
POINT_IN_TIME_RECOVERY_ENABLED = 1;
|
|
105
|
+
|
|
106
|
+
// Reads are supported on any version of the data from within the past 1
|
|
107
|
+
// hour.
|
|
108
|
+
POINT_IN_TIME_RECOVERY_DISABLED = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// The type of App Engine integration mode.
|
|
112
|
+
enum AppEngineIntegrationMode {
|
|
113
|
+
// Not used.
|
|
114
|
+
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0;
|
|
115
|
+
|
|
116
|
+
// If an App Engine application exists in the same region as this database,
|
|
117
|
+
// App Engine configuration will impact this database. This includes
|
|
118
|
+
// disabling of the application & database, as well as disabling writes to
|
|
119
|
+
// the database.
|
|
120
|
+
ENABLED = 1;
|
|
121
|
+
|
|
122
|
+
// App Engine has no effect on the ability of this database to serve
|
|
123
|
+
// requests.
|
|
124
|
+
//
|
|
125
|
+
// This is the default setting for databases created with the Firestore API.
|
|
126
|
+
DISABLED = 2;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The delete protection state of the database.
|
|
130
|
+
enum DeleteProtectionState {
|
|
131
|
+
// The default value. Delete protection type is not specified
|
|
132
|
+
DELETE_PROTECTION_STATE_UNSPECIFIED = 0;
|
|
133
|
+
|
|
134
|
+
// Delete protection is disabled
|
|
135
|
+
DELETE_PROTECTION_DISABLED = 1;
|
|
136
|
+
|
|
137
|
+
// Delete protection is enabled
|
|
138
|
+
DELETE_PROTECTION_ENABLED = 2;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// The CMEK (Customer Managed Encryption Key) configuration for a Firestore
|
|
142
|
+
// database. If not present, the database is secured by the default Google
|
|
143
|
+
// encryption key.
|
|
144
|
+
message CmekConfig {
|
|
145
|
+
// Required. Only keys in the same location as this database are allowed to
|
|
146
|
+
// be used for encryption.
|
|
147
|
+
//
|
|
148
|
+
// For Firestore's nam5 multi-region, this corresponds to Cloud KMS
|
|
149
|
+
// multi-region us. For Firestore's eur3 multi-region, this corresponds to
|
|
150
|
+
// Cloud KMS multi-region europe. See
|
|
151
|
+
// https://cloud.google.com/kms/docs/locations.
|
|
152
|
+
//
|
|
153
|
+
// The expected format is
|
|
154
|
+
// `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
|
155
|
+
string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
156
|
+
|
|
157
|
+
// Output only. Currently in-use [KMS key
|
|
158
|
+
// versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions).
|
|
159
|
+
// During [key rotation](https://cloud.google.com/kms/docs/key-rotation),
|
|
160
|
+
// there can be multiple in-use key versions.
|
|
161
|
+
//
|
|
162
|
+
// The expected format is
|
|
163
|
+
// `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
|
|
164
|
+
repeated string active_key_version = 2
|
|
165
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Information about the provenance of this database.
|
|
169
|
+
message SourceInfo {
|
|
170
|
+
// Information about a backup that was used to restore a database.
|
|
171
|
+
message BackupSource {
|
|
172
|
+
// The resource name of the backup that was used to restore this
|
|
173
|
+
// database. Format:
|
|
174
|
+
// `projects/{project}/locations/{location}/backups/{backup}`.
|
|
175
|
+
string backup = 1 [(google.api.resource_reference) = {
|
|
176
|
+
type: "firestore.googleapis.com/Backup"
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// The source from which this database is derived.
|
|
181
|
+
oneof source {
|
|
182
|
+
// If set, this database was restored from the specified backup (or a
|
|
183
|
+
// snapshot thereof).
|
|
184
|
+
BackupSource backup = 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// The associated long-running operation. This field may not be set after
|
|
188
|
+
// the operation has completed. Format:
|
|
189
|
+
// `projects/{project}/databases/{database}/operations/{operation}`.
|
|
190
|
+
string operation = 3 [(google.api.resource_reference) = {
|
|
191
|
+
type: "firestore.googleapis.com/Operation"
|
|
192
|
+
}];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Encryption configuration for a new database being created from another
|
|
196
|
+
// source.
|
|
197
|
+
//
|
|
198
|
+
// The source could be a [Backup][google.firestore.admin.v1.Backup] or a
|
|
199
|
+
// [PitrSnapshot][google.firestore.admin.v1.PitrSnapshot].
|
|
200
|
+
message EncryptionConfig {
|
|
201
|
+
// The configuration options for using Google default encryption.
|
|
202
|
+
message GoogleDefaultEncryptionOptions {}
|
|
203
|
+
|
|
204
|
+
// The configuration options for using the same encryption method as the
|
|
205
|
+
// source.
|
|
206
|
+
message SourceEncryptionOptions {}
|
|
207
|
+
|
|
208
|
+
// The configuration options for using CMEK (Customer Managed Encryption
|
|
209
|
+
// Key) encryption.
|
|
210
|
+
message CustomerManagedEncryptionOptions {
|
|
211
|
+
// Required. Only keys in the same location as the database are allowed to
|
|
212
|
+
// be used for encryption.
|
|
213
|
+
//
|
|
214
|
+
// For Firestore's nam5 multi-region, this corresponds to Cloud KMS
|
|
215
|
+
// multi-region us. For Firestore's eur3 multi-region, this corresponds to
|
|
216
|
+
// Cloud KMS multi-region europe. See
|
|
217
|
+
// https://cloud.google.com/kms/docs/locations.
|
|
218
|
+
//
|
|
219
|
+
// The expected format is
|
|
220
|
+
// `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
|
221
|
+
string kms_key_name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// The method for encrypting the database.
|
|
225
|
+
oneof encryption_type {
|
|
226
|
+
// Use Google default encryption.
|
|
227
|
+
GoogleDefaultEncryptionOptions google_default_encryption = 1;
|
|
228
|
+
|
|
229
|
+
// The database will use the same encryption configuration as the source.
|
|
230
|
+
SourceEncryptionOptions use_source_encryption = 2;
|
|
231
|
+
|
|
232
|
+
// Use Customer Managed Encryption Keys (CMEK) for encryption.
|
|
233
|
+
CustomerManagedEncryptionOptions customer_managed_encryption = 3;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// The edition of the database.
|
|
238
|
+
enum DatabaseEdition {
|
|
239
|
+
// Not used.
|
|
240
|
+
DATABASE_EDITION_UNSPECIFIED = 0;
|
|
241
|
+
|
|
242
|
+
// Standard edition.
|
|
243
|
+
//
|
|
244
|
+
// This is the default setting if not specified.
|
|
245
|
+
STANDARD = 1;
|
|
246
|
+
|
|
247
|
+
// Enterprise edition.
|
|
248
|
+
ENTERPRISE = 2;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// The data access mode.
|
|
252
|
+
enum DataAccessMode {
|
|
253
|
+
// Not Used.
|
|
254
|
+
DATA_ACCESS_MODE_UNSPECIFIED = 0;
|
|
255
|
+
|
|
256
|
+
// Accessing the database through the API is allowed.
|
|
257
|
+
DATA_ACCESS_MODE_ENABLED = 1;
|
|
258
|
+
|
|
259
|
+
// Accessing the database through the API is disallowed.
|
|
260
|
+
DATA_ACCESS_MODE_DISABLED = 2;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// The resource name of the Database.
|
|
264
|
+
// Format: `projects/{project}/databases/{database}`
|
|
265
|
+
string name = 1;
|
|
266
|
+
|
|
267
|
+
// Output only. The system-generated UUID4 for this Database.
|
|
268
|
+
string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
269
|
+
|
|
270
|
+
// Output only. The timestamp at which this database was created. Databases
|
|
271
|
+
// created before 2016 do not populate create_time.
|
|
272
|
+
google.protobuf.Timestamp create_time = 5
|
|
273
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
274
|
+
|
|
275
|
+
// Output only. The timestamp at which this database was most recently
|
|
276
|
+
// updated. Note this only includes updates to the database resource and not
|
|
277
|
+
// data contained by the database.
|
|
278
|
+
google.protobuf.Timestamp update_time = 6
|
|
279
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
280
|
+
|
|
281
|
+
// Output only. The timestamp at which this database was deleted. Only set if
|
|
282
|
+
// the database has been deleted.
|
|
283
|
+
google.protobuf.Timestamp delete_time = 7
|
|
284
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
285
|
+
|
|
286
|
+
// The location of the database. Available locations are listed at
|
|
287
|
+
// https://cloud.google.com/firestore/docs/locations.
|
|
288
|
+
string location_id = 9;
|
|
289
|
+
|
|
290
|
+
// The type of the database.
|
|
291
|
+
// See https://cloud.google.com/datastore/docs/firestore-or-datastore for
|
|
292
|
+
// information about how to choose.
|
|
293
|
+
DatabaseType type = 10;
|
|
294
|
+
|
|
295
|
+
// The concurrency control mode to use for this database.
|
|
296
|
+
//
|
|
297
|
+
// If unspecified in a CreateDatabase request, this will default based on the
|
|
298
|
+
// database edition: Optimistic for Enterprise and Pessimistic for all other
|
|
299
|
+
// databases.
|
|
300
|
+
ConcurrencyMode concurrency_mode = 15;
|
|
301
|
+
|
|
302
|
+
// Output only. The period during which past versions of data are retained in
|
|
303
|
+
// the database.
|
|
304
|
+
//
|
|
305
|
+
// Any [read][google.firestore.v1.GetDocumentRequest.read_time]
|
|
306
|
+
// or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
|
|
307
|
+
// a `read_time` within this window, and will read the state of the database
|
|
308
|
+
// at that time.
|
|
309
|
+
//
|
|
310
|
+
// If the PITR feature is enabled, the retention period is 7 days. Otherwise,
|
|
311
|
+
// the retention period is 1 hour.
|
|
312
|
+
google.protobuf.Duration version_retention_period = 17
|
|
313
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
314
|
+
|
|
315
|
+
// Output only. The earliest timestamp at which older versions of the data can
|
|
316
|
+
// be read from the database. See [version_retention_period] above; this field
|
|
317
|
+
// is populated with `now - version_retention_period`.
|
|
318
|
+
//
|
|
319
|
+
// This value is continuously updated, and becomes stale the moment it is
|
|
320
|
+
// queried. If you are using this value to recover data, make sure to account
|
|
321
|
+
// for the time from the moment when the value is queried to the moment when
|
|
322
|
+
// you initiate the recovery.
|
|
323
|
+
google.protobuf.Timestamp earliest_version_time = 18
|
|
324
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
325
|
+
|
|
326
|
+
// Whether to enable the PITR feature on this database.
|
|
327
|
+
PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21;
|
|
328
|
+
|
|
329
|
+
// The App Engine integration mode to use for this database.
|
|
330
|
+
AppEngineIntegrationMode app_engine_integration_mode = 19;
|
|
331
|
+
|
|
332
|
+
// Output only. The key_prefix for this database. This key_prefix is used, in
|
|
333
|
+
// combination with the project ID ("<key prefix>~<project id>") to construct
|
|
334
|
+
// the application ID that is returned from the Cloud Datastore APIs in Google
|
|
335
|
+
// App Engine first generation runtimes.
|
|
336
|
+
//
|
|
337
|
+
// This value may be empty in which case the appid to use for URL-encoded keys
|
|
338
|
+
// is the project_id (eg: foo instead of v~foo).
|
|
339
|
+
string key_prefix = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
340
|
+
|
|
341
|
+
// State of delete protection for the database.
|
|
342
|
+
DeleteProtectionState delete_protection_state = 22;
|
|
343
|
+
|
|
344
|
+
// Optional. Presence indicates CMEK is enabled for this database.
|
|
345
|
+
CmekConfig cmek_config = 23 [(google.api.field_behavior) = OPTIONAL];
|
|
346
|
+
|
|
347
|
+
// Output only. The database resource's prior database ID. This field is only
|
|
348
|
+
// populated for deleted databases.
|
|
349
|
+
string previous_id = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
350
|
+
|
|
351
|
+
// Output only. Information about the provenance of this database.
|
|
352
|
+
SourceInfo source_info = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
353
|
+
|
|
354
|
+
// Optional. Input only. Immutable. Tag keys/values directly bound to this
|
|
355
|
+
// resource. For example:
|
|
356
|
+
// "123/environment": "production",
|
|
357
|
+
// "123/costCenter": "marketing"
|
|
358
|
+
map<string, string> tags = 29 [
|
|
359
|
+
(google.api.field_behavior) = INPUT_ONLY,
|
|
360
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
361
|
+
(google.api.field_behavior) = OPTIONAL
|
|
362
|
+
];
|
|
363
|
+
|
|
364
|
+
// Output only. Background: Free tier is the ability of a Firestore database
|
|
365
|
+
// to use a small amount of resources every day without being charged. Once
|
|
366
|
+
// usage exceeds the free tier limit further usage is charged.
|
|
367
|
+
//
|
|
368
|
+
// Whether this database can make use of the free tier. Only one database
|
|
369
|
+
// per project can be eligible for the free tier.
|
|
370
|
+
//
|
|
371
|
+
// The first (or next) database that is created in a project without a free
|
|
372
|
+
// tier database will be marked as eligible for the free tier. Databases that
|
|
373
|
+
// are created while there is a free tier database will not be eligible for
|
|
374
|
+
// the free tier.
|
|
375
|
+
optional bool free_tier = 30 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
376
|
+
|
|
377
|
+
// This checksum is computed by the server based on the value of other
|
|
378
|
+
// fields, and may be sent on update and delete requests to ensure the
|
|
379
|
+
// client has an up-to-date value before proceeding.
|
|
380
|
+
string etag = 99;
|
|
381
|
+
|
|
382
|
+
// Immutable. The edition of the database.
|
|
383
|
+
DatabaseEdition database_edition = 28
|
|
384
|
+
[(google.api.field_behavior) = IMMUTABLE];
|
|
385
|
+
|
|
386
|
+
// Immutable. The default Realtime Updates mode to use for this database.
|
|
387
|
+
RealtimeUpdatesMode realtime_updates_mode = 31
|
|
388
|
+
[(google.api.field_behavior) = IMMUTABLE];
|
|
389
|
+
|
|
390
|
+
// Optional. The Firestore API data access mode to use for this database. If
|
|
391
|
+
// not set on write:
|
|
392
|
+
// - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition.
|
|
393
|
+
// - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.
|
|
394
|
+
DataAccessMode firestore_data_access_mode = 33
|
|
395
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
396
|
+
|
|
397
|
+
// Optional. The MongoDB compatible API data access mode to use for this
|
|
398
|
+
// database. If not set on write, the default value is
|
|
399
|
+
// DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always
|
|
400
|
+
// DATA_ACCESS_MODE_DISABLED for Standard Edition.
|
|
401
|
+
DataAccessMode mongodb_compatible_data_access_mode = 34
|
|
402
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
403
|
+
}
|