Skip to content

Commit 6f22f0f

Browse files
chore: update v2.14.2 gapic-generator-typescript (#925)
- [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: googleapis/googleapis@bc2432d Source-Link: googleapis/googleapis-gen@930b673 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 feat: add IN/NOT_IN/NOT_EQUALS support to cloud datastore proto PiperOrigin-RevId: 434824722 Source-Link: googleapis/googleapis@4bfdcd3 Source-Link: googleapis/googleapis-gen@5982b9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTk4MmI5YjA4NTM4OGQ2YzlhOTBhNTU3OGViZTQ3NTE4ZmUwOTMyZSJ9
1 parent 5e77010 commit 6f22f0f

File tree

8 files changed

+99
-31
lines changed

8 files changed

+99
-31
lines changed

protos/google/datastore/v1/datastore.proto

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -328,8 +328,9 @@ message Mutation {
328328
// with the current version of the entity on the server. Conflicting mutations
329329
// are not applied, and are marked as such in MutationResult.
330330
oneof conflict_detection_strategy {
331-
// The version of the entity that this mutation is being applied to. If this
332-
// does not match the current version on the server, the mutation conflicts.
331+
// The version of the entity that this mutation is being applied
332+
// to. If this does not match the current version on the server, the
333+
// mutation conflicts.
333334
int64 base_version = 8;
334335
}
335336
}
@@ -366,9 +367,16 @@ message ReadOptions {
366367
EVENTUAL = 2;
367368
}
368369

369-
// If not specified, lookups and ancestor queries default to
370-
// `read_consistency`=`STRONG`, global queries default to
371-
// `read_consistency`=`EVENTUAL`.
370+
// For Cloud Datastore, if read_consistency is not specified, then lookups and
371+
// ancestor queries default to `read_consistency`=`STRONG`, global queries
372+
// default to `read_consistency`=`EVENTUAL`.
373+
//
374+
// For Cloud Firestore in Datastore mode, if read_consistency is not specified
375+
// then lookups and all queries default to `read_consistency`=`STRONG`.
376+
//
377+
// Explicitly setting `read_consistency`=`EVENTUAL` will result in eventually
378+
// consistent lookups & queries in both Cloud Datastore & Cloud Firestore in
379+
// Datastore mode.
372380
oneof consistency_type {
373381
// The non-transactional read consistency to use.
374382
// Cannot be set to `STRONG` for global queries.

protos/google/datastore/v1/entity.proto

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@ syntax = "proto3";
1616

1717
package google.datastore.v1;
1818

19-
import "google/api/annotations.proto";
2019
import "google/protobuf/struct.proto";
2120
import "google/protobuf/timestamp.proto";
2221
import "google/type/latlng.proto";
@@ -47,8 +46,7 @@ option ruby_package = "Google::Cloud::Datastore::V1";
4746
//
4847
// Foreign partition IDs (in which the project ID does
4948
// not match the context project ID ) are discouraged.
50-
// Reads and writes of foreign partition IDs may fail if the project is not in
51-
// an active state.
49+
// Reads and writes of foreign partition IDs may fail if the project is not in an active state.
5250
message PartitionId {
5351
// The ID of the project to which the entities belong.
5452
string project_id = 2;
@@ -146,8 +144,8 @@ message Value {
146144
Key key_value = 5;
147145

148146
// A UTF-8 encoded string value.
149-
// When `exclude_from_indexes` is false (it is indexed), may have at most
150-
// 1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.
147+
// When `exclude_from_indexes` is false (it is indexed) , may have at most 1500 bytes.
148+
// Otherwise, may be set to at most 1,000,000 bytes.
151149
string string_value = 17;
152150

153151
// A blob value.

protos/google/datastore/v1/query.proto

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2019 Google LLC.
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,10 +16,8 @@ syntax = "proto3";
1616

1717
package google.datastore.v1;
1818

19-
import "google/api/annotations.proto";
2019
import "google/datastore/v1/entity.proto";
2120
import "google/protobuf/wrappers.proto";
22-
import "google/type/latlng.proto";
2321

2422
option csharp_namespace = "Google.Cloud.Datastore.V1";
2523
option go_package = "google.golang.org/genproto/googleapis/datastore/v1;datastore";
@@ -190,23 +188,68 @@ message PropertyFilter {
190188
// Unspecified. This value must not be used.
191189
OPERATOR_UNSPECIFIED = 0;
192190

193-
// Less than.
191+
// The given `property` is less than the given `value`.
192+
//
193+
// Requires:
194+
//
195+
// * That `property` comes first in `order_by`.
194196
LESS_THAN = 1;
195197

196-
// Less than or equal.
198+
// The given `property` is less than or equal to the given `value`.
199+
//
200+
// Requires:
201+
//
202+
// * That `property` comes first in `order_by`.
197203
LESS_THAN_OR_EQUAL = 2;
198204

199-
// Greater than.
205+
// The given `property` is greater than the given `value`.
206+
//
207+
// Requires:
208+
//
209+
// * That `property` comes first in `order_by`.
200210
GREATER_THAN = 3;
201211

202-
// Greater than or equal.
212+
// The given `property` is greater than or equal to the given `value`.
213+
//
214+
// Requires:
215+
//
216+
// * That `property` comes first in `order_by`.
203217
GREATER_THAN_OR_EQUAL = 4;
204218

205-
// Equal.
219+
// The given `property` is equal to the given `value`.
206220
EQUAL = 5;
207221

208-
// Has ancestor.
222+
// The given `property` is equal to at least one value in the given array.
223+
//
224+
// Requires:
225+
//
226+
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
227+
// * No other `IN` or `NOT_IN` is in the same query.
228+
IN = 6;
229+
230+
// The given `property` is not equal to the given `value`.
231+
//
232+
// Requires:
233+
//
234+
// * No other `NOT_EQUAL` or `NOT_IN` is in the same query.
235+
// * That `property` comes first in the `order_by`.
236+
NOT_EQUAL = 9;
237+
238+
// Limit the result set to the given entity and its descendants.
239+
//
240+
// Requires:
241+
//
242+
// * That `value` is an entity key.
209243
HAS_ANCESTOR = 11;
244+
245+
// The value of the `property` is not in the given array.
246+
//
247+
// Requires:
248+
//
249+
// * That `value` is a non-empty `ArrayValue` with at most 10 values.
250+
// * No other `IN`, `NOT_IN`, `NOT_EQUAL` is in the same query.
251+
// * That `field` comes first in the `order_by`.
252+
NOT_IN = 13;
210253
}
211254

212255
// The property to filter by.

protos/protos.d.ts

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/gapic_datastore_admin_v1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ describe('v1.DatastoreAdminClient', () => {
359359
new protos.google.datastore.admin.v1.GetIndexRequest()
360360
);
361361
request.projectId = '';
362-
const expectedHeaderRequestParams = 'project_id=';
363362
const expectedError = new Error('The client has already been closed.');
364363
client.close();
365364
await assert.rejects(client.getIndex(request), expectedError);

test/gapic_datastore_v1.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ describe('v1.DatastoreClient', () => {
262262
new protos.google.datastore.v1.LookupRequest()
263263
);
264264
request.projectId = '';
265-
const expectedHeaderRequestParams = 'project_id=';
266265
const expectedError = new Error('The client has already been closed.');
267266
client.close();
268267
await assert.rejects(client.lookup(request), expectedError);
@@ -386,7 +385,6 @@ describe('v1.DatastoreClient', () => {
386385
new protos.google.datastore.v1.RunQueryRequest()
387386
);
388387
request.projectId = '';
389-
const expectedHeaderRequestParams = 'project_id=';
390388
const expectedError = new Error('The client has already been closed.');
391389
client.close();
392390
await assert.rejects(client.runQuery(request), expectedError);
@@ -513,7 +511,6 @@ describe('v1.DatastoreClient', () => {
513511
new protos.google.datastore.v1.BeginTransactionRequest()
514512
);
515513
request.projectId = '';
516-
const expectedHeaderRequestParams = 'project_id=';
517514
const expectedError = new Error('The client has already been closed.');
518515
client.close();
519516
await assert.rejects(client.beginTransaction(request), expectedError);
@@ -637,7 +634,6 @@ describe('v1.DatastoreClient', () => {
637634
new protos.google.datastore.v1.CommitRequest()
638635
);
639636
request.projectId = '';
640-
const expectedHeaderRequestParams = 'project_id=';
641637
const expectedError = new Error('The client has already been closed.');
642638
client.close();
643639
await assert.rejects(client.commit(request), expectedError);
@@ -761,7 +757,6 @@ describe('v1.DatastoreClient', () => {
761757
new protos.google.datastore.v1.RollbackRequest()
762758
);
763759
request.projectId = '';
764-
const expectedHeaderRequestParams = 'project_id=';
765760
const expectedError = new Error('The client has already been closed.');
766761
client.close();
767762
await assert.rejects(client.rollback(request), expectedError);
@@ -888,7 +883,6 @@ describe('v1.DatastoreClient', () => {
888883
new protos.google.datastore.v1.AllocateIdsRequest()
889884
);
890885
request.projectId = '';
891-
const expectedHeaderRequestParams = 'project_id=';
892886
const expectedError = new Error('The client has already been closed.');
893887
client.close();
894888
await assert.rejects(client.allocateIds(request), expectedError);
@@ -1015,7 +1009,6 @@ describe('v1.DatastoreClient', () => {
10151009
new protos.google.datastore.v1.ReserveIdsRequest()
10161010
);
10171011
request.projectId = '';
1018-
const expectedHeaderRequestParams = 'project_id=';
10191012
const expectedError = new Error('The client has already been closed.');
10201013
client.close();
10211014
await assert.rejects(client.reserveIds(request), expectedError);

0 commit comments

Comments
 (0)