Skip to content

Commit 979db7e

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#21)
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 404089a commit 979db7e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

packages/google-cloud-vpc-access/src/v1/vpc_access_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const version = require('../../../package.json').version;
5151
export class VpcAccessServiceClient {
5252
private _terminated = false;
5353
private _opts: ClientOptions;
54+
private _providedCustomServicePath: boolean;
5455
private _gaxModule: typeof gax | typeof gax.fallback;
5556
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5657
private _protos: {};
@@ -62,6 +63,7 @@ export class VpcAccessServiceClient {
6263
longrunning: {},
6364
batching: {},
6465
};
66+
warn: (code: string, message: string, warnType?: string) => void;
6567
innerApiCalls: {[name: string]: Function};
6668
pathTemplates: {[name: string]: gax.PathTemplate};
6769
operationsClient: gax.OperationsClient;
@@ -106,6 +108,9 @@ export class VpcAccessServiceClient {
106108
const staticMembers = this.constructor as typeof VpcAccessServiceClient;
107109
const servicePath =
108110
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
111+
this._providedCustomServicePath = !!(
112+
opts?.servicePath || opts?.apiEndpoint
113+
);
109114
const port = opts?.port || staticMembers.port;
110115
const clientConfig = opts?.clientConfig ?? {};
111116
const fallback =
@@ -226,6 +231,9 @@ export class VpcAccessServiceClient {
226231
// of calling the API is handled in `google-gax`, with this code
227232
// merely providing the destination and request information.
228233
this.innerApiCalls = {};
234+
235+
// Add a warn function to the client constructor so it can be easily tested.
236+
this.warn = gax.warn;
229237
}
230238

231239
/**
@@ -254,7 +262,8 @@ export class VpcAccessServiceClient {
254262
)
255263
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
256264
(this._protos as any).google.cloud.vpcaccess.v1.VpcAccessService,
257-
this._opts
265+
this._opts,
266+
this._providedCustomServicePath
258267
) as Promise<{[method: string]: Function}>;
259268

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

0 commit comments

Comments
 (0)