Skip to content

Commit

Permalink
fix: better support for fallback mode (#63)
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 8927796 commit d64bfb4
Show file tree
Hide file tree
Showing 24 changed files with 402 additions and 350 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main() {
// [START composer_v1_generated_Environments_CreateEnvironment_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() {
// [START composer_v1_generated_Environments_DeleteEnvironment_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() {
// [START composer_v1_generated_Environments_GetEnvironment_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() {
// [START composer_v1_generated_Environments_ListEnvironments_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() {
// [START composer_v1_generated_Environments_UpdateEnvironment_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() {
// [START composer_v1_generated_ImageVersions_ListImageVersions_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": 55,
"end": 58,
"type": "FULL"
}
],
Expand Down Expand Up @@ -66,7 +66,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -106,7 +106,7 @@
"segments": [
{
"start": 25,
"end": 60,
"end": 63,
"type": "FULL"
}
],
Expand Down Expand Up @@ -154,7 +154,7 @@
"segments": [
{
"start": 25,
"end": 163,
"end": 166,
"type": "FULL"
}
],
Expand Down Expand Up @@ -202,7 +202,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -242,7 +242,7 @@
"segments": [
{
"start": 25,
"end": 64,
"end": 67,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main() {
// [START composer_v1beta1_generated_Environments_CheckUpgrade_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() {
// [START composer_v1beta1_generated_Environments_CreateEnvironment_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() {
// [START composer_v1beta1_generated_Environments_DeleteEnvironment_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() {
// [START composer_v1beta1_generated_Environments_GetEnvironment_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() {
// [START composer_v1beta1_generated_Environments_ListEnvironments_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() {
// [START composer_v1beta1_generated_Environments_RestartWebServer_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(updateMask) {
// [START composer_v1beta1_generated_Environments_UpdateEnvironment_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() {
// [START composer_v1beta1_generated_ImageVersions_ListImageVersions_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": 55,
"end": 58,
"type": "FULL"
}
],
Expand Down Expand Up @@ -66,7 +66,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -106,7 +106,7 @@
"segments": [
{
"start": 25,
"end": 60,
"end": 63,
"type": "FULL"
}
],
Expand Down Expand Up @@ -154,7 +154,7 @@
"segments": [
{
"start": 25,
"end": 180,
"end": 183,
"type": "FULL"
}
],
Expand Down Expand Up @@ -202,7 +202,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -242,7 +242,7 @@
"segments": [
{
"start": 25,
"end": 52,
"end": 55,
"type": "FULL"
}
],
Expand Down Expand Up @@ -282,7 +282,7 @@
"segments": [
{
"start": 25,
"end": 72,
"end": 75,
"type": "FULL"
}
],
Expand Down Expand Up @@ -326,7 +326,7 @@
"segments": [
{
"start": 25,
"end": 64,
"end": 67,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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 @@ -326,7 +325,8 @@ export class EnvironmentsClient {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down Expand Up @@ -620,7 +620,7 @@ export class EnvironmentsClient {
const decodeOperation = new gax.Operation(
operation,
this.descriptors.longrunning.createEnvironment,
gax.createDefaultBackoffSettings()
this._gaxModule.createDefaultBackoffSettings()
);
return decodeOperation as LROperation<
protos.google.cloud.orchestration.airflow.service.v1.Environment,
Expand Down Expand Up @@ -875,7 +875,7 @@ export class EnvironmentsClient {
const decodeOperation = new gax.Operation(
operation,
this.descriptors.longrunning.updateEnvironment,
gax.createDefaultBackoffSettings()
this._gaxModule.createDefaultBackoffSettings()
);
return decodeOperation as LROperation<
protos.google.cloud.orchestration.airflow.service.v1.Environment,
Expand Down Expand Up @@ -1013,7 +1013,7 @@ export class EnvironmentsClient {
const decodeOperation = new gax.Operation(
operation,
this.descriptors.longrunning.deleteEnvironment,
gax.createDefaultBackoffSettings()
this._gaxModule.createDefaultBackoffSettings()
);
return decodeOperation as LROperation<
protos.google.protobuf.Empty,
Expand Down Expand Up @@ -1159,7 +1159,7 @@ export class EnvironmentsClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listEnvironments.createStream(
this.innerApiCalls.listEnvironments as gax.GaxCall,
this.innerApiCalls.listEnvironments as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1208,7 +1208,7 @@ export class EnvironmentsClient {
this.initialize();
return this.descriptors.page.listEnvironments.asyncIterate(
this.innerApiCalls['listEnvironments'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>;
}
Expand Down
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 @@ -249,7 +248,8 @@ export class ImageVersionsClient {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down Expand Up @@ -455,7 +455,7 @@ export class ImageVersionsClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listImageVersions.createStream(
this.innerApiCalls.listImageVersions as gax.GaxCall,
this.innerApiCalls.listImageVersions as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -506,7 +506,7 @@ export class ImageVersionsClient {
this.initialize();
return this.descriptors.page.listImageVersions.asyncIterate(
this.innerApiCalls['listImageVersions'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>;
}
Expand Down
Loading

0 comments on commit d64bfb4

Please sign in to comment.