From 59a0d269d5196991dd395e671d7d5f54ce449005 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 17 Nov 2020 19:08:27 -0800 Subject: [PATCH 01/21] feat(protos): update BigtableTableAdmin GetIamPolicy, change DeleteAppProfileRequest.ignore_warnings to REQUIRED PiperOrigin-RevId: 339464550 Source-Author: Google APIs Source-Date: Wed Oct 28 08:32:48 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: ccd6462d31e6422fd188b6590aa8d0ad03e7d9a3 Source-Link: https://github.com/googleapis/googleapis/commit/ccd6462d31e6422fd188b6590aa8d0ad03e7d9a3 Co-authored-by: Alexander Fenster --- synth.metadata | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/synth.metadata b/synth.metadata index dc88ac5bb..7f15bb152 100644 --- a/synth.metadata +++ b/synth.metadata @@ -3,10 +3,18 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-bigtable.git", + "remote": "https://github.com/googleapis/nodejs-bigtable.git", "sha": "49102b4ac63c28c46aea7f27e85efd67035dc399" } }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "ccd6462d31e6422fd188b6590aa8d0ad03e7d9a3", + "internalRef": "339464550" + } + }, { "git": { "name": "synthtool", From a38cbcca1660bc40fe137acb973bf62f3c55754e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 12:16:51 -0800 Subject: [PATCH 02/21] fix(browser): check for fetch on window (#824) --- protos/protos.json | 743 +++++++++++++++++++++-- src/v2/bigtable_client.ts | 52 +- src/v2/bigtable_instance_admin_client.ts | 210 ++++--- src/v2/bigtable_table_admin_client.ts | 248 ++++---- synth.metadata | 8 +- 5 files changed, 959 insertions(+), 302 deletions(-) diff --git a/protos/protos.json b/protos/protos.json index 160098287..9195990e1 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -32,7 +32,24 @@ "(google.api.method_signature)": "parent,instance_id,instance,clusters", "(google.longrunning.operation_info).response_type": "Instance", "(google.longrunning.operation_info).metadata_type": "CreateInstanceMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/instances", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,instance_id,instance,clusters" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Instance", + "metadata_type": "CreateInstanceMetadata" + } + } + ] }, "GetInstance": { "requestType": "GetInstanceRequest", @@ -40,7 +57,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListInstances": { "requestType": "ListInstancesRequest", @@ -48,7 +75,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*}/instances", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/instances" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateInstance": { "requestType": "Instance", @@ -56,7 +93,15 @@ "options": { "(google.api.http).put": "/v2/{name=projects/*/instances/*}", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{name=projects/*/instances/*}", + "body": "*" + } + } + ] }, "PartialUpdateInstance": { "requestType": "PartialUpdateInstanceRequest", @@ -67,7 +112,24 @@ "(google.api.method_signature)": "instance,update_mask", "(google.longrunning.operation_info).response_type": "Instance", "(google.longrunning.operation_info).metadata_type": "UpdateInstanceMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{instance.name=projects/*/instances/*}", + "body": "instance" + } + }, + { + "(google.api.method_signature)": "instance,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Instance", + "metadata_type": "UpdateInstanceMetadata" + } + } + ] }, "DeleteInstance": { "requestType": "DeleteInstanceRequest", @@ -75,7 +137,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateCluster": { "requestType": "CreateClusterRequest", @@ -86,7 +158,24 @@ "(google.api.method_signature)": "parent,cluster_id,cluster", "(google.longrunning.operation_info).response_type": "Cluster", "(google.longrunning.operation_info).metadata_type": "CreateClusterMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/clusters", + "body": "cluster" + } + }, + { + "(google.api.method_signature)": "parent,cluster_id,cluster" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "CreateClusterMetadata" + } + } + ] }, "GetCluster": { "requestType": "GetClusterRequest", @@ -94,7 +183,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListClusters": { "requestType": "ListClustersRequest", @@ -102,7 +201,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/clusters", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/clusters" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateCluster": { "requestType": "Cluster", @@ -112,7 +221,21 @@ "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "Cluster", "(google.longrunning.operation_info).metadata_type": "UpdateClusterMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v2/{name=projects/*/instances/*/clusters/*}", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "UpdateClusterMetadata" + } + } + ] }, "DeleteCluster": { "requestType": "DeleteClusterRequest", @@ -120,7 +243,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateAppProfile": { "requestType": "CreateAppProfileRequest", @@ -129,7 +262,18 @@ "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/appProfiles", "(google.api.http).body": "app_profile", "(google.api.method_signature)": "parent,app_profile_id,app_profile" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/appProfiles", + "body": "app_profile" + } + }, + { + "(google.api.method_signature)": "parent,app_profile_id,app_profile" + } + ] }, "GetAppProfile": { "requestType": "GetAppProfileRequest", @@ -137,7 +281,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*/appProfiles/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/appProfiles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListAppProfiles": { "requestType": "ListAppProfilesRequest", @@ -145,7 +299,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/appProfiles", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/appProfiles" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateAppProfile": { "requestType": "UpdateAppProfileRequest", @@ -156,7 +320,24 @@ "(google.api.method_signature)": "app_profile,update_mask", "(google.longrunning.operation_info).response_type": "AppProfile", "(google.longrunning.operation_info).metadata_type": "UpdateAppProfileMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}", + "body": "app_profile" + } + }, + { + "(google.api.method_signature)": "app_profile,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "AppProfile", + "metadata_type": "UpdateAppProfileMetadata" + } + } + ] }, "DeleteAppProfile": { "requestType": "DeleteAppProfileRequest", @@ -164,7 +345,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*/appProfiles/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/appProfiles/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetIamPolicy": { "requestType": "google.iam.v1.GetIamPolicyRequest", @@ -173,7 +364,18 @@ "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:getIamPolicy", "(google.api.http).body": "*", "(google.api.method_signature)": "resource" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:getIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource" + } + ] }, "SetIamPolicy": { "requestType": "google.iam.v1.SetIamPolicyRequest", @@ -182,7 +384,18 @@ "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:setIamPolicy", "(google.api.http).body": "*", "(google.api.method_signature)": "resource,policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:setIamPolicy", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] }, "TestIamPermissions": { "requestType": "google.iam.v1.TestIamPermissionsRequest", @@ -191,7 +404,18 @@ "(google.api.http).post": "/v2/{resource=projects/*/instances/*}:testIamPermissions", "(google.api.http).body": "*", "(google.api.method_signature)": "resource,permissions" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*}:testIamPermissions", + "body": "*" + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] } } }, @@ -768,7 +992,18 @@ "(google.api.http).post": "/v2/{parent=projects/*/instances/*}/tables", "(google.api.http).body": "*", "(google.api.method_signature)": "parent,table_id,table" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,table_id,table" + } + ] }, "CreateTableFromSnapshot": { "requestType": "CreateTableFromSnapshotRequest", @@ -779,7 +1014,24 @@ "(google.api.method_signature)": "parent,table_id,source_snapshot", "(google.longrunning.operation_info).response_type": "Table", "(google.longrunning.operation_info).metadata_type": "CreateTableFromSnapshotMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,table_id,source_snapshot" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "CreateTableFromSnapshotMetadata" + } + } + ] }, "ListTables": { "requestType": "ListTablesRequest", @@ -787,7 +1039,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*/instances/*}/tables", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*}/tables" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "GetTable": { "requestType": "GetTableRequest", @@ -795,7 +1057,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*/tables/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/tables/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteTable": { "requestType": "DeleteTableRequest", @@ -803,7 +1075,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*/tables/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/tables/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ModifyColumnFamilies": { "requestType": "ModifyColumnFamiliesRequest", @@ -812,7 +1094,18 @@ "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies", "(google.api.http).body": "*", "(google.api.method_signature)": "name,modifications" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,modifications" + } + ] }, "DropRowRange": { "requestType": "DropRowRangeRequest", @@ -820,7 +1113,15 @@ "options": { "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:dropRowRange", + "body": "*" + } + } + ] }, "GenerateConsistencyToken": { "requestType": "GenerateConsistencyTokenRequest", @@ -829,7 +1130,18 @@ "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CheckConsistency": { "requestType": "CheckConsistencyRequest", @@ -838,7 +1150,18 @@ "(google.api.http).post": "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency", "(google.api.http).body": "*", "(google.api.method_signature)": "name,consistency_token" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:checkConsistency", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,consistency_token" + } + ] }, "SnapshotTable": { "requestType": "SnapshotTableRequest", @@ -849,7 +1172,24 @@ "(google.api.method_signature)": "name,cluster,snapshot_id,description", "(google.longrunning.operation_info).response_type": "Snapshot", "(google.longrunning.operation_info).metadata_type": "SnapshotTableMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/instances/*/tables/*}:snapshot", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name,cluster,snapshot_id,description" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Snapshot", + "metadata_type": "SnapshotTableMetadata" + } + } + ] }, "GetSnapshot": { "requestType": "GetSnapshotRequest", @@ -857,7 +1197,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListSnapshots": { "requestType": "ListSnapshotsRequest", @@ -865,7 +1215,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/clusters/*}/snapshots" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "DeleteSnapshot": { "requestType": "DeleteSnapshotRequest", @@ -873,7 +1233,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CreateBackup": { "requestType": "CreateBackupRequest", @@ -884,7 +1254,24 @@ "(google.api.method_signature)": "parent,backup_id,backup", "(google.longrunning.operation_info).response_type": "Backup", "(google.longrunning.operation_info).metadata_type": "CreateBackupMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*/clusters/*}/backups", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "parent,backup_id,backup" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Backup", + "metadata_type": "CreateBackupMetadata" + } + } + ] }, "GetBackup": { "requestType": "GetBackupRequest", @@ -892,7 +1279,17 @@ "options": { "(google.api.http).get": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateBackup": { "requestType": "UpdateBackupRequest", @@ -901,7 +1298,18 @@ "(google.api.http).patch": "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}", "(google.api.http).body": "backup", "(google.api.method_signature)": "backup,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}", + "body": "backup" + } + }, + { + "(google.api.method_signature)": "backup,update_mask" + } + ] }, "DeleteBackup": { "requestType": "DeleteBackupRequest", @@ -909,7 +1317,17 @@ "options": { "(google.api.http).delete": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/instances/*/clusters/*/backups/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListBackups": { "requestType": "ListBackupsRequest", @@ -917,7 +1335,17 @@ "options": { "(google.api.http).get": "/v2/{parent=projects/*/instances/*/clusters/*}/backups", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/instances/*/clusters/*}/backups" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "RestoreTable": { "requestType": "RestoreTableRequest", @@ -927,7 +1355,21 @@ "(google.api.http).body": "*", "(google.longrunning.operation_info).response_type": "Table", "(google.longrunning.operation_info).metadata_type": "RestoreTableMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/instances/*}/tables:restore", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Table", + "metadata_type": "RestoreTableMetadata" + } + } + ] }, "GetIamPolicy": { "requestType": "google.iam.v1.GetIamPolicyRequest", @@ -938,7 +1380,22 @@ "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource" + } + ] }, "SetIamPolicy": { "requestType": "google.iam.v1.SetIamPolicyRequest", @@ -949,7 +1406,22 @@ "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,policy" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy", + "body": "*", + "additional_bindings": { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,policy" + } + ] }, "TestIamPermissions": { "requestType": "google.iam.v1.TestIamPermissionsRequest", @@ -960,7 +1432,22 @@ "(google.api.http).additional_bindings.post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "resource,permissions" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions", + "body": "*", + "additional_bindings": { + "post": "/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "resource,permissions" + } + ] } } }, @@ -1876,7 +2363,21 @@ "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", "(google.api.http).body": "*", "(google.api.method_signature)": "table_name,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readRows", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] }, "SampleRowKeys": { "requestType": "SampleRowKeysRequest", @@ -1885,7 +2386,20 @@ "options": { "(google.api.http).get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys", "(google.api.method_signature)": "table_name,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys" + } + }, + { + "(google.api.method_signature)": "table_name" + }, + { + "(google.api.method_signature)": "table_name,app_profile_id" + } + ] }, "MutateRow": { "requestType": "MutateRowRequest", @@ -1894,7 +2408,21 @@ "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", "(google.api.http).body": "*", "(google.api.method_signature)": "table_name,row_key,mutations,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name,row_key,mutations" + }, + { + "(google.api.method_signature)": "table_name,row_key,mutations,app_profile_id" + } + ] }, "MutateRows": { "requestType": "MutateRowsRequest", @@ -1904,7 +2432,21 @@ "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", "(google.api.http).body": "*", "(google.api.method_signature)": "table_name,entries,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name,entries" + }, + { + "(google.api.method_signature)": "table_name,entries,app_profile_id" + } + ] }, "CheckAndMutateRow": { "requestType": "CheckAndMutateRowRequest", @@ -1913,7 +2455,21 @@ "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", "(google.api.http).body": "*", "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations" + }, + { + "(google.api.method_signature)": "table_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id" + } + ] }, "ReadModifyWriteRow": { "requestType": "ReadModifyWriteRowRequest", @@ -1922,7 +2478,21 @@ "(google.api.http).post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", "(google.api.http).body": "*", "(google.api.method_signature)": "table_name,row_key,rules,app_profile_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow", + "body": "*" + } + }, + { + "(google.api.method_signature)": "table_name,row_key,rules" + }, + { + "(google.api.method_signature)": "table_name,row_key,rules,app_profile_id" + } + ] } } }, @@ -3907,7 +4477,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", @@ -3915,7 +4493,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", @@ -3923,7 +4509,15 @@ "options": { "(google.api.http).post": "/v1/{resource=**}:testIamPermissions", "(google.api.http).body": "*" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{resource=**}:testIamPermissions", + "body": "*" + } + } + ] } } }, @@ -4167,7 +4761,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations}", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] }, "GetOperation": { "requestType": "GetOperationRequest", @@ -4175,7 +4779,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteOperation": { "requestType": "DeleteOperationRequest", @@ -4183,7 +4797,17 @@ "options": { "(google.api.http).delete": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelOperation": { "requestType": "CancelOperationRequest", @@ -4192,7 +4816,18 @@ "(google.api.http).post": "/v1/{name=operations/**}:cancel", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "WaitOperation": { "requestType": "WaitOperationRequest", diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index b8c3243d8..d98c600dc 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -16,11 +16,17 @@ // ** 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 * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v2/bigtable_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './bigtable_client_config.json'; const version = require('../../../package.json').version; @@ -74,9 +80,9 @@ export class BigtableClient { * 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` @@ -89,7 +95,9 @@ export class BigtableClient { 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. @@ -310,7 +318,7 @@ export class BigtableClient { // ------------------- mutateRow( request: protos.google.bigtable.v2.IMutateRowRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.v2.IMutateRowResponse, @@ -320,7 +328,7 @@ export class BigtableClient { >; mutateRow( request: protos.google.bigtable.v2.IMutateRowRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, @@ -367,7 +375,7 @@ export class BigtableClient { mutateRow( request: protos.google.bigtable.v2.IMutateRowRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.v2.IMutateRowResponse, protos.google.bigtable.v2.IMutateRowRequest | null | undefined, @@ -386,12 +394,12 @@ export class BigtableClient { ] > | 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 || {}; @@ -406,7 +414,7 @@ export class BigtableClient { } checkAndMutateRow( request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.v2.ICheckAndMutateRowResponse, @@ -416,7 +424,7 @@ export class BigtableClient { >; checkAndMutateRow( request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.v2.ICheckAndMutateRowResponse, protos.google.bigtable.v2.ICheckAndMutateRowRequest | null | undefined, @@ -476,7 +484,7 @@ export class BigtableClient { checkAndMutateRow( request: protos.google.bigtable.v2.ICheckAndMutateRowRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.v2.ICheckAndMutateRowResponse, | protos.google.bigtable.v2.ICheckAndMutateRowRequest @@ -497,12 +505,12 @@ export class BigtableClient { ] > | 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 || {}; @@ -517,7 +525,7 @@ export class BigtableClient { } readModifyWriteRow( request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.v2.IReadModifyWriteRowResponse, @@ -527,7 +535,7 @@ export class BigtableClient { >; readModifyWriteRow( request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.v2.IReadModifyWriteRowResponse, protos.google.bigtable.v2.IReadModifyWriteRowRequest | null | undefined, @@ -578,7 +586,7 @@ export class BigtableClient { readModifyWriteRow( request: protos.google.bigtable.v2.IReadModifyWriteRowRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.v2.IReadModifyWriteRowResponse, | protos.google.bigtable.v2.IReadModifyWriteRowRequest @@ -599,12 +607,12 @@ export class BigtableClient { ] > | 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 || {}; @@ -656,7 +664,7 @@ export class BigtableClient { */ readRows( request?: protos.google.bigtable.v2.IReadRowsRequest, - options?: gax.CallOptions + options?: CallOptions ): gax.CancellableStream { request = request || {}; options = options || {}; @@ -700,7 +708,7 @@ export class BigtableClient { */ sampleRowKeys( request?: protos.google.bigtable.v2.ISampleRowKeysRequest, - options?: gax.CallOptions + options?: CallOptions ): gax.CancellableStream { request = request || {}; options = options || {}; @@ -747,7 +755,7 @@ export class BigtableClient { */ mutateRows( request?: protos.google.bigtable.v2.IMutateRowsRequest, - options?: gax.CallOptions + options?: CallOptions ): gax.CancellableStream { request = request || {}; options = options || {}; diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index 6882bb00b..fd39b1dbe 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_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, @@ -31,6 +32,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/v2/bigtable_instance_admin_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './bigtable_instance_admin_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -87,9 +93,9 @@ export class BigtableInstanceAdminClient { * 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` @@ -103,7 +109,9 @@ export class BigtableInstanceAdminClient { 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. @@ -433,7 +441,7 @@ export class BigtableInstanceAdminClient { // ------------------- getInstance( request: protos.google.bigtable.admin.v2.IGetInstanceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IInstance, @@ -443,7 +451,7 @@ export class BigtableInstanceAdminClient { >; getInstance( request: protos.google.bigtable.admin.v2.IGetInstanceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IGetInstanceRequest | null | undefined, @@ -479,7 +487,7 @@ export class BigtableInstanceAdminClient { getInstance( request: protos.google.bigtable.admin.v2.IGetInstanceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IInstance, | protos.google.bigtable.admin.v2.IGetInstanceRequest @@ -500,12 +508,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -520,7 +528,7 @@ export class BigtableInstanceAdminClient { } listInstances( request: protos.google.bigtable.admin.v2.IListInstancesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IListInstancesResponse, @@ -530,7 +538,7 @@ export class BigtableInstanceAdminClient { >; listInstances( request: protos.google.bigtable.admin.v2.IListInstancesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IListInstancesResponse, protos.google.bigtable.admin.v2.IListInstancesRequest | null | undefined, @@ -568,7 +576,7 @@ export class BigtableInstanceAdminClient { listInstances( request: protos.google.bigtable.admin.v2.IListInstancesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IListInstancesResponse, | protos.google.bigtable.admin.v2.IListInstancesRequest @@ -589,12 +597,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -609,7 +617,7 @@ export class BigtableInstanceAdminClient { } updateInstance( request: protos.google.bigtable.admin.v2.IInstance, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IInstance, @@ -619,7 +627,7 @@ export class BigtableInstanceAdminClient { >; updateInstance( request: protos.google.bigtable.admin.v2.IInstance, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, @@ -678,7 +686,7 @@ export class BigtableInstanceAdminClient { updateInstance( request: protos.google.bigtable.admin.v2.IInstance, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IInstance, protos.google.bigtable.admin.v2.IInstance | null | undefined, @@ -697,12 +705,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -717,7 +725,7 @@ export class BigtableInstanceAdminClient { } deleteInstance( request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -727,7 +735,7 @@ export class BigtableInstanceAdminClient { >; deleteInstance( request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteInstanceRequest | null | undefined, @@ -763,7 +771,7 @@ export class BigtableInstanceAdminClient { deleteInstance( request: protos.google.bigtable.admin.v2.IDeleteInstanceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteInstanceRequest @@ -784,12 +792,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -804,7 +812,7 @@ export class BigtableInstanceAdminClient { } getCluster( request: protos.google.bigtable.admin.v2.IGetClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ICluster, @@ -814,7 +822,7 @@ export class BigtableInstanceAdminClient { >; getCluster( request: protos.google.bigtable.admin.v2.IGetClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, @@ -850,7 +858,7 @@ export class BigtableInstanceAdminClient { getCluster( request: protos.google.bigtable.admin.v2.IGetClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ICluster, protos.google.bigtable.admin.v2.IGetClusterRequest | null | undefined, @@ -869,12 +877,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -889,7 +897,7 @@ export class BigtableInstanceAdminClient { } listClusters( request: protos.google.bigtable.admin.v2.IListClustersRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IListClustersResponse, @@ -899,7 +907,7 @@ export class BigtableInstanceAdminClient { >; listClusters( request: protos.google.bigtable.admin.v2.IListClustersRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IListClustersResponse, protos.google.bigtable.admin.v2.IListClustersRequest | null | undefined, @@ -939,7 +947,7 @@ export class BigtableInstanceAdminClient { listClusters( request: protos.google.bigtable.admin.v2.IListClustersRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IListClustersResponse, | protos.google.bigtable.admin.v2.IListClustersRequest @@ -960,12 +968,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -980,7 +988,7 @@ export class BigtableInstanceAdminClient { } deleteCluster( request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -990,7 +998,7 @@ export class BigtableInstanceAdminClient { >; deleteCluster( request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteClusterRequest | null | undefined, @@ -1026,7 +1034,7 @@ export class BigtableInstanceAdminClient { deleteCluster( request: protos.google.bigtable.admin.v2.IDeleteClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteClusterRequest @@ -1047,12 +1055,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1067,7 +1075,7 @@ export class BigtableInstanceAdminClient { } createAppProfile( request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IAppProfile, @@ -1077,7 +1085,7 @@ export class BigtableInstanceAdminClient { >; createAppProfile( request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IAppProfile, | protos.google.bigtable.admin.v2.ICreateAppProfileRequest @@ -1127,7 +1135,7 @@ export class BigtableInstanceAdminClient { createAppProfile( request: protos.google.bigtable.admin.v2.ICreateAppProfileRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IAppProfile, | protos.google.bigtable.admin.v2.ICreateAppProfileRequest @@ -1150,12 +1158,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1170,7 +1178,7 @@ export class BigtableInstanceAdminClient { } getAppProfile( request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IAppProfile, @@ -1180,7 +1188,7 @@ export class BigtableInstanceAdminClient { >; getAppProfile( request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IAppProfile, protos.google.bigtable.admin.v2.IGetAppProfileRequest | null | undefined, @@ -1216,7 +1224,7 @@ export class BigtableInstanceAdminClient { getAppProfile( request: protos.google.bigtable.admin.v2.IGetAppProfileRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IAppProfile, | protos.google.bigtable.admin.v2.IGetAppProfileRequest @@ -1237,12 +1245,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1257,7 +1265,7 @@ export class BigtableInstanceAdminClient { } deleteAppProfile( request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1267,7 +1275,7 @@ export class BigtableInstanceAdminClient { >; deleteAppProfile( request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest @@ -1309,7 +1317,7 @@ export class BigtableInstanceAdminClient { deleteAppProfile( request: protos.google.bigtable.admin.v2.IDeleteAppProfileRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteAppProfileRequest @@ -1332,12 +1340,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1352,7 +1360,7 @@ export class BigtableInstanceAdminClient { } getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1362,7 +1370,7 @@ export class BigtableInstanceAdminClient { >; 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, @@ -1402,7 +1410,7 @@ export class BigtableInstanceAdminClient { getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -1421,12 +1429,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1441,7 +1449,7 @@ export class BigtableInstanceAdminClient { } setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1451,7 +1459,7 @@ export class BigtableInstanceAdminClient { >; 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, @@ -1493,7 +1501,7 @@ export class BigtableInstanceAdminClient { setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -1512,12 +1520,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1532,7 +1540,7 @@ export class BigtableInstanceAdminClient { } testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.ITestIamPermissionsResponse, @@ -1542,7 +1550,7 @@ export class BigtableInstanceAdminClient { >; 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, @@ -1583,7 +1591,7 @@ export class BigtableInstanceAdminClient { testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -1602,12 +1610,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1623,7 +1631,7 @@ export class BigtableInstanceAdminClient { createInstance( request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1636,7 +1644,7 @@ export class BigtableInstanceAdminClient { >; createInstance( request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.IInstance, @@ -1694,7 +1702,7 @@ export class BigtableInstanceAdminClient { createInstance( request: protos.google.bigtable.admin.v2.ICreateInstanceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.IInstance, @@ -1722,12 +1730,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1779,7 +1787,7 @@ export class BigtableInstanceAdminClient { } partialUpdateInstance( request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1792,7 +1800,7 @@ export class BigtableInstanceAdminClient { >; partialUpdateInstance( request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.IInstance, @@ -1840,7 +1848,7 @@ export class BigtableInstanceAdminClient { partialUpdateInstance( request: protos.google.bigtable.admin.v2.IPartialUpdateInstanceRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.IInstance, @@ -1868,12 +1876,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -1925,7 +1933,7 @@ export class BigtableInstanceAdminClient { } createCluster( request: protos.google.bigtable.admin.v2.ICreateClusterRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1938,7 +1946,7 @@ export class BigtableInstanceAdminClient { >; createCluster( request: protos.google.bigtable.admin.v2.ICreateClusterRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.ICluster, @@ -1991,7 +1999,7 @@ export class BigtableInstanceAdminClient { createCluster( request: protos.google.bigtable.admin.v2.ICreateClusterRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.ICluster, @@ -2019,12 +2027,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -2076,7 +2084,7 @@ export class BigtableInstanceAdminClient { } updateCluster( request: protos.google.bigtable.admin.v2.ICluster, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2089,7 +2097,7 @@ export class BigtableInstanceAdminClient { >; updateCluster( request: protos.google.bigtable.admin.v2.ICluster, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.ICluster, @@ -2149,7 +2157,7 @@ export class BigtableInstanceAdminClient { updateCluster( request: protos.google.bigtable.admin.v2.ICluster, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.ICluster, @@ -2177,12 +2185,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -2234,7 +2242,7 @@ export class BigtableInstanceAdminClient { } updateAppProfile( request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2247,7 +2255,7 @@ export class BigtableInstanceAdminClient { >; updateAppProfile( request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.IAppProfile, @@ -2296,7 +2304,7 @@ export class BigtableInstanceAdminClient { updateAppProfile( request: protos.google.bigtable.admin.v2.IUpdateAppProfileRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.IAppProfile, @@ -2324,12 +2332,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -2381,7 +2389,7 @@ export class BigtableInstanceAdminClient { } listAppProfiles( request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IAppProfile[], @@ -2391,7 +2399,7 @@ export class BigtableInstanceAdminClient { >; listAppProfiles( request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.bigtable.admin.v2.IListAppProfilesRequest, | protos.google.bigtable.admin.v2.IListAppProfilesResponse @@ -2449,7 +2457,7 @@ export class BigtableInstanceAdminClient { listAppProfiles( request: protos.google.bigtable.admin.v2.IListAppProfilesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.bigtable.admin.v2.IListAppProfilesRequest, | protos.google.bigtable.admin.v2.IListAppProfilesResponse @@ -2472,12 +2480,12 @@ export class BigtableInstanceAdminClient { ] > | 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 || {}; @@ -2527,7 +2535,7 @@ export class BigtableInstanceAdminClient { */ listAppProfilesStream( request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2589,7 +2597,7 @@ export class BigtableInstanceAdminClient { */ listAppProfilesAsync( request?: protos.google.bigtable.admin.v2.IListAppProfilesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index c268a863f..b63c88f66 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_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, @@ -31,6 +32,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/v2/bigtable_table_admin_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './bigtable_table_admin_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -89,9 +95,9 @@ export class BigtableTableAdminClient { * 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` @@ -104,7 +110,9 @@ export class BigtableTableAdminClient { 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. @@ -434,7 +442,7 @@ export class BigtableTableAdminClient { // ------------------- createTable( request: protos.google.bigtable.admin.v2.ICreateTableRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ITable, @@ -444,7 +452,7 @@ export class BigtableTableAdminClient { >; createTable( request: protos.google.bigtable.admin.v2.ICreateTableRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.ICreateTableRequest | null | undefined, @@ -505,7 +513,7 @@ export class BigtableTableAdminClient { createTable( request: protos.google.bigtable.admin.v2.ICreateTableRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ITable, | protos.google.bigtable.admin.v2.ICreateTableRequest @@ -526,12 +534,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -546,7 +554,7 @@ export class BigtableTableAdminClient { } getTable( request: protos.google.bigtable.admin.v2.IGetTableRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ITable, @@ -556,7 +564,7 @@ export class BigtableTableAdminClient { >; getTable( request: protos.google.bigtable.admin.v2.IGetTableRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, @@ -596,7 +604,7 @@ export class BigtableTableAdminClient { getTable( request: protos.google.bigtable.admin.v2.IGetTableRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ITable, protos.google.bigtable.admin.v2.IGetTableRequest | null | undefined, @@ -615,12 +623,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -635,7 +643,7 @@ export class BigtableTableAdminClient { } deleteTable( request: protos.google.bigtable.admin.v2.IDeleteTableRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -645,7 +653,7 @@ export class BigtableTableAdminClient { >; deleteTable( request: protos.google.bigtable.admin.v2.IDeleteTableRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteTableRequest | null | undefined, @@ -682,7 +690,7 @@ export class BigtableTableAdminClient { deleteTable( request: protos.google.bigtable.admin.v2.IDeleteTableRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteTableRequest @@ -703,12 +711,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -723,7 +731,7 @@ export class BigtableTableAdminClient { } modifyColumnFamilies( request: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ITable, @@ -733,7 +741,7 @@ export class BigtableTableAdminClient { >; modifyColumnFamilies( request: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ITable, | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest @@ -782,7 +790,7 @@ export class BigtableTableAdminClient { modifyColumnFamilies( request: protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ITable, | protos.google.bigtable.admin.v2.IModifyColumnFamiliesRequest @@ -805,12 +813,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -825,7 +833,7 @@ export class BigtableTableAdminClient { } dropRowRange( request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -835,7 +843,7 @@ export class BigtableTableAdminClient { >; dropRowRange( request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDropRowRangeRequest | null | undefined, @@ -879,7 +887,7 @@ export class BigtableTableAdminClient { dropRowRange( request: protos.google.bigtable.admin.v2.IDropRowRangeRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDropRowRangeRequest @@ -900,12 +908,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -920,7 +928,7 @@ export class BigtableTableAdminClient { } generateConsistencyToken( request: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, @@ -933,7 +941,7 @@ export class BigtableTableAdminClient { >; generateConsistencyToken( request: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest @@ -977,7 +985,7 @@ export class BigtableTableAdminClient { generateConsistencyToken( request: protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IGenerateConsistencyTokenResponse, | protos.google.bigtable.admin.v2.IGenerateConsistencyTokenRequest @@ -1003,12 +1011,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1027,7 +1035,7 @@ export class BigtableTableAdminClient { } checkConsistency( request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ICheckConsistencyResponse, @@ -1037,7 +1045,7 @@ export class BigtableTableAdminClient { >; checkConsistency( request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ICheckConsistencyResponse, | protos.google.bigtable.admin.v2.ICheckConsistencyRequest @@ -1082,7 +1090,7 @@ export class BigtableTableAdminClient { checkConsistency( request: protos.google.bigtable.admin.v2.ICheckConsistencyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ICheckConsistencyResponse, | protos.google.bigtable.admin.v2.ICheckConsistencyRequest @@ -1105,12 +1113,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1125,7 +1133,7 @@ export class BigtableTableAdminClient { } getSnapshot( request: protos.google.bigtable.admin.v2.IGetSnapshotRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ISnapshot, @@ -1135,7 +1143,7 @@ export class BigtableTableAdminClient { >; getSnapshot( request: protos.google.bigtable.admin.v2.IGetSnapshotRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.ISnapshot, protos.google.bigtable.admin.v2.IGetSnapshotRequest | null | undefined, @@ -1178,7 +1186,7 @@ export class BigtableTableAdminClient { getSnapshot( request: protos.google.bigtable.admin.v2.IGetSnapshotRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.ISnapshot, | protos.google.bigtable.admin.v2.IGetSnapshotRequest @@ -1199,12 +1207,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1219,7 +1227,7 @@ export class BigtableTableAdminClient { } deleteSnapshot( request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1229,7 +1237,7 @@ export class BigtableTableAdminClient { >; deleteSnapshot( request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteSnapshotRequest | null | undefined, @@ -1272,7 +1280,7 @@ export class BigtableTableAdminClient { deleteSnapshot( request: protos.google.bigtable.admin.v2.IDeleteSnapshotRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteSnapshotRequest @@ -1293,12 +1301,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1313,7 +1321,7 @@ export class BigtableTableAdminClient { } getBackup( request: protos.google.bigtable.admin.v2.IGetBackupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IBackup, @@ -1323,7 +1331,7 @@ export class BigtableTableAdminClient { >; getBackup( request: protos.google.bigtable.admin.v2.IGetBackupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, @@ -1360,7 +1368,7 @@ export class BigtableTableAdminClient { getBackup( request: protos.google.bigtable.admin.v2.IGetBackupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IGetBackupRequest | null | undefined, @@ -1379,12 +1387,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1399,7 +1407,7 @@ export class BigtableTableAdminClient { } updateBackup( request: protos.google.bigtable.admin.v2.IUpdateBackupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IBackup, @@ -1409,7 +1417,7 @@ export class BigtableTableAdminClient { >; updateBackup( request: protos.google.bigtable.admin.v2.IUpdateBackupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.bigtable.admin.v2.IBackup, protos.google.bigtable.admin.v2.IUpdateBackupRequest | null | undefined, @@ -1453,7 +1461,7 @@ export class BigtableTableAdminClient { updateBackup( request: protos.google.bigtable.admin.v2.IUpdateBackupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.bigtable.admin.v2.IBackup, | protos.google.bigtable.admin.v2.IUpdateBackupRequest @@ -1474,12 +1482,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1494,7 +1502,7 @@ export class BigtableTableAdminClient { } deleteBackup( request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1504,7 +1512,7 @@ export class BigtableTableAdminClient { >; deleteBackup( request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, protos.google.bigtable.admin.v2.IDeleteBackupRequest | null | undefined, @@ -1541,7 +1549,7 @@ export class BigtableTableAdminClient { deleteBackup( request: protos.google.bigtable.admin.v2.IDeleteBackupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.bigtable.admin.v2.IDeleteBackupRequest @@ -1562,12 +1570,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1582,7 +1590,7 @@ export class BigtableTableAdminClient { } getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1592,7 +1600,7 @@ export class BigtableTableAdminClient { >; 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, @@ -1633,7 +1641,7 @@ export class BigtableTableAdminClient { getIamPolicy( request: protos.google.iam.v1.IGetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, @@ -1652,12 +1660,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1672,7 +1680,7 @@ export class BigtableTableAdminClient { } setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.IPolicy, @@ -1682,7 +1690,7 @@ export class BigtableTableAdminClient { >; 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, @@ -1724,7 +1732,7 @@ export class BigtableTableAdminClient { setIamPolicy( request: protos.google.iam.v1.ISetIamPolicyRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, @@ -1743,12 +1751,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1763,7 +1771,7 @@ export class BigtableTableAdminClient { } testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.iam.v1.ITestIamPermissionsResponse, @@ -1773,7 +1781,7 @@ export class BigtableTableAdminClient { >; 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, @@ -1814,7 +1822,7 @@ export class BigtableTableAdminClient { testIamPermissions( request: protos.google.iam.v1.ITestIamPermissionsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, @@ -1833,12 +1841,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -1854,7 +1862,7 @@ export class BigtableTableAdminClient { createTableFromSnapshot( request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1867,7 +1875,7 @@ export class BigtableTableAdminClient { >; createTableFromSnapshot( request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.ITable, @@ -1927,7 +1935,7 @@ export class BigtableTableAdminClient { createTableFromSnapshot( request: protos.google.bigtable.admin.v2.ICreateTableFromSnapshotRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.ITable, @@ -1955,12 +1963,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2016,7 +2024,7 @@ export class BigtableTableAdminClient { } snapshotTable( request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2029,7 +2037,7 @@ export class BigtableTableAdminClient { >; snapshotTable( request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.ISnapshot, @@ -2098,7 +2106,7 @@ export class BigtableTableAdminClient { snapshotTable( request: protos.google.bigtable.admin.v2.ISnapshotTableRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.ISnapshot, @@ -2126,12 +2134,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2183,7 +2191,7 @@ export class BigtableTableAdminClient { } createBackup( request: protos.google.bigtable.admin.v2.ICreateBackupRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2196,7 +2204,7 @@ export class BigtableTableAdminClient { >; createBackup( request: protos.google.bigtable.admin.v2.ICreateBackupRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.IBackup, @@ -2258,7 +2266,7 @@ export class BigtableTableAdminClient { createBackup( request: protos.google.bigtable.admin.v2.ICreateBackupRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.IBackup, @@ -2286,12 +2294,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2343,7 +2351,7 @@ export class BigtableTableAdminClient { } restoreTable( request: protos.google.bigtable.admin.v2.IRestoreTableRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2356,7 +2364,7 @@ export class BigtableTableAdminClient { >; restoreTable( request: protos.google.bigtable.admin.v2.IRestoreTableRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.bigtable.admin.v2.ITable, @@ -2417,7 +2425,7 @@ export class BigtableTableAdminClient { restoreTable( request: protos.google.bigtable.admin.v2.IRestoreTableRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.bigtable.admin.v2.ITable, @@ -2445,12 +2453,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2502,7 +2510,7 @@ export class BigtableTableAdminClient { } listTables( request: protos.google.bigtable.admin.v2.IListTablesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ITable[], @@ -2512,7 +2520,7 @@ export class BigtableTableAdminClient { >; listTables( request: protos.google.bigtable.admin.v2.IListTablesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.bigtable.admin.v2.IListTablesRequest, protos.google.bigtable.admin.v2.IListTablesResponse | null | undefined, @@ -2566,7 +2574,7 @@ export class BigtableTableAdminClient { listTables( request: protos.google.bigtable.admin.v2.IListTablesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.bigtable.admin.v2.IListTablesRequest, | protos.google.bigtable.admin.v2.IListTablesResponse @@ -2587,12 +2595,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2642,7 +2650,7 @@ export class BigtableTableAdminClient { */ listTablesStream( request?: protos.google.bigtable.admin.v2.IListTablesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2704,7 +2712,7 @@ export class BigtableTableAdminClient { */ listTablesAsync( request?: protos.google.bigtable.admin.v2.IListTablesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2726,7 +2734,7 @@ export class BigtableTableAdminClient { } listSnapshots( request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.ISnapshot[], @@ -2736,7 +2744,7 @@ export class BigtableTableAdminClient { >; listSnapshots( request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.bigtable.admin.v2.IListSnapshotsRequest, protos.google.bigtable.admin.v2.IListSnapshotsResponse | null | undefined, @@ -2789,7 +2797,7 @@ export class BigtableTableAdminClient { listSnapshots( request: protos.google.bigtable.admin.v2.IListSnapshotsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.bigtable.admin.v2.IListSnapshotsRequest, | protos.google.bigtable.admin.v2.IListSnapshotsResponse @@ -2810,12 +2818,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -2858,7 +2866,7 @@ export class BigtableTableAdminClient { */ listSnapshotsStream( request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2913,7 +2921,7 @@ export class BigtableTableAdminClient { */ listSnapshotsAsync( request?: protos.google.bigtable.admin.v2.IListSnapshotsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2935,7 +2943,7 @@ export class BigtableTableAdminClient { } listBackups( request: protos.google.bigtable.admin.v2.IListBackupsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.bigtable.admin.v2.IBackup[], @@ -2945,7 +2953,7 @@ export class BigtableTableAdminClient { >; listBackups( request: protos.google.bigtable.admin.v2.IListBackupsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.bigtable.admin.v2.IListBackupsRequest, protos.google.bigtable.admin.v2.IListBackupsResponse | null | undefined, @@ -3049,7 +3057,7 @@ export class BigtableTableAdminClient { listBackups( request: protos.google.bigtable.admin.v2.IListBackupsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.bigtable.admin.v2.IListBackupsRequest, | protos.google.bigtable.admin.v2.IListBackupsResponse @@ -3070,12 +3078,12 @@ export class BigtableTableAdminClient { ] > | 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 || {}; @@ -3174,7 +3182,7 @@ export class BigtableTableAdminClient { */ listBackupsStream( request?: protos.google.bigtable.admin.v2.IListBackupsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -3285,7 +3293,7 @@ export class BigtableTableAdminClient { */ listBackupsAsync( request?: protos.google.bigtable.admin.v2.IListBackupsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/synth.metadata b/synth.metadata index 7f15bb152..1b7264086 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "49102b4ac63c28c46aea7f27e85efd67035dc399" + "sha": "59a0d269d5196991dd395e671d7d5f54ce449005" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "ccd6462d31e6422fd188b6590aa8d0ad03e7d9a3", - "internalRef": "339464550" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -96,7 +96,6 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1955001207", "protos/google/bigtable/admin/v2/bigtable_instance_admin.proto", "protos/google/bigtable/admin/v2/bigtable_table_admin.proto", "protos/google/bigtable/admin/v2/common.proto", @@ -109,7 +108,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.1658066032", "src/v2/bigtable_client.ts", "src/v2/bigtable_client_config.json", "src/v2/bigtable_instance_admin_client.ts", From f4cd9912081c14533de0eaec285658928486aa67 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:36:08 -0800 Subject: [PATCH 03/21] docs: spelling correction for "targetting" (#825) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/c503f640-90ae-4547-bcc8-a154d32c609e/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- README.md | 2 +- synth.metadata | 86 ++------------------------------------------------ 2 files changed, 3 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index ded83bacf..ec1923afc 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/synth.metadata b/synth.metadata index 1b7264086..25d03307d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "59a0d269d5196991dd395e671d7d5f54ce449005" + "sha": "a38cbcca1660bc40fe137acb973bf62f3c55754e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -42,87 +42,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/bigtable/admin/v2/bigtable_instance_admin.proto", - "protos/google/bigtable/admin/v2/bigtable_table_admin.proto", - "protos/google/bigtable/admin/v2/common.proto", - "protos/google/bigtable/admin/v2/instance.proto", - "protos/google/bigtable/admin/v2/table.proto", - "protos/google/bigtable/v2/bigtable.proto", - "protos/google/bigtable/v2/data.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/v2/bigtable_client.ts", - "src/v2/bigtable_client_config.json", - "src/v2/bigtable_instance_admin_client.ts", - "src/v2/bigtable_instance_admin_client_config.json", - "src/v2/bigtable_instance_admin_proto_list.json", - "src/v2/bigtable_proto_list.json", - "src/v2/bigtable_table_admin_client.ts", - "src/v2/bigtable_table_admin_client_config.json", - "src/v2/bigtable_table_admin_proto_list.json", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_bigtable_instance_admin_v2.ts", - "test/gapic_bigtable_table_admin_v2.ts", - "test/gapic_bigtable_v2.ts", - "webpack.config.js" ] } \ No newline at end of file From d37fe9ecdadde8d335fc1f83ab5ac3c3f5813e0d Mon Sep 17 00:00:00 2001 From: Alex <7764119+AVaksman@users.noreply.github.com> Date: Wed, 25 Nov 2020 19:53:00 -0500 Subject: [PATCH 04/21] revert!: remove failedLocation from getInstancesCallback/Response (#755) * revert!: remove failedLocation from getInstancesCallback/Response * chore: update doc examples Co-authored-by: Christopher Wilcox --- src/index.ts | 23 +++++++++++++---------- system-test/bigtable.ts | 3 +-- test/index.ts | 11 ++--------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/index.ts b/src/index.ts index ff35fb0ea..73deb452d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,13 +47,11 @@ export interface GetInstancesCallback { ( err: ServiceError | null, result?: Instance[], - failedLocations?: string[], response?: google.bigtable.admin.v2.IListInstancesResponse ): void; } export type GetInstancesResponse = [ Instance[], - string[], google.bigtable.admin.v2.IListInstancesResponse ]; @@ -607,15 +605,19 @@ export class Bigtable { /** * @typedef {array} GetInstancesResponse * @property {Instance[]} 0 Array of {@link Instance} instances. - * @property {string[]} 1 locations from which Instance information could not be retrieved - * @property {object} 2 The full API response. + * @property {object} 1 The full API response. + * Note: 'failedLocations' property may contain locations from which + * Instance information could not be retrieved. + * Values are of the form `projects//locations/` */ /** * @callback GetInstancesCallback * @param {?Error} err Request error, if any. * @param {Instance[]} instances Array of {@link Instance} instances. - * @param {string[]} locations from which Instance information could not be retrieved * @param {object} apiResponse The full API response. + * Note: 'failedLocations' property may contain locations from which + * Instance information could not be retrieved. + * Values are of the form `projects//locations/` */ /** * Get Instance objects for all of your Cloud Bigtable instances. @@ -629,10 +631,10 @@ export class Bigtable { * const {Bigtable} = require('@google-cloud/bigtable'); * const bigtable = new Bigtable(); * - * bigtable.getInstances(function(err, instances) { + * bigtable.getInstances(function(err, instances, response) { * if (!err) { * // `instances` is an array of Instance objects. - * if (failedLocations.length > 0) { + * if (response.failedLocations.length > 0) { * // These locations contain instances which could not be retrieved. * } * } @@ -642,10 +644,11 @@ export class Bigtable { * * bigtable.getInstances().then(function(data) { * const instances = data[0]; + * const fullResponse = data[1]; * - * if (data[1]) { + * if (fullResponse.failedLocations.length > 0) { * // These locations contain instances which could not be retrieved. - * const failedLocations = data[1]; + * const failedLocations = fullResponse.failedLocations; * } * }); */ @@ -681,7 +684,7 @@ export class Bigtable { instance.metadata = instanceData; return instance; }); - callback!(null, instances, resp.failedLocations, resp); + callback!(null, instances, resp); } ); } diff --git a/system-test/bigtable.ts b/system-test/bigtable.ts index 97c341080..ba830446c 100644 --- a/system-test/bigtable.ts +++ b/system-test/bigtable.ts @@ -103,9 +103,8 @@ describe('Bigtable', () => { describe('instances', () => { it('should get a list of instances', async () => { - const [instances, failedLocations] = await bigtable.getInstances(); + const [instances] = await bigtable.getInstances(); assert(instances.length > 0); - assert(Array.isArray(failedLocations)); }); it('should check if an instance exists', async () => { diff --git a/test/index.ts b/test/index.ts index c22e91d61..d33f1d8aa 100644 --- a/test/index.ts +++ b/test/index.ts @@ -558,7 +558,7 @@ describe('Bigtable', () => { }); }); - it('should return an array of instance objects and failed locations', done => { + it('should return an array of instance objects', done => { const response = { instances: [ { @@ -568,7 +568,6 @@ describe('Bigtable', () => { name: 'b', }, ], - failedLocations: ['projects//locations/'], }; const fakeInstances = [{}, {}]; bigtable.request = (config: {}, callback: Function) => { @@ -581,18 +580,12 @@ describe('Bigtable', () => { }; bigtable.getInstances( - ( - err: Error, - instances: Instance[], - failedLocations: string[], - apiResponse: {} - ) => { + (err: Error, instances: Instance[], apiResponse: {}) => { assert.ifError(err); assert.strictEqual(instances[0], fakeInstances[0]); assert.strictEqual(instances[0].metadata, response.instances[0]); assert.strictEqual(instances[1], fakeInstances[1]); assert.strictEqual(instances[1].metadata, response.instances[1]); - assert.strictEqual(failedLocations, response.failedLocations); assert.strictEqual(apiResponse, response); done(); } From 0ef897687474bfe4ce08781ed6d93d43a41a1011 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:58:30 -0800 Subject: [PATCH 05/21] chore: generate GAPIC metadata JSON file (#827) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/464906e9-6f3c-41d1-906e-fd7073c42d19/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- src/v2/gapic_metadata.json | 463 +++++++++++++++++++++++++++++++++++++ synth.metadata | 6 +- 2 files changed, 466 insertions(+), 3 deletions(-) create mode 100644 src/v2/gapic_metadata.json diff --git a/src/v2/gapic_metadata.json b/src/v2/gapic_metadata.json new file mode 100644 index 000000000..7c0177a6c --- /dev/null +++ b/src/v2/gapic_metadata.json @@ -0,0 +1,463 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.bigtable.admin.v2", + "libraryPackage": "@google-cloud/bigtable", + "services": { + "BigtableInstanceAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableInstanceAdminClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableInstanceAdminClient", + "rpcs": { + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "CreateAppProfile": { + "methods": [ + "createAppProfile" + ] + }, + "GetAppProfile": { + "methods": [ + "getAppProfile" + ] + }, + "DeleteAppProfile": { + "methods": [ + "deleteAppProfile" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "PartialUpdateInstance": { + "methods": [ + "partialUpdateInstance" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateAppProfile": { + "methods": [ + "updateAppProfile" + ] + }, + "ListAppProfiles": { + "methods": [ + "listAppProfiles", + "listAppProfilesStream", + "listAppProfilesAsync" + ] + } + } + } + } + }, + "BigtableTableAdmin": { + "clients": { + "grpc": { + "libraryClient": "BigtableTableAdminClient", + "rpcs": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "BigtableTableAdminClient", + "rpcs": { + "CreateTable": { + "methods": [ + "createTable" + ] + }, + "GetTable": { + "methods": [ + "getTable" + ] + }, + "DeleteTable": { + "methods": [ + "deleteTable" + ] + }, + "ModifyColumnFamilies": { + "methods": [ + "modifyColumnFamilies" + ] + }, + "DropRowRange": { + "methods": [ + "dropRowRange" + ] + }, + "GenerateConsistencyToken": { + "methods": [ + "generateConsistencyToken" + ] + }, + "CheckConsistency": { + "methods": [ + "checkConsistency" + ] + }, + "GetSnapshot": { + "methods": [ + "getSnapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "deleteSnapshot" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "UpdateBackup": { + "methods": [ + "updateBackup" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "CreateTableFromSnapshot": { + "methods": [ + "createTableFromSnapshot" + ] + }, + "SnapshotTable": { + "methods": [ + "snapshotTable" + ] + }, + "CreateBackup": { + "methods": [ + "createBackup" + ] + }, + "RestoreTable": { + "methods": [ + "restoreTable" + ] + }, + "ListTables": { + "methods": [ + "listTables", + "listTablesStream", + "listTablesAsync" + ] + }, + "ListSnapshots": { + "methods": [ + "listSnapshots", + "listSnapshotsStream", + "listSnapshotsAsync" + ] + }, + "ListBackups": { + "methods": [ + "listBackups", + "listBackupsStream", + "listBackupsAsync" + ] + } + } + } + } + } + } +} diff --git a/synth.metadata b/synth.metadata index 25d03307d..d7c7f6ceb 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "a38cbcca1660bc40fe137acb973bf62f3c55754e" + "sha": "d37fe9ecdadde8d335fc1f83ab5ac3c3f5813e0d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", - "internalRef": "343187793" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From c59645077d6322648531a52a64cd295edaee50d1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:42:04 -0800 Subject: [PATCH 06/21] docs: add instructions for authenticating for system tests (#831) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9943226b-8e9b-44fd-b025-446fc572242a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- CONTRIBUTING.md | 15 +++++++++++++-- README.md | 3 +-- synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f6c4cf010..802c12273 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Bigtable API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + + ## Running the tests 1. [Prepare your environment for Node.js setup][setup]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. npm run fix [setup]: https://cloud.google.com/nodejs/docs/setup +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigtable.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/README.md b/README.md index ec1923afc..7779e8a15 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,7 @@ quickstart(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/synth.metadata b/synth.metadata index d7c7f6ceb..d4136f1aa 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "d37fe9ecdadde8d335fc1f83ab5ac3c3f5813e0d" + "sha": "0ef897687474bfe4ce08781ed6d93d43a41a1011" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From df320764f79cb4156f555068a6e4f9d119591f0d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 1 Jan 2021 19:40:17 -0800 Subject: [PATCH 07/21] chore: update license headers (#832) --- .jsdoc.js | 4 ++-- protos/protos.d.ts | 2 +- protos/protos.js | 2 +- src/v2/bigtable_client.ts | 2 +- src/v2/bigtable_instance_admin_client.ts | 2 +- src/v2/bigtable_table_admin_client.ts | 2 +- synth.metadata | 2 +- system-test/fixtures/sample/src/index.js | 2 +- system-test/fixtures/sample/src/index.ts | 2 +- system-test/install.ts | 2 +- test/gapic_bigtable_instance_admin_v2.ts | 2 +- test/gapic_bigtable_table_admin_v2.ts | 2 +- test/gapic_bigtable_v2.ts | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.jsdoc.js b/.jsdoc.js index 6e03368b7..1a3b4732d 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/bigtable', diff --git a/protos/protos.d.ts b/protos/protos.d.ts index b74e812f3..efdb8bbbc 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/protos/protos.js b/protos/protos.js index e826ac7ec..b6b59cef5 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2/bigtable_client.ts b/src/v2/bigtable_client.ts index d98c600dc..d531e9034 100644 --- a/src/v2/bigtable_client.ts +++ b/src/v2/bigtable_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index fd39b1dbe..66605f462 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v2/bigtable_table_admin_client.ts b/src/v2/bigtable_table_admin_client.ts index b63c88f66..6bb907e59 100644 --- a/src/v2/bigtable_table_admin_client.ts +++ b/src/v2/bigtable_table_admin_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/synth.metadata b/synth.metadata index d4136f1aa..a54d93f05 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "0ef897687474bfe4ce08781ed6d93d43a41a1011" + "sha": "c59645077d6322648531a52a64cd295edaee50d1" } }, { diff --git a/system-test/fixtures/sample/src/index.js b/system-test/fixtures/sample/src/index.js index a31aed132..f232229d7 100644 --- a/system-test/fixtures/sample/src/index.js +++ b/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/system-test/fixtures/sample/src/index.ts b/system-test/fixtures/sample/src/index.ts index c37ac8989..90e054464 100644 --- a/system-test/fixtures/sample/src/index.ts +++ b/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/system-test/install.ts b/system-test/install.ts index 39d90f771..d2d61c039 100644 --- a/system-test/install.ts +++ b/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index 048121417..cac1d9281 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_bigtable_table_admin_v2.ts b/test/gapic_bigtable_table_admin_v2.ts index 2012eff15..5d10f38a6 100644 --- a/test/gapic_bigtable_table_admin_v2.ts +++ b/test/gapic_bigtable_table_admin_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_bigtable_v2.ts b/test/gapic_bigtable_v2.ts index 04297781b..7d4dd2b38 100644 --- a/test/gapic_bigtable_v2.ts +++ b/test/gapic_bigtable_v2.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 5d3e8f721c2a32a33bf41baa1ed237fb90f7cbd6 Mon Sep 17 00:00:00 2001 From: Billy Jacobson Date: Thu, 7 Jan 2021 11:05:53 -0500 Subject: [PATCH 08/21] fix: Renaming region tags to not conflict with documentation snippets (#834) * Moving API reference snippets and renaming region tags to not conflict with documentation snippets * fix mismatched tags, fix mixed backups files * fix quickstart tag * linkenator fix --- README.md | 12 ++-- linkinator.config.json | 8 ++- package.json | 2 +- samples/README.md | 36 +++++----- .../.eslintrc.yml | 0 .../app-profile.js | 24 +++---- .../backups.create.js | 4 +- .../backups.delete.js | 4 +- .../backups.get.js | 4 +- .../backups.list.js | 4 +- .../backups.restore.js | 4 +- .../backups.update.js | 4 +- .../cluster.js | 24 +++---- .../family.js | 24 +++---- .../instance.js | 60 ++++++++-------- .../row.js | 40 +++++------ .../table.js | 64 ++++++++--------- samples/package.json | 2 +- src/app-profile.ts | 24 +++---- src/backup.ts | 36 +++++----- src/cluster.ts | 32 ++++----- src/family.ts | 24 +++---- src/instance.ts | 68 +++++++++---------- src/row.ts | 40 +++++------ src/table.ts | 64 ++++++++--------- 25 files changed, 307 insertions(+), 301 deletions(-) rename samples/{document-snippets => api-reference-doc-snippets}/.eslintrc.yml (100%) rename samples/{document-snippets => api-reference-doc-snippets}/app-profile.js (86%) rename samples/{ => api-reference-doc-snippets}/backups.create.js (95%) rename samples/{ => api-reference-doc-snippets}/backups.delete.js (95%) rename samples/{ => api-reference-doc-snippets}/backups.get.js (96%) rename samples/{ => api-reference-doc-snippets}/backups.list.js (95%) rename samples/{ => api-reference-doc-snippets}/backups.restore.js (94%) rename samples/{ => api-reference-doc-snippets}/backups.update.js (95%) rename samples/{document-snippets => api-reference-doc-snippets}/cluster.js (86%) rename samples/{document-snippets => api-reference-doc-snippets}/family.js (87%) rename samples/{document-snippets => api-reference-doc-snippets}/instance.js (86%) rename samples/{document-snippets => api-reference-doc-snippets}/row.js (90%) rename samples/{document-snippets => api-reference-doc-snippets}/table.js (86%) diff --git a/README.md b/README.md index 7779e8a15..bbef94631 100644 --- a/README.md +++ b/README.md @@ -89,12 +89,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tr | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.create.js,samples/README.md) | -| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.delete.js,samples/README.md) | -| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.get.js,samples/README.md) | -| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.list.js,samples/README.md) | -| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.restore.js,samples/README.md) | -| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.update.js,samples/README.md) | +| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) | +| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) | +| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) | +| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) | +| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) | +| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) | | Filter Snippets | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/filterSnippets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/filterSnippets.js,samples/README.md) | | Instances | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/linkinator.config.json b/linkinator.config.json index 29a223b6d..2ddec6998 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -3,7 +3,13 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js", + "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js" ], "silent": true, "concurrency": 10 diff --git a/package.json b/package.json index bbad97502..7f791070f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "lint": "gts check", "prepare": "npm run compile", "samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../", - "snippet-test": "mocha samples/document-snippets/tests/*.js --timeout 600000", + "snippet-test": "mocha samples/api-reference-doc-snippets/tests/*.js --timeout 600000", "presystem-test": "npm run compile", "system-test": "mocha build/system-test --timeout 600000", "pretest": "npm run compile", diff --git a/samples/README.md b/samples/README.md index ea8cc6b2b..cc793a08b 100644 --- a/samples/README.md +++ b/samples/README.md @@ -45,14 +45,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Backups.create -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.create.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.create.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) __Usage:__ -`node samples/backups.create.js` +`node samples/api-reference-doc-snippets/backups.create.js` ----- @@ -62,14 +62,14 @@ __Usage:__ ### Backups.delete -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.delete.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.delete.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) __Usage:__ -`node samples/backups.delete.js` +`node samples/api-reference-doc-snippets/backups.delete.js` ----- @@ -79,14 +79,14 @@ __Usage:__ ### Backups.get -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.get.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.get.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) __Usage:__ -`node samples/backups.get.js` +`node samples/api-reference-doc-snippets/backups.get.js` ----- @@ -96,14 +96,14 @@ __Usage:__ ### Backups.list -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.list.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.list.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) __Usage:__ -`node samples/backups.list.js` +`node samples/api-reference-doc-snippets/backups.list.js` ----- @@ -113,14 +113,14 @@ __Usage:__ ### Backups.restore -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.restore.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.restore.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) __Usage:__ -`node samples/backups.restore.js` +`node samples/api-reference-doc-snippets/backups.restore.js` ----- @@ -130,14 +130,14 @@ __Usage:__ ### Backups.update -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/backups.update.js). +View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/backups.update.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) __Usage:__ -`node samples/backups.update.js` +`node samples/api-reference-doc-snippets/backups.update.js` ----- diff --git a/samples/document-snippets/.eslintrc.yml b/samples/api-reference-doc-snippets/.eslintrc.yml similarity index 100% rename from samples/document-snippets/.eslintrc.yml rename to samples/api-reference-doc-snippets/.eslintrc.yml diff --git a/samples/document-snippets/app-profile.js b/samples/api-reference-doc-snippets/app-profile.js similarity index 86% rename from samples/document-snippets/app-profile.js rename to samples/api-reference-doc-snippets/app-profile.js index 9b75cdf87..44fe89aa7 100644 --- a/samples/document-snippets/app-profile.js +++ b/samples/api-reference-doc-snippets/app-profile.js @@ -14,7 +14,7 @@ const snippets = { create: (instanceId, appProfileId) => { - // [START bigtable_create_app_profile] + // [START bigtable_api_create_app_profile] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -33,11 +33,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_app_profile] + // [END bigtable_api_create_app_profile] }, delete: (instanceId, appProfileId) => { - // [START bigtable_delete_app_profile] + // [START bigtable_api_delete_app_profile] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -51,11 +51,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_delete_app_profile] + // [END bigtable_api_delete_app_profile] }, exists: (instanceId, appProfileId) => { - // [START bigtable_exists_app_profile] + // [START bigtable_api_exists_app_profile] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -69,11 +69,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_exists_app_profile] + // [END bigtable_api_exists_app_profile] }, get: (instanceId, appProfileId) => { - // [START bigtable_get_app_profile] + // [START bigtable_api_get_app_profile] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -88,11 +88,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_app_profile] + // [END bigtable_api_get_app_profile] }, getMeta: (instanceId, appProfileId) => { - // [START bigtable_app_profile_get_meta] + // [START bigtable_api_app_profile_get_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -107,11 +107,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_app_profile_get_meta] + // [END bigtable_api_app_profile_get_meta] }, setMeta: (instanceId, appProfileId, clusterId) => { - // [START bigtable_app_profile_set_meta] + // [START bigtable_api_app_profile_set_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -132,7 +132,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_app_profile_set_meta] + // [END bigtable_api_app_profile_set_meta] }, }; diff --git a/samples/backups.create.js b/samples/api-reference-doc-snippets/backups.create.js similarity index 95% rename from samples/backups.create.js rename to samples/api-reference-doc-snippets/backups.create.js index ddb05d650..bd89c1eb7 100644 --- a/samples/backups.create.js +++ b/samples/api-reference-doc-snippets/backups.create.js @@ -18,7 +18,7 @@ async function main( clusterId = 'YOUR_CLUSTER_ID', backupId = 'YOUR_BACKUP_ID' ) { - // [START bigtable_create_backup] + // [START bigtable_api_create_backup] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -46,7 +46,7 @@ async function main( } await createBackup(); - // [END bigtable_create_backup] + // [END bigtable_api_create_backup] } const args = process.argv.slice(2); diff --git a/samples/backups.delete.js b/samples/api-reference-doc-snippets/backups.delete.js similarity index 95% rename from samples/backups.delete.js rename to samples/api-reference-doc-snippets/backups.delete.js index eaeb45b7d..a5fac9ea5 100644 --- a/samples/backups.delete.js +++ b/samples/api-reference-doc-snippets/backups.delete.js @@ -18,7 +18,7 @@ async function main( clusterId = 'YOUR_CLUSTER_ID', backupId = 'YOUR_BACKUP_ID' ) { - // [START bigtable_delete_backup] + // [START bigtable_api_delete_backup] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -40,7 +40,7 @@ async function main( } await deleteBackup(); - // [END bigtable_delete_backup] + // [END bigtable_api_delete_backup] } const args = process.argv.slice(2); diff --git a/samples/backups.get.js b/samples/api-reference-doc-snippets/backups.get.js similarity index 96% rename from samples/backups.get.js rename to samples/api-reference-doc-snippets/backups.get.js index 046d5041b..dd03856ea 100644 --- a/samples/backups.get.js +++ b/samples/api-reference-doc-snippets/backups.get.js @@ -18,7 +18,7 @@ async function main( clusterId = 'YOUR_CLUSTER_ID', backupId = 'YOUR_BACKUP_ID' ) { - // [START bigtable_get_backup] + // [START bigtable_api_get_backup] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -52,7 +52,7 @@ async function main( } await getBackup(); - // [END bigtable_get_backup] + // [END bigtable_api_get_backup] } const args = process.argv.slice(2); diff --git a/samples/backups.list.js b/samples/api-reference-doc-snippets/backups.list.js similarity index 95% rename from samples/backups.list.js rename to samples/api-reference-doc-snippets/backups.list.js index 7b67a22d8..4625e356f 100644 --- a/samples/backups.list.js +++ b/samples/api-reference-doc-snippets/backups.list.js @@ -17,7 +17,7 @@ async function main( tableId = 'YOUR_TABLE_ID', clusterId = 'YOUR_CLUSTER_ID' ) { - // [START bigtable_list_backups] + // [START bigtable_api_list_backups] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -44,7 +44,7 @@ async function main( } await listBackups(); - // [END bigtable_list_backups] + // [END bigtable_api_list_backups] } const args = process.argv.slice(2); diff --git a/samples/backups.restore.js b/samples/api-reference-doc-snippets/backups.restore.js similarity index 94% rename from samples/backups.restore.js rename to samples/api-reference-doc-snippets/backups.restore.js index 58d1beccc..c960d1ee5 100644 --- a/samples/backups.restore.js +++ b/samples/api-reference-doc-snippets/backups.restore.js @@ -17,7 +17,7 @@ async function main( tableId = 'YOUR_TABLE_ID', backupId = 'YOUR_BACKUP_ID' ) { - // [START bigtable_restore_backups] + // [START bigtable_api_restore_backup] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -41,7 +41,7 @@ async function main( } await restoreBackup(); - // [END bigtable_restore_backup] + // [END bigtable_api_restore_backup] } const args = process.argv.slice(2); diff --git a/samples/backups.update.js b/samples/api-reference-doc-snippets/backups.update.js similarity index 95% rename from samples/backups.update.js rename to samples/api-reference-doc-snippets/backups.update.js index e4fa03bcb..25a6a69cd 100644 --- a/samples/backups.update.js +++ b/samples/api-reference-doc-snippets/backups.update.js @@ -18,7 +18,7 @@ async function main( clusterId = 'YOUR_CLUSTER_ID', backupId = 'YOUR_BACKUP_ID' ) { - // [START bigtable_update_backup] + // [START bigtable_api_update_backup] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); @@ -43,7 +43,7 @@ async function main( } await updateBackup(); - // [END bigtable_update_backup] + // [END bigtable_api_update_backup] } const args = process.argv.slice(2); diff --git a/samples/document-snippets/cluster.js b/samples/api-reference-doc-snippets/cluster.js similarity index 86% rename from samples/document-snippets/cluster.js rename to samples/api-reference-doc-snippets/cluster.js index 693cff6f9..31b1387ee 100644 --- a/samples/document-snippets/cluster.js +++ b/samples/api-reference-doc-snippets/cluster.js @@ -14,7 +14,7 @@ const snippets = { create: (instanceId, clusterId) => { - // [START bigtable_create_cluster] + // [START bigtable_api_create_cluster] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -30,11 +30,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_cluster] + // [END bigtable_api_create_cluster] }, delete: (instanceId, clusterId) => { - // [START bigtable_delete_cluster] + // [START bigtable_api_delete_cluster] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -48,11 +48,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_delete_cluster] + // [END bigtable_api_delete_cluster] }, exists: (instanceId, clusterId) => { - // [START bigtable_exists_cluster] + // [START bigtable_api_exists_cluster] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -66,11 +66,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_exists_cluster] + // [END bigtable_api_exists_cluster] }, get: (instanceId, clusterId) => { - // [START bigtable_get_cluster] + // [START bigtable_api_get_cluster] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -85,11 +85,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_cluster] + // [END bigtable_api_get_cluster] }, getMeta: (instanceId, clusterId) => { - // [START bigtable_cluster_get_meta] + // [START bigtable_api_cluster_get_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -104,11 +104,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_cluster_get_meta] + // [END bigtable_api_cluster_get_meta] }, setMeta: (instanceId, clusterId) => { - // [START bigtable_cluster_set_meta] + // [START bigtable_api_cluster_set_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -127,7 +127,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_cluster_set_meta] + // [END bigtable_api_cluster_set_meta] }, }; diff --git a/samples/document-snippets/family.js b/samples/api-reference-doc-snippets/family.js similarity index 87% rename from samples/document-snippets/family.js rename to samples/api-reference-doc-snippets/family.js index ed0ee849a..b5224fc21 100644 --- a/samples/document-snippets/family.js +++ b/samples/api-reference-doc-snippets/family.js @@ -14,7 +14,7 @@ const snippets = { createColmFamily: (instanceId, tableId, familyId) => { - // [START bigtable_create_family] + // [START bigtable_api_create_family] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -30,10 +30,10 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_family] + // [END bigtable_api_create_family] }, existsFamily: (instanceId, tableId, familyId) => { - // [START bigtable_exists_family] + // [START bigtable_api_exists_family] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -48,10 +48,10 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_exists_family] + // [END bigtable_api_exists_family] }, getFamily: (instanceId, tableId, familyId) => { - // [START bigtable_get_family] + // [START bigtable_api_get_family] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -67,10 +67,10 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_family] + // [END bigtable_api_get_family] }, getMetadata: (instanceId, tableId, familyId) => { - // [START bigtable_get_family_meta] + // [START bigtable_api_get_family_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -86,10 +86,10 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_family_meta] + // [END bigtable_api_get_family_meta] }, setMetadata: (instanceId, tableId, familyId) => { - // [START bigtable_set_family_meta] + // [START bigtable_api_set_family_meta] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -111,10 +111,10 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_set_family_meta] + // [END bigtable_api_set_family_meta] }, delFamily: (instanceId, tableId, familyId) => { - // [START bigtable_del_family] + // [START bigtable_api_del_family] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -129,7 +129,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_del_family] + // [END bigtable_api_del_family] }, }; diff --git a/samples/document-snippets/instance.js b/samples/api-reference-doc-snippets/instance.js similarity index 86% rename from samples/document-snippets/instance.js rename to samples/api-reference-doc-snippets/instance.js index d21492048..7894c8be4 100644 --- a/samples/document-snippets/instance.js +++ b/samples/api-reference-doc-snippets/instance.js @@ -14,7 +14,7 @@ const snippets = { createInstance: (instanceId, clusterId) => { - // [START bigtable_create_instance] + // [START bigtable_api_create_instance] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -55,11 +55,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_instance] + // [END bigtable_api_create_instance] }, createCluster: (instanceId, clusterId) => { - // [START bigtable_create_cluster] + // [START bigtable_api_create_cluster] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -83,11 +83,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_cluster] + // [END bigtable_api_create_cluster] }, createAppProfile: (instanceId, clusterId, appProfileId, callback) => { - // [START bigtable_create_app_profile] + // [START bigtable_api_create_app_profile] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -107,11 +107,11 @@ const snippets = { } return callback(appProfile); }); - // [END bigtable_create_app_profile] + // [END bigtable_api_create_app_profile] }, createTable: (instanceId, tableId) => { - // [START bigtable_create_table] + // [START bigtable_api_create_table] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -149,11 +149,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_table] + // [END bigtable_api_create_table] }, existsInstance: instanceId => { - // [START bigtable_exists_instance] + // [START bigtable_api_exists_instance] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -166,11 +166,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_exists_instance] + // [END bigtable_api_exists_instance] }, getInstance: instanceId => { - // [START bigtable_get_instance] + // [START bigtable_api_get_instance] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -184,11 +184,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_instance] + // [END bigtable_api_get_instance] }, getClusters: instanceId => { - // [START bigtable_get_clusters] + // [START bigtable_api_get_clusters] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -201,11 +201,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_clusters] + // [END bigtable_api_get_clusters] }, getIamPolicy: instanceId => { - // [START bigtable_get_instance_Iam_policy] + // [START bigtable_api_get_instance_Iam_policy] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -218,11 +218,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_instance_Iam_policy] + // [END bigtable_api_get_instance_Iam_policy] }, setIamPolicy: instanceId => { - // [START bigtable_set_instance_Iam_policy] + // [START bigtable_api_set_instance_Iam_policy] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -244,11 +244,11 @@ const snippets = { .catch(err => { // Handle the error }); - // [END bigtable_set_instance_Iam_policy] + // [END bigtable_api_set_instance_Iam_policy] }, testIamPermissions: instanceId => { - // [START bigtable_test_instance_Iam_permissions] + // [START bigtable_api_test_instance_Iam_permissions] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -262,11 +262,11 @@ const snippets = { .catch(err => { // Handle the error }); - // [END bigtable_test_instance_Iam_permissions] + // [END bigtable_api_test_instance_Iam_permissions] }, getAppProfiles: instanceId => { - // [START bigtable_get_app_profiles] + // [START bigtable_api_get_app_profiles] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -279,11 +279,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_app_profiles] + // [END bigtable_api_get_app_profiles] }, getMetadata: instanceId => { - // [START bigtable_get_instance_metadata] + // [START bigtable_api_get_instance_metadata] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -296,11 +296,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_instance_metadata] + // [END bigtable_api_get_instance_metadata] }, getTables: instanceId => { - // [START bigtable_get_tables] + // [START bigtable_api_get_tables] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -322,11 +322,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_tables] + // [END bigtable_api_get_tables] }, updateInstance: instanceId => { - // [START bigtable_set_meta_data] + // [START bigtable_api_set_meta_data] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -343,11 +343,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_set_meta_data] + // [END bigtable_api_set_meta_data] }, delInstance: instanceId => { - // [START bigtable_del_instance] + // [START bigtable_api_del_instance] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -360,7 +360,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_del_instance] + // [END bigtable_api_del_instance] }, }; diff --git a/samples/document-snippets/row.js b/samples/api-reference-doc-snippets/row.js similarity index 90% rename from samples/document-snippets/row.js rename to samples/api-reference-doc-snippets/row.js index 513f946d2..db5a7282e 100644 --- a/samples/document-snippets/row.js +++ b/samples/api-reference-doc-snippets/row.js @@ -19,7 +19,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_create_row] + // [START bigtable_api_create_row] const row = table.row('samplerow'); row @@ -30,7 +30,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_row] + // [END bigtable_api_create_row] }, createRules: (instanceId, tableId) => { @@ -39,7 +39,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_create_rules] + // [START bigtable_api_create_rules] const row = table.row('samplerow'); // - // Add an increment amount to an existing value, if the targeted cell is @@ -72,7 +72,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_rules] + // [END bigtable_api_create_rules] }, deleteAllCells: (instanceId, tableId) => { @@ -81,7 +81,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_delete_all_cells] + // [START bigtable_api_delete_all_cells] const row = table.row('samplerow'); row .delete() @@ -91,7 +91,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_delete_all_cells] + // [END bigtable_api_delete_all_cells] }, deleteCells: (instanceId, tableId) => { @@ -100,7 +100,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_delete_particular_cells] + // [START bigtable_api_delete_particular_cells] const row = table.row('samplerow'); // Delete selective cell within a family. @@ -119,7 +119,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_delete_particular_cells] + // [END bigtable_api_delete_particular_cells] }, exists: (instanceId, tableId) => { @@ -128,7 +128,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_row_exists] + // [START bigtable_api_row_exists] const row = table.row('samplerow'); row @@ -139,7 +139,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_row_exists] + // [END bigtable_api_row_exists] }, filter: (instanceId, tableId) => { @@ -148,7 +148,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_row_filter] + // [START bigtable_api_row_filter] const row = table.row('samplerow'); const filter = [ @@ -186,7 +186,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_row_filter] + // [END bigtable_api_row_filter] }, get: (instanceId, tableId) => { @@ -195,7 +195,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_row] + // [START bigtable_api_get_row] const row = table.row('samplerow'); row @@ -223,7 +223,7 @@ const snippets = { // // Handle the error. // }); - // [END bigtable_get_row] + // [END bigtable_api_get_row] }, getMetadata: (instanceId, tableId) => { @@ -232,7 +232,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_row_meta] + // [START bigtable_api_get_row_meta] const row = table.row('samplerow'); row @@ -244,7 +244,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_row_meta] + // [END bigtable_api_get_row_meta] }, increment: (instanceId, tableId) => { @@ -253,7 +253,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_row_increment] + // [START bigtable_api_row_increment] const row = table.row('samplerow'); // Specify a custom amount to increment the column by. @@ -280,7 +280,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_row_increment] + // [END bigtable_api_row_increment] }, save: (instanceId, tableId) => { @@ -289,7 +289,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_row_save] + // [START bigtable_api_row_save] const row = table.row('samplerow'); const entry = { follows: { @@ -304,7 +304,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_row_save] + // [END bigtable_api_row_save] }, }; diff --git a/samples/document-snippets/table.js b/samples/api-reference-doc-snippets/table.js similarity index 86% rename from samples/document-snippets/table.js rename to samples/api-reference-doc-snippets/table.js index 30ee9f523..189cf2d48 100644 --- a/samples/document-snippets/table.js +++ b/samples/api-reference-doc-snippets/table.js @@ -20,7 +20,7 @@ const snippets = { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_create_table] + // [START bigtable_api_create_table] table .create() .then(result => { @@ -30,14 +30,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_table] + // [END bigtable_api_create_table] }, existsTable: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_exists_table] + // [START bigtable_api_exists_table] table .exists() .then(result => { @@ -46,14 +46,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_exists_table] + // [END bigtable_api_exists_table] }, getTable: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_table] + // [START bigtable_api_get_table] table .get() .then(result => { @@ -63,14 +63,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_table] + // [END bigtable_api_get_table] }, getMetadata: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_table_meta] + // [START bigtable_api_get_table_meta] table .getMetadata() .then(result => { @@ -80,14 +80,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_table_meta] + // [END bigtable_api_get_table_meta] }, createFamily: (instanceId, tableId, familyId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_create_family] + // [START bigtable_api_create_family] const options = {}; // options.rule = { // age: { @@ -107,14 +107,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_create_table] + // [END bigtable_api_create_family] }, getFamilies: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_families] + // [START bigtable_api_get_families] table .getFamilies() .then(result => { @@ -123,14 +123,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_families] + // [END bigtable_api_get_families] }, insertRows: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_insert_rows] + // [START bigtable_api_insert_rows] const entries = [ { key: 'alincoln', @@ -150,14 +150,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_insert_rows] + // [END bigtable_api_insert_rows] }, getRows: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_get_rows] + // [START bigtable_api_get_rows] const options = { keys: ['alincoln', 'gwashington'], }; @@ -169,14 +169,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_rows] + // [END bigtable_api_get_rows] }, mutate: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_mutate_rows] + // [START bigtable_api_mutate_rows] const entries = [ { method: 'delete', @@ -191,14 +191,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_mutate_rows] + // [END bigtable_api_mutate_rows] }, createReadStream: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_table_readstream] + // [START bigtable_api_table_readstream] table .createReadStream() .on('error', err => { @@ -276,14 +276,14 @@ const snippets = { // ] // }); // - // [END bigtable_table_readstream] + // [END bigtable_api_table_readstream] }, sampleRowKeys: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_sample_row_keys] + // [START bigtable_api_sample_row_keys] table .sampleRowKeys() .then(result => { @@ -292,11 +292,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_sample_row_keys] + // [END bigtable_api_sample_row_keys] }, getIamPolicy: (instanceId, tableId) => { - // [START bigtable_get_table_Iam_policy] + // [START bigtable_api_get_table_Iam_policy] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -310,11 +310,11 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_get_table_Iam_policy] + // [END bigtable_api_get_table_Iam_policy] }, setIamPolicy: (instanceId, tableId) => { - // [START bigtable_set_table_Iam_policy] + // [START bigtable_api_set_table_Iam_policy] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -337,11 +337,11 @@ const snippets = { .catch(err => { // Handle the error }); - // [END bigtable_set_table_Iam_policy] + // [END bigtable_api_set_table_Iam_policy] }, testIamPermissions: (instanceId, tableId) => { - // [START bigtable_test_table_Iam_permissions] + // [START bigtable_api_test_table_Iam_permissions] const {Bigtable} = require('@google-cloud/bigtable'); const bigtable = new Bigtable(); const instance = bigtable.instance(instanceId); @@ -356,14 +356,14 @@ const snippets = { .catch(err => { // Handle the error }); - // [END bigtable_test_table_Iam_permissions] + // [END bigtable_api_test_table_Iam_permissions] }, delRows: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_del_rows] + // [START bigtable_api_del_rows] table .deleteRows('alincoln') .then(result => { @@ -372,14 +372,14 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_del_rows] + // [END bigtable_api_del_rows] }, delTable: (instanceId, tableId) => { const instance = bigtable.instance(instanceId); const table = instance.table(tableId); - // [START bigtable_del_table] + // [START bigtable_api_del_table] table .delete() .then(result => { @@ -388,7 +388,7 @@ const snippets = { .catch(err => { // Handle the error. }); - // [END bigtable_del_table] + // [END bigtable_api_del_table] }, }; diff --git a/samples/package.json b/samples/package.json index 55a09e0c6..589a3806d 100644 --- a/samples/package.json +++ b/samples/package.json @@ -8,7 +8,7 @@ "*.js", "functions/*.js", "hello-world/*.js", - "document-snippets/*.js" + "api-reference-doc-snippets/*.js" ], "engines": { "node": ">=12" diff --git a/src/app-profile.ts b/src/app-profile.ts index 5e66d8e4c..2f7d99585 100644 --- a/src/app-profile.ts +++ b/src/app-profile.ts @@ -230,8 +230,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * @param {object} [options] See {@link Instance#createAppProfile}. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_create_app_profile + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_create_app_profile */ create( optionsOrCallback?: AppProfileOptions | CreateAppProfileCallback, @@ -264,8 +264,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * @param {object} callback.apiResponse The full API response. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_delete_app_profile + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_delete_app_profile */ delete( optionsOrCallback?: DeleteAppProfileOptions | DeleteAppProfileCallback, @@ -309,8 +309,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * @param {boolean} callback.exists Whether the app profile exists or not. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_exists_app_profile + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_exists_app_profile */ exists( optionsOrCallback?: CallOptions | AppProfileExistsCallback, @@ -343,8 +343,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * https://googleapis.github.io/gax-nodejs/CallSettings.html. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_get_app_profile + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_get_app_profile */ get( optionsOrCallback?: CallOptions | GetAppProfileCallback, @@ -381,8 +381,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * @param {object} callback.apiResponse The full API response. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_app_profile_get_meta + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_app_profile_get_meta */ getMetadata( optionsOrCallback?: CallOptions | GetAppProfileMetadataCallback, @@ -435,8 +435,8 @@ Please use the format 'my-app-profile' or '${instance.name}/appProfiles/my-app-p * @param {object} callback.apiResponse The full API response. * * @example - * include:samples/document-snippets/app-profile.js - * region_tag:bigtable_app_profile_set_meta + * include:samples/api-reference-doc-snippets/app-profile.js + * region_tag:bigtable_api_app_profile_set_meta */ setMetadata( metadata: AppProfileOptions, diff --git a/src/backup.ts b/src/backup.ts index 955b0158e..6b31047c5 100644 --- a/src/backup.ts +++ b/src/backup.ts @@ -258,8 +258,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.create.js - * region_tag:bigtable_create_backup + * @example include:samples/api-reference-doc-snippets/backups.create.js + * region_tag:bigtable_api_create_backup */ create( config: CreateBackupConfig, @@ -280,8 +280,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.delete.js - * region_tag:bigtable_delete_backup + * @example include:samples/api-reference-doc-snippets/backups.delete.js + * region_tag:bigtable_api_delete_backup */ delete( gaxOptionsOrCallback?: CallOptions | DeleteBackupCallback, @@ -354,8 +354,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {Backup} callback.backup The Backup instance. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/backups.get.js - * region_tag:bigtable_get_backup + * @example include:samples/api-reference-doc-snippets/backups.get.js + * region_tag:bigtable_api_get_backup */ get( gaxOptionsOrCallback?: CallOptions | GetBackupCallback, @@ -392,8 +392,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_table_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_table_Iam_policy */ getIamPolicy( optionsOrCallback?: GetIamPolicyOptions | GetIamPolicyCallback, @@ -423,8 +423,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {object} callback.metadata The metadata. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/backups.get.js - * region_tag:bigtable_get_backup + * @example include:samples/api-reference-doc-snippets/backups.get.js + * region_tag:bigtable_api_get_backup */ getMetadata( gaxOptionsOrCallback?: CallOptions | BackupGetMetadataCallback, @@ -482,8 +482,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.restore.js - * region_tag:bigtable_restore_backup + * @example include:samples/api-reference-doc-snippets/backups.restore.js + * region_tag:bigtable_api_restore_backup */ restore( tableId: string, @@ -538,8 +538,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_set_instance_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_set_instance_Iam_policy */ setIamPolicy( policy: Policy, @@ -577,8 +577,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.update.js - * region_tag:bigtable_update_backup + * @example include:samples/api-reference-doc-snippets/backups.update.js + * region_tag:bigtable_api_update_backup */ setMetadata( metadata: ModifiableBackupFields, @@ -644,8 +644,8 @@ Please use the format 'my-backup' or '${cluster.name}/backups/my-backup'.`); * @param {string[]} permissions A subset of permissions that the caller is * allowed. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_test_table_Iam_permissions + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_test_table_Iam_permissions */ testIamPermissions( permissions: string | string[], diff --git a/src/cluster.ts b/src/cluster.ts index fbdc82735..91e75d6e2 100644 --- a/src/cluster.ts +++ b/src/cluster.ts @@ -222,8 +222,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_create_cluster + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_create_cluster */ create( optionsOrCallback?: CreateClusterOptions | CreateClusterCallback, @@ -267,8 +267,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.create.js - * region_tag:bigtable_create_backup + * @example include:samples/api-reference-doc-snippets/backups.create.js + * region_tag:bigtable_api_create_backup */ createBackup( id: string, @@ -341,8 +341,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_delete_cluster + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_delete_cluster */ delete( gaxOptionsOrCallback?: CallOptions | DeleteClusterCallback, @@ -382,8 +382,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * request. * @param {boolean} callback.exists Whether the cluster exists or not. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_exists_cluster + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_exists_cluster */ exists( gaxOptionsOrCallback?: CallOptions | ExistsClusterCallback, @@ -425,8 +425,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_get_cluster + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_get_cluster */ get( gaxOptionsOrCallback?: CallOptions | GetClusterCallback, @@ -461,8 +461,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.list.js - * region_tag:bigtable_list_backups + * @example include:samples/api-reference-doc-snippets/backups.list.js + * region_tag:bigtable_api_list_backups */ getBackups( optionsOrCallback?: GetBackupsOptions | GetBackupsCallback, @@ -612,8 +612,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * @param {object} callback.metadata The metadata. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_cluster_get_meta + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_cluster_get_meta */ getMetadata( gaxOptionsOrCallback?: CallOptions | GetClusterMetadataCallback, @@ -670,8 +670,8 @@ Please use the format 'my-cluster' or '${instance.name}/clusters/my-cluster'.`); * to check the status of the request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/cluster.js - * region_tag:bigtable_cluster_set_meta + * @example include:samples/api-reference-doc-snippets/cluster.js + * region_tag:bigtable_api_cluster_set_meta */ setMetadata( metadata: SetClusterMetadataOptions, diff --git a/src/family.ts b/src/family.ts index bd08010f5..8266f3f7d 100644 --- a/src/family.ts +++ b/src/family.ts @@ -216,8 +216,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * @param {Family} callback.family The metadata. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_create_family + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_create_family */ create( options?: CreateFamilyOptions | CreateFamilyCallback, @@ -242,8 +242,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_del_family + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_del_family */ delete( gaxOptions?: CallOptions | DeleteFamilyCallback, @@ -284,8 +284,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * request. * @param {boolean} callback.exists Whether the family exists or not. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_exists_family + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_exists_family */ exists( opts?: CallOptions | FamilyExistsCallback, @@ -329,8 +329,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * @param {Family} callback.family The Family object. * @param {object} callback.apiResponse The resource as it exists in the API. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_get_family + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_get_family */ get( opts?: GetFamilyOptions | GetFamilyCallback, @@ -373,8 +373,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * request. * @param {object} callback.metadata The metadata. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_get_family_meta + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_get_family_meta */ getMetadata( opts?: CallOptions | GetFamilyMetadataCallback, @@ -432,8 +432,8 @@ Please use the format 'follows' or '${table.name}/columnFamilies/my-family'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/family.js - * region_tag:bigtable_set_family_meta + * @example include:samples/api-reference-doc-snippets/family.js + * region_tag:bigtable_api_set_family_meta */ setMetadata( metadata: SetFamilyMetadataOptions, diff --git a/src/instance.ts b/src/instance.ts index e22590f88..d982b3c18 100644 --- a/src/instance.ts +++ b/src/instance.ts @@ -241,8 +241,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * to check the status of the request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_create_instance + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_create_instance */ create( options: InstanceOptions, @@ -286,8 +286,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {?error} callback.err An error returned while making this request. * @param {Cluster} callback.appProfile The newly created app profile. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_create_app_profile + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_create_app_profile */ createAppProfile( id: string, @@ -365,8 +365,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {Operation} callback.operation An operation object that can be used * to check the status of the request. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_create_cluster + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_create_cluster */ createCluster( id: string, @@ -453,8 +453,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {Table} callback.table The newly created table. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_create_table + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_create_table */ createTable( id: string, @@ -551,8 +551,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_del_instance + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_del_instance */ delete( optionsOrCallback?: CallOptions | DeleteInstanceCallback, @@ -589,8 +589,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * request. * @param {boolean} callback.exists Whether the instance exists or not. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_exists_instance + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_exists_instance */ exists( optionsOrCallback?: CallOptions | InstanceExistsCallback, @@ -626,8 +626,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {Instance} callback.instance The Instance object. * @param {object} callback.apiResponse The resource as it exists in the API. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_instance + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_instance */ get( optionsOrCallback?: CallOptions | GetInstanceCallback, @@ -659,8 +659,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {AppProfile[]} callback.appProfiles List of all AppProfiles. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_app_profiles + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_app_profiles */ getAppProfiles( optionsOrCallback?: CallOptions | GetAppProfilesCallback, @@ -819,8 +819,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {object} callback.apiResponse The full API response. * @return {void | Promise} * - * @example include:samples/backups.list.js - * region_tag:bigtable_list_backups + * @example include:samples/api-reference-doc-snippets/backups.list.js + * region_tag:bigtable_api_list_backups */ getBackups( optionsOrCallback?: GetBackupsOptions | GetBackupsCallback, @@ -882,8 +882,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * Clusters. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_clusters + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_clusters */ getClusters( optionsOrCallback?: CallOptions | GetClustersCallback, @@ -938,8 +938,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_instance_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_instance_Iam_policy */ getIamPolicy( optionsOrCallback?: GetIamPolicyOptions | GetIamPolicyCallback, @@ -996,8 +996,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * request. * @param {object} callback.metadata The metadata. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_instance_metadata + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_instance_metadata */ getMetadata( optionsOrCallback?: CallOptions | GetInstanceMetadataCallback, @@ -1049,8 +1049,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * only table name & id but is not a complete representation of a table. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_tables + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_tables */ getTables( optionsOrCallback?: GetTablesOptions | GetTablesCallback, @@ -1210,8 +1210,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {RestoreTableCallback} [cb] * @return {void | Promise} * - * @example include:samples/backups.restore.js - * region_tag:bigtable_restore_backup + * @example include:samples/api-reference-doc-snippets/backups.restore.js + * region_tag:bigtable_api_restore_backup */ createTableFromBackup( config: CreateTableFromBackupConfig, @@ -1256,8 +1256,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_set_instance_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_set_instance_Iam_policy */ setIamPolicy( policy: Policy, @@ -1319,8 +1319,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_set_meta_data + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_set_meta_data */ setMetadata( metadata: IInstance, @@ -1400,8 +1400,8 @@ Please use the format 'my-instance' or '${bigtable.projectName}/instances/my-ins * @param {string[]} permissions A subset of permissions that the caller is * allowed. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_test_instance_Iam_permissions + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_test_instance_Iam_permissions */ testIamPermissions( permissions: string | string[], diff --git a/src/row.ts b/src/row.ts index f7ce2a3f7..66dfa62f9 100644 --- a/src/row.ts +++ b/src/row.ts @@ -345,8 +345,8 @@ export class Row { * @param {Row} callback.row The newly created row object. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_create_row + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_create_row */ create( optionsOrCallback?: CreateRowOptions | CreateRowCallback, @@ -400,8 +400,8 @@ export class Row { * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_create_rules + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_create_rules */ createRules( rules: Rule | Rule[], @@ -467,8 +467,8 @@ export class Row { * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_delete_all_cells + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_delete_all_cells */ delete( optionsOrCallback?: CallOptions | MutateCallback, @@ -507,8 +507,8 @@ export class Row { * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_delete_particular_cells + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_delete_particular_cells */ deleteCells( columns: string[], @@ -541,8 +541,8 @@ export class Row { * request. * @param {boolean} callback.exists Whether the row exists or not. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_row_exists + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_row_exists */ exists( optionsOrCallback?: CallOptions | RowExistsCallback, @@ -607,8 +607,8 @@ export class Row { * request. * @param {boolean} callback.matched Whether a match was found or not. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_row_filter + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_row_filter */ filter( filter: RawFilter, @@ -682,8 +682,8 @@ export class Row { * request. * @param {Row} callback.row The updated Row object. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_get_row + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_get_row */ // eslint-disable-next-line @typescript-eslint/no-explicit-any get( @@ -787,8 +787,8 @@ export class Row { * request. * @param {object} callback.metadata The row's metadata. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_get_row_meta + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_get_row_meta */ getMetadata( optionsOrCallback?: GetRowOptions | GetRowMetadataCallback, @@ -841,8 +841,8 @@ export class Row { * @param {number} callback.value The updated value of the column. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_row_increment + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_row_increment */ increment( column: string, @@ -900,8 +900,8 @@ export class Row { * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/row.js - * region_tag:bigtable_row_save + * @example include:samples/api-reference-doc-snippets/row.js + * region_tag:bigtable_api_row_save */ save( entry: Entry, diff --git a/src/table.ts b/src/table.ts index f65173f97..115ade047 100644 --- a/src/table.ts +++ b/src/table.ts @@ -504,8 +504,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {Table} callback.table The newly created table. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_create_table + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_create_table */ create( optionsOrCallback?: CreateTableOptions | CreateTableCallback, @@ -642,8 +642,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {Family} callback.family The newly created Family. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_create_family + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_create_family */ createFamily( id: string, @@ -716,8 +716,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {string} [options.start] Start value for key range. * @returns {stream} * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_table_readstream + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_table_readstream */ createReadStream(opts?: GetRowsOptions) { const options = opts || {}; @@ -958,8 +958,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_del_table + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_del_table */ delete( optionsOrCallback?: CallOptions | DeleteTableCallback, @@ -1005,8 +1005,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {?error} callback.err An error returned while making this request. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_del_rows + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_del_rows */ deleteRows( prefix: string, @@ -1048,8 +1048,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * request. * @param {boolean} callback.exists Whether the table exists or not. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_exists_table + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_exists_table */ exists( optionsOrCallback?: CallOptions | TableExistsCallback, @@ -1114,8 +1114,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {Table} callback.table The Table object. * @param {object} callback.apiResponse The resource as it exists in the API. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_get_table + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_get_table */ get( optionsOrCallback?: GetTableOptions | GetTableCallback, @@ -1161,8 +1161,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_get_table_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_get_table_Iam_policy */ getIamPolicy( optionsOrCallback?: GetIamPolicyOptions | GetIamPolicyCallback, @@ -1216,8 +1216,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {Family[]} callback.families The list of families. * @param {object} callback.apiResponse The full API response. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_get_families + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_get_families */ getFamilies( optionsOrCallback?: CallOptions | GetFamiliesCallback, @@ -1320,8 +1320,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * request. * @param {object} callback.metadata The table's metadata. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_get_table_meta + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_get_table_meta */ getMetadata( optionsOrCallback?: GetMetadataOptions | GetMetadataCallback, @@ -1369,8 +1369,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {?error} callback.err An error returned while making this request. * @param {Row[]} callback.rows List of Row objects. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_get_rows + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_get_rows */ getRows( optionsOrCallback?: GetRowsOptions | GetRowsCallback, @@ -1414,8 +1414,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * failures. It's possible for part of your request to be completed * successfully, while the other part was not. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_insert_rows + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_insert_rows */ insert( entries: Entry | Entry[], @@ -1461,8 +1461,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * failures. It's possible for part of your request to be completed * successfully, while the other part was not. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_mutate_rows + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_mutate_rows */ mutate( entriesRaw: Entry | Entry[], @@ -1602,8 +1602,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {?error} callback.err An error returned while making this request. * @param {object[]} callback.keys The list of keys. * - * @example include:samples/document-snippets/table.js - * region_tag:bigtable_sample_row_keys + * @example include:samples/api-reference-doc-snippets/table.js + * region_tag:bigtable_api_sample_row_keys */ sampleRowKeys( optionsOrCallback?: CallOptions | SampleRowKeysCallback, @@ -1691,8 +1691,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {?error} callback.error An error returned while making this request. * @param {Policy} policy The policy. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_set_table_Iam_policy + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_set_table_Iam_policy */ setIamPolicy( policy: Policy, @@ -1752,8 +1752,8 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`); * @param {string[]} permissions A subset of permissions that the caller is * allowed. * - * @example include:samples/document-snippets/instance.js - * region_tag:bigtable_test_table_Iam_permissions + * @example include:samples/api-reference-doc-snippets/instance.js + * region_tag:bigtable_api_test_table_Iam_permissions */ testIamPermissions( permissions: string | string[], From 99b7617e215126fc36ef3c3ebefb244e0d8d2242 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:48:12 -0800 Subject: [PATCH 09/21] feat: introduce style enumeration (#833) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/99ff624a-f7e4-4941-b7ed-794cee704ba0/targets - [ ] To automatically regenerate this PR, check this box. --- protos/protos.d.ts | 12 +++++++ protos/protos.js | 78 +++++++++++++++++++++++++++++++++++++++++++++- protos/protos.json | 13 +++++++- synth.metadata | 2 +- 4 files changed, 102 insertions(+), 3 deletions(-) diff --git a/protos/protos.d.ts b/protos/protos.d.ts index efdb8bbbc..670bab4d4 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12033,6 +12033,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -12062,6 +12065,9 @@ export namespace google { /** ResourceDescriptor singular. */ public singular: string; + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set @@ -12141,6 +12147,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/protos/protos.js b/protos/protos.js index b6b59cef5..ede76b882 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -28593,6 +28593,7 @@ * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history * @property {string|null} [plural] ResourceDescriptor plural * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** @@ -28605,6 +28606,7 @@ */ function ResourceDescriptor(properties) { this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -28659,6 +28661,14 @@ */ ResourceDescriptor.prototype.singular = ""; + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + /** * Creates a new ResourceDescriptor instance using the specified properties. * @function create @@ -28696,6 +28706,12 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; @@ -28750,6 +28766,16 @@ case 6: message.singular = reader.string(); break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; default: reader.skipType(tag & 7); break; @@ -28813,6 +28839,18 @@ if (message.singular != null && message.hasOwnProperty("singular")) if (!$util.isString(message.singular)) return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } return null; }; @@ -28857,6 +28895,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -28873,8 +28928,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -28897,6 +28954,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -28927,6 +28989,20 @@ return values; })(); + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + return ResourceDescriptor; })(); diff --git a/protos/protos.json b/protos/protos.json index 9195990e1..e1dd45399 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -3410,6 +3410,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -3419,6 +3424,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -3438,7 +3449,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/synth.metadata b/synth.metadata index a54d93f05..7c7e40791 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "c59645077d6322648531a52a64cd295edaee50d1" + "sha": "df320764f79cb4156f555068a6e4f9d119591f0d" } }, { From 73aa7345f935645063c1123a681a529d66f93bd7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 14 Jan 2021 10:15:47 -0800 Subject: [PATCH 10/21] docs: remove samples listed in subfolder --- README.md | 6 --- linkinator.config.json | 8 +-- samples/README.md | 108 ----------------------------------------- synth.metadata | 2 +- 4 files changed, 2 insertions(+), 122 deletions(-) diff --git a/README.md b/README.md index bbef94631..b889eb65f 100644 --- a/README.md +++ b/README.md @@ -89,12 +89,6 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-bigtable/tr | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Backups.create | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) | -| Backups.delete | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) | -| Backups.get | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) | -| Backups.list | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) | -| Backups.restore | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) | -| Backups.update | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) | | Filter Snippets | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/filterSnippets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/filterSnippets.js,samples/README.md) | | Instances | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/instances.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/linkinator.config.json b/linkinator.config.json index 2ddec6998..29a223b6d 100644 --- a/linkinator.config.json +++ b/linkinator.config.json @@ -3,13 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js", - "https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js" + "img.shields.io" ], "silent": true, "concurrency": 10 diff --git a/samples/README.md b/samples/README.md index cc793a08b..79ca162b4 100644 --- a/samples/README.md +++ b/samples/README.md @@ -12,12 +12,6 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) - * [Backups.create](#backups.create) - * [Backups.delete](#backups.delete) - * [Backups.get](#backups.get) - * [Backups.list](#backups.list) - * [Backups.restore](#backups.restore) - * [Backups.update](#backups.update) * [Filter Snippets](#filter-snippets) * [Instances](#instances) * [Quickstart](#quickstart) @@ -43,108 +37,6 @@ Before running the samples, make sure you've followed the steps outlined in -### Backups.create - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.create.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.create.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.create.js` - - ------ - - - - -### Backups.delete - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.delete.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.delete.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.delete.js` - - ------ - - - - -### Backups.get - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.get.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.get.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.get.js` - - ------ - - - - -### Backups.list - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.list.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.list.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.list.js` - - ------ - - - - -### Backups.restore - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.restore.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.restore.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.restore.js` - - ------ - - - - -### Backups.update - -View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/api-reference-doc-snippets/backups.update.js). - -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigtable&page=editor&open_in_editor=samples/api-reference-doc-snippets/backups.update.js,samples/README.md) - -__Usage:__ - - -`node samples/api-reference-doc-snippets/backups.update.js` - - ------ - - - - ### Filter Snippets View the [source code](https://github.com/googleapis/nodejs-bigtable/blob/master/samples/filterSnippets.js). diff --git a/synth.metadata b/synth.metadata index 7c7e40791..2f690600c 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "df320764f79cb4156f555068a6e4f9d119591f0d" + "sha": "99b7617e215126fc36ef3c3ebefb244e0d8d2242" } }, { From 448465dac13948bcc68cb8a9c809167ea9e6e08f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:44:22 -0800 Subject: [PATCH 11/21] refactor(nodejs): move build cop to flakybot (#838) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/dfbad313-7afb-4cf6-b229-0476fcc2130c/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- .kokoro/samples-test.sh | 6 +++--- .kokoro/system-test.sh | 6 +++--- .kokoro/test.sh | 6 +++--- .kokoro/trampoline_v2.sh | 2 +- synth.metadata | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index bab7ba4e9..950f84834 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -39,14 +39,14 @@ if [ -f samples/package.json ]; then npm link ../ npm install cd .. - # If tests are running against master, configure Build Cop + # If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index 8a0840048..319d1e0ed 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -33,14 +33,14 @@ fi npm install -# If tests are running against master, configure Build Cop +# If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/.kokoro/test.sh b/.kokoro/test.sh index 5be385fef..5d6383fcb 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -21,14 +21,14 @@ export NPM_CONFIG_PREFIX=${HOME}/.npm-global cd $(dirname $0)/.. npm install -# If tests are running against master, configure Build Cop +# If tests are running against master, configure flakybot # to open issues on failures: if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]] || [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"nightly"* ]]; then export MOCHA_REPORTER_OUTPUT=test_output_sponge_log.xml export MOCHA_REPORTER=xunit cleanup() { - chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop - $KOKORO_GFILE_DIR/linux_amd64/buildcop + chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot + $KOKORO_GFILE_DIR/linux_amd64/flakybot } trap cleanup EXIT HUP fi diff --git a/.kokoro/trampoline_v2.sh b/.kokoro/trampoline_v2.sh index 606d43214..4d0311212 100755 --- a/.kokoro/trampoline_v2.sh +++ b/.kokoro/trampoline_v2.sh @@ -162,7 +162,7 @@ if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then "KOKORO_GITHUB_COMMIT" "KOKORO_GITHUB_PULL_REQUEST_NUMBER" "KOKORO_GITHUB_PULL_REQUEST_COMMIT" - # For Build Cop Bot + # For flakybot "KOKORO_GITHUB_COMMIT_URL" "KOKORO_GITHUB_PULL_REQUEST_URL" ) diff --git a/synth.metadata b/synth.metadata index 2f690600c..7abd0cfb1 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "99b7617e215126fc36ef3c3ebefb244e0d8d2242" + "sha": "73aa7345f935645063c1123a681a529d66f93bd7" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 8105dea272de44e69915d3e62e5b5add106b54cb Mon Sep 17 00:00:00 2001 From: Stephen Date: Wed, 27 Jan 2021 12:42:03 -0500 Subject: [PATCH 12/21] fix: set keepalive configuration (#836) - [PHP reference implementation](https://github.com/googleapis/google-cloud-php/pull/3565) This adds two gRPC keepalive options: - `GRPC_ARG_KEEPALIVE_TIME_MS` to 30s - `GRPC_ARG_KEEPALIVE_TIMEOUT_MS` to 10s --- src/index.ts | 2 + test/index.ts | 153 +++++++++++++++++++++++++++----------------------- 2 files changed, 85 insertions(+), 70 deletions(-) diff --git a/src/index.ts b/src/index.ts index 73deb452d..536c3a56f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -390,6 +390,8 @@ export class Bigtable { libName: 'gccl', libVersion: PKG.version, scopes, + 'grpc.keepalive_time_ms': 30000, + 'grpc.keepalive_timeout_ms': 10000, }, options ); diff --git a/test/index.ts b/test/index.ts index d33f1d8aa..a29c8aa47 100644 --- a/test/index.ts +++ b/test/index.ts @@ -148,6 +148,38 @@ describe('Bigtable', () => { assert.deepStrictEqual(bigtable.api, {}); }); + it('should set grpc keepalive options', () => { + const bigtable = Bigtable(); + assert.strictEqual( + bigtable.options.BigtableClient['grpc.keepalive_time_ms'], + 30000 + ); + assert.strictEqual( + bigtable.options.BigtableClient['grpc.keepalive_timeout_ms'], + 10000 + ); + + assert.strictEqual( + bigtable.options.BigtableInstanceAdminClient['grpc.keepalive_time_ms'], + 30000 + ); + assert.strictEqual( + bigtable.options.BigtableInstanceAdminClient[ + 'grpc.keepalive_timeout_ms' + ], + 10000 + ); + + assert.strictEqual( + bigtable.options.BigtableTableAdminClient['grpc.keepalive_time_ms'], + 30000 + ); + assert.strictEqual( + bigtable.options.BigtableTableAdminClient['grpc.keepalive_timeout_ms'], + 10000 + ); + }); + it('should cache a local google-auth-library instance', () => { const fakeGoogleAuthInstance = {}; const options = { @@ -163,6 +195,8 @@ describe('Bigtable', () => { libName: 'gccl', libVersion: PKG.version, scopes: EXPECTED_SCOPES, + 'grpc.keepalive_time_ms': 30000, + 'grpc.keepalive_timeout_ms': 10000, }, options ) @@ -185,38 +219,37 @@ describe('Bigtable', () => { }; const bigtable = new Bigtable(options); - const defaultOptions = { - a: 'b', - c: 'd', - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, - }; + const expectedOptions = Object.assign( + { + port: 443, + sslCreds: undefined, + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + 'grpc.keepalive_time_ms': 30000, + 'grpc.keepalive_timeout_ms': 10000, + }, + options + ); assert.deepStrictEqual(bigtable.options, { BigtableClient: Object.assign( { servicePath: 'bigtable.googleapis.com', - port: 443, - sslCreds: undefined, }, - defaultOptions + expectedOptions ), BigtableInstanceAdminClient: Object.assign( { servicePath: 'bigtableadmin.googleapis.com', - port: 443, - sslCreds: undefined, }, - defaultOptions + expectedOptions ), BigtableTableAdminClient: Object.assign( { servicePath: 'bigtableadmin.googleapis.com', - port: 443, - sslCreds: undefined, }, - defaultOptions + expectedOptions ), }); }); @@ -227,11 +260,22 @@ describe('Bigtable', () => { const options = { a: 'b', c: 'd', - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, }; + const expectedOptions = Object.assign( + { + servicePath: 'override', + port: 8080, + sslCreds: grpc.credentials.createInsecure(), + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + 'grpc.keepalive_time_ms': 30000, + 'grpc.keepalive_timeout_ms': 10000, + }, + options + ); + const bigtable = new Bigtable(options); assert.strictEqual( @@ -240,30 +284,9 @@ describe('Bigtable', () => { ); assert.deepStrictEqual(bigtable.options, { - BigtableClient: Object.assign( - { - servicePath: 'override', - port: 8080, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), - BigtableInstanceAdminClient: Object.assign( - { - servicePath: 'override', - port: 8080, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), - BigtableTableAdminClient: Object.assign( - { - servicePath: 'override', - port: 8080, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), + BigtableClient: expectedOptions, + BigtableInstanceAdminClient: expectedOptions, + BigtableTableAdminClient: expectedOptions, }); }); @@ -272,40 +295,30 @@ describe('Bigtable', () => { apiEndpoint: 'customEndpoint:9090', a: 'b', c: 'd', - libName: 'gccl', - libVersion: PKG.version, - scopes: EXPECTED_SCOPES, }; + const expectedOptions = Object.assign( + { + servicePath: 'customEndpoint', + port: 9090, + sslCreds: grpc.credentials.createInsecure(), + libName: 'gccl', + libVersion: PKG.version, + scopes: EXPECTED_SCOPES, + 'grpc.keepalive_time_ms': 30000, + 'grpc.keepalive_timeout_ms': 10000, + }, + options + ); + const bigtable = new Bigtable(options); assert.strictEqual(bigtable.customEndpoint, options.apiEndpoint); assert.deepStrictEqual(bigtable.options, { - BigtableClient: Object.assign( - { - servicePath: 'customEndpoint', - port: 9090, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), - BigtableInstanceAdminClient: Object.assign( - { - servicePath: 'customEndpoint', - port: 9090, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), - BigtableTableAdminClient: Object.assign( - { - servicePath: 'customEndpoint', - port: 9090, - sslCreds: grpc.credentials.createInsecure(), - }, - options - ), + BigtableClient: expectedOptions, + BigtableInstanceAdminClient: expectedOptions, + BigtableTableAdminClient: expectedOptions, }); }); From c291eae143df2dcfe18016ad4b36cf72d20705da Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 2 Feb 2021 17:52:31 -0800 Subject: [PATCH 13/21] chore: update CODEOWNERS config (#840) --- .repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 7a353a42b..c911b6fd8 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -9,5 +9,6 @@ "repo": "googleapis/nodejs-bigtable", "distribution_name": "@google-cloud/bigtable", "api_id": "bigtable.googleapis.com", - "requires_billing": true + "requires_billing": true, + "codeowner_team": "@googleapis/api-bigtable" } From da875a17c8a7a20d020e534a5a315fec45630e83 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 18:08:04 -0800 Subject: [PATCH 14/21] build: adds UNORDERED_LIST enum (#841) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3c80116f-2a08-4668-9798-3d8677b45629/targets - [ ] To automatically regenerate this PR, check this box. --- protos/protos.d.ts | 3 ++- protos/protos.js | 7 +++++++ protos/protos.json | 3 ++- synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 670bab4d4..1d9292cbf 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -12010,7 +12010,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/protos/protos.js b/protos/protos.js index ede76b882..017fad50d 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -28569,6 +28569,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -28578,6 +28579,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -34745,6 +34747,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -34845,6 +34848,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/protos/protos.json b/protos/protos.json index e1dd45399..56314756c 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -3365,7 +3365,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/synth.metadata b/synth.metadata index 7abd0cfb1..b436060f9 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "73aa7345f935645063c1123a681a529d66f93bd7" + "sha": "8105dea272de44e69915d3e62e5b5add106b54cb" } }, { From 63e2568a300ebe8ac8ddd75137526b97ecceadc3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 08:46:21 -0800 Subject: [PATCH 15/21] chore: use repo metadata to populate nodejs CODEOWNERS (#842) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc2d691c-202c-41a3-a1a7-33d11f4ae92a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/318e351e26ba65b2b3cfa3f61b3b64e3540c3525 --- .github/CODEOWNERS | 5 ++--- synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 23ee2dfdd..1888fa4d1 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,6 +5,5 @@ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -# The api-bigtable team is the default owner for anything not -# explicitly taken by someone else. -* @googleapis/api-bigtable @googleapis/yoshi-nodejs +# The yoshi-nodejs team is the default owner for nodejs repositories. +* @googleapis/yoshi-nodejs @googleapis/api-bigtable diff --git a/synth.metadata b/synth.metadata index b436060f9..4079075ee 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "8105dea272de44e69915d3e62e5b5add106b54cb" + "sha": "da875a17c8a7a20d020e534a5a315fec45630e83" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" } } ], From 278c4ddfb3085b7a2ee108efafdbc0ccfe806cc0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Feb 2021 19:43:48 +0100 Subject: [PATCH 16/21] chore(deps): update dependency requestretry to v5 (#844) --- samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/package.json b/samples/package.json index 589a3806d..d1f5a48bf 100644 --- a/samples/package.json +++ b/samples/package.json @@ -24,7 +24,7 @@ "mocha": "^8.0.0", "snap-shot-it": "^7.9.1", "request": "^2.88.0", - "requestretry": "^4.1.0" + "requestretry": "^5.0.0" }, "scripts": { "test": "mocha --timeout=60000", From 0381fb7da68492b85f8a3359d5fb97ca4898810e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 25 Feb 2021 12:08:30 -0800 Subject: [PATCH 17/21] feat: add CMEK fields (#845) * feat: migrate bigtable retry/timeout settings to gRPC's service configs Committer: @miraleung PiperOrigin-RevId: 346894665 Source-Author: Google APIs Source-Date: Thu Dec 10 16:55:31 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: cbbd3170bcf217e36ae72f4ac522449bf861346f Source-Link: https://github.com/googleapis/googleapis/commit/cbbd3170bcf217e36ae72f4ac522449bf861346f * fix: add retryableStatusCodes back to bigtable Committer: @miraleung PiperOrigin-RevId: 351852297 Source-Author: Google APIs Source-Date: Thu Jan 14 12:19:44 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: df49bfe877fff8c37f60855a7e754b7a4369709e Source-Link: https://github.com/googleapis/googleapis/commit/df49bfe877fff8c37f60855a7e754b7a4369709e * feat: Publish new fields to support Customer Managed Encryption Keys (CMEK) on the existing Cloud Bigtable service methods. PiperOrigin-RevId: 359130387 Source-Author: Google APIs Source-Date: Tue Feb 23 14:08:20 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: eabec5a21219401bad79e1cc7d900c1658aee5fd Source-Link: https://github.com/googleapis/googleapis/commit/eabec5a21219401bad79e1cc7d900c1658aee5fd --- .../google/bigtable/admin/v2/instance.proto | 29 +- protos/google/bigtable/admin/v2/table.proto | 75 ++- protos/protos.d.ts | 221 +++++++ protos/protos.js | 568 ++++++++++++++++++ protos/protos.json | 73 ++- src/v2/bigtable_client_config.json | 10 +- src/v2/bigtable_instance_admin_client.ts | 2 + .../bigtable_table_admin_client_config.json | 14 +- synth.metadata | 8 +- 9 files changed, 976 insertions(+), 24 deletions(-) diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index 2086f9707..d590788b2 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -28,6 +27,10 @@ option java_outer_classname = "InstanceProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}" +}; // A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and // the resources that serve them. @@ -113,6 +116,22 @@ message Cluster { pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" }; + // Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected + // cluster. + message EncryptionConfig { + // Describes the Cloud KMS encryption key that will be used to protect the + // destination Bigtable cluster. The requirements for this key are: + // 1) The Cloud Bigtable service account associated with the project that + // contains this cluster must be granted the + // `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. + // 2) Only regional keys can be used and the region of the CMEK key must + // match the region of the cluster. + // 3) All clusters within an instance must use the same CMEK key. + string kms_key_name = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + } + // Possible states of a cluster. enum State { // The state of the cluster could not be determined. @@ -162,6 +181,10 @@ message Cluster { // The type of storage used by this cluster to serve its // parent instance's tables, unless explicitly overridden. StorageType default_storage_type = 5; + + // Immutable. The encryption configuration for CMEK-protected clusters. + EncryptionConfig encryption_config = 6 + [(google.api.field_behavior) = IMMUTABLE]; } // A configuration object describing how Cloud Bigtable should treat traffic @@ -194,7 +217,7 @@ message AppProfile { // (`OutputOnly`) // The unique name of the app profile. Values are of the form - // `projects//instances//appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + // `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. string name = 1; // Strongly validated etag for optimistic concurrency control. Preserve the diff --git a/protos/google/bigtable/admin/v2/table.proto b/protos/google/bigtable/admin/v2/table.proto index e85ca8ca9..a5578225e 100644 --- a/protos/google/bigtable/admin/v2/table.proto +++ b/protos/google/bigtable/admin/v2/table.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; @@ -28,6 +29,10 @@ option java_outer_classname = "TableProto"; option java_package = "com.google.bigtable.admin.v2"; option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2"; option ruby_package = "Google::Cloud::Bigtable::Admin::V2"; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; // Indicates the type of the restore source. enum RestoreSourceType { @@ -92,6 +97,14 @@ message Table { // Output only. The state of replication for the table in this cluster. ReplicationState replication_state = 1; + + // Output only. The encryption information for the table in this cluster. + // If the encryption key protecting this resource is customer managed, then + // its version can be rotated in Cloud Key Management Service (Cloud KMS). + // The primary version of the key and its status will be reflected here when + // changes propagate from Cloud KMS. + repeated EncryptionInfo encryption_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Possible timestamp granularities to use when keeping multiple versions @@ -120,12 +133,15 @@ message Table { // state. REPLICATION_VIEW = 3; + // Only populates 'name' and fields related to the table's encryption state. + ENCRYPTION_VIEW = 5; + // Populates all fields. FULL = 4; } - // Output only. The unique name of the table. Values are of the form - // `projects//instances//tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. + // The unique name of the table. Values are of the form + // `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. // Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` string name = 1; @@ -133,7 +149,7 @@ message Table { // If it could not be determined whether or not the table has data in a // particular cluster (for example, if its zone is unavailable), then // there will be an entry for the cluster with UNKNOWN `replication_status`. - // Views: `REPLICATION_VIEW`, `FULL` + // Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` map cluster_states = 2; // (`CreationOnly`) @@ -196,6 +212,51 @@ message GcRule { } } +// Encryption information for a given resource. +// If this resource is protected with customer managed encryption, the in-use +// Cloud Key Management Service (Cloud KMS) key version is specified along with +// its status. +message EncryptionInfo { + // Possible encryption types for a resource. + enum EncryptionType { + // Encryption type was not specified, though data at rest remains encrypted. + ENCRYPTION_TYPE_UNSPECIFIED = 0; + + // The data backing this resource is encrypted at rest with a key that is + // fully managed by Google. No key version or status will be populated. + // This is the default state. + GOOGLE_DEFAULT_ENCRYPTION = 1; + + // The data backing this resource is encrypted at rest with a key that is + // managed by the customer. + // The in-use version of the key and its status are populated for + // CMEK-protected tables. + // CMEK-protected backups are pinned to the key version that was in use at + // the time the backup was taken. This key version is populated but its + // status is not tracked and is reported as `UNKNOWN`. + CUSTOMER_MANAGED_ENCRYPTION = 2; + } + + // Output only. The type of encryption used to protect this resource. + EncryptionType encryption_type = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of encrypt/decrypt calls on underlying data for + // this resource. Regardless of status, the existing data is always encrypted + // at rest. + google.rpc.Status encryption_status = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The version of the Cloud KMS key specified in the parent + // cluster that is in use for the data underlying this table. + string kms_key_version = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + } + ]; +} + // A snapshot of a table at a particular time. A snapshot can be used as a // checkpoint for data restoration or a data source for a new table. // @@ -225,7 +286,7 @@ message Snapshot { // Output only. The unique name of the snapshot. // Values are of the form - // `projects//instances//clusters//snapshots/`. + // `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. string name = 1; // Output only. The source table at the time the snapshot was taken. @@ -318,6 +379,10 @@ message Backup { // Output only. The current state of the backup. State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The encryption information for the backup. + EncryptionInfo encryption_info = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Information about a backup. diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 1d9292cbf..076f81e2e 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -2751,6 +2751,9 @@ export namespace google { /** Cluster defaultStorageType */ defaultStorageType?: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType|null); + + /** Cluster encryptionConfig */ + encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); } /** Represents a Cluster. */ @@ -2777,6 +2780,9 @@ export namespace google { /** Cluster defaultStorageType. */ public defaultStorageType: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType); + /** Cluster encryptionConfig. */ + public encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); + /** * Creates a new Cluster instance using the specified properties. * @param [properties] Properties to set @@ -2850,6 +2856,96 @@ export namespace google { namespace Cluster { + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IEncryptionConfig): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** State enum. */ enum State { STATE_NOT_KNOWN = 0, @@ -7065,6 +7161,9 @@ export namespace google { /** ClusterState replicationState */ replicationState?: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null); + + /** ClusterState encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo[]|null); } /** Represents a ClusterState. */ @@ -7079,6 +7178,9 @@ export namespace google { /** ClusterState replicationState. */ public replicationState: (google.bigtable.admin.v2.Table.ClusterState.ReplicationState|keyof typeof google.bigtable.admin.v2.Table.ClusterState.ReplicationState); + /** ClusterState encryptionInfo. */ + public encryptionInfo: google.bigtable.admin.v2.IEncryptionInfo[]; + /** * Creates a new ClusterState instance using the specified properties. * @param [properties] Properties to set @@ -7175,6 +7277,7 @@ export namespace google { NAME_ONLY = 1, SCHEMA_VIEW = 2, REPLICATION_VIEW = 3, + ENCRYPTION_VIEW = 5, FULL = 4 } } @@ -7563,6 +7666,118 @@ export namespace google { } } + /** Properties of an EncryptionInfo. */ + interface IEncryptionInfo { + + /** EncryptionInfo encryptionType */ + encryptionType?: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null); + + /** EncryptionInfo encryptionStatus */ + encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion */ + kmsKeyVersion?: (string|null); + } + + /** Represents an EncryptionInfo. */ + class EncryptionInfo implements IEncryptionInfo { + + /** + * Constructs a new EncryptionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IEncryptionInfo); + + /** EncryptionInfo encryptionType. */ + public encryptionType: (google.bigtable.admin.v2.EncryptionInfo.EncryptionType|keyof typeof google.bigtable.admin.v2.EncryptionInfo.EncryptionType); + + /** EncryptionInfo encryptionStatus. */ + public encryptionStatus?: (google.rpc.IStatus|null); + + /** EncryptionInfo kmsKeyVersion. */ + public kmsKeyVersion: string; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionInfo instance + */ + public static create(properties?: google.bigtable.admin.v2.IEncryptionInfo): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @param message EncryptionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IEncryptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Verifies an EncryptionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionInfo + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.EncryptionInfo; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @param message EncryptionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.EncryptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EncryptionInfo { + + /** EncryptionType enum. */ + enum EncryptionType { + ENCRYPTION_TYPE_UNSPECIFIED = 0, + GOOGLE_DEFAULT_ENCRYPTION = 1, + CUSTOMER_MANAGED_ENCRYPTION = 2 + } + } + /** Properties of a Snapshot. */ interface ISnapshot { @@ -7722,6 +7937,9 @@ export namespace google { /** Backup state */ state?: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State|null); + + /** Backup encryptionInfo */ + encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); } /** Represents a Backup. */ @@ -7754,6 +7972,9 @@ export namespace google { /** Backup state. */ public state: (google.bigtable.admin.v2.Backup.State|keyof typeof google.bigtable.admin.v2.Backup.State); + /** Backup encryptionInfo. */ + public encryptionInfo?: (google.bigtable.admin.v2.IEncryptionInfo|null); + /** * Creates a new Backup instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 017fad50d..253e6b6c1 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -6134,6 +6134,7 @@ * @property {google.bigtable.admin.v2.Cluster.State|null} [state] Cluster state * @property {number|null} [serveNodes] Cluster serveNodes * @property {google.bigtable.admin.v2.StorageType|null} [defaultStorageType] Cluster defaultStorageType + * @property {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null} [encryptionConfig] Cluster encryptionConfig */ /** @@ -6191,6 +6192,14 @@ */ Cluster.prototype.defaultStorageType = 0; + /** + * Cluster encryptionConfig. + * @member {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.encryptionConfig = null; + /** * Creates a new Cluster instance using the specified properties. * @function create @@ -6225,6 +6234,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serveNodes); if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -6274,6 +6285,9 @@ case 5: message.defaultStorageType = reader.int32(); break; + case 6: + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -6338,6 +6352,11 @@ case 2: break; } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } return null; }; @@ -6395,6 +6414,11 @@ message.defaultStorageType = 2; break; } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); + } return message; }; @@ -6417,6 +6441,7 @@ object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; object.serveNodes = 0; object.defaultStorageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; + object.encryptionConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -6428,6 +6453,8 @@ object.serveNodes = message.serveNodes; if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); return object; }; @@ -6442,6 +6469,193 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + Cluster.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kmsKeyName = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.EncryptionConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EncryptionConfig; + })(); + /** * State enum. * @name google.bigtable.admin.v2.Cluster.State @@ -10103,6 +10317,7 @@ case 1: case 2: case 3: + case 5: case 4: break; } @@ -10146,6 +10361,10 @@ case 3: message.view = 3; break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; case "FULL": case 4: message.view = 4; @@ -10588,6 +10807,7 @@ case 1: case 2: case 3: + case 5: case 4: break; } @@ -10625,6 +10845,10 @@ case 3: message.view = 3; break; + case "ENCRYPTION_VIEW": + case 5: + message.view = 5; + break; case "FULL": case 4: message.view = 4; @@ -16014,6 +16238,7 @@ * @memberof google.bigtable.admin.v2.Table * @interface IClusterState * @property {google.bigtable.admin.v2.Table.ClusterState.ReplicationState|null} [replicationState] ClusterState replicationState + * @property {Array.|null} [encryptionInfo] ClusterState encryptionInfo */ /** @@ -16025,6 +16250,7 @@ * @param {google.bigtable.admin.v2.Table.IClusterState=} [properties] Properties to set */ function ClusterState(properties) { + this.encryptionInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16039,6 +16265,14 @@ */ ClusterState.prototype.replicationState = 0; + /** + * ClusterState encryptionInfo. + * @member {Array.} encryptionInfo + * @memberof google.bigtable.admin.v2.Table.ClusterState + * @instance + */ + ClusterState.prototype.encryptionInfo = $util.emptyArray; + /** * Creates a new ClusterState instance using the specified properties. * @function create @@ -16065,6 +16299,9 @@ writer = $Writer.create(); if (message.replicationState != null && Object.hasOwnProperty.call(message, "replicationState")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.replicationState); + if (message.encryptionInfo != null && message.encryptionInfo.length) + for (var i = 0; i < message.encryptionInfo.length; ++i) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -16102,6 +16339,11 @@ case 1: message.replicationState = reader.int32(); break; + case 2: + if (!(message.encryptionInfo && message.encryptionInfo.length)) + message.encryptionInfo = []; + message.encryptionInfo.push($root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -16149,6 +16391,15 @@ case 5: break; } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + if (!Array.isArray(message.encryptionInfo)) + return "encryptionInfo: array expected"; + for (var i = 0; i < message.encryptionInfo.length; ++i) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo[i]); + if (error) + return "encryptionInfo." + error; + } + } return null; }; @@ -16190,6 +16441,16 @@ message.replicationState = 5; break; } + if (object.encryptionInfo) { + if (!Array.isArray(object.encryptionInfo)) + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: array expected"); + message.encryptionInfo = []; + for (var i = 0; i < object.encryptionInfo.length; ++i) { + if (typeof object.encryptionInfo[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.Table.ClusterState.encryptionInfo: object expected"); + message.encryptionInfo[i] = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo[i]); + } + } return message; }; @@ -16206,10 +16467,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.encryptionInfo = []; if (options.defaults) object.replicationState = options.enums === String ? "STATE_NOT_KNOWN" : 0; if (message.replicationState != null && message.hasOwnProperty("replicationState")) object.replicationState = options.enums === String ? $root.google.bigtable.admin.v2.Table.ClusterState.ReplicationState[message.replicationState] : message.replicationState; + if (message.encryptionInfo && message.encryptionInfo.length) { + object.encryptionInfo = []; + for (var j = 0; j < message.encryptionInfo.length; ++j) + object.encryptionInfo[j] = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo[j], options); + } return object; }; @@ -16271,6 +16539,7 @@ * @property {number} NAME_ONLY=1 NAME_ONLY value * @property {number} SCHEMA_VIEW=2 SCHEMA_VIEW value * @property {number} REPLICATION_VIEW=3 REPLICATION_VIEW value + * @property {number} ENCRYPTION_VIEW=5 ENCRYPTION_VIEW value * @property {number} FULL=4 FULL value */ Table.View = (function() { @@ -16279,6 +16548,7 @@ values[valuesById[1] = "NAME_ONLY"] = 1; values[valuesById[2] = "SCHEMA_VIEW"] = 2; values[valuesById[3] = "REPLICATION_VIEW"] = 3; + values[valuesById[5] = "ENCRYPTION_VIEW"] = 5; values[valuesById[4] = "FULL"] = 4; return values; })(); @@ -17201,6 +17471,277 @@ return GcRule; })(); + v2.EncryptionInfo = (function() { + + /** + * Properties of an EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @interface IEncryptionInfo + * @property {google.bigtable.admin.v2.EncryptionInfo.EncryptionType|null} [encryptionType] EncryptionInfo encryptionType + * @property {google.rpc.IStatus|null} [encryptionStatus] EncryptionInfo encryptionStatus + * @property {string|null} [kmsKeyVersion] EncryptionInfo kmsKeyVersion + */ + + /** + * Constructs a new EncryptionInfo. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an EncryptionInfo. + * @implements IEncryptionInfo + * @constructor + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + */ + function EncryptionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionInfo encryptionType. + * @member {google.bigtable.admin.v2.EncryptionInfo.EncryptionType} encryptionType + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionType = 0; + + /** + * EncryptionInfo encryptionStatus. + * @member {google.rpc.IStatus|null|undefined} encryptionStatus + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.encryptionStatus = null; + + /** + * EncryptionInfo kmsKeyVersion. + * @member {string} kmsKeyVersion + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + */ + EncryptionInfo.prototype.kmsKeyVersion = ""; + + /** + * Creates a new EncryptionInfo instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo instance + */ + EncryptionInfo.create = function create(properties) { + return new EncryptionInfo(properties); + }; + + /** + * Encodes the specified EncryptionInfo message. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyVersion != null && Object.hasOwnProperty.call(message, "kmsKeyVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyVersion); + if (message.encryptionType != null && Object.hasOwnProperty.call(message, "encryptionType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.encryptionType); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + $root.google.rpc.Status.encode(message.encryptionStatus, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EncryptionInfo message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.EncryptionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.IEncryptionInfo} message EncryptionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.encryptionType = reader.int32(); + break; + case 4: + message.encryptionStatus = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 2: + message.kmsKeyVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionInfo message. + * @function verify + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + switch (message.encryptionType) { + default: + return "encryptionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) { + var error = $root.google.rpc.Status.verify(message.encryptionStatus); + if (error) + return "encryptionStatus." + error; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + if (!$util.isString(message.kmsKeyVersion)) + return "kmsKeyVersion: string expected"; + return null; + }; + + /** + * Creates an EncryptionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.EncryptionInfo} EncryptionInfo + */ + EncryptionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.EncryptionInfo) + return object; + var message = new $root.google.bigtable.admin.v2.EncryptionInfo(); + switch (object.encryptionType) { + case "ENCRYPTION_TYPE_UNSPECIFIED": + case 0: + message.encryptionType = 0; + break; + case "GOOGLE_DEFAULT_ENCRYPTION": + case 1: + message.encryptionType = 1; + break; + case "CUSTOMER_MANAGED_ENCRYPTION": + case 2: + message.encryptionType = 2; + break; + } + if (object.encryptionStatus != null) { + if (typeof object.encryptionStatus !== "object") + throw TypeError(".google.bigtable.admin.v2.EncryptionInfo.encryptionStatus: object expected"); + message.encryptionStatus = $root.google.rpc.Status.fromObject(object.encryptionStatus); + } + if (object.kmsKeyVersion != null) + message.kmsKeyVersion = String(object.kmsKeyVersion); + return message; + }; + + /** + * Creates a plain object from an EncryptionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @static + * @param {google.bigtable.admin.v2.EncryptionInfo} message EncryptionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kmsKeyVersion = ""; + object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0; + object.encryptionStatus = null; + } + if (message.kmsKeyVersion != null && message.hasOwnProperty("kmsKeyVersion")) + object.kmsKeyVersion = message.kmsKeyVersion; + if (message.encryptionType != null && message.hasOwnProperty("encryptionType")) + object.encryptionType = options.enums === String ? $root.google.bigtable.admin.v2.EncryptionInfo.EncryptionType[message.encryptionType] : message.encryptionType; + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) + object.encryptionStatus = $root.google.rpc.Status.toObject(message.encryptionStatus, options); + return object; + }; + + /** + * Converts this EncryptionInfo to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.EncryptionInfo + * @instance + * @returns {Object.} JSON object + */ + EncryptionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EncryptionType enum. + * @name google.bigtable.admin.v2.EncryptionInfo.EncryptionType + * @enum {number} + * @property {number} ENCRYPTION_TYPE_UNSPECIFIED=0 ENCRYPTION_TYPE_UNSPECIFIED value + * @property {number} GOOGLE_DEFAULT_ENCRYPTION=1 GOOGLE_DEFAULT_ENCRYPTION value + * @property {number} CUSTOMER_MANAGED_ENCRYPTION=2 CUSTOMER_MANAGED_ENCRYPTION value + */ + EncryptionInfo.EncryptionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_DEFAULT_ENCRYPTION"] = 1; + values[valuesById[2] = "CUSTOMER_MANAGED_ENCRYPTION"] = 2; + return values; + })(); + + return EncryptionInfo; + })(); + v2.Snapshot = (function() { /** @@ -17597,6 +18138,7 @@ * @property {google.protobuf.ITimestamp|null} [endTime] Backup endTime * @property {number|Long|null} [sizeBytes] Backup sizeBytes * @property {google.bigtable.admin.v2.Backup.State|null} [state] Backup state + * @property {google.bigtable.admin.v2.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo */ /** @@ -17670,6 +18212,14 @@ */ Backup.prototype.state = 0; + /** + * Backup encryptionInfo. + * @member {google.bigtable.admin.v2.IEncryptionInfo|null|undefined} encryptionInfo + * @memberof google.bigtable.admin.v2.Backup + * @instance + */ + Backup.prototype.encryptionInfo = null; + /** * Creates a new Backup instance using the specified properties. * @function create @@ -17708,6 +18258,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int64(message.sizeBytes); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state); + if (message.encryptionInfo != null && Object.hasOwnProperty.call(message, "encryptionInfo")) + $root.google.bigtable.admin.v2.EncryptionInfo.encode(message.encryptionInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -17763,6 +18315,9 @@ case 7: message.state = reader.int32(); break; + case 9: + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -17831,6 +18386,11 @@ case 2: break; } + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) { + var error = $root.google.bigtable.admin.v2.EncryptionInfo.verify(message.encryptionInfo); + if (error) + return "encryptionInfo." + error; + } return null; }; @@ -17888,6 +18448,11 @@ message.state = 2; break; } + if (object.encryptionInfo != null) { + if (typeof object.encryptionInfo !== "object") + throw TypeError(".google.bigtable.admin.v2.Backup.encryptionInfo: object expected"); + message.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.fromObject(object.encryptionInfo); + } return message; }; @@ -17916,6 +18481,7 @@ } else object.sizeBytes = options.longs === String ? "0" : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.encryptionInfo = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17934,6 +18500,8 @@ object.sizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.sizeBytes) : options.longs === Number ? new $util.LongBits(message.sizeBytes.low >>> 0, message.sizeBytes.high >>> 0).toNumber() : message.sizeBytes; if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.bigtable.admin.v2.Backup.State[message.state] : message.state; + if (message.encryptionInfo != null && message.hasOwnProperty("encryptionInfo")) + object.encryptionInfo = $root.google.bigtable.admin.v2.EncryptionInfo.toObject(message.encryptionInfo, options); return object; }; diff --git a/protos/protos.json b/protos/protos.json index 56314756c..f39720777 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -14,7 +14,9 @@ "java_outer_classname": "TableProto", "java_package": "com.google.bigtable.admin.v2", "php_namespace": "Google\\Cloud\\Bigtable\\Admin\\V2", - "ruby_package": "Google::Cloud::Bigtable::Admin::V2" + "ruby_package": "Google::Cloud::Bigtable::Admin::V2", + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" }, "nested": { "BigtableInstanceAdmin": { @@ -889,9 +891,27 @@ "defaultStorageType": { "type": "StorageType", "id": 5 + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } } }, "nested": { + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + } + } + }, "State": { "values": { "STATE_NOT_KNOWN": 0, @@ -2099,6 +2119,14 @@ "replicationState": { "type": "ReplicationState", "id": 1 + }, + "encryptionInfo": { + "rule": "repeated", + "type": "EncryptionInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -2126,6 +2154,7 @@ "NAME_ONLY": 1, "SCHEMA_VIEW": 2, "REPLICATION_VIEW": 3, + "ENCRYPTION_VIEW": 5, "FULL": 4 } } @@ -2189,6 +2218,41 @@ } } }, + "EncryptionInfo": { + "fields": { + "encryptionType": { + "type": "EncryptionType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionStatus": { + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kmsKeyVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + }, + "nested": { + "EncryptionType": { + "values": { + "ENCRYPTION_TYPE_UNSPECIFIED": 0, + "GOOGLE_DEFAULT_ENCRYPTION": 1, + "CUSTOMER_MANAGED_ENCRYPTION": 2 + } + } + } + }, "Snapshot": { "options": { "(google.api.resource).type": "bigtable.googleapis.com/Snapshot", @@ -2288,6 +2352,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "encryptionInfo": { + "type": "EncryptionInfo", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { diff --git a/src/v2/bigtable_client_config.json b/src/v2/bigtable_client_config.json index 749f22e98..2c2765aa6 100644 --- a/src/v2/bigtable_client_config.json +++ b/src/v2/bigtable_client_config.json @@ -32,12 +32,12 @@ "ReadRows": { "timeout_millis": 43200000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "SampleRowKeys": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "MutateRow": { "timeout_millis": 60000, @@ -47,17 +47,17 @@ "MutateRows": { "timeout_millis": 600000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "CheckAndMutateRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" }, "ReadModifyWriteRow": { "timeout_millis": 20000, "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "retry_params_name": "5af39a0f6db447f61c4f695240caeccb74f78362" } } } diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index 66605f462..b0832d3ee 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -2141,6 +2141,8 @@ export class BigtableInstanceAdminClient { * (`CreationOnly`) * The type of storage used by this cluster to serve its * parent instance's tables, unless explicitly overridden. + * @param {google.bigtable.admin.v2.Cluster.EncryptionConfig} request.encryptionConfig + * Immutable. The encryption configuration for CMEK-protected clusters. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/src/v2/bigtable_table_admin_client_config.json b/src/v2/bigtable_table_admin_client_config.json index d392d4940..86321882e 100644 --- a/src/v2/bigtable_table_admin_client_config.json +++ b/src/v2/bigtable_table_admin_client_config.json @@ -35,7 +35,6 @@ "retry_params_name": "default" }, "CreateTableFromSnapshot": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -75,7 +74,6 @@ "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "SnapshotTable": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -99,20 +97,24 @@ "retry_params_name": "default" }, "GetBackup": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "UpdateBackup": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteBackup": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListBackups": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "RestoreTable": { "retry_codes_name": "non_idempotent", diff --git a/synth.metadata b/synth.metadata index 4079075ee..5b71d3d55 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "da875a17c8a7a20d020e534a5a315fec45630e83" + "sha": "278c4ddfb3085b7a2ee108efafdbc0ccfe806cc0" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "eabec5a21219401bad79e1cc7d900c1658aee5fd", + "internalRef": "359130387" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" + "sha": "79ab0b44a2cc7d803d07c107f9faf07729fc4012" } } ], From 815b7f85d48fe3d760e4987cefae95e6fd586c44 Mon Sep 17 00:00:00 2001 From: Christopher Wilcox Date: Thu, 25 Feb 2021 17:12:16 -0800 Subject: [PATCH 18/21] fix: rollback to v3 release line (#847) Release-As: v3.2.3 --- src/index.ts | 10 +++++++--- system-test/bigtable.ts | 3 ++- test/index.ts | 11 +++++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index 536c3a56f..90cfe9106 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,11 +47,13 @@ export interface GetInstancesCallback { ( err: ServiceError | null, result?: Instance[], + failedLocations?: string[], response?: google.bigtable.admin.v2.IListInstancesResponse ): void; } export type GetInstancesResponse = [ Instance[], + string[], google.bigtable.admin.v2.IListInstancesResponse ]; @@ -607,7 +609,8 @@ export class Bigtable { /** * @typedef {array} GetInstancesResponse * @property {Instance[]} 0 Array of {@link Instance} instances. - * @property {object} 1 The full API response. + * @property {string[]} 1 locations from which Instance information could not be retrieved + * @property {object} 2 The full API response. * Note: 'failedLocations' property may contain locations from which * Instance information could not be retrieved. * Values are of the form `projects//locations/` @@ -616,6 +619,7 @@ export class Bigtable { * @callback GetInstancesCallback * @param {?Error} err Request error, if any. * @param {Instance[]} instances Array of {@link Instance} instances. + * @param {string[]} locations from which Instance information could not be retrieved * @param {object} apiResponse The full API response. * Note: 'failedLocations' property may contain locations from which * Instance information could not be retrieved. @@ -646,7 +650,7 @@ export class Bigtable { * * bigtable.getInstances().then(function(data) { * const instances = data[0]; - * const fullResponse = data[1]; + * const fullResponse = data[2]; * * if (fullResponse.failedLocations.length > 0) { * // These locations contain instances which could not be retrieved. @@ -686,7 +690,7 @@ export class Bigtable { instance.metadata = instanceData; return instance; }); - callback!(null, instances, resp); + callback!(null, instances, resp.failedLocations, resp); } ); } diff --git a/system-test/bigtable.ts b/system-test/bigtable.ts index ba830446c..97c341080 100644 --- a/system-test/bigtable.ts +++ b/system-test/bigtable.ts @@ -103,8 +103,9 @@ describe('Bigtable', () => { describe('instances', () => { it('should get a list of instances', async () => { - const [instances] = await bigtable.getInstances(); + const [instances, failedLocations] = await bigtable.getInstances(); assert(instances.length > 0); + assert(Array.isArray(failedLocations)); }); it('should check if an instance exists', async () => { diff --git a/test/index.ts b/test/index.ts index a29c8aa47..3dc752cfb 100644 --- a/test/index.ts +++ b/test/index.ts @@ -571,7 +571,7 @@ describe('Bigtable', () => { }); }); - it('should return an array of instance objects', done => { + it('should return an array of instance objects and failed locations', done => { const response = { instances: [ { @@ -581,6 +581,7 @@ describe('Bigtable', () => { name: 'b', }, ], + failedLocations: ['projects//locations/'], }; const fakeInstances = [{}, {}]; bigtable.request = (config: {}, callback: Function) => { @@ -593,12 +594,18 @@ describe('Bigtable', () => { }; bigtable.getInstances( - (err: Error, instances: Instance[], apiResponse: {}) => { + ( + err: Error, + instances: Instance[], + failedLocations: string[], + apiResponse: {} + ) => { assert.ifError(err); assert.strictEqual(instances[0], fakeInstances[0]); assert.strictEqual(instances[0].metadata, response.instances[0]); assert.strictEqual(instances[1], fakeInstances[1]); assert.strictEqual(instances[1].metadata, response.instances[1]); + assert.strictEqual(failedLocations, response.failedLocations); assert.strictEqual(apiResponse, response); done(); } From 25f3f60fba8bb751ca05282a5dd7fc862a7a4135 Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Tue, 2 Mar 2021 15:19:24 -0500 Subject: [PATCH 19/21] chore: update release version to 3.3.0 (#849) Release-As: v3.3.0 From 3ff282855f4f9a52a89bca8d087c1423e71bd7c6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 8 Mar 2021 11:14:03 -0800 Subject: [PATCH 20/21] fix(retry): restore grpc_service_config for CreateBackup and RestoreTable (#851) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9f8e7599-f87d-4fac-8f3a-a2e1781c33be/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361301101 Source-Link: https://github.com/googleapis/googleapis/commit/458338f8ca444e43b9df96b984b68f3978852b74 PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- src/v2/bigtable_table_admin_client_config.json | 2 ++ synth.metadata | 6 +++--- webpack.config.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/v2/bigtable_table_admin_client_config.json b/src/v2/bigtable_table_admin_client_config.json index 86321882e..b6f59ab62 100644 --- a/src/v2/bigtable_table_admin_client_config.json +++ b/src/v2/bigtable_table_admin_client_config.json @@ -93,6 +93,7 @@ "retry_params_name": "default" }, "CreateBackup": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, @@ -117,6 +118,7 @@ "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, "RestoreTable": { + "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, diff --git a/synth.metadata b/synth.metadata index 5b71d3d55..1d095d0ec 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-bigtable.git", - "sha": "278c4ddfb3085b7a2ee108efafdbc0ccfe806cc0" + "sha": "25f3f60fba8bb751ca05282a5dd7fc862a7a4135" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "eabec5a21219401bad79e1cc7d900c1658aee5fd", - "internalRef": "359130387" + "sha": "458338f8ca444e43b9df96b984b68f3978852b74", + "internalRef": "361301101" } }, { diff --git a/webpack.config.js b/webpack.config.js index da9c004a4..42e316fc8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From c7d202be22a667414cbbdf9a19047160ed396f80 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Mar 2021 19:12:05 +0000 Subject: [PATCH 21/21] chore: release 3.3.0 (#850) :robot: I have created a release \*beep\* \*boop\* --- ## [3.3.0](https://www.github.com/googleapis/nodejs-bigtable/compare/v3.2.0...v3.3.0) (2021-03-08) ### Features * add CMEK fields ([#845](https://www.github.com/googleapis/nodejs-bigtable/issues/845)) ([0381fb7](https://www.github.com/googleapis/nodejs-bigtable/commit/0381fb7da68492b85f8a3359d5fb97ca4898810e)) * introduce style enumeration ([#833](https://www.github.com/googleapis/nodejs-bigtable/issues/833)) ([99b7617](https://www.github.com/googleapis/nodejs-bigtable/commit/99b7617e215126fc36ef3c3ebefb244e0d8d2242)) * **protos:** update BigtableTableAdmin GetIamPolicy, change DeleteAppProfileRequest.ignore_warnings to REQUIRED ([59a0d26](https://www.github.com/googleapis/nodejs-bigtable/commit/59a0d269d5196991dd395e671d7d5f54ce449005)) ### Bug Fixes * **browser:** check for fetch on window ([#824](https://www.github.com/googleapis/nodejs-bigtable/issues/824)) ([a38cbcc](https://www.github.com/googleapis/nodejs-bigtable/commit/a38cbcca1660bc40fe137acb973bf62f3c55754e)) * Renaming region tags to not conflict with documentation snippets ([#834](https://www.github.com/googleapis/nodejs-bigtable/issues/834)) ([5d3e8f7](https://www.github.com/googleapis/nodejs-bigtable/commit/5d3e8f721c2a32a33bf41baa1ed237fb90f7cbd6)) * **retry:** restore grpc_service_config for CreateBackup and RestoreTable ([#851](https://www.github.com/googleapis/nodejs-bigtable/issues/851)) ([3ff2828](https://www.github.com/googleapis/nodejs-bigtable/commit/3ff282855f4f9a52a89bca8d087c1423e71bd7c6)) * set keepalive configuration ([#836](https://www.github.com/googleapis/nodejs-bigtable/issues/836)) ([8105dea](https://www.github.com/googleapis/nodejs-bigtable/commit/8105dea272de44e69915d3e62e5b5add106b54cb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 18 ++++++++++++++++++ package.json | 2 +- samples/package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6acb3a4fb..413f75c97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigtable?activeTab=versions +## [3.3.0](https://www.github.com/googleapis/nodejs-bigtable/compare/v3.2.0...v3.3.0) (2021-03-08) + + +### Features + +* add CMEK fields ([#845](https://www.github.com/googleapis/nodejs-bigtable/issues/845)) ([0381fb7](https://www.github.com/googleapis/nodejs-bigtable/commit/0381fb7da68492b85f8a3359d5fb97ca4898810e)) +* introduce style enumeration ([#833](https://www.github.com/googleapis/nodejs-bigtable/issues/833)) ([99b7617](https://www.github.com/googleapis/nodejs-bigtable/commit/99b7617e215126fc36ef3c3ebefb244e0d8d2242)) +* **protos:** update BigtableTableAdmin GetIamPolicy, change DeleteAppProfileRequest.ignore_warnings to REQUIRED ([59a0d26](https://www.github.com/googleapis/nodejs-bigtable/commit/59a0d269d5196991dd395e671d7d5f54ce449005)) + + +### Bug Fixes + +* **browser:** check for fetch on window ([#824](https://www.github.com/googleapis/nodejs-bigtable/issues/824)) ([a38cbcc](https://www.github.com/googleapis/nodejs-bigtable/commit/a38cbcca1660bc40fe137acb973bf62f3c55754e)) +* Renaming region tags to not conflict with documentation snippets ([#834](https://www.github.com/googleapis/nodejs-bigtable/issues/834)) ([5d3e8f7](https://www.github.com/googleapis/nodejs-bigtable/commit/5d3e8f721c2a32a33bf41baa1ed237fb90f7cbd6)) +* **retry:** restore grpc_service_config for CreateBackup and RestoreTable ([#851](https://www.github.com/googleapis/nodejs-bigtable/issues/851)) ([3ff2828](https://www.github.com/googleapis/nodejs-bigtable/commit/3ff282855f4f9a52a89bca8d087c1423e71bd7c6)) +* set keepalive configuration ([#836](https://www.github.com/googleapis/nodejs-bigtable/issues/836)) ([8105dea](https://www.github.com/googleapis/nodejs-bigtable/commit/8105dea272de44e69915d3e62e5b5add106b54cb)) + + ## [3.2.0](https://www.github.com/googleapis/nodejs-bigtable/compare/v3.1.1...v3.2.0) (2020-11-07) diff --git a/package.json b/package.json index 7f791070f..0ed6de897 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigtable", - "version": "3.2.0", + "version": "3.3.0", "description": "Cloud Bigtable Client Library for Node.js", "keywords": [ "bigtable", diff --git a/samples/package.json b/samples/package.json index d1f5a48bf..221f4f162 100644 --- a/samples/package.json +++ b/samples/package.json @@ -14,7 +14,7 @@ "node": ">=12" }, "dependencies": { - "@google-cloud/bigtable": "^3.2.0", + "@google-cloud/bigtable": "^3.3.0", "uuid": "^8.0.0", "yargs": "^16.0.0" },