From f2117f909d55d0592f914f2db27f487b09bd0b7e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 15:31:40 -0800 Subject: [PATCH] docs(samples): add example tags to generated samples (#356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../linkinator.config.json | 2 +- .../v1/container_analysis.get_iam_policy.js | 6 +- ...s.get_vulnerability_occurrences_summary.js | 4 +- .../v1/container_analysis.set_iam_policy.js | 6 +- ...container_analysis.test_iam_permissions.js | 6 +- .../v1/grafeas.batch_create_notes.js | 4 +- .../v1/grafeas.batch_create_occurrences.js | 4 +- .../generated/v1/grafeas.create_note.js | 6 +- .../generated/v1/grafeas.create_occurrence.js | 6 +- .../generated/v1/grafeas.delete_note.js | 4 +- .../generated/v1/grafeas.delete_occurrence.js | 4 +- .../samples/generated/v1/grafeas.get_note.js | 4 +- .../generated/v1/grafeas.get_occurrence.js | 4 +- .../v1/grafeas.get_occurrence_note.js | 4 +- .../v1/grafeas.list_note_occurrences.js | 4 +- .../generated/v1/grafeas.list_notes.js | 4 +- .../generated/v1/grafeas.list_occurrences.js | 4 +- .../generated/v1/grafeas.update_note.js | 8 +- .../generated/v1/grafeas.update_occurrence.js | 8 +- ...tainer_analysis_v1_beta1.get_iam_policy.js | 6 +- ...ainer_analysis_v1_beta1.get_scan_config.js | 4 +- ...ner_analysis_v1_beta1.list_scan_configs.js | 4 +- ...tainer_analysis_v1_beta1.set_iam_policy.js | 6 +- ..._analysis_v1_beta1.test_iam_permissions.js | 6 +- ...er_analysis_v1_beta1.update_scan_config.js | 6 +- .../grafeas_v1_beta1.batch_create_notes.js | 4 +- ...afeas_v1_beta1.batch_create_occurrences.js | 4 +- .../v1beta1/grafeas_v1_beta1.create_note.js | 6 +- .../grafeas_v1_beta1.create_occurrence.js | 6 +- .../v1beta1/grafeas_v1_beta1.delete_note.js | 4 +- .../grafeas_v1_beta1.delete_occurrence.js | 4 +- .../v1beta1/grafeas_v1_beta1.get_note.js | 4 +- .../grafeas_v1_beta1.get_occurrence.js | 4 +- .../grafeas_v1_beta1.get_occurrence_note.js | 4 +- ...1.get_vulnerability_occurrences_summary.js | 4 +- .../grafeas_v1_beta1.list_note_occurrences.js | 4 +- .../v1beta1/grafeas_v1_beta1.list_notes.js | 4 +- .../grafeas_v1_beta1.list_occurrences.js | 4 +- .../v1beta1/grafeas_v1_beta1.update_note.js | 8 +- .../grafeas_v1_beta1.update_occurrence.js | 8 +- .../src/v1/container_analysis_client.ts | 212 +++--- .../container_analysis_v1_beta1_client.ts | 310 ++++---- .../src/v1beta1/grafeas_v1_beta1_client.ts | 682 +++++++++--------- 43 files changed, 692 insertions(+), 708 deletions(-) diff --git a/packages/google-devtools-containeranalysis/linkinator.config.json b/packages/google-devtools-containeranalysis/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-devtools-containeranalysis/linkinator.config.json +++ b/packages/google-devtools-containeranalysis/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js index f8384081032..f205db231fc 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_iam_policy.js @@ -28,7 +28,7 @@ function main(resource) { * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. This field is only used by Cloud IAM. */ - // const options = '' + // const options = {} // Imports the Containeranalysis library const {ContainerAnalysisClient} = @@ -37,7 +37,7 @@ function main(resource) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); - async function getIamPolicy() { + async function callGetIamPolicy() { // Construct request const request = { resource, @@ -48,7 +48,7 @@ function main(resource) { console.log(response); } - getIamPolicy(); + callGetIamPolicy(); // [END containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js index d0e07a68847..c65c9ebf939 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js @@ -36,7 +36,7 @@ function main(parent) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); - async function getVulnerabilityOccurrencesSummary() { + async function callGetVulnerabilityOccurrencesSummary() { // Construct request const request = { parent, @@ -48,7 +48,7 @@ function main(parent) { console.log(response); } - getVulnerabilityOccurrencesSummary(); + callGetVulnerabilityOccurrencesSummary(); // [END containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js index 4f5ba2cca6c..3a045d1d1c3 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.set_iam_policy.js @@ -30,7 +30,7 @@ function main(resource, policy) { * valid policy but certain Cloud Platform services (such as Projects) * might reject them. */ - // const policy = '' + // const policy = {} // Imports the Containeranalysis library const {ContainerAnalysisClient} = @@ -39,7 +39,7 @@ function main(resource, policy) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); - async function setIamPolicy() { + async function callSetIamPolicy() { // Construct request const request = { resource, @@ -51,7 +51,7 @@ function main(resource, policy) { console.log(response); } - setIamPolicy(); + callSetIamPolicy(); // [END containeranalysis_v1_generated_ContainerAnalysis_SetIamPolicy_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js index 2fe9de70b94..07985ff72a1 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/container_analysis.test_iam_permissions.js @@ -28,7 +28,7 @@ function main(resource, permissions) { * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). */ // const permissions = 'abc123' @@ -39,7 +39,7 @@ function main(resource, permissions) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisClient(); - async function testIamPermissions() { + async function callTestIamPermissions() { // Construct request const request = { resource, @@ -51,7 +51,7 @@ function main(resource, permissions) { console.log(response); } - testIamPermissions(); + callTestIamPermissions(); // [END containeranalysis_v1_generated_ContainerAnalysis_TestIamPermissions_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js index 1190b965c5c..5966436812f 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_notes.js @@ -35,7 +35,7 @@ function main(parent, notes) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function batchCreateNotes() { + async function callBatchCreateNotes() { // Construct request const request = { parent, @@ -47,7 +47,7 @@ function main(parent, notes) { console.log(response); } - batchCreateNotes(); + callBatchCreateNotes(); // [END containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js index beccba1578d..bdfbdb9439c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.batch_create_occurrences.js @@ -35,7 +35,7 @@ function main(parent, occurrences) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function batchCreateOccurrences() { + async function callBatchCreateOccurrences() { // Construct request const request = { parent, @@ -49,7 +49,7 @@ function main(parent, occurrences) { console.log(response); } - batchCreateOccurrences(); + callBatchCreateOccurrences(); // [END containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js index fc577f7993f..7de9696f551 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_note.js @@ -31,7 +31,7 @@ function main(parent, noteId, note) { /** * The note to create. */ - // const note = '' + // const note = {} // Imports the Containeranalysis library const {GrafeasClient} = require('@google-cloud/containeranalysis').v1; @@ -39,7 +39,7 @@ function main(parent, noteId, note) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function createNote() { + async function callCreateNote() { // Construct request const request = { parent, @@ -52,7 +52,7 @@ function main(parent, noteId, note) { console.log(response); } - createNote(); + callCreateNote(); // [END containeranalysis_v1_generated_Grafeas_CreateNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js index fa98f5998f2..dda445194fb 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.create_occurrence.js @@ -27,7 +27,7 @@ function main(parent, occurrence) { /** * The occurrence to create. */ - // const occurrence = '' + // const occurrence = {} // Imports the Containeranalysis library const {GrafeasClient} = require('@google-cloud/containeranalysis').v1; @@ -35,7 +35,7 @@ function main(parent, occurrence) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function createOccurrence() { + async function callCreateOccurrence() { // Construct request const request = { parent, @@ -47,7 +47,7 @@ function main(parent, occurrence) { console.log(response); } - createOccurrence(); + callCreateOccurrence(); // [END containeranalysis_v1_generated_Grafeas_CreateOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js index 1723486f2d6..f969821ddb4 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_note.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function deleteNote() { + async function callDeleteNote() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - deleteNote(); + callDeleteNote(); // [END containeranalysis_v1_generated_Grafeas_DeleteNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js index 35bb3733bd8..546f42f9ff0 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.delete_occurrence.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function deleteOccurrence() { + async function callDeleteOccurrence() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - deleteOccurrence(); + callDeleteOccurrence(); // [END containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js index ffff0623dc6..d747c56375e 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_note.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function getNote() { + async function callGetNote() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getNote(); + callGetNote(); // [END containeranalysis_v1_generated_Grafeas_GetNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js index 7cd1ad85772..47cfdbc9032 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function getOccurrence() { + async function callGetOccurrence() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getOccurrence(); + callGetOccurrence(); // [END containeranalysis_v1_generated_Grafeas_GetOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js index 91a77052e42..661fd7a3903 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.get_occurrence_note.js @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function getOccurrenceNote() { + async function callGetOccurrenceNote() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getOccurrenceNote(); + callGetOccurrenceNote(); // [END containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js index 8e57816caa4..f086130881a 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_note_occurrences.js @@ -43,7 +43,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function listNoteOccurrences() { + async function callListNoteOccurrences() { // Construct request const request = { name, @@ -58,7 +58,7 @@ function main(name) { } } - listNoteOccurrences(); + callListNoteOccurrences(); // [END containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js index f01e3c12d5e..cb68bdbe4d3 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_notes.js @@ -44,7 +44,7 @@ function main(parent) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function listNotes() { + async function callListNotes() { // Construct request const request = { parent, @@ -57,7 +57,7 @@ function main(parent) { } } - listNotes(); + callListNotes(); // [END containeranalysis_v1_generated_Grafeas_ListNotes_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js index fa254dba7f1..9d9a979d7ea 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.list_occurrences.js @@ -44,7 +44,7 @@ function main(parent) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function listOccurrences() { + async function callListOccurrences() { // Construct request const request = { parent, @@ -59,7 +59,7 @@ function main(parent) { } } - listOccurrences(); + callListOccurrences(); // [END containeranalysis_v1_generated_Grafeas_ListOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js index d05f6afbb23..70817bde96d 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_note.js @@ -27,11 +27,11 @@ function main(name, note) { /** * The updated note. */ - // const note = '' + // const note = {} /** * The fields to update. */ - // const updateMask = '' + // const updateMask = {} // Imports the Containeranalysis library const {GrafeasClient} = require('@google-cloud/containeranalysis').v1; @@ -39,7 +39,7 @@ function main(name, note) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function updateNote() { + async function callUpdateNote() { // Construct request const request = { name, @@ -51,7 +51,7 @@ function main(name, note) { console.log(response); } - updateNote(); + callUpdateNote(); // [END containeranalysis_v1_generated_Grafeas_UpdateNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js index 3875923aefe..2f5de589c6e 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1/grafeas.update_occurrence.js @@ -27,11 +27,11 @@ function main(name, occurrence) { /** * The updated occurrence. */ - // const occurrence = '' + // const occurrence = {} /** * The fields to update. */ - // const updateMask = '' + // const updateMask = {} // Imports the Containeranalysis library const {GrafeasClient} = require('@google-cloud/containeranalysis').v1; @@ -39,7 +39,7 @@ function main(name, occurrence) { // Instantiates a client const containeranalysisClient = new GrafeasClient(); - async function updateOccurrence() { + async function callUpdateOccurrence() { // Construct request const request = { name, @@ -51,7 +51,7 @@ function main(name, occurrence) { console.log(response); } - updateOccurrence(); + callUpdateOccurrence(); // [END containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js index 27335ee6869..1fd0704453b 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js @@ -28,7 +28,7 @@ function main(resource) { * OPTIONAL: A `GetPolicyOptions` object for specifying options to * `GetIamPolicy`. This field is only used by Cloud IAM. */ - // const options = '' + // const options = {} // Imports the Containeranalysis library const {ContainerAnalysisV1Beta1Client} = @@ -37,7 +37,7 @@ function main(resource) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function getIamPolicy() { + async function callGetIamPolicy() { // Construct request const request = { resource, @@ -48,7 +48,7 @@ function main(resource) { console.log(response); } - getIamPolicy(); + callGetIamPolicy(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetIamPolicy_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js index 4abd8534ef7..3425416944c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function getScanConfig() { + async function callGetScanConfig() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getScanConfig(); + callGetScanConfig(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetScanConfig_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js index bced84966da..d707160598d 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js @@ -44,7 +44,7 @@ function main(parent, filter) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function listScanConfigs() { + async function callListScanConfigs() { // Construct request const request = { parent, @@ -60,7 +60,7 @@ function main(parent, filter) { } } - listScanConfigs(); + callListScanConfigs(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_ListScanConfigs_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js index 471174edba9..63b19acbea0 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js @@ -30,7 +30,7 @@ function main(resource, policy) { * valid policy but certain Cloud Platform services (such as Projects) * might reject them. */ - // const policy = '' + // const policy = {} // Imports the Containeranalysis library const {ContainerAnalysisV1Beta1Client} = @@ -39,7 +39,7 @@ function main(resource, policy) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function setIamPolicy() { + async function callSetIamPolicy() { // Construct request const request = { resource, @@ -51,7 +51,7 @@ function main(resource, policy) { console.log(response); } - setIamPolicy(); + callSetIamPolicy(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_SetIamPolicy_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js index 812155b4588..dcd86b0594b 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js @@ -28,7 +28,7 @@ function main(resource, permissions) { * The set of permissions to check for the `resource`. Permissions with * wildcards (such as '*' or 'storage.*') are not allowed. For more * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). */ // const permissions = 'abc123' @@ -39,7 +39,7 @@ function main(resource, permissions) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function testIamPermissions() { + async function callTestIamPermissions() { // Construct request const request = { resource, @@ -51,7 +51,7 @@ function main(resource, permissions) { console.log(response); } - testIamPermissions(); + callTestIamPermissions(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_TestIamPermissions_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js index 0f9762c592b..5a859d2b0cf 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js @@ -27,7 +27,7 @@ function main(name, scanConfig) { /** * Required. The updated scan configuration. */ - // const scanConfig = '' + // const scanConfig = {} // Imports the Containeranalysis library const {ContainerAnalysisV1Beta1Client} = @@ -36,7 +36,7 @@ function main(name, scanConfig) { // Instantiates a client const containeranalysisClient = new ContainerAnalysisV1Beta1Client(); - async function updateScanConfig() { + async function callUpdateScanConfig() { // Construct request const request = { name, @@ -48,7 +48,7 @@ function main(name, scanConfig) { console.log(response); } - updateScanConfig(); + callUpdateScanConfig(); // [END containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_UpdateScanConfig_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js index 78c9cc81958..0222b51ef9c 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js @@ -36,7 +36,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function batchCreateNotes() { + async function callBatchCreateNotes() { // Construct request const request = {}; @@ -45,7 +45,7 @@ function main() { console.log(response); } - batchCreateNotes(); + callBatchCreateNotes(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateNotes_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js index 84a9fe52649..ade10bf3d68 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js @@ -36,7 +36,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function batchCreateOccurrences() { + async function callBatchCreateOccurrences() { // Construct request const request = {}; @@ -47,7 +47,7 @@ function main() { console.log(response); } - batchCreateOccurrences(); + callBatchCreateOccurrences(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js index 7404f2ed1fe..bce0810b0a4 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_note.js @@ -31,7 +31,7 @@ function main() { /** * The note to create. */ - // const note = '' + // const note = {} // Imports the Containeranalysis library const {GrafeasV1Beta1Client} = @@ -40,7 +40,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function createNote() { + async function callCreateNote() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - createNote(); + callCreateNote(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js index fc39365781d..aff3bd12627 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js @@ -27,7 +27,7 @@ function main() { /** * The occurrence to create. */ - // const occurrence = '' + // const occurrence = {} // Imports the Containeranalysis library const {GrafeasV1Beta1Client} = @@ -36,7 +36,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function createOccurrence() { + async function callCreateOccurrence() { // Construct request const request = {}; @@ -45,7 +45,7 @@ function main() { console.log(response); } - createOccurrence(); + callCreateOccurrence(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js index 40123ca1116..0334008e363 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function deleteNote() { + async function callDeleteNote() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - deleteNote(); + callDeleteNote(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js index ae0c7c63f57..f686e70a18f 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function deleteOccurrence() { + async function callDeleteOccurrence() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - deleteOccurrence(); + callDeleteOccurrence(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js index f147f45cc8c..45c8225b6dc 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_note.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function getNote() { + async function callGetNote() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getNote(); + callGetNote(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js index 56b7f363341..06d30f30870 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function getOccurrence() { + async function callGetOccurrence() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getOccurrence(); + callGetOccurrence(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js index 5729c241f0f..102b236a3d9 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js @@ -32,7 +32,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function getOccurrenceNote() { + async function callGetOccurrenceNote() { // Construct request const request = {}; @@ -41,7 +41,7 @@ function main() { console.log(response); } - getOccurrenceNote(); + callGetOccurrenceNote(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js index bceb9d7206f..44e721f3e7a 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js @@ -36,7 +36,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function getVulnerabilityOccurrencesSummary() { + async function callGetVulnerabilityOccurrencesSummary() { // Construct request const request = {}; @@ -46,7 +46,7 @@ function main() { console.log(response); } - getVulnerabilityOccurrencesSummary(); + callGetVulnerabilityOccurrencesSummary(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js index ac67266114e..0b0270d96c8 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function listNoteOccurrences() { + async function callListNoteOccurrences() { // Construct request const request = {}; @@ -57,7 +57,7 @@ function main() { } } - listNoteOccurrences(); + callListNoteOccurrences(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js index 34fe069428d..73a40434db7 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function listNotes() { + async function callListNotes() { // Construct request const request = {}; @@ -55,7 +55,7 @@ function main() { } } - listNotes(); + callListNotes(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js index 5283d89bd1e..3ed8e6c7d29 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js @@ -44,7 +44,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function listOccurrences() { + async function callListOccurrences() { // Construct request const request = {}; @@ -57,7 +57,7 @@ function main() { } } - listOccurrences(); + callListOccurrences(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js index 473d6b15201..e3adf4b1a3d 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_note.js @@ -27,11 +27,11 @@ function main() { /** * The updated note. */ - // const note = '' + // const note = {} /** * The fields to update. */ - // const updateMask = '' + // const updateMask = {} // Imports the Containeranalysis library const {GrafeasV1Beta1Client} = @@ -40,7 +40,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function updateNote() { + async function callUpdateNote() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - updateNote(); + callUpdateNote(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_async] } diff --git a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js index 3485aba95d4..b2c6995c352 100644 --- a/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js +++ b/packages/google-devtools-containeranalysis/samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js @@ -27,11 +27,11 @@ function main() { /** * The updated occurrence. */ - // const occurrence = '' + // const occurrence = {} /** * The fields to update. */ - // const updateMask = '' + // const updateMask = {} // Imports the Containeranalysis library const {GrafeasV1Beta1Client} = @@ -40,7 +40,7 @@ function main() { // Instantiates a client const containeranalysisClient = new GrafeasV1Beta1Client(); - async function updateOccurrence() { + async function callUpdateOccurrence() { // Construct request const request = {}; @@ -49,7 +49,7 @@ function main() { console.log(response); } - updateOccurrence(); + callUpdateOccurrence(); // [END containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_async] } diff --git a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts index 67019bc8fd2..4e84480039c 100644 --- a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts @@ -316,33 +316,6 @@ export class ContainerAnalysisClient { // ------------------- // -- Service calls -- // ------------------- - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Sets the access control policy on the specified note or occurrence. * Requires `containeranalysis.notes.setIamPolicy` or @@ -370,9 +343,36 @@ export class ContainerAnalysisClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.setIamPolicy(request); + * @example include:samples/generated/v1/container_analysis.set_iam_policy.js + * region_tag:containeranalysis_v1_generated_ContainerAnalysis_SetIamPolicy_async */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; setIamPolicy( request?: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: @@ -412,6 +412,34 @@ export class ContainerAnalysisClient { this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } + /** + * Gets the access control policy for a note or an occurrence resource. + * Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource is + * a note or occurrence, respectively. + * + * The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + * notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + * occurrences. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * @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 [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/container_analysis.get_iam_policy.js + * region_tag:containeranalysis_v1_generated_ContainerAnalysis_GetIamPolicy_async + */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions @@ -439,34 +467,6 @@ export class ContainerAnalysisClient { {} | null | undefined > ): void; - /** - * Gets the access control policy for a note or an occurrence resource. - * Requires `containeranalysis.notes.setIamPolicy` or - * `containeranalysis.occurrences.setIamPolicy` permission if the resource is - * a note or occurrence, respectively. - * - * The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for - * notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for - * occurrences. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * @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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getIamPolicy(request); - */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: @@ -506,33 +506,6 @@ export class ContainerAnalysisClient { this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Returns the permissions that a caller has on the specified note or * occurrence. Requires list permission on the project (for example, @@ -559,9 +532,36 @@ export class ContainerAnalysisClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.testIamPermissions(request); + * @example include:samples/generated/v1/container_analysis.test_iam_permissions.js + * region_tag:containeranalysis_v1_generated_ContainerAnalysis_TestIamPermissions_async */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; testIamPermissions( request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: @@ -601,6 +601,26 @@ export class ContainerAnalysisClient { this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } + /** + * 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 [VulnerabilityOccurrencesSummary]{@link google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/container_analysis.get_vulnerability_occurrences_summary.js + * region_tag:containeranalysis_v1_generated_ContainerAnalysis_GetVulnerabilityOccurrencesSummary_async + */ getVulnerabilityOccurrencesSummary( request?: protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest, options?: CallOptions @@ -635,26 +655,6 @@ export class ContainerAnalysisClient { {} | 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 [VulnerabilityOccurrencesSummary]{@link google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getVulnerabilityOccurrencesSummary(request); - */ getVulnerabilityOccurrencesSummary( request?: protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest, optionsOrCallback?: diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts index 7c1a5eaccad..b6834fdffd8 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/container_analysis_v1_beta1_client.ts @@ -335,33 +335,6 @@ export class ContainerAnalysisV1Beta1Client { // ------------------- // -- Service calls -- // ------------------- - setIamPolicy( - request?: protos.google.iam.v1.ISetIamPolicyRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | undefined, - {} | undefined - ] - >; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; - setIamPolicy( - request: protos.google.iam.v1.ISetIamPolicyRequest, - callback: Callback< - protos.google.iam.v1.IPolicy, - protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Sets the access control policy on the specified note or occurrence. * Requires `containeranalysis.notes.setIamPolicy` or @@ -389,9 +362,36 @@ export class ContainerAnalysisV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.setIamPolicy(request); + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.set_iam_policy.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_SetIamPolicy_async */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | undefined, + {} | undefined + ] + >; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): void; setIamPolicy( request?: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: @@ -431,6 +431,34 @@ export class ContainerAnalysisV1Beta1Client { this.initialize(); return this.innerApiCalls.setIamPolicy(request, options, callback); } + /** + * Gets the access control policy for a note or an occurrence resource. + * Requires `containeranalysis.notes.setIamPolicy` or + * `containeranalysis.occurrences.setIamPolicy` permission if the resource is + * a note or occurrence, respectively. + * + * The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for + * notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for + * occurrences. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * @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 [Policy]{@link google.iam.v1.Policy}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.get_iam_policy.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetIamPolicy_async + */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions @@ -458,34 +486,6 @@ export class ContainerAnalysisV1Beta1Client { {} | null | undefined > ): void; - /** - * Gets the access control policy for a note or an occurrence resource. - * Requires `containeranalysis.notes.setIamPolicy` or - * `containeranalysis.occurrences.setIamPolicy` permission if the resource is - * a note or occurrence, respectively. - * - * The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for - * notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for - * occurrences. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {google.iam.v1.GetPolicyOptions} request.options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * @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 [Policy]{@link google.iam.v1.Policy}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getIamPolicy(request); - */ getIamPolicy( request?: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: @@ -525,33 +525,6 @@ export class ContainerAnalysisV1Beta1Client { this.initialize(); return this.innerApiCalls.getIamPolicy(request, options, callback); } - testIamPermissions( - request?: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | undefined, - {} | undefined - ] - >; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: CallOptions, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; - testIamPermissions( - request: protos.google.iam.v1.ITestIamPermissionsRequest, - callback: Callback< - protos.google.iam.v1.ITestIamPermissionsResponse, - protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, - {} | null | undefined - > - ): void; /** * Returns the permissions that a caller has on the specified note or * occurrence. Requires list permission on the project (for example, @@ -578,9 +551,36 @@ export class ContainerAnalysisV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.testIamPermissions(request); + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.test_iam_permissions.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_TestIamPermissions_async */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | undefined, + {} | undefined + ] + >; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): void; testIamPermissions( request?: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: @@ -620,6 +620,24 @@ export class ContainerAnalysisV1Beta1Client { this.initialize(); return this.innerApiCalls.testIamPermissions(request, options, callback); } + /** + * Gets the specified scan configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the scan configuration in the form of + * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.get_scan_config.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_GetScanConfig_async + */ getScanConfig( request?: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, options?: CallOptions @@ -654,24 +672,6 @@ export class ContainerAnalysisV1Beta1Client { {} | null | undefined > ): void; - /** - * Gets the specified scan configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the scan configuration in the form of - * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getScanConfig(request); - */ getScanConfig( request?: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, optionsOrCallback?: @@ -718,6 +718,26 @@ export class ContainerAnalysisV1Beta1Client { this.initialize(); return this.innerApiCalls.getScanConfig(request, options, callback); } + /** + * Updates the specified scan configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the scan configuration in the form of + * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. + * @param {google.devtools.containeranalysis.v1beta1.ScanConfig} request.scanConfig + * Required. The updated scan configuration. + * @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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.update_scan_config.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_UpdateScanConfig_async + */ updateScanConfig( request?: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, options?: CallOptions @@ -752,26 +772,6 @@ export class ContainerAnalysisV1Beta1Client { {} | null | undefined > ): void; - /** - * Updates the specified scan configuration. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the scan configuration in the form of - * `projects/[PROJECT_ID]/scanConfigs/[SCAN_CONFIG_ID]`. - * @param {google.devtools.containeranalysis.v1beta1.ScanConfig} request.scanConfig - * Required. The updated scan configuration. - * @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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateScanConfig(request); - */ updateScanConfig( request?: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, optionsOrCallback?: @@ -819,6 +819,33 @@ export class ContainerAnalysisV1Beta1Client { return this.innerApiCalls.updateScanConfig(request, options, callback); } + /** + * Lists scan configurations for the specified project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project to list scan configurations for in the form of + * `projects/[PROJECT_ID]`. + * @param {string} request.filter + * Required. The filter expression. + * @param {number} request.pageSize + * The number of scan configs 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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. + * 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 `listScanConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ listScanConfigs( request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, options?: CallOptions @@ -850,33 +877,6 @@ export class ContainerAnalysisV1Beta1Client { protos.google.devtools.containeranalysis.v1beta1.IScanConfig > ): void; - /** - * Lists scan configurations for the specified project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project to list scan configurations for in the form of - * `projects/[PROJECT_ID]`. - * @param {string} request.filter - * Required. The filter expression. - * @param {number} request.pageSize - * The number of scan configs 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 [ScanConfig]{@link google.devtools.containeranalysis.v1beta1.ScanConfig}. - * 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 `listScanConfigsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) - * for more details and examples. - */ listScanConfigs( request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, optionsOrCallback?: @@ -993,11 +993,8 @@ export class ContainerAnalysisV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listScanConfigsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/container_analysis_v1_beta1.list_scan_configs.js + * region_tag:containeranalysis_v1beta1_generated_ContainerAnalysisV1Beta1_ListScanConfigs_async */ listScanConfigsAsync( request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, @@ -1011,7 +1008,6 @@ export class ContainerAnalysisV1Beta1Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listScanConfigs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); diff --git a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts index f9c5f8285d7..70498a058c3 100644 --- a/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1beta1/grafeas_v1_beta1_client.ts @@ -350,6 +350,24 @@ export class GrafeasV1Beta1Client { // ------------------- // -- Service calls -- // ------------------- + /** + * 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrence_async + */ getOccurrence( request?: protos.grafeas.v1beta1.IGetOccurrenceRequest, options?: CallOptions @@ -377,24 +395,6 @@ export class GrafeasV1Beta1Client { {} | null | 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getOccurrence(request); - */ getOccurrence( request?: protos.grafeas.v1beta1.IGetOccurrenceRequest, optionsOrCallback?: @@ -434,6 +434,26 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.getOccurrence(request, options, callback); } + /** + * 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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.delete_occurrence.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteOccurrence_async + */ deleteOccurrence( request?: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, options?: CallOptions @@ -461,26 +481,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteOccurrence(request); - */ deleteOccurrence( request?: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, optionsOrCallback?: @@ -520,6 +520,26 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.deleteOccurrence(request, options, callback); } + /** + * 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.create_occurrence.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateOccurrence_async + */ createOccurrence( request?: protos.grafeas.v1beta1.ICreateOccurrenceRequest, options?: CallOptions @@ -547,26 +567,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createOccurrence(request); - */ createOccurrence( request?: protos.grafeas.v1beta1.ICreateOccurrenceRequest, optionsOrCallback?: @@ -606,6 +606,26 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.createOccurrence(request, options, callback); } + /** + * 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 [BatchCreateOccurrencesResponse]{@link grafeas.v1beta1.BatchCreateOccurrencesResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.batch_create_occurrences.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_BatchCreateOccurrences_async + */ batchCreateOccurrences( request?: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, options?: CallOptions @@ -633,26 +653,6 @@ export class GrafeasV1Beta1Client { {} | 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 [BatchCreateOccurrencesResponse]{@link grafeas.v1beta1.BatchCreateOccurrencesResponse}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.batchCreateOccurrences(request); - */ batchCreateOccurrences( request?: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, optionsOrCallback?: @@ -698,6 +698,28 @@ export class GrafeasV1Beta1Client { callback ); } + /** + * 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.update_occurrence.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateOccurrence_async + */ updateOccurrence( request?: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, options?: CallOptions @@ -725,28 +747,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Occurrence]{@link grafeas.v1beta1.Occurrence}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateOccurrence(request); - */ updateOccurrence( request?: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, optionsOrCallback?: @@ -786,6 +786,25 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.updateOccurrence(request, options, callback); } + /** + * 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 [Note]{@link grafeas.v1beta1.Note}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.get_occurrence_note.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetOccurrenceNote_async + */ getOccurrenceNote( request?: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, options?: CallOptions @@ -813,25 +832,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Note]{@link grafeas.v1beta1.Note}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getOccurrenceNote(request); - */ getOccurrenceNote( request?: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, optionsOrCallback?: @@ -871,6 +871,24 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.getOccurrenceNote(request, options, callback); } + /** + * 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 [Note]{@link grafeas.v1beta1.Note}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.get_note.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetNote_async + */ getNote( request?: protos.grafeas.v1beta1.IGetNoteRequest, options?: CallOptions @@ -898,24 +916,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Note]{@link grafeas.v1beta1.Note}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getNote(request); - */ getNote( request?: protos.grafeas.v1beta1.IGetNoteRequest, optionsOrCallback?: @@ -955,6 +955,24 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.getNote(request, options, callback); } + /** + * 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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.delete_note.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_DeleteNote_async + */ deleteNote( request?: protos.grafeas.v1beta1.IDeleteNoteRequest, options?: CallOptions @@ -982,24 +1000,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteNote(request); - */ deleteNote( request?: protos.grafeas.v1beta1.IDeleteNoteRequest, optionsOrCallback?: @@ -1039,6 +1039,28 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.deleteNote(request, options, callback); } + /** + * 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 [Note]{@link grafeas.v1beta1.Note}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.create_note.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_CreateNote_async + */ createNote( request?: protos.grafeas.v1beta1.ICreateNoteRequest, options?: CallOptions @@ -1066,28 +1088,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Note]{@link grafeas.v1beta1.Note}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.createNote(request); - */ createNote( request?: protos.grafeas.v1beta1.ICreateNoteRequest, optionsOrCallback?: @@ -1127,33 +1127,6 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.createNote(request, options, callback); } - 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; /** * Creates new notes in batch. * @@ -1171,9 +1144,36 @@ export class GrafeasV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. - * @example - * const [response] = await client.batchCreateNotes(request); + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.batch_create_notes.js + * 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; batchCreateNotes( request?: protos.grafeas.v1beta1.IBatchCreateNotesRequest, optionsOrCallback?: @@ -1213,6 +1213,28 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.batchCreateNotes(request, options, callback); } + /** + * 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 [Note]{@link grafeas.v1beta1.Note}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.update_note.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_UpdateNote_async + */ updateNote( request?: protos.grafeas.v1beta1.IUpdateNoteRequest, options?: CallOptions @@ -1240,28 +1262,6 @@ export class GrafeasV1Beta1Client { {} | 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 [Note]{@link grafeas.v1beta1.Note}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.updateNote(request); - */ updateNote( request?: protos.grafeas.v1beta1.IUpdateNoteRequest, optionsOrCallback?: @@ -1301,6 +1301,26 @@ export class GrafeasV1Beta1Client { this.initialize(); return this.innerApiCalls.updateNote(request, options, callback); } + /** + * 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 [VulnerabilityOccurrencesSummary]{@link grafeas.v1beta1.VulnerabilityOccurrencesSummary}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.get_vulnerability_occurrences_summary.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_GetVulnerabilityOccurrencesSummary_async + */ getVulnerabilityOccurrencesSummary( request?: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, options?: CallOptions @@ -1335,26 +1355,6 @@ export class GrafeasV1Beta1Client { {} | 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 [VulnerabilityOccurrencesSummary]{@link grafeas.v1beta1.VulnerabilityOccurrencesSummary}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.getVulnerabilityOccurrencesSummary(request); - */ getVulnerabilityOccurrencesSummary( request?: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, optionsOrCallback?: @@ -1406,33 +1406,6 @@ export class GrafeasV1Beta1Client { ); } - 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; /** * Lists occurrences for the specified project. * @@ -1460,6 +1433,33 @@ export class GrafeasV1Beta1Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * 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; listOccurrences( request?: protos.grafeas.v1beta1.IListOccurrencesRequest, optionsOrCallback?: @@ -1572,11 +1572,8 @@ export class GrafeasV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listOccurrencesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.list_occurrences.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListOccurrences_async */ listOccurrencesAsync( request?: protos.grafeas.v1beta1.IListOccurrencesRequest, @@ -1590,7 +1587,6 @@ export class GrafeasV1Beta1Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listOccurrences']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1600,33 +1596,6 @@ export class GrafeasV1Beta1Client { callSettings ) as AsyncIterable; } - 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; /** * Lists notes for the specified project. * @@ -1654,6 +1623,33 @@ export class GrafeasV1Beta1Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * 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; listNotes( request?: protos.grafeas.v1beta1.IListNotesRequest, optionsOrCallback?: @@ -1766,11 +1762,8 @@ export class GrafeasV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listNotesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.list_notes.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNotes_async */ listNotesAsync( request?: protos.grafeas.v1beta1.IListNotesRequest, @@ -1784,7 +1777,6 @@ export class GrafeasV1Beta1Client { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listNotes']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -1794,33 +1786,6 @@ export class GrafeasV1Beta1Client { callSettings ) as AsyncIterable; } - 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; /** * Lists occurrences referencing the specified note. Provider projects can use * this method to get all occurrences across consumer projects referencing the @@ -1850,6 +1815,33 @@ export class GrafeasV1Beta1Client { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * 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; listNoteOccurrences( request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, optionsOrCallback?: @@ -1964,11 +1956,8 @@ export class GrafeasV1Beta1Client { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. - * @example - * const iterable = client.listNoteOccurrencesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/grafeas_v1_beta1.list_note_occurrences.js + * region_tag:containeranalysis_v1beta1_generated_GrafeasV1Beta1_ListNoteOccurrences_async */ listNoteOccurrencesAsync( request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, @@ -1982,7 +1971,6 @@ export class GrafeasV1Beta1Client { gax.routingHeader.fromParams({ name: request.name || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listNoteOccurrences']; const callSettings = defaultCallSettings.merge(options); this.initialize();