Skip to content

Commit

Permalink
chore: new owl bot post processor docker image (#660)
Browse files Browse the repository at this point in the history
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
  • Loading branch information
gcf-owl-bot[bot] authored May 10, 2021
1 parent 8808d64 commit 7201827
Show file tree
Hide file tree
Showing 6 changed files with 409 additions and 523 deletions.
16 changes: 8 additions & 8 deletions packages/google-cloud-translate/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions packages/google-cloud-translate/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 49 additions & 58 deletions packages/google-cloud-translate/src/v3/translation_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,14 @@ export class TranslationServiceClient {
];
for (const methodName of translationServiceStubMethods) {
const callPromise = this.translationServiceStub.then(
stub => (...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
stub =>
(...args: Array<{}>) => {
if (this._terminated) {
return Promise.reject('The client has already been closed.');
}
const func = stub[methodName];
return func.apply(stub, args);
},
(err: Error | null | undefined) => () => {
throw err;
}
Expand Down Expand Up @@ -525,11 +526,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.translateText(request, options, callback);
}
Expand Down Expand Up @@ -651,11 +651,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.detectLanguage(request, options, callback);
}
Expand Down Expand Up @@ -780,11 +779,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.getSupportedLanguages(request, options, callback);
}
Expand Down Expand Up @@ -867,11 +865,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
name: request.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.getGlossary(request, options, callback);
}
Expand Down Expand Up @@ -1029,11 +1026,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.batchTranslateText(request, options, callback);
}
Expand Down Expand Up @@ -1174,11 +1170,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.createGlossary(request, options, callback);
}
Expand Down Expand Up @@ -1318,11 +1313,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
name: request.name || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
name: request.name || '',
});
this.initialize();
return this.innerApiCalls.deleteGlossary(request, options, callback);
}
Expand Down Expand Up @@ -1463,11 +1457,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
this.initialize();
return this.innerApiCalls.listGlossaries(request, options, callback);
}
Expand Down Expand Up @@ -1510,11 +1503,10 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
const callSettings = new gax.CallSettings(options);
this.initialize();
return this.descriptors.page.listGlossaries.createStream(
Expand Down Expand Up @@ -1568,17 +1560,16 @@ export class TranslationServiceClient {
options = options || {};
options.otherArgs = options.otherArgs || {};
options.otherArgs.headers = options.otherArgs.headers || {};
options.otherArgs.headers[
'x-goog-request-params'
] = gax.routingHeader.fromParams({
parent: request.parent || '',
});
options.otherArgs.headers['x-goog-request-params'] =
gax.routingHeader.fromParams({
parent: request.parent || '',
});
options = options || {};
const callSettings = new gax.CallSettings(options);
this.initialize();
return this.descriptors.page.listGlossaries.asyncIterate(
this.innerApiCalls['listGlossaries'] as GaxCall,
(request as unknown) as RequestType,
request as unknown as RequestType,
callSettings
) as AsyncIterable<protos.google.cloud.translation.v3.IGlossary>;
}
Expand Down
Loading

0 comments on commit 7201827

Please sign in to comment.