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

Commit 15b75a9

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#74)
* 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: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 * 🦉 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 35e03ca commit 15b75a9

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/v1beta1/binauthz_management_service_v1_beta1_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const version = require('../../../package.json').version;
5454
export class BinauthzManagementServiceV1Beta1Client {
5555
private _terminated = false;
5656
private _opts: ClientOptions;
57+
private _providedCustomServicePath: boolean;
5758
private _gaxModule: typeof gax | typeof gax.fallback;
5859
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5960
private _protos: {};
@@ -65,6 +66,7 @@ export class BinauthzManagementServiceV1Beta1Client {
6566
longrunning: {},
6667
batching: {},
6768
};
69+
warn: (code: string, message: string, warnType?: string) => void;
6870
innerApiCalls: {[name: string]: Function};
6971
pathTemplates: {[name: string]: gax.PathTemplate};
7072
binauthzManagementServiceV1Beta1Stub?: Promise<{[name: string]: Function}>;
@@ -109,6 +111,9 @@ export class BinauthzManagementServiceV1Beta1Client {
109111
.constructor as typeof BinauthzManagementServiceV1Beta1Client;
110112
const servicePath =
111113
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
114+
this._providedCustomServicePath = !!(
115+
opts?.servicePath || opts?.apiEndpoint
116+
);
112117
const port = opts?.port || staticMembers.port;
113118
const clientConfig = opts?.clientConfig ?? {};
114119
const fallback =
@@ -194,6 +199,9 @@ export class BinauthzManagementServiceV1Beta1Client {
194199
// of calling the API is handled in `google-gax`, with this code
195200
// merely providing the destination and request information.
196201
this.innerApiCalls = {};
202+
203+
// Add a warn function to the client constructor so it can be easily tested.
204+
this.warn = gax.warn;
197205
}
198206

199207
/**
@@ -223,7 +231,8 @@ export class BinauthzManagementServiceV1Beta1Client {
223231
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
224232
(this._protos as any).google.cloud.binaryauthorization.v1beta1
225233
.BinauthzManagementServiceV1Beta1,
226-
this._opts
234+
this._opts,
235+
this._providedCustomServicePath
227236
) as Promise<{[method: string]: Function}>;
228237

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

0 commit comments

Comments
 (0)