UNPKG

@google-cloud/containeranalysis

Version:
707 lines (706 loc) 45.6 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * [Grafeas](https://grafeas.io) API. * * Retrieves analysis results of Cloud components such as Docker container * images. * * Analysis results are stored as a series of occurrences. An `Occurrence` * contains information about a specific analysis instance on a resource. An * occurrence refers to a `Note`. A note contains details describing the * analysis and is generally stored in a separate project, called a `Provider`. * Multiple occurrences can refer to the same note. * * For example, an SSL vulnerability could affect multiple images. In this case, * there would be one note for the vulnerability and an occurrence for each * image with the vulnerability referring to that note. * @class * @memberof v1beta1 */ export declare class GrafeasV1Beta1Client { private _terminated; private _opts; private _providedCustomServicePath; private _gaxModule; private _gaxGrpc; private _protos; private _defaults; private _universeDomain; private _servicePath; private _log; auth: gax.GoogleAuth; descriptors: Descriptors; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: { [name: string]: Function; }; grafeasV1Beta1Stub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of GrafeasV1Beta1Client. * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] * @param {string} [options.email] - Account email address. Required when * using a .pem or .p12 keyFilename. * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or * .p12 key downloaded from the Google Developers Console. If you provide * a path to a JSON file, the projectId option below is not necessary. * NOTE: .pem and .p12 require you to specify options.email as well. * @param {number} [options.port] - The port on which to connect to * the remote host. * @param {string} [options.projectId] - The project ID from the Google * Developer's Console, e.g. 'grape-spaceship-123'. We will also check * the environment variable GCLOUD_PROJECT for your project ID. If your * app is running in an environment which supports * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you * need to avoid loading the default gRPC version and want to use the fallback * HTTP implementation. Load only fallback version and pass it to the constructor: * ``` * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC * const client = new GrafeasV1Beta1Client({fallback: true}, gax); * ``` */ constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback); /** * Initialize the client. * Performs asynchronous operations (such as authentication) and prepares the client. * This function will be called automatically when any class method is called for the * first time, but if you need to initialize it before calling an actual method, * feel free to call initialize() directly. * * You can await on this method if you want to make sure the client is initialized. * * @returns {Promise} A promise that resolves to an authenticated service stub. */ initialize(): Promise<{ [name: string]: Function; }>; /** * The DNS address for this API service. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get servicePath(): string; /** * The DNS address for this API service - same as servicePath. * @deprecated Use the apiEndpoint method of the client instance. * @returns {string} The DNS address for this service. */ static get apiEndpoint(): string; /** * The DNS address for this API service. * @returns {string} The DNS address for this service. */ get apiEndpoint(): string; get universeDomain(): string; /** * The port for this API service. * @returns {number} The default port for this service. */ static get port(): number; /** * The scopes needed to make gRPC calls for every method defined * in this service. * @returns {string[]} List of default scopes. */ static get scopes(): string[]; getProjectId(): Promise<string>; getProjectId(callback: Callback<string, undefined, undefined>): void; /** * Gets the specified occurrence. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_async */ getOccurrence(request?: protos.grafeas.v1beta1.IGetOccurrenceRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IGetOccurrenceRequest | undefined, {} | undefined ]>; getOccurrence(request: protos.grafeas.v1beta1.IGetOccurrenceRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IGetOccurrenceRequest | null | undefined, {} | null | undefined>): void; getOccurrence(request: protos.grafeas.v1beta1.IGetOccurrenceRequest, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IGetOccurrenceRequest | null | undefined, {} | null | undefined>): void; /** * Deletes the specified occurrence. For example, use this method to delete an * occurrence when the occurrence is no longer applicable for the given * resource. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_async */ deleteOccurrence(request?: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteOccurrenceRequest | undefined, {} | undefined ]>; deleteOccurrence(request: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteOccurrenceRequest | null | undefined, {} | null | undefined>): void; deleteOccurrence(request: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteOccurrenceRequest | null | undefined, {} | null | undefined>): void; /** * Creates a new occurrence. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project in the form of `projects/[PROJECT_ID]`, under which * the occurrence is to be created. * @param {grafeas.v1beta1.Occurrence} request.occurrence * The occurrence to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_async */ createOccurrence(request?: protos.grafeas.v1beta1.ICreateOccurrenceRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.ICreateOccurrenceRequest | undefined, {} | undefined ]>; createOccurrence(request: protos.grafeas.v1beta1.ICreateOccurrenceRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.ICreateOccurrenceRequest | null | undefined, {} | null | undefined>): void; createOccurrence(request: protos.grafeas.v1beta1.ICreateOccurrenceRequest, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.ICreateOccurrenceRequest | null | undefined, {} | null | undefined>): void; /** * Creates new occurrences in batch. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project in the form of `projects/[PROJECT_ID]`, under which * the occurrences are to be created. * @param {number[]} request.occurrences * The occurrences to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.BatchCreateOccurrencesResponse|BatchCreateOccurrencesResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_async */ batchCreateOccurrences(request?: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest | undefined, {} | undefined ]>; batchCreateOccurrences(request: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest | null | undefined, {} | null | undefined>): void; batchCreateOccurrences(request: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, callback: Callback<protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest | null | undefined, {} | null | undefined>): void; /** * Updates the specified occurrence. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param {grafeas.v1beta1.Occurrence} request.occurrence * The updated occurrence. * @param {google.protobuf.FieldMask} request.updateMask * The fields to update. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_async */ updateOccurrence(request?: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IUpdateOccurrenceRequest | undefined, {} | undefined ]>; updateOccurrence(request: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IUpdateOccurrenceRequest | null | undefined, {} | null | undefined>): void; updateOccurrence(request: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, callback: Callback<protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IUpdateOccurrenceRequest | null | undefined, {} | null | undefined>): void; /** * Gets the note attached to the specified occurrence. Consumer projects can * use this method to get a note that belongs to a provider project. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the occurrence in the form of * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Note|Note}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_async */ getOccurrenceNote(request?: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetOccurrenceNoteRequest | undefined, {} | undefined ]>; getOccurrenceNote(request: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetOccurrenceNoteRequest | null | undefined, {} | null | undefined>): void; getOccurrenceNote(request: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetOccurrenceNoteRequest | null | undefined, {} | null | undefined>): void; /** * Gets the specified note. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Note|Note}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.get_note.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_async */ getNote(request?: protos.grafeas.v1beta1.IGetNoteRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetNoteRequest | undefined, {} | undefined ]>; getNote(request: protos.grafeas.v1beta1.IGetNoteRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetNoteRequest | null | undefined, {} | null | undefined>): void; getNote(request: protos.grafeas.v1beta1.IGetNoteRequest, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetNoteRequest | null | undefined, {} | null | undefined>): void; /** * Deletes the specified note. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_async */ deleteNote(request?: protos.grafeas.v1beta1.IDeleteNoteRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteNoteRequest | undefined, {} | undefined ]>; deleteNote(request: protos.grafeas.v1beta1.IDeleteNoteRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteNoteRequest | null | undefined, {} | null | undefined>): void; deleteNote(request: protos.grafeas.v1beta1.IDeleteNoteRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteNoteRequest | null | undefined, {} | null | undefined>): void; /** * Creates a new note. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project in the form of `projects/[PROJECT_ID]`, under which * the note is to be created. * @param {string} request.noteId * The ID to use for this note. * @param {grafeas.v1beta1.Note} request.note * The note to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Note|Note}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.create_note.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_async */ createNote(request?: protos.grafeas.v1beta1.ICreateNoteRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.ICreateNoteRequest | undefined, {} | undefined ]>; createNote(request: protos.grafeas.v1beta1.ICreateNoteRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.ICreateNoteRequest | null | undefined, {} | null | undefined>): void; createNote(request: protos.grafeas.v1beta1.ICreateNoteRequest, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.ICreateNoteRequest | null | undefined, {} | null | undefined>): void; /** * Creates new notes in batch. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project in the form of `projects/[PROJECT_ID]`, under which * the notes are to be created. * @param {number[]} request.notes * The notes to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.BatchCreateNotesResponse|BatchCreateNotesResponse}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateNotes_async */ batchCreateNotes(request?: protos.grafeas.v1beta1.IBatchCreateNotesRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IBatchCreateNotesResponse, protos.grafeas.v1beta1.IBatchCreateNotesRequest | undefined, {} | undefined ]>; batchCreateNotes(request: protos.grafeas.v1beta1.IBatchCreateNotesRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IBatchCreateNotesResponse, protos.grafeas.v1beta1.IBatchCreateNotesRequest | null | undefined, {} | null | undefined>): void; batchCreateNotes(request: protos.grafeas.v1beta1.IBatchCreateNotesRequest, callback: Callback<protos.grafeas.v1beta1.IBatchCreateNotesResponse, protos.grafeas.v1beta1.IBatchCreateNotesRequest | null | undefined, {} | null | undefined>): void; /** * Updates the specified note. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {grafeas.v1beta1.Note} request.note * The updated note. * @param {google.protobuf.FieldMask} request.updateMask * The fields to update. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.Note|Note}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.update_note.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_async */ updateNote(request?: protos.grafeas.v1beta1.IUpdateNoteRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IUpdateNoteRequest | undefined, {} | undefined ]>; updateNote(request: protos.grafeas.v1beta1.IUpdateNoteRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IUpdateNoteRequest | null | undefined, {} | null | undefined>): void; updateNote(request: protos.grafeas.v1beta1.IUpdateNoteRequest, callback: Callback<protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IUpdateNoteRequest | null | undefined, {} | null | undefined>): void; /** * Gets a summary of the number and severity of occurrences. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing {@link protos.grafeas.v1beta1.VulnerabilityOccurrencesSummary|VulnerabilityOccurrencesSummary}. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_async */ getVulnerabilityOccurrencesSummary(request?: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest | undefined, {} | undefined ]>; getVulnerabilityOccurrencesSummary(request: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, options: CallOptions, callback: Callback<protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest | null | undefined, {} | null | undefined>): void; getVulnerabilityOccurrencesSummary(request: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, callback: Callback<protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest | null | undefined, {} | null | undefined>): void; /** * Lists occurrences for the specified project. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list occurrences for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listOccurrencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listOccurrences(request?: protos.grafeas.v1beta1.IListOccurrencesRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IOccurrence[], protos.grafeas.v1beta1.IListOccurrencesRequest | null, protos.grafeas.v1beta1.IListOccurrencesResponse ]>; listOccurrences(request: protos.grafeas.v1beta1.IListOccurrencesRequest, options: CallOptions, callback: PaginationCallback<protos.grafeas.v1beta1.IListOccurrencesRequest, protos.grafeas.v1beta1.IListOccurrencesResponse | null | undefined, protos.grafeas.v1beta1.IOccurrence>): void; listOccurrences(request: protos.grafeas.v1beta1.IListOccurrencesRequest, callback: PaginationCallback<protos.grafeas.v1beta1.IListOccurrencesRequest, protos.grafeas.v1beta1.IListOccurrencesResponse | null | undefined, protos.grafeas.v1beta1.IOccurrence>): void; /** * Equivalent to `listOccurrences`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list occurrences for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing {@link protos.grafeas.v1beta1.Occurrence|Occurrence} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listOccurrencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listOccurrencesStream(request?: protos.grafeas.v1beta1.IListOccurrencesRequest, options?: CallOptions): Transform; /** * Equivalent to `listOccurrences`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list occurrences for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_async */ listOccurrencesAsync(request?: protos.grafeas.v1beta1.IListOccurrencesRequest, options?: CallOptions): AsyncIterable<protos.grafeas.v1beta1.IOccurrence>; /** * Lists notes for the specified project. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list notes for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of notes to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of {@link protos.grafeas.v1beta1.Note|Note}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listNotesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listNotes(request?: protos.grafeas.v1beta1.IListNotesRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.INote[], protos.grafeas.v1beta1.IListNotesRequest | null, protos.grafeas.v1beta1.IListNotesResponse ]>; listNotes(request: protos.grafeas.v1beta1.IListNotesRequest, options: CallOptions, callback: PaginationCallback<protos.grafeas.v1beta1.IListNotesRequest, protos.grafeas.v1beta1.IListNotesResponse | null | undefined, protos.grafeas.v1beta1.INote>): void; listNotes(request: protos.grafeas.v1beta1.IListNotesRequest, callback: PaginationCallback<protos.grafeas.v1beta1.IListNotesRequest, protos.grafeas.v1beta1.IListNotesResponse | null | undefined, protos.grafeas.v1beta1.INote>): void; /** * Equivalent to `listNotes`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list notes for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of notes to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing {@link protos.grafeas.v1beta1.Note|Note} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listNotesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listNotesStream(request?: protos.grafeas.v1beta1.IListNotesRequest, options?: CallOptions): Transform; /** * Equivalent to `listNotes`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * The name of the project to list notes for in the form of * `projects/[PROJECT_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of notes to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link protos.grafeas.v1beta1.Note|Note}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_async */ listNotesAsync(request?: protos.grafeas.v1beta1.IListNotesRequest, options?: CallOptions): AsyncIterable<protos.grafeas.v1beta1.INote>; /** * Lists occurrences referencing the specified note. Provider projects can use * this method to get all occurrences across consumer projects referencing the * specified note. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note to list occurrences for in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. * We recommend using `listNoteOccurrencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listNoteOccurrences(request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, options?: CallOptions): Promise<[ protos.grafeas.v1beta1.IOccurrence[], protos.grafeas.v1beta1.IListNoteOccurrencesRequest | null, protos.grafeas.v1beta1.IListNoteOccurrencesResponse ]>; listNoteOccurrences(request: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, options: CallOptions, callback: PaginationCallback<protos.grafeas.v1beta1.IListNoteOccurrencesRequest, protos.grafeas.v1beta1.IListNoteOccurrencesResponse | null | undefined, protos.grafeas.v1beta1.IOccurrence>): void; listNoteOccurrences(request: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, callback: PaginationCallback<protos.grafeas.v1beta1.IListNoteOccurrencesRequest, protos.grafeas.v1beta1.IListNoteOccurrencesResponse | null | undefined, protos.grafeas.v1beta1.IOccurrence>): void; /** * Equivalent to `listNoteOccurrences`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note to list occurrences for in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing {@link protos.grafeas.v1beta1.Occurrence|Occurrence} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. * We recommend using `listNoteOccurrencesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ listNoteOccurrencesStream(request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, options?: CallOptions): Transform; /** * Equivalent to `listNoteOccurrences`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.name * The name of the note to list occurrences for in the form of * `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. * @param {string} request.filter * The filter expression. * @param {number} request.pageSize * Number of occurrences to return in the list. * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing * {@link protos.grafeas.v1beta1.Occurrence|Occurrence}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js</caption> * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_async */ listNoteOccurrencesAsync(request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, options?: CallOptions): AsyncIterable<protos.grafeas.v1beta1.IOccurrence>; /** * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise<void>; }