@google-cloud/spanner 7.7.0 → 7.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/README.md +5 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +190 -109
- package/build/protos/google/spanner/admin/database/v1/common.proto +30 -10
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +166 -100
- package/build/protos/google/spanner/admin/instance/v1/common.proto +1 -1
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1 -1
- package/build/protos/google/spanner/v1/commit_response.proto +1 -1
- package/build/protos/google/spanner/v1/keys.proto +1 -1
- package/build/protos/google/spanner/v1/mutation.proto +1 -1
- package/build/protos/google/spanner/v1/query_plan.proto +1 -1
- package/build/protos/google/spanner/v1/result_set.proto +1 -1
- package/build/protos/google/spanner/v1/spanner.proto +1 -1
- package/build/protos/google/spanner/v1/transaction.proto +1 -1
- package/build/protos/google/spanner/v1/type.proto +1 -1
- package/build/protos/protos.d.ts +30 -0
- package/build/protos/protos.js +204 -0
- package/build/protos/protos.json +43 -0
- package/build/src/codec.d.ts +55 -1
- package/build/src/codec.js +109 -4
- package/build/src/common-grpc/service.d.ts +0 -1
- package/build/src/common.js +2 -2
- package/build/src/database.d.ts +94 -7
- package/build/src/database.js +131 -0
- package/build/src/index.d.ts +59 -3
- package/build/src/index.js +55 -1
- package/build/src/instance.d.ts +0 -2
- package/build/src/partial-result-stream.d.ts +41 -1
- package/build/src/partial-result-stream.js +8 -3
- package/build/src/session-pool.d.ts +0 -2
- package/build/src/session-pool.js +7 -7
- package/build/src/table.d.ts +1 -0
- package/build/src/table.js +36 -2
- package/build/src/transaction-runner.d.ts +1 -0
- package/build/src/transaction-runner.js +5 -2
- package/build/src/transaction.d.ts +100 -2
- package/build/src/transaction.js +135 -30
- package/build/src/v1/database_admin_client.d.ts +175 -127
- package/build/src/v1/database_admin_client.js +85 -57
- package/build/src/v1/instance_admin_client.d.ts +0 -1
- package/build/src/v1/spanner_client.d.ts +0 -1
- package/build/src/v1/spanner_client_config.json +15 -14
- package/package.json +6 -6
package/build/protos/protos.d.ts
CHANGED
|
@@ -6558,6 +6558,9 @@ export namespace google {
|
|
|
6558
6558
|
/** Backup encryptionInfo */
|
|
6559
6559
|
encryptionInfo?: (google.spanner.admin.database.v1.IEncryptionInfo|null);
|
|
6560
6560
|
|
|
6561
|
+
/** Backup encryptionInformation */
|
|
6562
|
+
encryptionInformation?: (google.spanner.admin.database.v1.IEncryptionInfo[]|null);
|
|
6563
|
+
|
|
6561
6564
|
/** Backup databaseDialect */
|
|
6562
6565
|
databaseDialect?: (google.spanner.admin.database.v1.DatabaseDialect|keyof typeof google.spanner.admin.database.v1.DatabaseDialect|null);
|
|
6563
6566
|
|
|
@@ -6604,6 +6607,9 @@ export namespace google {
|
|
|
6604
6607
|
/** Backup encryptionInfo. */
|
|
6605
6608
|
public encryptionInfo?: (google.spanner.admin.database.v1.IEncryptionInfo|null);
|
|
6606
6609
|
|
|
6610
|
+
/** Backup encryptionInformation. */
|
|
6611
|
+
public encryptionInformation: google.spanner.admin.database.v1.IEncryptionInfo[];
|
|
6612
|
+
|
|
6607
6613
|
/** Backup databaseDialect. */
|
|
6608
6614
|
public databaseDialect: (google.spanner.admin.database.v1.DatabaseDialect|keyof typeof google.spanner.admin.database.v1.DatabaseDialect);
|
|
6609
6615
|
|
|
@@ -8023,6 +8029,9 @@ export namespace google {
|
|
|
8023
8029
|
|
|
8024
8030
|
/** CreateBackupEncryptionConfig kmsKeyName */
|
|
8025
8031
|
kmsKeyName?: (string|null);
|
|
8032
|
+
|
|
8033
|
+
/** CreateBackupEncryptionConfig kmsKeyNames */
|
|
8034
|
+
kmsKeyNames?: (string[]|null);
|
|
8026
8035
|
}
|
|
8027
8036
|
|
|
8028
8037
|
/** Represents a CreateBackupEncryptionConfig. */
|
|
@@ -8040,6 +8049,9 @@ export namespace google {
|
|
|
8040
8049
|
/** CreateBackupEncryptionConfig kmsKeyName. */
|
|
8041
8050
|
public kmsKeyName: string;
|
|
8042
8051
|
|
|
8052
|
+
/** CreateBackupEncryptionConfig kmsKeyNames. */
|
|
8053
|
+
public kmsKeyNames: string[];
|
|
8054
|
+
|
|
8043
8055
|
/**
|
|
8044
8056
|
* Creates a new CreateBackupEncryptionConfig instance using the specified properties.
|
|
8045
8057
|
* @param [properties] Properties to set
|
|
@@ -8137,6 +8149,9 @@ export namespace google {
|
|
|
8137
8149
|
|
|
8138
8150
|
/** CopyBackupEncryptionConfig kmsKeyName */
|
|
8139
8151
|
kmsKeyName?: (string|null);
|
|
8152
|
+
|
|
8153
|
+
/** CopyBackupEncryptionConfig kmsKeyNames */
|
|
8154
|
+
kmsKeyNames?: (string[]|null);
|
|
8140
8155
|
}
|
|
8141
8156
|
|
|
8142
8157
|
/** Represents a CopyBackupEncryptionConfig. */
|
|
@@ -8154,6 +8169,9 @@ export namespace google {
|
|
|
8154
8169
|
/** CopyBackupEncryptionConfig kmsKeyName. */
|
|
8155
8170
|
public kmsKeyName: string;
|
|
8156
8171
|
|
|
8172
|
+
/** CopyBackupEncryptionConfig kmsKeyNames. */
|
|
8173
|
+
public kmsKeyNames: string[];
|
|
8174
|
+
|
|
8157
8175
|
/**
|
|
8158
8176
|
* Creates a new CopyBackupEncryptionConfig instance using the specified properties.
|
|
8159
8177
|
* @param [properties] Properties to set
|
|
@@ -8357,6 +8375,9 @@ export namespace google {
|
|
|
8357
8375
|
|
|
8358
8376
|
/** EncryptionConfig kmsKeyName */
|
|
8359
8377
|
kmsKeyName?: (string|null);
|
|
8378
|
+
|
|
8379
|
+
/** EncryptionConfig kmsKeyNames */
|
|
8380
|
+
kmsKeyNames?: (string[]|null);
|
|
8360
8381
|
}
|
|
8361
8382
|
|
|
8362
8383
|
/** Represents an EncryptionConfig. */
|
|
@@ -8371,6 +8392,9 @@ export namespace google {
|
|
|
8371
8392
|
/** EncryptionConfig kmsKeyName. */
|
|
8372
8393
|
public kmsKeyName: string;
|
|
8373
8394
|
|
|
8395
|
+
/** EncryptionConfig kmsKeyNames. */
|
|
8396
|
+
public kmsKeyNames: string[];
|
|
8397
|
+
|
|
8374
8398
|
/**
|
|
8375
8399
|
* Creates a new EncryptionConfig instance using the specified properties.
|
|
8376
8400
|
* @param [properties] Properties to set
|
|
@@ -11036,6 +11060,9 @@ export namespace google {
|
|
|
11036
11060
|
|
|
11037
11061
|
/** RestoreDatabaseEncryptionConfig kmsKeyName */
|
|
11038
11062
|
kmsKeyName?: (string|null);
|
|
11063
|
+
|
|
11064
|
+
/** RestoreDatabaseEncryptionConfig kmsKeyNames */
|
|
11065
|
+
kmsKeyNames?: (string[]|null);
|
|
11039
11066
|
}
|
|
11040
11067
|
|
|
11041
11068
|
/** Represents a RestoreDatabaseEncryptionConfig. */
|
|
@@ -11053,6 +11080,9 @@ export namespace google {
|
|
|
11053
11080
|
/** RestoreDatabaseEncryptionConfig kmsKeyName. */
|
|
11054
11081
|
public kmsKeyName: string;
|
|
11055
11082
|
|
|
11083
|
+
/** RestoreDatabaseEncryptionConfig kmsKeyNames. */
|
|
11084
|
+
public kmsKeyNames: string[];
|
|
11085
|
+
|
|
11056
11086
|
/**
|
|
11057
11087
|
* Creates a new RestoreDatabaseEncryptionConfig instance using the specified properties.
|
|
11058
11088
|
* @param [properties] Properties to set
|
package/build/protos/protos.js
CHANGED
|
@@ -17698,6 +17698,7 @@
|
|
|
17698
17698
|
* @property {google.spanner.admin.database.v1.Backup.State|null} [state] Backup state
|
|
17699
17699
|
* @property {Array.<string>|null} [referencingDatabases] Backup referencingDatabases
|
|
17700
17700
|
* @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo
|
|
17701
|
+
* @property {Array.<google.spanner.admin.database.v1.IEncryptionInfo>|null} [encryptionInformation] Backup encryptionInformation
|
|
17701
17702
|
* @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Backup databaseDialect
|
|
17702
17703
|
* @property {Array.<string>|null} [referencingBackups] Backup referencingBackups
|
|
17703
17704
|
* @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime
|
|
@@ -17713,6 +17714,7 @@
|
|
|
17713
17714
|
*/
|
|
17714
17715
|
function Backup(properties) {
|
|
17715
17716
|
this.referencingDatabases = [];
|
|
17717
|
+
this.encryptionInformation = [];
|
|
17716
17718
|
this.referencingBackups = [];
|
|
17717
17719
|
if (properties)
|
|
17718
17720
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
@@ -17792,6 +17794,14 @@
|
|
|
17792
17794
|
*/
|
|
17793
17795
|
Backup.prototype.encryptionInfo = null;
|
|
17794
17796
|
|
|
17797
|
+
/**
|
|
17798
|
+
* Backup encryptionInformation.
|
|
17799
|
+
* @member {Array.<google.spanner.admin.database.v1.IEncryptionInfo>} encryptionInformation
|
|
17800
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17801
|
+
* @instance
|
|
17802
|
+
*/
|
|
17803
|
+
Backup.prototype.encryptionInformation = $util.emptyArray;
|
|
17804
|
+
|
|
17795
17805
|
/**
|
|
17796
17806
|
* Backup databaseDialect.
|
|
17797
17807
|
* @member {google.spanner.admin.database.v1.DatabaseDialect} databaseDialect
|
|
@@ -17866,6 +17876,9 @@
|
|
|
17866
17876
|
writer.uint32(/* id 11, wireType 2 =*/90).string(message.referencingBackups[i]);
|
|
17867
17877
|
if (message.maxExpireTime != null && Object.hasOwnProperty.call(message, "maxExpireTime"))
|
|
17868
17878
|
$root.google.protobuf.Timestamp.encode(message.maxExpireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
|
17879
|
+
if (message.encryptionInformation != null && message.encryptionInformation.length)
|
|
17880
|
+
for (var i = 0; i < message.encryptionInformation.length; ++i)
|
|
17881
|
+
$root.google.spanner.admin.database.v1.EncryptionInfo.encode(message.encryptionInformation[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
17869
17882
|
return writer;
|
|
17870
17883
|
};
|
|
17871
17884
|
|
|
@@ -17938,6 +17951,12 @@
|
|
|
17938
17951
|
message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.decode(reader, reader.uint32());
|
|
17939
17952
|
break;
|
|
17940
17953
|
}
|
|
17954
|
+
case 13: {
|
|
17955
|
+
if (!(message.encryptionInformation && message.encryptionInformation.length))
|
|
17956
|
+
message.encryptionInformation = [];
|
|
17957
|
+
message.encryptionInformation.push($root.google.spanner.admin.database.v1.EncryptionInfo.decode(reader, reader.uint32()));
|
|
17958
|
+
break;
|
|
17959
|
+
}
|
|
17941
17960
|
case 10: {
|
|
17942
17961
|
message.databaseDialect = reader.int32();
|
|
17943
17962
|
break;
|
|
@@ -18032,6 +18051,15 @@
|
|
|
18032
18051
|
if (error)
|
|
18033
18052
|
return "encryptionInfo." + error;
|
|
18034
18053
|
}
|
|
18054
|
+
if (message.encryptionInformation != null && message.hasOwnProperty("encryptionInformation")) {
|
|
18055
|
+
if (!Array.isArray(message.encryptionInformation))
|
|
18056
|
+
return "encryptionInformation: array expected";
|
|
18057
|
+
for (var i = 0; i < message.encryptionInformation.length; ++i) {
|
|
18058
|
+
var error = $root.google.spanner.admin.database.v1.EncryptionInfo.verify(message.encryptionInformation[i]);
|
|
18059
|
+
if (error)
|
|
18060
|
+
return "encryptionInformation." + error;
|
|
18061
|
+
}
|
|
18062
|
+
}
|
|
18035
18063
|
if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
|
|
18036
18064
|
switch (message.databaseDialect) {
|
|
18037
18065
|
default:
|
|
@@ -18128,6 +18156,16 @@
|
|
|
18128
18156
|
throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInfo: object expected");
|
|
18129
18157
|
message.encryptionInfo = $root.google.spanner.admin.database.v1.EncryptionInfo.fromObject(object.encryptionInfo);
|
|
18130
18158
|
}
|
|
18159
|
+
if (object.encryptionInformation) {
|
|
18160
|
+
if (!Array.isArray(object.encryptionInformation))
|
|
18161
|
+
throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInformation: array expected");
|
|
18162
|
+
message.encryptionInformation = [];
|
|
18163
|
+
for (var i = 0; i < object.encryptionInformation.length; ++i) {
|
|
18164
|
+
if (typeof object.encryptionInformation[i] !== "object")
|
|
18165
|
+
throw TypeError(".google.spanner.admin.database.v1.Backup.encryptionInformation: object expected");
|
|
18166
|
+
message.encryptionInformation[i] = $root.google.spanner.admin.database.v1.EncryptionInfo.fromObject(object.encryptionInformation[i]);
|
|
18167
|
+
}
|
|
18168
|
+
}
|
|
18131
18169
|
switch (object.databaseDialect) {
|
|
18132
18170
|
default:
|
|
18133
18171
|
if (typeof object.databaseDialect === "number") {
|
|
@@ -18179,6 +18217,7 @@
|
|
|
18179
18217
|
if (options.arrays || options.defaults) {
|
|
18180
18218
|
object.referencingDatabases = [];
|
|
18181
18219
|
object.referencingBackups = [];
|
|
18220
|
+
object.encryptionInformation = [];
|
|
18182
18221
|
}
|
|
18183
18222
|
if (options.defaults) {
|
|
18184
18223
|
object.name = "";
|
|
@@ -18229,6 +18268,11 @@
|
|
|
18229
18268
|
}
|
|
18230
18269
|
if (message.maxExpireTime != null && message.hasOwnProperty("maxExpireTime"))
|
|
18231
18270
|
object.maxExpireTime = $root.google.protobuf.Timestamp.toObject(message.maxExpireTime, options);
|
|
18271
|
+
if (message.encryptionInformation && message.encryptionInformation.length) {
|
|
18272
|
+
object.encryptionInformation = [];
|
|
18273
|
+
for (var j = 0; j < message.encryptionInformation.length; ++j)
|
|
18274
|
+
object.encryptionInformation[j] = $root.google.spanner.admin.database.v1.EncryptionInfo.toObject(message.encryptionInformation[j], options);
|
|
18275
|
+
}
|
|
18232
18276
|
return object;
|
|
18233
18277
|
};
|
|
18234
18278
|
|
|
@@ -21408,6 +21452,7 @@
|
|
|
21408
21452
|
* @interface ICreateBackupEncryptionConfig
|
|
21409
21453
|
* @property {google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType|null} [encryptionType] CreateBackupEncryptionConfig encryptionType
|
|
21410
21454
|
* @property {string|null} [kmsKeyName] CreateBackupEncryptionConfig kmsKeyName
|
|
21455
|
+
* @property {Array.<string>|null} [kmsKeyNames] CreateBackupEncryptionConfig kmsKeyNames
|
|
21411
21456
|
*/
|
|
21412
21457
|
|
|
21413
21458
|
/**
|
|
@@ -21419,6 +21464,7 @@
|
|
|
21419
21464
|
* @param {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig=} [properties] Properties to set
|
|
21420
21465
|
*/
|
|
21421
21466
|
function CreateBackupEncryptionConfig(properties) {
|
|
21467
|
+
this.kmsKeyNames = [];
|
|
21422
21468
|
if (properties)
|
|
21423
21469
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21424
21470
|
if (properties[keys[i]] != null)
|
|
@@ -21441,6 +21487,14 @@
|
|
|
21441
21487
|
*/
|
|
21442
21488
|
CreateBackupEncryptionConfig.prototype.kmsKeyName = "";
|
|
21443
21489
|
|
|
21490
|
+
/**
|
|
21491
|
+
* CreateBackupEncryptionConfig kmsKeyNames.
|
|
21492
|
+
* @member {Array.<string>} kmsKeyNames
|
|
21493
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupEncryptionConfig
|
|
21494
|
+
* @instance
|
|
21495
|
+
*/
|
|
21496
|
+
CreateBackupEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray;
|
|
21497
|
+
|
|
21444
21498
|
/**
|
|
21445
21499
|
* Creates a new CreateBackupEncryptionConfig instance using the specified properties.
|
|
21446
21500
|
* @function create
|
|
@@ -21469,6 +21523,9 @@
|
|
|
21469
21523
|
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType);
|
|
21470
21524
|
if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
|
|
21471
21525
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName);
|
|
21526
|
+
if (message.kmsKeyNames != null && message.kmsKeyNames.length)
|
|
21527
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
21528
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]);
|
|
21472
21529
|
return writer;
|
|
21473
21530
|
};
|
|
21474
21531
|
|
|
@@ -21511,6 +21568,12 @@
|
|
|
21511
21568
|
message.kmsKeyName = reader.string();
|
|
21512
21569
|
break;
|
|
21513
21570
|
}
|
|
21571
|
+
case 3: {
|
|
21572
|
+
if (!(message.kmsKeyNames && message.kmsKeyNames.length))
|
|
21573
|
+
message.kmsKeyNames = [];
|
|
21574
|
+
message.kmsKeyNames.push(reader.string());
|
|
21575
|
+
break;
|
|
21576
|
+
}
|
|
21514
21577
|
default:
|
|
21515
21578
|
reader.skipType(tag & 7);
|
|
21516
21579
|
break;
|
|
@@ -21559,6 +21622,13 @@
|
|
|
21559
21622
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
21560
21623
|
if (!$util.isString(message.kmsKeyName))
|
|
21561
21624
|
return "kmsKeyName: string expected";
|
|
21625
|
+
if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) {
|
|
21626
|
+
if (!Array.isArray(message.kmsKeyNames))
|
|
21627
|
+
return "kmsKeyNames: array expected";
|
|
21628
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
21629
|
+
if (!$util.isString(message.kmsKeyNames[i]))
|
|
21630
|
+
return "kmsKeyNames: string[] expected";
|
|
21631
|
+
}
|
|
21562
21632
|
return null;
|
|
21563
21633
|
};
|
|
21564
21634
|
|
|
@@ -21600,6 +21670,13 @@
|
|
|
21600
21670
|
}
|
|
21601
21671
|
if (object.kmsKeyName != null)
|
|
21602
21672
|
message.kmsKeyName = String(object.kmsKeyName);
|
|
21673
|
+
if (object.kmsKeyNames) {
|
|
21674
|
+
if (!Array.isArray(object.kmsKeyNames))
|
|
21675
|
+
throw TypeError(".google.spanner.admin.database.v1.CreateBackupEncryptionConfig.kmsKeyNames: array expected");
|
|
21676
|
+
message.kmsKeyNames = [];
|
|
21677
|
+
for (var i = 0; i < object.kmsKeyNames.length; ++i)
|
|
21678
|
+
message.kmsKeyNames[i] = String(object.kmsKeyNames[i]);
|
|
21679
|
+
}
|
|
21603
21680
|
return message;
|
|
21604
21681
|
};
|
|
21605
21682
|
|
|
@@ -21616,6 +21693,8 @@
|
|
|
21616
21693
|
if (!options)
|
|
21617
21694
|
options = {};
|
|
21618
21695
|
var object = {};
|
|
21696
|
+
if (options.arrays || options.defaults)
|
|
21697
|
+
object.kmsKeyNames = [];
|
|
21619
21698
|
if (options.defaults) {
|
|
21620
21699
|
object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0;
|
|
21621
21700
|
object.kmsKeyName = "";
|
|
@@ -21624,6 +21703,11 @@
|
|
|
21624
21703
|
object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType;
|
|
21625
21704
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
21626
21705
|
object.kmsKeyName = message.kmsKeyName;
|
|
21706
|
+
if (message.kmsKeyNames && message.kmsKeyNames.length) {
|
|
21707
|
+
object.kmsKeyNames = [];
|
|
21708
|
+
for (var j = 0; j < message.kmsKeyNames.length; ++j)
|
|
21709
|
+
object.kmsKeyNames[j] = message.kmsKeyNames[j];
|
|
21710
|
+
}
|
|
21627
21711
|
return object;
|
|
21628
21712
|
};
|
|
21629
21713
|
|
|
@@ -21682,6 +21766,7 @@
|
|
|
21682
21766
|
* @interface ICopyBackupEncryptionConfig
|
|
21683
21767
|
* @property {google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType|null} [encryptionType] CopyBackupEncryptionConfig encryptionType
|
|
21684
21768
|
* @property {string|null} [kmsKeyName] CopyBackupEncryptionConfig kmsKeyName
|
|
21769
|
+
* @property {Array.<string>|null} [kmsKeyNames] CopyBackupEncryptionConfig kmsKeyNames
|
|
21685
21770
|
*/
|
|
21686
21771
|
|
|
21687
21772
|
/**
|
|
@@ -21693,6 +21778,7 @@
|
|
|
21693
21778
|
* @param {google.spanner.admin.database.v1.ICopyBackupEncryptionConfig=} [properties] Properties to set
|
|
21694
21779
|
*/
|
|
21695
21780
|
function CopyBackupEncryptionConfig(properties) {
|
|
21781
|
+
this.kmsKeyNames = [];
|
|
21696
21782
|
if (properties)
|
|
21697
21783
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21698
21784
|
if (properties[keys[i]] != null)
|
|
@@ -21715,6 +21801,14 @@
|
|
|
21715
21801
|
*/
|
|
21716
21802
|
CopyBackupEncryptionConfig.prototype.kmsKeyName = "";
|
|
21717
21803
|
|
|
21804
|
+
/**
|
|
21805
|
+
* CopyBackupEncryptionConfig kmsKeyNames.
|
|
21806
|
+
* @member {Array.<string>} kmsKeyNames
|
|
21807
|
+
* @memberof google.spanner.admin.database.v1.CopyBackupEncryptionConfig
|
|
21808
|
+
* @instance
|
|
21809
|
+
*/
|
|
21810
|
+
CopyBackupEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray;
|
|
21811
|
+
|
|
21718
21812
|
/**
|
|
21719
21813
|
* Creates a new CopyBackupEncryptionConfig instance using the specified properties.
|
|
21720
21814
|
* @function create
|
|
@@ -21743,6 +21837,9 @@
|
|
|
21743
21837
|
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType);
|
|
21744
21838
|
if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
|
|
21745
21839
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName);
|
|
21840
|
+
if (message.kmsKeyNames != null && message.kmsKeyNames.length)
|
|
21841
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
21842
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]);
|
|
21746
21843
|
return writer;
|
|
21747
21844
|
};
|
|
21748
21845
|
|
|
@@ -21785,6 +21882,12 @@
|
|
|
21785
21882
|
message.kmsKeyName = reader.string();
|
|
21786
21883
|
break;
|
|
21787
21884
|
}
|
|
21885
|
+
case 3: {
|
|
21886
|
+
if (!(message.kmsKeyNames && message.kmsKeyNames.length))
|
|
21887
|
+
message.kmsKeyNames = [];
|
|
21888
|
+
message.kmsKeyNames.push(reader.string());
|
|
21889
|
+
break;
|
|
21890
|
+
}
|
|
21788
21891
|
default:
|
|
21789
21892
|
reader.skipType(tag & 7);
|
|
21790
21893
|
break;
|
|
@@ -21833,6 +21936,13 @@
|
|
|
21833
21936
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
21834
21937
|
if (!$util.isString(message.kmsKeyName))
|
|
21835
21938
|
return "kmsKeyName: string expected";
|
|
21939
|
+
if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) {
|
|
21940
|
+
if (!Array.isArray(message.kmsKeyNames))
|
|
21941
|
+
return "kmsKeyNames: array expected";
|
|
21942
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
21943
|
+
if (!$util.isString(message.kmsKeyNames[i]))
|
|
21944
|
+
return "kmsKeyNames: string[] expected";
|
|
21945
|
+
}
|
|
21836
21946
|
return null;
|
|
21837
21947
|
};
|
|
21838
21948
|
|
|
@@ -21874,6 +21984,13 @@
|
|
|
21874
21984
|
}
|
|
21875
21985
|
if (object.kmsKeyName != null)
|
|
21876
21986
|
message.kmsKeyName = String(object.kmsKeyName);
|
|
21987
|
+
if (object.kmsKeyNames) {
|
|
21988
|
+
if (!Array.isArray(object.kmsKeyNames))
|
|
21989
|
+
throw TypeError(".google.spanner.admin.database.v1.CopyBackupEncryptionConfig.kmsKeyNames: array expected");
|
|
21990
|
+
message.kmsKeyNames = [];
|
|
21991
|
+
for (var i = 0; i < object.kmsKeyNames.length; ++i)
|
|
21992
|
+
message.kmsKeyNames[i] = String(object.kmsKeyNames[i]);
|
|
21993
|
+
}
|
|
21877
21994
|
return message;
|
|
21878
21995
|
};
|
|
21879
21996
|
|
|
@@ -21890,6 +22007,8 @@
|
|
|
21890
22007
|
if (!options)
|
|
21891
22008
|
options = {};
|
|
21892
22009
|
var object = {};
|
|
22010
|
+
if (options.arrays || options.defaults)
|
|
22011
|
+
object.kmsKeyNames = [];
|
|
21893
22012
|
if (options.defaults) {
|
|
21894
22013
|
object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0;
|
|
21895
22014
|
object.kmsKeyName = "";
|
|
@@ -21898,6 +22017,11 @@
|
|
|
21898
22017
|
object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.CopyBackupEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType;
|
|
21899
22018
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
21900
22019
|
object.kmsKeyName = message.kmsKeyName;
|
|
22020
|
+
if (message.kmsKeyNames && message.kmsKeyNames.length) {
|
|
22021
|
+
object.kmsKeyNames = [];
|
|
22022
|
+
for (var j = 0; j < message.kmsKeyNames.length; ++j)
|
|
22023
|
+
object.kmsKeyNames[j] = message.kmsKeyNames[j];
|
|
22024
|
+
}
|
|
21901
22025
|
return object;
|
|
21902
22026
|
};
|
|
21903
22027
|
|
|
@@ -22215,6 +22339,7 @@
|
|
|
22215
22339
|
* @memberof google.spanner.admin.database.v1
|
|
22216
22340
|
* @interface IEncryptionConfig
|
|
22217
22341
|
* @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName
|
|
22342
|
+
* @property {Array.<string>|null} [kmsKeyNames] EncryptionConfig kmsKeyNames
|
|
22218
22343
|
*/
|
|
22219
22344
|
|
|
22220
22345
|
/**
|
|
@@ -22226,6 +22351,7 @@
|
|
|
22226
22351
|
* @param {google.spanner.admin.database.v1.IEncryptionConfig=} [properties] Properties to set
|
|
22227
22352
|
*/
|
|
22228
22353
|
function EncryptionConfig(properties) {
|
|
22354
|
+
this.kmsKeyNames = [];
|
|
22229
22355
|
if (properties)
|
|
22230
22356
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
22231
22357
|
if (properties[keys[i]] != null)
|
|
@@ -22240,6 +22366,14 @@
|
|
|
22240
22366
|
*/
|
|
22241
22367
|
EncryptionConfig.prototype.kmsKeyName = "";
|
|
22242
22368
|
|
|
22369
|
+
/**
|
|
22370
|
+
* EncryptionConfig kmsKeyNames.
|
|
22371
|
+
* @member {Array.<string>} kmsKeyNames
|
|
22372
|
+
* @memberof google.spanner.admin.database.v1.EncryptionConfig
|
|
22373
|
+
* @instance
|
|
22374
|
+
*/
|
|
22375
|
+
EncryptionConfig.prototype.kmsKeyNames = $util.emptyArray;
|
|
22376
|
+
|
|
22243
22377
|
/**
|
|
22244
22378
|
* Creates a new EncryptionConfig instance using the specified properties.
|
|
22245
22379
|
* @function create
|
|
@@ -22266,6 +22400,9 @@
|
|
|
22266
22400
|
writer = $Writer.create();
|
|
22267
22401
|
if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
|
|
22268
22402
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName);
|
|
22403
|
+
if (message.kmsKeyNames != null && message.kmsKeyNames.length)
|
|
22404
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
22405
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]);
|
|
22269
22406
|
return writer;
|
|
22270
22407
|
};
|
|
22271
22408
|
|
|
@@ -22304,6 +22441,12 @@
|
|
|
22304
22441
|
message.kmsKeyName = reader.string();
|
|
22305
22442
|
break;
|
|
22306
22443
|
}
|
|
22444
|
+
case 3: {
|
|
22445
|
+
if (!(message.kmsKeyNames && message.kmsKeyNames.length))
|
|
22446
|
+
message.kmsKeyNames = [];
|
|
22447
|
+
message.kmsKeyNames.push(reader.string());
|
|
22448
|
+
break;
|
|
22449
|
+
}
|
|
22307
22450
|
default:
|
|
22308
22451
|
reader.skipType(tag & 7);
|
|
22309
22452
|
break;
|
|
@@ -22342,6 +22485,13 @@
|
|
|
22342
22485
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
22343
22486
|
if (!$util.isString(message.kmsKeyName))
|
|
22344
22487
|
return "kmsKeyName: string expected";
|
|
22488
|
+
if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) {
|
|
22489
|
+
if (!Array.isArray(message.kmsKeyNames))
|
|
22490
|
+
return "kmsKeyNames: array expected";
|
|
22491
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
22492
|
+
if (!$util.isString(message.kmsKeyNames[i]))
|
|
22493
|
+
return "kmsKeyNames: string[] expected";
|
|
22494
|
+
}
|
|
22345
22495
|
return null;
|
|
22346
22496
|
};
|
|
22347
22497
|
|
|
@@ -22359,6 +22509,13 @@
|
|
|
22359
22509
|
var message = new $root.google.spanner.admin.database.v1.EncryptionConfig();
|
|
22360
22510
|
if (object.kmsKeyName != null)
|
|
22361
22511
|
message.kmsKeyName = String(object.kmsKeyName);
|
|
22512
|
+
if (object.kmsKeyNames) {
|
|
22513
|
+
if (!Array.isArray(object.kmsKeyNames))
|
|
22514
|
+
throw TypeError(".google.spanner.admin.database.v1.EncryptionConfig.kmsKeyNames: array expected");
|
|
22515
|
+
message.kmsKeyNames = [];
|
|
22516
|
+
for (var i = 0; i < object.kmsKeyNames.length; ++i)
|
|
22517
|
+
message.kmsKeyNames[i] = String(object.kmsKeyNames[i]);
|
|
22518
|
+
}
|
|
22362
22519
|
return message;
|
|
22363
22520
|
};
|
|
22364
22521
|
|
|
@@ -22375,10 +22532,17 @@
|
|
|
22375
22532
|
if (!options)
|
|
22376
22533
|
options = {};
|
|
22377
22534
|
var object = {};
|
|
22535
|
+
if (options.arrays || options.defaults)
|
|
22536
|
+
object.kmsKeyNames = [];
|
|
22378
22537
|
if (options.defaults)
|
|
22379
22538
|
object.kmsKeyName = "";
|
|
22380
22539
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
22381
22540
|
object.kmsKeyName = message.kmsKeyName;
|
|
22541
|
+
if (message.kmsKeyNames && message.kmsKeyNames.length) {
|
|
22542
|
+
object.kmsKeyNames = [];
|
|
22543
|
+
for (var j = 0; j < message.kmsKeyNames.length; ++j)
|
|
22544
|
+
object.kmsKeyNames[j] = message.kmsKeyNames[j];
|
|
22545
|
+
}
|
|
22382
22546
|
return object;
|
|
22383
22547
|
};
|
|
22384
22548
|
|
|
@@ -28487,6 +28651,7 @@
|
|
|
28487
28651
|
* @interface IRestoreDatabaseEncryptionConfig
|
|
28488
28652
|
* @property {google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType|null} [encryptionType] RestoreDatabaseEncryptionConfig encryptionType
|
|
28489
28653
|
* @property {string|null} [kmsKeyName] RestoreDatabaseEncryptionConfig kmsKeyName
|
|
28654
|
+
* @property {Array.<string>|null} [kmsKeyNames] RestoreDatabaseEncryptionConfig kmsKeyNames
|
|
28490
28655
|
*/
|
|
28491
28656
|
|
|
28492
28657
|
/**
|
|
@@ -28498,6 +28663,7 @@
|
|
|
28498
28663
|
* @param {google.spanner.admin.database.v1.IRestoreDatabaseEncryptionConfig=} [properties] Properties to set
|
|
28499
28664
|
*/
|
|
28500
28665
|
function RestoreDatabaseEncryptionConfig(properties) {
|
|
28666
|
+
this.kmsKeyNames = [];
|
|
28501
28667
|
if (properties)
|
|
28502
28668
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
28503
28669
|
if (properties[keys[i]] != null)
|
|
@@ -28520,6 +28686,14 @@
|
|
|
28520
28686
|
*/
|
|
28521
28687
|
RestoreDatabaseEncryptionConfig.prototype.kmsKeyName = "";
|
|
28522
28688
|
|
|
28689
|
+
/**
|
|
28690
|
+
* RestoreDatabaseEncryptionConfig kmsKeyNames.
|
|
28691
|
+
* @member {Array.<string>} kmsKeyNames
|
|
28692
|
+
* @memberof google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig
|
|
28693
|
+
* @instance
|
|
28694
|
+
*/
|
|
28695
|
+
RestoreDatabaseEncryptionConfig.prototype.kmsKeyNames = $util.emptyArray;
|
|
28696
|
+
|
|
28523
28697
|
/**
|
|
28524
28698
|
* Creates a new RestoreDatabaseEncryptionConfig instance using the specified properties.
|
|
28525
28699
|
* @function create
|
|
@@ -28548,6 +28722,9 @@
|
|
|
28548
28722
|
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.encryptionType);
|
|
28549
28723
|
if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName"))
|
|
28550
28724
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKeyName);
|
|
28725
|
+
if (message.kmsKeyNames != null && message.kmsKeyNames.length)
|
|
28726
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
28727
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.kmsKeyNames[i]);
|
|
28551
28728
|
return writer;
|
|
28552
28729
|
};
|
|
28553
28730
|
|
|
@@ -28590,6 +28767,12 @@
|
|
|
28590
28767
|
message.kmsKeyName = reader.string();
|
|
28591
28768
|
break;
|
|
28592
28769
|
}
|
|
28770
|
+
case 3: {
|
|
28771
|
+
if (!(message.kmsKeyNames && message.kmsKeyNames.length))
|
|
28772
|
+
message.kmsKeyNames = [];
|
|
28773
|
+
message.kmsKeyNames.push(reader.string());
|
|
28774
|
+
break;
|
|
28775
|
+
}
|
|
28593
28776
|
default:
|
|
28594
28777
|
reader.skipType(tag & 7);
|
|
28595
28778
|
break;
|
|
@@ -28638,6 +28821,13 @@
|
|
|
28638
28821
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
28639
28822
|
if (!$util.isString(message.kmsKeyName))
|
|
28640
28823
|
return "kmsKeyName: string expected";
|
|
28824
|
+
if (message.kmsKeyNames != null && message.hasOwnProperty("kmsKeyNames")) {
|
|
28825
|
+
if (!Array.isArray(message.kmsKeyNames))
|
|
28826
|
+
return "kmsKeyNames: array expected";
|
|
28827
|
+
for (var i = 0; i < message.kmsKeyNames.length; ++i)
|
|
28828
|
+
if (!$util.isString(message.kmsKeyNames[i]))
|
|
28829
|
+
return "kmsKeyNames: string[] expected";
|
|
28830
|
+
}
|
|
28641
28831
|
return null;
|
|
28642
28832
|
};
|
|
28643
28833
|
|
|
@@ -28679,6 +28869,13 @@
|
|
|
28679
28869
|
}
|
|
28680
28870
|
if (object.kmsKeyName != null)
|
|
28681
28871
|
message.kmsKeyName = String(object.kmsKeyName);
|
|
28872
|
+
if (object.kmsKeyNames) {
|
|
28873
|
+
if (!Array.isArray(object.kmsKeyNames))
|
|
28874
|
+
throw TypeError(".google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.kmsKeyNames: array expected");
|
|
28875
|
+
message.kmsKeyNames = [];
|
|
28876
|
+
for (var i = 0; i < object.kmsKeyNames.length; ++i)
|
|
28877
|
+
message.kmsKeyNames[i] = String(object.kmsKeyNames[i]);
|
|
28878
|
+
}
|
|
28682
28879
|
return message;
|
|
28683
28880
|
};
|
|
28684
28881
|
|
|
@@ -28695,6 +28892,8 @@
|
|
|
28695
28892
|
if (!options)
|
|
28696
28893
|
options = {};
|
|
28697
28894
|
var object = {};
|
|
28895
|
+
if (options.arrays || options.defaults)
|
|
28896
|
+
object.kmsKeyNames = [];
|
|
28698
28897
|
if (options.defaults) {
|
|
28699
28898
|
object.encryptionType = options.enums === String ? "ENCRYPTION_TYPE_UNSPECIFIED" : 0;
|
|
28700
28899
|
object.kmsKeyName = "";
|
|
@@ -28703,6 +28902,11 @@
|
|
|
28703
28902
|
object.encryptionType = options.enums === String ? $root.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType[message.encryptionType] === undefined ? message.encryptionType : $root.google.spanner.admin.database.v1.RestoreDatabaseEncryptionConfig.EncryptionType[message.encryptionType] : message.encryptionType;
|
|
28704
28903
|
if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName"))
|
|
28705
28904
|
object.kmsKeyName = message.kmsKeyName;
|
|
28905
|
+
if (message.kmsKeyNames && message.kmsKeyNames.length) {
|
|
28906
|
+
object.kmsKeyNames = [];
|
|
28907
|
+
for (var j = 0; j < message.kmsKeyNames.length; ++j)
|
|
28908
|
+
object.kmsKeyNames[j] = message.kmsKeyNames[j];
|
|
28909
|
+
}
|
|
28706
28910
|
return object;
|
|
28707
28911
|
};
|
|
28708
28912
|
|