Skip to content

Commit 68649bb

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#405)
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
1 parent f0697ac commit 68649bb

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

packages/google-cloud-securitycenter/src/v1/security_center_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class SecurityCenterClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class SecurityCenterClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class SecurityCenterClient {
104106
const staticMembers = this.constructor as typeof SecurityCenterClient;
105107
const servicePath =
106108
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
109+
this._providedCustomServicePath = !!(
110+
opts?.servicePath || opts?.apiEndpoint
111+
);
107112
const port = opts?.port || staticMembers.port;
108113
const clientConfig = opts?.clientConfig ?? {};
109114
const fallback =
@@ -290,6 +295,9 @@ export class SecurityCenterClient {
290295
// of calling the API is handled in `google-gax`, with this code
291296
// merely providing the destination and request information.
292297
this.innerApiCalls = {};
298+
299+
// Add a warn function to the client constructor so it can be easily tested.
300+
this.warn = gax.warn;
293301
}
294302

295303
/**
@@ -318,7 +326,8 @@ export class SecurityCenterClient {
318326
)
319327
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
320328
(this._protos as any).google.cloud.securitycenter.v1.SecurityCenter,
321-
this._opts
329+
this._opts,
330+
this._providedCustomServicePath
322331
) as Promise<{[method: string]: Function}>;
323332

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

packages/google-cloud-securitycenter/src/v1beta1/security_center_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class SecurityCenterClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class SecurityCenterClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class SecurityCenterClient {
104106
const staticMembers = this.constructor as typeof SecurityCenterClient;
105107
const servicePath =
106108
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
109+
this._providedCustomServicePath = !!(
110+
opts?.servicePath || opts?.apiEndpoint
111+
);
107112
const port = opts?.port || staticMembers.port;
108113
const clientConfig = opts?.clientConfig ?? {};
109114
const fallback =
@@ -250,6 +255,9 @@ export class SecurityCenterClient {
250255
// of calling the API is handled in `google-gax`, with this code
251256
// merely providing the destination and request information.
252257
this.innerApiCalls = {};
258+
259+
// Add a warn function to the client constructor so it can be easily tested.
260+
this.warn = gax.warn;
253261
}
254262

255263
/**
@@ -279,7 +287,8 @@ export class SecurityCenterClient {
279287
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
280288
(this._protos as any).google.cloud.securitycenter.v1beta1
281289
.SecurityCenter,
282-
this._opts
290+
this._opts,
291+
this._providedCustomServicePath
283292
) as Promise<{[method: string]: Function}>;
284293

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

packages/google-cloud-securitycenter/src/v1p1beta1/security_center_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const version = require('../../../package.json').version;
4949
export class SecurityCenterClient {
5050
private _terminated = false;
5151
private _opts: ClientOptions;
52+
private _providedCustomServicePath: boolean;
5253
private _gaxModule: typeof gax | typeof gax.fallback;
5354
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5455
private _protos: {};
@@ -60,6 +61,7 @@ export class SecurityCenterClient {
6061
longrunning: {},
6162
batching: {},
6263
};
64+
warn: (code: string, message: string, warnType?: string) => void;
6365
innerApiCalls: {[name: string]: Function};
6466
pathTemplates: {[name: string]: gax.PathTemplate};
6567
operationsClient: gax.OperationsClient;
@@ -104,6 +106,9 @@ export class SecurityCenterClient {
104106
const staticMembers = this.constructor as typeof SecurityCenterClient;
105107
const servicePath =
106108
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
109+
this._providedCustomServicePath = !!(
110+
opts?.servicePath || opts?.apiEndpoint
111+
);
107112
const port = opts?.port || staticMembers.port;
108113
const clientConfig = opts?.clientConfig ?? {};
109114
const fallback =
@@ -290,6 +295,9 @@ export class SecurityCenterClient {
290295
// of calling the API is handled in `google-gax`, with this code
291296
// merely providing the destination and request information.
292297
this.innerApiCalls = {};
298+
299+
// Add a warn function to the client constructor so it can be easily tested.
300+
this.warn = gax.warn;
293301
}
294302

295303
/**
@@ -319,7 +327,8 @@ export class SecurityCenterClient {
319327
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
320328
(this._protos as any).google.cloud.securitycenter.v1p1beta1
321329
.SecurityCenter,
322-
this._opts
330+
this._opts,
331+
this._providedCustomServicePath
323332
) as Promise<{[method: string]: Function}>;
324333

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

0 commit comments

Comments
 (0)