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

Commit 2518d10

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#136)
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 9a9ebd3 commit 2518d10

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/v1alpha/analytics_admin_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 AnalyticsAdminServiceClient {
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 AnalyticsAdminServiceClient {
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
analyticsAdminServiceStub?: Promise<{[name: string]: Function}>;
@@ -103,6 +105,9 @@ export class AnalyticsAdminServiceClient {
103105
.constructor as typeof AnalyticsAdminServiceClient;
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 =
@@ -303,6 +308,9 @@ export class AnalyticsAdminServiceClient {
303308
// of calling the API is handled in `google-gax`, with this code
304309
// merely providing the destination and request information.
305310
this.innerApiCalls = {};
311+
312+
// Add a warn function to the client constructor so it can be easily tested.
313+
this.warn = gax.warn;
306314
}
307315

308316
/**
@@ -332,7 +340,8 @@ export class AnalyticsAdminServiceClient {
332340
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
333341
(this._protos as any).google.analytics.admin.v1alpha
334342
.AnalyticsAdminService,
335-
this._opts
343+
this._opts,
344+
this._providedCustomServicePath
336345
) as Promise<{[method: string]: Function}>;
337346

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

0 commit comments

Comments
 (0)