Skip to content

Commit eea617d

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#466)
* fix: Updating WORKSPACE files to use the newest version of the Typescript generator. 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 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent abbe864 commit eea617d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

packages/google-cloud-oslogin/src/v1/os_login_service_client.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const version = require('../../../package.json').version;
4242
export class OsLoginServiceClient {
4343
private _terminated = false;
4444
private _opts: ClientOptions;
45+
private _providedCustomServicePath: boolean;
4546
private _gaxModule: typeof gax | typeof gax.fallback;
4647
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4748
private _protos: {};
@@ -53,6 +54,7 @@ export class OsLoginServiceClient {
5354
longrunning: {},
5455
batching: {},
5556
};
57+
warn: (code: string, message: string, warnType?: string) => void;
5658
innerApiCalls: {[name: string]: Function};
5759
pathTemplates: {[name: string]: gax.PathTemplate};
5860
osLoginServiceStub?: Promise<{[name: string]: Function}>;
@@ -96,6 +98,9 @@ export class OsLoginServiceClient {
9698
const staticMembers = this.constructor as typeof OsLoginServiceClient;
9799
const servicePath =
98100
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
101+
this._providedCustomServicePath = !!(
102+
opts?.servicePath || opts?.apiEndpoint
103+
);
99104
const port = opts?.port || staticMembers.port;
100105
const clientConfig = opts?.clientConfig ?? {};
101106
const fallback =
@@ -168,6 +173,9 @@ export class OsLoginServiceClient {
168173
// of calling the API is handled in `google-gax`, with this code
169174
// merely providing the destination and request information.
170175
this.innerApiCalls = {};
176+
177+
// Add a warn function to the client constructor so it can be easily tested.
178+
this.warn = gax.warn;
171179
}
172180

173181
/**
@@ -196,7 +204,8 @@ export class OsLoginServiceClient {
196204
)
197205
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
198206
(this._protos as any).google.cloud.oslogin.v1.OsLoginService,
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

packages/google-cloud-oslogin/src/v1beta/os_login_service_client.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const version = require('../../../package.json').version;
4242
export class OsLoginServiceClient {
4343
private _terminated = false;
4444
private _opts: ClientOptions;
45+
private _providedCustomServicePath: boolean;
4546
private _gaxModule: typeof gax | typeof gax.fallback;
4647
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
4748
private _protos: {};
@@ -53,6 +54,7 @@ export class OsLoginServiceClient {
5354
longrunning: {},
5455
batching: {},
5556
};
57+
warn: (code: string, message: string, warnType?: string) => void;
5658
innerApiCalls: {[name: string]: Function};
5759
pathTemplates: {[name: string]: gax.PathTemplate};
5860
osLoginServiceStub?: Promise<{[name: string]: Function}>;
@@ -96,6 +98,9 @@ export class OsLoginServiceClient {
9698
const staticMembers = this.constructor as typeof OsLoginServiceClient;
9799
const servicePath =
98100
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
101+
this._providedCustomServicePath = !!(
102+
opts?.servicePath || opts?.apiEndpoint
103+
);
99104
const port = opts?.port || staticMembers.port;
100105
const clientConfig = opts?.clientConfig ?? {};
101106
const fallback =
@@ -168,6 +173,9 @@ export class OsLoginServiceClient {
168173
// of calling the API is handled in `google-gax`, with this code
169174
// merely providing the destination and request information.
170175
this.innerApiCalls = {};
176+
177+
// Add a warn function to the client constructor so it can be easily tested.
178+
this.warn = gax.warn;
171179
}
172180

173181
/**
@@ -196,7 +204,8 @@ export class OsLoginServiceClient {
196204
)
197205
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
198206
(this._protos as any).google.cloud.oslogin.v1beta.OsLoginService,
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

0 commit comments

Comments
 (0)