From 308506e01235386dc41659a0bde8b6da852a57ca Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 13:28:32 -0800 Subject: [PATCH] fix(browser): check for fetch on window (#267) --- .../protos/protos.json | 496 ++++++++++++++++-- .../src/v1/container_analysis_client.ts | 56 +- .../container_analysis_v1_beta1_client.ts | 80 +-- .../src/v1beta1/grafeas_v1_beta1_client.ts | 178 ++++--- .../synth.metadata | 8 +- 5 files changed, 627 insertions(+), 191 deletions(-) diff --git a/packages/google-devtools-containeranalysis/protos/protos.json b/packages/google-devtools-containeranalysis/protos/protos.json index e5431175829..e3ec3854ed0 100644 --- a/packages/google-devtools-containeranalysis/protos/protos.json +++ b/packages/google-devtools-containeranalysis/protos/protos.json @@ -924,7 +924,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/occurrences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListOccurrences": { "requestType": "ListOccurrencesRequest", @@ -932,7 +942,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*}/occurrences", "(google.api.method_signature)": "parent,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/occurrences" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] }, "DeleteOccurrence": { "requestType": "DeleteOccurrenceRequest", @@ -940,7 +960,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/occurrences/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/occurrences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateOccurrence": { "requestType": "CreateOccurrenceRequest", @@ -949,7 +979,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/occurrences", "(google.api.http).body": "occurrence", "(google.api.method_signature)": "parent,occurrence" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/occurrences", + "body": "occurrence" + } + }, + { + "(google.api.method_signature)": "parent,occurrence" + } + ] }, "BatchCreateOccurrences": { "requestType": "BatchCreateOccurrencesRequest", @@ -958,7 +999,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/occurrences:batchCreate", "(google.api.http).body": "*", "(google.api.method_signature)": "parent,occurrences" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/occurrences:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,occurrences" + } + ] }, "UpdateOccurrence": { "requestType": "UpdateOccurrenceRequest", @@ -967,7 +1019,18 @@ "(google.api.http).patch": "/v1/{name=projects/*/occurrences/*}", "(google.api.http).body": "occurrence", "(google.api.method_signature)": "name,occurrence,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/occurrences/*}", + "body": "occurrence" + } + }, + { + "(google.api.method_signature)": "name,occurrence,update_mask" + } + ] }, "GetOccurrenceNote": { "requestType": "GetOccurrenceNoteRequest", @@ -975,7 +1038,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/occurrences/*}/notes", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/occurrences/*}/notes" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetNote": { "requestType": "GetNoteRequest", @@ -983,7 +1056,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/notes/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/notes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListNotes": { "requestType": "ListNotesRequest", @@ -991,7 +1074,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*}/notes", "(google.api.method_signature)": "parent,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/notes" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] }, "DeleteNote": { "requestType": "DeleteNoteRequest", @@ -999,7 +1092,17 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/notes/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/notes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateNote": { "requestType": "CreateNoteRequest", @@ -1008,7 +1111,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/notes", "(google.api.http).body": "note", "(google.api.method_signature)": "parent,note_id,note" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/notes", + "body": "note" + } + }, + { + "(google.api.method_signature)": "parent,note_id,note" + } + ] }, "BatchCreateNotes": { "requestType": "BatchCreateNotesRequest", @@ -1017,7 +1131,18 @@ "(google.api.http).post": "/v1/{parent=projects/*}/notes:batchCreate", "(google.api.http).body": "*", "(google.api.method_signature)": "parent,notes" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*}/notes:batchCreate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,notes" + } + ] }, "UpdateNote": { "requestType": "UpdateNoteRequest", @@ -1026,7 +1151,18 @@ "(google.api.http).patch": "/v1/{name=projects/*/notes/*}", "(google.api.http).body": "note", "(google.api.method_signature)": "name,note,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/notes/*}", + "body": "note" + } + }, + { + "(google.api.method_signature)": "name,note,update_mask" + } + ] }, "ListNoteOccurrences": { "requestType": "ListNoteOccurrencesRequest", @@ -1034,7 +1170,17 @@ "options": { "(google.api.http).get": "/v1/{name=projects/*/notes/*}/occurrences", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/notes/*}/occurrences" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] } } }, @@ -2706,21 +2852,42 @@ "responseType": "Occurrence", "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/occurrences/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/occurrences/*}" + } + } + ] }, "ListOccurrences": { "requestType": "ListOccurrencesRequest", "responseType": "ListOccurrencesResponse", "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*}/occurrences" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/occurrences" + } + } + ] }, "DeleteOccurrence": { "requestType": "DeleteOccurrenceRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/occurrences/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/occurrences/*}" + } + } + ] }, "CreateOccurrence": { "requestType": "CreateOccurrenceRequest", @@ -2728,7 +2895,15 @@ "options": { "(google.api.http).post": "/v1beta1/{parent=projects/*}/occurrences", "(google.api.http).body": "occurrence" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/occurrences", + "body": "occurrence" + } + } + ] }, "BatchCreateOccurrences": { "requestType": "BatchCreateOccurrencesRequest", @@ -2736,7 +2911,15 @@ "options": { "(google.api.http).post": "/v1beta1/{parent=projects/*}/occurrences:batchCreate", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/occurrences:batchCreate", + "body": "*" + } + } + ] }, "UpdateOccurrence": { "requestType": "UpdateOccurrenceRequest", @@ -2744,35 +2927,71 @@ "options": { "(google.api.http).patch": "/v1beta1/{name=projects/*/occurrences/*}", "(google.api.http).body": "occurrence" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{name=projects/*/occurrences/*}", + "body": "occurrence" + } + } + ] }, "GetOccurrenceNote": { "requestType": "GetOccurrenceNoteRequest", "responseType": "Note", "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/occurrences/*}/notes" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/occurrences/*}/notes" + } + } + ] }, "GetNote": { "requestType": "GetNoteRequest", "responseType": "Note", "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/notes/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/notes/*}" + } + } + ] }, "ListNotes": { "requestType": "ListNotesRequest", "responseType": "ListNotesResponse", "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*}/notes" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/notes" + } + } + ] }, "DeleteNote": { "requestType": "DeleteNoteRequest", "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1beta1/{name=projects/*/notes/*}" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/notes/*}" + } + } + ] }, "CreateNote": { "requestType": "CreateNoteRequest", @@ -2780,7 +2999,15 @@ "options": { "(google.api.http).post": "/v1beta1/{parent=projects/*}/notes", "(google.api.http).body": "note" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/notes", + "body": "note" + } + } + ] }, "BatchCreateNotes": { "requestType": "BatchCreateNotesRequest", @@ -2788,7 +3015,15 @@ "options": { "(google.api.http).post": "/v1beta1/{parent=projects/*}/notes:batchCreate", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*}/notes:batchCreate", + "body": "*" + } + } + ] }, "UpdateNote": { "requestType": "UpdateNoteRequest", @@ -2796,21 +3031,43 @@ "options": { "(google.api.http).patch": "/v1beta1/{name=projects/*/notes/*}", "(google.api.http).body": "note" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{name=projects/*/notes/*}", + "body": "note" + } + } + ] }, "ListNoteOccurrences": { "requestType": "ListNoteOccurrencesRequest", "responseType": "ListNoteOccurrencesResponse", "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/notes/*}/occurrences" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/notes/*}/occurrences" + } + } + ] }, "GetVulnerabilityOccurrencesSummary": { "requestType": "GetVulnerabilityOccurrencesSummaryRequest", "responseType": "VulnerabilityOccurrencesSummary", "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/occurrences:vulnerabilitySummary" + } + } + ] } } }, @@ -3536,7 +3793,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/occurrences/*}:setIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/notes/*}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/occurrences/*}:setIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] }, "GetIamPolicy": { "requestType": "google.iam.v1.GetIamPolicyRequest", @@ -3547,7 +3819,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/occurrences/*}:getIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/notes/*}:getIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/occurrences/*}:getIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] }, "TestIamPermissions": { "requestType": "google.iam.v1.TestIamPermissionsRequest", @@ -3558,7 +3845,22 @@ "(google.api.http).additional_bindings.post": "/v1/{resource=projects/*/occurrences/*}:testIamPermissions", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,permissions" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=projects/*/notes/*}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v1/{resource=projects/*/occurrences/*}:testIamPermissions", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] }, "GetVulnerabilityOccurrencesSummary": { "requestType": "GetVulnerabilityOccurrencesSummaryRequest", @@ -3566,7 +3868,17 @@ "options": { "(google.api.http).get": "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary", "(google.api.method_signature)": "parent,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] } } }, @@ -3642,7 +3954,22 @@ "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/occurrences/*}:setIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{resource=projects/*/notes/*}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/{resource=projects/*/occurrences/*}:setIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] }, "GetIamPolicy": { "requestType": "google.iam.v1.GetIamPolicyRequest", @@ -3653,7 +3980,22 @@ "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/occurrences/*}:getIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{resource=projects/*/notes/*}:getIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/{resource=projects/*/occurrences/*}:getIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] }, "TestIamPermissions": { "requestType": "google.iam.v1.TestIamPermissionsRequest", @@ -3664,7 +4006,22 @@ "(google.api.http).additional_bindings.post": "/v1beta1/{resource=projects/*/occurrences/*}:testIamPermissions", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,permissions" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{resource=projects/*/notes/*}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v1beta1/{resource=projects/*/occurrences/*}:testIamPermissions", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] }, "GetScanConfig": { "requestType": "GetScanConfigRequest", @@ -3672,7 +4029,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/scanConfigs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/scanConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListScanConfigs": { "requestType": "ListScanConfigsRequest", @@ -3680,7 +4047,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*}/scanConfigs", "(google.api.method_signature)": "parent,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*}/scanConfigs" + } + }, + { + "(google.api.method_signature)": "parent,filter" + } + ] }, "UpdateScanConfig": { "requestType": "UpdateScanConfigRequest", @@ -3689,7 +4066,18 @@ "(google.api.http).put": "/v1beta1/{name=projects/*/scanConfigs/*}", "(google.api.http).body": "scan_config", "(google.api.method_signature)": "name,scan_config" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/{name=projects/*/scanConfigs/*}", + "body": "scan_config" + } + }, + { + "(google.api.method_signature)": "name,scan_config" + } + ] } } }, @@ -4952,7 +5340,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:setIamPolicy", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:setIamPolicy", + "body": "*" + } + } + ] }, "GetIamPolicy": { "requestType": "GetIamPolicyRequest", @@ -4960,7 +5356,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:getIamPolicy", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:getIamPolicy", + "body": "*" + } + } + ] }, "TestIamPermissions": { "requestType": "TestIamPermissionsRequest", @@ -4968,7 +5372,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] } } }, 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 dddfb19e3cb..76485f90a27 100644 --- a/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts +++ b/packages/google-devtools-containeranalysis/src/v1/container_analysis_client.ts @@ -16,12 +16,18 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import {Callback, CallOptions, Descriptors, ClientOptions} from 'google-gax'; import * as path from 'path'; import {GrafeasClient} from '@google-cloud/grafeas'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/container_analysis_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './container_analysis_client_config.json'; const version = require('../../../package.json').version; @@ -87,9 +93,9 @@ export class ContainerAnalysisClient { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -102,7 +108,9 @@ export class ContainerAnalysisClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -307,7 +315,7 @@ export class ContainerAnalysisClient { // ------------------- setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -317,7 +325,7 @@ export class ContainerAnalysisClient { >; setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -365,7 +373,7 @@ export class ContainerAnalysisClient { setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -384,12 +392,12 @@ export class ContainerAnalysisClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -404,7 +412,7 @@ export class ContainerAnalysisClient { } getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -414,7 +422,7 @@ export class ContainerAnalysisClient { >; getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -460,7 +468,7 @@ export class ContainerAnalysisClient { getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -479,12 +487,12 @@ export class ContainerAnalysisClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -499,7 +507,7 @@ export class ContainerAnalysisClient { } testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.ITestIamPermissionsResponse, @@ -509,7 +517,7 @@ export class ContainerAnalysisClient { >; testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -556,7 +564,7 @@ export class ContainerAnalysisClient { testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -575,12 +583,12 @@ export class ContainerAnalysisClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -595,7 +603,7 @@ export class ContainerAnalysisClient { } getVulnerabilityOccurrencesSummary( request: protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.containeranalysis.v1.IVulnerabilityOccurrencesSummary, @@ -608,7 +616,7 @@ export class ContainerAnalysisClient { >; getVulnerabilityOccurrencesSummary( request: protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.containeranalysis.v1.IVulnerabilityOccurrencesSummary, | protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest @@ -650,7 +658,7 @@ export class ContainerAnalysisClient { getVulnerabilityOccurrencesSummary( request: protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.containeranalysis.v1.IVulnerabilityOccurrencesSummary, | protos.google.devtools.containeranalysis.v1.IGetVulnerabilityOccurrencesSummaryRequest @@ -676,12 +684,12 @@ export class ContainerAnalysisClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; 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 0d2b918a3e9..0db5ec1e498 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 @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/container_analysis_v1_beta1_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './container_analysis_v1_beta1_client_config.json'; const version = require('../../../package.json').version; @@ -95,9 +101,9 @@ export class ContainerAnalysisV1Beta1Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -111,7 +117,9 @@ export class ContainerAnalysisV1Beta1Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -326,7 +334,7 @@ export class ContainerAnalysisV1Beta1Client { // ------------------- setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -336,7 +344,7 @@ export class ContainerAnalysisV1Beta1Client { >; setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -384,7 +392,7 @@ export class ContainerAnalysisV1Beta1Client { setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -403,12 +411,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -423,7 +431,7 @@ export class ContainerAnalysisV1Beta1Client { } getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -433,7 +441,7 @@ export class ContainerAnalysisV1Beta1Client { >; getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -479,7 +487,7 @@ export class ContainerAnalysisV1Beta1Client { getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -498,12 +506,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -518,7 +526,7 @@ export class ContainerAnalysisV1Beta1Client { } testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.ITestIamPermissionsResponse, @@ -528,7 +536,7 @@ export class ContainerAnalysisV1Beta1Client { >; testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -575,7 +583,7 @@ export class ContainerAnalysisV1Beta1Client { testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -594,12 +602,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -614,7 +622,7 @@ export class ContainerAnalysisV1Beta1Client { } getScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.containeranalysis.v1beta1.IScanConfig, @@ -627,7 +635,7 @@ export class ContainerAnalysisV1Beta1Client { >; getScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.containeranalysis.v1beta1.IScanConfig, | protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest @@ -667,7 +675,7 @@ export class ContainerAnalysisV1Beta1Client { getScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.containeranalysis.v1beta1.IScanConfig, | protos.google.devtools.containeranalysis.v1beta1.IGetScanConfigRequest @@ -693,12 +701,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -713,7 +721,7 @@ export class ContainerAnalysisV1Beta1Client { } updateScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.containeranalysis.v1beta1.IScanConfig, @@ -726,7 +734,7 @@ export class ContainerAnalysisV1Beta1Client { >; updateScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.containeranalysis.v1beta1.IScanConfig, | protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest @@ -768,7 +776,7 @@ export class ContainerAnalysisV1Beta1Client { updateScanConfig( request: protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.containeranalysis.v1beta1.IScanConfig, | protos.google.devtools.containeranalysis.v1beta1.IUpdateScanConfigRequest @@ -794,12 +802,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -815,7 +823,7 @@ export class ContainerAnalysisV1Beta1Client { listScanConfigs( request: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.containeranalysis.v1beta1.IScanConfig[], @@ -825,7 +833,7 @@ export class ContainerAnalysisV1Beta1Client { >; listScanConfigs( request: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, | protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse @@ -874,7 +882,7 @@ export class ContainerAnalysisV1Beta1Client { listScanConfigs( request: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, | protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsResponse @@ -897,12 +905,12 @@ export class ContainerAnalysisV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -943,7 +951,7 @@ export class ContainerAnalysisV1Beta1Client { */ listScanConfigsStream( request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -996,7 +1004,7 @@ export class ContainerAnalysisV1Beta1Client { */ listScanConfigsAsync( request?: protos.google.devtools.containeranalysis.v1beta1.IListScanConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable< protos.google.devtools.containeranalysis.v1beta1.IScanConfig > { 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 ca7fad92db7..3888c4ef476 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 @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -30,6 +31,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/grafeas_v1_beta1_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './grafeas_v1_beta1_client_config.json'; const version = require('../../../package.json').version; @@ -96,9 +102,9 @@ export class GrafeasV1Beta1Client { * your project ID will be detected automatically. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - client configuration override. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -111,7 +117,9 @@ export class GrafeasV1Beta1Client { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -341,7 +349,7 @@ export class GrafeasV1Beta1Client { // ------------------- getOccurrence( request: protos.grafeas.v1beta1.IGetOccurrenceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IOccurrence, @@ -351,7 +359,7 @@ export class GrafeasV1Beta1Client { >; getOccurrence( request: protos.grafeas.v1beta1.IGetOccurrenceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IGetOccurrenceRequest | null | undefined, @@ -387,7 +395,7 @@ export class GrafeasV1Beta1Client { getOccurrence( request: protos.grafeas.v1beta1.IGetOccurrenceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IGetOccurrenceRequest | null | undefined, @@ -406,12 +414,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -426,7 +434,7 @@ export class GrafeasV1Beta1Client { } deleteOccurrence( request: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -436,7 +444,7 @@ export class GrafeasV1Beta1Client { >; deleteOccurrence( request: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteOccurrenceRequest | null | undefined, @@ -474,7 +482,7 @@ export class GrafeasV1Beta1Client { deleteOccurrence( request: protos.grafeas.v1beta1.IDeleteOccurrenceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteOccurrenceRequest | null | undefined, @@ -493,12 +501,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -513,7 +521,7 @@ export class GrafeasV1Beta1Client { } createOccurrence( request: protos.grafeas.v1beta1.ICreateOccurrenceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IOccurrence, @@ -523,7 +531,7 @@ export class GrafeasV1Beta1Client { >; createOccurrence( request: protos.grafeas.v1beta1.ICreateOccurrenceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.ICreateOccurrenceRequest | null | undefined, @@ -561,7 +569,7 @@ export class GrafeasV1Beta1Client { createOccurrence( request: protos.grafeas.v1beta1.ICreateOccurrenceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.ICreateOccurrenceRequest | null | undefined, @@ -580,12 +588,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -600,7 +608,7 @@ export class GrafeasV1Beta1Client { } batchCreateOccurrences( request: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, @@ -610,7 +618,7 @@ export class GrafeasV1Beta1Client { >; batchCreateOccurrences( request: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest | null | undefined, @@ -648,7 +656,7 @@ export class GrafeasV1Beta1Client { batchCreateOccurrences( request: protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IBatchCreateOccurrencesResponse, | protos.grafeas.v1beta1.IBatchCreateOccurrencesRequest @@ -669,12 +677,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -693,7 +701,7 @@ export class GrafeasV1Beta1Client { } updateOccurrence( request: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IOccurrence, @@ -703,7 +711,7 @@ export class GrafeasV1Beta1Client { >; updateOccurrence( request: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IUpdateOccurrenceRequest | null | undefined, @@ -743,7 +751,7 @@ export class GrafeasV1Beta1Client { updateOccurrence( request: protos.grafeas.v1beta1.IUpdateOccurrenceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IOccurrence, protos.grafeas.v1beta1.IUpdateOccurrenceRequest | null | undefined, @@ -762,12 +770,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -782,7 +790,7 @@ export class GrafeasV1Beta1Client { } getOccurrenceNote( request: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.INote, @@ -792,7 +800,7 @@ export class GrafeasV1Beta1Client { >; getOccurrenceNote( request: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetOccurrenceNoteRequest | null | undefined, @@ -829,7 +837,7 @@ export class GrafeasV1Beta1Client { getOccurrenceNote( request: protos.grafeas.v1beta1.IGetOccurrenceNoteRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetOccurrenceNoteRequest | null | undefined, @@ -848,12 +856,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -868,7 +876,7 @@ export class GrafeasV1Beta1Client { } getNote( request: protos.grafeas.v1beta1.IGetNoteRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.INote, @@ -878,7 +886,7 @@ export class GrafeasV1Beta1Client { >; getNote( request: protos.grafeas.v1beta1.IGetNoteRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetNoteRequest | null | undefined, @@ -914,7 +922,7 @@ export class GrafeasV1Beta1Client { getNote( request: protos.grafeas.v1beta1.IGetNoteRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IGetNoteRequest | null | undefined, @@ -933,12 +941,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -953,7 +961,7 @@ export class GrafeasV1Beta1Client { } deleteNote( request: protos.grafeas.v1beta1.IDeleteNoteRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -963,7 +971,7 @@ export class GrafeasV1Beta1Client { >; deleteNote( request: protos.grafeas.v1beta1.IDeleteNoteRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteNoteRequest | null | undefined, @@ -999,7 +1007,7 @@ export class GrafeasV1Beta1Client { deleteNote( request: protos.grafeas.v1beta1.IDeleteNoteRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, protos.grafeas.v1beta1.IDeleteNoteRequest | null | undefined, @@ -1018,12 +1026,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1038,7 +1046,7 @@ export class GrafeasV1Beta1Client { } createNote( request: protos.grafeas.v1beta1.ICreateNoteRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.INote, @@ -1048,7 +1056,7 @@ export class GrafeasV1Beta1Client { >; createNote( request: protos.grafeas.v1beta1.ICreateNoteRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.ICreateNoteRequest | null | undefined, @@ -1088,7 +1096,7 @@ export class GrafeasV1Beta1Client { createNote( request: protos.grafeas.v1beta1.ICreateNoteRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.ICreateNoteRequest | null | undefined, @@ -1107,12 +1115,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1127,7 +1135,7 @@ export class GrafeasV1Beta1Client { } batchCreateNotes( request: protos.grafeas.v1beta1.IBatchCreateNotesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IBatchCreateNotesResponse, @@ -1137,7 +1145,7 @@ export class GrafeasV1Beta1Client { >; batchCreateNotes( request: protos.grafeas.v1beta1.IBatchCreateNotesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IBatchCreateNotesResponse, protos.grafeas.v1beta1.IBatchCreateNotesRequest | null | undefined, @@ -1175,7 +1183,7 @@ export class GrafeasV1Beta1Client { batchCreateNotes( request: protos.grafeas.v1beta1.IBatchCreateNotesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IBatchCreateNotesResponse, protos.grafeas.v1beta1.IBatchCreateNotesRequest | null | undefined, @@ -1194,12 +1202,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1214,7 +1222,7 @@ export class GrafeasV1Beta1Client { } updateNote( request: protos.grafeas.v1beta1.IUpdateNoteRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.INote, @@ -1224,7 +1232,7 @@ export class GrafeasV1Beta1Client { >; updateNote( request: protos.grafeas.v1beta1.IUpdateNoteRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IUpdateNoteRequest | null | undefined, @@ -1264,7 +1272,7 @@ export class GrafeasV1Beta1Client { updateNote( request: protos.grafeas.v1beta1.IUpdateNoteRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.INote, protos.grafeas.v1beta1.IUpdateNoteRequest | null | undefined, @@ -1283,12 +1291,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1303,7 +1311,7 @@ export class GrafeasV1Beta1Client { } getVulnerabilityOccurrencesSummary( request: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, @@ -1316,7 +1324,7 @@ export class GrafeasV1Beta1Client { >; getVulnerabilityOccurrencesSummary( request: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, | protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest @@ -1358,7 +1366,7 @@ export class GrafeasV1Beta1Client { getVulnerabilityOccurrencesSummary( request: protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.grafeas.v1beta1.IVulnerabilityOccurrencesSummary, | protos.grafeas.v1beta1.IGetVulnerabilityOccurrencesSummaryRequest @@ -1384,12 +1392,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1409,7 +1417,7 @@ export class GrafeasV1Beta1Client { listOccurrences( request: protos.grafeas.v1beta1.IListOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IOccurrence[], @@ -1419,7 +1427,7 @@ export class GrafeasV1Beta1Client { >; listOccurrences( request: protos.grafeas.v1beta1.IListOccurrencesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.grafeas.v1beta1.IListOccurrencesRequest, protos.grafeas.v1beta1.IListOccurrencesResponse | null | undefined, @@ -1464,7 +1472,7 @@ export class GrafeasV1Beta1Client { listOccurrences( request: protos.grafeas.v1beta1.IListOccurrencesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.grafeas.v1beta1.IListOccurrencesRequest, protos.grafeas.v1beta1.IListOccurrencesResponse | null | undefined, @@ -1483,12 +1491,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1529,7 +1537,7 @@ export class GrafeasV1Beta1Client { */ listOccurrencesStream( request?: protos.grafeas.v1beta1.IListOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1582,7 +1590,7 @@ export class GrafeasV1Beta1Client { */ listOccurrencesAsync( request?: protos.grafeas.v1beta1.IListOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1604,7 +1612,7 @@ export class GrafeasV1Beta1Client { } listNotes( request: protos.grafeas.v1beta1.IListNotesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.INote[], @@ -1614,7 +1622,7 @@ export class GrafeasV1Beta1Client { >; listNotes( request: protos.grafeas.v1beta1.IListNotesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.grafeas.v1beta1.IListNotesRequest, protos.grafeas.v1beta1.IListNotesResponse | null | undefined, @@ -1659,7 +1667,7 @@ export class GrafeasV1Beta1Client { listNotes( request: protos.grafeas.v1beta1.IListNotesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.grafeas.v1beta1.IListNotesRequest, protos.grafeas.v1beta1.IListNotesResponse | null | undefined, @@ -1678,12 +1686,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1724,7 +1732,7 @@ export class GrafeasV1Beta1Client { */ listNotesStream( request?: protos.grafeas.v1beta1.IListNotesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1777,7 +1785,7 @@ export class GrafeasV1Beta1Client { */ listNotesAsync( request?: protos.grafeas.v1beta1.IListNotesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -1799,7 +1807,7 @@ export class GrafeasV1Beta1Client { } listNoteOccurrences( request: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.grafeas.v1beta1.IOccurrence[], @@ -1809,7 +1817,7 @@ export class GrafeasV1Beta1Client { >; listNoteOccurrences( request: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.grafeas.v1beta1.IListNoteOccurrencesRequest, protos.grafeas.v1beta1.IListNoteOccurrencesResponse | null | undefined, @@ -1856,7 +1864,7 @@ export class GrafeasV1Beta1Client { listNoteOccurrences( request: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.grafeas.v1beta1.IListNoteOccurrencesRequest, | protos.grafeas.v1beta1.IListNoteOccurrencesResponse @@ -1877,12 +1885,12 @@ export class GrafeasV1Beta1Client { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1923,7 +1931,7 @@ export class GrafeasV1Beta1Client { */ listNoteOccurrencesStream( request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -1976,7 +1984,7 @@ export class GrafeasV1Beta1Client { */ listNoteOccurrencesAsync( request?: protos.grafeas.v1beta1.IListNoteOccurrencesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-devtools-containeranalysis/synth.metadata b/packages/google-devtools-containeranalysis/synth.metadata index d51ca5af6c6..425bc078c63 100644 --- a/packages/google-devtools-containeranalysis/synth.metadata +++ b/packages/google-devtools-containeranalysis/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-containeranalysis.git", - "sha": "fc9849e66ee179f6bff382e8d494f6a321f15b91" + "sha": "461bbdb81cb7251247747728ee2a307546d1bb18" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5d703efd4096375bb95c8492bac975f49f5da94d", - "internalRef": "342284812" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -150,4 +150,4 @@ "tsconfig.json", "webpack.config.js" ] -} +} \ No newline at end of file