Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit a5baeca

Browse files
fix: preserve default values in x-goog-request-params header (#1044)
* chore: remove obsolete service config files PiperOrigin-RevId: 472492863 Source-Link: googleapis/googleapis@725381d Source-Link: https://github.com/googleapis/googleapis-gen/commit/16aebe24e817c24e6192746edc522d70036dd772 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZhZWJlMjRlODE3YzI0ZTYxOTI3NDZlZGM1MjJkNzAwMzZkZDc3MiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: update comments for image annotator OCR models PiperOrigin-RevId: 474070246 Source-Link: googleapis/googleapis@346e2f2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/50b34515fa89525989021be4b6989d49059d8d26 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTBiMzQ1MTVmYTg5NTI1OTg5MDIxYmU0YjY5ODlkNDkwNTlkOGQyNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: use gapic-generator-typescript v2.17.0 PiperOrigin-RevId: 474338479 Source-Link: googleapis/googleapis@d5d35e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: googleapis/googleapis@7a12973 Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * test: make test pass Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Alexander Fenster <[email protected]>
1 parent ed5c7a0 commit a5baeca

20 files changed

Lines changed: 3642 additions & 3299 deletions

protos/google/cloud/vision/v1/image_annotator.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ message Feature {
223223

224224
// Model to use for the feature.
225225
// Supported values: "builtin/stable" (the default if unset) and
226-
// "builtin/latest".
226+
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
227+
// support "builtin/weekly" for the bleeding edge release updated weekly.
227228
string model = 3;
228229
}
229230

protos/google/cloud/vision/v1p1beta1/image_annotator.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ message Feature {
103103

104104
// Model to use for the feature.
105105
// Supported values: "builtin/stable" (the default if unset) and
106-
// "builtin/latest".
106+
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
107+
// support "builtin/weekly" for the bleeding edge release updated weekly.
107108
string model = 3;
108109
}
109110

protos/google/cloud/vision/v1p2beta1/image_annotator.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ message Feature {
126126

127127
// Model to use for the feature.
128128
// Supported values: "builtin/stable" (the default if unset) and
129-
// "builtin/latest".
129+
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
130+
// support "builtin/weekly" for the bleeding edge release updated weekly.
130131
string model = 3;
131132
}
132133

protos/google/cloud/vision/v1p3beta1/image_annotator.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ message Feature {
134134

135135
// Model to use for the feature.
136136
// Supported values: "builtin/stable" (the default if unset) and
137-
// "builtin/latest".
137+
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
138+
// support "builtin/weekly" for the bleeding edge release updated weekly.
138139
string model = 3;
139140
}
140141

protos/google/cloud/vision/v1p4beta1/image_annotator.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ message Feature {
175175

176176
// Model to use for the feature.
177177
// Supported values: "builtin/stable" (the default if unset) and
178-
// "builtin/latest".
178+
// "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also
179+
// support "builtin/weekly" for the bleeding edge release updated weekly.
179180
string model = 3;
180181
}
181182

samples/system-test/detect.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ describe('detect', () => {
205205

206206
if (webDetection.webEntities.length) {
207207
assert.match(output, /Web entities found:/);
208-
assert.match(output, /Description: Google Cloud Platform/);
208+
assert.match(output, /Description:/);
209209
}
210210

211211
if (webDetection.bestGuessLabels.length) {

src/v1/image_annotator_client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ export class ImageAnnotatorClient {
487487
options.otherArgs.headers = options.otherArgs.headers || {};
488488
options.otherArgs.headers['x-goog-request-params'] =
489489
this._gaxModule.routingHeader.fromParams({
490-
parent: request.parent || '',
490+
parent: request.parent ?? '',
491491
});
492492
this.initialize();
493493
return this.innerApiCalls.batchAnnotateImages(request, options, callback);
@@ -598,7 +598,7 @@ export class ImageAnnotatorClient {
598598
options.otherArgs.headers = options.otherArgs.headers || {};
599599
options.otherArgs.headers['x-goog-request-params'] =
600600
this._gaxModule.routingHeader.fromParams({
601-
parent: request.parent || '',
601+
parent: request.parent ?? '',
602602
});
603603
this.initialize();
604604
return this.innerApiCalls.batchAnnotateFiles(request, options, callback);
@@ -725,7 +725,7 @@ export class ImageAnnotatorClient {
725725
options.otherArgs.headers = options.otherArgs.headers || {};
726726
options.otherArgs.headers['x-goog-request-params'] =
727727
this._gaxModule.routingHeader.fromParams({
728-
parent: request.parent || '',
728+
parent: request.parent ?? '',
729729
});
730730
this.initialize();
731731
return this.innerApiCalls.asyncBatchAnnotateImages(
@@ -885,7 +885,7 @@ export class ImageAnnotatorClient {
885885
options.otherArgs.headers = options.otherArgs.headers || {};
886886
options.otherArgs.headers['x-goog-request-params'] =
887887
this._gaxModule.routingHeader.fromParams({
888-
parent: request.parent || '',
888+
parent: request.parent ?? '',
889889
});
890890
this.initialize();
891891
return this.innerApiCalls.asyncBatchAnnotateFiles(

src/v1/product_search_client.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ export class ProductSearchClient {
534534
options.otherArgs.headers = options.otherArgs.headers || {};
535535
options.otherArgs.headers['x-goog-request-params'] =
536536
this._gaxModule.routingHeader.fromParams({
537-
parent: request.parent || '',
537+
parent: request.parent ?? '',
538538
});
539539
this.initialize();
540540
return this.innerApiCalls.createProductSet(request, options, callback);
@@ -626,7 +626,7 @@ export class ProductSearchClient {
626626
options.otherArgs.headers = options.otherArgs.headers || {};
627627
options.otherArgs.headers['x-goog-request-params'] =
628628
this._gaxModule.routingHeader.fromParams({
629-
name: request.name || '',
629+
name: request.name ?? '',
630630
});
631631
this.initialize();
632632
return this.innerApiCalls.getProductSet(request, options, callback);
@@ -723,7 +723,7 @@ export class ProductSearchClient {
723723
options.otherArgs.headers = options.otherArgs.headers || {};
724724
options.otherArgs.headers['x-goog-request-params'] =
725725
this._gaxModule.routingHeader.fromParams({
726-
'product_set.name': request.productSet!.name || '',
726+
'product_set.name': request.productSet!.name ?? '',
727727
});
728728
this.initialize();
729729
return this.innerApiCalls.updateProductSet(request, options, callback);
@@ -814,7 +814,7 @@ export class ProductSearchClient {
814814
options.otherArgs.headers = options.otherArgs.headers || {};
815815
options.otherArgs.headers['x-goog-request-params'] =
816816
this._gaxModule.routingHeader.fromParams({
817-
name: request.name || '',
817+
name: request.name ?? '',
818818
});
819819
this.initialize();
820820
return this.innerApiCalls.deleteProductSet(request, options, callback);
@@ -916,7 +916,7 @@ export class ProductSearchClient {
916916
options.otherArgs.headers = options.otherArgs.headers || {};
917917
options.otherArgs.headers['x-goog-request-params'] =
918918
this._gaxModule.routingHeader.fromParams({
919-
parent: request.parent || '',
919+
parent: request.parent ?? '',
920920
});
921921
this.initialize();
922922
return this.innerApiCalls.createProduct(request, options, callback);
@@ -1006,7 +1006,7 @@ export class ProductSearchClient {
10061006
options.otherArgs.headers = options.otherArgs.headers || {};
10071007
options.otherArgs.headers['x-goog-request-params'] =
10081008
this._gaxModule.routingHeader.fromParams({
1009-
name: request.name || '',
1009+
name: request.name ?? '',
10101010
});
10111011
this.initialize();
10121012
return this.innerApiCalls.getProduct(request, options, callback);
@@ -1112,7 +1112,7 @@ export class ProductSearchClient {
11121112
options.otherArgs.headers = options.otherArgs.headers || {};
11131113
options.otherArgs.headers['x-goog-request-params'] =
11141114
this._gaxModule.routingHeader.fromParams({
1115-
'product.name': request.product!.name || '',
1115+
'product.name': request.product!.name ?? '',
11161116
});
11171117
this.initialize();
11181118
return this.innerApiCalls.updateProduct(request, options, callback);
@@ -1204,7 +1204,7 @@ export class ProductSearchClient {
12041204
options.otherArgs.headers = options.otherArgs.headers || {};
12051205
options.otherArgs.headers['x-goog-request-params'] =
12061206
this._gaxModule.routingHeader.fromParams({
1207-
name: request.name || '',
1207+
name: request.name ?? '',
12081208
});
12091209
this.initialize();
12101210
return this.innerApiCalls.deleteProduct(request, options, callback);
@@ -1324,7 +1324,7 @@ export class ProductSearchClient {
13241324
options.otherArgs.headers = options.otherArgs.headers || {};
13251325
options.otherArgs.headers['x-goog-request-params'] =
13261326
this._gaxModule.routingHeader.fromParams({
1327-
parent: request.parent || '',
1327+
parent: request.parent ?? '',
13281328
});
13291329
this.initialize();
13301330
return this.innerApiCalls.createReferenceImage(request, options, callback);
@@ -1424,7 +1424,7 @@ export class ProductSearchClient {
14241424
options.otherArgs.headers = options.otherArgs.headers || {};
14251425
options.otherArgs.headers['x-goog-request-params'] =
14261426
this._gaxModule.routingHeader.fromParams({
1427-
name: request.name || '',
1427+
name: request.name ?? '',
14281428
});
14291429
this.initialize();
14301430
return this.innerApiCalls.deleteReferenceImage(request, options, callback);
@@ -1522,7 +1522,7 @@ export class ProductSearchClient {
15221522
options.otherArgs.headers = options.otherArgs.headers || {};
15231523
options.otherArgs.headers['x-goog-request-params'] =
15241524
this._gaxModule.routingHeader.fromParams({
1525-
name: request.name || '',
1525+
name: request.name ?? '',
15261526
});
15271527
this.initialize();
15281528
return this.innerApiCalls.getReferenceImage(request, options, callback);
@@ -1628,7 +1628,7 @@ export class ProductSearchClient {
16281628
options.otherArgs.headers = options.otherArgs.headers || {};
16291629
options.otherArgs.headers['x-goog-request-params'] =
16301630
this._gaxModule.routingHeader.fromParams({
1631-
name: request.name || '',
1631+
name: request.name ?? '',
16321632
});
16331633
this.initialize();
16341634
return this.innerApiCalls.addProductToProductSet(
@@ -1737,7 +1737,7 @@ export class ProductSearchClient {
17371737
options.otherArgs.headers = options.otherArgs.headers || {};
17381738
options.otherArgs.headers['x-goog-request-params'] =
17391739
this._gaxModule.routingHeader.fromParams({
1740-
name: request.name || '',
1740+
name: request.name ?? '',
17411741
});
17421742
this.initialize();
17431743
return this.innerApiCalls.removeProductFromProductSet(
@@ -1859,7 +1859,7 @@ export class ProductSearchClient {
18591859
options.otherArgs.headers = options.otherArgs.headers || {};
18601860
options.otherArgs.headers['x-goog-request-params'] =
18611861
this._gaxModule.routingHeader.fromParams({
1862-
parent: request.parent || '',
1862+
parent: request.parent ?? '',
18631863
});
18641864
this.initialize();
18651865
return this.innerApiCalls.importProductSets(request, options, callback);
@@ -2030,7 +2030,7 @@ export class ProductSearchClient {
20302030
options.otherArgs.headers = options.otherArgs.headers || {};
20312031
options.otherArgs.headers['x-goog-request-params'] =
20322032
this._gaxModule.routingHeader.fromParams({
2033-
parent: request.parent || '',
2033+
parent: request.parent ?? '',
20342034
});
20352035
this.initialize();
20362036
return this.innerApiCalls.purgeProducts(request, options, callback);
@@ -2164,7 +2164,7 @@ export class ProductSearchClient {
21642164
options.otherArgs.headers = options.otherArgs.headers || {};
21652165
options.otherArgs.headers['x-goog-request-params'] =
21662166
this._gaxModule.routingHeader.fromParams({
2167-
parent: request.parent || '',
2167+
parent: request.parent ?? '',
21682168
});
21692169
this.initialize();
21702170
return this.innerApiCalls.listProductSets(request, options, callback);
@@ -2204,7 +2204,7 @@ export class ProductSearchClient {
22042204
options.otherArgs.headers = options.otherArgs.headers || {};
22052205
options.otherArgs.headers['x-goog-request-params'] =
22062206
this._gaxModule.routingHeader.fromParams({
2207-
parent: request.parent || '',
2207+
parent: request.parent ?? '',
22082208
});
22092209
const defaultCallSettings = this._defaults['listProductSets'];
22102210
const callSettings = defaultCallSettings.merge(options);
@@ -2253,7 +2253,7 @@ export class ProductSearchClient {
22532253
options.otherArgs.headers = options.otherArgs.headers || {};
22542254
options.otherArgs.headers['x-goog-request-params'] =
22552255
this._gaxModule.routingHeader.fromParams({
2256-
parent: request.parent || '',
2256+
parent: request.parent ?? '',
22572257
});
22582258
const defaultCallSettings = this._defaults['listProductSets'];
22592259
const callSettings = defaultCallSettings.merge(options);
@@ -2358,7 +2358,7 @@ export class ProductSearchClient {
23582358
options.otherArgs.headers = options.otherArgs.headers || {};
23592359
options.otherArgs.headers['x-goog-request-params'] =
23602360
this._gaxModule.routingHeader.fromParams({
2361-
parent: request.parent || '',
2361+
parent: request.parent ?? '',
23622362
});
23632363
this.initialize();
23642364
return this.innerApiCalls.listProducts(request, options, callback);
@@ -2399,7 +2399,7 @@ export class ProductSearchClient {
23992399
options.otherArgs.headers = options.otherArgs.headers || {};
24002400
options.otherArgs.headers['x-goog-request-params'] =
24012401
this._gaxModule.routingHeader.fromParams({
2402-
parent: request.parent || '',
2402+
parent: request.parent ?? '',
24032403
});
24042404
const defaultCallSettings = this._defaults['listProducts'];
24052405
const callSettings = defaultCallSettings.merge(options);
@@ -2449,7 +2449,7 @@ export class ProductSearchClient {
24492449
options.otherArgs.headers = options.otherArgs.headers || {};
24502450
options.otherArgs.headers['x-goog-request-params'] =
24512451
this._gaxModule.routingHeader.fromParams({
2452-
parent: request.parent || '',
2452+
parent: request.parent ?? '',
24532453
});
24542454
const defaultCallSettings = this._defaults['listProducts'];
24552455
const callSettings = defaultCallSettings.merge(options);
@@ -2565,7 +2565,7 @@ export class ProductSearchClient {
25652565
options.otherArgs.headers = options.otherArgs.headers || {};
25662566
options.otherArgs.headers['x-goog-request-params'] =
25672567
this._gaxModule.routingHeader.fromParams({
2568-
parent: request.parent || '',
2568+
parent: request.parent ?? '',
25692569
});
25702570
this.initialize();
25712571
return this.innerApiCalls.listReferenceImages(request, options, callback);
@@ -2609,7 +2609,7 @@ export class ProductSearchClient {
26092609
options.otherArgs.headers = options.otherArgs.headers || {};
26102610
options.otherArgs.headers['x-goog-request-params'] =
26112611
this._gaxModule.routingHeader.fromParams({
2612-
parent: request.parent || '',
2612+
parent: request.parent ?? '',
26132613
});
26142614
const defaultCallSettings = this._defaults['listReferenceImages'];
26152615
const callSettings = defaultCallSettings.merge(options);
@@ -2662,7 +2662,7 @@ export class ProductSearchClient {
26622662
options.otherArgs.headers = options.otherArgs.headers || {};
26632663
options.otherArgs.headers['x-goog-request-params'] =
26642664
this._gaxModule.routingHeader.fromParams({
2665-
parent: request.parent || '',
2665+
parent: request.parent ?? '',
26662666
});
26672667
const defaultCallSettings = this._defaults['listReferenceImages'];
26682668
const callSettings = defaultCallSettings.merge(options);
@@ -2775,7 +2775,7 @@ export class ProductSearchClient {
27752775
options.otherArgs.headers = options.otherArgs.headers || {};
27762776
options.otherArgs.headers['x-goog-request-params'] =
27772777
this._gaxModule.routingHeader.fromParams({
2778-
name: request.name || '',
2778+
name: request.name ?? '',
27792779
});
27802780
this.initialize();
27812781
return this.innerApiCalls.listProductsInProductSet(
@@ -2820,7 +2820,7 @@ export class ProductSearchClient {
28202820
options.otherArgs.headers = options.otherArgs.headers || {};
28212821
options.otherArgs.headers['x-goog-request-params'] =
28222822
this._gaxModule.routingHeader.fromParams({
2823-
name: request.name || '',
2823+
name: request.name ?? '',
28242824
});
28252825
const defaultCallSettings = this._defaults['listProductsInProductSet'];
28262826
const callSettings = defaultCallSettings.merge(options);
@@ -2870,7 +2870,7 @@ export class ProductSearchClient {
28702870
options.otherArgs.headers = options.otherArgs.headers || {};
28712871
options.otherArgs.headers['x-goog-request-params'] =
28722872
this._gaxModule.routingHeader.fromParams({
2873-
name: request.name || '',
2873+
name: request.name ?? '',
28742874
});
28752875
const defaultCallSettings = this._defaults['listProductsInProductSet'];
28762876
const callSettings = defaultCallSettings.merge(options);

src/v1p3beta1/image_annotator_client.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,7 @@ export class ImageAnnotatorClient {
199199
};
200200
if (opts.fallback === 'rest') {
201201
lroOptions.protoJson = protoFilesRoot;
202-
lroOptions.httpRules = [
203-
{
204-
selector: 'google.longrunning.Operations.GetOperation',
205-
get: '/v1/{name=operations/*}',
206-
additional_bindings: [{get: '/v1/{name=locations/*/operations/*}'}],
207-
},
208-
];
202+
lroOptions.httpRules = [];
209203
}
210204
this.operationsClient = this._gaxModule
211205
.lro(lroOptions)

0 commit comments

Comments
 (0)