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

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. (#928)

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
  • Loading branch information
gcf-owl-bot[bot] authored Jul 16, 2021
1 parent 04cc7a0 commit f5cddc5
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 8 deletions.
11 changes: 10 additions & 1 deletion src/v1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
export class ImageAnnotatorClient {
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 @@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
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 @@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
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 @@ -222,6 +227,9 @@ export class ImageAnnotatorClient {
// 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 @@ -250,7 +258,8 @@ export class ImageAnnotatorClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1.ImageAnnotator,
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/v1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const version = require('../../../package.json').version;
export class ProductSearchClient {
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 @@ -73,6 +74,7 @@ export class ProductSearchClient {
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 @@ -117,6 +119,9 @@ export class ProductSearchClient {
const staticMembers = this.constructor as typeof ProductSearchClient;
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 @@ -258,6 +263,9 @@ export class ProductSearchClient {
// 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 @@ -286,7 +294,8 @@ export class ProductSearchClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1.ProductSearch,
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/v1p1beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const version = require('../../../package.json').version;
export class ImageAnnotatorClient {
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 @@ -52,6 +53,7 @@ export class ImageAnnotatorClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
imageAnnotatorStub?: Promise<{[name: string]: Function}>;

Expand Down Expand Up @@ -94,6 +96,9 @@ export class ImageAnnotatorClient {
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
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 @@ -153,6 +158,9 @@ export class ImageAnnotatorClient {
// 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 @@ -181,7 +189,8 @@ export class ImageAnnotatorClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p1beta1.ImageAnnotator,
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/v1p2beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
export class ImageAnnotatorClient {
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 @@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
operationsClient: gax.OperationsClient;
imageAnnotatorStub?: Promise<{[name: string]: Function}>;
Expand Down Expand Up @@ -101,6 +103,9 @@ export class ImageAnnotatorClient {
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
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 @@ -191,6 +196,9 @@ export class ImageAnnotatorClient {
// 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 @@ -219,7 +227,8 @@ export class ImageAnnotatorClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p2beta1.ImageAnnotator,
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/v1p3beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
export class ImageAnnotatorClient {
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 @@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
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 @@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
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 @@ -207,6 +212,9 @@ export class ImageAnnotatorClient {
// 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 @@ -235,7 +243,8 @@ export class ImageAnnotatorClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p3beta1.ImageAnnotator,
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/v1p3beta1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const version = require('../../../package.json').version;
export class ProductSearchClient {
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 @@ -73,6 +74,7 @@ export class ProductSearchClient {
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 @@ -117,6 +119,9 @@ export class ProductSearchClient {
const staticMembers = this.constructor as typeof ProductSearchClient;
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 @@ -247,6 +252,9 @@ export class ProductSearchClient {
// 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 @@ -275,7 +283,8 @@ export class ProductSearchClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p3beta1.ProductSearch,
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/v1p4beta1/image_annotator_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const version = require('../../../package.json').version;
export class ImageAnnotatorClient {
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 @@ -58,6 +59,7 @@ export class ImageAnnotatorClient {
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 @@ -102,6 +104,9 @@ export class ImageAnnotatorClient {
const staticMembers = this.constructor as typeof ImageAnnotatorClient;
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 @@ -222,6 +227,9 @@ export class ImageAnnotatorClient {
// 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 @@ -250,7 +258,8 @@ export class ImageAnnotatorClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p4beta1.ImageAnnotator,
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/v1p4beta1/product_search_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const version = require('../../../package.json').version;
export class ProductSearchClient {
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 @@ -77,6 +78,7 @@ export class ProductSearchClient {
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 @@ -121,6 +123,9 @@ export class ProductSearchClient {
const staticMembers = this.constructor as typeof ProductSearchClient;
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 @@ -262,6 +267,9 @@ export class ProductSearchClient {
// 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 @@ -290,7 +298,8 @@ export class ProductSearchClient {
)
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.vision.v1p4beta1.ProductSearch,
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 f5cddc5

Please sign in to comment.