Skip to content

Commit

Permalink
fix: better support for fallback mode (#358)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 468790263

Source-Link: googleapis/googleapis@873ab45

Source-Link: googleapis/googleapis-gen@cb6f37a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Aug 23, 2022
1 parent 218347c commit 93228b0
Show file tree
Hide file tree
Showing 17 changed files with 143 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent, notes) {
// [START containeranalysis_v1_generated_Grafeas_BatchCreateNotes_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent, occurrences) {
// [START containeranalysis_v1_generated_Grafeas_BatchCreateOccurrences_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/grafeas/samples/generated/v1/grafeas.create_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent, noteId, note) {
// [START containeranalysis_v1_generated_Grafeas_CreateNote_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent, occurrence) {
// [START containeranalysis_v1_generated_Grafeas_CreateOccurrence_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/grafeas/samples/generated/v1/grafeas.delete_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_DeleteNote_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_DeleteOccurrence_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/grafeas/samples/generated/v1/grafeas.get_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_GetNote_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_GetOccurrence_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_GetOccurrenceNote_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START containeranalysis_v1_generated_Grafeas_ListNoteOccurrences_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/grafeas/samples/generated/v1/grafeas.list_notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent) {
// [START containeranalysis_v1_generated_Grafeas_ListNotes_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(parent) {
// [START containeranalysis_v1_generated_Grafeas_ListOccurrences_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
3 changes: 3 additions & 0 deletions packages/grafeas/samples/generated/v1/grafeas.update_note.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name, note) {
// [START containeranalysis_v1_generated_Grafeas_UpdateNote_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name, occurrence) {
// [START containeranalysis_v1_generated_Grafeas_UpdateOccurrence_async]
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -62,7 +62,7 @@
"segments": [
{
"start": 25,
"end": 66,
"end": 69,
"type": "FULL"
}
],
Expand Down Expand Up @@ -114,7 +114,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -154,7 +154,7 @@
"segments": [
{
"start": 25,
"end": 56,
"end": 59,
"type": "FULL"
}
],
Expand Down Expand Up @@ -198,7 +198,7 @@
"segments": [
{
"start": 25,
"end": 56,
"end": 59,
"type": "FULL"
}
],
Expand Down Expand Up @@ -242,7 +242,7 @@
"segments": [
{
"start": 25,
"end": 60,
"end": 63,
"type": "FULL"
}
],
Expand Down Expand Up @@ -290,7 +290,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -330,7 +330,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -370,7 +370,7 @@
"segments": [
{
"start": 25,
"end": 66,
"end": 69,
"type": "FULL"
}
],
Expand Down Expand Up @@ -422,7 +422,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -462,7 +462,7 @@
"segments": [
{
"start": 25,
"end": 61,
"end": 64,
"type": "FULL"
}
],
Expand Down Expand Up @@ -510,7 +510,7 @@
"segments": [
{
"start": 25,
"end": 56,
"end": 59,
"type": "FULL"
}
],
Expand Down Expand Up @@ -554,7 +554,7 @@
"segments": [
{
"start": 25,
"end": 60,
"end": 63,
"type": "FULL"
}
],
Expand Down Expand Up @@ -602,7 +602,7 @@
"segments": [
{
"start": 25,
"end": 65,
"end": 68,
"type": "FULL"
}
],
Expand Down
16 changes: 8 additions & 8 deletions packages/grafeas/src/v1/grafeas_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import {
} from 'google-gax';

import {Transform} from 'stream';
import {RequestType} from 'google-gax/build/src/apitypes';
import * as protos from '../../protos/protos';
import jsonProtos = require('../../protos/protos.json');
/**
Expand Down Expand Up @@ -290,7 +289,8 @@ export class GrafeasClient {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down Expand Up @@ -1439,7 +1439,7 @@ export class GrafeasClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listOccurrences.createStream(
this.innerApiCalls.listOccurrences as gax.GaxCall,
this.innerApiCalls.listOccurrences as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1491,7 +1491,7 @@ export class GrafeasClient {
this.initialize();
return this.descriptors.page.listOccurrences.asyncIterate(
this.innerApiCalls['listOccurrences'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.grafeas.v1.IOccurrence>;
}
Expand Down Expand Up @@ -1632,7 +1632,7 @@ export class GrafeasClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listNotes.createStream(
this.innerApiCalls.listNotes as gax.GaxCall,
this.innerApiCalls.listNotes as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1684,7 +1684,7 @@ export class GrafeasClient {
this.initialize();
return this.descriptors.page.listNotes.asyncIterate(
this.innerApiCalls['listNotes'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.grafeas.v1.INote>;
}
Expand Down Expand Up @@ -1825,7 +1825,7 @@ export class GrafeasClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listNoteOccurrences.createStream(
this.innerApiCalls.listNoteOccurrences as gax.GaxCall,
this.innerApiCalls.listNoteOccurrences as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1876,7 +1876,7 @@ export class GrafeasClient {
this.initialize();
return this.descriptors.page.listNoteOccurrences.asyncIterate(
this.innerApiCalls['listNoteOccurrences'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.grafeas.v1.IOccurrence>;
}
Expand Down
Loading

0 comments on commit 93228b0

Please sign in to comment.