Skip to content

Commit 9775b77

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#150)
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 988be7a commit 9775b77

28 files changed

+280
-28
lines changed

packages/google-cloud-dialogflow-cx/src/v3/agents_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class AgentsClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class AgentsClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class AgentsClient {
104106
const staticMembers = this.constructor as typeof AgentsClient;
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 =
@@ -280,6 +285,9 @@ export class AgentsClient {
280285
// of calling the API is handled in `google-gax`, with this code
281286
// merely providing the destination and request information.
282287
this.innerApiCalls = {};
288+
289+
// Add a warn function to the client constructor so it can be easily tested.
290+
this.warn = gax.warn;
283291
}
284292

285293
/**
@@ -308,7 +316,8 @@ export class AgentsClient {
308316
)
309317
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
310318
(this._protos as any).google.cloud.dialogflow.cx.v3.Agents,
311-
this._opts
319+
this._opts,
320+
this._providedCustomServicePath
312321
) as Promise<{[method: string]: Function}>;
313322

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

packages/google-cloud-dialogflow-cx/src/v3/entity_types_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 EntityTypesClient {
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 EntityTypesClient {
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
entityTypesStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class EntityTypesClient {
102104
const staticMembers = this.constructor as typeof EntityTypesClient;
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 =
@@ -240,6 +245,9 @@ export class EntityTypesClient {
240245
// of calling the API is handled in `google-gax`, with this code
241246
// merely providing the destination and request information.
242247
this.innerApiCalls = {};
248+
249+
// Add a warn function to the client constructor so it can be easily tested.
250+
this.warn = gax.warn;
243251
}
244252

245253
/**
@@ -268,7 +276,8 @@ export class EntityTypesClient {
268276
)
269277
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
270278
(this._protos as any).google.cloud.dialogflow.cx.v3.EntityTypes,
271-
this._opts
279+
this._opts,
280+
this._providedCustomServicePath
272281
) as Promise<{[method: string]: Function}>;
273282

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

packages/google-cloud-dialogflow-cx/src/v3/environments_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class EnvironmentsClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class EnvironmentsClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class EnvironmentsClient {
104106
const staticMembers = this.constructor as typeof EnvironmentsClient;
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 =
@@ -301,6 +306,9 @@ export class EnvironmentsClient {
301306
// of calling the API is handled in `google-gax`, with this code
302307
// merely providing the destination and request information.
303308
this.innerApiCalls = {};
309+
310+
// Add a warn function to the client constructor so it can be easily tested.
311+
this.warn = gax.warn;
304312
}
305313

306314
/**
@@ -329,7 +337,8 @@ export class EnvironmentsClient {
329337
)
330338
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
331339
(this._protos as any).google.cloud.dialogflow.cx.v3.Environments,
332-
this._opts
340+
this._opts,
341+
this._providedCustomServicePath
333342
) as Promise<{[method: string]: Function}>;
334343

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

packages/google-cloud-dialogflow-cx/src/v3/experiments_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 ExperimentsClient {
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 ExperimentsClient {
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
experimentsStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class ExperimentsClient {
102104
const staticMembers = this.constructor as typeof ExperimentsClient;
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 =
@@ -240,6 +245,9 @@ export class ExperimentsClient {
240245
// of calling the API is handled in `google-gax`, with this code
241246
// merely providing the destination and request information.
242247
this.innerApiCalls = {};
248+
249+
// Add a warn function to the client constructor so it can be easily tested.
250+
this.warn = gax.warn;
243251
}
244252

245253
/**
@@ -268,7 +276,8 @@ export class ExperimentsClient {
268276
)
269277
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
270278
(this._protos as any).google.cloud.dialogflow.cx.v3.Experiments,
271-
this._opts
279+
this._opts,
280+
this._providedCustomServicePath
272281
) as Promise<{[method: string]: Function}>;
273282

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

packages/google-cloud-dialogflow-cx/src/v3/flows_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class FlowsClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class FlowsClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class FlowsClient {
104106
const staticMembers = this.constructor as typeof FlowsClient;
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 =
@@ -291,6 +296,9 @@ export class FlowsClient {
291296
// of calling the API is handled in `google-gax`, with this code
292297
// merely providing the destination and request information.
293298
this.innerApiCalls = {};
299+
300+
// Add a warn function to the client constructor so it can be easily tested.
301+
this.warn = gax.warn;
294302
}
295303

296304
/**
@@ -319,7 +327,8 @@ export class FlowsClient {
319327
)
320328
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
321329
(this._protos as any).google.cloud.dialogflow.cx.v3.Flows,
322-
this._opts
330+
this._opts,
331+
this._providedCustomServicePath
323332
) as Promise<{[method: string]: Function}>;
324333

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

packages/google-cloud-dialogflow-cx/src/v3/intents_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 IntentsClient {
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 IntentsClient {
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
intentsStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class IntentsClient {
102104
const staticMembers = this.constructor as typeof IntentsClient;
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 =
@@ -240,6 +245,9 @@ export class IntentsClient {
240245
// of calling the API is handled in `google-gax`, with this code
241246
// merely providing the destination and request information.
242247
this.innerApiCalls = {};
248+
249+
// Add a warn function to the client constructor so it can be easily tested.
250+
this.warn = gax.warn;
243251
}
244252

245253
/**
@@ -268,7 +276,8 @@ export class IntentsClient {
268276
)
269277
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
270278
(this._protos as any).google.cloud.dialogflow.cx.v3.Intents,
271-
this._opts
279+
this._opts,
280+
this._providedCustomServicePath
272281
) as Promise<{[method: string]: Function}>;
273282

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

packages/google-cloud-dialogflow-cx/src/v3/pages_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 PagesClient {
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 PagesClient {
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
pagesStub?: Promise<{[name: string]: Function}>;
@@ -102,6 +104,9 @@ export class PagesClient {
102104
const staticMembers = this.constructor as typeof PagesClient;
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 =
@@ -240,6 +245,9 @@ export class PagesClient {
240245
// of calling the API is handled in `google-gax`, with this code
241246
// merely providing the destination and request information.
242247
this.innerApiCalls = {};
248+
249+
// Add a warn function to the client constructor so it can be easily tested.
250+
this.warn = gax.warn;
243251
}
244252

245253
/**
@@ -268,7 +276,8 @@ export class PagesClient {
268276
)
269277
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
270278
(this._protos as any).google.cloud.dialogflow.cx.v3.Pages,
271-
this._opts
279+
this._opts,
280+
this._providedCustomServicePath
272281
) as Promise<{[method: string]: Function}>;
273282

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

packages/google-cloud-dialogflow-cx/src/v3/security_settings_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 SecuritySettingsServiceClient {
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 SecuritySettingsServiceClient {
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
securitySettingsServiceStub?: Promise<{[name: string]: Function}>;
@@ -103,6 +105,9 @@ export class SecuritySettingsServiceClient {
103105
.constructor as typeof SecuritySettingsServiceClient;
104106
const servicePath =
105107
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
108+
this._providedCustomServicePath = !!(
109+
opts?.servicePath || opts?.apiEndpoint
110+
);
106111
const port = opts?.port || staticMembers.port;
107112
const clientConfig = opts?.clientConfig ?? {};
108113
const fallback =
@@ -241,6 +246,9 @@ export class SecuritySettingsServiceClient {
241246
// of calling the API is handled in `google-gax`, with this code
242247
// merely providing the destination and request information.
243248
this.innerApiCalls = {};
249+
250+
// Add a warn function to the client constructor so it can be easily tested.
251+
this.warn = gax.warn;
244252
}
245253

246254
/**
@@ -270,7 +278,8 @@ export class SecuritySettingsServiceClient {
270278
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
271279
(this._protos as any).google.cloud.dialogflow.cx.v3
272280
.SecuritySettingsService,
273-
this._opts
281+
this._opts,
282+
this._providedCustomServicePath
274283
) as Promise<{[method: string]: Function}>;
275284

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

0 commit comments

Comments
 (0)