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 #170

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 @@ -23,6 +23,9 @@
function main(parent, attestorId, attestor) {
// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_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 binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_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 binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_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 binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_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 binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_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(attestor) {
// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_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(policy) {
// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_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": 52,
"end": 55,
"type": "FULL"
}
],
Expand Down Expand Up @@ -102,7 +102,7 @@
"segments": [
{
"start": 25,
"end": 62,
"end": 65,
"type": "FULL"
}
],
Expand Down Expand Up @@ -150,7 +150,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -190,7 +190,7 @@
"segments": [
{
"start": 25,
"end": 52,
"end": 55,
"type": "FULL"
}
],
Expand Down Expand Up @@ -230,7 +230,7 @@
"segments": [
{
"start": 25,
"end": 64,
"end": 67,
"type": "FULL"
}
],
Expand Down Expand Up @@ -278,7 +278,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -318,7 +318,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -358,7 +358,7 @@
"segments": [
{
"start": 25,
"end": 72,
"end": 75,
"type": "FULL"
}
],
Expand Down
3 changes: 3 additions & 0 deletions samples/generated/v1/system_policy_v1.get_system_policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_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(attestor, attestation, occurrenceNote, occurrenceResourceUri) {
// [START binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_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, attestorId, attestor) {
// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_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 binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_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 binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_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 binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_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 binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_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(attestor) {
// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_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(policy) {
// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_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": 52,
"end": 55,
"type": "FULL"
}
],
Expand Down Expand Up @@ -102,7 +102,7 @@
"segments": [
{
"start": 25,
"end": 62,
"end": 65,
"type": "FULL"
}
],
Expand Down Expand Up @@ -150,7 +150,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -190,7 +190,7 @@
"segments": [
{
"start": 25,
"end": 52,
"end": 55,
"type": "FULL"
}
],
Expand Down Expand Up @@ -230,7 +230,7 @@
"segments": [
{
"start": 25,
"end": 64,
"end": 67,
"type": "FULL"
}
],
Expand Down Expand Up @@ -278,7 +278,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down Expand Up @@ -318,7 +318,7 @@
"segments": [
{
"start": 25,
"end": 51,
"end": 54,
"type": "FULL"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
function main(name) {
// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_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
8 changes: 4 additions & 4 deletions src/v1/binauthz_management_service_v1_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 @@ -273,7 +272,8 @@ export class BinauthzManagementServiceV1Client {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down Expand Up @@ -1087,7 +1087,7 @@ export class BinauthzManagementServiceV1Client {
const callSettings = defaultCallSettings.merge(options);
this.initialize();
return this.descriptors.page.listAttestors.createStream(
this.innerApiCalls.listAttestors as gax.GaxCall,
this.innerApiCalls.listAttestors as GaxCall,
request,
callSettings
);
Expand Down Expand Up @@ -1139,7 +1139,7 @@ export class BinauthzManagementServiceV1Client {
this.initialize();
return this.descriptors.page.listAttestors.asyncIterate(
this.innerApiCalls['listAttestors'] as GaxCall,
request as unknown as RequestType,
request as {},
callSettings
) as AsyncIterable<protos.google.cloud.binaryauthorization.v1.IAttestor>;
}
Expand Down
3 changes: 2 additions & 1 deletion src/v1/system_policy_v1_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ export class SystemPolicyV1Client {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down
3 changes: 2 additions & 1 deletion src/v1/validation_helper_v1_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ export class ValidationHelperV1Client {
const apiCall = this._gaxModule.createApiCall(
callPromise,
this._defaults[methodName],
descriptor
descriptor,
this._opts.fallback
);

this.innerApiCalls[methodName] = apiCall;
Expand Down
Loading