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

fix: Updating WORKSPACE files to use the newest version of the Typescript generator. #329

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/v1/container_analysis_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const version = require('../../../package.json').version;
export class ContainerAnalysisClient {
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 @@ -63,6 +64,7 @@ export class ContainerAnalysisClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
containerAnalysisStub?: Promise<{[name: string]: Function}>;
Expand Down Expand Up @@ -106,6 +108,9 @@ export class ContainerAnalysisClient {
const staticMembers = this.constructor as typeof ContainerAnalysisClient;
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 @@ -180,6 +185,9 @@ export class ContainerAnalysisClient {
// 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 @@ -209,7 +217,8 @@ export class ContainerAnalysisClient {
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.devtools.containeranalysis.v1
.ContainerAnalysis,
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/v1beta1/container_analysis_v1_beta1_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const version = require('../../../package.json').version;
export class ContainerAnalysisV1Beta1Client {
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 @@ -71,6 +72,7 @@ export class ContainerAnalysisV1Beta1Client {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
containerAnalysisV1Beta1Stub?: Promise<{[name: string]: Function}>;
Expand Down Expand Up @@ -115,6 +117,9 @@ export class ContainerAnalysisV1Beta1Client {
.constructor as typeof ContainerAnalysisV1Beta1Client;
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 @@ -197,6 +202,9 @@ export class ContainerAnalysisV1Beta1Client {
// 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 @@ -226,7 +234,8 @@ export class ContainerAnalysisV1Beta1Client {
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.devtools.containeranalysis.v1beta1
.ContainerAnalysisV1Beta1,
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/v1beta1/grafeas_v1_beta1_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const version = require('../../../package.json').version;
export class GrafeasV1Beta1Client {
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 @@ -72,6 +73,7 @@ export class GrafeasV1Beta1Client {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
grafeasV1Beta1Stub?: Promise<{[name: string]: Function}>;
Expand Down Expand Up @@ -115,6 +117,9 @@ export class GrafeasV1Beta1Client {
const staticMembers = this.constructor as typeof GrafeasV1Beta1Client;
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 @@ -204,6 +209,9 @@ export class GrafeasV1Beta1Client {
// 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 @@ -232,7 +240,8 @@ export class GrafeasV1Beta1Client {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).grafeas.v1beta1.GrafeasV1Beta1,
this._opts
this._opts,
this._providedCustomServicePath
) as Promise<{[method: string]: Function}>;

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