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

Commit 06bf319

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#245)
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: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1
1 parent a9e4efd commit 06bf319

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

src/v1/document_processor_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const version = require('../../../package.json').version;
4848
export class DocumentProcessorServiceClient {
4949
private _terminated = false;
5050
private _opts: ClientOptions;
51+
private _providedCustomServicePath: boolean;
5152
private _gaxModule: typeof gax | typeof gax.fallback;
5253
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5354
private _protos: {};
@@ -59,6 +60,7 @@ export class DocumentProcessorServiceClient {
5960
longrunning: {},
6061
batching: {},
6162
};
63+
warn: (code: string, message: string, warnType?: string) => void;
6264
innerApiCalls: {[name: string]: Function};
6365
pathTemplates: {[name: string]: gax.PathTemplate};
6466
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class DocumentProcessorServiceClient {
104106
.constructor as typeof DocumentProcessorServiceClient;
105107
const servicePath =
106108
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
109+
this._providedCustomServicePath = !!(
110+
opts?.servicePath || opts?.apiEndpoint
111+
);
107112
const port = opts?.port || staticMembers.port;
108113
const clientConfig = opts?.clientConfig ?? {};
109114
const fallback =
@@ -210,6 +215,9 @@ export class DocumentProcessorServiceClient {
210215
// of calling the API is handled in `google-gax`, with this code
211216
// merely providing the destination and request information.
212217
this.innerApiCalls = {};
218+
219+
// Add a warn function to the client constructor so it can be easily tested.
220+
this.warn = gax.warn;
213221
}
214222

215223
/**
@@ -239,7 +247,8 @@ export class DocumentProcessorServiceClient {
239247
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
240248
(this._protos as any).google.cloud.documentai.v1
241249
.DocumentProcessorService,
242-
this._opts
250+
this._opts,
251+
this._providedCustomServicePath
243252
) as Promise<{[method: string]: Function}>;
244253

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

src/v1beta1/document_understanding_service_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 DocumentUnderstandingServiceClient {
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 DocumentUnderstandingServiceClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
operationsClient: gax.OperationsClient;
6365
documentUnderstandingServiceStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class DocumentUnderstandingServiceClient {
102104
.constructor as typeof DocumentUnderstandingServiceClient;
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 =
@@ -185,6 +190,9 @@ export class DocumentUnderstandingServiceClient {
185190
// of calling the API is handled in `google-gax`, with this code
186191
// merely providing the destination and request information.
187192
this.innerApiCalls = {};
193+
194+
// Add a warn function to the client constructor so it can be easily tested.
195+
this.warn = gax.warn;
188196
}
189197

190198
/**
@@ -214,7 +222,8 @@ export class DocumentUnderstandingServiceClient {
214222
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
215223
(this._protos as any).google.cloud.documentai.v1beta1
216224
.DocumentUnderstandingService,
217-
this._opts
225+
this._opts,
226+
this._providedCustomServicePath
218227
) as Promise<{[method: string]: Function}>;
219228

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

src/v1beta2/document_understanding_service_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 DocumentUnderstandingServiceClient {
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 DocumentUnderstandingServiceClient {
5859
longrunning: {},
5960
batching: {},
6061
};
62+
warn: (code: string, message: string, warnType?: string) => void;
6163
innerApiCalls: {[name: string]: Function};
6264
operationsClient: gax.OperationsClient;
6365
documentUnderstandingServiceStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class DocumentUnderstandingServiceClient {
102104
.constructor as typeof DocumentUnderstandingServiceClient;
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 =
@@ -185,6 +190,9 @@ export class DocumentUnderstandingServiceClient {
185190
// of calling the API is handled in `google-gax`, with this code
186191
// merely providing the destination and request information.
187192
this.innerApiCalls = {};
193+
194+
// Add a warn function to the client constructor so it can be easily tested.
195+
this.warn = gax.warn;
188196
}
189197

190198
/**
@@ -214,7 +222,8 @@ export class DocumentUnderstandingServiceClient {
214222
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
215223
(this._protos as any).google.cloud.documentai.v1beta2
216224
.DocumentUnderstandingService,
217-
this._opts
225+
this._opts,
226+
this._providedCustomServicePath
218227
) as Promise<{[method: string]: Function}>;
219228

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

src/v1beta3/document_processor_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const version = require('../../../package.json').version;
5252
export class DocumentProcessorServiceClient {
5353
private _terminated = false;
5454
private _opts: ClientOptions;
55+
private _providedCustomServicePath: boolean;
5556
private _gaxModule: typeof gax | typeof gax.fallback;
5657
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5758
private _protos: {};
@@ -63,6 +64,7 @@ export class DocumentProcessorServiceClient {
6364
longrunning: {},
6465
batching: {},
6566
};
67+
warn: (code: string, message: string, warnType?: string) => void;
6668
innerApiCalls: {[name: string]: Function};
6769
pathTemplates: {[name: string]: gax.PathTemplate};
6870
operationsClient: gax.OperationsClient;
@@ -108,6 +110,9 @@ export class DocumentProcessorServiceClient {
108110
.constructor as typeof DocumentProcessorServiceClient;
109111
const servicePath =
110112
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
113+
this._providedCustomServicePath = !!(
114+
opts?.servicePath || opts?.apiEndpoint
115+
);
111116
const port = opts?.port || staticMembers.port;
112117
const clientConfig = opts?.clientConfig ?? {};
113118
const fallback =
@@ -267,6 +272,9 @@ export class DocumentProcessorServiceClient {
267272
// of calling the API is handled in `google-gax`, with this code
268273
// merely providing the destination and request information.
269274
this.innerApiCalls = {};
275+
276+
// Add a warn function to the client constructor so it can be easily tested.
277+
this.warn = gax.warn;
270278
}
271279

272280
/**
@@ -296,7 +304,8 @@ export class DocumentProcessorServiceClient {
296304
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
297305
(this._protos as any).google.cloud.documentai.v1beta3
298306
.DocumentProcessorService,
299-
this._opts
307+
this._opts,
308+
this._providedCustomServicePath
300309
) as Promise<{[method: string]: Function}>;
301310

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

0 commit comments

Comments
 (0)