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

Commit b7b0b92

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#89)
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 fc8a0e9 commit b7b0b92

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/v1/reservation_service_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 ReservationServiceClient {
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 ReservationServiceClient {
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
reservationServiceStub?: Promise<{[name: string]: Function}>;
@@ -116,6 +118,9 @@ export class ReservationServiceClient {
116118
const staticMembers = this.constructor as typeof ReservationServiceClient;
117119
const servicePath =
118120
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
121+
this._providedCustomServicePath = !!(
122+
opts?.servicePath || opts?.apiEndpoint
123+
);
119124
const port = opts?.port || staticMembers.port;
120125
const clientConfig = opts?.clientConfig ?? {};
121126
const fallback =
@@ -225,6 +230,9 @@ export class ReservationServiceClient {
225230
// of calling the API is handled in `google-gax`, with this code
226231
// merely providing the destination and request information.
227232
this.innerApiCalls = {};
233+
234+
// Add a warn function to the client constructor so it can be easily tested.
235+
this.warn = gax.warn;
228236
}
229237

230238
/**
@@ -254,7 +262,8 @@ export class ReservationServiceClient {
254262
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
255263
(this._protos as any).google.cloud.bigquery.reservation.v1
256264
.ReservationService,
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)