@google-cloud/spanner 7.9.1 → 7.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 +18 -0
- package/build/protos/google/spanner/admin/database/v1/backup.proto +17 -0
- package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +227 -0
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +60 -0
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +13 -0
- package/build/protos/google/spanner/v1/spanner.proto +78 -0
- package/build/protos/protos.d.ts +1416 -119
- package/build/protos/protos.js +3011 -2
- package/build/protos/protos.json +382 -11
- package/build/src/database.js +25 -8
- package/build/src/transaction.d.ts +1 -0
- package/build/src/v1/database_admin_client.d.ts +240 -0
- package/build/src/v1/database_admin_client.js +256 -0
- package/build/src/v1/database_admin_client_config.json +25 -0
- package/build/src/v1/database_admin_proto_list.json +1 -0
- package/build/src/v1/spanner_client.d.ts +22 -0
- package/build/src/v1/spanner_client.js +14 -6
- package/build/src/v1/spanner_executor_proxy_client.d.ts +42 -0
- package/build/src/v1/spanner_executor_proxy_client.js +59 -2
- package/build/src/v1/spanner_executor_proxy_proto_list.json +1 -0
- package/package.json +2 -2
package/build/protos/protos.js
CHANGED
|
@@ -17702,6 +17702,7 @@
|
|
|
17702
17702
|
* @property {google.spanner.admin.database.v1.DatabaseDialect|null} [databaseDialect] Backup databaseDialect
|
|
17703
17703
|
* @property {Array.<string>|null} [referencingBackups] Backup referencingBackups
|
|
17704
17704
|
* @property {google.protobuf.ITimestamp|null} [maxExpireTime] Backup maxExpireTime
|
|
17705
|
+
* @property {Array.<string>|null} [backupSchedules] Backup backupSchedules
|
|
17705
17706
|
*/
|
|
17706
17707
|
|
|
17707
17708
|
/**
|
|
@@ -17716,6 +17717,7 @@
|
|
|
17716
17717
|
this.referencingDatabases = [];
|
|
17717
17718
|
this.encryptionInformation = [];
|
|
17718
17719
|
this.referencingBackups = [];
|
|
17720
|
+
this.backupSchedules = [];
|
|
17719
17721
|
if (properties)
|
|
17720
17722
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
17721
17723
|
if (properties[keys[i]] != null)
|
|
@@ -17826,6 +17828,14 @@
|
|
|
17826
17828
|
*/
|
|
17827
17829
|
Backup.prototype.maxExpireTime = null;
|
|
17828
17830
|
|
|
17831
|
+
/**
|
|
17832
|
+
* Backup backupSchedules.
|
|
17833
|
+
* @member {Array.<string>} backupSchedules
|
|
17834
|
+
* @memberof google.spanner.admin.database.v1.Backup
|
|
17835
|
+
* @instance
|
|
17836
|
+
*/
|
|
17837
|
+
Backup.prototype.backupSchedules = $util.emptyArray;
|
|
17838
|
+
|
|
17829
17839
|
/**
|
|
17830
17840
|
* Creates a new Backup instance using the specified properties.
|
|
17831
17841
|
* @function create
|
|
@@ -17879,6 +17889,9 @@
|
|
|
17879
17889
|
if (message.encryptionInformation != null && message.encryptionInformation.length)
|
|
17880
17890
|
for (var i = 0; i < message.encryptionInformation.length; ++i)
|
|
17881
17891
|
$root.google.spanner.admin.database.v1.EncryptionInfo.encode(message.encryptionInformation[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
17892
|
+
if (message.backupSchedules != null && message.backupSchedules.length)
|
|
17893
|
+
for (var i = 0; i < message.backupSchedules.length; ++i)
|
|
17894
|
+
writer.uint32(/* id 14, wireType 2 =*/114).string(message.backupSchedules[i]);
|
|
17882
17895
|
return writer;
|
|
17883
17896
|
};
|
|
17884
17897
|
|
|
@@ -17971,6 +17984,12 @@
|
|
|
17971
17984
|
message.maxExpireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
17972
17985
|
break;
|
|
17973
17986
|
}
|
|
17987
|
+
case 14: {
|
|
17988
|
+
if (!(message.backupSchedules && message.backupSchedules.length))
|
|
17989
|
+
message.backupSchedules = [];
|
|
17990
|
+
message.backupSchedules.push(reader.string());
|
|
17991
|
+
break;
|
|
17992
|
+
}
|
|
17974
17993
|
default:
|
|
17975
17994
|
reader.skipType(tag & 7);
|
|
17976
17995
|
break;
|
|
@@ -18081,6 +18100,13 @@
|
|
|
18081
18100
|
if (error)
|
|
18082
18101
|
return "maxExpireTime." + error;
|
|
18083
18102
|
}
|
|
18103
|
+
if (message.backupSchedules != null && message.hasOwnProperty("backupSchedules")) {
|
|
18104
|
+
if (!Array.isArray(message.backupSchedules))
|
|
18105
|
+
return "backupSchedules: array expected";
|
|
18106
|
+
for (var i = 0; i < message.backupSchedules.length; ++i)
|
|
18107
|
+
if (!$util.isString(message.backupSchedules[i]))
|
|
18108
|
+
return "backupSchedules: string[] expected";
|
|
18109
|
+
}
|
|
18084
18110
|
return null;
|
|
18085
18111
|
};
|
|
18086
18112
|
|
|
@@ -18198,6 +18224,13 @@
|
|
|
18198
18224
|
throw TypeError(".google.spanner.admin.database.v1.Backup.maxExpireTime: object expected");
|
|
18199
18225
|
message.maxExpireTime = $root.google.protobuf.Timestamp.fromObject(object.maxExpireTime);
|
|
18200
18226
|
}
|
|
18227
|
+
if (object.backupSchedules) {
|
|
18228
|
+
if (!Array.isArray(object.backupSchedules))
|
|
18229
|
+
throw TypeError(".google.spanner.admin.database.v1.Backup.backupSchedules: array expected");
|
|
18230
|
+
message.backupSchedules = [];
|
|
18231
|
+
for (var i = 0; i < object.backupSchedules.length; ++i)
|
|
18232
|
+
message.backupSchedules[i] = String(object.backupSchedules[i]);
|
|
18233
|
+
}
|
|
18201
18234
|
return message;
|
|
18202
18235
|
};
|
|
18203
18236
|
|
|
@@ -18218,6 +18251,7 @@
|
|
|
18218
18251
|
object.referencingDatabases = [];
|
|
18219
18252
|
object.referencingBackups = [];
|
|
18220
18253
|
object.encryptionInformation = [];
|
|
18254
|
+
object.backupSchedules = [];
|
|
18221
18255
|
}
|
|
18222
18256
|
if (options.defaults) {
|
|
18223
18257
|
object.name = "";
|
|
@@ -18273,6 +18307,11 @@
|
|
|
18273
18307
|
for (var j = 0; j < message.encryptionInformation.length; ++j)
|
|
18274
18308
|
object.encryptionInformation[j] = $root.google.spanner.admin.database.v1.EncryptionInfo.toObject(message.encryptionInformation[j], options);
|
|
18275
18309
|
}
|
|
18310
|
+
if (message.backupSchedules && message.backupSchedules.length) {
|
|
18311
|
+
object.backupSchedules = [];
|
|
18312
|
+
for (var j = 0; j < message.backupSchedules.length; ++j)
|
|
18313
|
+
object.backupSchedules[j] = message.backupSchedules[j];
|
|
18314
|
+
}
|
|
18276
18315
|
return object;
|
|
18277
18316
|
};
|
|
18278
18317
|
|
|
@@ -22072,6 +22111,181 @@
|
|
|
22072
22111
|
return CopyBackupEncryptionConfig;
|
|
22073
22112
|
})();
|
|
22074
22113
|
|
|
22114
|
+
v1.FullBackupSpec = (function() {
|
|
22115
|
+
|
|
22116
|
+
/**
|
|
22117
|
+
* Properties of a FullBackupSpec.
|
|
22118
|
+
* @memberof google.spanner.admin.database.v1
|
|
22119
|
+
* @interface IFullBackupSpec
|
|
22120
|
+
*/
|
|
22121
|
+
|
|
22122
|
+
/**
|
|
22123
|
+
* Constructs a new FullBackupSpec.
|
|
22124
|
+
* @memberof google.spanner.admin.database.v1
|
|
22125
|
+
* @classdesc Represents a FullBackupSpec.
|
|
22126
|
+
* @implements IFullBackupSpec
|
|
22127
|
+
* @constructor
|
|
22128
|
+
* @param {google.spanner.admin.database.v1.IFullBackupSpec=} [properties] Properties to set
|
|
22129
|
+
*/
|
|
22130
|
+
function FullBackupSpec(properties) {
|
|
22131
|
+
if (properties)
|
|
22132
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
22133
|
+
if (properties[keys[i]] != null)
|
|
22134
|
+
this[keys[i]] = properties[keys[i]];
|
|
22135
|
+
}
|
|
22136
|
+
|
|
22137
|
+
/**
|
|
22138
|
+
* Creates a new FullBackupSpec instance using the specified properties.
|
|
22139
|
+
* @function create
|
|
22140
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22141
|
+
* @static
|
|
22142
|
+
* @param {google.spanner.admin.database.v1.IFullBackupSpec=} [properties] Properties to set
|
|
22143
|
+
* @returns {google.spanner.admin.database.v1.FullBackupSpec} FullBackupSpec instance
|
|
22144
|
+
*/
|
|
22145
|
+
FullBackupSpec.create = function create(properties) {
|
|
22146
|
+
return new FullBackupSpec(properties);
|
|
22147
|
+
};
|
|
22148
|
+
|
|
22149
|
+
/**
|
|
22150
|
+
* Encodes the specified FullBackupSpec message. Does not implicitly {@link google.spanner.admin.database.v1.FullBackupSpec.verify|verify} messages.
|
|
22151
|
+
* @function encode
|
|
22152
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22153
|
+
* @static
|
|
22154
|
+
* @param {google.spanner.admin.database.v1.IFullBackupSpec} message FullBackupSpec message or plain object to encode
|
|
22155
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
22156
|
+
* @returns {$protobuf.Writer} Writer
|
|
22157
|
+
*/
|
|
22158
|
+
FullBackupSpec.encode = function encode(message, writer) {
|
|
22159
|
+
if (!writer)
|
|
22160
|
+
writer = $Writer.create();
|
|
22161
|
+
return writer;
|
|
22162
|
+
};
|
|
22163
|
+
|
|
22164
|
+
/**
|
|
22165
|
+
* Encodes the specified FullBackupSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.FullBackupSpec.verify|verify} messages.
|
|
22166
|
+
* @function encodeDelimited
|
|
22167
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22168
|
+
* @static
|
|
22169
|
+
* @param {google.spanner.admin.database.v1.IFullBackupSpec} message FullBackupSpec message or plain object to encode
|
|
22170
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
22171
|
+
* @returns {$protobuf.Writer} Writer
|
|
22172
|
+
*/
|
|
22173
|
+
FullBackupSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
22174
|
+
return this.encode(message, writer).ldelim();
|
|
22175
|
+
};
|
|
22176
|
+
|
|
22177
|
+
/**
|
|
22178
|
+
* Decodes a FullBackupSpec message from the specified reader or buffer.
|
|
22179
|
+
* @function decode
|
|
22180
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22181
|
+
* @static
|
|
22182
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
22183
|
+
* @param {number} [length] Message length if known beforehand
|
|
22184
|
+
* @returns {google.spanner.admin.database.v1.FullBackupSpec} FullBackupSpec
|
|
22185
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22186
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22187
|
+
*/
|
|
22188
|
+
FullBackupSpec.decode = function decode(reader, length) {
|
|
22189
|
+
if (!(reader instanceof $Reader))
|
|
22190
|
+
reader = $Reader.create(reader);
|
|
22191
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.FullBackupSpec();
|
|
22192
|
+
while (reader.pos < end) {
|
|
22193
|
+
var tag = reader.uint32();
|
|
22194
|
+
switch (tag >>> 3) {
|
|
22195
|
+
default:
|
|
22196
|
+
reader.skipType(tag & 7);
|
|
22197
|
+
break;
|
|
22198
|
+
}
|
|
22199
|
+
}
|
|
22200
|
+
return message;
|
|
22201
|
+
};
|
|
22202
|
+
|
|
22203
|
+
/**
|
|
22204
|
+
* Decodes a FullBackupSpec message from the specified reader or buffer, length delimited.
|
|
22205
|
+
* @function decodeDelimited
|
|
22206
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22207
|
+
* @static
|
|
22208
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
22209
|
+
* @returns {google.spanner.admin.database.v1.FullBackupSpec} FullBackupSpec
|
|
22210
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
22211
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
22212
|
+
*/
|
|
22213
|
+
FullBackupSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
22214
|
+
if (!(reader instanceof $Reader))
|
|
22215
|
+
reader = new $Reader(reader);
|
|
22216
|
+
return this.decode(reader, reader.uint32());
|
|
22217
|
+
};
|
|
22218
|
+
|
|
22219
|
+
/**
|
|
22220
|
+
* Verifies a FullBackupSpec message.
|
|
22221
|
+
* @function verify
|
|
22222
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22223
|
+
* @static
|
|
22224
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
22225
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
22226
|
+
*/
|
|
22227
|
+
FullBackupSpec.verify = function verify(message) {
|
|
22228
|
+
if (typeof message !== "object" || message === null)
|
|
22229
|
+
return "object expected";
|
|
22230
|
+
return null;
|
|
22231
|
+
};
|
|
22232
|
+
|
|
22233
|
+
/**
|
|
22234
|
+
* Creates a FullBackupSpec message from a plain object. Also converts values to their respective internal types.
|
|
22235
|
+
* @function fromObject
|
|
22236
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22237
|
+
* @static
|
|
22238
|
+
* @param {Object.<string,*>} object Plain object
|
|
22239
|
+
* @returns {google.spanner.admin.database.v1.FullBackupSpec} FullBackupSpec
|
|
22240
|
+
*/
|
|
22241
|
+
FullBackupSpec.fromObject = function fromObject(object) {
|
|
22242
|
+
if (object instanceof $root.google.spanner.admin.database.v1.FullBackupSpec)
|
|
22243
|
+
return object;
|
|
22244
|
+
return new $root.google.spanner.admin.database.v1.FullBackupSpec();
|
|
22245
|
+
};
|
|
22246
|
+
|
|
22247
|
+
/**
|
|
22248
|
+
* Creates a plain object from a FullBackupSpec message. Also converts values to other types if specified.
|
|
22249
|
+
* @function toObject
|
|
22250
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22251
|
+
* @static
|
|
22252
|
+
* @param {google.spanner.admin.database.v1.FullBackupSpec} message FullBackupSpec
|
|
22253
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
22254
|
+
* @returns {Object.<string,*>} Plain object
|
|
22255
|
+
*/
|
|
22256
|
+
FullBackupSpec.toObject = function toObject() {
|
|
22257
|
+
return {};
|
|
22258
|
+
};
|
|
22259
|
+
|
|
22260
|
+
/**
|
|
22261
|
+
* Converts this FullBackupSpec to JSON.
|
|
22262
|
+
* @function toJSON
|
|
22263
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22264
|
+
* @instance
|
|
22265
|
+
* @returns {Object.<string,*>} JSON object
|
|
22266
|
+
*/
|
|
22267
|
+
FullBackupSpec.prototype.toJSON = function toJSON() {
|
|
22268
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
22269
|
+
};
|
|
22270
|
+
|
|
22271
|
+
/**
|
|
22272
|
+
* Gets the default type url for FullBackupSpec
|
|
22273
|
+
* @function getTypeUrl
|
|
22274
|
+
* @memberof google.spanner.admin.database.v1.FullBackupSpec
|
|
22275
|
+
* @static
|
|
22276
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
22277
|
+
* @returns {string} The default type url
|
|
22278
|
+
*/
|
|
22279
|
+
FullBackupSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
22280
|
+
if (typeUrlPrefix === undefined) {
|
|
22281
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
22282
|
+
}
|
|
22283
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.FullBackupSpec";
|
|
22284
|
+
};
|
|
22285
|
+
|
|
22286
|
+
return FullBackupSpec;
|
|
22287
|
+
})();
|
|
22288
|
+
|
|
22075
22289
|
v1.OperationProgress = (function() {
|
|
22076
22290
|
|
|
22077
22291
|
/**
|
|
@@ -22886,6 +23100,2248 @@
|
|
|
22886
23100
|
return values;
|
|
22887
23101
|
})();
|
|
22888
23102
|
|
|
23103
|
+
v1.BackupScheduleSpec = (function() {
|
|
23104
|
+
|
|
23105
|
+
/**
|
|
23106
|
+
* Properties of a BackupScheduleSpec.
|
|
23107
|
+
* @memberof google.spanner.admin.database.v1
|
|
23108
|
+
* @interface IBackupScheduleSpec
|
|
23109
|
+
* @property {google.spanner.admin.database.v1.ICrontabSpec|null} [cronSpec] BackupScheduleSpec cronSpec
|
|
23110
|
+
*/
|
|
23111
|
+
|
|
23112
|
+
/**
|
|
23113
|
+
* Constructs a new BackupScheduleSpec.
|
|
23114
|
+
* @memberof google.spanner.admin.database.v1
|
|
23115
|
+
* @classdesc Represents a BackupScheduleSpec.
|
|
23116
|
+
* @implements IBackupScheduleSpec
|
|
23117
|
+
* @constructor
|
|
23118
|
+
* @param {google.spanner.admin.database.v1.IBackupScheduleSpec=} [properties] Properties to set
|
|
23119
|
+
*/
|
|
23120
|
+
function BackupScheduleSpec(properties) {
|
|
23121
|
+
if (properties)
|
|
23122
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23123
|
+
if (properties[keys[i]] != null)
|
|
23124
|
+
this[keys[i]] = properties[keys[i]];
|
|
23125
|
+
}
|
|
23126
|
+
|
|
23127
|
+
/**
|
|
23128
|
+
* BackupScheduleSpec cronSpec.
|
|
23129
|
+
* @member {google.spanner.admin.database.v1.ICrontabSpec|null|undefined} cronSpec
|
|
23130
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23131
|
+
* @instance
|
|
23132
|
+
*/
|
|
23133
|
+
BackupScheduleSpec.prototype.cronSpec = null;
|
|
23134
|
+
|
|
23135
|
+
// OneOf field names bound to virtual getters and setters
|
|
23136
|
+
var $oneOfFields;
|
|
23137
|
+
|
|
23138
|
+
/**
|
|
23139
|
+
* BackupScheduleSpec scheduleSpec.
|
|
23140
|
+
* @member {"cronSpec"|undefined} scheduleSpec
|
|
23141
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23142
|
+
* @instance
|
|
23143
|
+
*/
|
|
23144
|
+
Object.defineProperty(BackupScheduleSpec.prototype, "scheduleSpec", {
|
|
23145
|
+
get: $util.oneOfGetter($oneOfFields = ["cronSpec"]),
|
|
23146
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23147
|
+
});
|
|
23148
|
+
|
|
23149
|
+
/**
|
|
23150
|
+
* Creates a new BackupScheduleSpec instance using the specified properties.
|
|
23151
|
+
* @function create
|
|
23152
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23153
|
+
* @static
|
|
23154
|
+
* @param {google.spanner.admin.database.v1.IBackupScheduleSpec=} [properties] Properties to set
|
|
23155
|
+
* @returns {google.spanner.admin.database.v1.BackupScheduleSpec} BackupScheduleSpec instance
|
|
23156
|
+
*/
|
|
23157
|
+
BackupScheduleSpec.create = function create(properties) {
|
|
23158
|
+
return new BackupScheduleSpec(properties);
|
|
23159
|
+
};
|
|
23160
|
+
|
|
23161
|
+
/**
|
|
23162
|
+
* Encodes the specified BackupScheduleSpec message. Does not implicitly {@link google.spanner.admin.database.v1.BackupScheduleSpec.verify|verify} messages.
|
|
23163
|
+
* @function encode
|
|
23164
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23165
|
+
* @static
|
|
23166
|
+
* @param {google.spanner.admin.database.v1.IBackupScheduleSpec} message BackupScheduleSpec message or plain object to encode
|
|
23167
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23168
|
+
* @returns {$protobuf.Writer} Writer
|
|
23169
|
+
*/
|
|
23170
|
+
BackupScheduleSpec.encode = function encode(message, writer) {
|
|
23171
|
+
if (!writer)
|
|
23172
|
+
writer = $Writer.create();
|
|
23173
|
+
if (message.cronSpec != null && Object.hasOwnProperty.call(message, "cronSpec"))
|
|
23174
|
+
$root.google.spanner.admin.database.v1.CrontabSpec.encode(message.cronSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
23175
|
+
return writer;
|
|
23176
|
+
};
|
|
23177
|
+
|
|
23178
|
+
/**
|
|
23179
|
+
* Encodes the specified BackupScheduleSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.BackupScheduleSpec.verify|verify} messages.
|
|
23180
|
+
* @function encodeDelimited
|
|
23181
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23182
|
+
* @static
|
|
23183
|
+
* @param {google.spanner.admin.database.v1.IBackupScheduleSpec} message BackupScheduleSpec message or plain object to encode
|
|
23184
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23185
|
+
* @returns {$protobuf.Writer} Writer
|
|
23186
|
+
*/
|
|
23187
|
+
BackupScheduleSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23188
|
+
return this.encode(message, writer).ldelim();
|
|
23189
|
+
};
|
|
23190
|
+
|
|
23191
|
+
/**
|
|
23192
|
+
* Decodes a BackupScheduleSpec message from the specified reader or buffer.
|
|
23193
|
+
* @function decode
|
|
23194
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23195
|
+
* @static
|
|
23196
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23197
|
+
* @param {number} [length] Message length if known beforehand
|
|
23198
|
+
* @returns {google.spanner.admin.database.v1.BackupScheduleSpec} BackupScheduleSpec
|
|
23199
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23200
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23201
|
+
*/
|
|
23202
|
+
BackupScheduleSpec.decode = function decode(reader, length) {
|
|
23203
|
+
if (!(reader instanceof $Reader))
|
|
23204
|
+
reader = $Reader.create(reader);
|
|
23205
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.BackupScheduleSpec();
|
|
23206
|
+
while (reader.pos < end) {
|
|
23207
|
+
var tag = reader.uint32();
|
|
23208
|
+
switch (tag >>> 3) {
|
|
23209
|
+
case 1: {
|
|
23210
|
+
message.cronSpec = $root.google.spanner.admin.database.v1.CrontabSpec.decode(reader, reader.uint32());
|
|
23211
|
+
break;
|
|
23212
|
+
}
|
|
23213
|
+
default:
|
|
23214
|
+
reader.skipType(tag & 7);
|
|
23215
|
+
break;
|
|
23216
|
+
}
|
|
23217
|
+
}
|
|
23218
|
+
return message;
|
|
23219
|
+
};
|
|
23220
|
+
|
|
23221
|
+
/**
|
|
23222
|
+
* Decodes a BackupScheduleSpec message from the specified reader or buffer, length delimited.
|
|
23223
|
+
* @function decodeDelimited
|
|
23224
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23225
|
+
* @static
|
|
23226
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23227
|
+
* @returns {google.spanner.admin.database.v1.BackupScheduleSpec} BackupScheduleSpec
|
|
23228
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23229
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23230
|
+
*/
|
|
23231
|
+
BackupScheduleSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
23232
|
+
if (!(reader instanceof $Reader))
|
|
23233
|
+
reader = new $Reader(reader);
|
|
23234
|
+
return this.decode(reader, reader.uint32());
|
|
23235
|
+
};
|
|
23236
|
+
|
|
23237
|
+
/**
|
|
23238
|
+
* Verifies a BackupScheduleSpec message.
|
|
23239
|
+
* @function verify
|
|
23240
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23241
|
+
* @static
|
|
23242
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23243
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23244
|
+
*/
|
|
23245
|
+
BackupScheduleSpec.verify = function verify(message) {
|
|
23246
|
+
if (typeof message !== "object" || message === null)
|
|
23247
|
+
return "object expected";
|
|
23248
|
+
var properties = {};
|
|
23249
|
+
if (message.cronSpec != null && message.hasOwnProperty("cronSpec")) {
|
|
23250
|
+
properties.scheduleSpec = 1;
|
|
23251
|
+
{
|
|
23252
|
+
var error = $root.google.spanner.admin.database.v1.CrontabSpec.verify(message.cronSpec);
|
|
23253
|
+
if (error)
|
|
23254
|
+
return "cronSpec." + error;
|
|
23255
|
+
}
|
|
23256
|
+
}
|
|
23257
|
+
return null;
|
|
23258
|
+
};
|
|
23259
|
+
|
|
23260
|
+
/**
|
|
23261
|
+
* Creates a BackupScheduleSpec message from a plain object. Also converts values to their respective internal types.
|
|
23262
|
+
* @function fromObject
|
|
23263
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23264
|
+
* @static
|
|
23265
|
+
* @param {Object.<string,*>} object Plain object
|
|
23266
|
+
* @returns {google.spanner.admin.database.v1.BackupScheduleSpec} BackupScheduleSpec
|
|
23267
|
+
*/
|
|
23268
|
+
BackupScheduleSpec.fromObject = function fromObject(object) {
|
|
23269
|
+
if (object instanceof $root.google.spanner.admin.database.v1.BackupScheduleSpec)
|
|
23270
|
+
return object;
|
|
23271
|
+
var message = new $root.google.spanner.admin.database.v1.BackupScheduleSpec();
|
|
23272
|
+
if (object.cronSpec != null) {
|
|
23273
|
+
if (typeof object.cronSpec !== "object")
|
|
23274
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupScheduleSpec.cronSpec: object expected");
|
|
23275
|
+
message.cronSpec = $root.google.spanner.admin.database.v1.CrontabSpec.fromObject(object.cronSpec);
|
|
23276
|
+
}
|
|
23277
|
+
return message;
|
|
23278
|
+
};
|
|
23279
|
+
|
|
23280
|
+
/**
|
|
23281
|
+
* Creates a plain object from a BackupScheduleSpec message. Also converts values to other types if specified.
|
|
23282
|
+
* @function toObject
|
|
23283
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23284
|
+
* @static
|
|
23285
|
+
* @param {google.spanner.admin.database.v1.BackupScheduleSpec} message BackupScheduleSpec
|
|
23286
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23287
|
+
* @returns {Object.<string,*>} Plain object
|
|
23288
|
+
*/
|
|
23289
|
+
BackupScheduleSpec.toObject = function toObject(message, options) {
|
|
23290
|
+
if (!options)
|
|
23291
|
+
options = {};
|
|
23292
|
+
var object = {};
|
|
23293
|
+
if (message.cronSpec != null && message.hasOwnProperty("cronSpec")) {
|
|
23294
|
+
object.cronSpec = $root.google.spanner.admin.database.v1.CrontabSpec.toObject(message.cronSpec, options);
|
|
23295
|
+
if (options.oneofs)
|
|
23296
|
+
object.scheduleSpec = "cronSpec";
|
|
23297
|
+
}
|
|
23298
|
+
return object;
|
|
23299
|
+
};
|
|
23300
|
+
|
|
23301
|
+
/**
|
|
23302
|
+
* Converts this BackupScheduleSpec to JSON.
|
|
23303
|
+
* @function toJSON
|
|
23304
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23305
|
+
* @instance
|
|
23306
|
+
* @returns {Object.<string,*>} JSON object
|
|
23307
|
+
*/
|
|
23308
|
+
BackupScheduleSpec.prototype.toJSON = function toJSON() {
|
|
23309
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23310
|
+
};
|
|
23311
|
+
|
|
23312
|
+
/**
|
|
23313
|
+
* Gets the default type url for BackupScheduleSpec
|
|
23314
|
+
* @function getTypeUrl
|
|
23315
|
+
* @memberof google.spanner.admin.database.v1.BackupScheduleSpec
|
|
23316
|
+
* @static
|
|
23317
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23318
|
+
* @returns {string} The default type url
|
|
23319
|
+
*/
|
|
23320
|
+
BackupScheduleSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23321
|
+
if (typeUrlPrefix === undefined) {
|
|
23322
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23323
|
+
}
|
|
23324
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.BackupScheduleSpec";
|
|
23325
|
+
};
|
|
23326
|
+
|
|
23327
|
+
return BackupScheduleSpec;
|
|
23328
|
+
})();
|
|
23329
|
+
|
|
23330
|
+
v1.BackupSchedule = (function() {
|
|
23331
|
+
|
|
23332
|
+
/**
|
|
23333
|
+
* Properties of a BackupSchedule.
|
|
23334
|
+
* @memberof google.spanner.admin.database.v1
|
|
23335
|
+
* @interface IBackupSchedule
|
|
23336
|
+
* @property {string|null} [name] BackupSchedule name
|
|
23337
|
+
* @property {google.spanner.admin.database.v1.IBackupScheduleSpec|null} [spec] BackupSchedule spec
|
|
23338
|
+
* @property {google.protobuf.IDuration|null} [retentionDuration] BackupSchedule retentionDuration
|
|
23339
|
+
* @property {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig|null} [encryptionConfig] BackupSchedule encryptionConfig
|
|
23340
|
+
* @property {google.spanner.admin.database.v1.IFullBackupSpec|null} [fullBackupSpec] BackupSchedule fullBackupSpec
|
|
23341
|
+
* @property {google.protobuf.ITimestamp|null} [updateTime] BackupSchedule updateTime
|
|
23342
|
+
*/
|
|
23343
|
+
|
|
23344
|
+
/**
|
|
23345
|
+
* Constructs a new BackupSchedule.
|
|
23346
|
+
* @memberof google.spanner.admin.database.v1
|
|
23347
|
+
* @classdesc Represents a BackupSchedule.
|
|
23348
|
+
* @implements IBackupSchedule
|
|
23349
|
+
* @constructor
|
|
23350
|
+
* @param {google.spanner.admin.database.v1.IBackupSchedule=} [properties] Properties to set
|
|
23351
|
+
*/
|
|
23352
|
+
function BackupSchedule(properties) {
|
|
23353
|
+
if (properties)
|
|
23354
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23355
|
+
if (properties[keys[i]] != null)
|
|
23356
|
+
this[keys[i]] = properties[keys[i]];
|
|
23357
|
+
}
|
|
23358
|
+
|
|
23359
|
+
/**
|
|
23360
|
+
* BackupSchedule name.
|
|
23361
|
+
* @member {string} name
|
|
23362
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23363
|
+
* @instance
|
|
23364
|
+
*/
|
|
23365
|
+
BackupSchedule.prototype.name = "";
|
|
23366
|
+
|
|
23367
|
+
/**
|
|
23368
|
+
* BackupSchedule spec.
|
|
23369
|
+
* @member {google.spanner.admin.database.v1.IBackupScheduleSpec|null|undefined} spec
|
|
23370
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23371
|
+
* @instance
|
|
23372
|
+
*/
|
|
23373
|
+
BackupSchedule.prototype.spec = null;
|
|
23374
|
+
|
|
23375
|
+
/**
|
|
23376
|
+
* BackupSchedule retentionDuration.
|
|
23377
|
+
* @member {google.protobuf.IDuration|null|undefined} retentionDuration
|
|
23378
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23379
|
+
* @instance
|
|
23380
|
+
*/
|
|
23381
|
+
BackupSchedule.prototype.retentionDuration = null;
|
|
23382
|
+
|
|
23383
|
+
/**
|
|
23384
|
+
* BackupSchedule encryptionConfig.
|
|
23385
|
+
* @member {google.spanner.admin.database.v1.ICreateBackupEncryptionConfig|null|undefined} encryptionConfig
|
|
23386
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23387
|
+
* @instance
|
|
23388
|
+
*/
|
|
23389
|
+
BackupSchedule.prototype.encryptionConfig = null;
|
|
23390
|
+
|
|
23391
|
+
/**
|
|
23392
|
+
* BackupSchedule fullBackupSpec.
|
|
23393
|
+
* @member {google.spanner.admin.database.v1.IFullBackupSpec|null|undefined} fullBackupSpec
|
|
23394
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23395
|
+
* @instance
|
|
23396
|
+
*/
|
|
23397
|
+
BackupSchedule.prototype.fullBackupSpec = null;
|
|
23398
|
+
|
|
23399
|
+
/**
|
|
23400
|
+
* BackupSchedule updateTime.
|
|
23401
|
+
* @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
|
23402
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23403
|
+
* @instance
|
|
23404
|
+
*/
|
|
23405
|
+
BackupSchedule.prototype.updateTime = null;
|
|
23406
|
+
|
|
23407
|
+
// OneOf field names bound to virtual getters and setters
|
|
23408
|
+
var $oneOfFields;
|
|
23409
|
+
|
|
23410
|
+
/**
|
|
23411
|
+
* BackupSchedule backupTypeSpec.
|
|
23412
|
+
* @member {"fullBackupSpec"|undefined} backupTypeSpec
|
|
23413
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23414
|
+
* @instance
|
|
23415
|
+
*/
|
|
23416
|
+
Object.defineProperty(BackupSchedule.prototype, "backupTypeSpec", {
|
|
23417
|
+
get: $util.oneOfGetter($oneOfFields = ["fullBackupSpec"]),
|
|
23418
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23419
|
+
});
|
|
23420
|
+
|
|
23421
|
+
/**
|
|
23422
|
+
* Creates a new BackupSchedule instance using the specified properties.
|
|
23423
|
+
* @function create
|
|
23424
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23425
|
+
* @static
|
|
23426
|
+
* @param {google.spanner.admin.database.v1.IBackupSchedule=} [properties] Properties to set
|
|
23427
|
+
* @returns {google.spanner.admin.database.v1.BackupSchedule} BackupSchedule instance
|
|
23428
|
+
*/
|
|
23429
|
+
BackupSchedule.create = function create(properties) {
|
|
23430
|
+
return new BackupSchedule(properties);
|
|
23431
|
+
};
|
|
23432
|
+
|
|
23433
|
+
/**
|
|
23434
|
+
* Encodes the specified BackupSchedule message. Does not implicitly {@link google.spanner.admin.database.v1.BackupSchedule.verify|verify} messages.
|
|
23435
|
+
* @function encode
|
|
23436
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23437
|
+
* @static
|
|
23438
|
+
* @param {google.spanner.admin.database.v1.IBackupSchedule} message BackupSchedule message or plain object to encode
|
|
23439
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23440
|
+
* @returns {$protobuf.Writer} Writer
|
|
23441
|
+
*/
|
|
23442
|
+
BackupSchedule.encode = function encode(message, writer) {
|
|
23443
|
+
if (!writer)
|
|
23444
|
+
writer = $Writer.create();
|
|
23445
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
23446
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
23447
|
+
if (message.retentionDuration != null && Object.hasOwnProperty.call(message, "retentionDuration"))
|
|
23448
|
+
$root.google.protobuf.Duration.encode(message.retentionDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
23449
|
+
if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig"))
|
|
23450
|
+
$root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
23451
|
+
if (message.spec != null && Object.hasOwnProperty.call(message, "spec"))
|
|
23452
|
+
$root.google.spanner.admin.database.v1.BackupScheduleSpec.encode(message.spec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
23453
|
+
if (message.fullBackupSpec != null && Object.hasOwnProperty.call(message, "fullBackupSpec"))
|
|
23454
|
+
$root.google.spanner.admin.database.v1.FullBackupSpec.encode(message.fullBackupSpec, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
23455
|
+
if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
|
23456
|
+
$root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
|
23457
|
+
return writer;
|
|
23458
|
+
};
|
|
23459
|
+
|
|
23460
|
+
/**
|
|
23461
|
+
* Encodes the specified BackupSchedule message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.BackupSchedule.verify|verify} messages.
|
|
23462
|
+
* @function encodeDelimited
|
|
23463
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23464
|
+
* @static
|
|
23465
|
+
* @param {google.spanner.admin.database.v1.IBackupSchedule} message BackupSchedule message or plain object to encode
|
|
23466
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23467
|
+
* @returns {$protobuf.Writer} Writer
|
|
23468
|
+
*/
|
|
23469
|
+
BackupSchedule.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23470
|
+
return this.encode(message, writer).ldelim();
|
|
23471
|
+
};
|
|
23472
|
+
|
|
23473
|
+
/**
|
|
23474
|
+
* Decodes a BackupSchedule message from the specified reader or buffer.
|
|
23475
|
+
* @function decode
|
|
23476
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23477
|
+
* @static
|
|
23478
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23479
|
+
* @param {number} [length] Message length if known beforehand
|
|
23480
|
+
* @returns {google.spanner.admin.database.v1.BackupSchedule} BackupSchedule
|
|
23481
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23482
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23483
|
+
*/
|
|
23484
|
+
BackupSchedule.decode = function decode(reader, length) {
|
|
23485
|
+
if (!(reader instanceof $Reader))
|
|
23486
|
+
reader = $Reader.create(reader);
|
|
23487
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.BackupSchedule();
|
|
23488
|
+
while (reader.pos < end) {
|
|
23489
|
+
var tag = reader.uint32();
|
|
23490
|
+
switch (tag >>> 3) {
|
|
23491
|
+
case 1: {
|
|
23492
|
+
message.name = reader.string();
|
|
23493
|
+
break;
|
|
23494
|
+
}
|
|
23495
|
+
case 6: {
|
|
23496
|
+
message.spec = $root.google.spanner.admin.database.v1.BackupScheduleSpec.decode(reader, reader.uint32());
|
|
23497
|
+
break;
|
|
23498
|
+
}
|
|
23499
|
+
case 3: {
|
|
23500
|
+
message.retentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
|
23501
|
+
break;
|
|
23502
|
+
}
|
|
23503
|
+
case 4: {
|
|
23504
|
+
message.encryptionConfig = $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.decode(reader, reader.uint32());
|
|
23505
|
+
break;
|
|
23506
|
+
}
|
|
23507
|
+
case 7: {
|
|
23508
|
+
message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.decode(reader, reader.uint32());
|
|
23509
|
+
break;
|
|
23510
|
+
}
|
|
23511
|
+
case 9: {
|
|
23512
|
+
message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
23513
|
+
break;
|
|
23514
|
+
}
|
|
23515
|
+
default:
|
|
23516
|
+
reader.skipType(tag & 7);
|
|
23517
|
+
break;
|
|
23518
|
+
}
|
|
23519
|
+
}
|
|
23520
|
+
return message;
|
|
23521
|
+
};
|
|
23522
|
+
|
|
23523
|
+
/**
|
|
23524
|
+
* Decodes a BackupSchedule message from the specified reader or buffer, length delimited.
|
|
23525
|
+
* @function decodeDelimited
|
|
23526
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23527
|
+
* @static
|
|
23528
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23529
|
+
* @returns {google.spanner.admin.database.v1.BackupSchedule} BackupSchedule
|
|
23530
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23531
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23532
|
+
*/
|
|
23533
|
+
BackupSchedule.decodeDelimited = function decodeDelimited(reader) {
|
|
23534
|
+
if (!(reader instanceof $Reader))
|
|
23535
|
+
reader = new $Reader(reader);
|
|
23536
|
+
return this.decode(reader, reader.uint32());
|
|
23537
|
+
};
|
|
23538
|
+
|
|
23539
|
+
/**
|
|
23540
|
+
* Verifies a BackupSchedule message.
|
|
23541
|
+
* @function verify
|
|
23542
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23543
|
+
* @static
|
|
23544
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23545
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23546
|
+
*/
|
|
23547
|
+
BackupSchedule.verify = function verify(message) {
|
|
23548
|
+
if (typeof message !== "object" || message === null)
|
|
23549
|
+
return "object expected";
|
|
23550
|
+
var properties = {};
|
|
23551
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
23552
|
+
if (!$util.isString(message.name))
|
|
23553
|
+
return "name: string expected";
|
|
23554
|
+
if (message.spec != null && message.hasOwnProperty("spec")) {
|
|
23555
|
+
var error = $root.google.spanner.admin.database.v1.BackupScheduleSpec.verify(message.spec);
|
|
23556
|
+
if (error)
|
|
23557
|
+
return "spec." + error;
|
|
23558
|
+
}
|
|
23559
|
+
if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration")) {
|
|
23560
|
+
var error = $root.google.protobuf.Duration.verify(message.retentionDuration);
|
|
23561
|
+
if (error)
|
|
23562
|
+
return "retentionDuration." + error;
|
|
23563
|
+
}
|
|
23564
|
+
if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) {
|
|
23565
|
+
var error = $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.verify(message.encryptionConfig);
|
|
23566
|
+
if (error)
|
|
23567
|
+
return "encryptionConfig." + error;
|
|
23568
|
+
}
|
|
23569
|
+
if (message.fullBackupSpec != null && message.hasOwnProperty("fullBackupSpec")) {
|
|
23570
|
+
properties.backupTypeSpec = 1;
|
|
23571
|
+
{
|
|
23572
|
+
var error = $root.google.spanner.admin.database.v1.FullBackupSpec.verify(message.fullBackupSpec);
|
|
23573
|
+
if (error)
|
|
23574
|
+
return "fullBackupSpec." + error;
|
|
23575
|
+
}
|
|
23576
|
+
}
|
|
23577
|
+
if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
|
23578
|
+
var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
|
23579
|
+
if (error)
|
|
23580
|
+
return "updateTime." + error;
|
|
23581
|
+
}
|
|
23582
|
+
return null;
|
|
23583
|
+
};
|
|
23584
|
+
|
|
23585
|
+
/**
|
|
23586
|
+
* Creates a BackupSchedule message from a plain object. Also converts values to their respective internal types.
|
|
23587
|
+
* @function fromObject
|
|
23588
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23589
|
+
* @static
|
|
23590
|
+
* @param {Object.<string,*>} object Plain object
|
|
23591
|
+
* @returns {google.spanner.admin.database.v1.BackupSchedule} BackupSchedule
|
|
23592
|
+
*/
|
|
23593
|
+
BackupSchedule.fromObject = function fromObject(object) {
|
|
23594
|
+
if (object instanceof $root.google.spanner.admin.database.v1.BackupSchedule)
|
|
23595
|
+
return object;
|
|
23596
|
+
var message = new $root.google.spanner.admin.database.v1.BackupSchedule();
|
|
23597
|
+
if (object.name != null)
|
|
23598
|
+
message.name = String(object.name);
|
|
23599
|
+
if (object.spec != null) {
|
|
23600
|
+
if (typeof object.spec !== "object")
|
|
23601
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.spec: object expected");
|
|
23602
|
+
message.spec = $root.google.spanner.admin.database.v1.BackupScheduleSpec.fromObject(object.spec);
|
|
23603
|
+
}
|
|
23604
|
+
if (object.retentionDuration != null) {
|
|
23605
|
+
if (typeof object.retentionDuration !== "object")
|
|
23606
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.retentionDuration: object expected");
|
|
23607
|
+
message.retentionDuration = $root.google.protobuf.Duration.fromObject(object.retentionDuration);
|
|
23608
|
+
}
|
|
23609
|
+
if (object.encryptionConfig != null) {
|
|
23610
|
+
if (typeof object.encryptionConfig !== "object")
|
|
23611
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.encryptionConfig: object expected");
|
|
23612
|
+
message.encryptionConfig = $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.fromObject(object.encryptionConfig);
|
|
23613
|
+
}
|
|
23614
|
+
if (object.fullBackupSpec != null) {
|
|
23615
|
+
if (typeof object.fullBackupSpec !== "object")
|
|
23616
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.fullBackupSpec: object expected");
|
|
23617
|
+
message.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.fromObject(object.fullBackupSpec);
|
|
23618
|
+
}
|
|
23619
|
+
if (object.updateTime != null) {
|
|
23620
|
+
if (typeof object.updateTime !== "object")
|
|
23621
|
+
throw TypeError(".google.spanner.admin.database.v1.BackupSchedule.updateTime: object expected");
|
|
23622
|
+
message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
|
|
23623
|
+
}
|
|
23624
|
+
return message;
|
|
23625
|
+
};
|
|
23626
|
+
|
|
23627
|
+
/**
|
|
23628
|
+
* Creates a plain object from a BackupSchedule message. Also converts values to other types if specified.
|
|
23629
|
+
* @function toObject
|
|
23630
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23631
|
+
* @static
|
|
23632
|
+
* @param {google.spanner.admin.database.v1.BackupSchedule} message BackupSchedule
|
|
23633
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23634
|
+
* @returns {Object.<string,*>} Plain object
|
|
23635
|
+
*/
|
|
23636
|
+
BackupSchedule.toObject = function toObject(message, options) {
|
|
23637
|
+
if (!options)
|
|
23638
|
+
options = {};
|
|
23639
|
+
var object = {};
|
|
23640
|
+
if (options.defaults) {
|
|
23641
|
+
object.name = "";
|
|
23642
|
+
object.retentionDuration = null;
|
|
23643
|
+
object.encryptionConfig = null;
|
|
23644
|
+
object.spec = null;
|
|
23645
|
+
object.updateTime = null;
|
|
23646
|
+
}
|
|
23647
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
23648
|
+
object.name = message.name;
|
|
23649
|
+
if (message.retentionDuration != null && message.hasOwnProperty("retentionDuration"))
|
|
23650
|
+
object.retentionDuration = $root.google.protobuf.Duration.toObject(message.retentionDuration, options);
|
|
23651
|
+
if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig"))
|
|
23652
|
+
object.encryptionConfig = $root.google.spanner.admin.database.v1.CreateBackupEncryptionConfig.toObject(message.encryptionConfig, options);
|
|
23653
|
+
if (message.spec != null && message.hasOwnProperty("spec"))
|
|
23654
|
+
object.spec = $root.google.spanner.admin.database.v1.BackupScheduleSpec.toObject(message.spec, options);
|
|
23655
|
+
if (message.fullBackupSpec != null && message.hasOwnProperty("fullBackupSpec")) {
|
|
23656
|
+
object.fullBackupSpec = $root.google.spanner.admin.database.v1.FullBackupSpec.toObject(message.fullBackupSpec, options);
|
|
23657
|
+
if (options.oneofs)
|
|
23658
|
+
object.backupTypeSpec = "fullBackupSpec";
|
|
23659
|
+
}
|
|
23660
|
+
if (message.updateTime != null && message.hasOwnProperty("updateTime"))
|
|
23661
|
+
object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
|
23662
|
+
return object;
|
|
23663
|
+
};
|
|
23664
|
+
|
|
23665
|
+
/**
|
|
23666
|
+
* Converts this BackupSchedule to JSON.
|
|
23667
|
+
* @function toJSON
|
|
23668
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23669
|
+
* @instance
|
|
23670
|
+
* @returns {Object.<string,*>} JSON object
|
|
23671
|
+
*/
|
|
23672
|
+
BackupSchedule.prototype.toJSON = function toJSON() {
|
|
23673
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23674
|
+
};
|
|
23675
|
+
|
|
23676
|
+
/**
|
|
23677
|
+
* Gets the default type url for BackupSchedule
|
|
23678
|
+
* @function getTypeUrl
|
|
23679
|
+
* @memberof google.spanner.admin.database.v1.BackupSchedule
|
|
23680
|
+
* @static
|
|
23681
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23682
|
+
* @returns {string} The default type url
|
|
23683
|
+
*/
|
|
23684
|
+
BackupSchedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23685
|
+
if (typeUrlPrefix === undefined) {
|
|
23686
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23687
|
+
}
|
|
23688
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.BackupSchedule";
|
|
23689
|
+
};
|
|
23690
|
+
|
|
23691
|
+
return BackupSchedule;
|
|
23692
|
+
})();
|
|
23693
|
+
|
|
23694
|
+
v1.CrontabSpec = (function() {
|
|
23695
|
+
|
|
23696
|
+
/**
|
|
23697
|
+
* Properties of a CrontabSpec.
|
|
23698
|
+
* @memberof google.spanner.admin.database.v1
|
|
23699
|
+
* @interface ICrontabSpec
|
|
23700
|
+
* @property {string|null} [text] CrontabSpec text
|
|
23701
|
+
* @property {string|null} [timeZone] CrontabSpec timeZone
|
|
23702
|
+
* @property {google.protobuf.IDuration|null} [creationWindow] CrontabSpec creationWindow
|
|
23703
|
+
*/
|
|
23704
|
+
|
|
23705
|
+
/**
|
|
23706
|
+
* Constructs a new CrontabSpec.
|
|
23707
|
+
* @memberof google.spanner.admin.database.v1
|
|
23708
|
+
* @classdesc Represents a CrontabSpec.
|
|
23709
|
+
* @implements ICrontabSpec
|
|
23710
|
+
* @constructor
|
|
23711
|
+
* @param {google.spanner.admin.database.v1.ICrontabSpec=} [properties] Properties to set
|
|
23712
|
+
*/
|
|
23713
|
+
function CrontabSpec(properties) {
|
|
23714
|
+
if (properties)
|
|
23715
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23716
|
+
if (properties[keys[i]] != null)
|
|
23717
|
+
this[keys[i]] = properties[keys[i]];
|
|
23718
|
+
}
|
|
23719
|
+
|
|
23720
|
+
/**
|
|
23721
|
+
* CrontabSpec text.
|
|
23722
|
+
* @member {string} text
|
|
23723
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23724
|
+
* @instance
|
|
23725
|
+
*/
|
|
23726
|
+
CrontabSpec.prototype.text = "";
|
|
23727
|
+
|
|
23728
|
+
/**
|
|
23729
|
+
* CrontabSpec timeZone.
|
|
23730
|
+
* @member {string} timeZone
|
|
23731
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23732
|
+
* @instance
|
|
23733
|
+
*/
|
|
23734
|
+
CrontabSpec.prototype.timeZone = "";
|
|
23735
|
+
|
|
23736
|
+
/**
|
|
23737
|
+
* CrontabSpec creationWindow.
|
|
23738
|
+
* @member {google.protobuf.IDuration|null|undefined} creationWindow
|
|
23739
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23740
|
+
* @instance
|
|
23741
|
+
*/
|
|
23742
|
+
CrontabSpec.prototype.creationWindow = null;
|
|
23743
|
+
|
|
23744
|
+
/**
|
|
23745
|
+
* Creates a new CrontabSpec instance using the specified properties.
|
|
23746
|
+
* @function create
|
|
23747
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23748
|
+
* @static
|
|
23749
|
+
* @param {google.spanner.admin.database.v1.ICrontabSpec=} [properties] Properties to set
|
|
23750
|
+
* @returns {google.spanner.admin.database.v1.CrontabSpec} CrontabSpec instance
|
|
23751
|
+
*/
|
|
23752
|
+
CrontabSpec.create = function create(properties) {
|
|
23753
|
+
return new CrontabSpec(properties);
|
|
23754
|
+
};
|
|
23755
|
+
|
|
23756
|
+
/**
|
|
23757
|
+
* Encodes the specified CrontabSpec message. Does not implicitly {@link google.spanner.admin.database.v1.CrontabSpec.verify|verify} messages.
|
|
23758
|
+
* @function encode
|
|
23759
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23760
|
+
* @static
|
|
23761
|
+
* @param {google.spanner.admin.database.v1.ICrontabSpec} message CrontabSpec message or plain object to encode
|
|
23762
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23763
|
+
* @returns {$protobuf.Writer} Writer
|
|
23764
|
+
*/
|
|
23765
|
+
CrontabSpec.encode = function encode(message, writer) {
|
|
23766
|
+
if (!writer)
|
|
23767
|
+
writer = $Writer.create();
|
|
23768
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
23769
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
|
|
23770
|
+
if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone"))
|
|
23771
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.timeZone);
|
|
23772
|
+
if (message.creationWindow != null && Object.hasOwnProperty.call(message, "creationWindow"))
|
|
23773
|
+
$root.google.protobuf.Duration.encode(message.creationWindow, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
23774
|
+
return writer;
|
|
23775
|
+
};
|
|
23776
|
+
|
|
23777
|
+
/**
|
|
23778
|
+
* Encodes the specified CrontabSpec message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.CrontabSpec.verify|verify} messages.
|
|
23779
|
+
* @function encodeDelimited
|
|
23780
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23781
|
+
* @static
|
|
23782
|
+
* @param {google.spanner.admin.database.v1.ICrontabSpec} message CrontabSpec message or plain object to encode
|
|
23783
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23784
|
+
* @returns {$protobuf.Writer} Writer
|
|
23785
|
+
*/
|
|
23786
|
+
CrontabSpec.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23787
|
+
return this.encode(message, writer).ldelim();
|
|
23788
|
+
};
|
|
23789
|
+
|
|
23790
|
+
/**
|
|
23791
|
+
* Decodes a CrontabSpec message from the specified reader or buffer.
|
|
23792
|
+
* @function decode
|
|
23793
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23794
|
+
* @static
|
|
23795
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23796
|
+
* @param {number} [length] Message length if known beforehand
|
|
23797
|
+
* @returns {google.spanner.admin.database.v1.CrontabSpec} CrontabSpec
|
|
23798
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23799
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23800
|
+
*/
|
|
23801
|
+
CrontabSpec.decode = function decode(reader, length) {
|
|
23802
|
+
if (!(reader instanceof $Reader))
|
|
23803
|
+
reader = $Reader.create(reader);
|
|
23804
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.CrontabSpec();
|
|
23805
|
+
while (reader.pos < end) {
|
|
23806
|
+
var tag = reader.uint32();
|
|
23807
|
+
switch (tag >>> 3) {
|
|
23808
|
+
case 1: {
|
|
23809
|
+
message.text = reader.string();
|
|
23810
|
+
break;
|
|
23811
|
+
}
|
|
23812
|
+
case 2: {
|
|
23813
|
+
message.timeZone = reader.string();
|
|
23814
|
+
break;
|
|
23815
|
+
}
|
|
23816
|
+
case 3: {
|
|
23817
|
+
message.creationWindow = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
|
23818
|
+
break;
|
|
23819
|
+
}
|
|
23820
|
+
default:
|
|
23821
|
+
reader.skipType(tag & 7);
|
|
23822
|
+
break;
|
|
23823
|
+
}
|
|
23824
|
+
}
|
|
23825
|
+
return message;
|
|
23826
|
+
};
|
|
23827
|
+
|
|
23828
|
+
/**
|
|
23829
|
+
* Decodes a CrontabSpec message from the specified reader or buffer, length delimited.
|
|
23830
|
+
* @function decodeDelimited
|
|
23831
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23832
|
+
* @static
|
|
23833
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23834
|
+
* @returns {google.spanner.admin.database.v1.CrontabSpec} CrontabSpec
|
|
23835
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23836
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23837
|
+
*/
|
|
23838
|
+
CrontabSpec.decodeDelimited = function decodeDelimited(reader) {
|
|
23839
|
+
if (!(reader instanceof $Reader))
|
|
23840
|
+
reader = new $Reader(reader);
|
|
23841
|
+
return this.decode(reader, reader.uint32());
|
|
23842
|
+
};
|
|
23843
|
+
|
|
23844
|
+
/**
|
|
23845
|
+
* Verifies a CrontabSpec message.
|
|
23846
|
+
* @function verify
|
|
23847
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23848
|
+
* @static
|
|
23849
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23850
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23851
|
+
*/
|
|
23852
|
+
CrontabSpec.verify = function verify(message) {
|
|
23853
|
+
if (typeof message !== "object" || message === null)
|
|
23854
|
+
return "object expected";
|
|
23855
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
23856
|
+
if (!$util.isString(message.text))
|
|
23857
|
+
return "text: string expected";
|
|
23858
|
+
if (message.timeZone != null && message.hasOwnProperty("timeZone"))
|
|
23859
|
+
if (!$util.isString(message.timeZone))
|
|
23860
|
+
return "timeZone: string expected";
|
|
23861
|
+
if (message.creationWindow != null && message.hasOwnProperty("creationWindow")) {
|
|
23862
|
+
var error = $root.google.protobuf.Duration.verify(message.creationWindow);
|
|
23863
|
+
if (error)
|
|
23864
|
+
return "creationWindow." + error;
|
|
23865
|
+
}
|
|
23866
|
+
return null;
|
|
23867
|
+
};
|
|
23868
|
+
|
|
23869
|
+
/**
|
|
23870
|
+
* Creates a CrontabSpec message from a plain object. Also converts values to their respective internal types.
|
|
23871
|
+
* @function fromObject
|
|
23872
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23873
|
+
* @static
|
|
23874
|
+
* @param {Object.<string,*>} object Plain object
|
|
23875
|
+
* @returns {google.spanner.admin.database.v1.CrontabSpec} CrontabSpec
|
|
23876
|
+
*/
|
|
23877
|
+
CrontabSpec.fromObject = function fromObject(object) {
|
|
23878
|
+
if (object instanceof $root.google.spanner.admin.database.v1.CrontabSpec)
|
|
23879
|
+
return object;
|
|
23880
|
+
var message = new $root.google.spanner.admin.database.v1.CrontabSpec();
|
|
23881
|
+
if (object.text != null)
|
|
23882
|
+
message.text = String(object.text);
|
|
23883
|
+
if (object.timeZone != null)
|
|
23884
|
+
message.timeZone = String(object.timeZone);
|
|
23885
|
+
if (object.creationWindow != null) {
|
|
23886
|
+
if (typeof object.creationWindow !== "object")
|
|
23887
|
+
throw TypeError(".google.spanner.admin.database.v1.CrontabSpec.creationWindow: object expected");
|
|
23888
|
+
message.creationWindow = $root.google.protobuf.Duration.fromObject(object.creationWindow);
|
|
23889
|
+
}
|
|
23890
|
+
return message;
|
|
23891
|
+
};
|
|
23892
|
+
|
|
23893
|
+
/**
|
|
23894
|
+
* Creates a plain object from a CrontabSpec message. Also converts values to other types if specified.
|
|
23895
|
+
* @function toObject
|
|
23896
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23897
|
+
* @static
|
|
23898
|
+
* @param {google.spanner.admin.database.v1.CrontabSpec} message CrontabSpec
|
|
23899
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23900
|
+
* @returns {Object.<string,*>} Plain object
|
|
23901
|
+
*/
|
|
23902
|
+
CrontabSpec.toObject = function toObject(message, options) {
|
|
23903
|
+
if (!options)
|
|
23904
|
+
options = {};
|
|
23905
|
+
var object = {};
|
|
23906
|
+
if (options.defaults) {
|
|
23907
|
+
object.text = "";
|
|
23908
|
+
object.timeZone = "";
|
|
23909
|
+
object.creationWindow = null;
|
|
23910
|
+
}
|
|
23911
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
23912
|
+
object.text = message.text;
|
|
23913
|
+
if (message.timeZone != null && message.hasOwnProperty("timeZone"))
|
|
23914
|
+
object.timeZone = message.timeZone;
|
|
23915
|
+
if (message.creationWindow != null && message.hasOwnProperty("creationWindow"))
|
|
23916
|
+
object.creationWindow = $root.google.protobuf.Duration.toObject(message.creationWindow, options);
|
|
23917
|
+
return object;
|
|
23918
|
+
};
|
|
23919
|
+
|
|
23920
|
+
/**
|
|
23921
|
+
* Converts this CrontabSpec to JSON.
|
|
23922
|
+
* @function toJSON
|
|
23923
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23924
|
+
* @instance
|
|
23925
|
+
* @returns {Object.<string,*>} JSON object
|
|
23926
|
+
*/
|
|
23927
|
+
CrontabSpec.prototype.toJSON = function toJSON() {
|
|
23928
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23929
|
+
};
|
|
23930
|
+
|
|
23931
|
+
/**
|
|
23932
|
+
* Gets the default type url for CrontabSpec
|
|
23933
|
+
* @function getTypeUrl
|
|
23934
|
+
* @memberof google.spanner.admin.database.v1.CrontabSpec
|
|
23935
|
+
* @static
|
|
23936
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23937
|
+
* @returns {string} The default type url
|
|
23938
|
+
*/
|
|
23939
|
+
CrontabSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23940
|
+
if (typeUrlPrefix === undefined) {
|
|
23941
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23942
|
+
}
|
|
23943
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.CrontabSpec";
|
|
23944
|
+
};
|
|
23945
|
+
|
|
23946
|
+
return CrontabSpec;
|
|
23947
|
+
})();
|
|
23948
|
+
|
|
23949
|
+
v1.CreateBackupScheduleRequest = (function() {
|
|
23950
|
+
|
|
23951
|
+
/**
|
|
23952
|
+
* Properties of a CreateBackupScheduleRequest.
|
|
23953
|
+
* @memberof google.spanner.admin.database.v1
|
|
23954
|
+
* @interface ICreateBackupScheduleRequest
|
|
23955
|
+
* @property {string|null} [parent] CreateBackupScheduleRequest parent
|
|
23956
|
+
* @property {string|null} [backupScheduleId] CreateBackupScheduleRequest backupScheduleId
|
|
23957
|
+
* @property {google.spanner.admin.database.v1.IBackupSchedule|null} [backupSchedule] CreateBackupScheduleRequest backupSchedule
|
|
23958
|
+
*/
|
|
23959
|
+
|
|
23960
|
+
/**
|
|
23961
|
+
* Constructs a new CreateBackupScheduleRequest.
|
|
23962
|
+
* @memberof google.spanner.admin.database.v1
|
|
23963
|
+
* @classdesc Represents a CreateBackupScheduleRequest.
|
|
23964
|
+
* @implements ICreateBackupScheduleRequest
|
|
23965
|
+
* @constructor
|
|
23966
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest=} [properties] Properties to set
|
|
23967
|
+
*/
|
|
23968
|
+
function CreateBackupScheduleRequest(properties) {
|
|
23969
|
+
if (properties)
|
|
23970
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23971
|
+
if (properties[keys[i]] != null)
|
|
23972
|
+
this[keys[i]] = properties[keys[i]];
|
|
23973
|
+
}
|
|
23974
|
+
|
|
23975
|
+
/**
|
|
23976
|
+
* CreateBackupScheduleRequest parent.
|
|
23977
|
+
* @member {string} parent
|
|
23978
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
23979
|
+
* @instance
|
|
23980
|
+
*/
|
|
23981
|
+
CreateBackupScheduleRequest.prototype.parent = "";
|
|
23982
|
+
|
|
23983
|
+
/**
|
|
23984
|
+
* CreateBackupScheduleRequest backupScheduleId.
|
|
23985
|
+
* @member {string} backupScheduleId
|
|
23986
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
23987
|
+
* @instance
|
|
23988
|
+
*/
|
|
23989
|
+
CreateBackupScheduleRequest.prototype.backupScheduleId = "";
|
|
23990
|
+
|
|
23991
|
+
/**
|
|
23992
|
+
* CreateBackupScheduleRequest backupSchedule.
|
|
23993
|
+
* @member {google.spanner.admin.database.v1.IBackupSchedule|null|undefined} backupSchedule
|
|
23994
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
23995
|
+
* @instance
|
|
23996
|
+
*/
|
|
23997
|
+
CreateBackupScheduleRequest.prototype.backupSchedule = null;
|
|
23998
|
+
|
|
23999
|
+
/**
|
|
24000
|
+
* Creates a new CreateBackupScheduleRequest instance using the specified properties.
|
|
24001
|
+
* @function create
|
|
24002
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24003
|
+
* @static
|
|
24004
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest=} [properties] Properties to set
|
|
24005
|
+
* @returns {google.spanner.admin.database.v1.CreateBackupScheduleRequest} CreateBackupScheduleRequest instance
|
|
24006
|
+
*/
|
|
24007
|
+
CreateBackupScheduleRequest.create = function create(properties) {
|
|
24008
|
+
return new CreateBackupScheduleRequest(properties);
|
|
24009
|
+
};
|
|
24010
|
+
|
|
24011
|
+
/**
|
|
24012
|
+
* Encodes the specified CreateBackupScheduleRequest message. Does not implicitly {@link google.spanner.admin.database.v1.CreateBackupScheduleRequest.verify|verify} messages.
|
|
24013
|
+
* @function encode
|
|
24014
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24015
|
+
* @static
|
|
24016
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest} message CreateBackupScheduleRequest message or plain object to encode
|
|
24017
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24018
|
+
* @returns {$protobuf.Writer} Writer
|
|
24019
|
+
*/
|
|
24020
|
+
CreateBackupScheduleRequest.encode = function encode(message, writer) {
|
|
24021
|
+
if (!writer)
|
|
24022
|
+
writer = $Writer.create();
|
|
24023
|
+
if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
|
|
24024
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
|
|
24025
|
+
if (message.backupScheduleId != null && Object.hasOwnProperty.call(message, "backupScheduleId"))
|
|
24026
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.backupScheduleId);
|
|
24027
|
+
if (message.backupSchedule != null && Object.hasOwnProperty.call(message, "backupSchedule"))
|
|
24028
|
+
$root.google.spanner.admin.database.v1.BackupSchedule.encode(message.backupSchedule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
24029
|
+
return writer;
|
|
24030
|
+
};
|
|
24031
|
+
|
|
24032
|
+
/**
|
|
24033
|
+
* Encodes the specified CreateBackupScheduleRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.CreateBackupScheduleRequest.verify|verify} messages.
|
|
24034
|
+
* @function encodeDelimited
|
|
24035
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24036
|
+
* @static
|
|
24037
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest} message CreateBackupScheduleRequest message or plain object to encode
|
|
24038
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24039
|
+
* @returns {$protobuf.Writer} Writer
|
|
24040
|
+
*/
|
|
24041
|
+
CreateBackupScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24042
|
+
return this.encode(message, writer).ldelim();
|
|
24043
|
+
};
|
|
24044
|
+
|
|
24045
|
+
/**
|
|
24046
|
+
* Decodes a CreateBackupScheduleRequest message from the specified reader or buffer.
|
|
24047
|
+
* @function decode
|
|
24048
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24049
|
+
* @static
|
|
24050
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24051
|
+
* @param {number} [length] Message length if known beforehand
|
|
24052
|
+
* @returns {google.spanner.admin.database.v1.CreateBackupScheduleRequest} CreateBackupScheduleRequest
|
|
24053
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24054
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24055
|
+
*/
|
|
24056
|
+
CreateBackupScheduleRequest.decode = function decode(reader, length) {
|
|
24057
|
+
if (!(reader instanceof $Reader))
|
|
24058
|
+
reader = $Reader.create(reader);
|
|
24059
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.CreateBackupScheduleRequest();
|
|
24060
|
+
while (reader.pos < end) {
|
|
24061
|
+
var tag = reader.uint32();
|
|
24062
|
+
switch (tag >>> 3) {
|
|
24063
|
+
case 1: {
|
|
24064
|
+
message.parent = reader.string();
|
|
24065
|
+
break;
|
|
24066
|
+
}
|
|
24067
|
+
case 2: {
|
|
24068
|
+
message.backupScheduleId = reader.string();
|
|
24069
|
+
break;
|
|
24070
|
+
}
|
|
24071
|
+
case 3: {
|
|
24072
|
+
message.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.decode(reader, reader.uint32());
|
|
24073
|
+
break;
|
|
24074
|
+
}
|
|
24075
|
+
default:
|
|
24076
|
+
reader.skipType(tag & 7);
|
|
24077
|
+
break;
|
|
24078
|
+
}
|
|
24079
|
+
}
|
|
24080
|
+
return message;
|
|
24081
|
+
};
|
|
24082
|
+
|
|
24083
|
+
/**
|
|
24084
|
+
* Decodes a CreateBackupScheduleRequest message from the specified reader or buffer, length delimited.
|
|
24085
|
+
* @function decodeDelimited
|
|
24086
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24087
|
+
* @static
|
|
24088
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24089
|
+
* @returns {google.spanner.admin.database.v1.CreateBackupScheduleRequest} CreateBackupScheduleRequest
|
|
24090
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24091
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24092
|
+
*/
|
|
24093
|
+
CreateBackupScheduleRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
24094
|
+
if (!(reader instanceof $Reader))
|
|
24095
|
+
reader = new $Reader(reader);
|
|
24096
|
+
return this.decode(reader, reader.uint32());
|
|
24097
|
+
};
|
|
24098
|
+
|
|
24099
|
+
/**
|
|
24100
|
+
* Verifies a CreateBackupScheduleRequest message.
|
|
24101
|
+
* @function verify
|
|
24102
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24103
|
+
* @static
|
|
24104
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24105
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24106
|
+
*/
|
|
24107
|
+
CreateBackupScheduleRequest.verify = function verify(message) {
|
|
24108
|
+
if (typeof message !== "object" || message === null)
|
|
24109
|
+
return "object expected";
|
|
24110
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
24111
|
+
if (!$util.isString(message.parent))
|
|
24112
|
+
return "parent: string expected";
|
|
24113
|
+
if (message.backupScheduleId != null && message.hasOwnProperty("backupScheduleId"))
|
|
24114
|
+
if (!$util.isString(message.backupScheduleId))
|
|
24115
|
+
return "backupScheduleId: string expected";
|
|
24116
|
+
if (message.backupSchedule != null && message.hasOwnProperty("backupSchedule")) {
|
|
24117
|
+
var error = $root.google.spanner.admin.database.v1.BackupSchedule.verify(message.backupSchedule);
|
|
24118
|
+
if (error)
|
|
24119
|
+
return "backupSchedule." + error;
|
|
24120
|
+
}
|
|
24121
|
+
return null;
|
|
24122
|
+
};
|
|
24123
|
+
|
|
24124
|
+
/**
|
|
24125
|
+
* Creates a CreateBackupScheduleRequest message from a plain object. Also converts values to their respective internal types.
|
|
24126
|
+
* @function fromObject
|
|
24127
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24128
|
+
* @static
|
|
24129
|
+
* @param {Object.<string,*>} object Plain object
|
|
24130
|
+
* @returns {google.spanner.admin.database.v1.CreateBackupScheduleRequest} CreateBackupScheduleRequest
|
|
24131
|
+
*/
|
|
24132
|
+
CreateBackupScheduleRequest.fromObject = function fromObject(object) {
|
|
24133
|
+
if (object instanceof $root.google.spanner.admin.database.v1.CreateBackupScheduleRequest)
|
|
24134
|
+
return object;
|
|
24135
|
+
var message = new $root.google.spanner.admin.database.v1.CreateBackupScheduleRequest();
|
|
24136
|
+
if (object.parent != null)
|
|
24137
|
+
message.parent = String(object.parent);
|
|
24138
|
+
if (object.backupScheduleId != null)
|
|
24139
|
+
message.backupScheduleId = String(object.backupScheduleId);
|
|
24140
|
+
if (object.backupSchedule != null) {
|
|
24141
|
+
if (typeof object.backupSchedule !== "object")
|
|
24142
|
+
throw TypeError(".google.spanner.admin.database.v1.CreateBackupScheduleRequest.backupSchedule: object expected");
|
|
24143
|
+
message.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.fromObject(object.backupSchedule);
|
|
24144
|
+
}
|
|
24145
|
+
return message;
|
|
24146
|
+
};
|
|
24147
|
+
|
|
24148
|
+
/**
|
|
24149
|
+
* Creates a plain object from a CreateBackupScheduleRequest message. Also converts values to other types if specified.
|
|
24150
|
+
* @function toObject
|
|
24151
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24152
|
+
* @static
|
|
24153
|
+
* @param {google.spanner.admin.database.v1.CreateBackupScheduleRequest} message CreateBackupScheduleRequest
|
|
24154
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24155
|
+
* @returns {Object.<string,*>} Plain object
|
|
24156
|
+
*/
|
|
24157
|
+
CreateBackupScheduleRequest.toObject = function toObject(message, options) {
|
|
24158
|
+
if (!options)
|
|
24159
|
+
options = {};
|
|
24160
|
+
var object = {};
|
|
24161
|
+
if (options.defaults) {
|
|
24162
|
+
object.parent = "";
|
|
24163
|
+
object.backupScheduleId = "";
|
|
24164
|
+
object.backupSchedule = null;
|
|
24165
|
+
}
|
|
24166
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
24167
|
+
object.parent = message.parent;
|
|
24168
|
+
if (message.backupScheduleId != null && message.hasOwnProperty("backupScheduleId"))
|
|
24169
|
+
object.backupScheduleId = message.backupScheduleId;
|
|
24170
|
+
if (message.backupSchedule != null && message.hasOwnProperty("backupSchedule"))
|
|
24171
|
+
object.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.toObject(message.backupSchedule, options);
|
|
24172
|
+
return object;
|
|
24173
|
+
};
|
|
24174
|
+
|
|
24175
|
+
/**
|
|
24176
|
+
* Converts this CreateBackupScheduleRequest to JSON.
|
|
24177
|
+
* @function toJSON
|
|
24178
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24179
|
+
* @instance
|
|
24180
|
+
* @returns {Object.<string,*>} JSON object
|
|
24181
|
+
*/
|
|
24182
|
+
CreateBackupScheduleRequest.prototype.toJSON = function toJSON() {
|
|
24183
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24184
|
+
};
|
|
24185
|
+
|
|
24186
|
+
/**
|
|
24187
|
+
* Gets the default type url for CreateBackupScheduleRequest
|
|
24188
|
+
* @function getTypeUrl
|
|
24189
|
+
* @memberof google.spanner.admin.database.v1.CreateBackupScheduleRequest
|
|
24190
|
+
* @static
|
|
24191
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24192
|
+
* @returns {string} The default type url
|
|
24193
|
+
*/
|
|
24194
|
+
CreateBackupScheduleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24195
|
+
if (typeUrlPrefix === undefined) {
|
|
24196
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24197
|
+
}
|
|
24198
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.CreateBackupScheduleRequest";
|
|
24199
|
+
};
|
|
24200
|
+
|
|
24201
|
+
return CreateBackupScheduleRequest;
|
|
24202
|
+
})();
|
|
24203
|
+
|
|
24204
|
+
v1.GetBackupScheduleRequest = (function() {
|
|
24205
|
+
|
|
24206
|
+
/**
|
|
24207
|
+
* Properties of a GetBackupScheduleRequest.
|
|
24208
|
+
* @memberof google.spanner.admin.database.v1
|
|
24209
|
+
* @interface IGetBackupScheduleRequest
|
|
24210
|
+
* @property {string|null} [name] GetBackupScheduleRequest name
|
|
24211
|
+
*/
|
|
24212
|
+
|
|
24213
|
+
/**
|
|
24214
|
+
* Constructs a new GetBackupScheduleRequest.
|
|
24215
|
+
* @memberof google.spanner.admin.database.v1
|
|
24216
|
+
* @classdesc Represents a GetBackupScheduleRequest.
|
|
24217
|
+
* @implements IGetBackupScheduleRequest
|
|
24218
|
+
* @constructor
|
|
24219
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest=} [properties] Properties to set
|
|
24220
|
+
*/
|
|
24221
|
+
function GetBackupScheduleRequest(properties) {
|
|
24222
|
+
if (properties)
|
|
24223
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24224
|
+
if (properties[keys[i]] != null)
|
|
24225
|
+
this[keys[i]] = properties[keys[i]];
|
|
24226
|
+
}
|
|
24227
|
+
|
|
24228
|
+
/**
|
|
24229
|
+
* GetBackupScheduleRequest name.
|
|
24230
|
+
* @member {string} name
|
|
24231
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24232
|
+
* @instance
|
|
24233
|
+
*/
|
|
24234
|
+
GetBackupScheduleRequest.prototype.name = "";
|
|
24235
|
+
|
|
24236
|
+
/**
|
|
24237
|
+
* Creates a new GetBackupScheduleRequest instance using the specified properties.
|
|
24238
|
+
* @function create
|
|
24239
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24240
|
+
* @static
|
|
24241
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest=} [properties] Properties to set
|
|
24242
|
+
* @returns {google.spanner.admin.database.v1.GetBackupScheduleRequest} GetBackupScheduleRequest instance
|
|
24243
|
+
*/
|
|
24244
|
+
GetBackupScheduleRequest.create = function create(properties) {
|
|
24245
|
+
return new GetBackupScheduleRequest(properties);
|
|
24246
|
+
};
|
|
24247
|
+
|
|
24248
|
+
/**
|
|
24249
|
+
* Encodes the specified GetBackupScheduleRequest message. Does not implicitly {@link google.spanner.admin.database.v1.GetBackupScheduleRequest.verify|verify} messages.
|
|
24250
|
+
* @function encode
|
|
24251
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24252
|
+
* @static
|
|
24253
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest} message GetBackupScheduleRequest message or plain object to encode
|
|
24254
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24255
|
+
* @returns {$protobuf.Writer} Writer
|
|
24256
|
+
*/
|
|
24257
|
+
GetBackupScheduleRequest.encode = function encode(message, writer) {
|
|
24258
|
+
if (!writer)
|
|
24259
|
+
writer = $Writer.create();
|
|
24260
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
24261
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
24262
|
+
return writer;
|
|
24263
|
+
};
|
|
24264
|
+
|
|
24265
|
+
/**
|
|
24266
|
+
* Encodes the specified GetBackupScheduleRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.GetBackupScheduleRequest.verify|verify} messages.
|
|
24267
|
+
* @function encodeDelimited
|
|
24268
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24269
|
+
* @static
|
|
24270
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest} message GetBackupScheduleRequest message or plain object to encode
|
|
24271
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24272
|
+
* @returns {$protobuf.Writer} Writer
|
|
24273
|
+
*/
|
|
24274
|
+
GetBackupScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24275
|
+
return this.encode(message, writer).ldelim();
|
|
24276
|
+
};
|
|
24277
|
+
|
|
24278
|
+
/**
|
|
24279
|
+
* Decodes a GetBackupScheduleRequest message from the specified reader or buffer.
|
|
24280
|
+
* @function decode
|
|
24281
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24282
|
+
* @static
|
|
24283
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24284
|
+
* @param {number} [length] Message length if known beforehand
|
|
24285
|
+
* @returns {google.spanner.admin.database.v1.GetBackupScheduleRequest} GetBackupScheduleRequest
|
|
24286
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24287
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24288
|
+
*/
|
|
24289
|
+
GetBackupScheduleRequest.decode = function decode(reader, length) {
|
|
24290
|
+
if (!(reader instanceof $Reader))
|
|
24291
|
+
reader = $Reader.create(reader);
|
|
24292
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.GetBackupScheduleRequest();
|
|
24293
|
+
while (reader.pos < end) {
|
|
24294
|
+
var tag = reader.uint32();
|
|
24295
|
+
switch (tag >>> 3) {
|
|
24296
|
+
case 1: {
|
|
24297
|
+
message.name = reader.string();
|
|
24298
|
+
break;
|
|
24299
|
+
}
|
|
24300
|
+
default:
|
|
24301
|
+
reader.skipType(tag & 7);
|
|
24302
|
+
break;
|
|
24303
|
+
}
|
|
24304
|
+
}
|
|
24305
|
+
return message;
|
|
24306
|
+
};
|
|
24307
|
+
|
|
24308
|
+
/**
|
|
24309
|
+
* Decodes a GetBackupScheduleRequest message from the specified reader or buffer, length delimited.
|
|
24310
|
+
* @function decodeDelimited
|
|
24311
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24312
|
+
* @static
|
|
24313
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24314
|
+
* @returns {google.spanner.admin.database.v1.GetBackupScheduleRequest} GetBackupScheduleRequest
|
|
24315
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24316
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24317
|
+
*/
|
|
24318
|
+
GetBackupScheduleRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
24319
|
+
if (!(reader instanceof $Reader))
|
|
24320
|
+
reader = new $Reader(reader);
|
|
24321
|
+
return this.decode(reader, reader.uint32());
|
|
24322
|
+
};
|
|
24323
|
+
|
|
24324
|
+
/**
|
|
24325
|
+
* Verifies a GetBackupScheduleRequest message.
|
|
24326
|
+
* @function verify
|
|
24327
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24328
|
+
* @static
|
|
24329
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24330
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24331
|
+
*/
|
|
24332
|
+
GetBackupScheduleRequest.verify = function verify(message) {
|
|
24333
|
+
if (typeof message !== "object" || message === null)
|
|
24334
|
+
return "object expected";
|
|
24335
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
24336
|
+
if (!$util.isString(message.name))
|
|
24337
|
+
return "name: string expected";
|
|
24338
|
+
return null;
|
|
24339
|
+
};
|
|
24340
|
+
|
|
24341
|
+
/**
|
|
24342
|
+
* Creates a GetBackupScheduleRequest message from a plain object. Also converts values to their respective internal types.
|
|
24343
|
+
* @function fromObject
|
|
24344
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24345
|
+
* @static
|
|
24346
|
+
* @param {Object.<string,*>} object Plain object
|
|
24347
|
+
* @returns {google.spanner.admin.database.v1.GetBackupScheduleRequest} GetBackupScheduleRequest
|
|
24348
|
+
*/
|
|
24349
|
+
GetBackupScheduleRequest.fromObject = function fromObject(object) {
|
|
24350
|
+
if (object instanceof $root.google.spanner.admin.database.v1.GetBackupScheduleRequest)
|
|
24351
|
+
return object;
|
|
24352
|
+
var message = new $root.google.spanner.admin.database.v1.GetBackupScheduleRequest();
|
|
24353
|
+
if (object.name != null)
|
|
24354
|
+
message.name = String(object.name);
|
|
24355
|
+
return message;
|
|
24356
|
+
};
|
|
24357
|
+
|
|
24358
|
+
/**
|
|
24359
|
+
* Creates a plain object from a GetBackupScheduleRequest message. Also converts values to other types if specified.
|
|
24360
|
+
* @function toObject
|
|
24361
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24362
|
+
* @static
|
|
24363
|
+
* @param {google.spanner.admin.database.v1.GetBackupScheduleRequest} message GetBackupScheduleRequest
|
|
24364
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24365
|
+
* @returns {Object.<string,*>} Plain object
|
|
24366
|
+
*/
|
|
24367
|
+
GetBackupScheduleRequest.toObject = function toObject(message, options) {
|
|
24368
|
+
if (!options)
|
|
24369
|
+
options = {};
|
|
24370
|
+
var object = {};
|
|
24371
|
+
if (options.defaults)
|
|
24372
|
+
object.name = "";
|
|
24373
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
24374
|
+
object.name = message.name;
|
|
24375
|
+
return object;
|
|
24376
|
+
};
|
|
24377
|
+
|
|
24378
|
+
/**
|
|
24379
|
+
* Converts this GetBackupScheduleRequest to JSON.
|
|
24380
|
+
* @function toJSON
|
|
24381
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24382
|
+
* @instance
|
|
24383
|
+
* @returns {Object.<string,*>} JSON object
|
|
24384
|
+
*/
|
|
24385
|
+
GetBackupScheduleRequest.prototype.toJSON = function toJSON() {
|
|
24386
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24387
|
+
};
|
|
24388
|
+
|
|
24389
|
+
/**
|
|
24390
|
+
* Gets the default type url for GetBackupScheduleRequest
|
|
24391
|
+
* @function getTypeUrl
|
|
24392
|
+
* @memberof google.spanner.admin.database.v1.GetBackupScheduleRequest
|
|
24393
|
+
* @static
|
|
24394
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24395
|
+
* @returns {string} The default type url
|
|
24396
|
+
*/
|
|
24397
|
+
GetBackupScheduleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24398
|
+
if (typeUrlPrefix === undefined) {
|
|
24399
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24400
|
+
}
|
|
24401
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.GetBackupScheduleRequest";
|
|
24402
|
+
};
|
|
24403
|
+
|
|
24404
|
+
return GetBackupScheduleRequest;
|
|
24405
|
+
})();
|
|
24406
|
+
|
|
24407
|
+
v1.DeleteBackupScheduleRequest = (function() {
|
|
24408
|
+
|
|
24409
|
+
/**
|
|
24410
|
+
* Properties of a DeleteBackupScheduleRequest.
|
|
24411
|
+
* @memberof google.spanner.admin.database.v1
|
|
24412
|
+
* @interface IDeleteBackupScheduleRequest
|
|
24413
|
+
* @property {string|null} [name] DeleteBackupScheduleRequest name
|
|
24414
|
+
*/
|
|
24415
|
+
|
|
24416
|
+
/**
|
|
24417
|
+
* Constructs a new DeleteBackupScheduleRequest.
|
|
24418
|
+
* @memberof google.spanner.admin.database.v1
|
|
24419
|
+
* @classdesc Represents a DeleteBackupScheduleRequest.
|
|
24420
|
+
* @implements IDeleteBackupScheduleRequest
|
|
24421
|
+
* @constructor
|
|
24422
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest=} [properties] Properties to set
|
|
24423
|
+
*/
|
|
24424
|
+
function DeleteBackupScheduleRequest(properties) {
|
|
24425
|
+
if (properties)
|
|
24426
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24427
|
+
if (properties[keys[i]] != null)
|
|
24428
|
+
this[keys[i]] = properties[keys[i]];
|
|
24429
|
+
}
|
|
24430
|
+
|
|
24431
|
+
/**
|
|
24432
|
+
* DeleteBackupScheduleRequest name.
|
|
24433
|
+
* @member {string} name
|
|
24434
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24435
|
+
* @instance
|
|
24436
|
+
*/
|
|
24437
|
+
DeleteBackupScheduleRequest.prototype.name = "";
|
|
24438
|
+
|
|
24439
|
+
/**
|
|
24440
|
+
* Creates a new DeleteBackupScheduleRequest instance using the specified properties.
|
|
24441
|
+
* @function create
|
|
24442
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24443
|
+
* @static
|
|
24444
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest=} [properties] Properties to set
|
|
24445
|
+
* @returns {google.spanner.admin.database.v1.DeleteBackupScheduleRequest} DeleteBackupScheduleRequest instance
|
|
24446
|
+
*/
|
|
24447
|
+
DeleteBackupScheduleRequest.create = function create(properties) {
|
|
24448
|
+
return new DeleteBackupScheduleRequest(properties);
|
|
24449
|
+
};
|
|
24450
|
+
|
|
24451
|
+
/**
|
|
24452
|
+
* Encodes the specified DeleteBackupScheduleRequest message. Does not implicitly {@link google.spanner.admin.database.v1.DeleteBackupScheduleRequest.verify|verify} messages.
|
|
24453
|
+
* @function encode
|
|
24454
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24455
|
+
* @static
|
|
24456
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest} message DeleteBackupScheduleRequest message or plain object to encode
|
|
24457
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24458
|
+
* @returns {$protobuf.Writer} Writer
|
|
24459
|
+
*/
|
|
24460
|
+
DeleteBackupScheduleRequest.encode = function encode(message, writer) {
|
|
24461
|
+
if (!writer)
|
|
24462
|
+
writer = $Writer.create();
|
|
24463
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
24464
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
24465
|
+
return writer;
|
|
24466
|
+
};
|
|
24467
|
+
|
|
24468
|
+
/**
|
|
24469
|
+
* Encodes the specified DeleteBackupScheduleRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.DeleteBackupScheduleRequest.verify|verify} messages.
|
|
24470
|
+
* @function encodeDelimited
|
|
24471
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24472
|
+
* @static
|
|
24473
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest} message DeleteBackupScheduleRequest message or plain object to encode
|
|
24474
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24475
|
+
* @returns {$protobuf.Writer} Writer
|
|
24476
|
+
*/
|
|
24477
|
+
DeleteBackupScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24478
|
+
return this.encode(message, writer).ldelim();
|
|
24479
|
+
};
|
|
24480
|
+
|
|
24481
|
+
/**
|
|
24482
|
+
* Decodes a DeleteBackupScheduleRequest message from the specified reader or buffer.
|
|
24483
|
+
* @function decode
|
|
24484
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24485
|
+
* @static
|
|
24486
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24487
|
+
* @param {number} [length] Message length if known beforehand
|
|
24488
|
+
* @returns {google.spanner.admin.database.v1.DeleteBackupScheduleRequest} DeleteBackupScheduleRequest
|
|
24489
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24490
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24491
|
+
*/
|
|
24492
|
+
DeleteBackupScheduleRequest.decode = function decode(reader, length) {
|
|
24493
|
+
if (!(reader instanceof $Reader))
|
|
24494
|
+
reader = $Reader.create(reader);
|
|
24495
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.DeleteBackupScheduleRequest();
|
|
24496
|
+
while (reader.pos < end) {
|
|
24497
|
+
var tag = reader.uint32();
|
|
24498
|
+
switch (tag >>> 3) {
|
|
24499
|
+
case 1: {
|
|
24500
|
+
message.name = reader.string();
|
|
24501
|
+
break;
|
|
24502
|
+
}
|
|
24503
|
+
default:
|
|
24504
|
+
reader.skipType(tag & 7);
|
|
24505
|
+
break;
|
|
24506
|
+
}
|
|
24507
|
+
}
|
|
24508
|
+
return message;
|
|
24509
|
+
};
|
|
24510
|
+
|
|
24511
|
+
/**
|
|
24512
|
+
* Decodes a DeleteBackupScheduleRequest message from the specified reader or buffer, length delimited.
|
|
24513
|
+
* @function decodeDelimited
|
|
24514
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24515
|
+
* @static
|
|
24516
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24517
|
+
* @returns {google.spanner.admin.database.v1.DeleteBackupScheduleRequest} DeleteBackupScheduleRequest
|
|
24518
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24519
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24520
|
+
*/
|
|
24521
|
+
DeleteBackupScheduleRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
24522
|
+
if (!(reader instanceof $Reader))
|
|
24523
|
+
reader = new $Reader(reader);
|
|
24524
|
+
return this.decode(reader, reader.uint32());
|
|
24525
|
+
};
|
|
24526
|
+
|
|
24527
|
+
/**
|
|
24528
|
+
* Verifies a DeleteBackupScheduleRequest message.
|
|
24529
|
+
* @function verify
|
|
24530
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24531
|
+
* @static
|
|
24532
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24533
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24534
|
+
*/
|
|
24535
|
+
DeleteBackupScheduleRequest.verify = function verify(message) {
|
|
24536
|
+
if (typeof message !== "object" || message === null)
|
|
24537
|
+
return "object expected";
|
|
24538
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
24539
|
+
if (!$util.isString(message.name))
|
|
24540
|
+
return "name: string expected";
|
|
24541
|
+
return null;
|
|
24542
|
+
};
|
|
24543
|
+
|
|
24544
|
+
/**
|
|
24545
|
+
* Creates a DeleteBackupScheduleRequest message from a plain object. Also converts values to their respective internal types.
|
|
24546
|
+
* @function fromObject
|
|
24547
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24548
|
+
* @static
|
|
24549
|
+
* @param {Object.<string,*>} object Plain object
|
|
24550
|
+
* @returns {google.spanner.admin.database.v1.DeleteBackupScheduleRequest} DeleteBackupScheduleRequest
|
|
24551
|
+
*/
|
|
24552
|
+
DeleteBackupScheduleRequest.fromObject = function fromObject(object) {
|
|
24553
|
+
if (object instanceof $root.google.spanner.admin.database.v1.DeleteBackupScheduleRequest)
|
|
24554
|
+
return object;
|
|
24555
|
+
var message = new $root.google.spanner.admin.database.v1.DeleteBackupScheduleRequest();
|
|
24556
|
+
if (object.name != null)
|
|
24557
|
+
message.name = String(object.name);
|
|
24558
|
+
return message;
|
|
24559
|
+
};
|
|
24560
|
+
|
|
24561
|
+
/**
|
|
24562
|
+
* Creates a plain object from a DeleteBackupScheduleRequest message. Also converts values to other types if specified.
|
|
24563
|
+
* @function toObject
|
|
24564
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24565
|
+
* @static
|
|
24566
|
+
* @param {google.spanner.admin.database.v1.DeleteBackupScheduleRequest} message DeleteBackupScheduleRequest
|
|
24567
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24568
|
+
* @returns {Object.<string,*>} Plain object
|
|
24569
|
+
*/
|
|
24570
|
+
DeleteBackupScheduleRequest.toObject = function toObject(message, options) {
|
|
24571
|
+
if (!options)
|
|
24572
|
+
options = {};
|
|
24573
|
+
var object = {};
|
|
24574
|
+
if (options.defaults)
|
|
24575
|
+
object.name = "";
|
|
24576
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
24577
|
+
object.name = message.name;
|
|
24578
|
+
return object;
|
|
24579
|
+
};
|
|
24580
|
+
|
|
24581
|
+
/**
|
|
24582
|
+
* Converts this DeleteBackupScheduleRequest to JSON.
|
|
24583
|
+
* @function toJSON
|
|
24584
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24585
|
+
* @instance
|
|
24586
|
+
* @returns {Object.<string,*>} JSON object
|
|
24587
|
+
*/
|
|
24588
|
+
DeleteBackupScheduleRequest.prototype.toJSON = function toJSON() {
|
|
24589
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24590
|
+
};
|
|
24591
|
+
|
|
24592
|
+
/**
|
|
24593
|
+
* Gets the default type url for DeleteBackupScheduleRequest
|
|
24594
|
+
* @function getTypeUrl
|
|
24595
|
+
* @memberof google.spanner.admin.database.v1.DeleteBackupScheduleRequest
|
|
24596
|
+
* @static
|
|
24597
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24598
|
+
* @returns {string} The default type url
|
|
24599
|
+
*/
|
|
24600
|
+
DeleteBackupScheduleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24601
|
+
if (typeUrlPrefix === undefined) {
|
|
24602
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24603
|
+
}
|
|
24604
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.DeleteBackupScheduleRequest";
|
|
24605
|
+
};
|
|
24606
|
+
|
|
24607
|
+
return DeleteBackupScheduleRequest;
|
|
24608
|
+
})();
|
|
24609
|
+
|
|
24610
|
+
v1.ListBackupSchedulesRequest = (function() {
|
|
24611
|
+
|
|
24612
|
+
/**
|
|
24613
|
+
* Properties of a ListBackupSchedulesRequest.
|
|
24614
|
+
* @memberof google.spanner.admin.database.v1
|
|
24615
|
+
* @interface IListBackupSchedulesRequest
|
|
24616
|
+
* @property {string|null} [parent] ListBackupSchedulesRequest parent
|
|
24617
|
+
* @property {number|null} [pageSize] ListBackupSchedulesRequest pageSize
|
|
24618
|
+
* @property {string|null} [pageToken] ListBackupSchedulesRequest pageToken
|
|
24619
|
+
*/
|
|
24620
|
+
|
|
24621
|
+
/**
|
|
24622
|
+
* Constructs a new ListBackupSchedulesRequest.
|
|
24623
|
+
* @memberof google.spanner.admin.database.v1
|
|
24624
|
+
* @classdesc Represents a ListBackupSchedulesRequest.
|
|
24625
|
+
* @implements IListBackupSchedulesRequest
|
|
24626
|
+
* @constructor
|
|
24627
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest=} [properties] Properties to set
|
|
24628
|
+
*/
|
|
24629
|
+
function ListBackupSchedulesRequest(properties) {
|
|
24630
|
+
if (properties)
|
|
24631
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24632
|
+
if (properties[keys[i]] != null)
|
|
24633
|
+
this[keys[i]] = properties[keys[i]];
|
|
24634
|
+
}
|
|
24635
|
+
|
|
24636
|
+
/**
|
|
24637
|
+
* ListBackupSchedulesRequest parent.
|
|
24638
|
+
* @member {string} parent
|
|
24639
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24640
|
+
* @instance
|
|
24641
|
+
*/
|
|
24642
|
+
ListBackupSchedulesRequest.prototype.parent = "";
|
|
24643
|
+
|
|
24644
|
+
/**
|
|
24645
|
+
* ListBackupSchedulesRequest pageSize.
|
|
24646
|
+
* @member {number} pageSize
|
|
24647
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24648
|
+
* @instance
|
|
24649
|
+
*/
|
|
24650
|
+
ListBackupSchedulesRequest.prototype.pageSize = 0;
|
|
24651
|
+
|
|
24652
|
+
/**
|
|
24653
|
+
* ListBackupSchedulesRequest pageToken.
|
|
24654
|
+
* @member {string} pageToken
|
|
24655
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24656
|
+
* @instance
|
|
24657
|
+
*/
|
|
24658
|
+
ListBackupSchedulesRequest.prototype.pageToken = "";
|
|
24659
|
+
|
|
24660
|
+
/**
|
|
24661
|
+
* Creates a new ListBackupSchedulesRequest instance using the specified properties.
|
|
24662
|
+
* @function create
|
|
24663
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24664
|
+
* @static
|
|
24665
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest=} [properties] Properties to set
|
|
24666
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesRequest} ListBackupSchedulesRequest instance
|
|
24667
|
+
*/
|
|
24668
|
+
ListBackupSchedulesRequest.create = function create(properties) {
|
|
24669
|
+
return new ListBackupSchedulesRequest(properties);
|
|
24670
|
+
};
|
|
24671
|
+
|
|
24672
|
+
/**
|
|
24673
|
+
* Encodes the specified ListBackupSchedulesRequest message. Does not implicitly {@link google.spanner.admin.database.v1.ListBackupSchedulesRequest.verify|verify} messages.
|
|
24674
|
+
* @function encode
|
|
24675
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24676
|
+
* @static
|
|
24677
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest} message ListBackupSchedulesRequest message or plain object to encode
|
|
24678
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24679
|
+
* @returns {$protobuf.Writer} Writer
|
|
24680
|
+
*/
|
|
24681
|
+
ListBackupSchedulesRequest.encode = function encode(message, writer) {
|
|
24682
|
+
if (!writer)
|
|
24683
|
+
writer = $Writer.create();
|
|
24684
|
+
if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
|
|
24685
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
|
|
24686
|
+
if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
|
|
24687
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
|
|
24688
|
+
if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
|
|
24689
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken);
|
|
24690
|
+
return writer;
|
|
24691
|
+
};
|
|
24692
|
+
|
|
24693
|
+
/**
|
|
24694
|
+
* Encodes the specified ListBackupSchedulesRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.ListBackupSchedulesRequest.verify|verify} messages.
|
|
24695
|
+
* @function encodeDelimited
|
|
24696
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24697
|
+
* @static
|
|
24698
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest} message ListBackupSchedulesRequest message or plain object to encode
|
|
24699
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24700
|
+
* @returns {$protobuf.Writer} Writer
|
|
24701
|
+
*/
|
|
24702
|
+
ListBackupSchedulesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24703
|
+
return this.encode(message, writer).ldelim();
|
|
24704
|
+
};
|
|
24705
|
+
|
|
24706
|
+
/**
|
|
24707
|
+
* Decodes a ListBackupSchedulesRequest message from the specified reader or buffer.
|
|
24708
|
+
* @function decode
|
|
24709
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24710
|
+
* @static
|
|
24711
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24712
|
+
* @param {number} [length] Message length if known beforehand
|
|
24713
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesRequest} ListBackupSchedulesRequest
|
|
24714
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24715
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24716
|
+
*/
|
|
24717
|
+
ListBackupSchedulesRequest.decode = function decode(reader, length) {
|
|
24718
|
+
if (!(reader instanceof $Reader))
|
|
24719
|
+
reader = $Reader.create(reader);
|
|
24720
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.ListBackupSchedulesRequest();
|
|
24721
|
+
while (reader.pos < end) {
|
|
24722
|
+
var tag = reader.uint32();
|
|
24723
|
+
switch (tag >>> 3) {
|
|
24724
|
+
case 1: {
|
|
24725
|
+
message.parent = reader.string();
|
|
24726
|
+
break;
|
|
24727
|
+
}
|
|
24728
|
+
case 2: {
|
|
24729
|
+
message.pageSize = reader.int32();
|
|
24730
|
+
break;
|
|
24731
|
+
}
|
|
24732
|
+
case 4: {
|
|
24733
|
+
message.pageToken = reader.string();
|
|
24734
|
+
break;
|
|
24735
|
+
}
|
|
24736
|
+
default:
|
|
24737
|
+
reader.skipType(tag & 7);
|
|
24738
|
+
break;
|
|
24739
|
+
}
|
|
24740
|
+
}
|
|
24741
|
+
return message;
|
|
24742
|
+
};
|
|
24743
|
+
|
|
24744
|
+
/**
|
|
24745
|
+
* Decodes a ListBackupSchedulesRequest message from the specified reader or buffer, length delimited.
|
|
24746
|
+
* @function decodeDelimited
|
|
24747
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24748
|
+
* @static
|
|
24749
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24750
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesRequest} ListBackupSchedulesRequest
|
|
24751
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24752
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24753
|
+
*/
|
|
24754
|
+
ListBackupSchedulesRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
24755
|
+
if (!(reader instanceof $Reader))
|
|
24756
|
+
reader = new $Reader(reader);
|
|
24757
|
+
return this.decode(reader, reader.uint32());
|
|
24758
|
+
};
|
|
24759
|
+
|
|
24760
|
+
/**
|
|
24761
|
+
* Verifies a ListBackupSchedulesRequest message.
|
|
24762
|
+
* @function verify
|
|
24763
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24764
|
+
* @static
|
|
24765
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24766
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24767
|
+
*/
|
|
24768
|
+
ListBackupSchedulesRequest.verify = function verify(message) {
|
|
24769
|
+
if (typeof message !== "object" || message === null)
|
|
24770
|
+
return "object expected";
|
|
24771
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
24772
|
+
if (!$util.isString(message.parent))
|
|
24773
|
+
return "parent: string expected";
|
|
24774
|
+
if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
|
24775
|
+
if (!$util.isInteger(message.pageSize))
|
|
24776
|
+
return "pageSize: integer expected";
|
|
24777
|
+
if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
|
24778
|
+
if (!$util.isString(message.pageToken))
|
|
24779
|
+
return "pageToken: string expected";
|
|
24780
|
+
return null;
|
|
24781
|
+
};
|
|
24782
|
+
|
|
24783
|
+
/**
|
|
24784
|
+
* Creates a ListBackupSchedulesRequest message from a plain object. Also converts values to their respective internal types.
|
|
24785
|
+
* @function fromObject
|
|
24786
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24787
|
+
* @static
|
|
24788
|
+
* @param {Object.<string,*>} object Plain object
|
|
24789
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesRequest} ListBackupSchedulesRequest
|
|
24790
|
+
*/
|
|
24791
|
+
ListBackupSchedulesRequest.fromObject = function fromObject(object) {
|
|
24792
|
+
if (object instanceof $root.google.spanner.admin.database.v1.ListBackupSchedulesRequest)
|
|
24793
|
+
return object;
|
|
24794
|
+
var message = new $root.google.spanner.admin.database.v1.ListBackupSchedulesRequest();
|
|
24795
|
+
if (object.parent != null)
|
|
24796
|
+
message.parent = String(object.parent);
|
|
24797
|
+
if (object.pageSize != null)
|
|
24798
|
+
message.pageSize = object.pageSize | 0;
|
|
24799
|
+
if (object.pageToken != null)
|
|
24800
|
+
message.pageToken = String(object.pageToken);
|
|
24801
|
+
return message;
|
|
24802
|
+
};
|
|
24803
|
+
|
|
24804
|
+
/**
|
|
24805
|
+
* Creates a plain object from a ListBackupSchedulesRequest message. Also converts values to other types if specified.
|
|
24806
|
+
* @function toObject
|
|
24807
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24808
|
+
* @static
|
|
24809
|
+
* @param {google.spanner.admin.database.v1.ListBackupSchedulesRequest} message ListBackupSchedulesRequest
|
|
24810
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24811
|
+
* @returns {Object.<string,*>} Plain object
|
|
24812
|
+
*/
|
|
24813
|
+
ListBackupSchedulesRequest.toObject = function toObject(message, options) {
|
|
24814
|
+
if (!options)
|
|
24815
|
+
options = {};
|
|
24816
|
+
var object = {};
|
|
24817
|
+
if (options.defaults) {
|
|
24818
|
+
object.parent = "";
|
|
24819
|
+
object.pageSize = 0;
|
|
24820
|
+
object.pageToken = "";
|
|
24821
|
+
}
|
|
24822
|
+
if (message.parent != null && message.hasOwnProperty("parent"))
|
|
24823
|
+
object.parent = message.parent;
|
|
24824
|
+
if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
|
24825
|
+
object.pageSize = message.pageSize;
|
|
24826
|
+
if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
|
24827
|
+
object.pageToken = message.pageToken;
|
|
24828
|
+
return object;
|
|
24829
|
+
};
|
|
24830
|
+
|
|
24831
|
+
/**
|
|
24832
|
+
* Converts this ListBackupSchedulesRequest to JSON.
|
|
24833
|
+
* @function toJSON
|
|
24834
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24835
|
+
* @instance
|
|
24836
|
+
* @returns {Object.<string,*>} JSON object
|
|
24837
|
+
*/
|
|
24838
|
+
ListBackupSchedulesRequest.prototype.toJSON = function toJSON() {
|
|
24839
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24840
|
+
};
|
|
24841
|
+
|
|
24842
|
+
/**
|
|
24843
|
+
* Gets the default type url for ListBackupSchedulesRequest
|
|
24844
|
+
* @function getTypeUrl
|
|
24845
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesRequest
|
|
24846
|
+
* @static
|
|
24847
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24848
|
+
* @returns {string} The default type url
|
|
24849
|
+
*/
|
|
24850
|
+
ListBackupSchedulesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24851
|
+
if (typeUrlPrefix === undefined) {
|
|
24852
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24853
|
+
}
|
|
24854
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.ListBackupSchedulesRequest";
|
|
24855
|
+
};
|
|
24856
|
+
|
|
24857
|
+
return ListBackupSchedulesRequest;
|
|
24858
|
+
})();
|
|
24859
|
+
|
|
24860
|
+
v1.ListBackupSchedulesResponse = (function() {
|
|
24861
|
+
|
|
24862
|
+
/**
|
|
24863
|
+
* Properties of a ListBackupSchedulesResponse.
|
|
24864
|
+
* @memberof google.spanner.admin.database.v1
|
|
24865
|
+
* @interface IListBackupSchedulesResponse
|
|
24866
|
+
* @property {Array.<google.spanner.admin.database.v1.IBackupSchedule>|null} [backupSchedules] ListBackupSchedulesResponse backupSchedules
|
|
24867
|
+
* @property {string|null} [nextPageToken] ListBackupSchedulesResponse nextPageToken
|
|
24868
|
+
*/
|
|
24869
|
+
|
|
24870
|
+
/**
|
|
24871
|
+
* Constructs a new ListBackupSchedulesResponse.
|
|
24872
|
+
* @memberof google.spanner.admin.database.v1
|
|
24873
|
+
* @classdesc Represents a ListBackupSchedulesResponse.
|
|
24874
|
+
* @implements IListBackupSchedulesResponse
|
|
24875
|
+
* @constructor
|
|
24876
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesResponse=} [properties] Properties to set
|
|
24877
|
+
*/
|
|
24878
|
+
function ListBackupSchedulesResponse(properties) {
|
|
24879
|
+
this.backupSchedules = [];
|
|
24880
|
+
if (properties)
|
|
24881
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24882
|
+
if (properties[keys[i]] != null)
|
|
24883
|
+
this[keys[i]] = properties[keys[i]];
|
|
24884
|
+
}
|
|
24885
|
+
|
|
24886
|
+
/**
|
|
24887
|
+
* ListBackupSchedulesResponse backupSchedules.
|
|
24888
|
+
* @member {Array.<google.spanner.admin.database.v1.IBackupSchedule>} backupSchedules
|
|
24889
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24890
|
+
* @instance
|
|
24891
|
+
*/
|
|
24892
|
+
ListBackupSchedulesResponse.prototype.backupSchedules = $util.emptyArray;
|
|
24893
|
+
|
|
24894
|
+
/**
|
|
24895
|
+
* ListBackupSchedulesResponse nextPageToken.
|
|
24896
|
+
* @member {string} nextPageToken
|
|
24897
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24898
|
+
* @instance
|
|
24899
|
+
*/
|
|
24900
|
+
ListBackupSchedulesResponse.prototype.nextPageToken = "";
|
|
24901
|
+
|
|
24902
|
+
/**
|
|
24903
|
+
* Creates a new ListBackupSchedulesResponse instance using the specified properties.
|
|
24904
|
+
* @function create
|
|
24905
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24906
|
+
* @static
|
|
24907
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesResponse=} [properties] Properties to set
|
|
24908
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesResponse} ListBackupSchedulesResponse instance
|
|
24909
|
+
*/
|
|
24910
|
+
ListBackupSchedulesResponse.create = function create(properties) {
|
|
24911
|
+
return new ListBackupSchedulesResponse(properties);
|
|
24912
|
+
};
|
|
24913
|
+
|
|
24914
|
+
/**
|
|
24915
|
+
* Encodes the specified ListBackupSchedulesResponse message. Does not implicitly {@link google.spanner.admin.database.v1.ListBackupSchedulesResponse.verify|verify} messages.
|
|
24916
|
+
* @function encode
|
|
24917
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24918
|
+
* @static
|
|
24919
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesResponse} message ListBackupSchedulesResponse message or plain object to encode
|
|
24920
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24921
|
+
* @returns {$protobuf.Writer} Writer
|
|
24922
|
+
*/
|
|
24923
|
+
ListBackupSchedulesResponse.encode = function encode(message, writer) {
|
|
24924
|
+
if (!writer)
|
|
24925
|
+
writer = $Writer.create();
|
|
24926
|
+
if (message.backupSchedules != null && message.backupSchedules.length)
|
|
24927
|
+
for (var i = 0; i < message.backupSchedules.length; ++i)
|
|
24928
|
+
$root.google.spanner.admin.database.v1.BackupSchedule.encode(message.backupSchedules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
24929
|
+
if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
|
|
24930
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
|
|
24931
|
+
return writer;
|
|
24932
|
+
};
|
|
24933
|
+
|
|
24934
|
+
/**
|
|
24935
|
+
* Encodes the specified ListBackupSchedulesResponse message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.ListBackupSchedulesResponse.verify|verify} messages.
|
|
24936
|
+
* @function encodeDelimited
|
|
24937
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24938
|
+
* @static
|
|
24939
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesResponse} message ListBackupSchedulesResponse message or plain object to encode
|
|
24940
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24941
|
+
* @returns {$protobuf.Writer} Writer
|
|
24942
|
+
*/
|
|
24943
|
+
ListBackupSchedulesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24944
|
+
return this.encode(message, writer).ldelim();
|
|
24945
|
+
};
|
|
24946
|
+
|
|
24947
|
+
/**
|
|
24948
|
+
* Decodes a ListBackupSchedulesResponse message from the specified reader or buffer.
|
|
24949
|
+
* @function decode
|
|
24950
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24951
|
+
* @static
|
|
24952
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24953
|
+
* @param {number} [length] Message length if known beforehand
|
|
24954
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesResponse} ListBackupSchedulesResponse
|
|
24955
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24956
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24957
|
+
*/
|
|
24958
|
+
ListBackupSchedulesResponse.decode = function decode(reader, length) {
|
|
24959
|
+
if (!(reader instanceof $Reader))
|
|
24960
|
+
reader = $Reader.create(reader);
|
|
24961
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.ListBackupSchedulesResponse();
|
|
24962
|
+
while (reader.pos < end) {
|
|
24963
|
+
var tag = reader.uint32();
|
|
24964
|
+
switch (tag >>> 3) {
|
|
24965
|
+
case 1: {
|
|
24966
|
+
if (!(message.backupSchedules && message.backupSchedules.length))
|
|
24967
|
+
message.backupSchedules = [];
|
|
24968
|
+
message.backupSchedules.push($root.google.spanner.admin.database.v1.BackupSchedule.decode(reader, reader.uint32()));
|
|
24969
|
+
break;
|
|
24970
|
+
}
|
|
24971
|
+
case 2: {
|
|
24972
|
+
message.nextPageToken = reader.string();
|
|
24973
|
+
break;
|
|
24974
|
+
}
|
|
24975
|
+
default:
|
|
24976
|
+
reader.skipType(tag & 7);
|
|
24977
|
+
break;
|
|
24978
|
+
}
|
|
24979
|
+
}
|
|
24980
|
+
return message;
|
|
24981
|
+
};
|
|
24982
|
+
|
|
24983
|
+
/**
|
|
24984
|
+
* Decodes a ListBackupSchedulesResponse message from the specified reader or buffer, length delimited.
|
|
24985
|
+
* @function decodeDelimited
|
|
24986
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
24987
|
+
* @static
|
|
24988
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24989
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesResponse} ListBackupSchedulesResponse
|
|
24990
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24991
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24992
|
+
*/
|
|
24993
|
+
ListBackupSchedulesResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
24994
|
+
if (!(reader instanceof $Reader))
|
|
24995
|
+
reader = new $Reader(reader);
|
|
24996
|
+
return this.decode(reader, reader.uint32());
|
|
24997
|
+
};
|
|
24998
|
+
|
|
24999
|
+
/**
|
|
25000
|
+
* Verifies a ListBackupSchedulesResponse message.
|
|
25001
|
+
* @function verify
|
|
25002
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
25003
|
+
* @static
|
|
25004
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25005
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25006
|
+
*/
|
|
25007
|
+
ListBackupSchedulesResponse.verify = function verify(message) {
|
|
25008
|
+
if (typeof message !== "object" || message === null)
|
|
25009
|
+
return "object expected";
|
|
25010
|
+
if (message.backupSchedules != null && message.hasOwnProperty("backupSchedules")) {
|
|
25011
|
+
if (!Array.isArray(message.backupSchedules))
|
|
25012
|
+
return "backupSchedules: array expected";
|
|
25013
|
+
for (var i = 0; i < message.backupSchedules.length; ++i) {
|
|
25014
|
+
var error = $root.google.spanner.admin.database.v1.BackupSchedule.verify(message.backupSchedules[i]);
|
|
25015
|
+
if (error)
|
|
25016
|
+
return "backupSchedules." + error;
|
|
25017
|
+
}
|
|
25018
|
+
}
|
|
25019
|
+
if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
|
25020
|
+
if (!$util.isString(message.nextPageToken))
|
|
25021
|
+
return "nextPageToken: string expected";
|
|
25022
|
+
return null;
|
|
25023
|
+
};
|
|
25024
|
+
|
|
25025
|
+
/**
|
|
25026
|
+
* Creates a ListBackupSchedulesResponse message from a plain object. Also converts values to their respective internal types.
|
|
25027
|
+
* @function fromObject
|
|
25028
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
25029
|
+
* @static
|
|
25030
|
+
* @param {Object.<string,*>} object Plain object
|
|
25031
|
+
* @returns {google.spanner.admin.database.v1.ListBackupSchedulesResponse} ListBackupSchedulesResponse
|
|
25032
|
+
*/
|
|
25033
|
+
ListBackupSchedulesResponse.fromObject = function fromObject(object) {
|
|
25034
|
+
if (object instanceof $root.google.spanner.admin.database.v1.ListBackupSchedulesResponse)
|
|
25035
|
+
return object;
|
|
25036
|
+
var message = new $root.google.spanner.admin.database.v1.ListBackupSchedulesResponse();
|
|
25037
|
+
if (object.backupSchedules) {
|
|
25038
|
+
if (!Array.isArray(object.backupSchedules))
|
|
25039
|
+
throw TypeError(".google.spanner.admin.database.v1.ListBackupSchedulesResponse.backupSchedules: array expected");
|
|
25040
|
+
message.backupSchedules = [];
|
|
25041
|
+
for (var i = 0; i < object.backupSchedules.length; ++i) {
|
|
25042
|
+
if (typeof object.backupSchedules[i] !== "object")
|
|
25043
|
+
throw TypeError(".google.spanner.admin.database.v1.ListBackupSchedulesResponse.backupSchedules: object expected");
|
|
25044
|
+
message.backupSchedules[i] = $root.google.spanner.admin.database.v1.BackupSchedule.fromObject(object.backupSchedules[i]);
|
|
25045
|
+
}
|
|
25046
|
+
}
|
|
25047
|
+
if (object.nextPageToken != null)
|
|
25048
|
+
message.nextPageToken = String(object.nextPageToken);
|
|
25049
|
+
return message;
|
|
25050
|
+
};
|
|
25051
|
+
|
|
25052
|
+
/**
|
|
25053
|
+
* Creates a plain object from a ListBackupSchedulesResponse message. Also converts values to other types if specified.
|
|
25054
|
+
* @function toObject
|
|
25055
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
25056
|
+
* @static
|
|
25057
|
+
* @param {google.spanner.admin.database.v1.ListBackupSchedulesResponse} message ListBackupSchedulesResponse
|
|
25058
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25059
|
+
* @returns {Object.<string,*>} Plain object
|
|
25060
|
+
*/
|
|
25061
|
+
ListBackupSchedulesResponse.toObject = function toObject(message, options) {
|
|
25062
|
+
if (!options)
|
|
25063
|
+
options = {};
|
|
25064
|
+
var object = {};
|
|
25065
|
+
if (options.arrays || options.defaults)
|
|
25066
|
+
object.backupSchedules = [];
|
|
25067
|
+
if (options.defaults)
|
|
25068
|
+
object.nextPageToken = "";
|
|
25069
|
+
if (message.backupSchedules && message.backupSchedules.length) {
|
|
25070
|
+
object.backupSchedules = [];
|
|
25071
|
+
for (var j = 0; j < message.backupSchedules.length; ++j)
|
|
25072
|
+
object.backupSchedules[j] = $root.google.spanner.admin.database.v1.BackupSchedule.toObject(message.backupSchedules[j], options);
|
|
25073
|
+
}
|
|
25074
|
+
if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
|
25075
|
+
object.nextPageToken = message.nextPageToken;
|
|
25076
|
+
return object;
|
|
25077
|
+
};
|
|
25078
|
+
|
|
25079
|
+
/**
|
|
25080
|
+
* Converts this ListBackupSchedulesResponse to JSON.
|
|
25081
|
+
* @function toJSON
|
|
25082
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
25083
|
+
* @instance
|
|
25084
|
+
* @returns {Object.<string,*>} JSON object
|
|
25085
|
+
*/
|
|
25086
|
+
ListBackupSchedulesResponse.prototype.toJSON = function toJSON() {
|
|
25087
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25088
|
+
};
|
|
25089
|
+
|
|
25090
|
+
/**
|
|
25091
|
+
* Gets the default type url for ListBackupSchedulesResponse
|
|
25092
|
+
* @function getTypeUrl
|
|
25093
|
+
* @memberof google.spanner.admin.database.v1.ListBackupSchedulesResponse
|
|
25094
|
+
* @static
|
|
25095
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25096
|
+
* @returns {string} The default type url
|
|
25097
|
+
*/
|
|
25098
|
+
ListBackupSchedulesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25099
|
+
if (typeUrlPrefix === undefined) {
|
|
25100
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25101
|
+
}
|
|
25102
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.ListBackupSchedulesResponse";
|
|
25103
|
+
};
|
|
25104
|
+
|
|
25105
|
+
return ListBackupSchedulesResponse;
|
|
25106
|
+
})();
|
|
25107
|
+
|
|
25108
|
+
v1.UpdateBackupScheduleRequest = (function() {
|
|
25109
|
+
|
|
25110
|
+
/**
|
|
25111
|
+
* Properties of an UpdateBackupScheduleRequest.
|
|
25112
|
+
* @memberof google.spanner.admin.database.v1
|
|
25113
|
+
* @interface IUpdateBackupScheduleRequest
|
|
25114
|
+
* @property {google.spanner.admin.database.v1.IBackupSchedule|null} [backupSchedule] UpdateBackupScheduleRequest backupSchedule
|
|
25115
|
+
* @property {google.protobuf.IFieldMask|null} [updateMask] UpdateBackupScheduleRequest updateMask
|
|
25116
|
+
*/
|
|
25117
|
+
|
|
25118
|
+
/**
|
|
25119
|
+
* Constructs a new UpdateBackupScheduleRequest.
|
|
25120
|
+
* @memberof google.spanner.admin.database.v1
|
|
25121
|
+
* @classdesc Represents an UpdateBackupScheduleRequest.
|
|
25122
|
+
* @implements IUpdateBackupScheduleRequest
|
|
25123
|
+
* @constructor
|
|
25124
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest=} [properties] Properties to set
|
|
25125
|
+
*/
|
|
25126
|
+
function UpdateBackupScheduleRequest(properties) {
|
|
25127
|
+
if (properties)
|
|
25128
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25129
|
+
if (properties[keys[i]] != null)
|
|
25130
|
+
this[keys[i]] = properties[keys[i]];
|
|
25131
|
+
}
|
|
25132
|
+
|
|
25133
|
+
/**
|
|
25134
|
+
* UpdateBackupScheduleRequest backupSchedule.
|
|
25135
|
+
* @member {google.spanner.admin.database.v1.IBackupSchedule|null|undefined} backupSchedule
|
|
25136
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25137
|
+
* @instance
|
|
25138
|
+
*/
|
|
25139
|
+
UpdateBackupScheduleRequest.prototype.backupSchedule = null;
|
|
25140
|
+
|
|
25141
|
+
/**
|
|
25142
|
+
* UpdateBackupScheduleRequest updateMask.
|
|
25143
|
+
* @member {google.protobuf.IFieldMask|null|undefined} updateMask
|
|
25144
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25145
|
+
* @instance
|
|
25146
|
+
*/
|
|
25147
|
+
UpdateBackupScheduleRequest.prototype.updateMask = null;
|
|
25148
|
+
|
|
25149
|
+
/**
|
|
25150
|
+
* Creates a new UpdateBackupScheduleRequest instance using the specified properties.
|
|
25151
|
+
* @function create
|
|
25152
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25153
|
+
* @static
|
|
25154
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest=} [properties] Properties to set
|
|
25155
|
+
* @returns {google.spanner.admin.database.v1.UpdateBackupScheduleRequest} UpdateBackupScheduleRequest instance
|
|
25156
|
+
*/
|
|
25157
|
+
UpdateBackupScheduleRequest.create = function create(properties) {
|
|
25158
|
+
return new UpdateBackupScheduleRequest(properties);
|
|
25159
|
+
};
|
|
25160
|
+
|
|
25161
|
+
/**
|
|
25162
|
+
* Encodes the specified UpdateBackupScheduleRequest message. Does not implicitly {@link google.spanner.admin.database.v1.UpdateBackupScheduleRequest.verify|verify} messages.
|
|
25163
|
+
* @function encode
|
|
25164
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25165
|
+
* @static
|
|
25166
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest} message UpdateBackupScheduleRequest message or plain object to encode
|
|
25167
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25168
|
+
* @returns {$protobuf.Writer} Writer
|
|
25169
|
+
*/
|
|
25170
|
+
UpdateBackupScheduleRequest.encode = function encode(message, writer) {
|
|
25171
|
+
if (!writer)
|
|
25172
|
+
writer = $Writer.create();
|
|
25173
|
+
if (message.backupSchedule != null && Object.hasOwnProperty.call(message, "backupSchedule"))
|
|
25174
|
+
$root.google.spanner.admin.database.v1.BackupSchedule.encode(message.backupSchedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
25175
|
+
if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
|
|
25176
|
+
$root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
25177
|
+
return writer;
|
|
25178
|
+
};
|
|
25179
|
+
|
|
25180
|
+
/**
|
|
25181
|
+
* Encodes the specified UpdateBackupScheduleRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.UpdateBackupScheduleRequest.verify|verify} messages.
|
|
25182
|
+
* @function encodeDelimited
|
|
25183
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25184
|
+
* @static
|
|
25185
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest} message UpdateBackupScheduleRequest message or plain object to encode
|
|
25186
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25187
|
+
* @returns {$protobuf.Writer} Writer
|
|
25188
|
+
*/
|
|
25189
|
+
UpdateBackupScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25190
|
+
return this.encode(message, writer).ldelim();
|
|
25191
|
+
};
|
|
25192
|
+
|
|
25193
|
+
/**
|
|
25194
|
+
* Decodes an UpdateBackupScheduleRequest message from the specified reader or buffer.
|
|
25195
|
+
* @function decode
|
|
25196
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25197
|
+
* @static
|
|
25198
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25199
|
+
* @param {number} [length] Message length if known beforehand
|
|
25200
|
+
* @returns {google.spanner.admin.database.v1.UpdateBackupScheduleRequest} UpdateBackupScheduleRequest
|
|
25201
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25202
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25203
|
+
*/
|
|
25204
|
+
UpdateBackupScheduleRequest.decode = function decode(reader, length) {
|
|
25205
|
+
if (!(reader instanceof $Reader))
|
|
25206
|
+
reader = $Reader.create(reader);
|
|
25207
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.UpdateBackupScheduleRequest();
|
|
25208
|
+
while (reader.pos < end) {
|
|
25209
|
+
var tag = reader.uint32();
|
|
25210
|
+
switch (tag >>> 3) {
|
|
25211
|
+
case 1: {
|
|
25212
|
+
message.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.decode(reader, reader.uint32());
|
|
25213
|
+
break;
|
|
25214
|
+
}
|
|
25215
|
+
case 2: {
|
|
25216
|
+
message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
|
|
25217
|
+
break;
|
|
25218
|
+
}
|
|
25219
|
+
default:
|
|
25220
|
+
reader.skipType(tag & 7);
|
|
25221
|
+
break;
|
|
25222
|
+
}
|
|
25223
|
+
}
|
|
25224
|
+
return message;
|
|
25225
|
+
};
|
|
25226
|
+
|
|
25227
|
+
/**
|
|
25228
|
+
* Decodes an UpdateBackupScheduleRequest message from the specified reader or buffer, length delimited.
|
|
25229
|
+
* @function decodeDelimited
|
|
25230
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25231
|
+
* @static
|
|
25232
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25233
|
+
* @returns {google.spanner.admin.database.v1.UpdateBackupScheduleRequest} UpdateBackupScheduleRequest
|
|
25234
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25235
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25236
|
+
*/
|
|
25237
|
+
UpdateBackupScheduleRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
25238
|
+
if (!(reader instanceof $Reader))
|
|
25239
|
+
reader = new $Reader(reader);
|
|
25240
|
+
return this.decode(reader, reader.uint32());
|
|
25241
|
+
};
|
|
25242
|
+
|
|
25243
|
+
/**
|
|
25244
|
+
* Verifies an UpdateBackupScheduleRequest message.
|
|
25245
|
+
* @function verify
|
|
25246
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25247
|
+
* @static
|
|
25248
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25249
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25250
|
+
*/
|
|
25251
|
+
UpdateBackupScheduleRequest.verify = function verify(message) {
|
|
25252
|
+
if (typeof message !== "object" || message === null)
|
|
25253
|
+
return "object expected";
|
|
25254
|
+
if (message.backupSchedule != null && message.hasOwnProperty("backupSchedule")) {
|
|
25255
|
+
var error = $root.google.spanner.admin.database.v1.BackupSchedule.verify(message.backupSchedule);
|
|
25256
|
+
if (error)
|
|
25257
|
+
return "backupSchedule." + error;
|
|
25258
|
+
}
|
|
25259
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
|
|
25260
|
+
var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
|
|
25261
|
+
if (error)
|
|
25262
|
+
return "updateMask." + error;
|
|
25263
|
+
}
|
|
25264
|
+
return null;
|
|
25265
|
+
};
|
|
25266
|
+
|
|
25267
|
+
/**
|
|
25268
|
+
* Creates an UpdateBackupScheduleRequest message from a plain object. Also converts values to their respective internal types.
|
|
25269
|
+
* @function fromObject
|
|
25270
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25271
|
+
* @static
|
|
25272
|
+
* @param {Object.<string,*>} object Plain object
|
|
25273
|
+
* @returns {google.spanner.admin.database.v1.UpdateBackupScheduleRequest} UpdateBackupScheduleRequest
|
|
25274
|
+
*/
|
|
25275
|
+
UpdateBackupScheduleRequest.fromObject = function fromObject(object) {
|
|
25276
|
+
if (object instanceof $root.google.spanner.admin.database.v1.UpdateBackupScheduleRequest)
|
|
25277
|
+
return object;
|
|
25278
|
+
var message = new $root.google.spanner.admin.database.v1.UpdateBackupScheduleRequest();
|
|
25279
|
+
if (object.backupSchedule != null) {
|
|
25280
|
+
if (typeof object.backupSchedule !== "object")
|
|
25281
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateBackupScheduleRequest.backupSchedule: object expected");
|
|
25282
|
+
message.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.fromObject(object.backupSchedule);
|
|
25283
|
+
}
|
|
25284
|
+
if (object.updateMask != null) {
|
|
25285
|
+
if (typeof object.updateMask !== "object")
|
|
25286
|
+
throw TypeError(".google.spanner.admin.database.v1.UpdateBackupScheduleRequest.updateMask: object expected");
|
|
25287
|
+
message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
|
|
25288
|
+
}
|
|
25289
|
+
return message;
|
|
25290
|
+
};
|
|
25291
|
+
|
|
25292
|
+
/**
|
|
25293
|
+
* Creates a plain object from an UpdateBackupScheduleRequest message. Also converts values to other types if specified.
|
|
25294
|
+
* @function toObject
|
|
25295
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25296
|
+
* @static
|
|
25297
|
+
* @param {google.spanner.admin.database.v1.UpdateBackupScheduleRequest} message UpdateBackupScheduleRequest
|
|
25298
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25299
|
+
* @returns {Object.<string,*>} Plain object
|
|
25300
|
+
*/
|
|
25301
|
+
UpdateBackupScheduleRequest.toObject = function toObject(message, options) {
|
|
25302
|
+
if (!options)
|
|
25303
|
+
options = {};
|
|
25304
|
+
var object = {};
|
|
25305
|
+
if (options.defaults) {
|
|
25306
|
+
object.backupSchedule = null;
|
|
25307
|
+
object.updateMask = null;
|
|
25308
|
+
}
|
|
25309
|
+
if (message.backupSchedule != null && message.hasOwnProperty("backupSchedule"))
|
|
25310
|
+
object.backupSchedule = $root.google.spanner.admin.database.v1.BackupSchedule.toObject(message.backupSchedule, options);
|
|
25311
|
+
if (message.updateMask != null && message.hasOwnProperty("updateMask"))
|
|
25312
|
+
object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
|
|
25313
|
+
return object;
|
|
25314
|
+
};
|
|
25315
|
+
|
|
25316
|
+
/**
|
|
25317
|
+
* Converts this UpdateBackupScheduleRequest to JSON.
|
|
25318
|
+
* @function toJSON
|
|
25319
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25320
|
+
* @instance
|
|
25321
|
+
* @returns {Object.<string,*>} JSON object
|
|
25322
|
+
*/
|
|
25323
|
+
UpdateBackupScheduleRequest.prototype.toJSON = function toJSON() {
|
|
25324
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25325
|
+
};
|
|
25326
|
+
|
|
25327
|
+
/**
|
|
25328
|
+
* Gets the default type url for UpdateBackupScheduleRequest
|
|
25329
|
+
* @function getTypeUrl
|
|
25330
|
+
* @memberof google.spanner.admin.database.v1.UpdateBackupScheduleRequest
|
|
25331
|
+
* @static
|
|
25332
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25333
|
+
* @returns {string} The default type url
|
|
25334
|
+
*/
|
|
25335
|
+
UpdateBackupScheduleRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25336
|
+
if (typeUrlPrefix === undefined) {
|
|
25337
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25338
|
+
}
|
|
25339
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.UpdateBackupScheduleRequest";
|
|
25340
|
+
};
|
|
25341
|
+
|
|
25342
|
+
return UpdateBackupScheduleRequest;
|
|
25343
|
+
})();
|
|
25344
|
+
|
|
22889
25345
|
v1.DatabaseAdmin = (function() {
|
|
22890
25346
|
|
|
22891
25347
|
/**
|
|
@@ -23578,6 +26034,171 @@
|
|
|
23578
26034
|
* @variation 2
|
|
23579
26035
|
*/
|
|
23580
26036
|
|
|
26037
|
+
/**
|
|
26038
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|createBackupSchedule}.
|
|
26039
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26040
|
+
* @typedef CreateBackupScheduleCallback
|
|
26041
|
+
* @type {function}
|
|
26042
|
+
* @param {Error|null} error Error, if any
|
|
26043
|
+
* @param {google.spanner.admin.database.v1.BackupSchedule} [response] BackupSchedule
|
|
26044
|
+
*/
|
|
26045
|
+
|
|
26046
|
+
/**
|
|
26047
|
+
* Calls CreateBackupSchedule.
|
|
26048
|
+
* @function createBackupSchedule
|
|
26049
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26050
|
+
* @instance
|
|
26051
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest} request CreateBackupScheduleRequest message or plain object
|
|
26052
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.CreateBackupScheduleCallback} callback Node-style callback called with the error, if any, and BackupSchedule
|
|
26053
|
+
* @returns {undefined}
|
|
26054
|
+
* @variation 1
|
|
26055
|
+
*/
|
|
26056
|
+
Object.defineProperty(DatabaseAdmin.prototype.createBackupSchedule = function createBackupSchedule(request, callback) {
|
|
26057
|
+
return this.rpcCall(createBackupSchedule, $root.google.spanner.admin.database.v1.CreateBackupScheduleRequest, $root.google.spanner.admin.database.v1.BackupSchedule, request, callback);
|
|
26058
|
+
}, "name", { value: "CreateBackupSchedule" });
|
|
26059
|
+
|
|
26060
|
+
/**
|
|
26061
|
+
* Calls CreateBackupSchedule.
|
|
26062
|
+
* @function createBackupSchedule
|
|
26063
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26064
|
+
* @instance
|
|
26065
|
+
* @param {google.spanner.admin.database.v1.ICreateBackupScheduleRequest} request CreateBackupScheduleRequest message or plain object
|
|
26066
|
+
* @returns {Promise<google.spanner.admin.database.v1.BackupSchedule>} Promise
|
|
26067
|
+
* @variation 2
|
|
26068
|
+
*/
|
|
26069
|
+
|
|
26070
|
+
/**
|
|
26071
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|getBackupSchedule}.
|
|
26072
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26073
|
+
* @typedef GetBackupScheduleCallback
|
|
26074
|
+
* @type {function}
|
|
26075
|
+
* @param {Error|null} error Error, if any
|
|
26076
|
+
* @param {google.spanner.admin.database.v1.BackupSchedule} [response] BackupSchedule
|
|
26077
|
+
*/
|
|
26078
|
+
|
|
26079
|
+
/**
|
|
26080
|
+
* Calls GetBackupSchedule.
|
|
26081
|
+
* @function getBackupSchedule
|
|
26082
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26083
|
+
* @instance
|
|
26084
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest} request GetBackupScheduleRequest message or plain object
|
|
26085
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.GetBackupScheduleCallback} callback Node-style callback called with the error, if any, and BackupSchedule
|
|
26086
|
+
* @returns {undefined}
|
|
26087
|
+
* @variation 1
|
|
26088
|
+
*/
|
|
26089
|
+
Object.defineProperty(DatabaseAdmin.prototype.getBackupSchedule = function getBackupSchedule(request, callback) {
|
|
26090
|
+
return this.rpcCall(getBackupSchedule, $root.google.spanner.admin.database.v1.GetBackupScheduleRequest, $root.google.spanner.admin.database.v1.BackupSchedule, request, callback);
|
|
26091
|
+
}, "name", { value: "GetBackupSchedule" });
|
|
26092
|
+
|
|
26093
|
+
/**
|
|
26094
|
+
* Calls GetBackupSchedule.
|
|
26095
|
+
* @function getBackupSchedule
|
|
26096
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26097
|
+
* @instance
|
|
26098
|
+
* @param {google.spanner.admin.database.v1.IGetBackupScheduleRequest} request GetBackupScheduleRequest message or plain object
|
|
26099
|
+
* @returns {Promise<google.spanner.admin.database.v1.BackupSchedule>} Promise
|
|
26100
|
+
* @variation 2
|
|
26101
|
+
*/
|
|
26102
|
+
|
|
26103
|
+
/**
|
|
26104
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|updateBackupSchedule}.
|
|
26105
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26106
|
+
* @typedef UpdateBackupScheduleCallback
|
|
26107
|
+
* @type {function}
|
|
26108
|
+
* @param {Error|null} error Error, if any
|
|
26109
|
+
* @param {google.spanner.admin.database.v1.BackupSchedule} [response] BackupSchedule
|
|
26110
|
+
*/
|
|
26111
|
+
|
|
26112
|
+
/**
|
|
26113
|
+
* Calls UpdateBackupSchedule.
|
|
26114
|
+
* @function updateBackupSchedule
|
|
26115
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26116
|
+
* @instance
|
|
26117
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest} request UpdateBackupScheduleRequest message or plain object
|
|
26118
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackupScheduleCallback} callback Node-style callback called with the error, if any, and BackupSchedule
|
|
26119
|
+
* @returns {undefined}
|
|
26120
|
+
* @variation 1
|
|
26121
|
+
*/
|
|
26122
|
+
Object.defineProperty(DatabaseAdmin.prototype.updateBackupSchedule = function updateBackupSchedule(request, callback) {
|
|
26123
|
+
return this.rpcCall(updateBackupSchedule, $root.google.spanner.admin.database.v1.UpdateBackupScheduleRequest, $root.google.spanner.admin.database.v1.BackupSchedule, request, callback);
|
|
26124
|
+
}, "name", { value: "UpdateBackupSchedule" });
|
|
26125
|
+
|
|
26126
|
+
/**
|
|
26127
|
+
* Calls UpdateBackupSchedule.
|
|
26128
|
+
* @function updateBackupSchedule
|
|
26129
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26130
|
+
* @instance
|
|
26131
|
+
* @param {google.spanner.admin.database.v1.IUpdateBackupScheduleRequest} request UpdateBackupScheduleRequest message or plain object
|
|
26132
|
+
* @returns {Promise<google.spanner.admin.database.v1.BackupSchedule>} Promise
|
|
26133
|
+
* @variation 2
|
|
26134
|
+
*/
|
|
26135
|
+
|
|
26136
|
+
/**
|
|
26137
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|deleteBackupSchedule}.
|
|
26138
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26139
|
+
* @typedef DeleteBackupScheduleCallback
|
|
26140
|
+
* @type {function}
|
|
26141
|
+
* @param {Error|null} error Error, if any
|
|
26142
|
+
* @param {google.protobuf.Empty} [response] Empty
|
|
26143
|
+
*/
|
|
26144
|
+
|
|
26145
|
+
/**
|
|
26146
|
+
* Calls DeleteBackupSchedule.
|
|
26147
|
+
* @function deleteBackupSchedule
|
|
26148
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26149
|
+
* @instance
|
|
26150
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest} request DeleteBackupScheduleRequest message or plain object
|
|
26151
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackupScheduleCallback} callback Node-style callback called with the error, if any, and Empty
|
|
26152
|
+
* @returns {undefined}
|
|
26153
|
+
* @variation 1
|
|
26154
|
+
*/
|
|
26155
|
+
Object.defineProperty(DatabaseAdmin.prototype.deleteBackupSchedule = function deleteBackupSchedule(request, callback) {
|
|
26156
|
+
return this.rpcCall(deleteBackupSchedule, $root.google.spanner.admin.database.v1.DeleteBackupScheduleRequest, $root.google.protobuf.Empty, request, callback);
|
|
26157
|
+
}, "name", { value: "DeleteBackupSchedule" });
|
|
26158
|
+
|
|
26159
|
+
/**
|
|
26160
|
+
* Calls DeleteBackupSchedule.
|
|
26161
|
+
* @function deleteBackupSchedule
|
|
26162
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26163
|
+
* @instance
|
|
26164
|
+
* @param {google.spanner.admin.database.v1.IDeleteBackupScheduleRequest} request DeleteBackupScheduleRequest message or plain object
|
|
26165
|
+
* @returns {Promise<google.protobuf.Empty>} Promise
|
|
26166
|
+
* @variation 2
|
|
26167
|
+
*/
|
|
26168
|
+
|
|
26169
|
+
/**
|
|
26170
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|listBackupSchedules}.
|
|
26171
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26172
|
+
* @typedef ListBackupSchedulesCallback
|
|
26173
|
+
* @type {function}
|
|
26174
|
+
* @param {Error|null} error Error, if any
|
|
26175
|
+
* @param {google.spanner.admin.database.v1.ListBackupSchedulesResponse} [response] ListBackupSchedulesResponse
|
|
26176
|
+
*/
|
|
26177
|
+
|
|
26178
|
+
/**
|
|
26179
|
+
* Calls ListBackupSchedules.
|
|
26180
|
+
* @function listBackupSchedules
|
|
26181
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26182
|
+
* @instance
|
|
26183
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest} request ListBackupSchedulesRequest message or plain object
|
|
26184
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedulesCallback} callback Node-style callback called with the error, if any, and ListBackupSchedulesResponse
|
|
26185
|
+
* @returns {undefined}
|
|
26186
|
+
* @variation 1
|
|
26187
|
+
*/
|
|
26188
|
+
Object.defineProperty(DatabaseAdmin.prototype.listBackupSchedules = function listBackupSchedules(request, callback) {
|
|
26189
|
+
return this.rpcCall(listBackupSchedules, $root.google.spanner.admin.database.v1.ListBackupSchedulesRequest, $root.google.spanner.admin.database.v1.ListBackupSchedulesResponse, request, callback);
|
|
26190
|
+
}, "name", { value: "ListBackupSchedules" });
|
|
26191
|
+
|
|
26192
|
+
/**
|
|
26193
|
+
* Calls ListBackupSchedules.
|
|
26194
|
+
* @function listBackupSchedules
|
|
26195
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26196
|
+
* @instance
|
|
26197
|
+
* @param {google.spanner.admin.database.v1.IListBackupSchedulesRequest} request ListBackupSchedulesRequest message or plain object
|
|
26198
|
+
* @returns {Promise<google.spanner.admin.database.v1.ListBackupSchedulesResponse>} Promise
|
|
26199
|
+
* @variation 2
|
|
26200
|
+
*/
|
|
26201
|
+
|
|
23581
26202
|
return DatabaseAdmin;
|
|
23582
26203
|
})();
|
|
23583
26204
|
|
|
@@ -42027,6 +44648,7 @@
|
|
|
42027
44648
|
* @property {google.spanner.executor.v1.IGenerateDbPartitionsForQueryAction|null} [generateDbPartitionsQuery] SpannerAction generateDbPartitionsQuery
|
|
42028
44649
|
* @property {google.spanner.executor.v1.IExecutePartitionAction|null} [executePartition] SpannerAction executePartition
|
|
42029
44650
|
* @property {google.spanner.executor.v1.IExecuteChangeStreamQuery|null} [executeChangeStreamQuery] SpannerAction executeChangeStreamQuery
|
|
44651
|
+
* @property {google.spanner.executor.v1.IQueryCancellationAction|null} [queryCancellation] SpannerAction queryCancellation
|
|
42030
44652
|
*/
|
|
42031
44653
|
|
|
42032
44654
|
/**
|
|
@@ -42188,17 +44810,25 @@
|
|
|
42188
44810
|
*/
|
|
42189
44811
|
SpannerAction.prototype.executeChangeStreamQuery = null;
|
|
42190
44812
|
|
|
44813
|
+
/**
|
|
44814
|
+
* SpannerAction queryCancellation.
|
|
44815
|
+
* @member {google.spanner.executor.v1.IQueryCancellationAction|null|undefined} queryCancellation
|
|
44816
|
+
* @memberof google.spanner.executor.v1.SpannerAction
|
|
44817
|
+
* @instance
|
|
44818
|
+
*/
|
|
44819
|
+
SpannerAction.prototype.queryCancellation = null;
|
|
44820
|
+
|
|
42191
44821
|
// OneOf field names bound to virtual getters and setters
|
|
42192
44822
|
var $oneOfFields;
|
|
42193
44823
|
|
|
42194
44824
|
/**
|
|
42195
44825
|
* SpannerAction action.
|
|
42196
|
-
* @member {"start"|"finish"|"read"|"query"|"mutation"|"dml"|"batchDml"|"write"|"partitionedUpdate"|"admin"|"startBatchTxn"|"closeBatchTxn"|"generateDbPartitionsRead"|"generateDbPartitionsQuery"|"executePartition"|"executeChangeStreamQuery"|undefined} action
|
|
44826
|
+
* @member {"start"|"finish"|"read"|"query"|"mutation"|"dml"|"batchDml"|"write"|"partitionedUpdate"|"admin"|"startBatchTxn"|"closeBatchTxn"|"generateDbPartitionsRead"|"generateDbPartitionsQuery"|"executePartition"|"executeChangeStreamQuery"|"queryCancellation"|undefined} action
|
|
42197
44827
|
* @memberof google.spanner.executor.v1.SpannerAction
|
|
42198
44828
|
* @instance
|
|
42199
44829
|
*/
|
|
42200
44830
|
Object.defineProperty(SpannerAction.prototype, "action", {
|
|
42201
|
-
get: $util.oneOfGetter($oneOfFields = ["start", "finish", "read", "query", "mutation", "dml", "batchDml", "write", "partitionedUpdate", "admin", "startBatchTxn", "closeBatchTxn", "generateDbPartitionsRead", "generateDbPartitionsQuery", "executePartition", "executeChangeStreamQuery"]),
|
|
44831
|
+
get: $util.oneOfGetter($oneOfFields = ["start", "finish", "read", "query", "mutation", "dml", "batchDml", "write", "partitionedUpdate", "admin", "startBatchTxn", "closeBatchTxn", "generateDbPartitionsRead", "generateDbPartitionsQuery", "executePartition", "executeChangeStreamQuery", "queryCancellation"]),
|
|
42202
44832
|
set: $util.oneOfSetter($oneOfFields)
|
|
42203
44833
|
});
|
|
42204
44834
|
|
|
@@ -42262,6 +44892,8 @@
|
|
|
42262
44892
|
$root.google.spanner.executor.v1.ExecutePartitionAction.encode(message.executePartition, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim();
|
|
42263
44893
|
if (message.executeChangeStreamQuery != null && Object.hasOwnProperty.call(message, "executeChangeStreamQuery"))
|
|
42264
44894
|
$root.google.spanner.executor.v1.ExecuteChangeStreamQuery.encode(message.executeChangeStreamQuery, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
|
|
44895
|
+
if (message.queryCancellation != null && Object.hasOwnProperty.call(message, "queryCancellation"))
|
|
44896
|
+
$root.google.spanner.executor.v1.QueryCancellationAction.encode(message.queryCancellation, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim();
|
|
42265
44897
|
return writer;
|
|
42266
44898
|
};
|
|
42267
44899
|
|
|
@@ -42368,6 +45000,10 @@
|
|
|
42368
45000
|
message.executeChangeStreamQuery = $root.google.spanner.executor.v1.ExecuteChangeStreamQuery.decode(reader, reader.uint32());
|
|
42369
45001
|
break;
|
|
42370
45002
|
}
|
|
45003
|
+
case 51: {
|
|
45004
|
+
message.queryCancellation = $root.google.spanner.executor.v1.QueryCancellationAction.decode(reader, reader.uint32());
|
|
45005
|
+
break;
|
|
45006
|
+
}
|
|
42371
45007
|
default:
|
|
42372
45008
|
reader.skipType(tag & 7);
|
|
42373
45009
|
break;
|
|
@@ -42570,6 +45206,16 @@
|
|
|
42570
45206
|
return "executeChangeStreamQuery." + error;
|
|
42571
45207
|
}
|
|
42572
45208
|
}
|
|
45209
|
+
if (message.queryCancellation != null && message.hasOwnProperty("queryCancellation")) {
|
|
45210
|
+
if (properties.action === 1)
|
|
45211
|
+
return "action: multiple values";
|
|
45212
|
+
properties.action = 1;
|
|
45213
|
+
{
|
|
45214
|
+
var error = $root.google.spanner.executor.v1.QueryCancellationAction.verify(message.queryCancellation);
|
|
45215
|
+
if (error)
|
|
45216
|
+
return "queryCancellation." + error;
|
|
45217
|
+
}
|
|
45218
|
+
}
|
|
42573
45219
|
return null;
|
|
42574
45220
|
};
|
|
42575
45221
|
|
|
@@ -42672,6 +45318,11 @@
|
|
|
42672
45318
|
throw TypeError(".google.spanner.executor.v1.SpannerAction.executeChangeStreamQuery: object expected");
|
|
42673
45319
|
message.executeChangeStreamQuery = $root.google.spanner.executor.v1.ExecuteChangeStreamQuery.fromObject(object.executeChangeStreamQuery);
|
|
42674
45320
|
}
|
|
45321
|
+
if (object.queryCancellation != null) {
|
|
45322
|
+
if (typeof object.queryCancellation !== "object")
|
|
45323
|
+
throw TypeError(".google.spanner.executor.v1.SpannerAction.queryCancellation: object expected");
|
|
45324
|
+
message.queryCancellation = $root.google.spanner.executor.v1.QueryCancellationAction.fromObject(object.queryCancellation);
|
|
45325
|
+
}
|
|
42675
45326
|
return message;
|
|
42676
45327
|
};
|
|
42677
45328
|
|
|
@@ -42776,6 +45427,11 @@
|
|
|
42776
45427
|
if (options.oneofs)
|
|
42777
45428
|
object.action = "executeChangeStreamQuery";
|
|
42778
45429
|
}
|
|
45430
|
+
if (message.queryCancellation != null && message.hasOwnProperty("queryCancellation")) {
|
|
45431
|
+
object.queryCancellation = $root.google.spanner.executor.v1.QueryCancellationAction.toObject(message.queryCancellation, options);
|
|
45432
|
+
if (options.oneofs)
|
|
45433
|
+
object.action = "queryCancellation";
|
|
45434
|
+
}
|
|
42779
45435
|
return object;
|
|
42780
45436
|
};
|
|
42781
45437
|
|
|
@@ -58406,6 +61062,233 @@
|
|
|
58406
61062
|
return GetOperationAction;
|
|
58407
61063
|
})();
|
|
58408
61064
|
|
|
61065
|
+
v1.QueryCancellationAction = (function() {
|
|
61066
|
+
|
|
61067
|
+
/**
|
|
61068
|
+
* Properties of a QueryCancellationAction.
|
|
61069
|
+
* @memberof google.spanner.executor.v1
|
|
61070
|
+
* @interface IQueryCancellationAction
|
|
61071
|
+
* @property {string|null} [longRunningSql] QueryCancellationAction longRunningSql
|
|
61072
|
+
* @property {string|null} [cancelQuery] QueryCancellationAction cancelQuery
|
|
61073
|
+
*/
|
|
61074
|
+
|
|
61075
|
+
/**
|
|
61076
|
+
* Constructs a new QueryCancellationAction.
|
|
61077
|
+
* @memberof google.spanner.executor.v1
|
|
61078
|
+
* @classdesc Represents a QueryCancellationAction.
|
|
61079
|
+
* @implements IQueryCancellationAction
|
|
61080
|
+
* @constructor
|
|
61081
|
+
* @param {google.spanner.executor.v1.IQueryCancellationAction=} [properties] Properties to set
|
|
61082
|
+
*/
|
|
61083
|
+
function QueryCancellationAction(properties) {
|
|
61084
|
+
if (properties)
|
|
61085
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
61086
|
+
if (properties[keys[i]] != null)
|
|
61087
|
+
this[keys[i]] = properties[keys[i]];
|
|
61088
|
+
}
|
|
61089
|
+
|
|
61090
|
+
/**
|
|
61091
|
+
* QueryCancellationAction longRunningSql.
|
|
61092
|
+
* @member {string} longRunningSql
|
|
61093
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61094
|
+
* @instance
|
|
61095
|
+
*/
|
|
61096
|
+
QueryCancellationAction.prototype.longRunningSql = "";
|
|
61097
|
+
|
|
61098
|
+
/**
|
|
61099
|
+
* QueryCancellationAction cancelQuery.
|
|
61100
|
+
* @member {string} cancelQuery
|
|
61101
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61102
|
+
* @instance
|
|
61103
|
+
*/
|
|
61104
|
+
QueryCancellationAction.prototype.cancelQuery = "";
|
|
61105
|
+
|
|
61106
|
+
/**
|
|
61107
|
+
* Creates a new QueryCancellationAction instance using the specified properties.
|
|
61108
|
+
* @function create
|
|
61109
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61110
|
+
* @static
|
|
61111
|
+
* @param {google.spanner.executor.v1.IQueryCancellationAction=} [properties] Properties to set
|
|
61112
|
+
* @returns {google.spanner.executor.v1.QueryCancellationAction} QueryCancellationAction instance
|
|
61113
|
+
*/
|
|
61114
|
+
QueryCancellationAction.create = function create(properties) {
|
|
61115
|
+
return new QueryCancellationAction(properties);
|
|
61116
|
+
};
|
|
61117
|
+
|
|
61118
|
+
/**
|
|
61119
|
+
* Encodes the specified QueryCancellationAction message. Does not implicitly {@link google.spanner.executor.v1.QueryCancellationAction.verify|verify} messages.
|
|
61120
|
+
* @function encode
|
|
61121
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61122
|
+
* @static
|
|
61123
|
+
* @param {google.spanner.executor.v1.IQueryCancellationAction} message QueryCancellationAction message or plain object to encode
|
|
61124
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
61125
|
+
* @returns {$protobuf.Writer} Writer
|
|
61126
|
+
*/
|
|
61127
|
+
QueryCancellationAction.encode = function encode(message, writer) {
|
|
61128
|
+
if (!writer)
|
|
61129
|
+
writer = $Writer.create();
|
|
61130
|
+
if (message.longRunningSql != null && Object.hasOwnProperty.call(message, "longRunningSql"))
|
|
61131
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.longRunningSql);
|
|
61132
|
+
if (message.cancelQuery != null && Object.hasOwnProperty.call(message, "cancelQuery"))
|
|
61133
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.cancelQuery);
|
|
61134
|
+
return writer;
|
|
61135
|
+
};
|
|
61136
|
+
|
|
61137
|
+
/**
|
|
61138
|
+
* Encodes the specified QueryCancellationAction message, length delimited. Does not implicitly {@link google.spanner.executor.v1.QueryCancellationAction.verify|verify} messages.
|
|
61139
|
+
* @function encodeDelimited
|
|
61140
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61141
|
+
* @static
|
|
61142
|
+
* @param {google.spanner.executor.v1.IQueryCancellationAction} message QueryCancellationAction message or plain object to encode
|
|
61143
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
61144
|
+
* @returns {$protobuf.Writer} Writer
|
|
61145
|
+
*/
|
|
61146
|
+
QueryCancellationAction.encodeDelimited = function encodeDelimited(message, writer) {
|
|
61147
|
+
return this.encode(message, writer).ldelim();
|
|
61148
|
+
};
|
|
61149
|
+
|
|
61150
|
+
/**
|
|
61151
|
+
* Decodes a QueryCancellationAction message from the specified reader or buffer.
|
|
61152
|
+
* @function decode
|
|
61153
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61154
|
+
* @static
|
|
61155
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
61156
|
+
* @param {number} [length] Message length if known beforehand
|
|
61157
|
+
* @returns {google.spanner.executor.v1.QueryCancellationAction} QueryCancellationAction
|
|
61158
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
61159
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
61160
|
+
*/
|
|
61161
|
+
QueryCancellationAction.decode = function decode(reader, length) {
|
|
61162
|
+
if (!(reader instanceof $Reader))
|
|
61163
|
+
reader = $Reader.create(reader);
|
|
61164
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.executor.v1.QueryCancellationAction();
|
|
61165
|
+
while (reader.pos < end) {
|
|
61166
|
+
var tag = reader.uint32();
|
|
61167
|
+
switch (tag >>> 3) {
|
|
61168
|
+
case 1: {
|
|
61169
|
+
message.longRunningSql = reader.string();
|
|
61170
|
+
break;
|
|
61171
|
+
}
|
|
61172
|
+
case 2: {
|
|
61173
|
+
message.cancelQuery = reader.string();
|
|
61174
|
+
break;
|
|
61175
|
+
}
|
|
61176
|
+
default:
|
|
61177
|
+
reader.skipType(tag & 7);
|
|
61178
|
+
break;
|
|
61179
|
+
}
|
|
61180
|
+
}
|
|
61181
|
+
return message;
|
|
61182
|
+
};
|
|
61183
|
+
|
|
61184
|
+
/**
|
|
61185
|
+
* Decodes a QueryCancellationAction message from the specified reader or buffer, length delimited.
|
|
61186
|
+
* @function decodeDelimited
|
|
61187
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61188
|
+
* @static
|
|
61189
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
61190
|
+
* @returns {google.spanner.executor.v1.QueryCancellationAction} QueryCancellationAction
|
|
61191
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
61192
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
61193
|
+
*/
|
|
61194
|
+
QueryCancellationAction.decodeDelimited = function decodeDelimited(reader) {
|
|
61195
|
+
if (!(reader instanceof $Reader))
|
|
61196
|
+
reader = new $Reader(reader);
|
|
61197
|
+
return this.decode(reader, reader.uint32());
|
|
61198
|
+
};
|
|
61199
|
+
|
|
61200
|
+
/**
|
|
61201
|
+
* Verifies a QueryCancellationAction message.
|
|
61202
|
+
* @function verify
|
|
61203
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61204
|
+
* @static
|
|
61205
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
61206
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
61207
|
+
*/
|
|
61208
|
+
QueryCancellationAction.verify = function verify(message) {
|
|
61209
|
+
if (typeof message !== "object" || message === null)
|
|
61210
|
+
return "object expected";
|
|
61211
|
+
if (message.longRunningSql != null && message.hasOwnProperty("longRunningSql"))
|
|
61212
|
+
if (!$util.isString(message.longRunningSql))
|
|
61213
|
+
return "longRunningSql: string expected";
|
|
61214
|
+
if (message.cancelQuery != null && message.hasOwnProperty("cancelQuery"))
|
|
61215
|
+
if (!$util.isString(message.cancelQuery))
|
|
61216
|
+
return "cancelQuery: string expected";
|
|
61217
|
+
return null;
|
|
61218
|
+
};
|
|
61219
|
+
|
|
61220
|
+
/**
|
|
61221
|
+
* Creates a QueryCancellationAction message from a plain object. Also converts values to their respective internal types.
|
|
61222
|
+
* @function fromObject
|
|
61223
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61224
|
+
* @static
|
|
61225
|
+
* @param {Object.<string,*>} object Plain object
|
|
61226
|
+
* @returns {google.spanner.executor.v1.QueryCancellationAction} QueryCancellationAction
|
|
61227
|
+
*/
|
|
61228
|
+
QueryCancellationAction.fromObject = function fromObject(object) {
|
|
61229
|
+
if (object instanceof $root.google.spanner.executor.v1.QueryCancellationAction)
|
|
61230
|
+
return object;
|
|
61231
|
+
var message = new $root.google.spanner.executor.v1.QueryCancellationAction();
|
|
61232
|
+
if (object.longRunningSql != null)
|
|
61233
|
+
message.longRunningSql = String(object.longRunningSql);
|
|
61234
|
+
if (object.cancelQuery != null)
|
|
61235
|
+
message.cancelQuery = String(object.cancelQuery);
|
|
61236
|
+
return message;
|
|
61237
|
+
};
|
|
61238
|
+
|
|
61239
|
+
/**
|
|
61240
|
+
* Creates a plain object from a QueryCancellationAction message. Also converts values to other types if specified.
|
|
61241
|
+
* @function toObject
|
|
61242
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61243
|
+
* @static
|
|
61244
|
+
* @param {google.spanner.executor.v1.QueryCancellationAction} message QueryCancellationAction
|
|
61245
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
61246
|
+
* @returns {Object.<string,*>} Plain object
|
|
61247
|
+
*/
|
|
61248
|
+
QueryCancellationAction.toObject = function toObject(message, options) {
|
|
61249
|
+
if (!options)
|
|
61250
|
+
options = {};
|
|
61251
|
+
var object = {};
|
|
61252
|
+
if (options.defaults) {
|
|
61253
|
+
object.longRunningSql = "";
|
|
61254
|
+
object.cancelQuery = "";
|
|
61255
|
+
}
|
|
61256
|
+
if (message.longRunningSql != null && message.hasOwnProperty("longRunningSql"))
|
|
61257
|
+
object.longRunningSql = message.longRunningSql;
|
|
61258
|
+
if (message.cancelQuery != null && message.hasOwnProperty("cancelQuery"))
|
|
61259
|
+
object.cancelQuery = message.cancelQuery;
|
|
61260
|
+
return object;
|
|
61261
|
+
};
|
|
61262
|
+
|
|
61263
|
+
/**
|
|
61264
|
+
* Converts this QueryCancellationAction to JSON.
|
|
61265
|
+
* @function toJSON
|
|
61266
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61267
|
+
* @instance
|
|
61268
|
+
* @returns {Object.<string,*>} JSON object
|
|
61269
|
+
*/
|
|
61270
|
+
QueryCancellationAction.prototype.toJSON = function toJSON() {
|
|
61271
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
61272
|
+
};
|
|
61273
|
+
|
|
61274
|
+
/**
|
|
61275
|
+
* Gets the default type url for QueryCancellationAction
|
|
61276
|
+
* @function getTypeUrl
|
|
61277
|
+
* @memberof google.spanner.executor.v1.QueryCancellationAction
|
|
61278
|
+
* @static
|
|
61279
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
61280
|
+
* @returns {string} The default type url
|
|
61281
|
+
*/
|
|
61282
|
+
QueryCancellationAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
61283
|
+
if (typeUrlPrefix === undefined) {
|
|
61284
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
61285
|
+
}
|
|
61286
|
+
return typeUrlPrefix + "/google.spanner.executor.v1.QueryCancellationAction";
|
|
61287
|
+
};
|
|
61288
|
+
|
|
61289
|
+
return QueryCancellationAction;
|
|
61290
|
+
})();
|
|
61291
|
+
|
|
58409
61292
|
v1.CancelOperationAction = (function() {
|
|
58410
61293
|
|
|
58411
61294
|
/**
|
|
@@ -73430,6 +76313,8 @@
|
|
|
73430
76313
|
* @property {google.spanner.v1.IRequestOptions|null} [requestOptions] ReadRequest requestOptions
|
|
73431
76314
|
* @property {google.spanner.v1.IDirectedReadOptions|null} [directedReadOptions] ReadRequest directedReadOptions
|
|
73432
76315
|
* @property {boolean|null} [dataBoostEnabled] ReadRequest dataBoostEnabled
|
|
76316
|
+
* @property {google.spanner.v1.ReadRequest.OrderBy|null} [orderBy] ReadRequest orderBy
|
|
76317
|
+
* @property {google.spanner.v1.ReadRequest.LockHint|null} [lockHint] ReadRequest lockHint
|
|
73433
76318
|
*/
|
|
73434
76319
|
|
|
73435
76320
|
/**
|
|
@@ -73544,6 +76429,22 @@
|
|
|
73544
76429
|
*/
|
|
73545
76430
|
ReadRequest.prototype.dataBoostEnabled = false;
|
|
73546
76431
|
|
|
76432
|
+
/**
|
|
76433
|
+
* ReadRequest orderBy.
|
|
76434
|
+
* @member {google.spanner.v1.ReadRequest.OrderBy} orderBy
|
|
76435
|
+
* @memberof google.spanner.v1.ReadRequest
|
|
76436
|
+
* @instance
|
|
76437
|
+
*/
|
|
76438
|
+
ReadRequest.prototype.orderBy = 0;
|
|
76439
|
+
|
|
76440
|
+
/**
|
|
76441
|
+
* ReadRequest lockHint.
|
|
76442
|
+
* @member {google.spanner.v1.ReadRequest.LockHint} lockHint
|
|
76443
|
+
* @memberof google.spanner.v1.ReadRequest
|
|
76444
|
+
* @instance
|
|
76445
|
+
*/
|
|
76446
|
+
ReadRequest.prototype.lockHint = 0;
|
|
76447
|
+
|
|
73547
76448
|
/**
|
|
73548
76449
|
* Creates a new ReadRequest instance using the specified properties.
|
|
73549
76450
|
* @function create
|
|
@@ -73593,6 +76494,10 @@
|
|
|
73593
76494
|
$root.google.spanner.v1.DirectedReadOptions.encode(message.directedReadOptions, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
73594
76495
|
if (message.dataBoostEnabled != null && Object.hasOwnProperty.call(message, "dataBoostEnabled"))
|
|
73595
76496
|
writer.uint32(/* id 15, wireType 0 =*/120).bool(message.dataBoostEnabled);
|
|
76497
|
+
if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy"))
|
|
76498
|
+
writer.uint32(/* id 16, wireType 0 =*/128).int32(message.orderBy);
|
|
76499
|
+
if (message.lockHint != null && Object.hasOwnProperty.call(message, "lockHint"))
|
|
76500
|
+
writer.uint32(/* id 17, wireType 0 =*/136).int32(message.lockHint);
|
|
73596
76501
|
return writer;
|
|
73597
76502
|
};
|
|
73598
76503
|
|
|
@@ -73677,6 +76582,14 @@
|
|
|
73677
76582
|
message.dataBoostEnabled = reader.bool();
|
|
73678
76583
|
break;
|
|
73679
76584
|
}
|
|
76585
|
+
case 16: {
|
|
76586
|
+
message.orderBy = reader.int32();
|
|
76587
|
+
break;
|
|
76588
|
+
}
|
|
76589
|
+
case 17: {
|
|
76590
|
+
message.lockHint = reader.int32();
|
|
76591
|
+
break;
|
|
76592
|
+
}
|
|
73680
76593
|
default:
|
|
73681
76594
|
reader.skipType(tag & 7);
|
|
73682
76595
|
break;
|
|
@@ -73760,6 +76673,24 @@
|
|
|
73760
76673
|
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
73761
76674
|
if (typeof message.dataBoostEnabled !== "boolean")
|
|
73762
76675
|
return "dataBoostEnabled: boolean expected";
|
|
76676
|
+
if (message.orderBy != null && message.hasOwnProperty("orderBy"))
|
|
76677
|
+
switch (message.orderBy) {
|
|
76678
|
+
default:
|
|
76679
|
+
return "orderBy: enum value expected";
|
|
76680
|
+
case 0:
|
|
76681
|
+
case 1:
|
|
76682
|
+
case 2:
|
|
76683
|
+
break;
|
|
76684
|
+
}
|
|
76685
|
+
if (message.lockHint != null && message.hasOwnProperty("lockHint"))
|
|
76686
|
+
switch (message.lockHint) {
|
|
76687
|
+
default:
|
|
76688
|
+
return "lockHint: enum value expected";
|
|
76689
|
+
case 0:
|
|
76690
|
+
case 1:
|
|
76691
|
+
case 2:
|
|
76692
|
+
break;
|
|
76693
|
+
}
|
|
73763
76694
|
return null;
|
|
73764
76695
|
};
|
|
73765
76696
|
|
|
@@ -73829,6 +76760,46 @@
|
|
|
73829
76760
|
}
|
|
73830
76761
|
if (object.dataBoostEnabled != null)
|
|
73831
76762
|
message.dataBoostEnabled = Boolean(object.dataBoostEnabled);
|
|
76763
|
+
switch (object.orderBy) {
|
|
76764
|
+
default:
|
|
76765
|
+
if (typeof object.orderBy === "number") {
|
|
76766
|
+
message.orderBy = object.orderBy;
|
|
76767
|
+
break;
|
|
76768
|
+
}
|
|
76769
|
+
break;
|
|
76770
|
+
case "ORDER_BY_UNSPECIFIED":
|
|
76771
|
+
case 0:
|
|
76772
|
+
message.orderBy = 0;
|
|
76773
|
+
break;
|
|
76774
|
+
case "ORDER_BY_PRIMARY_KEY":
|
|
76775
|
+
case 1:
|
|
76776
|
+
message.orderBy = 1;
|
|
76777
|
+
break;
|
|
76778
|
+
case "ORDER_BY_NO_ORDER":
|
|
76779
|
+
case 2:
|
|
76780
|
+
message.orderBy = 2;
|
|
76781
|
+
break;
|
|
76782
|
+
}
|
|
76783
|
+
switch (object.lockHint) {
|
|
76784
|
+
default:
|
|
76785
|
+
if (typeof object.lockHint === "number") {
|
|
76786
|
+
message.lockHint = object.lockHint;
|
|
76787
|
+
break;
|
|
76788
|
+
}
|
|
76789
|
+
break;
|
|
76790
|
+
case "LOCK_HINT_UNSPECIFIED":
|
|
76791
|
+
case 0:
|
|
76792
|
+
message.lockHint = 0;
|
|
76793
|
+
break;
|
|
76794
|
+
case "LOCK_HINT_SHARED":
|
|
76795
|
+
case 1:
|
|
76796
|
+
message.lockHint = 1;
|
|
76797
|
+
break;
|
|
76798
|
+
case "LOCK_HINT_EXCLUSIVE":
|
|
76799
|
+
case 2:
|
|
76800
|
+
message.lockHint = 2;
|
|
76801
|
+
break;
|
|
76802
|
+
}
|
|
73832
76803
|
return message;
|
|
73833
76804
|
};
|
|
73834
76805
|
|
|
@@ -73875,6 +76846,8 @@
|
|
|
73875
76846
|
object.requestOptions = null;
|
|
73876
76847
|
object.directedReadOptions = null;
|
|
73877
76848
|
object.dataBoostEnabled = false;
|
|
76849
|
+
object.orderBy = options.enums === String ? "ORDER_BY_UNSPECIFIED" : 0;
|
|
76850
|
+
object.lockHint = options.enums === String ? "LOCK_HINT_UNSPECIFIED" : 0;
|
|
73878
76851
|
}
|
|
73879
76852
|
if (message.session != null && message.hasOwnProperty("session"))
|
|
73880
76853
|
object.session = message.session;
|
|
@@ -73906,6 +76879,10 @@
|
|
|
73906
76879
|
object.directedReadOptions = $root.google.spanner.v1.DirectedReadOptions.toObject(message.directedReadOptions, options);
|
|
73907
76880
|
if (message.dataBoostEnabled != null && message.hasOwnProperty("dataBoostEnabled"))
|
|
73908
76881
|
object.dataBoostEnabled = message.dataBoostEnabled;
|
|
76882
|
+
if (message.orderBy != null && message.hasOwnProperty("orderBy"))
|
|
76883
|
+
object.orderBy = options.enums === String ? $root.google.spanner.v1.ReadRequest.OrderBy[message.orderBy] === undefined ? message.orderBy : $root.google.spanner.v1.ReadRequest.OrderBy[message.orderBy] : message.orderBy;
|
|
76884
|
+
if (message.lockHint != null && message.hasOwnProperty("lockHint"))
|
|
76885
|
+
object.lockHint = options.enums === String ? $root.google.spanner.v1.ReadRequest.LockHint[message.lockHint] === undefined ? message.lockHint : $root.google.spanner.v1.ReadRequest.LockHint[message.lockHint] : message.lockHint;
|
|
73909
76886
|
return object;
|
|
73910
76887
|
};
|
|
73911
76888
|
|
|
@@ -73935,6 +76912,38 @@
|
|
|
73935
76912
|
return typeUrlPrefix + "/google.spanner.v1.ReadRequest";
|
|
73936
76913
|
};
|
|
73937
76914
|
|
|
76915
|
+
/**
|
|
76916
|
+
* OrderBy enum.
|
|
76917
|
+
* @name google.spanner.v1.ReadRequest.OrderBy
|
|
76918
|
+
* @enum {number}
|
|
76919
|
+
* @property {number} ORDER_BY_UNSPECIFIED=0 ORDER_BY_UNSPECIFIED value
|
|
76920
|
+
* @property {number} ORDER_BY_PRIMARY_KEY=1 ORDER_BY_PRIMARY_KEY value
|
|
76921
|
+
* @property {number} ORDER_BY_NO_ORDER=2 ORDER_BY_NO_ORDER value
|
|
76922
|
+
*/
|
|
76923
|
+
ReadRequest.OrderBy = (function() {
|
|
76924
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
76925
|
+
values[valuesById[0] = "ORDER_BY_UNSPECIFIED"] = 0;
|
|
76926
|
+
values[valuesById[1] = "ORDER_BY_PRIMARY_KEY"] = 1;
|
|
76927
|
+
values[valuesById[2] = "ORDER_BY_NO_ORDER"] = 2;
|
|
76928
|
+
return values;
|
|
76929
|
+
})();
|
|
76930
|
+
|
|
76931
|
+
/**
|
|
76932
|
+
* LockHint enum.
|
|
76933
|
+
* @name google.spanner.v1.ReadRequest.LockHint
|
|
76934
|
+
* @enum {number}
|
|
76935
|
+
* @property {number} LOCK_HINT_UNSPECIFIED=0 LOCK_HINT_UNSPECIFIED value
|
|
76936
|
+
* @property {number} LOCK_HINT_SHARED=1 LOCK_HINT_SHARED value
|
|
76937
|
+
* @property {number} LOCK_HINT_EXCLUSIVE=2 LOCK_HINT_EXCLUSIVE value
|
|
76938
|
+
*/
|
|
76939
|
+
ReadRequest.LockHint = (function() {
|
|
76940
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
76941
|
+
values[valuesById[0] = "LOCK_HINT_UNSPECIFIED"] = 0;
|
|
76942
|
+
values[valuesById[1] = "LOCK_HINT_SHARED"] = 1;
|
|
76943
|
+
values[valuesById[2] = "LOCK_HINT_EXCLUSIVE"] = 2;
|
|
76944
|
+
return values;
|
|
76945
|
+
})();
|
|
76946
|
+
|
|
73938
76947
|
return ReadRequest;
|
|
73939
76948
|
})();
|
|
73940
76949
|
|