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

Commit

Permalink
fix: Updating WORKSPACE files to use the newest version of the Typesc…
Browse files Browse the repository at this point in the history
…ript 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
  • Loading branch information
gcf-owl-bot[bot] authored Jul 16, 2021
1 parent ccd01ba commit 9f31d3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/v1/language_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const version = require('../../../package.json').version;
export class LanguageServiceClient {
private _terminated = false;
private _opts: ClientOptions;
private _providedCustomServicePath: boolean;
private _gaxModule: typeof gax | typeof gax.fallback;
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
private _protos: {};
Expand All @@ -51,6 +52,7 @@ export class LanguageServiceClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
languageServiceStub?: Promise<{[name: string]: Function}>;

Expand Down Expand Up @@ -93,6 +95,9 @@ export class LanguageServiceClient {
const staticMembers = this.constructor as typeof LanguageServiceClient;
const servicePath =
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
this._providedCustomServicePath = !!(
opts?.servicePath || opts?.apiEndpoint
);
const port = opts?.port || staticMembers.port;
const clientConfig = opts?.clientConfig ?? {};
const fallback =
Expand Down Expand Up @@ -152,6 +157,9 @@ export class LanguageServiceClient {
// of calling the API is handled in `google-gax`, with this code
// merely providing the destination and request information.
this.innerApiCalls = {};

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
}

/**
Expand Down Expand Up @@ -180,7 +188,8 @@ export class LanguageServiceClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.language.v1.LanguageService,
this._opts
this._opts,
this._providedCustomServicePath
) as Promise<{[method: string]: Function}>;

// Iterate over each of the methods that the service provides
Expand Down
11 changes: 10 additions & 1 deletion src/v1beta2/language_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const version = require('../../../package.json').version;
export class LanguageServiceClient {
private _terminated = false;
private _opts: ClientOptions;
private _providedCustomServicePath: boolean;
private _gaxModule: typeof gax | typeof gax.fallback;
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
private _protos: {};
Expand All @@ -51,6 +52,7 @@ export class LanguageServiceClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
languageServiceStub?: Promise<{[name: string]: Function}>;

Expand Down Expand Up @@ -93,6 +95,9 @@ export class LanguageServiceClient {
const staticMembers = this.constructor as typeof LanguageServiceClient;
const servicePath =
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
this._providedCustomServicePath = !!(
opts?.servicePath || opts?.apiEndpoint
);
const port = opts?.port || staticMembers.port;
const clientConfig = opts?.clientConfig ?? {};
const fallback =
Expand Down Expand Up @@ -152,6 +157,9 @@ export class LanguageServiceClient {
// of calling the API is handled in `google-gax`, with this code
// merely providing the destination and request information.
this.innerApiCalls = {};

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
}

/**
Expand Down Expand Up @@ -180,7 +188,8 @@ export class LanguageServiceClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.language.v1beta2.LanguageService,
this._opts
this._opts,
this._providedCustomServicePath
) as Promise<{[method: string]: Function}>;

// Iterate over each of the methods that the service provides
Expand Down

0 comments on commit 9f31d3f

Please sign in to comment.