index.js

// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @namespace google
 */
/**
 * @namespace google.cloud
 */
/**
 * @namespace google.cloud.containeranalysis
 */
/**
 * @namespace google.cloud.containeranalysis.v1
 */
/**
 * @namespace google.cloud.containeranalysis.v1beta1
 */
/**
 * @namespace google.devtools.containeranalysis.v1beta1
 */
/**
 * @namespace google.iam.v1
 */
/**
 * @namespace google.protobuf
 */
/**
 * @namespace google.rpc
 */
/**
 * @namespace google.type
 */
/**
 * @namespace grafeas.v1beta1
 */
/**
 * @namespace grafeas.v1beta1.attestation
 */
/**
 * @namespace grafeas.v1beta1.build
 */
/**
 * @namespace grafeas.v1beta1.deployment
 */
/**
 * @namespace grafeas.v1beta1.discovery
 */
/**
 * @namespace grafeas.v1beta1.image
 */
/**
 * @namespace grafeas.v1beta1.package
 */
/**
 * @namespace grafeas.v1beta1.provenance
 */
/**
 * @namespace grafeas.v1beta1.source
 */
/**
 * @namespace grafeas.v1beta1.vulnerability
 */

'use strict';

// Import the clients for each version supported by this package.
const gapic = Object.freeze({
  v1: require('./v1'),
  v1beta1: require('./v1beta1'),
});

/**
 * The `@google-cloud/containeranalysis` package has the following named exports:
 *
 * - `ContainerAnalysisClient` - Reference to
 *   {@link v1.ContainerAnalysisClient}
 * - `v1` - This is used for selecting or pinning a
 *   particular backend service version. It exports:
 *     - `ContainerAnalysisClient` - Reference to
 *       {@link v1.ContainerAnalysisClient}
 *
 * @module {object} @google-cloud/containeranalysis
 * @alias nodejs-containeranalysis
 *
 * @example <caption>Install the client library with <a href="https://www.npmjs.com/">npm</a>:</caption>
 * npm install --save @google-cloud/containeranalysis
 *
 * @example <caption>Import the client library:</caption>
 * const containeranalysis = require('@google-cloud/containeranalysis');
 *
 * @example <caption>Create a client that uses <a href="https://goo.gl/64dyYX">Application Default Credentials (ADC)</a>:</caption>
 * const client = new containeranalysis.ContainerAnalysisClient();
 *
 * @example <caption>Create a client with <a href="https://goo.gl/RXp6VL">explicit credentials</a>:</caption>
 * const client = new containeranalysis.ContainerAnalysisClient({
 *   projectId: 'your-project-id',
 *   keyFilename: '/path/to/keyfile.json',
 * });
 */

/**
 * @type {object}
 * @property {constructor} ContainerAnalysisClient
 *   Reference to {@link v1.ContainerAnalysisClient}
 */
module.exports = gapic.v1;

/**
 * @type {object}
 * @property {constructor} ContainerAnalysisClient
 *   Reference to {@link v1.ContainerAnalysisClient}
 */
module.exports.v1 = gapic.v1;
module.exports.v1beta1 = gapic.v1beta1;

// Alias `module.exports` as `module.exports.default`, for future-proofing.
module.exports.default = Object.assign({}, module.exports);