Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

fix: better support for fallback mode #83

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -102,7 +102,7 @@
"segments": [
{
"start": 25,
"end": 83,
"end": 86,
"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": 70,
"end": 73,
"type": "FULL"
}
],
Expand Down Expand Up @@ -246,7 +246,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -286,7 +286,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -326,7 +326,7 @@
"segments": [
{
"start": 25,
"end": 57,
"end": 60,
"type": "FULL"
}
],
Expand Down Expand Up @@ -370,7 +370,7 @@
"segments": [
{
"start": 25,
"end": 70,
"end": 73,
"type": "FULL"
}
],
Expand Down Expand Up @@ -418,7 +418,7 @@
"segments": [
{
"start": 25,
"end": 65,
"end": 68,
"type": "FULL"
}
],
Expand Down Expand Up @@ -462,7 +462,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down Expand Up @@ -502,7 +502,7 @@
"segments": [
{
"start": 25,
"end": 69,
"end": 72,
"type": "FULL"
}
],
Expand Down Expand Up @@ -554,7 +554,7 @@
"segments": [
{
"start": 25,
"end": 50,
"end": 53,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(projectId, agentPool, agentPoolId) {
// [START storagetransfer_v1_generated_StorageTransferService_CreateAgentPool_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(transferJob) {
// [START storagetransfer_v1_generated_StorageTransferService_CreateTransferJob_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 storagetransfer_v1_generated_StorageTransferService_DeleteAgentPool_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 storagetransfer_v1_generated_StorageTransferService_GetAgentPool_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(projectId) {
// [START storagetransfer_v1_generated_StorageTransferService_GetGoogleServiceAccount_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(jobName, projectId) {
// [START storagetransfer_v1_generated_StorageTransferService_GetTransferJob_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(projectId) {
// [START storagetransfer_v1_generated_StorageTransferService_ListAgentPools_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(filter) {
// [START storagetransfer_v1_generated_StorageTransferService_ListTransferJobs_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 storagetransfer_v1_generated_StorageTransferService_PauseTransferOperation_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 storagetransfer_v1_generated_StorageTransferService_ResumeTransferOperation_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(jobName, projectId) {
// [START storagetransfer_v1_generated_StorageTransferService_RunTransferJob_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(agentPool) {
// [START storagetransfer_v1_generated_StorageTransferService_UpdateAgentPool_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(jobName, projectId, transferJob) {
// [START storagetransfer_v1_generated_StorageTransferService_UpdateTransferJob_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
14 changes: 7 additions & 7 deletions src/v1/storage_transfer_service_client.ts
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 @@ -321,7 +320,8 @@ export class StorageTransferServiceClient {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down Expand Up @@ -1527,7 +1527,7 @@ export class StorageTransferServiceClient {
const decodeOperation = new gax.Operation(
operation,
this.descriptors.longrunning.runTransferJob,
gax.createDefaultBackoffSettings()
this._gaxModule.createDefaultBackoffSettings()
);
return decodeOperation as LROperation<
protos.google.protobuf.Empty,
Expand Down Expand Up @@ -1685,7 +1685,7 @@ export class StorageTransferServiceClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listTransferJobs.createStream(
this.innerApiCalls.listTransferJobs as gax.GaxCall,
this.innerApiCalls.listTransferJobs as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1740,7 +1740,7 @@ export class StorageTransferServiceClient {
this.initialize();
return this.descriptors.page.listTransferJobs.asyncIterate(
this.innerApiCalls['listTransferJobs'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.google.storagetransfer.v1.ITransferJob>;
}
Expand Down Expand Up @@ -1899,7 +1899,7 @@ export class StorageTransferServiceClient {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listAgentPools.createStream(
this.innerApiCalls.listAgentPools as gax.GaxCall,
this.innerApiCalls.listAgentPools as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1956,7 +1956,7 @@ export class StorageTransferServiceClient {
this.initialize();
return this.descriptors.page.listAgentPools.asyncIterate(
this.innerApiCalls['listAgentPools'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.google.storagetransfer.v1.IAgentPool>;
}
Expand Down
Loading