Skip to content

Commit

Permalink
fix: Updating WORKSPACE files to use the newest version of the Typesc…
Browse files Browse the repository at this point in the history
…ript generator. (#914)

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
  • Loading branch information
gcf-owl-bot[bot] committed Jul 16, 2021
1 parent 7917fd7 commit f5292e1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/v2/bigtable_client.ts
Expand Up @@ -39,6 +39,7 @@ const version = require('../../../package.json').version;
export class BigtableClient {
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 @@ -50,6 +51,7 @@ export class BigtableClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
bigtableStub?: Promise<{[name: string]: Function}>;
Expand Down Expand Up @@ -93,6 +95,9 @@ export class BigtableClient {
const staticMembers = this.constructor as typeof BigtableClient;
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 @@ -175,6 +180,9 @@ export class BigtableClient {
// 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 @@ -203,7 +211,8 @@ export class BigtableClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.bigtable.v2.Bigtable,
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/v2/bigtable_instance_admin_client.ts
Expand Up @@ -51,6 +51,7 @@ const version = require('../../../package.json').version;
export class BigtableInstanceAdminClient {
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 @@ -62,6 +63,7 @@ export class BigtableInstanceAdminClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
operationsClient: gax.OperationsClient;
Expand Down Expand Up @@ -107,6 +109,9 @@ export class BigtableInstanceAdminClient {
.constructor as typeof BigtableInstanceAdminClient;
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 @@ -277,6 +282,9 @@ export class BigtableInstanceAdminClient {
// 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 @@ -305,7 +313,8 @@ export class BigtableInstanceAdminClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.bigtable.admin.v2.BigtableInstanceAdmin,
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/v2/bigtable_table_admin_client.ts
Expand Up @@ -53,6 +53,7 @@ const version = require('../../../package.json').version;
export class BigtableTableAdminClient {
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 @@ -64,6 +65,7 @@ export class BigtableTableAdminClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
pathTemplates: {[name: string]: gax.PathTemplate};
operationsClient: gax.OperationsClient;
Expand Down Expand Up @@ -108,6 +110,9 @@ export class BigtableTableAdminClient {
const staticMembers = this.constructor as typeof BigtableTableAdminClient;
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 @@ -276,6 +281,9 @@ export class BigtableTableAdminClient {
// 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 @@ -304,7 +312,8 @@ export class BigtableTableAdminClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.bigtable.admin.v2.BigtableTableAdmin,
this._opts
this._opts,
this._providedCustomServicePath
) as Promise<{[method: string]: Function}>;

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

0 comments on commit f5292e1

Please sign in to comment.