@google-cloud/datastore-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/datastore/admin/v1/datastore_admin.proto +506 -0
- package/build/protos/google/datastore/admin/v1/index.proto +122 -0
- package/build/protos/google/datastore/admin/v1/migration.proto +124 -0
- package/build/protos/google/datastore/v1/aggregation_result.proto +62 -0
- package/build/protos/google/datastore/v1/datastore.proto +851 -0
- package/build/protos/google/datastore/v1/entity.proto +217 -0
- package/build/protos/google/datastore/v1/query.proto +622 -0
- package/build/protos/google/datastore/v1/query_profile.proto +91 -0
- package/build/protos/protos.d.ts +18507 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +14 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/datastore_admin_client.d.ts +631 -0
- package/build/src/v1/datastore_admin_client.js +954 -0
- package/build/src/v1/datastore_admin_client.js.map +1 -0
- package/build/src/v1/datastore_admin_client_config.json +56 -0
- package/build/src/v1/datastore_admin_proto_list.json +5 -0
- package/build/src/v1/datastore_client.d.ts +451 -0
- package/build/src/v1/datastore_client.js +806 -0
- package/build/src/v1/datastore_client.js.map +1 -0
- package/build/src/v1/datastore_client_config.json +66 -0
- package/build/src/v1/datastore_proto_list.json +7 -0
- package/build/src/v1/gapic_metadata.json +87 -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/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 Datastore API: Nodejs Client][homepage]
|
|
6
|
+
|
|
7
|
+
> [!IMPORTANT]
|
|
8
|
+
> **Internal API Client**: This library (`@google-cloud/datastore-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/datastore](https://www.npmjs.com/package/@google-cloud/datastore)** instead.
|
|
9
|
+
|
|
10
|
+
[//]: # "releaseLevel"
|
|
11
|
+
|
|
12
|
+
[](https://www.npmjs.org/package/@google-cloud/datastore-api)
|
|
13
|
+
|
|
14
|
+
Cloud Datastore 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 Datastore API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/datastore/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 Datastore 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/datastore-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/datastore-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=datastore.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-datastore-api/samples
|
|
110
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastore-api/CHANGELOG.md
|
|
111
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-datastore-api
|
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
// Copyright 2025 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.datastore.admin.v1;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/datastore/admin/v1/index.proto";
|
|
23
|
+
import "google/datastore/admin/v1/migration.proto";
|
|
24
|
+
import "google/longrunning/operations.proto";
|
|
25
|
+
import "google/protobuf/timestamp.proto";
|
|
26
|
+
|
|
27
|
+
option csharp_namespace = "Google.Cloud.Datastore.Admin.V1";
|
|
28
|
+
option go_package = "cloud.google.com/go/datastore/admin/apiv1/adminpb;adminpb";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "DatastoreAdminProto";
|
|
31
|
+
option java_package = "com.google.datastore.admin.v1";
|
|
32
|
+
option php_namespace = "Google\\Cloud\\Datastore\\Admin\\V1";
|
|
33
|
+
option ruby_package = "Google::Cloud::Datastore::Admin::V1";
|
|
34
|
+
|
|
35
|
+
// Google Cloud Datastore Admin API
|
|
36
|
+
//
|
|
37
|
+
// The Datastore Admin API provides several admin services for Cloud Datastore.
|
|
38
|
+
//
|
|
39
|
+
// Concepts: Project, namespace, kind, and entity as defined in the Google Cloud
|
|
40
|
+
// Datastore API.
|
|
41
|
+
//
|
|
42
|
+
// Operation: An Operation represents work being performed in the background.
|
|
43
|
+
//
|
|
44
|
+
// EntityFilter: Allows specifying a subset of entities in a project. This is
|
|
45
|
+
// specified as a combination of kinds and namespaces (either or both of which
|
|
46
|
+
// may be all).
|
|
47
|
+
//
|
|
48
|
+
// Export/Import Service:
|
|
49
|
+
//
|
|
50
|
+
// - The Export/Import service provides the ability to copy all or a subset of
|
|
51
|
+
// entities to/from Google Cloud Storage.
|
|
52
|
+
// - Exported data may be imported into Cloud Datastore for any Google Cloud
|
|
53
|
+
// Platform project. It is not restricted to the export source project. It is
|
|
54
|
+
// possible to export from one project and then import into another.
|
|
55
|
+
// - Exported data can also be loaded into Google BigQuery for analysis.
|
|
56
|
+
// - Exports and imports are performed asynchronously. An Operation resource is
|
|
57
|
+
// created for each export/import. The state (including any errors encountered)
|
|
58
|
+
// of the export/import may be queried via the Operation resource.
|
|
59
|
+
//
|
|
60
|
+
// Index Service:
|
|
61
|
+
//
|
|
62
|
+
// - The index service manages Cloud Datastore composite indexes.
|
|
63
|
+
// - Index creation and deletion are performed asynchronously.
|
|
64
|
+
// An Operation resource is created for each such asynchronous operation.
|
|
65
|
+
// The state of the operation (including any errors encountered)
|
|
66
|
+
// may be queried via the Operation resource.
|
|
67
|
+
//
|
|
68
|
+
// Operation Service:
|
|
69
|
+
//
|
|
70
|
+
// - The Operations collection provides a record of actions performed for the
|
|
71
|
+
// specified project (including any operations in progress). Operations are not
|
|
72
|
+
// created directly but through calls on other collections or resources.
|
|
73
|
+
// - An operation that is not yet done may be cancelled. The request to cancel
|
|
74
|
+
// is asynchronous and the operation may continue to run for some time after the
|
|
75
|
+
// request to cancel is made.
|
|
76
|
+
// - An operation that is done may be deleted so that it is no longer listed as
|
|
77
|
+
// part of the Operation collection.
|
|
78
|
+
// - ListOperations returns all pending operations, but not completed
|
|
79
|
+
// operations.
|
|
80
|
+
// - Operations are created by service DatastoreAdmin, but are accessed via
|
|
81
|
+
// service google.longrunning.Operations.
|
|
82
|
+
service DatastoreAdmin {
|
|
83
|
+
option (google.api.default_host) = "datastore.googleapis.com";
|
|
84
|
+
option (google.api.oauth_scopes) =
|
|
85
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
86
|
+
"https://www.googleapis.com/auth/datastore";
|
|
87
|
+
|
|
88
|
+
// Exports a copy of all or a subset of entities from Google Cloud Datastore
|
|
89
|
+
// to another storage system, such as Google Cloud Storage. Recent updates to
|
|
90
|
+
// entities may not be reflected in the export. The export occurs in the
|
|
91
|
+
// background and its progress can be monitored and managed via the
|
|
92
|
+
// Operation resource that is created. The output of an export may only be
|
|
93
|
+
// used once the associated operation is done. If an export operation is
|
|
94
|
+
// cancelled before completion it may leave partial data behind in Google
|
|
95
|
+
// Cloud Storage.
|
|
96
|
+
rpc ExportEntities(ExportEntitiesRequest)
|
|
97
|
+
returns (google.longrunning.Operation) {
|
|
98
|
+
option (google.api.http) = {
|
|
99
|
+
post: "/v1/projects/{project_id}:export"
|
|
100
|
+
body: "*"
|
|
101
|
+
};
|
|
102
|
+
option (google.api.method_signature) =
|
|
103
|
+
"project_id,labels,entity_filter,output_url_prefix";
|
|
104
|
+
option (google.longrunning.operation_info) = {
|
|
105
|
+
response_type: "ExportEntitiesResponse"
|
|
106
|
+
metadata_type: "ExportEntitiesMetadata"
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Imports entities into Google Cloud Datastore. Existing entities with the
|
|
111
|
+
// same key are overwritten. The import occurs in the background and its
|
|
112
|
+
// progress can be monitored and managed via the Operation resource that is
|
|
113
|
+
// created. If an ImportEntities operation is cancelled, it is possible
|
|
114
|
+
// that a subset of the data has already been imported to Cloud Datastore.
|
|
115
|
+
rpc ImportEntities(ImportEntitiesRequest)
|
|
116
|
+
returns (google.longrunning.Operation) {
|
|
117
|
+
option (google.api.http) = {
|
|
118
|
+
post: "/v1/projects/{project_id}:import"
|
|
119
|
+
body: "*"
|
|
120
|
+
};
|
|
121
|
+
option (google.api.method_signature) =
|
|
122
|
+
"project_id,labels,input_url,entity_filter";
|
|
123
|
+
option (google.longrunning.operation_info) = {
|
|
124
|
+
response_type: "google.protobuf.Empty"
|
|
125
|
+
metadata_type: "ImportEntitiesMetadata"
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Creates the specified index.
|
|
130
|
+
// A newly created index's initial state is `CREATING`. On completion of the
|
|
131
|
+
// returned [google.longrunning.Operation][google.longrunning.Operation], the
|
|
132
|
+
// state will be `READY`. If the index already exists, the call will return an
|
|
133
|
+
// `ALREADY_EXISTS` status.
|
|
134
|
+
//
|
|
135
|
+
// During index creation, the process could result in an error, in which
|
|
136
|
+
// case the index will move to the `ERROR` state. The process can be recovered
|
|
137
|
+
// by fixing the data that caused the error, removing the index with
|
|
138
|
+
// [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then
|
|
139
|
+
// re-creating the index with [create]
|
|
140
|
+
// [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
|
|
141
|
+
//
|
|
142
|
+
// Indexes with a single property cannot be created.
|
|
143
|
+
rpc CreateIndex(CreateIndexRequest) returns (google.longrunning.Operation) {
|
|
144
|
+
option (google.api.http) = {
|
|
145
|
+
post: "/v1/projects/{project_id}/indexes"
|
|
146
|
+
body: "index"
|
|
147
|
+
};
|
|
148
|
+
option (google.longrunning.operation_info) = {
|
|
149
|
+
response_type: "Index"
|
|
150
|
+
metadata_type: "IndexOperationMetadata"
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Deletes an existing index.
|
|
155
|
+
// An index can only be deleted if it is in a `READY` or `ERROR` state. On
|
|
156
|
+
// successful execution of the request, the index will be in a `DELETING`
|
|
157
|
+
// [state][google.datastore.admin.v1.Index.State]. And on completion of the
|
|
158
|
+
// returned [google.longrunning.Operation][google.longrunning.Operation], the
|
|
159
|
+
// index will be removed.
|
|
160
|
+
//
|
|
161
|
+
// During index deletion, the process could result in an error, in which
|
|
162
|
+
// case the index will move to the `ERROR` state. The process can be recovered
|
|
163
|
+
// by fixing the data that caused the error, followed by calling
|
|
164
|
+
// [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.
|
|
165
|
+
rpc DeleteIndex(DeleteIndexRequest) returns (google.longrunning.Operation) {
|
|
166
|
+
option (google.api.http) = {
|
|
167
|
+
delete: "/v1/projects/{project_id}/indexes/{index_id}"
|
|
168
|
+
};
|
|
169
|
+
option (google.longrunning.operation_info) = {
|
|
170
|
+
response_type: "Index"
|
|
171
|
+
metadata_type: "IndexOperationMetadata"
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Gets an index.
|
|
176
|
+
rpc GetIndex(GetIndexRequest) returns (Index) {
|
|
177
|
+
option (google.api.http) = {
|
|
178
|
+
get: "/v1/projects/{project_id}/indexes/{index_id}"
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// Lists the indexes that match the specified filters. Datastore uses an
|
|
183
|
+
// eventually consistent query to fetch the list of indexes and may
|
|
184
|
+
// occasionally return stale results.
|
|
185
|
+
rpc ListIndexes(ListIndexesRequest) returns (ListIndexesResponse) {
|
|
186
|
+
option (google.api.http) = {
|
|
187
|
+
get: "/v1/projects/{project_id}/indexes"
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Metadata common to all Datastore Admin operations.
|
|
193
|
+
message CommonMetadata {
|
|
194
|
+
// The various possible states for an ongoing Operation.
|
|
195
|
+
enum State {
|
|
196
|
+
// Unspecified.
|
|
197
|
+
STATE_UNSPECIFIED = 0;
|
|
198
|
+
|
|
199
|
+
// Request is being prepared for processing.
|
|
200
|
+
INITIALIZING = 1;
|
|
201
|
+
|
|
202
|
+
// Request is actively being processed.
|
|
203
|
+
PROCESSING = 2;
|
|
204
|
+
|
|
205
|
+
// Request is in the process of being cancelled after user called
|
|
206
|
+
// google.longrunning.Operations.CancelOperation on the operation.
|
|
207
|
+
CANCELLING = 3;
|
|
208
|
+
|
|
209
|
+
// Request has been processed and is in its finalization stage.
|
|
210
|
+
FINALIZING = 4;
|
|
211
|
+
|
|
212
|
+
// Request has completed successfully.
|
|
213
|
+
SUCCESSFUL = 5;
|
|
214
|
+
|
|
215
|
+
// Request has finished being processed, but encountered an error.
|
|
216
|
+
FAILED = 6;
|
|
217
|
+
|
|
218
|
+
// Request has finished being cancelled after user called
|
|
219
|
+
// google.longrunning.Operations.CancelOperation.
|
|
220
|
+
CANCELLED = 7;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// The time that work began on the operation.
|
|
224
|
+
google.protobuf.Timestamp start_time = 1;
|
|
225
|
+
|
|
226
|
+
// The time the operation ended, either successfully or otherwise.
|
|
227
|
+
google.protobuf.Timestamp end_time = 2;
|
|
228
|
+
|
|
229
|
+
// The type of the operation. Can be used as a filter in
|
|
230
|
+
// ListOperationsRequest.
|
|
231
|
+
OperationType operation_type = 3;
|
|
232
|
+
|
|
233
|
+
// The client-assigned labels which were provided when the operation was
|
|
234
|
+
// created. May also include additional labels.
|
|
235
|
+
map<string, string> labels = 4;
|
|
236
|
+
|
|
237
|
+
// The current state of the Operation.
|
|
238
|
+
State state = 5;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Measures the progress of a particular metric.
|
|
242
|
+
message Progress {
|
|
243
|
+
// The amount of work that has been completed. Note that this may be greater
|
|
244
|
+
// than work_estimated.
|
|
245
|
+
int64 work_completed = 1;
|
|
246
|
+
|
|
247
|
+
// An estimate of how much work needs to be performed. May be zero if the
|
|
248
|
+
// work estimate is unavailable.
|
|
249
|
+
int64 work_estimated = 2;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// The request for
|
|
253
|
+
// [google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities].
|
|
254
|
+
message ExportEntitiesRequest {
|
|
255
|
+
// Required. Project ID against which to make the request.
|
|
256
|
+
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
|
|
257
|
+
|
|
258
|
+
// Client-assigned labels.
|
|
259
|
+
map<string, string> labels = 2;
|
|
260
|
+
|
|
261
|
+
// Description of what data from the project is included in the export.
|
|
262
|
+
EntityFilter entity_filter = 3;
|
|
263
|
+
|
|
264
|
+
// Required. Location for the export metadata and data files.
|
|
265
|
+
//
|
|
266
|
+
// The full resource URL of the external storage location. Currently, only
|
|
267
|
+
// Google Cloud Storage is supported. So output_url_prefix should be of the
|
|
268
|
+
// form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the
|
|
269
|
+
// name of the Cloud Storage bucket and `NAMESPACE_PATH` is an optional Cloud
|
|
270
|
+
// Storage namespace path (this is not a Cloud Datastore namespace). For more
|
|
271
|
+
// information about Cloud Storage namespace paths, see
|
|
272
|
+
// [Object name
|
|
273
|
+
// considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
|
|
274
|
+
//
|
|
275
|
+
// The resulting files will be nested deeper than the specified URL prefix.
|
|
276
|
+
// The final output URL will be provided in the
|
|
277
|
+
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
|
|
278
|
+
// field. That value should be used for subsequent ImportEntities operations.
|
|
279
|
+
//
|
|
280
|
+
// By nesting the data files deeper, the same Cloud Storage bucket can be used
|
|
281
|
+
// in multiple ExportEntities operations without conflict.
|
|
282
|
+
string output_url_prefix = 4 [(google.api.field_behavior) = REQUIRED];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// The request for
|
|
286
|
+
// [google.datastore.admin.v1.DatastoreAdmin.ImportEntities][google.datastore.admin.v1.DatastoreAdmin.ImportEntities].
|
|
287
|
+
message ImportEntitiesRequest {
|
|
288
|
+
// Required. Project ID against which to make the request.
|
|
289
|
+
string project_id = 1 [(google.api.field_behavior) = REQUIRED];
|
|
290
|
+
|
|
291
|
+
// Client-assigned labels.
|
|
292
|
+
map<string, string> labels = 2;
|
|
293
|
+
|
|
294
|
+
// Required. The full resource URL of the external storage location.
|
|
295
|
+
// Currently, only Google Cloud Storage is supported. So input_url should be
|
|
296
|
+
// of the form:
|
|
297
|
+
// `gs://BUCKET_NAME[/NAMESPACE_PATH]/OVERALL_EXPORT_METADATA_FILE`, where
|
|
298
|
+
// `BUCKET_NAME` is the name of the Cloud Storage bucket, `NAMESPACE_PATH` is
|
|
299
|
+
// an optional Cloud Storage namespace path (this is not a Cloud Datastore
|
|
300
|
+
// namespace), and `OVERALL_EXPORT_METADATA_FILE` is the metadata file written
|
|
301
|
+
// by the ExportEntities operation. For more information about Cloud Storage
|
|
302
|
+
// namespace paths, see
|
|
303
|
+
// [Object name
|
|
304
|
+
// considerations](https://cloud.google.com/storage/docs/naming#object-considerations).
|
|
305
|
+
//
|
|
306
|
+
// For more information, see
|
|
307
|
+
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url].
|
|
308
|
+
string input_url = 3 [(google.api.field_behavior) = REQUIRED];
|
|
309
|
+
|
|
310
|
+
// Optionally specify which kinds/namespaces are to be imported. If provided,
|
|
311
|
+
// the list must be a subset of the EntityFilter used in creating the export,
|
|
312
|
+
// otherwise a FAILED_PRECONDITION error will be returned. If no filter is
|
|
313
|
+
// specified then all entities from the export are imported.
|
|
314
|
+
EntityFilter entity_filter = 4;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
// The response for
|
|
318
|
+
// [google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities].
|
|
319
|
+
message ExportEntitiesResponse {
|
|
320
|
+
// Location of the output metadata file. This can be used to begin an import
|
|
321
|
+
// into Cloud Datastore (this project or another project). See
|
|
322
|
+
// [google.datastore.admin.v1.ImportEntitiesRequest.input_url][google.datastore.admin.v1.ImportEntitiesRequest.input_url].
|
|
323
|
+
// Only present if the operation completed successfully.
|
|
324
|
+
string output_url = 1;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
// Metadata for ExportEntities operations.
|
|
328
|
+
message ExportEntitiesMetadata {
|
|
329
|
+
// Metadata common to all Datastore Admin operations.
|
|
330
|
+
CommonMetadata common = 1;
|
|
331
|
+
|
|
332
|
+
// An estimate of the number of entities processed.
|
|
333
|
+
Progress progress_entities = 2;
|
|
334
|
+
|
|
335
|
+
// An estimate of the number of bytes processed.
|
|
336
|
+
Progress progress_bytes = 3;
|
|
337
|
+
|
|
338
|
+
// Description of which entities are being exported.
|
|
339
|
+
EntityFilter entity_filter = 4;
|
|
340
|
+
|
|
341
|
+
// Location for the export metadata and data files. This will be the same
|
|
342
|
+
// value as the
|
|
343
|
+
// [google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix][google.datastore.admin.v1.ExportEntitiesRequest.output_url_prefix]
|
|
344
|
+
// field. The final output location is provided in
|
|
345
|
+
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url].
|
|
346
|
+
string output_url_prefix = 5;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// Metadata for ImportEntities operations.
|
|
350
|
+
message ImportEntitiesMetadata {
|
|
351
|
+
// Metadata common to all Datastore Admin operations.
|
|
352
|
+
CommonMetadata common = 1;
|
|
353
|
+
|
|
354
|
+
// An estimate of the number of entities processed.
|
|
355
|
+
Progress progress_entities = 2;
|
|
356
|
+
|
|
357
|
+
// An estimate of the number of bytes processed.
|
|
358
|
+
Progress progress_bytes = 3;
|
|
359
|
+
|
|
360
|
+
// Description of which entities are being imported.
|
|
361
|
+
EntityFilter entity_filter = 4;
|
|
362
|
+
|
|
363
|
+
// The location of the import metadata file. This will be the same value as
|
|
364
|
+
// the
|
|
365
|
+
// [google.datastore.admin.v1.ExportEntitiesResponse.output_url][google.datastore.admin.v1.ExportEntitiesResponse.output_url]
|
|
366
|
+
// field.
|
|
367
|
+
string input_url = 5;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Identifies a subset of entities in a project. This is specified as
|
|
371
|
+
// combinations of kinds and namespaces (either or both of which may be all, as
|
|
372
|
+
// described in the following examples).
|
|
373
|
+
// Example usage:
|
|
374
|
+
//
|
|
375
|
+
// Entire project:
|
|
376
|
+
// kinds=[], namespace_ids=[]
|
|
377
|
+
//
|
|
378
|
+
// Kinds Foo and Bar in all namespaces:
|
|
379
|
+
// kinds=['Foo', 'Bar'], namespace_ids=[]
|
|
380
|
+
//
|
|
381
|
+
// Kinds Foo and Bar only in the default namespace:
|
|
382
|
+
// kinds=['Foo', 'Bar'], namespace_ids=['']
|
|
383
|
+
//
|
|
384
|
+
// Kinds Foo and Bar in both the default and Baz namespaces:
|
|
385
|
+
// kinds=['Foo', 'Bar'], namespace_ids=['', 'Baz']
|
|
386
|
+
//
|
|
387
|
+
// The entire Baz namespace:
|
|
388
|
+
// kinds=[], namespace_ids=['Baz']
|
|
389
|
+
message EntityFilter {
|
|
390
|
+
// If empty, then this represents all kinds.
|
|
391
|
+
repeated string kinds = 1;
|
|
392
|
+
|
|
393
|
+
// An empty list represents all namespaces. This is the preferred
|
|
394
|
+
// usage for projects that don't use namespaces.
|
|
395
|
+
//
|
|
396
|
+
// An empty string element represents the default namespace. This should be
|
|
397
|
+
// used if the project has data in non-default namespaces, but doesn't want to
|
|
398
|
+
// include them.
|
|
399
|
+
// Each namespace in this list must be unique.
|
|
400
|
+
repeated string namespace_ids = 2;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// The request for
|
|
404
|
+
// [google.datastore.admin.v1.DatastoreAdmin.CreateIndex][google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
|
|
405
|
+
message CreateIndexRequest {
|
|
406
|
+
// Project ID against which to make the request.
|
|
407
|
+
string project_id = 1;
|
|
408
|
+
|
|
409
|
+
// The index to create. The name and state fields are output only and will be
|
|
410
|
+
// ignored. Single property indexes cannot be created or deleted.
|
|
411
|
+
Index index = 3;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// The request for
|
|
415
|
+
// [google.datastore.admin.v1.DatastoreAdmin.DeleteIndex][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex].
|
|
416
|
+
message DeleteIndexRequest {
|
|
417
|
+
// Project ID against which to make the request.
|
|
418
|
+
string project_id = 1;
|
|
419
|
+
|
|
420
|
+
// The resource ID of the index to delete.
|
|
421
|
+
string index_id = 3;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
// The request for
|
|
425
|
+
// [google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex].
|
|
426
|
+
message GetIndexRequest {
|
|
427
|
+
// Project ID against which to make the request.
|
|
428
|
+
string project_id = 1;
|
|
429
|
+
|
|
430
|
+
// The resource ID of the index to get.
|
|
431
|
+
string index_id = 3;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// The request for
|
|
435
|
+
// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes].
|
|
436
|
+
message ListIndexesRequest {
|
|
437
|
+
// Project ID against which to make the request.
|
|
438
|
+
string project_id = 1;
|
|
439
|
+
|
|
440
|
+
string filter = 3;
|
|
441
|
+
|
|
442
|
+
// The maximum number of items to return. If zero, then all results will be
|
|
443
|
+
// returned.
|
|
444
|
+
int32 page_size = 4;
|
|
445
|
+
|
|
446
|
+
// The next_page_token value returned from a previous List request, if any.
|
|
447
|
+
string page_token = 5;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
// The response for
|
|
451
|
+
// [google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes].
|
|
452
|
+
message ListIndexesResponse {
|
|
453
|
+
// The indexes.
|
|
454
|
+
repeated Index indexes = 1;
|
|
455
|
+
|
|
456
|
+
// The standard List next-page token.
|
|
457
|
+
string next_page_token = 2;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
// Metadata for Index operations.
|
|
461
|
+
message IndexOperationMetadata {
|
|
462
|
+
// Metadata common to all Datastore Admin operations.
|
|
463
|
+
CommonMetadata common = 1;
|
|
464
|
+
|
|
465
|
+
// An estimate of the number of entities processed.
|
|
466
|
+
Progress progress_entities = 2;
|
|
467
|
+
|
|
468
|
+
// The index resource ID that this operation is acting on.
|
|
469
|
+
string index_id = 3;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Metadata for Datastore to Firestore migration operations.
|
|
473
|
+
//
|
|
474
|
+
// The DatastoreFirestoreMigration operation is not started by the end-user via
|
|
475
|
+
// an explicit "creation" method. This is an intentional deviation from the LRO
|
|
476
|
+
// design pattern.
|
|
477
|
+
//
|
|
478
|
+
// This singleton resource can be accessed at:
|
|
479
|
+
// "projects/{project_id}/operations/datastore-firestore-migration"
|
|
480
|
+
message DatastoreFirestoreMigrationMetadata {
|
|
481
|
+
// The current state of migration from Cloud Datastore to Cloud Firestore in
|
|
482
|
+
// Datastore mode.
|
|
483
|
+
MigrationState migration_state = 1;
|
|
484
|
+
|
|
485
|
+
// The current step of migration from Cloud Datastore to Cloud Firestore in
|
|
486
|
+
// Datastore mode.
|
|
487
|
+
MigrationStep migration_step = 2;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// Operation types.
|
|
491
|
+
enum OperationType {
|
|
492
|
+
// Unspecified.
|
|
493
|
+
OPERATION_TYPE_UNSPECIFIED = 0;
|
|
494
|
+
|
|
495
|
+
// ExportEntities.
|
|
496
|
+
EXPORT_ENTITIES = 1;
|
|
497
|
+
|
|
498
|
+
// ImportEntities.
|
|
499
|
+
IMPORT_ENTITIES = 2;
|
|
500
|
+
|
|
501
|
+
// CreateIndex.
|
|
502
|
+
CREATE_INDEX = 3;
|
|
503
|
+
|
|
504
|
+
// DeleteIndex.
|
|
505
|
+
DELETE_INDEX = 4;
|
|
506
|
+
}
|