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

Commit 00b82af

Browse files
fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#87)
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 578abcb commit 00b82af

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/v1/transcoder_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const version = require('../../../package.json').version;
5353
export class TranscoderServiceClient {
5454
private _terminated = false;
5555
private _opts: ClientOptions;
56+
private _providedCustomServicePath: boolean;
5657
private _gaxModule: typeof gax | typeof gax.fallback;
5758
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5859
private _protos: {};
@@ -64,6 +65,7 @@ export class TranscoderServiceClient {
6465
longrunning: {},
6566
batching: {},
6667
};
68+
warn: (code: string, message: string, warnType?: string) => void;
6769
innerApiCalls: {[name: string]: Function};
6870
pathTemplates: {[name: string]: gax.PathTemplate};
6971
transcoderServiceStub?: Promise<{[name: string]: Function}>;
@@ -107,6 +109,9 @@ export class TranscoderServiceClient {
107109
const staticMembers = this.constructor as typeof TranscoderServiceClient;
108110
const servicePath =
109111
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
112+
this._providedCustomServicePath = !!(
113+
opts?.servicePath || opts?.apiEndpoint
114+
);
110115
const port = opts?.port || staticMembers.port;
111116
const clientConfig = opts?.clientConfig ?? {};
112117
const fallback =
@@ -197,6 +202,9 @@ export class TranscoderServiceClient {
197202
// of calling the API is handled in `google-gax`, with this code
198203
// merely providing the destination and request information.
199204
this.innerApiCalls = {};
205+
206+
// Add a warn function to the client constructor so it can be easily tested.
207+
this.warn = gax.warn;
200208
}
201209

202210
/**
@@ -226,7 +234,8 @@ export class TranscoderServiceClient {
226234
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
227235
(this._protos as any).google.cloud.video.transcoder.v1
228236
.TranscoderService,
229-
this._opts
237+
this._opts,
238+
this._providedCustomServicePath
230239
) as Promise<{[method: string]: Function}>;
231240

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

src/v1beta1/transcoder_service_client.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const version = require('../../../package.json').version;
5353
export class TranscoderServiceClient {
5454
private _terminated = false;
5555
private _opts: ClientOptions;
56+
private _providedCustomServicePath: boolean;
5657
private _gaxModule: typeof gax | typeof gax.fallback;
5758
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
5859
private _protos: {};
@@ -64,6 +65,7 @@ export class TranscoderServiceClient {
6465
longrunning: {},
6566
batching: {},
6667
};
68+
warn: (code: string, message: string, warnType?: string) => void;
6769
innerApiCalls: {[name: string]: Function};
6870
pathTemplates: {[name: string]: gax.PathTemplate};
6971
transcoderServiceStub?: Promise<{[name: string]: Function}>;
@@ -107,6 +109,9 @@ export class TranscoderServiceClient {
107109
const staticMembers = this.constructor as typeof TranscoderServiceClient;
108110
const servicePath =
109111
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
112+
this._providedCustomServicePath = !!(
113+
opts?.servicePath || opts?.apiEndpoint
114+
);
110115
const port = opts?.port || staticMembers.port;
111116
const clientConfig = opts?.clientConfig ?? {};
112117
const fallback =
@@ -197,6 +202,9 @@ export class TranscoderServiceClient {
197202
// of calling the API is handled in `google-gax`, with this code
198203
// merely providing the destination and request information.
199204
this.innerApiCalls = {};
205+
206+
// Add a warn function to the client constructor so it can be easily tested.
207+
this.warn = gax.warn;
200208
}
201209

202210
/**
@@ -226,7 +234,8 @@ export class TranscoderServiceClient {
226234
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
227235
(this._protos as any).google.cloud.video.transcoder.v1beta1
228236
.TranscoderService,
229-
this._opts
237+
this._opts,
238+
this._providedCustomServicePath
230239
) as Promise<{[method: string]: Function}>;
231240

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

0 commit comments

Comments
 (0)