Skip to content

Commit 098e382

Browse files
chore: new owl bot post processor docker image (#290)
gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f
1 parent 02b95de commit 098e382

File tree

7 files changed

+102
-91
lines changed

7 files changed

+102
-91
lines changed

packages/google-cloud-phishingprotection/protos/protos.d.ts

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-phishingprotection/protos/protos.js

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-phishingprotection/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import * as v1beta1 from './v1beta1';
2020

2121
const PhishingProtectionServiceV1Beta1Client =
2222
v1beta1.PhishingProtectionServiceV1Beta1Client;
23-
type PhishingProtectionServiceV1Beta1Client = v1beta1.PhishingProtectionServiceV1Beta1Client;
23+
type PhishingProtectionServiceV1Beta1Client =
24+
v1beta1.PhishingProtectionServiceV1Beta1Client;
2425

2526
export {v1beta1, PhishingProtectionServiceV1Beta1Client};
2627
export default {v1beta1, PhishingProtectionServiceV1Beta1Client};

packages/google-cloud-phishingprotection/src/v1beta1/phishing_protection_service_v1_beta1_client.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,14 @@ export class PhishingProtectionServiceV1Beta1Client {
212212
const phishingProtectionServiceV1Beta1StubMethods = ['reportPhishing'];
213213
for (const methodName of phishingProtectionServiceV1Beta1StubMethods) {
214214
const callPromise = this.phishingProtectionServiceV1Beta1Stub.then(
215-
stub => (...args: Array<{}>) => {
216-
if (this._terminated) {
217-
return Promise.reject('The client has already been closed.');
218-
}
219-
const func = stub[methodName];
220-
return func.apply(stub, args);
221-
},
215+
stub =>
216+
(...args: Array<{}>) => {
217+
if (this._terminated) {
218+
return Promise.reject('The client has already been closed.');
219+
}
220+
const func = stub[methodName];
221+
return func.apply(stub, args);
222+
},
222223
(err: Error | null | undefined) => () => {
223224
throw err;
224225
}
@@ -389,11 +390,10 @@ export class PhishingProtectionServiceV1Beta1Client {
389390
options = options || {};
390391
options.otherArgs = options.otherArgs || {};
391392
options.otherArgs.headers = options.otherArgs.headers || {};
392-
options.otherArgs.headers[
393-
'x-goog-request-params'
394-
] = gax.routingHeader.fromParams({
395-
parent: request.parent || '',
396-
});
393+
options.otherArgs.headers['x-goog-request-params'] =
394+
gax.routingHeader.fromParams({
395+
parent: request.parent || '',
396+
});
397397
this.initialize();
398398
return this.innerApiCalls.reportPhishing(request, options, callback);
399399
}

packages/google-cloud-phishingprotection/system-test/fixtures/sample/src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
const phishingprotection = require('@google-cloud/phishing-protection');
2121

2222
function main() {
23-
const phishingProtectionServiceV1Beta1Client = new phishingprotection.PhishingProtectionServiceV1Beta1Client();
23+
const phishingProtectionServiceV1Beta1Client =
24+
new phishingprotection.PhishingProtectionServiceV1Beta1Client();
2425
}
2526

2627
main();

packages/google-cloud-phishingprotection/system-test/fixtures/sample/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function doStuffWithPhishingProtectionServiceV1Beta1Client(
2727

2828
function main() {
2929
// check that the client instance can be created
30-
const phishingProtectionServiceV1Beta1Client = new PhishingProtectionServiceV1Beta1Client();
30+
const phishingProtectionServiceV1Beta1Client =
31+
new PhishingProtectionServiceV1Beta1Client();
3132
doStuffWithPhishingProtectionServiceV1Beta1Client(
3233
phishingProtectionServiceV1Beta1Client
3334
);

packages/google-cloud-phishingprotection/test/gapic_phishing_protection_service_v1_beta1_v1beta1.ts

+69-61
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ import * as phishingprotectionservicev1beta1Module from '../src';
2626
import {protobuf} from 'google-gax';
2727

2828
function generateSampleMessage<T extends object>(instance: T) {
29-
const filledObject = (instance.constructor as typeof protobuf.Message).toObject(
30-
instance as protobuf.Message<T>,
31-
{defaults: true}
32-
);
29+
const filledObject = (
30+
instance.constructor as typeof protobuf.Message
31+
).toObject(instance as protobuf.Message<T>, {defaults: true});
3332
return (instance.constructor as typeof protobuf.Message).fromObject(
3433
filledObject
3534
) as T;
@@ -74,49 +73,54 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
7473
});
7574

7675
it('should create a client with no option', () => {
77-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client();
76+
const client =
77+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client();
7878
assert(client);
7979
});
8080

8181
it('should create a client with gRPC fallback', () => {
82-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
83-
{
84-
fallback: true,
85-
}
86-
);
82+
const client =
83+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
84+
{
85+
fallback: true,
86+
}
87+
);
8788
assert(client);
8889
});
8990

9091
it('has initialize method and supports deferred initialization', async () => {
91-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
92-
{
93-
credentials: {client_email: 'bogus', private_key: 'bogus'},
94-
projectId: 'bogus',
95-
}
96-
);
92+
const client =
93+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
94+
{
95+
credentials: {client_email: 'bogus', private_key: 'bogus'},
96+
projectId: 'bogus',
97+
}
98+
);
9799
assert.strictEqual(client.phishingProtectionServiceV1Beta1Stub, undefined);
98100
await client.initialize();
99101
assert(client.phishingProtectionServiceV1Beta1Stub);
100102
});
101103

102104
it('has close method', () => {
103-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
104-
{
105-
credentials: {client_email: 'bogus', private_key: 'bogus'},
106-
projectId: 'bogus',
107-
}
108-
);
105+
const client =
106+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
107+
{
108+
credentials: {client_email: 'bogus', private_key: 'bogus'},
109+
projectId: 'bogus',
110+
}
111+
);
109112
client.close();
110113
});
111114

112115
it('has getProjectId method', async () => {
113116
const fakeProjectId = 'fake-project-id';
114-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
115-
{
116-
credentials: {client_email: 'bogus', private_key: 'bogus'},
117-
projectId: 'bogus',
118-
}
119-
);
117+
const client =
118+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
119+
{
120+
credentials: {client_email: 'bogus', private_key: 'bogus'},
121+
projectId: 'bogus',
122+
}
123+
);
120124
client.auth.getProjectId = sinon.stub().resolves(fakeProjectId);
121125
const result = await client.getProjectId();
122126
assert.strictEqual(result, fakeProjectId);
@@ -125,12 +129,13 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
125129

126130
it('has getProjectId method with callback', async () => {
127131
const fakeProjectId = 'fake-project-id';
128-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
129-
{
130-
credentials: {client_email: 'bogus', private_key: 'bogus'},
131-
projectId: 'bogus',
132-
}
133-
);
132+
const client =
133+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
134+
{
135+
credentials: {client_email: 'bogus', private_key: 'bogus'},
136+
projectId: 'bogus',
137+
}
138+
);
134139
client.auth.getProjectId = sinon
135140
.stub()
136141
.callsArgWith(0, null, fakeProjectId);
@@ -149,12 +154,13 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
149154

150155
describe('reportPhishing', () => {
151156
it('invokes reportPhishing without error', async () => {
152-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
153-
{
154-
credentials: {client_email: 'bogus', private_key: 'bogus'},
155-
projectId: 'bogus',
156-
}
157-
);
157+
const client =
158+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
159+
{
160+
credentials: {client_email: 'bogus', private_key: 'bogus'},
161+
projectId: 'bogus',
162+
}
163+
);
158164
client.initialize();
159165
const request = generateSampleMessage(
160166
new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest()
@@ -182,12 +188,13 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
182188
});
183189

184190
it('invokes reportPhishing without error using callback', async () => {
185-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
186-
{
187-
credentials: {client_email: 'bogus', private_key: 'bogus'},
188-
projectId: 'bogus',
189-
}
190-
);
191+
const client =
192+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
193+
{
194+
credentials: {client_email: 'bogus', private_key: 'bogus'},
195+
projectId: 'bogus',
196+
}
197+
);
191198
client.initialize();
192199
const request = generateSampleMessage(
193200
new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest()
@@ -204,9 +211,8 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
204211
const expectedResponse = generateSampleMessage(
205212
new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingResponse()
206213
);
207-
client.innerApiCalls.reportPhishing = stubSimpleCallWithCallback(
208-
expectedResponse
209-
);
214+
client.innerApiCalls.reportPhishing =
215+
stubSimpleCallWithCallback(expectedResponse);
210216
const promise = new Promise((resolve, reject) => {
211217
client.reportPhishing(
212218
request,
@@ -232,12 +238,13 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
232238
});
233239

234240
it('invokes reportPhishing with error', async () => {
235-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
236-
{
237-
credentials: {client_email: 'bogus', private_key: 'bogus'},
238-
projectId: 'bogus',
239-
}
240-
);
241+
const client =
242+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
243+
{
244+
credentials: {client_email: 'bogus', private_key: 'bogus'},
245+
projectId: 'bogus',
246+
}
247+
);
241248
client.initialize();
242249
const request = generateSampleMessage(
243250
new protos.google.cloud.phishingprotection.v1beta1.ReportPhishingRequest()
@@ -271,12 +278,13 @@ describe('v1beta1.PhishingProtectionServiceV1Beta1Client', () => {
271278
const expectedParameters = {
272279
project: 'projectValue',
273280
};
274-
const client = new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
275-
{
276-
credentials: {client_email: 'bogus', private_key: 'bogus'},
277-
projectId: 'bogus',
278-
}
279-
);
281+
const client =
282+
new phishingprotectionservicev1beta1Module.v1beta1.PhishingProtectionServiceV1Beta1Client(
283+
{
284+
credentials: {client_email: 'bogus', private_key: 'bogus'},
285+
projectId: 'bogus',
286+
}
287+
);
280288
client.initialize();
281289
client.pathTemplates.projectPathTemplate.render = sinon
282290
.stub()

0 commit comments

Comments
 (0)