@google-cloud/spanner 6.9.0 → 6.10.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 +13 -0
- package/README.md +1 -0
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +90 -1
- package/build/protos/protos.d.ts +245 -0
- package/build/protos/protos.js +581 -0
- package/build/protos/protos.json +73 -0
- package/build/src/common-grpc/service.js +4 -0
- package/build/src/database.d.ts +66 -0
- package/build/src/database.js +21 -0
- package/build/src/index.d.ts +2 -2
- package/build/src/session-pool.d.ts +3 -3
- package/build/src/v1/database_admin_client.d.ts +79 -0
- package/build/src/v1/database_admin_client.js +43 -0
- package/build/src/v1/database_admin_client_config.json +5 -0
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -20461,6 +20461,39 @@
|
|
|
20461
20461
|
* @variation 2
|
|
20462
20462
|
*/
|
|
20463
20463
|
|
|
20464
|
+
/**
|
|
20465
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|updateDatabase}.
|
|
20466
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
20467
|
+
* @typedef UpdateDatabaseCallback
|
|
20468
|
+
* @type {function}
|
|
20469
|
+
* @param {Error|null} error Error, if any
|
|
20470
|
+
* @param {google.longrunning.Operation} [response] Operation
|
|
20471
|
+
*/
|
|
20472
|
+
|
|
20473
|
+
/**
|
|
20474
|
+
* Calls UpdateDatabase.
|
|
20475
|
+
* @function updateDatabase
|
|
20476
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
20477
|
+
* @instance
|
|
20478
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object
|
|
20479
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseCallback} callback Node-style callback called with the error, if any, and Operation
|
|
20480
|
+
* @returns {undefined}
|
|
20481
|
+
* @variation 1
|
|
20482
|
+
*/
|
|
20483
|
+
Object.defineProperty(DatabaseAdmin.prototype.updateDatabase = function updateDatabase(request, callback) {
|
|
20484
|
+
return this.rpcCall(updateDatabase, $root.google.spanner.admin.database.v1.UpdateDatabaseRequest, $root.google.longrunning.Operation, request, callback);
|
|
20485
|
+
}, "name", { value: "UpdateDatabase" });
|
|
20486
|
+
|
|
20487
|
+
/**
|
|
20488
|
+
* Calls UpdateDatabase.
|
|
20489
|
+
* @function updateDatabase
|
|
20490
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
20491
|
+
* @instance
|
|
20492
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object
|
|
20493
|
+
* @returns {Promise<google.longrunning.Operation>} Promise
|
|
20494
|
+
* @variation 2
|
|
20495
|
+
*/
|
|
20496
|
+
|
|
20464
20497
|
/**
|
|
20465
20498
|
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|updateDatabaseDdl}.
|
|
20466
20499
|
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
@@ -21278,6 +21311,8 @@
|
|
|
21278
21311
|
* @property {google.protobuf.ITimestamp|null} [earliestVersionTime] Database earliestVersionTime
|
|
21279
21312
|
* @property {string|null} [defaultLeader] Database defaultLeader
|
|
21280
21313
|
* @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Database databaseDialect
|
|
21314
|
+
* @property {boolean|null} [enableDropProtection] Database enableDropProtection
|
|
21315
|
+
* @property {boolean|null} [reconciling] Database reconciling
|
|
21281
21316
|
*/
|
|
21282
21317
|
|
|
21283
21318
|
/**
|
|
@@ -21376,6 +21411,22 @@
|
|
|
21376
21411
|
*/
|
|
21377
21412
|
Database.prototype.databaseDialect = 0;
|
|
21378
21413
|
|
|
21414
|
+
/**
|
|
21415
|
+
* Database enableDropProtection.
|
|
21416
|
+
* @member {boolean} enableDropProtection
|
|
21417
|
+
* @memberof google.spanner.admin.database.v1.Database
|
|
21418
|
+
* @instance
|
|
21419
|
+
*/
|
|
21420
|
+
Database.prototype.enableDropProtection = false;
|
|
21421
|
+
|
|
21422
|
+
/**
|
|
21423
|
+
* Database reconciling.
|
|
21424
|
+
* @member {boolean} reconciling
|
|
21425
|
+
* @memberof google.spanner.admin.database.v1.Database
|
|
21426
|
+
* @instance
|
|
21427
|
+
*/
|
|
21428
|
+
Database.prototype.reconciling = false;
|
|
21429
|
+
|
|
21379
21430
|
/**
|
|
21380
21431
|
* Creates a new Database instance using the specified properties.
|
|
21381
21432
|
* @function create
|
|
@@ -21421,6 +21472,10 @@
|
|
|
21421
21472
|
writer.uint32(/* id 9, wireType 2 =*/74).string(message.defaultLeader);
|
|
21422
21473
|
if (message.databaseDialect != null && Object.hasOwnProperty.call(message, "databaseDialect"))
|
|
21423
21474
|
writer.uint32(/* id 10, wireType 0 =*/80).int32(message.databaseDialect);
|
|
21475
|
+
if (message.enableDropProtection != null && Object.hasOwnProperty.call(message, "enableDropProtection"))
|
|
21476
|
+
writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableDropProtection);
|
|
21477
|
+
if (message.reconciling != null && Object.hasOwnProperty.call(message, "reconciling"))
|
|
21478
|
+
writer.uint32(/* id 12, wireType 0 =*/96).bool(message.reconciling);
|
|
21424
21479
|
return writer;
|
|
21425
21480
|
};
|
|
21426
21481
|
|
|
@@ -21497,6 +21552,14 @@
|
|
|
21497
21552
|
message.databaseDialect = reader.int32();
|
|
21498
21553
|
break;
|
|
21499
21554
|
}
|
|
21555
|
+
case 11: {
|
|
21556
|
+
message.enableDropProtection = reader.bool();
|
|
21557
|
+
break;
|
|
21558
|
+
}
|
|
21559
|
+
case 12: {
|
|
21560
|
+
message.reconciling = reader.bool();
|
|
21561
|
+
break;
|
|
21562
|
+
}
|
|
21500
21563
|
default:
|
|
21501
21564
|
reader.skipType(tag & 7);
|
|
21502
21565
|
break;
|
|
@@ -21589,6 +21652,12 @@
|
|
|
21589
21652
|
case 2:
|
|
21590
21653
|
break;
|
|
21591
21654
|
}
|
|
21655
|
+
if (message.enableDropProtection != null && message.hasOwnProperty("enableDropProtection"))
|
|
21656
|
+
if (typeof message.enableDropProtection !== "boolean")
|
|
21657
|
+
return "enableDropProtection: boolean expected";
|
|
21658
|
+
if (message.reconciling != null && message.hasOwnProperty("reconciling"))
|
|
21659
|
+
if (typeof message.reconciling !== "boolean")
|
|
21660
|
+
return "reconciling: boolean expected";
|
|
21592
21661
|
return null;
|
|
21593
21662
|
};
|
|
21594
21663
|
|
|
@@ -21684,6 +21753,10 @@
|
|
|
21684
21753
|
message.databaseDialect = 2;
|
|
21685
21754
|
break;
|
|
21686
21755
|
}
|
|
21756
|
+
if (object.enableDropProtection != null)
|
|
21757
|
+
message.enableDropProtection = Boolean(object.enableDropProtection);
|
|
21758
|
+
if (object.reconciling != null)
|
|
21759
|
+
message.reconciling = Boolean(object.reconciling);
|
|
21687
21760
|
return message;
|
|
21688
21761
|
};
|
|
21689
21762
|
|
|
@@ -21712,6 +21785,8 @@
|
|
|
21712
21785
|
object.earliestVersionTime = null;
|
|
21713
21786
|
object.defaultLeader = "";
|
|
21714
21787
|
object.databaseDialect = options.enums === String ? "DATABASE_DIALECT_UNSPECIFIED" : 0;
|
|
21788
|
+
object.enableDropProtection = false;
|
|
21789
|
+
object.reconciling = false;
|
|
21715
21790
|
}
|
|
21716
21791
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
21717
21792
|
object.name = message.name;
|
|
@@ -21736,6 +21811,10 @@
|
|
|
21736
21811
|
object.defaultLeader = message.defaultLeader;
|
|
21737
21812
|
if (message.databaseDialect != null && message.hasOwnProperty("databaseDialect"))
|
|
21738
21813
|
object.databaseDialect = options.enums === String ? $root.google.spanner.admin.database.v1.DatabaseDialect[message.databaseDialect] === undefined ? message.databaseDialect : $root.google.spanner.admin.database.v1.DatabaseDialect[message.databaseDialect] : message.databaseDialect;
|
|
21814
|
+
if (message.enableDropProtection != null && message.hasOwnProperty("enableDropProtection"))
|
|
21815
|
+
object.enableDropProtection = message.enableDropProtection;
|
|
21816
|
+
if (message.reconciling != null && message.hasOwnProperty("reconciling"))
|
|
21817
|
+
object.reconciling = message.reconciling;
|
|
21739
21818
|
return object;
|
|
21740
21819
|
};
|
|
21741
21820
|
|
|
@@ -23032,6 +23111,508 @@
|
|
|
23032
23111
|
return GetDatabaseRequest;
|
|
23033
23112
|
})();
|
|
23034
23113
|
|
|
23114
|
+
v1.UpdateDatabaseRequest = (function() {
|
|
23115
|
+
|
|
23116
|
+
/**
|
|
23117
|
+
* Properties of an UpdateDatabaseRequest.
|
|
23118
|
+
* @memberof google.spanner.admin.database.v1
|
|
23119
|
+
* @interface IUpdateDatabaseRequest
|
|
23120
|
+
* @property {google.spanner.admin.database.v1.IDatabase|null} [database] UpdateDatabaseRequest database
|
|
23121
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatabaseRequest updateMask
|
|
23122
|
+
*/
|
|
23123
|
+
|
|
23124
|
+
/**
|
|
23125
|
+
* Constructs a new UpdateDatabaseRequest.
|
|
23126
|
+
* @memberof google.spanner.admin.database.v1
|
|
23127
|
+
* @classdesc Represents an UpdateDatabaseRequest.
|
|
23128
|
+
* @implements IUpdateDatabaseRequest
|
|
23129
|
+
* @constructor
|
|
23130
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest=} [properties] Properties to set
|
|
23131
|
+
*/
|
|
23132
|
+
function UpdateDatabaseRequest(properties) {
|
|
23133
|
+
if (properties)
|
|
23134
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23135
|
+
if (properties[keys[i]] != null)
|
|
23136
|
+
this[keys[i]] = properties[keys[i]];
|
|
23137
|
+
}
|
|
23138
|
+
|
|
23139
|
+
/**
|
|
23140
|
+
* UpdateDatabaseRequest database.
|
|
23141
|
+
* @member {google.spanner.admin.database.v1.IDatabase|null|undefined} database
|
|
23142
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23143
|
+
* @instance
|
|
23144
|
+
*/
|
|
23145
|
+
UpdateDatabaseRequest.prototype.database = null;
|
|
23146
|
+
|
|
23147
|
+
/**
|
|
23148
|
+
* UpdateDatabaseRequest updateMask.
|
|
23149
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
23150
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23151
|
+
* @instance
|
|
23152
|
+
*/
|
|
23153
|
+
UpdateDatabaseRequest.prototype.updateMask = null;
|
|
23154
|
+
|
|
23155
|
+
/**
|
|
23156
|
+
* Creates a new UpdateDatabaseRequest instance using the specified properties.
|
|
23157
|
+
* @function create
|
|
23158
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23159
|
+
* @static
|
|
23160
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest=} [properties] Properties to set
|
|
23161
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseRequest} UpdateDatabaseRequest instance
|
|
23162
|
+
*/
|
|
23163
|
+
UpdateDatabaseRequest.create = function create(properties) {
|
|
23164
|
+
return new UpdateDatabaseRequest(properties);
|
|
23165
|
+
};
|
|
23166
|
+
|
|
23167
|
+
/**
|
|
23168
|
+
* Encodes the specified UpdateDatabaseRequest message. Does not implicitly {@link google.spanner.admin.database.v1.UpdateDatabaseRequest.verify|verify} messages.
|
|
23169
|
+
* @function encode
|
|
23170
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23171
|
+
* @static
|
|
23172
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest} message UpdateDatabaseRequest message or plain object to encode
|
|
23173
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23174
|
+
* @returns {$protobuf.Writer} Writer
|
|
23175
|
+
*/
|
|
23176
|
+
UpdateDatabaseRequest.encode = function encode(message, writer) {
|
|
23177
|
+
if (!writer)
|
|
23178
|
+
writer = $Writer.create();
|
|
23179
|
+
if (message.database != null && Object.hasOwnProperty.call(message, "database"))
|
|
23180
|
+
$root.google.spanner.admin.database.v1.Database.encode(message.database, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
23181
|
+
if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
|
|
23182
|
+
$root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23183
|
+
return writer;
|
|
23184
|
+
};
|
|
23185
|
+
|
|
23186
|
+
/**
|
|
23187
|
+
* Encodes the specified UpdateDatabaseRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.UpdateDatabaseRequest.verify|verify} messages.
|
|
23188
|
+
* @function encodeDelimited
|
|
23189
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23190
|
+
* @static
|
|
23191
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseRequest} message UpdateDatabaseRequest message or plain object to encode
|
|
23192
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23193
|
+
* @returns {$protobuf.Writer} Writer
|
|
23194
|
+
*/
|
|
23195
|
+
UpdateDatabaseRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23196
|
+
return this.encode(message, writer).ldelim();
|
|
23197
|
+
};
|
|
23198
|
+
|
|
23199
|
+
/**
|
|
23200
|
+
* Decodes an UpdateDatabaseRequest message from the specified reader or buffer.
|
|
23201
|
+
* @function decode
|
|
23202
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23203
|
+
* @static
|
|
23204
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23205
|
+
* @param {number} [length] Message length if known beforehand
|
|
23206
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseRequest} UpdateDatabaseRequest
|
|
23207
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23208
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23209
|
+
*/
|
|
23210
|
+
UpdateDatabaseRequest.decode = function decode(reader, length) {
|
|
23211
|
+
if (!(reader instanceof $Reader))
|
|
23212
|
+
reader = $Reader.create(reader);
|
|
23213
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.UpdateDatabaseRequest();
|
|
23214
|
+
while (reader.pos < end) {
|
|
23215
|
+
var tag = reader.uint32();
|
|
23216
|
+
switch (tag >>> 3) {
|
|
23217
|
+
case 1: {
|
|
23218
|
+
message.database = $root.google.spanner.admin.database.v1.Database.decode(reader, reader.uint32());
|
|
23219
|
+
break;
|
|
23220
|
+
}
|
|
23221
|
+
case 2: {
|
|
23222
|
+
message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
|
|
23223
|
+
break;
|
|
23224
|
+
}
|
|
23225
|
+
default:
|
|
23226
|
+
reader.skipType(tag & 7);
|
|
23227
|
+
break;
|
|
23228
|
+
}
|
|
23229
|
+
}
|
|
23230
|
+
return message;
|
|
23231
|
+
};
|
|
23232
|
+
|
|
23233
|
+
/**
|
|
23234
|
+
* Decodes an UpdateDatabaseRequest message from the specified reader or buffer, length delimited.
|
|
23235
|
+
* @function decodeDelimited
|
|
23236
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23237
|
+
* @static
|
|
23238
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23239
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseRequest} UpdateDatabaseRequest
|
|
23240
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23241
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23242
|
+
*/
|
|
23243
|
+
UpdateDatabaseRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
23244
|
+
if (!(reader instanceof $Reader))
|
|
23245
|
+
reader = new $Reader(reader);
|
|
23246
|
+
return this.decode(reader, reader.uint32());
|
|
23247
|
+
};
|
|
23248
|
+
|
|
23249
|
+
/**
|
|
23250
|
+
* Verifies an UpdateDatabaseRequest message.
|
|
23251
|
+
* @function verify
|
|
23252
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23253
|
+
* @static
|
|
23254
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23255
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23256
|
+
*/
|
|
23257
|
+
UpdateDatabaseRequest.verify = function verify(message) {
|
|
23258
|
+
if (typeof message !== "object" || message === null)
|
|
23259
|
+
return "object expected";
|
|
23260
|
+
if (message.database != null && message.hasOwnProperty("database")) {
|
|
23261
|
+
var error = $root.google.spanner.admin.database.v1.Database.verify(message.database);
|
|
23262
|
+
if (error)
|
|
23263
|
+
return "database." + error;
|
|
23264
|
+
}
|
|
23265
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
|
|
23266
|
+
var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
|
|
23267
|
+
if (error)
|
|
23268
|
+
return "updateMask." + error;
|
|
23269
|
+
}
|
|
23270
|
+
return null;
|
|
23271
|
+
};
|
|
23272
|
+
|
|
23273
|
+
/**
|
|
23274
|
+
* Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types.
|
|
23275
|
+
* @function fromObject
|
|
23276
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23277
|
+
* @static
|
|
23278
|
+
* @param {Object.<string,*>} object Plain object
|
|
23279
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseRequest} UpdateDatabaseRequest
|
|
23280
|
+
*/
|
|
23281
|
+
UpdateDatabaseRequest.fromObject = function fromObject(object) {
|
|
23282
|
+
if (object instanceof $root.google.spanner.admin.database.v1.UpdateDatabaseRequest)
|
|
23283
|
+
return object;
|
|
23284
|
+
var message = new $root.google.spanner.admin.database.v1.UpdateDatabaseRequest();
|
|
23285
|
+
if (object.database != null) {
|
|
23286
|
+
if (typeof object.database !== "object")
|
|
23287
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateDatabaseRequest.database: object expected");
|
|
23288
|
+
message.database = $root.google.spanner.admin.database.v1.Database.fromObject(object.database);
|
|
23289
|
+
}
|
|
23290
|
+
if (object.updateMask != null) {
|
|
23291
|
+
if (typeof object.updateMask !== "object")
|
|
23292
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateDatabaseRequest.updateMask: object expected");
|
|
23293
|
+
message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
|
|
23294
|
+
}
|
|
23295
|
+
return message;
|
|
23296
|
+
};
|
|
23297
|
+
|
|
23298
|
+
/**
|
|
23299
|
+
* Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified.
|
|
23300
|
+
* @function toObject
|
|
23301
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23302
|
+
* @static
|
|
23303
|
+
* @param {google.spanner.admin.database.v1.UpdateDatabaseRequest} message UpdateDatabaseRequest
|
|
23304
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23305
|
+
* @returns {Object.<string,*>} Plain object
|
|
23306
|
+
*/
|
|
23307
|
+
UpdateDatabaseRequest.toObject = function toObject(message, options) {
|
|
23308
|
+
if (!options)
|
|
23309
|
+
options = {};
|
|
23310
|
+
var object = {};
|
|
23311
|
+
if (options.defaults) {
|
|
23312
|
+
object.database = null;
|
|
23313
|
+
object.updateMask = null;
|
|
23314
|
+
}
|
|
23315
|
+
if (message.database != null && message.hasOwnProperty("database"))
|
|
23316
|
+
object.database = $root.google.spanner.admin.database.v1.Database.toObject(message.database, options);
|
|
23317
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask"))
|
|
23318
|
+
object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
|
|
23319
|
+
return object;
|
|
23320
|
+
};
|
|
23321
|
+
|
|
23322
|
+
/**
|
|
23323
|
+
* Converts this UpdateDatabaseRequest to JSON.
|
|
23324
|
+
* @function toJSON
|
|
23325
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23326
|
+
* @instance
|
|
23327
|
+
* @returns {Object.<string,*>} JSON object
|
|
23328
|
+
*/
|
|
23329
|
+
UpdateDatabaseRequest.prototype.toJSON = function toJSON() {
|
|
23330
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23331
|
+
};
|
|
23332
|
+
|
|
23333
|
+
/**
|
|
23334
|
+
* Gets the default type url for UpdateDatabaseRequest
|
|
23335
|
+
* @function getTypeUrl
|
|
23336
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseRequest
|
|
23337
|
+
* @static
|
|
23338
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23339
|
+
* @returns {string} The default type url
|
|
23340
|
+
*/
|
|
23341
|
+
UpdateDatabaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23342
|
+
if (typeUrlPrefix === undefined) {
|
|
23343
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23344
|
+
}
|
|
23345
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.UpdateDatabaseRequest";
|
|
23346
|
+
};
|
|
23347
|
+
|
|
23348
|
+
return UpdateDatabaseRequest;
|
|
23349
|
+
})();
|
|
23350
|
+
|
|
23351
|
+
v1.UpdateDatabaseMetadata = (function() {
|
|
23352
|
+
|
|
23353
|
+
/**
|
|
23354
|
+
* Properties of an UpdateDatabaseMetadata.
|
|
23355
|
+
* @memberof google.spanner.admin.database.v1
|
|
23356
|
+
* @interface IUpdateDatabaseMetadata
|
|
23357
|
+
* @property {google.spanner.admin.database.v1.IUpdateDatabaseRequest|null} [request] UpdateDatabaseMetadata request
|
|
23358
|
+
* @property {google.spanner.admin.database.v1.IOperationProgress|null} [progress] UpdateDatabaseMetadata progress
|
|
23359
|
+
* @property {google.protobuf.ITimestamp|null} [cancelTime] UpdateDatabaseMetadata cancelTime
|
|
23360
|
+
*/
|
|
23361
|
+
|
|
23362
|
+
/**
|
|
23363
|
+
* Constructs a new UpdateDatabaseMetadata.
|
|
23364
|
+
* @memberof google.spanner.admin.database.v1
|
|
23365
|
+
* @classdesc Represents an UpdateDatabaseMetadata.
|
|
23366
|
+
* @implements IUpdateDatabaseMetadata
|
|
23367
|
+
* @constructor
|
|
23368
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseMetadata=} [properties] Properties to set
|
|
23369
|
+
*/
|
|
23370
|
+
function UpdateDatabaseMetadata(properties) {
|
|
23371
|
+
if (properties)
|
|
23372
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23373
|
+
if (properties[keys[i]] != null)
|
|
23374
|
+
this[keys[i]] = properties[keys[i]];
|
|
23375
|
+
}
|
|
23376
|
+
|
|
23377
|
+
/**
|
|
23378
|
+
* UpdateDatabaseMetadata request.
|
|
23379
|
+
* @member {google.spanner.admin.database.v1.IUpdateDatabaseRequest|null|undefined} request
|
|
23380
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23381
|
+
* @instance
|
|
23382
|
+
*/
|
|
23383
|
+
UpdateDatabaseMetadata.prototype.request = null;
|
|
23384
|
+
|
|
23385
|
+
/**
|
|
23386
|
+
* UpdateDatabaseMetadata progress.
|
|
23387
|
+
* @member {google.spanner.admin.database.v1.IOperationProgress|null|undefined} progress
|
|
23388
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23389
|
+
* @instance
|
|
23390
|
+
*/
|
|
23391
|
+
UpdateDatabaseMetadata.prototype.progress = null;
|
|
23392
|
+
|
|
23393
|
+
/**
|
|
23394
|
+
* UpdateDatabaseMetadata cancelTime.
|
|
23395
|
+
* @member {google.protobuf.ITimestamp|null|undefined} cancelTime
|
|
23396
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23397
|
+
* @instance
|
|
23398
|
+
*/
|
|
23399
|
+
UpdateDatabaseMetadata.prototype.cancelTime = null;
|
|
23400
|
+
|
|
23401
|
+
/**
|
|
23402
|
+
* Creates a new UpdateDatabaseMetadata instance using the specified properties.
|
|
23403
|
+
* @function create
|
|
23404
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23405
|
+
* @static
|
|
23406
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseMetadata=} [properties] Properties to set
|
|
23407
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata instance
|
|
23408
|
+
*/
|
|
23409
|
+
UpdateDatabaseMetadata.create = function create(properties) {
|
|
23410
|
+
return new UpdateDatabaseMetadata(properties);
|
|
23411
|
+
};
|
|
23412
|
+
|
|
23413
|
+
/**
|
|
23414
|
+
* Encodes the specified UpdateDatabaseMetadata message. Does not implicitly {@link google.spanner.admin.database.v1.UpdateDatabaseMetadata.verify|verify} messages.
|
|
23415
|
+
* @function encode
|
|
23416
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23417
|
+
* @static
|
|
23418
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseMetadata} message UpdateDatabaseMetadata message or plain object to encode
|
|
23419
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23420
|
+
* @returns {$protobuf.Writer} Writer
|
|
23421
|
+
*/
|
|
23422
|
+
UpdateDatabaseMetadata.encode = function encode(message, writer) {
|
|
23423
|
+
if (!writer)
|
|
23424
|
+
writer = $Writer.create();
|
|
23425
|
+
if (message.request != null && Object.hasOwnProperty.call(message, "request"))
|
|
23426
|
+
$root.google.spanner.admin.database.v1.UpdateDatabaseRequest.encode(message.request, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
23427
|
+
if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
|
|
23428
|
+
$root.google.spanner.admin.database.v1.OperationProgress.encode(message.progress, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23429
|
+
if (message.cancelTime != null && Object.hasOwnProperty.call(message, "cancelTime"))
|
|
23430
|
+
$root.google.protobuf.Timestamp.encode(message.cancelTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
23431
|
+
return writer;
|
|
23432
|
+
};
|
|
23433
|
+
|
|
23434
|
+
/**
|
|
23435
|
+
* Encodes the specified UpdateDatabaseMetadata message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.UpdateDatabaseMetadata.verify|verify} messages.
|
|
23436
|
+
* @function encodeDelimited
|
|
23437
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23438
|
+
* @static
|
|
23439
|
+
* @param {google.spanner.admin.database.v1.IUpdateDatabaseMetadata} message UpdateDatabaseMetadata message or plain object to encode
|
|
23440
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23441
|
+
* @returns {$protobuf.Writer} Writer
|
|
23442
|
+
*/
|
|
23443
|
+
UpdateDatabaseMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23444
|
+
return this.encode(message, writer).ldelim();
|
|
23445
|
+
};
|
|
23446
|
+
|
|
23447
|
+
/**
|
|
23448
|
+
* Decodes an UpdateDatabaseMetadata message from the specified reader or buffer.
|
|
23449
|
+
* @function decode
|
|
23450
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23451
|
+
* @static
|
|
23452
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23453
|
+
* @param {number} [length] Message length if known beforehand
|
|
23454
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata
|
|
23455
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23456
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23457
|
+
*/
|
|
23458
|
+
UpdateDatabaseMetadata.decode = function decode(reader, length) {
|
|
23459
|
+
if (!(reader instanceof $Reader))
|
|
23460
|
+
reader = $Reader.create(reader);
|
|
23461
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.UpdateDatabaseMetadata();
|
|
23462
|
+
while (reader.pos < end) {
|
|
23463
|
+
var tag = reader.uint32();
|
|
23464
|
+
switch (tag >>> 3) {
|
|
23465
|
+
case 1: {
|
|
23466
|
+
message.request = $root.google.spanner.admin.database.v1.UpdateDatabaseRequest.decode(reader, reader.uint32());
|
|
23467
|
+
break;
|
|
23468
|
+
}
|
|
23469
|
+
case 2: {
|
|
23470
|
+
message.progress = $root.google.spanner.admin.database.v1.OperationProgress.decode(reader, reader.uint32());
|
|
23471
|
+
break;
|
|
23472
|
+
}
|
|
23473
|
+
case 3: {
|
|
23474
|
+
message.cancelTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
23475
|
+
break;
|
|
23476
|
+
}
|
|
23477
|
+
default:
|
|
23478
|
+
reader.skipType(tag & 7);
|
|
23479
|
+
break;
|
|
23480
|
+
}
|
|
23481
|
+
}
|
|
23482
|
+
return message;
|
|
23483
|
+
};
|
|
23484
|
+
|
|
23485
|
+
/**
|
|
23486
|
+
* Decodes an UpdateDatabaseMetadata message from the specified reader or buffer, length delimited.
|
|
23487
|
+
* @function decodeDelimited
|
|
23488
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23489
|
+
* @static
|
|
23490
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23491
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata
|
|
23492
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23493
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23494
|
+
*/
|
|
23495
|
+
UpdateDatabaseMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
23496
|
+
if (!(reader instanceof $Reader))
|
|
23497
|
+
reader = new $Reader(reader);
|
|
23498
|
+
return this.decode(reader, reader.uint32());
|
|
23499
|
+
};
|
|
23500
|
+
|
|
23501
|
+
/**
|
|
23502
|
+
* Verifies an UpdateDatabaseMetadata message.
|
|
23503
|
+
* @function verify
|
|
23504
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23505
|
+
* @static
|
|
23506
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23507
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23508
|
+
*/
|
|
23509
|
+
UpdateDatabaseMetadata.verify = function verify(message) {
|
|
23510
|
+
if (typeof message !== "object" || message === null)
|
|
23511
|
+
return "object expected";
|
|
23512
|
+
if (message.request != null && message.hasOwnProperty("request")) {
|
|
23513
|
+
var error = $root.google.spanner.admin.database.v1.UpdateDatabaseRequest.verify(message.request);
|
|
23514
|
+
if (error)
|
|
23515
|
+
return "request." + error;
|
|
23516
|
+
}
|
|
23517
|
+
if (message.progress != null && message.hasOwnProperty("progress")) {
|
|
23518
|
+
var error = $root.google.spanner.admin.database.v1.OperationProgress.verify(message.progress);
|
|
23519
|
+
if (error)
|
|
23520
|
+
return "progress." + error;
|
|
23521
|
+
}
|
|
23522
|
+
if (message.cancelTime != null && message.hasOwnProperty("cancelTime")) {
|
|
23523
|
+
var error = $root.google.protobuf.Timestamp.verify(message.cancelTime);
|
|
23524
|
+
if (error)
|
|
23525
|
+
return "cancelTime." + error;
|
|
23526
|
+
}
|
|
23527
|
+
return null;
|
|
23528
|
+
};
|
|
23529
|
+
|
|
23530
|
+
/**
|
|
23531
|
+
* Creates an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types.
|
|
23532
|
+
* @function fromObject
|
|
23533
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23534
|
+
* @static
|
|
23535
|
+
* @param {Object.<string,*>} object Plain object
|
|
23536
|
+
* @returns {google.spanner.admin.database.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata
|
|
23537
|
+
*/
|
|
23538
|
+
UpdateDatabaseMetadata.fromObject = function fromObject(object) {
|
|
23539
|
+
if (object instanceof $root.google.spanner.admin.database.v1.UpdateDatabaseMetadata)
|
|
23540
|
+
return object;
|
|
23541
|
+
var message = new $root.google.spanner.admin.database.v1.UpdateDatabaseMetadata();
|
|
23542
|
+
if (object.request != null) {
|
|
23543
|
+
if (typeof object.request !== "object")
|
|
23544
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateDatabaseMetadata.request: object expected");
|
|
23545
|
+
message.request = $root.google.spanner.admin.database.v1.UpdateDatabaseRequest.fromObject(object.request);
|
|
23546
|
+
}
|
|
23547
|
+
if (object.progress != null) {
|
|
23548
|
+
if (typeof object.progress !== "object")
|
|
23549
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateDatabaseMetadata.progress: object expected");
|
|
23550
|
+
message.progress = $root.google.spanner.admin.database.v1.OperationProgress.fromObject(object.progress);
|
|
23551
|
+
}
|
|
23552
|
+
if (object.cancelTime != null) {
|
|
23553
|
+
if (typeof object.cancelTime !== "object")
|
|
23554
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancelTime: object expected");
|
|
23555
|
+
message.cancelTime = $root.google.protobuf.Timestamp.fromObject(object.cancelTime);
|
|
23556
|
+
}
|
|
23557
|
+
return message;
|
|
23558
|
+
};
|
|
23559
|
+
|
|
23560
|
+
/**
|
|
23561
|
+
* Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified.
|
|
23562
|
+
* @function toObject
|
|
23563
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23564
|
+
* @static
|
|
23565
|
+
* @param {google.spanner.admin.database.v1.UpdateDatabaseMetadata} message UpdateDatabaseMetadata
|
|
23566
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23567
|
+
* @returns {Object.<string,*>} Plain object
|
|
23568
|
+
*/
|
|
23569
|
+
UpdateDatabaseMetadata.toObject = function toObject(message, options) {
|
|
23570
|
+
if (!options)
|
|
23571
|
+
options = {};
|
|
23572
|
+
var object = {};
|
|
23573
|
+
if (options.defaults) {
|
|
23574
|
+
object.request = null;
|
|
23575
|
+
object.progress = null;
|
|
23576
|
+
object.cancelTime = null;
|
|
23577
|
+
}
|
|
23578
|
+
if (message.request != null && message.hasOwnProperty("request"))
|
|
23579
|
+
object.request = $root.google.spanner.admin.database.v1.UpdateDatabaseRequest.toObject(message.request, options);
|
|
23580
|
+
if (message.progress != null && message.hasOwnProperty("progress"))
|
|
23581
|
+
object.progress = $root.google.spanner.admin.database.v1.OperationProgress.toObject(message.progress, options);
|
|
23582
|
+
if (message.cancelTime != null && message.hasOwnProperty("cancelTime"))
|
|
23583
|
+
object.cancelTime = $root.google.protobuf.Timestamp.toObject(message.cancelTime, options);
|
|
23584
|
+
return object;
|
|
23585
|
+
};
|
|
23586
|
+
|
|
23587
|
+
/**
|
|
23588
|
+
* Converts this UpdateDatabaseMetadata to JSON.
|
|
23589
|
+
* @function toJSON
|
|
23590
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23591
|
+
* @instance
|
|
23592
|
+
* @returns {Object.<string,*>} JSON object
|
|
23593
|
+
*/
|
|
23594
|
+
UpdateDatabaseMetadata.prototype.toJSON = function toJSON() {
|
|
23595
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23596
|
+
};
|
|
23597
|
+
|
|
23598
|
+
/**
|
|
23599
|
+
* Gets the default type url for UpdateDatabaseMetadata
|
|
23600
|
+
* @function getTypeUrl
|
|
23601
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseMetadata
|
|
23602
|
+
* @static
|
|
23603
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23604
|
+
* @returns {string} The default type url
|
|
23605
|
+
*/
|
|
23606
|
+
UpdateDatabaseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23607
|
+
if (typeUrlPrefix === undefined) {
|
|
23608
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23609
|
+
}
|
|
23610
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.UpdateDatabaseMetadata";
|
|
23611
|
+
};
|
|
23612
|
+
|
|
23613
|
+
return UpdateDatabaseMetadata;
|
|
23614
|
+
})();
|
|
23615
|
+
|
|
23035
23616
|
v1.UpdateDatabaseDdlRequest = (function() {
|
|
23036
23617
|
|
|
23037
23618
|
/**
|