@google-cloud/spanner 7.11.0 → 7.13.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 +19 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +43 -0
- package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +3 -0
- package/build/protos/protos.d.ts +122 -1
- package/build/protos/protos.js +337 -2
- package/build/protos/protos.json +37 -1
- package/build/src/index.js +3 -0
- package/build/src/transaction.js +13 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
|
|
6
6
|
|
|
7
|
+
## [7.13.0](https://github.com/googleapis/nodejs-spanner/compare/v7.12.0...v7.13.0) (2024-08-09)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **spanner:** Add support for Cloud Spanner Incremental Backups ([#2085](https://github.com/googleapis/nodejs-spanner/issues/2085)) ([33b9645](https://github.com/googleapis/nodejs-spanner/commit/33b9645d6096e0d77d30fab6aadf5d92da973a67))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Unhandled exception error catch ([#2091](https://github.com/googleapis/nodejs-spanner/issues/2091)) ([e277752](https://github.com/googleapis/nodejs-spanner/commit/e277752fad961908e37e37d88d7b6a61d61a078e))
|
|
18
|
+
|
|
19
|
+
## [7.12.0](https://github.com/googleapis/nodejs-spanner/compare/v7.11.0...v7.12.0) (2024-08-02)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* Grpc keep alive settings ([#2086](https://github.com/googleapis/nodejs-spanner/issues/2086)) ([7712c35](https://github.com/googleapis/nodejs-spanner/commit/7712c35be21863015bb709f5f89d9ef0bb656024))
|
|
25
|
+
|
|
7
26
|
## [7.11.0](https://github.com/googleapis/nodejs-spanner/compare/v7.10.0...v7.11.0) (2024-07-29)
|
|
8
27
|
|
|
9
28
|
|
|
@@ -103,6 +103,24 @@ message Backup {
|
|
|
103
103
|
// Output only. Size of the backup in bytes.
|
|
104
104
|
int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
105
105
|
|
|
106
|
+
// Output only. The number of bytes that will be freed by deleting this
|
|
107
|
+
// backup. This value will be zero if, for example, this backup is part of an
|
|
108
|
+
// incremental backup chain and younger backups in the chain require that we
|
|
109
|
+
// keep its data. For backups not in an incremental backup chain, this is
|
|
110
|
+
// always the size of the backup. This value may change if backups on the same
|
|
111
|
+
// chain get created, deleted or expired.
|
|
112
|
+
int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
113
|
+
|
|
114
|
+
// Output only. For a backup in an incremental backup chain, this is the
|
|
115
|
+
// storage space needed to keep the data that has changed since the previous
|
|
116
|
+
// backup. For all other backups, this is always the size of the backup. This
|
|
117
|
+
// value may change if backups on the same chain get deleted or expired.
|
|
118
|
+
//
|
|
119
|
+
// This field can be used to calculate the total storage space used by a set
|
|
120
|
+
// of backups. For example, the total space used by all backups of a database
|
|
121
|
+
// can be computed by summing up this field.
|
|
122
|
+
int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
123
|
+
|
|
106
124
|
// Output only. The current state of the backup.
|
|
107
125
|
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
108
126
|
|
|
@@ -168,6 +186,23 @@ message Backup {
|
|
|
168
186
|
// single backup schedule URI associated with creating this backup.
|
|
169
187
|
repeated string backup_schedules = 14
|
|
170
188
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
189
|
+
|
|
190
|
+
// Output only. Populated only for backups in an incremental backup chain.
|
|
191
|
+
// Backups share the same chain id if and only if they belong to the same
|
|
192
|
+
// incremental backup chain. Use this field to determine which backups are
|
|
193
|
+
// part of the same incremental backup chain. The ordering of backups in the
|
|
194
|
+
// chain can be determined by ordering the backup `version_time`.
|
|
195
|
+
string incremental_backup_chain_id = 17
|
|
196
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
197
|
+
|
|
198
|
+
// Output only. Data deleted at a time older than this is guaranteed not to be
|
|
199
|
+
// retained in order to support this backup. For a backup in an incremental
|
|
200
|
+
// backup chain, this is the version time of the oldest backup that exists or
|
|
201
|
+
// ever existed in the chain. For all other backups, this is the version time
|
|
202
|
+
// of the backup. This field can be used to understand what data is being
|
|
203
|
+
// retained by the backup system.
|
|
204
|
+
google.protobuf.Timestamp oldest_version_time = 18
|
|
205
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
171
206
|
}
|
|
172
207
|
|
|
173
208
|
// The request for
|
|
@@ -705,3 +740,11 @@ message CopyBackupEncryptionConfig {
|
|
|
705
740
|
// A full backup stores the entire contents of the database at a given
|
|
706
741
|
// version time.
|
|
707
742
|
message FullBackupSpec {}
|
|
743
|
+
|
|
744
|
+
// The specification for incremental backup chains.
|
|
745
|
+
// An incremental backup stores the delta of changes between a previous
|
|
746
|
+
// backup and the database contents at a given version time. An
|
|
747
|
+
// incremental backup chain consists of a full backup and zero or more
|
|
748
|
+
// successive incremental backups. The first backup created for an
|
|
749
|
+
// incremental backup chain is always a full backup.
|
|
750
|
+
message IncrementalBackupSpec {}
|
|
@@ -83,6 +83,9 @@ message BackupSchedule {
|
|
|
83
83
|
oneof backup_type_spec {
|
|
84
84
|
// The schedule creates only full backups.
|
|
85
85
|
FullBackupSpec full_backup_spec = 7;
|
|
86
|
+
|
|
87
|
+
// The schedule creates incremental backup chains.
|
|
88
|
+
IncrementalBackupSpec incremental_backup_spec = 8;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
// Output only. The timestamp at which the schedule was last updated.
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -6549,6 +6549,12 @@ export namespace google {
|
|
|
6549
6549
|
/** Backup sizeBytes */
|
|
6550
6550
|
sizeBytes?: (number|Long|string|null);
|
|
6551
6551
|
|
|
6552
|
+
/** Backup freeableSizeBytes */
|
|
6553
|
+
freeableSizeBytes?: (number|Long|string|null);
|
|
6554
|
+
|
|
6555
|
+
/** Backup exclusiveSizeBytes */
|
|
6556
|
+
exclusiveSizeBytes?: (number|Long|string|null);
|
|
6557
|
+
|
|
6552
6558
|
/** Backup state */
|
|
6553
6559
|
state?: (google.spanner.admin.database.v1.Backup.State|keyof typeof google.spanner.admin.database.v1.Backup.State|null);
|
|
6554
6560
|
|
|
@@ -6572,6 +6578,12 @@ export namespace google {
|
|
|
6572
6578
|
|
|
6573
6579
|
/** Backup backupSchedules */
|
|
6574
6580
|
backupSchedules?: (string[]|null);
|
|
6581
|
+
|
|
6582
|
+
/** Backup incrementalBackupChainId */
|
|
6583
|
+
incrementalBackupChainId?: (string|null);
|
|
6584
|
+
|
|
6585
|
+
/** Backup oldestVersionTime */
|
|
6586
|
+
oldestVersionTime?: (google.protobuf.ITimestamp|null);
|
|
6575
6587
|
}
|
|
6576
6588
|
|
|
6577
6589
|
/** Represents a Backup. */
|
|
@@ -6601,6 +6613,12 @@ export namespace google {
|
|
|
6601
6613
|
/** Backup sizeBytes. */
|
|
6602
6614
|
public sizeBytes: (number|Long|string);
|
|
6603
6615
|
|
|
6616
|
+
/** Backup freeableSizeBytes. */
|
|
6617
|
+
public freeableSizeBytes: (number|Long|string);
|
|
6618
|
+
|
|
6619
|
+
/** Backup exclusiveSizeBytes. */
|
|
6620
|
+
public exclusiveSizeBytes: (number|Long|string);
|
|
6621
|
+
|
|
6604
6622
|
/** Backup state. */
|
|
6605
6623
|
public state: (google.spanner.admin.database.v1.Backup.State|keyof typeof google.spanner.admin.database.v1.Backup.State);
|
|
6606
6624
|
|
|
@@ -6625,6 +6643,12 @@ export namespace google {
|
|
|
6625
6643
|
/** Backup backupSchedules. */
|
|
6626
6644
|
public backupSchedules: string[];
|
|
6627
6645
|
|
|
6646
|
+
/** Backup incrementalBackupChainId. */
|
|
6647
|
+
public incrementalBackupChainId: string;
|
|
6648
|
+
|
|
6649
|
+
/** Backup oldestVersionTime. */
|
|
6650
|
+
public oldestVersionTime?: (google.protobuf.ITimestamp|null);
|
|
6651
|
+
|
|
6628
6652
|
/**
|
|
6629
6653
|
* Creates a new Backup instance using the specified properties.
|
|
6630
6654
|
* @param [properties] Properties to set
|
|
@@ -8358,6 +8382,97 @@ export namespace google {
|
|
|
8358
8382
|
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
8359
8383
|
}
|
|
8360
8384
|
|
|
8385
|
+
/** Properties of an IncrementalBackupSpec. */
|
|
8386
|
+
interface IIncrementalBackupSpec {
|
|
8387
|
+
}
|
|
8388
|
+
|
|
8389
|
+
/** Represents an IncrementalBackupSpec. */
|
|
8390
|
+
class IncrementalBackupSpec implements IIncrementalBackupSpec {
|
|
8391
|
+
|
|
8392
|
+
/**
|
|
8393
|
+
* Constructs a new IncrementalBackupSpec.
|
|
8394
|
+
* @param [properties] Properties to set
|
|
8395
|
+
*/
|
|
8396
|
+
constructor(properties?: google.spanner.admin.database.v1.IIncrementalBackupSpec);
|
|
8397
|
+
|
|
8398
|
+
/**
|
|
8399
|
+
* Creates a new IncrementalBackupSpec instance using the specified properties.
|
|
8400
|
+
* @param [properties] Properties to set
|
|
8401
|
+
* @returns IncrementalBackupSpec instance
|
|
8402
|
+
*/
|
|
8403
|
+
public static create(properties?: google.spanner.admin.database.v1.IIncrementalBackupSpec): google.spanner.admin.database.v1.IncrementalBackupSpec;
|
|
8404
|
+
|
|
8405
|
+
/**
|
|
8406
|
+
* Encodes the specified IncrementalBackupSpec message. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages.
|
|
8407
|
+
* @param message IncrementalBackupSpec message or plain object to encode
|
|
8408
|
+
* @param [writer] Writer to encode to
|
|
8409
|
+
* @returns Writer
|
|
8410
|
+
*/
|
|
8411
|
+
public static encode(message: google.spanner.admin.database.v1.IIncrementalBackupSpec, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
8412
|
+
|
|
8413
|
+
/**
|
|
8414
|
+
* Encodes the specified IncrementalBackupSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages.
|
|
8415
|
+
* @param message IncrementalBackupSpec message or plain object to encode
|
|
8416
|
+
* @param [writer] Writer to encode to
|
|
8417
|
+
* @returns Writer
|
|
8418
|
+
*/
|
|
8419
|
+
public static encodeDelimited(message: google.spanner.admin.database.v1.IIncrementalBackupSpec, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
8420
|
+
|
|
8421
|
+
/**
|
|
8422
|
+
* Decodes an IncrementalBackupSpec message from the specified reader or buffer.
|
|
8423
|
+
* @param reader Reader or buffer to decode from
|
|
8424
|
+
* @param [length] Message length if known beforehand
|
|
8425
|
+
* @returns IncrementalBackupSpec
|
|
8426
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8427
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8428
|
+
*/
|
|
8429
|
+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.database.v1.IncrementalBackupSpec;
|
|
8430
|
+
|
|
8431
|
+
/**
|
|
8432
|
+
* Decodes an IncrementalBackupSpec message from the specified reader or buffer, length delimited.
|
|
8433
|
+
* @param reader Reader or buffer to decode from
|
|
8434
|
+
* @returns IncrementalBackupSpec
|
|
8435
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
8436
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
8437
|
+
*/
|
|
8438
|
+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.database.v1.IncrementalBackupSpec;
|
|
8439
|
+
|
|
8440
|
+
/**
|
|
8441
|
+
* Verifies an IncrementalBackupSpec message.
|
|
8442
|
+
* @param message Plain object to verify
|
|
8443
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
8444
|
+
*/
|
|
8445
|
+
public static verify(message: { [k: string]: any }): (string|null);
|
|
8446
|
+
|
|
8447
|
+
/**
|
|
8448
|
+
* Creates an IncrementalBackupSpec message from a plain object. Also converts values to their respective internal types.
|
|
8449
|
+
* @param object Plain object
|
|
8450
|
+
* @returns IncrementalBackupSpec
|
|
8451
|
+
*/
|
|
8452
|
+
public static fromObject(object: { [k: string]: any }): google.spanner.admin.database.v1.IncrementalBackupSpec;
|
|
8453
|
+
|
|
8454
|
+
/**
|
|
8455
|
+
* Creates a plain object from an IncrementalBackupSpec message. Also converts values to other types if specified.
|
|
8456
|
+
* @param message IncrementalBackupSpec
|
|
8457
|
+
* @param [options] Conversion options
|
|
8458
|
+
* @returns Plain object
|
|
8459
|
+
*/
|
|
8460
|
+
public static toObject(message: google.spanner.admin.database.v1.IncrementalBackupSpec, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
8461
|
+
|
|
8462
|
+
/**
|
|
8463
|
+
* Converts this IncrementalBackupSpec to JSON.
|
|
8464
|
+
* @returns JSON object
|
|
8465
|
+
*/
|
|
8466
|
+
public toJSON(): { [k: string]: any };
|
|
8467
|
+
|
|
8468
|
+
/**
|
|
8469
|
+
* Gets the default type url for IncrementalBackupSpec
|
|
8470
|
+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
8471
|
+
* @returns The default type url
|
|
8472
|
+
*/
|
|
8473
|
+
public static getTypeUrl(typeUrlPrefix?: string): string;
|
|
8474
|
+
}
|
|
8475
|
+
|
|
8361
8476
|
/** Properties of an OperationProgress. */
|
|
8362
8477
|
interface IOperationProgress {
|
|
8363
8478
|
|
|
@@ -8814,6 +8929,9 @@ export namespace google {
|
|
|
8814
8929
|
/** BackupSchedule fullBackupSpec */
|
|
8815
8930
|
fullBackupSpec?: (google.spanner.admin.database.v1.IFullBackupSpec|null);
|
|
8816
8931
|
|
|
8932
|
+
/** BackupSchedule incrementalBackupSpec */
|
|
8933
|
+
incrementalBackupSpec?: (google.spanner.admin.database.v1.IIncrementalBackupSpec|null);
|
|
8934
|
+
|
|
8817
8935
|
/** BackupSchedule updateTime */
|
|
8818
8936
|
updateTime?: (google.protobuf.ITimestamp|null);
|
|
8819
8937
|
}
|
|
@@ -8842,11 +8960,14 @@ export namespace google {
|
|
|
8842
8960
|
/** BackupSchedule fullBackupSpec. */
|
|
8843
8961
|
public fullBackupSpec?: (google.spanner.admin.database.v1.IFullBackupSpec|null);
|
|
8844
8962
|
|
|
8963
|
+
/** BackupSchedule incrementalBackupSpec. */
|
|
8964
|
+
public incrementalBackupSpec?: (google.spanner.admin.database.v1.IIncrementalBackupSpec|null);
|
|
8965
|
+
|
|
8845
8966
|
/** BackupSchedule updateTime. */
|
|
8846
8967
|
public updateTime?: (google.protobuf.ITimestamp|null);
|
|
8847
8968
|
|
|
8848
8969
|
/** BackupSchedule backupTypeSpec. */
|
|
8849
|
-
public backupTypeSpec?: "fullBackupSpec";
|
|
8970
|
+
public backupTypeSpec?: ("fullBackupSpec"|"incrementalBackupSpec");
|
|
8850
8971
|
|
|
8851
8972
|
/**
|
|
8852
8973
|
* Creates a new BackupSchedule instance using the specified properties.
|
package/build/protos/protos.js
CHANGED
|
@@ -17695,6 +17695,8 @@
|
|
|
17695
17695
|
* @property {string|null} [name] Backup name
|
|
17696
17696
|
* @property {google.protobuf.ITimestamp|null} [createTime] Backup createTime
|
|
17697
17697
|
* @property {number|Long|null} [sizeBytes] Backup sizeBytes
|
|
17698
|
+
* @property {number|Long|null} [freeableSizeBytes] Backup freeableSizeBytes
|
|
17699
|
+
* @property {number|Long|null} [exclusiveSizeBytes] Backup exclusiveSizeBytes
|
|
17698
17700
|
* @property {google.spanner.admin.database.v1.Backup.State|null} [state] Backup state
|
|
17699
17701
|
* @property {Array.<string>|null} [referencingDatabases] Backup referencingDatabases
|
|
17700
17702
|
* @property {google.spanner.admin.database.v1.IEncryptionInfo|null} [encryptionInfo] Backup encryptionInfo
|
|
@@ -17703,6 +17705,8 @@
|
|
|
17703
17705
|
* @property {Array.<string>|null} [referencingBackups] Backup referencingBackups
|
|
17704
17706
|
* @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime
|
|
17705
17707
|
* @property {Array.<string>|null} [backupSchedules] Backup backupSchedules
|
|
17708
|
+
* @property {string|null} [incrementalBackupChainId] Backup incrementalBackupChainId
|
|
17709
|
+
* @property {google.protobuf.ITimestamp|null} [oldestVersionTime] Backup oldestVersionTime
|
|
17706
17710
|
*/
|
|
17707
17711
|
|
|
17708
17712
|
/**
|
|
@@ -17772,6 +17776,22 @@
|
|
|
17772
17776
|
*/
|
|
17773
17777
|
Backup.prototype.sizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
17774
17778
|
|
|
17779
|
+
/**
|
|
17780
|
+
* Backup freeableSizeBytes.
|
|
17781
|
+
* @member {number|Long} freeableSizeBytes
|
|
17782
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17783
|
+
* @instance
|
|
17784
|
+
*/
|
|
17785
|
+
Backup.prototype.freeableSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
17786
|
+
|
|
17787
|
+
/**
|
|
17788
|
+
* Backup exclusiveSizeBytes.
|
|
17789
|
+
* @member {number|Long} exclusiveSizeBytes
|
|
17790
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17791
|
+
* @instance
|
|
17792
|
+
*/
|
|
17793
|
+
Backup.prototype.exclusiveSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
17794
|
+
|
|
17775
17795
|
/**
|
|
17776
17796
|
* Backup state.
|
|
17777
17797
|
* @member {google.spanner.admin.database.v1.Backup.State} state
|
|
@@ -17836,6 +17856,22 @@
|
|
|
17836
17856
|
*/
|
|
17837
17857
|
Backup.prototype.backupSchedules = $util.emptyArray;
|
|
17838
17858
|
|
|
17859
|
+
/**
|
|
17860
|
+
* Backup incrementalBackupChainId.
|
|
17861
|
+
* @member {string} incrementalBackupChainId
|
|
17862
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17863
|
+
* @instance
|
|
17864
|
+
*/
|
|
17865
|
+
Backup.prototype.incrementalBackupChainId = "";
|
|
17866
|
+
|
|
17867
|
+
/**
|
|
17868
|
+
* Backup oldestVersionTime.
|
|
17869
|
+
* @member {google.protobuf.ITimestamp|null|undefined} oldestVersionTime
|
|
17870
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17871
|
+
* @instance
|
|
17872
|
+
*/
|
|
17873
|
+
Backup.prototype.oldestVersionTime = null;
|
|
17874
|
+
|
|
17839
17875
|
/**
|
|
17840
17876
|
* Creates a new Backup instance using the specified properties.
|
|
17841
17877
|
* @function create
|
|
@@ -17892,6 +17928,14 @@
|
|
|
17892
17928
|
if (message.backupSchedules != null && message.backupSchedules.length)
|
|
17893
17929
|
for (var i = 0; i < message.backupSchedules.length; ++i)
|
|
17894
17930
|
writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupSchedules[i]);
|
|
17931
|
+
if (message.freeableSizeBytes != null && Object.hasOwnProperty.call(message, "freeableSizeBytes"))
|
|
17932
|
+
writer.uint32(/* id 15, wireType 0 =*/120).int64(message.freeableSizeBytes);
|
|
17933
|
+
if (message.exclusiveSizeBytes != null && Object.hasOwnProperty.call(message, "exclusiveSizeBytes"))
|
|
17934
|
+
writer.uint32(/* id 16, wireType 0 =*/128).int64(message.exclusiveSizeBytes);
|
|
17935
|
+
if (message.incrementalBackupChainId != null && Object.hasOwnProperty.call(message, "incrementalBackupChainId"))
|
|
17936
|
+
writer.uint32(/* id 17, wireType 2 =*/138).string(message.incrementalBackupChainId);
|
|
17937
|
+
if (message.oldestVersionTime != null && Object.hasOwnProperty.call(message, "oldestVersionTime"))
|
|
17938
|
+
$root.google.protobuf.Timestamp.encode(message.oldestVersionTime, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
|
|
17895
17939
|
return writer;
|
|
17896
17940
|
};
|
|
17897
17941
|
|
|
@@ -17950,6 +17994,14 @@
|
|
|
17950
17994
|
message.sizeBytes = reader.int64();
|
|
17951
17995
|
break;
|
|
17952
17996
|
}
|
|
17997
|
+
case 15: {
|
|
17998
|
+
message.freeableSizeBytes = reader.int64();
|
|
17999
|
+
break;
|
|
18000
|
+
}
|
|
18001
|
+
case 16: {
|
|
18002
|
+
message.exclusiveSizeBytes = reader.int64();
|
|
18003
|
+
break;
|
|
18004
|
+
}
|
|
17953
18005
|
case 6: {
|
|
17954
18006
|
message.state = reader.int32();
|
|
17955
18007
|
break;
|
|
@@ -17990,6 +18042,14 @@
|
|
|
17990
18042
|
message.backupSchedules.push(reader.string());
|
|
17991
18043
|
break;
|
|
17992
18044
|
}
|
|
18045
|
+
case 17: {
|
|
18046
|
+
message.incrementalBackupChainId = reader.string();
|
|
18047
|
+
break;
|
|
18048
|
+
}
|
|
18049
|
+
case 18: {
|
|
18050
|
+
message.oldestVersionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
18051
|
+
break;
|
|
18052
|
+
}
|
|
17993
18053
|
default:
|
|
17994
18054
|
reader.skipType(tag & 7);
|
|
17995
18055
|
break;
|
|
@@ -18049,6 +18109,12 @@
|
|
|
18049
18109
|
if (message.sizeBytes != null && message.hasOwnProperty("sizeBytes"))
|
|
18050
18110
|
if (!$util.isInteger(message.sizeBytes) && !(message.sizeBytes && $util.isInteger(message.sizeBytes.low) && $util.isInteger(message.sizeBytes.high)))
|
|
18051
18111
|
return "sizeBytes: integer|Long expected";
|
|
18112
|
+
if (message.freeableSizeBytes != null && message.hasOwnProperty("freeableSizeBytes"))
|
|
18113
|
+
if (!$util.isInteger(message.freeableSizeBytes) && !(message.freeableSizeBytes && $util.isInteger(message.freeableSizeBytes.low) && $util.isInteger(message.freeableSizeBytes.high)))
|
|
18114
|
+
return "freeableSizeBytes: integer|Long expected";
|
|
18115
|
+
if (message.exclusiveSizeBytes != null && message.hasOwnProperty("exclusiveSizeBytes"))
|
|
18116
|
+
if (!$util.isInteger(message.exclusiveSizeBytes) && !(message.exclusiveSizeBytes && $util.isInteger(message.exclusiveSizeBytes.low) && $util.isInteger(message.exclusiveSizeBytes.high)))
|
|
18117
|
+
return "exclusiveSizeBytes: integer|Long expected";
|
|
18052
18118
|
if (message.state != null && message.hasOwnProperty("state"))
|
|
18053
18119
|
switch (message.state) {
|
|
18054
18120
|
default:
|
|
@@ -18107,6 +18173,14 @@
|
|
|
18107
18173
|
if (!$util.isString(message.backupSchedules[i]))
|
|
18108
18174
|
return "backupSchedules: string[] expected";
|
|
18109
18175
|
}
|
|
18176
|
+
if (message.incrementalBackupChainId != null && message.hasOwnProperty("incrementalBackupChainId"))
|
|
18177
|
+
if (!$util.isString(message.incrementalBackupChainId))
|
|
18178
|
+
return "incrementalBackupChainId: string expected";
|
|
18179
|
+
if (message.oldestVersionTime != null && message.hasOwnProperty("oldestVersionTime")) {
|
|
18180
|
+
var error = $root.google.protobuf.Timestamp.verify(message.oldestVersionTime);
|
|
18181
|
+
if (error)
|
|
18182
|
+
return "oldestVersionTime." + error;
|
|
18183
|
+
}
|
|
18110
18184
|
return null;
|
|
18111
18185
|
};
|
|
18112
18186
|
|
|
@@ -18150,6 +18224,24 @@
|
|
|
18150
18224
|
message.sizeBytes = object.sizeBytes;
|
|
18151
18225
|
else if (typeof object.sizeBytes === "object")
|
|
18152
18226
|
message.sizeBytes = new $util.LongBits(object.sizeBytes.low >>> 0, object.sizeBytes.high >>> 0).toNumber();
|
|
18227
|
+
if (object.freeableSizeBytes != null)
|
|
18228
|
+
if ($util.Long)
|
|
18229
|
+
(message.freeableSizeBytes = $util.Long.fromValue(object.freeableSizeBytes)).unsigned = false;
|
|
18230
|
+
else if (typeof object.freeableSizeBytes === "string")
|
|
18231
|
+
message.freeableSizeBytes = parseInt(object.freeableSizeBytes, 10);
|
|
18232
|
+
else if (typeof object.freeableSizeBytes === "number")
|
|
18233
|
+
message.freeableSizeBytes = object.freeableSizeBytes;
|
|
18234
|
+
else if (typeof object.freeableSizeBytes === "object")
|
|
18235
|
+
message.freeableSizeBytes = new $util.LongBits(object.freeableSizeBytes.low >>> 0, object.freeableSizeBytes.high >>> 0).toNumber();
|
|
18236
|
+
if (object.exclusiveSizeBytes != null)
|
|
18237
|
+
if ($util.Long)
|
|
18238
|
+
(message.exclusiveSizeBytes = $util.Long.fromValue(object.exclusiveSizeBytes)).unsigned = false;
|
|
18239
|
+
else if (typeof object.exclusiveSizeBytes === "string")
|
|
18240
|
+
message.exclusiveSizeBytes = parseInt(object.exclusiveSizeBytes, 10);
|
|
18241
|
+
else if (typeof object.exclusiveSizeBytes === "number")
|
|
18242
|
+
message.exclusiveSizeBytes = object.exclusiveSizeBytes;
|
|
18243
|
+
else if (typeof object.exclusiveSizeBytes === "object")
|
|
18244
|
+
message.exclusiveSizeBytes = new $util.LongBits(object.exclusiveSizeBytes.low >>> 0, object.exclusiveSizeBytes.high >>> 0).toNumber();
|
|
18153
18245
|
switch (object.state) {
|
|
18154
18246
|
default:
|
|
18155
18247
|
if (typeof object.state === "number") {
|
|
@@ -18231,6 +18323,13 @@
|
|
|
18231
18323
|
for (var i = 0; i < object.backupSchedules.length; ++i)
|
|
18232
18324
|
message.backupSchedules[i] = String(object.backupSchedules[i]);
|
|
18233
18325
|
}
|
|
18326
|
+
if (object.incrementalBackupChainId != null)
|
|
18327
|
+
message.incrementalBackupChainId = String(object.incrementalBackupChainId);
|
|
18328
|
+
if (object.oldestVersionTime != null) {
|
|
18329
|
+
if (typeof object.oldestVersionTime !== "object")
|
|
18330
|
+
throw TypeError(".google.spanner.admin.database.v1.Backup.oldestVersionTime: object expected");
|
|
18331
|
+
message.oldestVersionTime = $root.google.protobuf.Timestamp.fromObject(object.oldestVersionTime);
|
|
18332
|
+
}
|
|
18234
18333
|
return message;
|
|
18235
18334
|
};
|
|
18236
18335
|
|
|
@@ -18268,6 +18367,18 @@
|
|
|
18268
18367
|
object.versionTime = null;
|
|
18269
18368
|
object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
|
|
18270
18369
|
object.maxExpireTime = null;
|
|
18370
|
+
if ($util.Long) {
|
|
18371
|
+
var long = new $util.Long(0, 0, false);
|
|
18372
|
+
object.freeableSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
18373
|
+
} else
|
|
18374
|
+
object.freeableSizeBytes = options.longs === String ? "0" : 0;
|
|
18375
|
+
if ($util.Long) {
|
|
18376
|
+
var long = new $util.Long(0, 0, false);
|
|
18377
|
+
object.exclusiveSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
18378
|
+
} else
|
|
18379
|
+
object.exclusiveSizeBytes = options.longs === String ? "0" : 0;
|
|
18380
|
+
object.incrementalBackupChainId = "";
|
|
18381
|
+
object.oldestVersionTime = null;
|
|
18271
18382
|
}
|
|
18272
18383
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
18273
18384
|
object.name = message.name;
|
|
@@ -18312,6 +18423,20 @@
|
|
|
18312
18423
|
for (var j = 0; j < message.backupSchedules.length; ++j)
|
|
18313
18424
|
object.backupSchedules[j] = message.backupSchedules[j];
|
|
18314
18425
|
}
|
|
18426
|
+
if (message.freeableSizeBytes != null && message.hasOwnProperty("freeableSizeBytes"))
|
|
18427
|
+
if (typeof message.freeableSizeBytes === "number")
|
|
18428
|
+
object.freeableSizeBytes = options.longs === String ? String(message.freeableSizeBytes) : message.freeableSizeBytes;
|
|
18429
|
+
else
|
|
18430
|
+
object.freeableSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.freeableSizeBytes) : options.longs === Number ? new $util.LongBits(message.freeableSizeBytes.low >>> 0, message.freeableSizeBytes.high >>> 0).toNumber() : message.freeableSizeBytes;
|
|
18431
|
+
if (message.exclusiveSizeBytes != null && message.hasOwnProperty("exclusiveSizeBytes"))
|
|
18432
|
+
if (typeof message.exclusiveSizeBytes === "number")
|
|
18433
|
+
object.exclusiveSizeBytes = options.longs === String ? String(message.exclusiveSizeBytes) : message.exclusiveSizeBytes;
|
|
18434
|
+
else
|
|
18435
|
+
object.exclusiveSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.exclusiveSizeBytes) : options.longs === Number ? new $util.LongBits(message.exclusiveSizeBytes.low >>> 0, message.exclusiveSizeBytes.high >>> 0).toNumber() : message.exclusiveSizeBytes;
|
|
18436
|
+
if (message.incrementalBackupChainId != null && message.hasOwnProperty("incrementalBackupChainId"))
|
|
18437
|
+
object.incrementalBackupChainId = message.incrementalBackupChainId;
|
|
18438
|
+
if (message.oldestVersionTime != null && message.hasOwnProperty("oldestVersionTime"))
|
|
18439
|
+
object.oldestVersionTime = $root.google.protobuf.Timestamp.toObject(message.oldestVersionTime, options);
|
|
18315
18440
|
return object;
|
|
18316
18441
|
};
|
|
18317
18442
|
|
|
@@ -22286,6 +22411,181 @@
|
|
|
22286
22411
|
return FullBackupSpec;
|
|
22287
22412
|
})();
|
|
22288
22413
|
|
|
22414
|
+
v1.IncrementalBackupSpec = (function() {
|
|
22415
|
+
|
|
22416
|
+
/**
|
|
22417
|
+
* Properties of an IncrementalBackupSpec.
|
|
22418
|
+
* @memberof google.spanner.admin.database.v1
|
|
22419
|
+
* @interface IIncrementalBackupSpec
|
|
22420
|
+
*/
|
|
22421
|
+
|
|
22422
|
+
/**
|
|
22423
|
+
* Constructs a new IncrementalBackupSpec.
|
|
22424
|
+
* @memberof google.spanner.admin.database.v1
|
|
22425
|
+
* @classdesc Represents an IncrementalBackupSpec.
|
|
22426
|
+
* @implements IIncrementalBackupSpec
|
|
22427
|
+
* @constructor
|
|
22428
|
+
* @param {google.spanner.admin.database.v1.IIncrementalBackupSpec=} [properties] Properties to set
|
|
22429
|
+
*/
|
|
22430
|
+
function IncrementalBackupSpec(properties) {
|
|
22431
|
+
if (properties)
|
|
22432
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
22433
|
+
if (properties[keys[i]] != null)
|
|
22434
|
+
this[keys[i]] = properties[keys[i]];
|
|
22435
|
+
}
|
|
22436
|
+
|
|
22437
|
+
/**
|
|
22438
|
+
* Creates a new IncrementalBackupSpec instance using the specified properties.
|
|
22439
|
+
* @function create
|
|
22440
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22441
|
+
* @static
|
|
22442
|
+
* @param {google.spanner.admin.database.v1.IIncrementalBackupSpec=} [properties] Properties to set
|
|
22443
|
+
* @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec instance
|
|
22444
|
+
*/
|
|
22445
|
+
IncrementalBackupSpec.create = function create(properties) {
|
|
22446
|
+
return new IncrementalBackupSpec(properties);
|
|
22447
|
+
};
|
|
22448
|
+
|
|
22449
|
+
/**
|
|
22450
|
+
* Encodes the specified IncrementalBackupSpec message. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages.
|
|
22451
|
+
* @function encode
|
|
22452
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22453
|
+
* @static
|
|
22454
|
+
* @param {google.spanner.admin.database.v1.IIncrementalBackupSpec} message IncrementalBackupSpec message or plain object to encode
|
|
22455
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
22456
|
+
* @returns {$protobuf.Writer} Writer
|
|
22457
|
+
*/
|
|
22458
|
+
IncrementalBackupSpec.encode = function encode(message, writer) {
|
|
22459
|
+
if (!writer)
|
|
22460
|
+
writer = $Writer.create();
|
|
22461
|
+
return writer;
|
|
22462
|
+
};
|
|
22463
|
+
|
|
22464
|
+
/**
|
|
22465
|
+
* Encodes the specified IncrementalBackupSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.IncrementalBackupSpec.verify|verify} messages.
|
|
22466
|
+
* @function encodeDelimited
|
|
22467
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22468
|
+
* @static
|
|
22469
|
+
* @param {google.spanner.admin.database.v1.IIncrementalBackupSpec} message IncrementalBackupSpec message or plain object to encode
|
|
22470
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
22471
|
+
* @returns {$protobuf.Writer} Writer
|
|
22472
|
+
*/
|
|
22473
|
+
IncrementalBackupSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
22474
|
+
return this.encode(message, writer).ldelim();
|
|
22475
|
+
};
|
|
22476
|
+
|
|
22477
|
+
/**
|
|
22478
|
+
* Decodes an IncrementalBackupSpec message from the specified reader or buffer.
|
|
22479
|
+
* @function decode
|
|
22480
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22481
|
+
* @static
|
|
22482
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
22483
|
+
* @param {number} [length] Message length if known beforehand
|
|
22484
|
+
* @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec
|
|
22485
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22486
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22487
|
+
*/
|
|
22488
|
+
IncrementalBackupSpec.decode = function decode(reader, length) {
|
|
22489
|
+
if (!(reader instanceof $Reader))
|
|
22490
|
+
reader = $Reader.create(reader);
|
|
22491
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.IncrementalBackupSpec();
|
|
22492
|
+
while (reader.pos < end) {
|
|
22493
|
+
var tag = reader.uint32();
|
|
22494
|
+
switch (tag >>> 3) {
|
|
22495
|
+
default:
|
|
22496
|
+
reader.skipType(tag & 7);
|
|
22497
|
+
break;
|
|
22498
|
+
}
|
|
22499
|
+
}
|
|
22500
|
+
return message;
|
|
22501
|
+
};
|
|
22502
|
+
|
|
22503
|
+
/**
|
|
22504
|
+
* Decodes an IncrementalBackupSpec message from the specified reader or buffer, length delimited.
|
|
22505
|
+
* @function decodeDelimited
|
|
22506
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22507
|
+
* @static
|
|
22508
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
22509
|
+
* @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec
|
|
22510
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22511
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22512
|
+
*/
|
|
22513
|
+
IncrementalBackupSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
22514
|
+
if (!(reader instanceof $Reader))
|
|
22515
|
+
reader = new $Reader(reader);
|
|
22516
|
+
return this.decode(reader, reader.uint32());
|
|
22517
|
+
};
|
|
22518
|
+
|
|
22519
|
+
/**
|
|
22520
|
+
* Verifies an IncrementalBackupSpec message.
|
|
22521
|
+
* @function verify
|
|
22522
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22523
|
+
* @static
|
|
22524
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
22525
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
22526
|
+
*/
|
|
22527
|
+
IncrementalBackupSpec.verify = function verify(message) {
|
|
22528
|
+
if (typeof message !== "object" || message === null)
|
|
22529
|
+
return "object expected";
|
|
22530
|
+
return null;
|
|
22531
|
+
};
|
|
22532
|
+
|
|
22533
|
+
/**
|
|
22534
|
+
* Creates an IncrementalBackupSpec message from a plain object. Also converts values to their respective internal types.
|
|
22535
|
+
* @function fromObject
|
|
22536
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22537
|
+
* @static
|
|
22538
|
+
* @param {Object.<string,*>} object Plain object
|
|
22539
|
+
* @returns {google.spanner.admin.database.v1.IncrementalBackupSpec} IncrementalBackupSpec
|
|
22540
|
+
*/
|
|
22541
|
+
IncrementalBackupSpec.fromObject = function fromObject(object) {
|
|
22542
|
+
if (object instanceof $root.google.spanner.admin.database.v1.IncrementalBackupSpec)
|
|
22543
|
+
return object;
|
|
22544
|
+
return new $root.google.spanner.admin.database.v1.IncrementalBackupSpec();
|
|
22545
|
+
};
|
|
22546
|
+
|
|
22547
|
+
/**
|
|
22548
|
+
* Creates a plain object from an IncrementalBackupSpec message. Also converts values to other types if specified.
|
|
22549
|
+
* @function toObject
|
|
22550
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22551
|
+
* @static
|
|
22552
|
+
* @param {google.spanner.admin.database.v1.IncrementalBackupSpec} message IncrementalBackupSpec
|
|
22553
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
22554
|
+
* @returns {Object.<string,*>} Plain object
|
|
22555
|
+
*/
|
|
22556
|
+
IncrementalBackupSpec.toObject = function toObject() {
|
|
22557
|
+
return {};
|
|
22558
|
+
};
|
|
22559
|
+
|
|
22560
|
+
/**
|
|
22561
|
+
* Converts this IncrementalBackupSpec to JSON.
|
|
22562
|
+
* @function toJSON
|
|
22563
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22564
|
+
* @instance
|
|
22565
|
+
* @returns {Object.<string,*>} JSON object
|
|
22566
|
+
*/
|
|
22567
|
+
IncrementalBackupSpec.prototype.toJSON = function toJSON() {
|
|
22568
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
22569
|
+
};
|
|
22570
|
+
|
|
22571
|
+
/**
|
|
22572
|
+
* Gets the default type url for IncrementalBackupSpec
|
|
22573
|
+
* @function getTypeUrl
|
|
22574
|
+
* @memberof google.spanner.admin.database.v1.IncrementalBackupSpec
|
|
22575
|
+
* @static
|
|
22576
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
22577
|
+
* @returns {string} The default type url
|
|
22578
|
+
*/
|
|
22579
|
+
IncrementalBackupSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
22580
|
+
if (typeUrlPrefix === undefined) {
|
|
22581
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
22582
|
+
}
|
|
22583
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.IncrementalBackupSpec";
|
|
22584
|
+
};
|
|
22585
|
+
|
|
22586
|
+
return IncrementalBackupSpec;
|
|
22587
|
+
})();
|
|
22588
|
+
|
|
22289
22589
|
v1.OperationProgress = (function() {
|
|
22290
22590
|
|
|
22291
22591
|
/**
|
|
@@ -23338,6 +23638,7 @@
|
|
|
23338
23638
|
* @property {google.protobuf.IDuration|null} [retentionDuration] BackupSchedule retentionDuration
|
|
23339
23639
|
* @property {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig|null} [encryptionConfig] BackupSchedule encryptionConfig
|
|
23340
23640
|
* @property {google.spanner.admin.database.v1.IFullBackupSpec|null} [fullBackupSpec] BackupSchedule fullBackupSpec
|
|
23641
|
+
* @property {google.spanner.admin.database.v1.IIncrementalBackupSpec|null} [incrementalBackupSpec] BackupSchedule incrementalBackupSpec
|
|
23341
23642
|
* @property {google.protobuf.ITimestamp|null} [updateTime] BackupSchedule updateTime
|
|
23342
23643
|
*/
|
|
23343
23644
|
|
|
@@ -23396,6 +23697,14 @@
|
|
|
23396
23697
|
*/
|
|
23397
23698
|
BackupSchedule.prototype.fullBackupSpec = null;
|
|
23398
23699
|
|
|
23700
|
+
/**
|
|
23701
|
+
* BackupSchedule incrementalBackupSpec.
|
|
23702
|
+
* @member {google.spanner.admin.database.v1.IIncrementalBackupSpec|null|undefined} incrementalBackupSpec
|
|
23703
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23704
|
+
* @instance
|
|
23705
|
+
*/
|
|
23706
|
+
BackupSchedule.prototype.incrementalBackupSpec = null;
|
|
23707
|
+
|
|
23399
23708
|
/**
|
|
23400
23709
|
* BackupSchedule updateTime.
|
|
23401
23710
|
* @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
|
@@ -23409,12 +23718,12 @@
|
|
|
23409
23718
|
|
|
23410
23719
|
/**
|
|
23411
23720
|
* BackupSchedule backupTypeSpec.
|
|
23412
|
-
* @member {"fullBackupSpec"|undefined} backupTypeSpec
|
|
23721
|
+
* @member {"fullBackupSpec"|"incrementalBackupSpec"|undefined} backupTypeSpec
|
|
23413
23722
|
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23414
23723
|
* @instance
|
|
23415
23724
|
*/
|
|
23416
23725
|
Object.defineProperty(BackupSchedule.prototype, "backupTypeSpec", {
|
|
23417
|
-
get: $util.oneOfGetter($oneOfFields = ["fullBackupSpec"]),
|
|
23726
|
+
get: $util.oneOfGetter($oneOfFields = ["fullBackupSpec", "incrementalBackupSpec"]),
|
|
23418
23727
|
set: $util.oneOfSetter($oneOfFields)
|
|
23419
23728
|
});
|
|
23420
23729
|
|
|
@@ -23452,6 +23761,8 @@
|
|
|
23452
23761
|
$root.google.spanner.admin.database.v1.BackupScheduleSpec.encode(message.spec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
23453
23762
|
if (message.fullBackupSpec != null && Object.hasOwnProperty.call(message, "fullBackupSpec"))
|
|
23454
23763
|
$root.google.spanner.admin.database.v1.FullBackupSpec.encode(message.fullBackupSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
23764
|
+
if (message.incrementalBackupSpec != null && Object.hasOwnProperty.call(message, "incrementalBackupSpec"))
|
|
23765
|
+
$root.google.spanner.admin.database.v1.IncrementalBackupSpec.encode(message.incrementalBackupSpec, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
23455
23766
|
if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
|
23456
23767
|
$root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
|
23457
23768
|
return writer;
|
|
@@ -23508,6 +23819,10 @@
|
|
|
23508
23819
|
message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.decode(reader, reader.uint32());
|
|
23509
23820
|
break;
|
|
23510
23821
|
}
|
|
23822
|
+
case 8: {
|
|
23823
|
+
message.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.decode(reader, reader.uint32());
|
|
23824
|
+
break;
|
|
23825
|
+
}
|
|
23511
23826
|
case 9: {
|
|
23512
23827
|
message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
23513
23828
|
break;
|
|
@@ -23574,6 +23889,16 @@
|
|
|
23574
23889
|
return "fullBackupSpec." + error;
|
|
23575
23890
|
}
|
|
23576
23891
|
}
|
|
23892
|
+
if (message.incrementalBackupSpec != null && message.hasOwnProperty("incrementalBackupSpec")) {
|
|
23893
|
+
if (properties.backupTypeSpec === 1)
|
|
23894
|
+
return "backupTypeSpec: multiple values";
|
|
23895
|
+
properties.backupTypeSpec = 1;
|
|
23896
|
+
{
|
|
23897
|
+
var error = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.verify(message.incrementalBackupSpec);
|
|
23898
|
+
if (error)
|
|
23899
|
+
return "incrementalBackupSpec." + error;
|
|
23900
|
+
}
|
|
23901
|
+
}
|
|
23577
23902
|
if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
|
23578
23903
|
var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
|
23579
23904
|
if (error)
|
|
@@ -23616,6 +23941,11 @@
|
|
|
23616
23941
|
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.fullBackupSpec: object expected");
|
|
23617
23942
|
message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.fromObject(object.fullBackupSpec);
|
|
23618
23943
|
}
|
|
23944
|
+
if (object.incrementalBackupSpec != null) {
|
|
23945
|
+
if (typeof object.incrementalBackupSpec !== "object")
|
|
23946
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.incrementalBackupSpec: object expected");
|
|
23947
|
+
message.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.fromObject(object.incrementalBackupSpec);
|
|
23948
|
+
}
|
|
23619
23949
|
if (object.updateTime != null) {
|
|
23620
23950
|
if (typeof object.updateTime !== "object")
|
|
23621
23951
|
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.updateTime: object expected");
|
|
@@ -23657,6 +23987,11 @@
|
|
|
23657
23987
|
if (options.oneofs)
|
|
23658
23988
|
object.backupTypeSpec = "fullBackupSpec";
|
|
23659
23989
|
}
|
|
23990
|
+
if (message.incrementalBackupSpec != null && message.hasOwnProperty("incrementalBackupSpec")) {
|
|
23991
|
+
object.incrementalBackupSpec = $root.google.spanner.admin.database.v1.IncrementalBackupSpec.toObject(message.incrementalBackupSpec, options);
|
|
23992
|
+
if (options.oneofs)
|
|
23993
|
+
object.backupTypeSpec = "incrementalBackupSpec";
|
|
23994
|
+
}
|
|
23660
23995
|
if (message.updateTime != null && message.hasOwnProperty("updateTime"))
|
|
23661
23996
|
object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
|
23662
23997
|
return object;
|
package/build/protos/protos.json
CHANGED
|
@@ -1667,6 +1667,20 @@
|
|
|
1667
1667
|
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1668
1668
|
}
|
|
1669
1669
|
},
|
|
1670
|
+
"freeableSizeBytes": {
|
|
1671
|
+
"type": "int64",
|
|
1672
|
+
"id": 15,
|
|
1673
|
+
"options": {
|
|
1674
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
"exclusiveSizeBytes": {
|
|
1678
|
+
"type": "int64",
|
|
1679
|
+
"id": 16,
|
|
1680
|
+
"options": {
|
|
1681
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1670
1684
|
"state": {
|
|
1671
1685
|
"type": "State",
|
|
1672
1686
|
"id": 6,
|
|
@@ -1728,6 +1742,20 @@
|
|
|
1728
1742
|
"options": {
|
|
1729
1743
|
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1730
1744
|
}
|
|
1745
|
+
},
|
|
1746
|
+
"incrementalBackupChainId": {
|
|
1747
|
+
"type": "string",
|
|
1748
|
+
"id": 17,
|
|
1749
|
+
"options": {
|
|
1750
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
"oldestVersionTime": {
|
|
1754
|
+
"type": "google.protobuf.Timestamp",
|
|
1755
|
+
"id": 18,
|
|
1756
|
+
"options": {
|
|
1757
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1758
|
+
}
|
|
1731
1759
|
}
|
|
1732
1760
|
},
|
|
1733
1761
|
"nested": {
|
|
@@ -2087,6 +2115,9 @@
|
|
|
2087
2115
|
"FullBackupSpec": {
|
|
2088
2116
|
"fields": {}
|
|
2089
2117
|
},
|
|
2118
|
+
"IncrementalBackupSpec": {
|
|
2119
|
+
"fields": {}
|
|
2120
|
+
},
|
|
2090
2121
|
"OperationProgress": {
|
|
2091
2122
|
"fields": {
|
|
2092
2123
|
"progressPercent": {
|
|
@@ -2189,7 +2220,8 @@
|
|
|
2189
2220
|
"oneofs": {
|
|
2190
2221
|
"backupTypeSpec": {
|
|
2191
2222
|
"oneof": [
|
|
2192
|
-
"fullBackupSpec"
|
|
2223
|
+
"fullBackupSpec",
|
|
2224
|
+
"incrementalBackupSpec"
|
|
2193
2225
|
]
|
|
2194
2226
|
}
|
|
2195
2227
|
},
|
|
@@ -2226,6 +2258,10 @@
|
|
|
2226
2258
|
"type": "FullBackupSpec",
|
|
2227
2259
|
"id": 7
|
|
2228
2260
|
},
|
|
2261
|
+
"incrementalBackupSpec": {
|
|
2262
|
+
"type": "IncrementalBackupSpec",
|
|
2263
|
+
"id": 8
|
|
2264
|
+
},
|
|
2229
2265
|
"updateTime": {
|
|
2230
2266
|
"type": "google.protobuf.Timestamp",
|
|
2231
2267
|
"id": 9,
|
package/build/src/index.js
CHANGED
|
@@ -147,6 +147,9 @@ class Spanner extends service_1.GrpcService {
|
|
|
147
147
|
libName: 'gccl',
|
|
148
148
|
libVersion: require('../../package.json').version,
|
|
149
149
|
scopes,
|
|
150
|
+
// Add grpc keep alive setting
|
|
151
|
+
'grpc.keepalive_time_ms': 30000,
|
|
152
|
+
'grpc.keepalive_timeout_ms': 10000,
|
|
150
153
|
// Enable grpc-gcp support
|
|
151
154
|
'grpc.callInvocationTransformer': grpcGcp.gcpCallInvocationTransformer,
|
|
152
155
|
'grpc.channelFactoryOverride': grpcGcp.gcpChannelFactoryOverride,
|
package/build/src/transaction.js
CHANGED
|
@@ -415,8 +415,12 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
415
415
|
if (response.metadata && response.metadata.transaction && !this.id) {
|
|
416
416
|
this._update(response.metadata.transaction);
|
|
417
417
|
}
|
|
418
|
-
}).on('error',
|
|
419
|
-
|
|
418
|
+
}).on('error', err => {
|
|
419
|
+
const isServiceError = err && typeof err === 'object' && 'code' in err;
|
|
420
|
+
if (!this.id &&
|
|
421
|
+
this._useInRunner &&
|
|
422
|
+
!(isServiceError &&
|
|
423
|
+
err.code === google_gax_1.grpc.status.ABORTED)) {
|
|
420
424
|
this.begin();
|
|
421
425
|
}
|
|
422
426
|
});
|
|
@@ -685,8 +689,12 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
685
689
|
this._update(response.metadata.transaction);
|
|
686
690
|
}
|
|
687
691
|
})
|
|
688
|
-
.on('error',
|
|
689
|
-
|
|
692
|
+
.on('error', err => {
|
|
693
|
+
const isServiceError = err && typeof err === 'object' && 'code' in err;
|
|
694
|
+
if (!this.id &&
|
|
695
|
+
this._useInRunner &&
|
|
696
|
+
!(isServiceError &&
|
|
697
|
+
err.code === google_gax_1.grpc.status.ABORTED)) {
|
|
690
698
|
this.begin();
|
|
691
699
|
}
|
|
692
700
|
});
|
|
@@ -846,6 +854,7 @@ class Snapshot extends events_1.EventEmitter {
|
|
|
846
854
|
this._waitingRequests.push(() => {
|
|
847
855
|
makeRequest(resumeToken)
|
|
848
856
|
.on('data', chunk => streamProxy.emit('data', chunk))
|
|
857
|
+
.on('error', err => streamProxy.emit('error', err))
|
|
849
858
|
.on('end', () => streamProxy.emit('end'));
|
|
850
859
|
});
|
|
851
860
|
return streamProxy;
|