Skip to content

Commit 734397c

Browse files
fix: [Many APIs] finalize fixing typings for headers in generator (#6019)
* fix: finalize fixing typings for headers in generator PiperOrigin-RevId: 723563760 Source-Link: googleapis/googleapis@2f843e2 Source-Link: googleapis/googleapis-gen@cd0f9c6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpc2lvbi8uT3dsQm90LnlhbWwiLCJoIjoiY2QwZjljNmZlMWRkNzdjNTUyZWY3NjZlNjA0N2Y4ZGNmZDNiY2MyZSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtbWlncmF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJjZDBmOWM2ZmUxZGQ3N2M1NTJlZjc2NmU2MDQ3ZjhkY2ZkM2JjYzJlIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2luZS8uT3dsQm90LnlhbWwiLCJoIjoiY2QwZjljNmZlMWRkNzdjNTUyZWY3NjZlNjA0N2Y4ZGNmZDNiY2MyZSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZwY2FjY2Vzcy8uT3dsQm90LnlhbWwiLCJoIjoiY2QwZjljNmZlMWRkNzdjNTUyZWY3NjZlNjA0N2Y4ZGNmZDNiY2MyZSJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdlYnJpc2svLk93bEJvdC55YW1sIiwiaCI6ImNkMGY5YzZmZTFkZDc3YzU1MmVmNzY2ZTYwNDdmOGRjZmQzYmNjMmUifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiJjZDBmOWM2ZmUxZGQ3N2M1NTJlZjc2NmU2MDQ3ZjhkY2ZkM2JjYzJlIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29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0b3JhZ2V0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiY2QwZjljNmZlMWRkNzdjNTUyZWY3NjZlNjA0N2Y4ZGNmZDNiY2MyZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 9dc5856 commit 734397c

49 files changed

Lines changed: 2681 additions & 1799 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-vision/src/v1/image_annotator_client.ts

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ export class ImageAnnotatorClient {
10381038
*/
10391039
getOperation(
10401040
request: protos.google.longrunning.GetOperationRequest,
1041-
options?:
1041+
optionsOrCallback?:
10421042
| gax.CallOptions
10431043
| Callback<
10441044
protos.google.longrunning.Operation,
@@ -1051,6 +1051,20 @@ export class ImageAnnotatorClient {
10511051
{} | null | undefined
10521052
>
10531053
): Promise<[protos.google.longrunning.Operation]> {
1054+
let options: gax.CallOptions;
1055+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1056+
callback = optionsOrCallback;
1057+
options = {};
1058+
} else {
1059+
options = optionsOrCallback as gax.CallOptions;
1060+
}
1061+
options = options || {};
1062+
options.otherArgs = options.otherArgs || {};
1063+
options.otherArgs.headers = options.otherArgs.headers || {};
1064+
options.otherArgs.headers['x-goog-request-params'] =
1065+
this._gaxModule.routingHeader.fromParams({
1066+
name: request.name ?? '',
1067+
});
10541068
return this.operationsClient.getOperation(request, options, callback);
10551069
}
10561070
/**
@@ -1087,6 +1101,13 @@ export class ImageAnnotatorClient {
10871101
request: protos.google.longrunning.ListOperationsRequest,
10881102
options?: gax.CallOptions
10891103
): AsyncIterable<protos.google.longrunning.ListOperationsResponse> {
1104+
options = options || {};
1105+
options.otherArgs = options.otherArgs || {};
1106+
options.otherArgs.headers = options.otherArgs.headers || {};
1107+
options.otherArgs.headers['x-goog-request-params'] =
1108+
this._gaxModule.routingHeader.fromParams({
1109+
name: request.name ?? '',
1110+
});
10901111
return this.operationsClient.listOperationsAsync(request, options);
10911112
}
10921113
/**
@@ -1122,11 +1143,11 @@ export class ImageAnnotatorClient {
11221143
*/
11231144
cancelOperation(
11241145
request: protos.google.longrunning.CancelOperationRequest,
1125-
options?:
1146+
optionsOrCallback?:
11261147
| gax.CallOptions
11271148
| Callback<
1128-
protos.google.protobuf.Empty,
11291149
protos.google.longrunning.CancelOperationRequest,
1150+
protos.google.protobuf.Empty,
11301151
{} | undefined | null
11311152
>,
11321153
callback?: Callback<
@@ -1135,6 +1156,20 @@ export class ImageAnnotatorClient {
11351156
{} | undefined | null
11361157
>
11371158
): Promise<protos.google.protobuf.Empty> {
1159+
let options: gax.CallOptions;
1160+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1161+
callback = optionsOrCallback;
1162+
options = {};
1163+
} else {
1164+
options = optionsOrCallback as gax.CallOptions;
1165+
}
1166+
options = options || {};
1167+
options.otherArgs = options.otherArgs || {};
1168+
options.otherArgs.headers = options.otherArgs.headers || {};
1169+
options.otherArgs.headers['x-goog-request-params'] =
1170+
this._gaxModule.routingHeader.fromParams({
1171+
name: request.name ?? '',
1172+
});
11381173
return this.operationsClient.cancelOperation(request, options, callback);
11391174
}
11401175

@@ -1165,7 +1200,7 @@ export class ImageAnnotatorClient {
11651200
*/
11661201
deleteOperation(
11671202
request: protos.google.longrunning.DeleteOperationRequest,
1168-
options?:
1203+
optionsOrCallback?:
11691204
| gax.CallOptions
11701205
| Callback<
11711206
protos.google.protobuf.Empty,
@@ -1178,6 +1213,20 @@ export class ImageAnnotatorClient {
11781213
{} | null | undefined
11791214
>
11801215
): Promise<protos.google.protobuf.Empty> {
1216+
let options: gax.CallOptions;
1217+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
1218+
callback = optionsOrCallback;
1219+
options = {};
1220+
} else {
1221+
options = optionsOrCallback as gax.CallOptions;
1222+
}
1223+
options = options || {};
1224+
options.otherArgs = options.otherArgs || {};
1225+
options.otherArgs.headers = options.otherArgs.headers || {};
1226+
options.otherArgs.headers['x-goog-request-params'] =
1227+
this._gaxModule.routingHeader.fromParams({
1228+
name: request.name ?? '',
1229+
});
11811230
return this.operationsClient.deleteOperation(request, options, callback);
11821231
}
11831232

packages/google-cloud-vision/src/v1/product_search_client.ts

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,7 +2212,7 @@ export class ProductSearchClient {
22122212
}
22132213

22142214
/**
2215-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2215+
* Equivalent to `listProductSets`, but returns a NodeJS Stream object.
22162216
* @param {Object} request
22172217
* The request object that will be sent.
22182218
* @param {string} request.parent
@@ -2403,7 +2403,7 @@ export class ProductSearchClient {
24032403
}
24042404

24052405
/**
2406-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2406+
* Equivalent to `listProducts`, but returns a NodeJS Stream object.
24072407
* @param {Object} request
24082408
* The request object that will be sent.
24092409
* @param {string} request.parent
@@ -2607,7 +2607,7 @@ export class ProductSearchClient {
26072607
}
26082608

26092609
/**
2610-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2610+
* Equivalent to `listReferenceImages`, but returns a NodeJS Stream object.
26112611
* @param {Object} request
26122612
* The request object that will be sent.
26132613
* @param {string} request.parent
@@ -2818,7 +2818,7 @@ export class ProductSearchClient {
28182818
}
28192819

28202820
/**
2821-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2821+
* Equivalent to `listProductsInProductSet`, but returns a NodeJS Stream object.
28222822
* @param {Object} request
28232823
* The request object that will be sent.
28242824
* @param {string} request.name
@@ -2943,7 +2943,7 @@ export class ProductSearchClient {
29432943
*/
29442944
getOperation(
29452945
request: protos.google.longrunning.GetOperationRequest,
2946-
options?:
2946+
optionsOrCallback?:
29472947
| gax.CallOptions
29482948
| Callback<
29492949
protos.google.longrunning.Operation,
@@ -2956,6 +2956,20 @@ export class ProductSearchClient {
29562956
{} | null | undefined
29572957
>
29582958
): Promise<[protos.google.longrunning.Operation]> {
2959+
let options: gax.CallOptions;
2960+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
2961+
callback = optionsOrCallback;
2962+
options = {};
2963+
} else {
2964+
options = optionsOrCallback as gax.CallOptions;
2965+
}
2966+
options = options || {};
2967+
options.otherArgs = options.otherArgs || {};
2968+
options.otherArgs.headers = options.otherArgs.headers || {};
2969+
options.otherArgs.headers['x-goog-request-params'] =
2970+
this._gaxModule.routingHeader.fromParams({
2971+
name: request.name ?? '',
2972+
});
29592973
return this.operationsClient.getOperation(request, options, callback);
29602974
}
29612975
/**
@@ -2992,6 +3006,13 @@ export class ProductSearchClient {
29923006
request: protos.google.longrunning.ListOperationsRequest,
29933007
options?: gax.CallOptions
29943008
): AsyncIterable<protos.google.longrunning.ListOperationsResponse> {
3009+
options = options || {};
3010+
options.otherArgs = options.otherArgs || {};
3011+
options.otherArgs.headers = options.otherArgs.headers || {};
3012+
options.otherArgs.headers['x-goog-request-params'] =
3013+
this._gaxModule.routingHeader.fromParams({
3014+
name: request.name ?? '',
3015+
});
29953016
return this.operationsClient.listOperationsAsync(request, options);
29963017
}
29973018
/**
@@ -3027,11 +3048,11 @@ export class ProductSearchClient {
30273048
*/
30283049
cancelOperation(
30293050
request: protos.google.longrunning.CancelOperationRequest,
3030-
options?:
3051+
optionsOrCallback?:
30313052
| gax.CallOptions
30323053
| Callback<
3033-
protos.google.protobuf.Empty,
30343054
protos.google.longrunning.CancelOperationRequest,
3055+
protos.google.protobuf.Empty,
30353056
{} | undefined | null
30363057
>,
30373058
callback?: Callback<
@@ -3040,6 +3061,20 @@ export class ProductSearchClient {
30403061
{} | undefined | null
30413062
>
30423063
): Promise<protos.google.protobuf.Empty> {
3064+
let options: gax.CallOptions;
3065+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
3066+
callback = optionsOrCallback;
3067+
options = {};
3068+
} else {
3069+
options = optionsOrCallback as gax.CallOptions;
3070+
}
3071+
options = options || {};
3072+
options.otherArgs = options.otherArgs || {};
3073+
options.otherArgs.headers = options.otherArgs.headers || {};
3074+
options.otherArgs.headers['x-goog-request-params'] =
3075+
this._gaxModule.routingHeader.fromParams({
3076+
name: request.name ?? '',
3077+
});
30433078
return this.operationsClient.cancelOperation(request, options, callback);
30443079
}
30453080

@@ -3070,7 +3105,7 @@ export class ProductSearchClient {
30703105
*/
30713106
deleteOperation(
30723107
request: protos.google.longrunning.DeleteOperationRequest,
3073-
options?:
3108+
optionsOrCallback?:
30743109
| gax.CallOptions
30753110
| Callback<
30763111
protos.google.protobuf.Empty,
@@ -3083,6 +3118,20 @@ export class ProductSearchClient {
30833118
{} | null | undefined
30843119
>
30853120
): Promise<protos.google.protobuf.Empty> {
3121+
let options: gax.CallOptions;
3122+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
3123+
callback = optionsOrCallback;
3124+
options = {};
3125+
} else {
3126+
options = optionsOrCallback as gax.CallOptions;
3127+
}
3128+
options = options || {};
3129+
options.otherArgs = options.otherArgs || {};
3130+
options.otherArgs.headers = options.otherArgs.headers || {};
3131+
options.otherArgs.headers['x-goog-request-params'] =
3132+
this._gaxModule.routingHeader.fromParams({
3133+
name: request.name ?? '',
3134+
});
30863135
return this.operationsClient.deleteOperation(request, options, callback);
30873136
}
30883137

packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ export class ProductSearchClient {
21142114
}
21152115

21162116
/**
2117-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2117+
* Equivalent to `listProductSets`, but returns a NodeJS Stream object.
21182118
* @param {Object} request
21192119
* The request object that will be sent.
21202120
* @param {string} request.parent
@@ -2311,7 +2311,7 @@ export class ProductSearchClient {
23112311
}
23122312

23132313
/**
2314-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2314+
* Equivalent to `listProducts`, but returns a NodeJS Stream object.
23152315
* @param {Object} request
23162316
* The request object that will be sent.
23172317
* @param {string} request.parent
@@ -2515,7 +2515,7 @@ export class ProductSearchClient {
25152515
}
25162516

25172517
/**
2518-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2518+
* Equivalent to `listReferenceImages`, but returns a NodeJS Stream object.
25192519
* @param {Object} request
25202520
* The request object that will be sent.
25212521
* @param {string} request.parent
@@ -2726,7 +2726,7 @@ export class ProductSearchClient {
27262726
}
27272727

27282728
/**
2729-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2729+
* Equivalent to `listProductsInProductSet`, but returns a NodeJS Stream object.
27302730
* @param {Object} request
27312731
* The request object that will be sent.
27322732
* @param {string} request.name

packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,7 +2286,7 @@ export class ProductSearchClient {
22862286
}
22872287

22882288
/**
2289-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2289+
* Equivalent to `listProductSets`, but returns a NodeJS Stream object.
22902290
* @param {Object} request
22912291
* The request object that will be sent.
22922292
* @param {string} request.parent
@@ -2483,7 +2483,7 @@ export class ProductSearchClient {
24832483
}
24842484

24852485
/**
2486-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2486+
* Equivalent to `listProducts`, but returns a NodeJS Stream object.
24872487
* @param {Object} request
24882488
* The request object that will be sent.
24892489
* @param {string} request.parent
@@ -2687,7 +2687,7 @@ export class ProductSearchClient {
26872687
}
26882688

26892689
/**
2690-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2690+
* Equivalent to `listReferenceImages`, but returns a NodeJS Stream object.
26912691
* @param {Object} request
26922692
* The request object that will be sent.
26932693
* @param {string} request.parent
@@ -2898,7 +2898,7 @@ export class ProductSearchClient {
28982898
}
28992899

29002900
/**
2901-
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
2901+
* Equivalent to `listProductsInProductSet`, but returns a NodeJS Stream object.
29022902
* @param {Object} request
29032903
* The request object that will be sent.
29042904
* @param {string} request.name

0 commit comments

Comments
 (0)