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

Commit 717c929

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#164)
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 8b4c8a0 commit 717c929

4 files changed

Lines changed: 40 additions & 4 deletions

File tree

src/v1/lookup_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const version = require('../../../package.json').version;
3939
export class LookupServiceClient {
4040
private _terminated = false;
4141
private _opts: ClientOptions;
42+
private _providedCustomServicePath: boolean;
4243
private _gaxModule: typeof gax | typeof gax.fallback;
4344
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4445
private _protos: {};
@@ -50,6 +51,7 @@ export class LookupServiceClient {
5051
longrunning: {},
5152
batching: {},
5253
};
54+
warn: (code: string, message: string, warnType?: string) => void;
5355
innerApiCalls: {[name: string]: Function};
5456
pathTemplates: {[name: string]: gax.PathTemplate};
5557
lookupServiceStub?: Promise<{[name: string]: Function}>;
@@ -93,6 +95,9 @@ export class LookupServiceClient {
9395
const staticMembers = this.constructor as typeof LookupServiceClient;
9496
const servicePath =
9597
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
98+
this._providedCustomServicePath = !!(
99+
opts?.servicePath || opts?.apiEndpoint
100+
);
96101
const port = opts?.port || staticMembers.port;
97102
const clientConfig = opts?.clientConfig ?? {};
98103
const fallback =
@@ -167,6 +172,9 @@ export class LookupServiceClient {
167172
// of calling the API is handled in `google-gax`, with this code
168173
// merely providing the destination and request information.
169174
this.innerApiCalls = {};
175+
176+
// Add a warn function to the client constructor so it can be easily tested.
177+
this.warn = gax.warn;
170178
}
171179

172180
/**
@@ -195,7 +203,8 @@ export class LookupServiceClient {
195203
)
196204
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
197205
(this._protos as any).google.cloud.servicedirectory.v1.LookupService,
198-
this._opts
206+
this._opts,
207+
this._providedCustomServicePath
199208
) as Promise<{[method: string]: Function}>;
200209

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

src/v1/registration_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 RegistrationServiceClient {
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 RegistrationServiceClient {
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
registrationServiceStub?: Promise<{[name: string]: Function}>;
@@ -116,6 +118,9 @@ export class RegistrationServiceClient {
116118
const staticMembers = this.constructor as typeof RegistrationServiceClient;
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 =
@@ -214,6 +219,9 @@ export class RegistrationServiceClient {
214219
// of calling the API is handled in `google-gax`, with this code
215220
// merely providing the destination and request information.
216221
this.innerApiCalls = {};
222+
223+
// Add a warn function to the client constructor so it can be easily tested.
224+
this.warn = gax.warn;
217225
}
218226

219227
/**
@@ -243,7 +251,8 @@ export class RegistrationServiceClient {
243251
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
244252
(this._protos as any).google.cloud.servicedirectory.v1
245253
.RegistrationService,
246-
this._opts
254+
this._opts,
255+
this._providedCustomServicePath
247256
) as Promise<{[method: string]: Function}>;
248257

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

src/v1beta1/lookup_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const version = require('../../../package.json').version;
3939
export class LookupServiceClient {
4040
private _terminated = false;
4141
private _opts: ClientOptions;
42+
private _providedCustomServicePath: boolean;
4243
private _gaxModule: typeof gax | typeof gax.fallback;
4344
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4445
private _protos: {};
@@ -50,6 +51,7 @@ export class LookupServiceClient {
5051
longrunning: {},
5152
batching: {},
5253
};
54+
warn: (code: string, message: string, warnType?: string) => void;
5355
innerApiCalls: {[name: string]: Function};
5456
pathTemplates: {[name: string]: gax.PathTemplate};
5557
lookupServiceStub?: Promise<{[name: string]: Function}>;
@@ -93,6 +95,9 @@ export class LookupServiceClient {
9395
const staticMembers = this.constructor as typeof LookupServiceClient;
9496
const servicePath =
9597
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
98+
this._providedCustomServicePath = !!(
99+
opts?.servicePath || opts?.apiEndpoint
100+
);
96101
const port = opts?.port || staticMembers.port;
97102
const clientConfig = opts?.clientConfig ?? {};
98103
const fallback =
@@ -167,6 +172,9 @@ export class LookupServiceClient {
167172
// of calling the API is handled in `google-gax`, with this code
168173
// merely providing the destination and request information.
169174
this.innerApiCalls = {};
175+
176+
// Add a warn function to the client constructor so it can be easily tested.
177+
this.warn = gax.warn;
170178
}
171179

172180
/**
@@ -196,7 +204,8 @@ export class LookupServiceClient {
196204
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
197205
(this._protos as any).google.cloud.servicedirectory.v1beta1
198206
.LookupService,
199-
this._opts
207+
this._opts,
208+
this._providedCustomServicePath
200209
) as Promise<{[method: string]: Function}>;
201210

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

src/v1beta1/registration_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 RegistrationServiceClient {
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 RegistrationServiceClient {
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
registrationServiceStub?: Promise<{[name: string]: Function}>;
@@ -116,6 +118,9 @@ export class RegistrationServiceClient {
116118
const staticMembers = this.constructor as typeof RegistrationServiceClient;
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 =
@@ -214,6 +219,9 @@ export class RegistrationServiceClient {
214219
// of calling the API is handled in `google-gax`, with this code
215220
// merely providing the destination and request information.
216221
this.innerApiCalls = {};
222+
223+
// Add a warn function to the client constructor so it can be easily tested.
224+
this.warn = gax.warn;
217225
}
218226

219227
/**
@@ -243,7 +251,8 @@ export class RegistrationServiceClient {
243251
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
244252
(this._protos as any).google.cloud.servicedirectory.v1beta1
245253
.RegistrationService,
246-
this._opts
254+
this._opts,
255+
this._providedCustomServicePath
247256
) as Promise<{[method: string]: Function}>;
248257

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

0 commit comments

Comments
 (0)