Skip to content

Commit dbfa550

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#928)
Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: googleapis/googleapis@80f4042 Source-Link: googleapis/googleapis-gen@d3509d2
1 parent 4ba6ed8 commit dbfa550

File tree

8 files changed

+80
-8
lines changed

8 files changed

+80
-8
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
4747
export class ImageAnnotatorClient {
4848
private _terminated = false;
4949
private _opts: ClientOptions;
50+
private _providedCustomServicePath: boolean;
5051
private _gaxModule: typeof gax | typeof gax.fallback;
5152
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5253
private _protos: {};
@@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
pathTemplates: {[name: string]: gax.PathTemplate};
6365
operationsClient: gax.OperationsClient;
@@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
102104
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
103105
const servicePath =
104106
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
107+
this._providedCustomServicePath = !!(
108+
opts?.servicePath || opts?.apiEndpoint
109+
);
105110
const port = opts?.port || staticMembers.port;
106111
const clientConfig = opts?.clientConfig ?? {};
107112
const fallback =
@@ -222,6 +227,9 @@ export class ImageAnnotatorClient {
222227
// of calling the API is handled in `google-gax`, with this code
223228
// merely providing the destination and request information.
224229
this.innerApiCalls = {};
230+
231+
// Add a warn function to the client constructor so it can be easily tested.
232+
this.warn = gax.warn;
225233
}
226234

227235
/**
@@ -250,7 +258,8 @@ export class ImageAnnotatorClient {
250258
)
251259
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
252260
(this._protos as any).google.cloud.vision.v1.ImageAnnotator,
253-
this._opts
261+
this._opts,
262+
this._providedCustomServicePath
254263
) as Promise<{[method: string]: Function}>;
255264

256265
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const version = require('../../../package.json').version;
6262
export class ProductSearchClient {
6363
private _terminated = false;
6464
private _opts: ClientOptions;
65+
private _providedCustomServicePath: boolean;
6566
private _gaxModule: typeof gax | typeof gax.fallback;
6667
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
6768
private _protos: {};
@@ -73,6 +74,7 @@ export class ProductSearchClient {
7374
longrunning: {},
7475
batching: {},
7576
};
77+
warn: (code: string, message: string, warnType?: string) => void;
7678
innerApiCalls: {[name: string]: Function};
7779
pathTemplates: {[name: string]: gax.PathTemplate};
7880
operationsClient: gax.OperationsClient;
@@ -117,6 +119,9 @@ export class ProductSearchClient {
117119
const staticMembers = this.constructor as typeof ProductSearchClient;
118120
const servicePath =
119121
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
122+
this._providedCustomServicePath = !!(
123+
opts?.servicePath || opts?.apiEndpoint
124+
);
120125
const port = opts?.port || staticMembers.port;
121126
const clientConfig = opts?.clientConfig ?? {};
122127
const fallback =
@@ -258,6 +263,9 @@ export class ProductSearchClient {
258263
// of calling the API is handled in `google-gax`, with this code
259264
// merely providing the destination and request information.
260265
this.innerApiCalls = {};
266+
267+
// Add a warn function to the client constructor so it can be easily tested.
268+
this.warn = gax.warn;
261269
}
262270

263271
/**
@@ -286,7 +294,8 @@ export class ProductSearchClient {
286294
)
287295
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
288296
(this._protos as any).google.cloud.vision.v1.ProductSearch,
289-
this._opts
297+
this._opts,
298+
this._providedCustomServicePath
290299
) as Promise<{[method: string]: Function}>;
291300

292301
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ const version = require('../../../package.json').version;
4141
export class ImageAnnotatorClient {
4242
private _terminated = false;
4343
private _opts: ClientOptions;
44+
private _providedCustomServicePath: boolean;
4445
private _gaxModule: typeof gax | typeof gax.fallback;
4546
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4647
private _protos: {};
@@ -52,6 +53,7 @@ export class ImageAnnotatorClient {
5253
longrunning: {},
5354
batching: {},
5455
};
56+
warn: (code: string, message: string, warnType?: string) => void;
5557
innerApiCalls: {[name: string]: Function};
5658
imageAnnotatorStub?: Promise<{[name: string]: Function}>;
5759

@@ -94,6 +96,9 @@ export class ImageAnnotatorClient {
9496
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
9597
const servicePath =
9698
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
99+
this._providedCustomServicePath = !!(
100+
opts?.servicePath || opts?.apiEndpoint
101+
);
97102
const port = opts?.port || staticMembers.port;
98103
const clientConfig = opts?.clientConfig ?? {};
99104
const fallback =
@@ -153,6 +158,9 @@ export class ImageAnnotatorClient {
153158
// of calling the API is handled in `google-gax`, with this code
154159
// merely providing the destination and request information.
155160
this.innerApiCalls = {};
161+
162+
// Add a warn function to the client constructor so it can be easily tested.
163+
this.warn = gax.warn;
156164
}
157165

158166
/**
@@ -181,7 +189,8 @@ export class ImageAnnotatorClient {
181189
)
182190
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
183191
(this._protos as any).google.cloud.vision.v1p1beta1.ImageAnnotator,
184-
this._opts
192+
this._opts,
193+
this._providedCustomServicePath
185194
) as Promise<{[method: string]: Function}>;
186195

187196
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
4747
export class ImageAnnotatorClient {
4848
private _terminated = false;
4949
private _opts: ClientOptions;
50+
private _providedCustomServicePath: boolean;
5051
private _gaxModule: typeof gax | typeof gax.fallback;
5152
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5253
private _protos: {};
@@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
operationsClient: gax.OperationsClient;
6365
imageAnnotatorStub?: Promise<{[name: string]: Function}>;
@@ -101,6 +103,9 @@ export class ImageAnnotatorClient {
101103
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
102104
const servicePath =
103105
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
106+
this._providedCustomServicePath = !!(
107+
opts?.servicePath || opts?.apiEndpoint
108+
);
104109
const port = opts?.port || staticMembers.port;
105110
const clientConfig = opts?.clientConfig ?? {};
106111
const fallback =
@@ -191,6 +196,9 @@ export class ImageAnnotatorClient {
191196
// of calling the API is handled in `google-gax`, with this code
192197
// merely providing the destination and request information.
193198
this.innerApiCalls = {};
199+
200+
// Add a warn function to the client constructor so it can be easily tested.
201+
this.warn = gax.warn;
194202
}
195203

196204
/**
@@ -219,7 +227,8 @@ export class ImageAnnotatorClient {
219227
)
220228
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
221229
(this._protos as any).google.cloud.vision.v1p2beta1.ImageAnnotator,
222-
this._opts
230+
this._opts,
231+
this._providedCustomServicePath
223232
) as Promise<{[method: string]: Function}>;
224233

225234
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
4747
export class ImageAnnotatorClient {
4848
private _terminated = false;
4949
private _opts: ClientOptions;
50+
private _providedCustomServicePath: boolean;
5051
private _gaxModule: typeof gax | typeof gax.fallback;
5152
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5253
private _protos: {};
@@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
pathTemplates: {[name: string]: gax.PathTemplate};
6365
operationsClient: gax.OperationsClient;
@@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
102104
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
103105
const servicePath =
104106
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
107+
this._providedCustomServicePath = !!(
108+
opts?.servicePath || opts?.apiEndpoint
109+
);
105110
const port = opts?.port || staticMembers.port;
106111
const clientConfig = opts?.clientConfig ?? {};
107112
const fallback =
@@ -207,6 +212,9 @@ export class ImageAnnotatorClient {
207212
// of calling the API is handled in `google-gax`, with this code
208213
// merely providing the destination and request information.
209214
this.innerApiCalls = {};
215+
216+
// Add a warn function to the client constructor so it can be easily tested.
217+
this.warn = gax.warn;
210218
}
211219

212220
/**
@@ -235,7 +243,8 @@ export class ImageAnnotatorClient {
235243
)
236244
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
237245
(this._protos as any).google.cloud.vision.v1p3beta1.ImageAnnotator,
238-
this._opts
246+
this._opts,
247+
this._providedCustomServicePath
239248
) as Promise<{[method: string]: Function}>;
240249

241250
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const version = require('../../../package.json').version;
6262
export class ProductSearchClient {
6363
private _terminated = false;
6464
private _opts: ClientOptions;
65+
private _providedCustomServicePath: boolean;
6566
private _gaxModule: typeof gax | typeof gax.fallback;
6667
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
6768
private _protos: {};
@@ -73,6 +74,7 @@ export class ProductSearchClient {
7374
longrunning: {},
7475
batching: {},
7576
};
77+
warn: (code: string, message: string, warnType?: string) => void;
7678
innerApiCalls: {[name: string]: Function};
7779
pathTemplates: {[name: string]: gax.PathTemplate};
7880
operationsClient: gax.OperationsClient;
@@ -117,6 +119,9 @@ export class ProductSearchClient {
117119
const staticMembers = this.constructor as typeof ProductSearchClient;
118120
const servicePath =
119121
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
122+
this._providedCustomServicePath = !!(
123+
opts?.servicePath || opts?.apiEndpoint
124+
);
120125
const port = opts?.port || staticMembers.port;
121126
const clientConfig = opts?.clientConfig ?? {};
122127
const fallback =
@@ -247,6 +252,9 @@ export class ProductSearchClient {
247252
// of calling the API is handled in `google-gax`, with this code
248253
// merely providing the destination and request information.
249254
this.innerApiCalls = {};
255+
256+
// Add a warn function to the client constructor so it can be easily tested.
257+
this.warn = gax.warn;
250258
}
251259

252260
/**
@@ -275,7 +283,8 @@ export class ProductSearchClient {
275283
)
276284
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
277285
(this._protos as any).google.cloud.vision.v1p3beta1.ProductSearch,
278-
this._opts
286+
this._opts,
287+
this._providedCustomServicePath
279288
) as Promise<{[method: string]: Function}>;
280289

281290
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
4747
export class ImageAnnotatorClient {
4848
private _terminated = false;
4949
private _opts: ClientOptions;
50+
private _providedCustomServicePath: boolean;
5051
private _gaxModule: typeof gax | typeof gax.fallback;
5152
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5253
private _protos: {};
@@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
pathTemplates: {[name: string]: gax.PathTemplate};
6365
operationsClient: gax.OperationsClient;
@@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
102104
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
103105
const servicePath =
104106
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
107+
this._providedCustomServicePath = !!(
108+
opts?.servicePath || opts?.apiEndpoint
109+
);
105110
const port = opts?.port || staticMembers.port;
106111
const clientConfig = opts?.clientConfig ?? {};
107112
const fallback =
@@ -222,6 +227,9 @@ export class ImageAnnotatorClient {
222227
// of calling the API is handled in `google-gax`, with this code
223228
// merely providing the destination and request information.
224229
this.innerApiCalls = {};
230+
231+
// Add a warn function to the client constructor so it can be easily tested.
232+
this.warn = gax.warn;
225233
}
226234

227235
/**
@@ -250,7 +258,8 @@ export class ImageAnnotatorClient {
250258
)
251259
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
252260
(this._protos as any).google.cloud.vision.v1p4beta1.ImageAnnotator,
253-
this._opts
261+
this._opts,
262+
this._providedCustomServicePath
254263
) as Promise<{[method: string]: Function}>;
255264

256265
// Iterate over each of the methods that the service provides

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const version = require('../../../package.json').version;
6666
export class ProductSearchClient {
6767
private _terminated = false;
6868
private _opts: ClientOptions;
69+
private _providedCustomServicePath: boolean;
6970
private _gaxModule: typeof gax | typeof gax.fallback;
7071
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
7172
private _protos: {};
@@ -77,6 +78,7 @@ export class ProductSearchClient {
7778
longrunning: {},
7879
batching: {},
7980
};
81+
warn: (code: string, message: string, warnType?: string) => void;
8082
innerApiCalls: {[name: string]: Function};
8183
pathTemplates: {[name: string]: gax.PathTemplate};
8284
operationsClient: gax.OperationsClient;
@@ -121,6 +123,9 @@ export class ProductSearchClient {
121123
const staticMembers = this.constructor as typeof ProductSearchClient;
122124
const servicePath =
123125
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
126+
this._providedCustomServicePath = !!(
127+
opts?.servicePath || opts?.apiEndpoint
128+
);
124129
const port = opts?.port || staticMembers.port;
125130
const clientConfig = opts?.clientConfig ?? {};
126131
const fallback =
@@ -262,6 +267,9 @@ export class ProductSearchClient {
262267
// of calling the API is handled in `google-gax`, with this code
263268
// merely providing the destination and request information.
264269
this.innerApiCalls = {};
270+
271+
// Add a warn function to the client constructor so it can be easily tested.
272+
this.warn = gax.warn;
265273
}
266274

267275
/**
@@ -290,7 +298,8 @@ export class ProductSearchClient {
290298
)
291299
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
292300
(this._protos as any).google.cloud.vision.v1p4beta1.ProductSearch,
293-
this._opts
301+
this._opts,
302+
this._providedCustomServicePath
294303
) as Promise<{[method: string]: Function}>;
295304

296305
// Iterate over each of the methods that the service provides

0 commit comments

Comments
 (0)