@google-cloud/containeranalysis 5.0.1 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,8 +72,7 @@ class ContainerAnalysisV1Beta1Client {
72
72
  * API remote host.
73
73
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
74
74
  * Follows the structure of {@link gapicConfig}.
75
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
76
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
75
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
77
76
  * For more information, please check the
78
77
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
79
78
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -81,7 +80,7 @@ class ContainerAnalysisV1Beta1Client {
81
80
  * HTTP implementation. Load only fallback version and pass it to the constructor:
82
81
  * ```
83
82
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
84
- * const client = new ContainerAnalysisV1Beta1Client({fallback: 'rest'}, gax);
83
+ * const client = new ContainerAnalysisV1Beta1Client({fallback: true}, gax);
85
84
  * ```
86
85
  */
87
86
  constructor(opts, gaxInstance) {
@@ -139,7 +138,7 @@ class ContainerAnalysisV1Beta1Client {
139
138
  if (!opts.fallback) {
140
139
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
141
140
  }
142
- else if (opts.fallback === 'rest') {
141
+ else {
143
142
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
144
143
  }
145
144
  if (opts.libName && opts.libVersion) {
@@ -186,6 +185,7 @@ class ContainerAnalysisV1Beta1Client {
186
185
  'getIamPolicy',
187
186
  'testIamPermissions',
188
187
  'generatePackagesSummary',
188
+ 'exportSboM',
189
189
  ];
190
190
  for (const methodName of containerAnalysisV1Beta1StubMethods) {
191
191
  const callPromise = this.containerAnalysisV1Beta1Stub.then(stub => (...args) => {
@@ -328,6 +328,27 @@ class ContainerAnalysisV1Beta1Client {
328
328
  this.initialize();
329
329
  return this.innerApiCalls.generatePackagesSummary(request, options, callback);
330
330
  }
331
+ exportSBOM(request, optionsOrCallback, callback) {
332
+ var _a;
333
+ request = request || {};
334
+ let options;
335
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
336
+ callback = optionsOrCallback;
337
+ options = {};
338
+ }
339
+ else {
340
+ options = optionsOrCallback;
341
+ }
342
+ options = options || {};
343
+ options.otherArgs = options.otherArgs || {};
344
+ options.otherArgs.headers = options.otherArgs.headers || {};
345
+ options.otherArgs.headers['x-goog-request-params'] =
346
+ this._gaxModule.routingHeader.fromParams({
347
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
348
+ });
349
+ this.initialize();
350
+ return this.innerApiCalls.exportSboM(request, options, callback);
351
+ }
331
352
  /**
332
353
  * Terminate the gRPC channel and close the client.
333
354
  *
@@ -35,6 +35,10 @@
35
35
  "GeneratePackagesSummary": {
36
36
  "retry_codes_name": "non_idempotent",
37
37
  "retry_params_name": "default"
38
+ },
39
+ "ExportSBOM": {
40
+ "retry_codes_name": "non_idempotent",
41
+ "retry_params_name": "default"
38
42
  }
39
43
  }
40
44
  }
@@ -66,8 +66,7 @@ export declare class GrafeasV1Beta1Client {
66
66
  * API remote host.
67
67
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
68
68
  * Follows the structure of {@link gapicConfig}.
69
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
70
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
69
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
71
70
  * For more information, please check the
72
71
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
73
72
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -75,7 +74,7 @@ export declare class GrafeasV1Beta1Client {
75
74
  * HTTP implementation. Load only fallback version and pass it to the constructor:
76
75
  * ```
77
76
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
78
- * const client = new GrafeasV1Beta1Client({fallback: 'rest'}, gax);
77
+ * const client = new GrafeasV1Beta1Client({fallback: true}, gax);
79
78
  * ```
80
79
  */
81
80
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -73,8 +73,7 @@ class GrafeasV1Beta1Client {
73
73
  * API remote host.
74
74
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
75
75
  * Follows the structure of {@link gapicConfig}.
76
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
77
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
76
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
78
77
  * For more information, please check the
79
78
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
80
79
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -82,7 +81,7 @@ class GrafeasV1Beta1Client {
82
81
  * HTTP implementation. Load only fallback version and pass it to the constructor:
83
82
  * ```
84
83
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
85
- * const client = new GrafeasV1Beta1Client({fallback: 'rest'}, gax);
84
+ * const client = new GrafeasV1Beta1Client({fallback: true}, gax);
86
85
  * ```
87
86
  */
88
87
  constructor(opts, gaxInstance) {
@@ -139,7 +138,7 @@ class GrafeasV1Beta1Client {
139
138
  if (!opts.fallback) {
140
139
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
141
140
  }
142
- else if (opts.fallback === 'rest') {
141
+ else {
143
142
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
144
143
  }
145
144
  if (opts.libName && opts.libVersion) {
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@google-cloud/containeranalysis",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
4
4
  "description": "Containeranalysis client for Node.js",
5
- "repository": "googleapis/nodejs-containeranalysis",
5
+ "repository": {
6
+ "type": "git",
7
+ "directory": "packages/google-devtools-containeranalysis",
8
+ "url": "https://github.com/googleapis/google-cloud-node.git"
9
+ },
10
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-devtools-containeranalysis",
6
11
  "license": "Apache-2.0",
7
12
  "author": "Google LLC",
8
13
  "main": "build/src/index.js",