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

Commit 9f31d3f

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

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

src/v1/language_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const version = require('../../../package.json').version;
4040
export class LanguageServiceClient {
4141
private _terminated = false;
4242
private _opts: ClientOptions;
43+
private _providedCustomServicePath: boolean;
4344
private _gaxModule: typeof gax | typeof gax.fallback;
4445
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4546
private _protos: {};
@@ -51,6 +52,7 @@ export class LanguageServiceClient {
5152
longrunning: {},
5253
batching: {},
5354
};
55+
warn: (code: string, message: string, warnType?: string) => void;
5456
innerApiCalls: {[name: string]: Function};
5557
languageServiceStub?: Promise<{[name: string]: Function}>;
5658

@@ -93,6 +95,9 @@ export class LanguageServiceClient {
9395
const staticMembers = this.constructor as typeof LanguageServiceClient;
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 =
@@ -152,6 +157,9 @@ export class LanguageServiceClient {
152157
// of calling the API is handled in `google-gax`, with this code
153158
// merely providing the destination and request information.
154159
this.innerApiCalls = {};
160+
161+
// Add a warn function to the client constructor so it can be easily tested.
162+
this.warn = gax.warn;
155163
}
156164

157165
/**
@@ -180,7 +188,8 @@ export class LanguageServiceClient {
180188
)
181189
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
182190
(this._protos as any).google.cloud.language.v1.LanguageService,
183-
this._opts
191+
this._opts,
192+
this._providedCustomServicePath
184193
) as Promise<{[method: string]: Function}>;
185194

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

src/v1beta2/language_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const version = require('../../../package.json').version;
4040
export class LanguageServiceClient {
4141
private _terminated = false;
4242
private _opts: ClientOptions;
43+
private _providedCustomServicePath: boolean;
4344
private _gaxModule: typeof gax | typeof gax.fallback;
4445
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4546
private _protos: {};
@@ -51,6 +52,7 @@ export class LanguageServiceClient {
5152
longrunning: {},
5253
batching: {},
5354
};
55+
warn: (code: string, message: string, warnType?: string) => void;
5456
innerApiCalls: {[name: string]: Function};
5557
languageServiceStub?: Promise<{[name: string]: Function}>;
5658

@@ -93,6 +95,9 @@ export class LanguageServiceClient {
9395
const staticMembers = this.constructor as typeof LanguageServiceClient;
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 =
@@ -152,6 +157,9 @@ export class LanguageServiceClient {
152157
// of calling the API is handled in `google-gax`, with this code
153158
// merely providing the destination and request information.
154159
this.innerApiCalls = {};
160+
161+
// Add a warn function to the client constructor so it can be easily tested.
162+
this.warn = gax.warn;
155163
}
156164

157165
/**
@@ -180,7 +188,8 @@ export class LanguageServiceClient {
180188
)
181189
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
182190
(this._protos as any).google.cloud.language.v1beta2.LanguageService,
183-
this._opts
191+
this._opts,
192+
this._providedCustomServicePath
184193
) as Promise<{[method: string]: Function}>;
185194

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

0 commit comments

Comments
 (0)