@lazycatcloud/sdk 0.1.30 → 0.1.32
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/dist/common/box.d.ts +6 -12
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +76 -43
- package/dist/common/box.js.map +1 -1
- package/dist/common/browseronly.d.ts +5 -11
- package/dist/common/browseronly.d.ts.map +1 -1
- package/dist/common/browseronly.js +59 -36
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.d.ts +9 -15
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +81 -46
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/file_handler.d.ts +148 -0
- package/dist/common/file_handler.d.ts.map +1 -0
- package/dist/common/file_handler.js +385 -0
- package/dist/common/file_handler.js.map +1 -0
- package/dist/common/gateway.d.ts +6 -12
- package/dist/common/gateway.d.ts.map +1 -1
- package/dist/common/gateway.js +70 -37
- package/dist/common/gateway.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +9 -15
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/common/peripheral_device.js +59 -36
- package/dist/common/peripheral_device.js.map +1 -1
- package/dist/common/permissions.d.ts +93 -0
- package/dist/common/permissions.d.ts.map +1 -0
- package/dist/common/permissions.js +267 -0
- package/dist/common/permissions.js.map +1 -0
- package/dist/common/security_context.d.ts +9 -15
- package/dist/common/security_context.d.ts.map +1 -1
- package/dist/common/security_context.js +72 -36
- package/dist/common/security_context.js.map +1 -1
- package/dist/common/users.d.ts +13 -19
- package/dist/common/users.d.ts.map +1 -1
- package/dist/common/users.js +71 -43
- package/dist/common/users.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts +1645 -1644
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/descriptor.js +501 -254
- package/dist/google/protobuf/descriptor.js.map +1 -1
- package/dist/google/protobuf/empty.d.ts +2 -2
- package/dist/google/protobuf/empty.d.ts.map +1 -1
- package/dist/google/protobuf/empty.js +25 -5
- package/dist/google/protobuf/empty.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts +4 -2
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.js +35 -15
- package/dist/google/protobuf/timestamp.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/localdevice/clipboard.d.ts +5 -11
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +74 -62
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/localdevice/device.d.ts +2 -8
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +33 -17
- package/dist/localdevice/device.js.map +1 -1
- package/dist/localdevice/dialog.d.ts +6 -12
- package/dist/localdevice/dialog.d.ts.map +1 -1
- package/dist/localdevice/dialog.js +49 -28
- package/dist/localdevice/dialog.js.map +1 -1
- package/dist/localdevice/network.d.ts +2 -8
- package/dist/localdevice/network.d.ts.map +1 -1
- package/dist/localdevice/network.js +35 -18
- package/dist/localdevice/network.js.map +1 -1
- package/dist/localdevice/photo.d.ts +19 -25
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +214 -107
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/sys/OS_snapshot.d.ts +20 -26
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +140 -83
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +7 -13
- package/dist/sys/OS_upgrader.d.ts.map +1 -1
- package/dist/sys/OS_upgrader.js +78 -44
- package/dist/sys/OS_upgrader.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +30 -36
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +134 -93
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/ingress.d.ts +11 -17
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/ingress.js +80 -48
- package/dist/sys/ingress.js.map +1 -1
- package/dist/sys/network_manager.d.ts +10 -16
- package/dist/sys/network_manager.d.ts.map +1 -1
- package/dist/sys/network_manager.js +105 -47
- package/dist/sys/network_manager.js.map +1 -1
- package/dist/sys/package_manager.d.ts +26 -32
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +148 -86
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +33 -39
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +245 -147
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +12 -18
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +90 -46
- package/dist/sys/snapd.js.map +1 -1
- package/package.json +1 -1
package/dist/sys/OS_snapshot.js
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
29
|
+
exports.GrpcWebImpl = exports.OSSnapshotServiceStopTransferDesc = exports.OSSnapshotServiceGetStatusDesc = exports.OSSnapshotServiceSnapshotBackupRestoreDesc = exports.OSSnapshotServiceSnapshotBackupListDesc = exports.OSSnapshotServiceSnapshotBackupDelDesc = exports.OSSnapshotServiceSnapshotBackupAddDesc = exports.OSSnapshotServiceSnapshotRestoreDesc = exports.OSSnapshotServiceSnapshotListDesc = exports.OSSnapshotServiceSnapshotDelDesc = exports.OSSnapshotServiceSnapshotAddDesc = exports.OSSnapshotServiceDatasetBackupListDesc = exports.OSSnapshotServiceDatasetBackupDelDesc = exports.OSSnapshotServiceDatasetListDesc = exports.OSSnapshotServiceDatasetDelDesc = exports.OSSnapshotServiceDatasetAddDesc = exports.OSSnapshotServiceBackupPoolListDesc = exports.OSSnapshotServiceBackupPoolDelDesc = exports.OSSnapshotServiceBackupPoolAddDesc = exports.OSSnapshotServiceDesc = exports.OSSnapshotServiceClientImpl = exports.SnapshotStatusResponse = exports.SnapshotBackupListRequest = exports.SnapshotBackupTransferResponse = exports.SnapshotBackupTransferRequest = exports.SnapshotBackupRequest = exports.SnapshotListResponse = exports.SnapshotDesc = exports.SnapshotRequest = exports.SnapshotDatasetListResponse = exports.SnapshotDatasetDesc = exports.SnapshotDatasetBackupRequest = exports.SnapshotDatasetRequest = exports.SnapshotBackupPoolListResponse = exports.SnapshotBackupPoolRequest = exports.snapshotTransferModeToJSON = exports.snapshotTransferModeFromJSON = exports.SnapshotTransferMode = exports.snapshotManagerStatusToJSON = exports.snapshotManagerStatusFromJSON = exports.SnapshotManagerStatus = void 0;
|
|
7
30
|
/* eslint-disable */
|
|
8
31
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
32
|
+
const empty_1 = require("../google/protobuf/empty");
|
|
9
33
|
const browser_headers_1 = require("browser-headers");
|
|
10
34
|
const long_1 = __importDefault(require("long"));
|
|
11
|
-
const
|
|
12
|
-
const empty_1 = require("../google/protobuf/empty");
|
|
35
|
+
const _m0 = __importStar(require("protobufjs/minimal"));
|
|
13
36
|
var SnapshotManagerStatus;
|
|
14
37
|
(function (SnapshotManagerStatus) {
|
|
15
38
|
SnapshotManagerStatus[SnapshotManagerStatus["Stopped"] = 0] = "Stopped";
|
|
@@ -88,14 +111,14 @@ function createBaseSnapshotBackupPoolRequest() {
|
|
|
88
111
|
return { PoolName: "" };
|
|
89
112
|
}
|
|
90
113
|
exports.SnapshotBackupPoolRequest = {
|
|
91
|
-
encode(message, writer =
|
|
114
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
92
115
|
if (message.PoolName !== "") {
|
|
93
116
|
writer.uint32(10).string(message.PoolName);
|
|
94
117
|
}
|
|
95
118
|
return writer;
|
|
96
119
|
},
|
|
97
120
|
decode(input, length) {
|
|
98
|
-
const reader = input instanceof
|
|
121
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
99
122
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
100
123
|
const message = createBaseSnapshotBackupPoolRequest();
|
|
101
124
|
while (reader.pos < end) {
|
|
@@ -112,7 +135,9 @@ exports.SnapshotBackupPoolRequest = {
|
|
|
112
135
|
return message;
|
|
113
136
|
},
|
|
114
137
|
fromJSON(object) {
|
|
115
|
-
return {
|
|
138
|
+
return {
|
|
139
|
+
PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
|
|
140
|
+
};
|
|
116
141
|
},
|
|
117
142
|
toJSON(message) {
|
|
118
143
|
const obj = {};
|
|
@@ -130,14 +155,14 @@ function createBaseSnapshotBackupPoolListResponse() {
|
|
|
130
155
|
return { PoolNameList: [] };
|
|
131
156
|
}
|
|
132
157
|
exports.SnapshotBackupPoolListResponse = {
|
|
133
|
-
encode(message, writer =
|
|
158
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
134
159
|
for (const v of message.PoolNameList) {
|
|
135
160
|
writer.uint32(10).string(v);
|
|
136
161
|
}
|
|
137
162
|
return writer;
|
|
138
163
|
},
|
|
139
164
|
decode(input, length) {
|
|
140
|
-
const reader = input instanceof
|
|
165
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
141
166
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
142
167
|
const message = createBaseSnapshotBackupPoolListResponse();
|
|
143
168
|
while (reader.pos < end) {
|
|
@@ -154,7 +179,11 @@ exports.SnapshotBackupPoolListResponse = {
|
|
|
154
179
|
return message;
|
|
155
180
|
},
|
|
156
181
|
fromJSON(object) {
|
|
157
|
-
return {
|
|
182
|
+
return {
|
|
183
|
+
PoolNameList: Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList)
|
|
184
|
+
? object.PoolNameList.map((e) => String(e))
|
|
185
|
+
: [],
|
|
186
|
+
};
|
|
158
187
|
},
|
|
159
188
|
toJSON(message) {
|
|
160
189
|
const obj = {};
|
|
@@ -177,14 +206,14 @@ function createBaseSnapshotDatasetRequest() {
|
|
|
177
206
|
return { DatasetPath: "" };
|
|
178
207
|
}
|
|
179
208
|
exports.SnapshotDatasetRequest = {
|
|
180
|
-
encode(message, writer =
|
|
209
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
181
210
|
if (message.DatasetPath !== "") {
|
|
182
211
|
writer.uint32(10).string(message.DatasetPath);
|
|
183
212
|
}
|
|
184
213
|
return writer;
|
|
185
214
|
},
|
|
186
215
|
decode(input, length) {
|
|
187
|
-
const reader = input instanceof
|
|
216
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
188
217
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
189
218
|
const message = createBaseSnapshotDatasetRequest();
|
|
190
219
|
while (reader.pos < end) {
|
|
@@ -201,11 +230,14 @@ exports.SnapshotDatasetRequest = {
|
|
|
201
230
|
return message;
|
|
202
231
|
},
|
|
203
232
|
fromJSON(object) {
|
|
204
|
-
return {
|
|
233
|
+
return {
|
|
234
|
+
DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
|
|
235
|
+
};
|
|
205
236
|
},
|
|
206
237
|
toJSON(message) {
|
|
207
238
|
const obj = {};
|
|
208
|
-
message.DatasetPath !== undefined &&
|
|
239
|
+
message.DatasetPath !== undefined &&
|
|
240
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
209
241
|
return obj;
|
|
210
242
|
},
|
|
211
243
|
fromPartial(object) {
|
|
@@ -219,7 +251,7 @@ function createBaseSnapshotDatasetBackupRequest() {
|
|
|
219
251
|
return { PoolName: "", DatasetPath: "" };
|
|
220
252
|
}
|
|
221
253
|
exports.SnapshotDatasetBackupRequest = {
|
|
222
|
-
encode(message, writer =
|
|
254
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
223
255
|
if (message.PoolName !== "") {
|
|
224
256
|
writer.uint32(10).string(message.PoolName);
|
|
225
257
|
}
|
|
@@ -229,7 +261,7 @@ exports.SnapshotDatasetBackupRequest = {
|
|
|
229
261
|
return writer;
|
|
230
262
|
},
|
|
231
263
|
decode(input, length) {
|
|
232
|
-
const reader = input instanceof
|
|
264
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
233
265
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
234
266
|
const message = createBaseSnapshotDatasetBackupRequest();
|
|
235
267
|
while (reader.pos < end) {
|
|
@@ -257,7 +289,8 @@ exports.SnapshotDatasetBackupRequest = {
|
|
|
257
289
|
toJSON(message) {
|
|
258
290
|
const obj = {};
|
|
259
291
|
message.PoolName !== undefined && (obj.PoolName = message.PoolName);
|
|
260
|
-
message.DatasetPath !== undefined &&
|
|
292
|
+
message.DatasetPath !== undefined &&
|
|
293
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
261
294
|
return obj;
|
|
262
295
|
},
|
|
263
296
|
fromPartial(object) {
|
|
@@ -272,7 +305,7 @@ function createBaseSnapshotDatasetDesc() {
|
|
|
272
305
|
return { Path: "", BytesUsed: 0, SnapshotBytesUsed: 0, CreatedAt: 0 };
|
|
273
306
|
}
|
|
274
307
|
exports.SnapshotDatasetDesc = {
|
|
275
|
-
encode(message, writer =
|
|
308
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
276
309
|
if (message.Path !== "") {
|
|
277
310
|
writer.uint32(10).string(message.Path);
|
|
278
311
|
}
|
|
@@ -288,7 +321,7 @@ exports.SnapshotDatasetDesc = {
|
|
|
288
321
|
return writer;
|
|
289
322
|
},
|
|
290
323
|
decode(input, length) {
|
|
291
|
-
const reader = input instanceof
|
|
324
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
292
325
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
293
326
|
const message = createBaseSnapshotDatasetDesc();
|
|
294
327
|
while (reader.pos < end) {
|
|
@@ -317,16 +350,21 @@ exports.SnapshotDatasetDesc = {
|
|
|
317
350
|
return {
|
|
318
351
|
Path: isSet(object.Path) ? String(object.Path) : "",
|
|
319
352
|
BytesUsed: isSet(object.BytesUsed) ? Number(object.BytesUsed) : 0,
|
|
320
|
-
SnapshotBytesUsed: isSet(object.SnapshotBytesUsed)
|
|
353
|
+
SnapshotBytesUsed: isSet(object.SnapshotBytesUsed)
|
|
354
|
+
? Number(object.SnapshotBytesUsed)
|
|
355
|
+
: 0,
|
|
321
356
|
CreatedAt: isSet(object.CreatedAt) ? Number(object.CreatedAt) : 0,
|
|
322
357
|
};
|
|
323
358
|
},
|
|
324
359
|
toJSON(message) {
|
|
325
360
|
const obj = {};
|
|
326
361
|
message.Path !== undefined && (obj.Path = message.Path);
|
|
327
|
-
message.BytesUsed !== undefined &&
|
|
328
|
-
|
|
329
|
-
message.
|
|
362
|
+
message.BytesUsed !== undefined &&
|
|
363
|
+
(obj.BytesUsed = Math.round(message.BytesUsed));
|
|
364
|
+
message.SnapshotBytesUsed !== undefined &&
|
|
365
|
+
(obj.SnapshotBytesUsed = Math.round(message.SnapshotBytesUsed));
|
|
366
|
+
message.CreatedAt !== undefined &&
|
|
367
|
+
(obj.CreatedAt = Math.round(message.CreatedAt));
|
|
330
368
|
return obj;
|
|
331
369
|
},
|
|
332
370
|
fromPartial(object) {
|
|
@@ -343,14 +381,14 @@ function createBaseSnapshotDatasetListResponse() {
|
|
|
343
381
|
return { DatasetList: [] };
|
|
344
382
|
}
|
|
345
383
|
exports.SnapshotDatasetListResponse = {
|
|
346
|
-
encode(message, writer =
|
|
384
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
347
385
|
for (const v of message.DatasetList) {
|
|
348
386
|
exports.SnapshotDatasetDesc.encode(v, writer.uint32(10).fork()).ldelim();
|
|
349
387
|
}
|
|
350
388
|
return writer;
|
|
351
389
|
},
|
|
352
390
|
decode(input, length) {
|
|
353
|
-
const reader = input instanceof
|
|
391
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
354
392
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
355
393
|
const message = createBaseSnapshotDatasetListResponse();
|
|
356
394
|
while (reader.pos < end) {
|
|
@@ -386,7 +424,8 @@ exports.SnapshotDatasetListResponse = {
|
|
|
386
424
|
fromPartial(object) {
|
|
387
425
|
var _a;
|
|
388
426
|
const message = createBaseSnapshotDatasetListResponse();
|
|
389
|
-
message.DatasetList =
|
|
427
|
+
message.DatasetList =
|
|
428
|
+
((_a = object.DatasetList) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SnapshotDatasetDesc.fromPartial(e))) || [];
|
|
390
429
|
return message;
|
|
391
430
|
},
|
|
392
431
|
};
|
|
@@ -394,7 +433,7 @@ function createBaseSnapshotRequest() {
|
|
|
394
433
|
return { DatasetPath: "", SnapshotName: "" };
|
|
395
434
|
}
|
|
396
435
|
exports.SnapshotRequest = {
|
|
397
|
-
encode(message, writer =
|
|
436
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
398
437
|
if (message.DatasetPath !== "") {
|
|
399
438
|
writer.uint32(10).string(message.DatasetPath);
|
|
400
439
|
}
|
|
@@ -404,7 +443,7 @@ exports.SnapshotRequest = {
|
|
|
404
443
|
return writer;
|
|
405
444
|
},
|
|
406
445
|
decode(input, length) {
|
|
407
|
-
const reader = input instanceof
|
|
446
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
408
447
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
409
448
|
const message = createBaseSnapshotRequest();
|
|
410
449
|
while (reader.pos < end) {
|
|
@@ -426,13 +465,17 @@ exports.SnapshotRequest = {
|
|
|
426
465
|
fromJSON(object) {
|
|
427
466
|
return {
|
|
428
467
|
DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
|
|
429
|
-
SnapshotName: isSet(object.SnapshotName)
|
|
468
|
+
SnapshotName: isSet(object.SnapshotName)
|
|
469
|
+
? String(object.SnapshotName)
|
|
470
|
+
: "",
|
|
430
471
|
};
|
|
431
472
|
},
|
|
432
473
|
toJSON(message) {
|
|
433
474
|
const obj = {};
|
|
434
|
-
message.DatasetPath !== undefined &&
|
|
435
|
-
|
|
475
|
+
message.DatasetPath !== undefined &&
|
|
476
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
477
|
+
message.SnapshotName !== undefined &&
|
|
478
|
+
(obj.SnapshotName = message.SnapshotName);
|
|
436
479
|
return obj;
|
|
437
480
|
},
|
|
438
481
|
fromPartial(object) {
|
|
@@ -447,7 +490,7 @@ function createBaseSnapshotDesc() {
|
|
|
447
490
|
return { Name: "", BytesUsed: 0, CreatedAt: 0 };
|
|
448
491
|
}
|
|
449
492
|
exports.SnapshotDesc = {
|
|
450
|
-
encode(message, writer =
|
|
493
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
451
494
|
if (message.Name !== "") {
|
|
452
495
|
writer.uint32(10).string(message.Name);
|
|
453
496
|
}
|
|
@@ -460,7 +503,7 @@ exports.SnapshotDesc = {
|
|
|
460
503
|
return writer;
|
|
461
504
|
},
|
|
462
505
|
decode(input, length) {
|
|
463
|
-
const reader = input instanceof
|
|
506
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
464
507
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
465
508
|
const message = createBaseSnapshotDesc();
|
|
466
509
|
while (reader.pos < end) {
|
|
@@ -492,8 +535,10 @@ exports.SnapshotDesc = {
|
|
|
492
535
|
toJSON(message) {
|
|
493
536
|
const obj = {};
|
|
494
537
|
message.Name !== undefined && (obj.Name = message.Name);
|
|
495
|
-
message.BytesUsed !== undefined &&
|
|
496
|
-
|
|
538
|
+
message.BytesUsed !== undefined &&
|
|
539
|
+
(obj.BytesUsed = Math.round(message.BytesUsed));
|
|
540
|
+
message.CreatedAt !== undefined &&
|
|
541
|
+
(obj.CreatedAt = Math.round(message.CreatedAt));
|
|
497
542
|
return obj;
|
|
498
543
|
},
|
|
499
544
|
fromPartial(object) {
|
|
@@ -509,14 +554,14 @@ function createBaseSnapshotListResponse() {
|
|
|
509
554
|
return { SnapshotList: [] };
|
|
510
555
|
}
|
|
511
556
|
exports.SnapshotListResponse = {
|
|
512
|
-
encode(message, writer =
|
|
557
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
513
558
|
for (const v of message.SnapshotList) {
|
|
514
559
|
exports.SnapshotDesc.encode(v, writer.uint32(10).fork()).ldelim();
|
|
515
560
|
}
|
|
516
561
|
return writer;
|
|
517
562
|
},
|
|
518
563
|
decode(input, length) {
|
|
519
|
-
const reader = input instanceof
|
|
564
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
520
565
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
521
566
|
const message = createBaseSnapshotListResponse();
|
|
522
567
|
while (reader.pos < end) {
|
|
@@ -552,7 +597,8 @@ exports.SnapshotListResponse = {
|
|
|
552
597
|
fromPartial(object) {
|
|
553
598
|
var _a;
|
|
554
599
|
const message = createBaseSnapshotListResponse();
|
|
555
|
-
message.SnapshotList =
|
|
600
|
+
message.SnapshotList =
|
|
601
|
+
((_a = object.SnapshotList) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SnapshotDesc.fromPartial(e))) || [];
|
|
556
602
|
return message;
|
|
557
603
|
},
|
|
558
604
|
};
|
|
@@ -560,7 +606,7 @@ function createBaseSnapshotBackupRequest() {
|
|
|
560
606
|
return { PoolName: "", DatasetPath: "", SnapshotName: "" };
|
|
561
607
|
}
|
|
562
608
|
exports.SnapshotBackupRequest = {
|
|
563
|
-
encode(message, writer =
|
|
609
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
564
610
|
if (message.PoolName !== "") {
|
|
565
611
|
writer.uint32(10).string(message.PoolName);
|
|
566
612
|
}
|
|
@@ -573,7 +619,7 @@ exports.SnapshotBackupRequest = {
|
|
|
573
619
|
return writer;
|
|
574
620
|
},
|
|
575
621
|
decode(input, length) {
|
|
576
|
-
const reader = input instanceof
|
|
622
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
577
623
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
578
624
|
const message = createBaseSnapshotBackupRequest();
|
|
579
625
|
while (reader.pos < end) {
|
|
@@ -599,14 +645,18 @@ exports.SnapshotBackupRequest = {
|
|
|
599
645
|
return {
|
|
600
646
|
PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
|
|
601
647
|
DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
|
|
602
|
-
SnapshotName: isSet(object.SnapshotName)
|
|
648
|
+
SnapshotName: isSet(object.SnapshotName)
|
|
649
|
+
? String(object.SnapshotName)
|
|
650
|
+
: "",
|
|
603
651
|
};
|
|
604
652
|
},
|
|
605
653
|
toJSON(message) {
|
|
606
654
|
const obj = {};
|
|
607
655
|
message.PoolName !== undefined && (obj.PoolName = message.PoolName);
|
|
608
|
-
message.DatasetPath !== undefined &&
|
|
609
|
-
|
|
656
|
+
message.DatasetPath !== undefined &&
|
|
657
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
658
|
+
message.SnapshotName !== undefined &&
|
|
659
|
+
(obj.SnapshotName = message.SnapshotName);
|
|
610
660
|
return obj;
|
|
611
661
|
},
|
|
612
662
|
fromPartial(object) {
|
|
@@ -622,7 +672,7 @@ function createBaseSnapshotBackupTransferRequest() {
|
|
|
622
672
|
return { PoolName: "", DatasetPath: "", SnapshotName: "", TransferMode: 0 };
|
|
623
673
|
}
|
|
624
674
|
exports.SnapshotBackupTransferRequest = {
|
|
625
|
-
encode(message, writer =
|
|
675
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
626
676
|
if (message.PoolName !== "") {
|
|
627
677
|
writer.uint32(10).string(message.PoolName);
|
|
628
678
|
}
|
|
@@ -638,7 +688,7 @@ exports.SnapshotBackupTransferRequest = {
|
|
|
638
688
|
return writer;
|
|
639
689
|
},
|
|
640
690
|
decode(input, length) {
|
|
641
|
-
const reader = input instanceof
|
|
691
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
642
692
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
643
693
|
const message = createBaseSnapshotBackupTransferRequest();
|
|
644
694
|
while (reader.pos < end) {
|
|
@@ -667,16 +717,23 @@ exports.SnapshotBackupTransferRequest = {
|
|
|
667
717
|
return {
|
|
668
718
|
PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
|
|
669
719
|
DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
|
|
670
|
-
SnapshotName: isSet(object.SnapshotName)
|
|
671
|
-
|
|
720
|
+
SnapshotName: isSet(object.SnapshotName)
|
|
721
|
+
? String(object.SnapshotName)
|
|
722
|
+
: "",
|
|
723
|
+
TransferMode: isSet(object.TransferMode)
|
|
724
|
+
? snapshotTransferModeFromJSON(object.TransferMode)
|
|
725
|
+
: 0,
|
|
672
726
|
};
|
|
673
727
|
},
|
|
674
728
|
toJSON(message) {
|
|
675
729
|
const obj = {};
|
|
676
730
|
message.PoolName !== undefined && (obj.PoolName = message.PoolName);
|
|
677
|
-
message.DatasetPath !== undefined &&
|
|
678
|
-
|
|
679
|
-
message.
|
|
731
|
+
message.DatasetPath !== undefined &&
|
|
732
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
733
|
+
message.SnapshotName !== undefined &&
|
|
734
|
+
(obj.SnapshotName = message.SnapshotName);
|
|
735
|
+
message.TransferMode !== undefined &&
|
|
736
|
+
(obj.TransferMode = snapshotTransferModeToJSON(message.TransferMode));
|
|
680
737
|
return obj;
|
|
681
738
|
},
|
|
682
739
|
fromPartial(object) {
|
|
@@ -693,7 +750,7 @@ function createBaseSnapshotBackupTransferResponse() {
|
|
|
693
750
|
return { BytesSent: 0, BytesTotal: 0 };
|
|
694
751
|
}
|
|
695
752
|
exports.SnapshotBackupTransferResponse = {
|
|
696
|
-
encode(message, writer =
|
|
753
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
697
754
|
if (message.BytesSent !== 0) {
|
|
698
755
|
writer.uint32(8).uint64(message.BytesSent);
|
|
699
756
|
}
|
|
@@ -703,7 +760,7 @@ exports.SnapshotBackupTransferResponse = {
|
|
|
703
760
|
return writer;
|
|
704
761
|
},
|
|
705
762
|
decode(input, length) {
|
|
706
|
-
const reader = input instanceof
|
|
763
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
707
764
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
708
765
|
const message = createBaseSnapshotBackupTransferResponse();
|
|
709
766
|
while (reader.pos < end) {
|
|
@@ -730,8 +787,10 @@ exports.SnapshotBackupTransferResponse = {
|
|
|
730
787
|
},
|
|
731
788
|
toJSON(message) {
|
|
732
789
|
const obj = {};
|
|
733
|
-
message.BytesSent !== undefined &&
|
|
734
|
-
|
|
790
|
+
message.BytesSent !== undefined &&
|
|
791
|
+
(obj.BytesSent = Math.round(message.BytesSent));
|
|
792
|
+
message.BytesTotal !== undefined &&
|
|
793
|
+
(obj.BytesTotal = Math.round(message.BytesTotal));
|
|
735
794
|
return obj;
|
|
736
795
|
},
|
|
737
796
|
fromPartial(object) {
|
|
@@ -746,7 +805,7 @@ function createBaseSnapshotBackupListRequest() {
|
|
|
746
805
|
return { PoolName: "", DatasetPath: "" };
|
|
747
806
|
}
|
|
748
807
|
exports.SnapshotBackupListRequest = {
|
|
749
|
-
encode(message, writer =
|
|
808
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
750
809
|
if (message.PoolName !== "") {
|
|
751
810
|
writer.uint32(10).string(message.PoolName);
|
|
752
811
|
}
|
|
@@ -756,7 +815,7 @@ exports.SnapshotBackupListRequest = {
|
|
|
756
815
|
return writer;
|
|
757
816
|
},
|
|
758
817
|
decode(input, length) {
|
|
759
|
-
const reader = input instanceof
|
|
818
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
760
819
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
761
820
|
const message = createBaseSnapshotBackupListRequest();
|
|
762
821
|
while (reader.pos < end) {
|
|
@@ -784,7 +843,8 @@ exports.SnapshotBackupListRequest = {
|
|
|
784
843
|
toJSON(message) {
|
|
785
844
|
const obj = {};
|
|
786
845
|
message.PoolName !== undefined && (obj.PoolName = message.PoolName);
|
|
787
|
-
message.DatasetPath !== undefined &&
|
|
846
|
+
message.DatasetPath !== undefined &&
|
|
847
|
+
(obj.DatasetPath = message.DatasetPath);
|
|
788
848
|
return obj;
|
|
789
849
|
},
|
|
790
850
|
fromPartial(object) {
|
|
@@ -799,7 +859,7 @@ function createBaseSnapshotStatusResponse() {
|
|
|
799
859
|
return { Status: 0, BytesSent: 0, BytesTotal: 0 };
|
|
800
860
|
}
|
|
801
861
|
exports.SnapshotStatusResponse = {
|
|
802
|
-
encode(message, writer =
|
|
862
|
+
encode(message, writer = _m0.Writer.create()) {
|
|
803
863
|
if (message.Status !== 0) {
|
|
804
864
|
writer.uint32(8).int32(message.Status);
|
|
805
865
|
}
|
|
@@ -812,7 +872,7 @@ exports.SnapshotStatusResponse = {
|
|
|
812
872
|
return writer;
|
|
813
873
|
},
|
|
814
874
|
decode(input, length) {
|
|
815
|
-
const reader = input instanceof
|
|
875
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
816
876
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
817
877
|
const message = createBaseSnapshotStatusResponse();
|
|
818
878
|
while (reader.pos < end) {
|
|
@@ -836,16 +896,21 @@ exports.SnapshotStatusResponse = {
|
|
|
836
896
|
},
|
|
837
897
|
fromJSON(object) {
|
|
838
898
|
return {
|
|
839
|
-
Status: isSet(object.Status)
|
|
899
|
+
Status: isSet(object.Status)
|
|
900
|
+
? snapshotManagerStatusFromJSON(object.Status)
|
|
901
|
+
: 0,
|
|
840
902
|
BytesSent: isSet(object.BytesSent) ? Number(object.BytesSent) : 0,
|
|
841
903
|
BytesTotal: isSet(object.BytesTotal) ? Number(object.BytesTotal) : 0,
|
|
842
904
|
};
|
|
843
905
|
},
|
|
844
906
|
toJSON(message) {
|
|
845
907
|
const obj = {};
|
|
846
|
-
message.Status !== undefined &&
|
|
847
|
-
|
|
848
|
-
message.
|
|
908
|
+
message.Status !== undefined &&
|
|
909
|
+
(obj.Status = snapshotManagerStatusToJSON(message.Status));
|
|
910
|
+
message.BytesSent !== undefined &&
|
|
911
|
+
(obj.BytesSent = Math.round(message.BytesSent));
|
|
912
|
+
message.BytesTotal !== undefined &&
|
|
913
|
+
(obj.BytesTotal = Math.round(message.BytesTotal));
|
|
849
914
|
return obj;
|
|
850
915
|
},
|
|
851
916
|
fromPartial(object) {
|
|
@@ -935,7 +1000,9 @@ class OSSnapshotServiceClientImpl {
|
|
|
935
1000
|
}
|
|
936
1001
|
}
|
|
937
1002
|
exports.OSSnapshotServiceClientImpl = OSSnapshotServiceClientImpl;
|
|
938
|
-
exports.OSSnapshotServiceDesc = {
|
|
1003
|
+
exports.OSSnapshotServiceDesc = {
|
|
1004
|
+
serviceName: "cloud.lazycat.apis.sys.OSSnapshotService",
|
|
1005
|
+
};
|
|
939
1006
|
exports.OSSnapshotServiceBackupPoolAddDesc = {
|
|
940
1007
|
methodName: "BackupPoolAdd",
|
|
941
1008
|
service: exports.OSSnapshotServiceDesc,
|
|
@@ -1283,7 +1350,9 @@ class GrpcWebImpl {
|
|
|
1283
1350
|
resolve(response.message);
|
|
1284
1351
|
}
|
|
1285
1352
|
else {
|
|
1286
|
-
const err = new
|
|
1353
|
+
const err = new Error(response.statusMessage);
|
|
1354
|
+
err.code = response.status;
|
|
1355
|
+
err.metadata = response.trailers;
|
|
1287
1356
|
reject(err);
|
|
1288
1357
|
}
|
|
1289
1358
|
},
|
|
@@ -1293,18 +1362,14 @@ class GrpcWebImpl {
|
|
|
1293
1362
|
}
|
|
1294
1363
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
1295
1364
|
var globalThis = (() => {
|
|
1296
|
-
if (typeof globalThis !== "undefined")
|
|
1365
|
+
if (typeof globalThis !== "undefined")
|
|
1297
1366
|
return globalThis;
|
|
1298
|
-
|
|
1299
|
-
if (typeof self !== "undefined") {
|
|
1367
|
+
if (typeof self !== "undefined")
|
|
1300
1368
|
return self;
|
|
1301
|
-
|
|
1302
|
-
if (typeof window !== "undefined") {
|
|
1369
|
+
if (typeof window !== "undefined")
|
|
1303
1370
|
return window;
|
|
1304
|
-
|
|
1305
|
-
if (typeof global !== "undefined") {
|
|
1371
|
+
if (typeof global !== "undefined")
|
|
1306
1372
|
return global;
|
|
1307
|
-
}
|
|
1308
1373
|
throw "Unable to locate global object";
|
|
1309
1374
|
})();
|
|
1310
1375
|
function longToNumber(long) {
|
|
@@ -1313,19 +1378,11 @@ function longToNumber(long) {
|
|
|
1313
1378
|
}
|
|
1314
1379
|
return long.toNumber();
|
|
1315
1380
|
}
|
|
1316
|
-
if (
|
|
1317
|
-
|
|
1318
|
-
|
|
1381
|
+
if (_m0.util.Long !== long_1.default) {
|
|
1382
|
+
_m0.util.Long = long_1.default;
|
|
1383
|
+
_m0.configure();
|
|
1319
1384
|
}
|
|
1320
1385
|
function isSet(value) {
|
|
1321
1386
|
return value !== null && value !== undefined;
|
|
1322
1387
|
}
|
|
1323
|
-
class GrpcWebError extends Error {
|
|
1324
|
-
constructor(message, code, metadata) {
|
|
1325
|
-
super(message);
|
|
1326
|
-
this.code = code;
|
|
1327
|
-
this.metadata = metadata;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
exports.GrpcWebError = GrpcWebError;
|
|
1331
1388
|
//# sourceMappingURL=OS_snapshot.js.map
|