@lazycatcloud/sdk 0.1.152 → 0.1.153

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.
Files changed (178) hide show
  1. package/dist/common/box.d.ts +189 -0
  2. package/dist/common/box.d.ts.map +1 -0
  3. package/dist/common/box.js +445 -0
  4. package/dist/common/box.js.map +1 -0
  5. package/dist/common/browseronly.d.ts +159 -0
  6. package/dist/common/browseronly.d.ts.map +1 -0
  7. package/dist/common/browseronly.js +425 -0
  8. package/dist/common/browseronly.js.map +1 -0
  9. package/dist/common/end_device.d.ts +302 -0
  10. package/dist/common/end_device.d.ts.map +1 -0
  11. package/dist/common/end_device.js +522 -0
  12. package/dist/common/end_device.js.map +1 -0
  13. package/dist/common/file_handler.d.ts +214 -0
  14. package/dist/common/file_handler.d.ts.map +1 -0
  15. package/dist/common/file_handler.js +403 -0
  16. package/dist/common/file_handler.js.map +1 -0
  17. package/dist/common/filetrans.d.ts +1795 -0
  18. package/dist/common/filetrans.d.ts.map +1 -0
  19. package/dist/common/filetrans.js +1654 -0
  20. package/dist/common/filetrans.js.map +1 -0
  21. package/dist/common/gateway.d.ts +249 -0
  22. package/dist/common/gateway.d.ts.map +1 -0
  23. package/dist/common/gateway.js +555 -0
  24. package/dist/common/gateway.js.map +1 -0
  25. package/dist/common/media_meta.d.ts +104 -0
  26. package/dist/common/media_meta.d.ts.map +1 -0
  27. package/dist/common/media_meta.js +240 -0
  28. package/dist/common/media_meta.js.map +1 -0
  29. package/dist/common/message.d.ts +75 -0
  30. package/dist/common/message.d.ts.map +1 -0
  31. package/dist/common/message.js +218 -0
  32. package/dist/common/message.js.map +1 -0
  33. package/dist/common/peripheral_device.d.ts +389 -0
  34. package/dist/common/peripheral_device.d.ts.map +1 -0
  35. package/dist/common/peripheral_device.js +631 -0
  36. package/dist/common/peripheral_device.js.map +1 -0
  37. package/dist/common/security_context.d.ts +241 -0
  38. package/dist/common/security_context.d.ts.map +1 -0
  39. package/dist/common/security_context.js +633 -0
  40. package/dist/common/security_context.js.map +1 -0
  41. package/dist/common/users.d.ts +325 -0
  42. package/dist/common/users.d.ts.map +1 -0
  43. package/dist/common/users.js +876 -0
  44. package/dist/common/users.js.map +1 -0
  45. package/dist/dlna/dlna.d.ts +325 -0
  46. package/dist/dlna/dlna.d.ts.map +1 -0
  47. package/dist/dlna/dlna.js +772 -0
  48. package/dist/dlna/dlna.js.map +1 -0
  49. package/dist/extentions/app_common.d.ts +20 -0
  50. package/dist/extentions/app_common.d.ts.map +1 -0
  51. package/dist/extentions/app_common.js +146 -0
  52. package/dist/extentions/app_common.js.map +1 -0
  53. package/dist/extentions/base.d.ts +117 -0
  54. package/dist/extentions/base.d.ts.map +1 -0
  55. package/dist/extentions/base.js +360 -0
  56. package/dist/extentions/base.js.map +1 -0
  57. package/dist/extentions/index.d.ts +18 -0
  58. package/dist/extentions/index.d.ts.map +1 -0
  59. package/dist/extentions/index.js +20 -0
  60. package/dist/extentions/index.js.map +1 -0
  61. package/dist/extentions/safe_app.d.ts +15 -0
  62. package/dist/extentions/safe_app.d.ts.map +1 -0
  63. package/dist/extentions/safe_app.js +88 -0
  64. package/dist/extentions/safe_app.js.map +1 -0
  65. package/dist/extentions/unsafe_app.d.ts +5 -0
  66. package/dist/extentions/unsafe_app.d.ts.map +1 -0
  67. package/dist/extentions/unsafe_app.js +139 -0
  68. package/dist/extentions/unsafe_app.js.map +1 -0
  69. package/dist/google/protobuf/descriptor.d.ts +101926 -0
  70. package/dist/google/protobuf/descriptor.d.ts.map +1 -0
  71. package/dist/google/protobuf/descriptor.js +2974 -0
  72. package/dist/google/protobuf/descriptor.js.map +1 -0
  73. package/dist/google/protobuf/empty.d.ts +21 -0
  74. package/dist/google/protobuf/empty.d.ts.map +1 -0
  75. package/dist/google/protobuf/empty.js +45 -0
  76. package/dist/google/protobuf/empty.js.map +1 -0
  77. package/dist/google/protobuf/timestamp.d.ts +128 -0
  78. package/dist/google/protobuf/timestamp.d.ts.map +1 -0
  79. package/dist/google/protobuf/timestamp.js +94 -0
  80. package/dist/google/protobuf/timestamp.js.map +1 -0
  81. package/dist/grpcweb.d.ts +21 -0
  82. package/dist/grpcweb.d.ts.map +1 -0
  83. package/dist/grpcweb.js +71 -0
  84. package/dist/grpcweb.js.map +1 -0
  85. package/dist/index.d.ts +66 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +157 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/lanforward/lanforward.d.ts +99 -0
  90. package/dist/lanforward/lanforward.d.ts.map +1 -0
  91. package/dist/lanforward/lanforward.js +239 -0
  92. package/dist/lanforward/lanforward.js.map +1 -0
  93. package/dist/localdevice/clipboard.d.ts +137 -0
  94. package/dist/localdevice/clipboard.d.ts.map +1 -0
  95. package/dist/localdevice/clipboard.js +402 -0
  96. package/dist/localdevice/clipboard.js.map +1 -0
  97. package/dist/localdevice/config.d.ts +98 -0
  98. package/dist/localdevice/config.d.ts.map +1 -0
  99. package/dist/localdevice/config.js +218 -0
  100. package/dist/localdevice/config.js.map +1 -0
  101. package/dist/localdevice/device.d.ts +80 -0
  102. package/dist/localdevice/device.d.ts.map +1 -0
  103. package/dist/localdevice/device.js +174 -0
  104. package/dist/localdevice/device.js.map +1 -0
  105. package/dist/localdevice/dialog.d.ts +238 -0
  106. package/dist/localdevice/dialog.d.ts.map +1 -0
  107. package/dist/localdevice/dialog.js +595 -0
  108. package/dist/localdevice/dialog.js.map +1 -0
  109. package/dist/localdevice/local-launch.d.ts +303 -0
  110. package/dist/localdevice/local-launch.d.ts.map +1 -0
  111. package/dist/localdevice/local-launch.js +808 -0
  112. package/dist/localdevice/local-launch.js.map +1 -0
  113. package/dist/localdevice/network.d.ts +84 -0
  114. package/dist/localdevice/network.d.ts.map +1 -0
  115. package/dist/localdevice/network.js +231 -0
  116. package/dist/localdevice/network.js.map +1 -0
  117. package/dist/localdevice/permission.d.ts +228 -0
  118. package/dist/localdevice/permission.d.ts.map +1 -0
  119. package/dist/localdevice/permission.js +605 -0
  120. package/dist/localdevice/permission.js.map +1 -0
  121. package/dist/localdevice/photo.d.ts +574 -0
  122. package/dist/localdevice/photo.d.ts.map +1 -0
  123. package/dist/localdevice/photo.js +1277 -0
  124. package/dist/localdevice/photo.js.map +1 -0
  125. package/dist/package.json +26 -0
  126. package/dist/ssdp/ssdp.d.ts +113 -0
  127. package/dist/ssdp/ssdp.d.ts.map +1 -0
  128. package/dist/ssdp/ssdp.js +268 -0
  129. package/dist/ssdp/ssdp.js.map +1 -0
  130. package/dist/sys/OS_daemon.d.ts +111 -0
  131. package/dist/sys/OS_daemon.d.ts.map +1 -0
  132. package/dist/sys/OS_daemon.js +266 -0
  133. package/dist/sys/OS_daemon.js.map +1 -0
  134. package/dist/sys/OS_snapshot.d.ts +585 -0
  135. package/dist/sys/OS_snapshot.d.ts.map +1 -0
  136. package/dist/sys/OS_snapshot.js +1391 -0
  137. package/dist/sys/OS_snapshot.js.map +1 -0
  138. package/dist/sys/OS_upgrader.d.ts +218 -0
  139. package/dist/sys/OS_upgrader.d.ts.map +1 -0
  140. package/dist/sys/OS_upgrader.js +628 -0
  141. package/dist/sys/OS_upgrader.js.map +1 -0
  142. package/dist/sys/btrfs.d.ts +167 -0
  143. package/dist/sys/btrfs.d.ts.map +1 -0
  144. package/dist/sys/btrfs.js +425 -0
  145. package/dist/sys/btrfs.js.map +1 -0
  146. package/dist/sys/devopt.d.ts +87 -0
  147. package/dist/sys/devopt.d.ts.map +1 -0
  148. package/dist/sys/devopt.js +197 -0
  149. package/dist/sys/devopt.js.map +1 -0
  150. package/dist/sys/event.d.ts +291 -0
  151. package/dist/sys/event.d.ts.map +1 -0
  152. package/dist/sys/event.js +659 -0
  153. package/dist/sys/event.js.map +1 -0
  154. package/dist/sys/hc-core/hc-core.d.ts +689 -0
  155. package/dist/sys/hc-core/hc-core.d.ts.map +1 -0
  156. package/dist/sys/hc-core/hc-core.js +1350 -0
  157. package/dist/sys/hc-core/hc-core.js.map +1 -0
  158. package/dist/sys/ingress.d.ts +285 -0
  159. package/dist/sys/ingress.d.ts.map +1 -0
  160. package/dist/sys/ingress.js +765 -0
  161. package/dist/sys/ingress.js.map +1 -0
  162. package/dist/sys/network_manager.d.ts +424 -0
  163. package/dist/sys/network_manager.d.ts.map +1 -0
  164. package/dist/sys/network_manager.js +750 -0
  165. package/dist/sys/network_manager.js.map +1 -0
  166. package/dist/sys/package_manager.d.ts +866 -0
  167. package/dist/sys/package_manager.d.ts.map +1 -0
  168. package/dist/sys/package_manager.js +1594 -0
  169. package/dist/sys/package_manager.js.map +1 -0
  170. package/dist/sys/portal-server/portal-server.d.ts +1057 -0
  171. package/dist/sys/portal-server/portal-server.d.ts.map +1 -0
  172. package/dist/sys/portal-server/portal-server.js +2468 -0
  173. package/dist/sys/portal-server/portal-server.js.map +1 -0
  174. package/dist/sys/snapd.d.ts +343 -0
  175. package/dist/sys/snapd.d.ts.map +1 -0
  176. package/dist/sys/snapd.js +724 -0
  177. package/dist/sys/snapd.js.map +1 -0
  178. package/package.json +2 -2
@@ -0,0 +1,1391 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GrpcWebError = 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
+ /* eslint-disable */
8
+ const grpc_web_1 = require("@improbable-eng/grpc-web");
9
+ const browser_headers_1 = require("browser-headers");
10
+ const long_1 = __importDefault(require("long"));
11
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
12
+ const empty_1 = require("../google/protobuf/empty");
13
+ var SnapshotManagerStatus;
14
+ (function (SnapshotManagerStatus) {
15
+ SnapshotManagerStatus[SnapshotManagerStatus["Stopped"] = 0] = "Stopped";
16
+ SnapshotManagerStatus[SnapshotManagerStatus["Running"] = 1] = "Running";
17
+ SnapshotManagerStatus[SnapshotManagerStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
18
+ })(SnapshotManagerStatus = exports.SnapshotManagerStatus || (exports.SnapshotManagerStatus = {}));
19
+ function snapshotManagerStatusFromJSON(object) {
20
+ switch (object) {
21
+ case 0:
22
+ case "Stopped":
23
+ return SnapshotManagerStatus.Stopped;
24
+ case 1:
25
+ case "Running":
26
+ return SnapshotManagerStatus.Running;
27
+ case -1:
28
+ case "UNRECOGNIZED":
29
+ default:
30
+ return SnapshotManagerStatus.UNRECOGNIZED;
31
+ }
32
+ }
33
+ exports.snapshotManagerStatusFromJSON = snapshotManagerStatusFromJSON;
34
+ function snapshotManagerStatusToJSON(object) {
35
+ switch (object) {
36
+ case SnapshotManagerStatus.Stopped:
37
+ return "Stopped";
38
+ case SnapshotManagerStatus.Running:
39
+ return "Running";
40
+ case SnapshotManagerStatus.UNRECOGNIZED:
41
+ default:
42
+ return "UNRECOGNIZED";
43
+ }
44
+ }
45
+ exports.snapshotManagerStatusToJSON = snapshotManagerStatusToJSON;
46
+ var SnapshotTransferMode;
47
+ (function (SnapshotTransferMode) {
48
+ SnapshotTransferMode[SnapshotTransferMode["Normal"] = 0] = "Normal";
49
+ /** NoResume - 若存在可恢复的传输任务,是否不尝试恢复,重新传输 */
50
+ SnapshotTransferMode[SnapshotTransferMode["NoResume"] = 1] = "NoResume";
51
+ /** DryRun - 不进行传输,只预估传输的数据量 */
52
+ SnapshotTransferMode[SnapshotTransferMode["DryRun"] = 2] = "DryRun";
53
+ SnapshotTransferMode[SnapshotTransferMode["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
54
+ })(SnapshotTransferMode = exports.SnapshotTransferMode || (exports.SnapshotTransferMode = {}));
55
+ function snapshotTransferModeFromJSON(object) {
56
+ switch (object) {
57
+ case 0:
58
+ case "Normal":
59
+ return SnapshotTransferMode.Normal;
60
+ case 1:
61
+ case "NoResume":
62
+ return SnapshotTransferMode.NoResume;
63
+ case 2:
64
+ case "DryRun":
65
+ return SnapshotTransferMode.DryRun;
66
+ case -1:
67
+ case "UNRECOGNIZED":
68
+ default:
69
+ return SnapshotTransferMode.UNRECOGNIZED;
70
+ }
71
+ }
72
+ exports.snapshotTransferModeFromJSON = snapshotTransferModeFromJSON;
73
+ function snapshotTransferModeToJSON(object) {
74
+ switch (object) {
75
+ case SnapshotTransferMode.Normal:
76
+ return "Normal";
77
+ case SnapshotTransferMode.NoResume:
78
+ return "NoResume";
79
+ case SnapshotTransferMode.DryRun:
80
+ return "DryRun";
81
+ case SnapshotTransferMode.UNRECOGNIZED:
82
+ default:
83
+ return "UNRECOGNIZED";
84
+ }
85
+ }
86
+ exports.snapshotTransferModeToJSON = snapshotTransferModeToJSON;
87
+ function createBaseSnapshotBackupPoolRequest() {
88
+ return { PoolName: "" };
89
+ }
90
+ exports.SnapshotBackupPoolRequest = {
91
+ encode(message, writer = minimal_1.default.Writer.create()) {
92
+ if (message.PoolName !== "") {
93
+ writer.uint32(10).string(message.PoolName);
94
+ }
95
+ return writer;
96
+ },
97
+ decode(input, length) {
98
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
99
+ let end = length === undefined ? reader.len : reader.pos + length;
100
+ const message = createBaseSnapshotBackupPoolRequest();
101
+ while (reader.pos < end) {
102
+ const tag = reader.uint32();
103
+ switch (tag >>> 3) {
104
+ case 1:
105
+ message.PoolName = reader.string();
106
+ break;
107
+ default:
108
+ reader.skipType(tag & 7);
109
+ break;
110
+ }
111
+ }
112
+ return message;
113
+ },
114
+ fromJSON(object) {
115
+ return { PoolName: isSet(object.PoolName) ? String(object.PoolName) : "" };
116
+ },
117
+ toJSON(message) {
118
+ const obj = {};
119
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
120
+ return obj;
121
+ },
122
+ create(base) {
123
+ return exports.SnapshotBackupPoolRequest.fromPartial(base !== null && base !== void 0 ? base : {});
124
+ },
125
+ fromPartial(object) {
126
+ var _a;
127
+ const message = createBaseSnapshotBackupPoolRequest();
128
+ message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
129
+ return message;
130
+ },
131
+ };
132
+ function createBaseSnapshotBackupPoolListResponse() {
133
+ return { PoolNameList: [] };
134
+ }
135
+ exports.SnapshotBackupPoolListResponse = {
136
+ encode(message, writer = minimal_1.default.Writer.create()) {
137
+ for (const v of message.PoolNameList) {
138
+ writer.uint32(10).string(v);
139
+ }
140
+ return writer;
141
+ },
142
+ decode(input, length) {
143
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
144
+ let end = length === undefined ? reader.len : reader.pos + length;
145
+ const message = createBaseSnapshotBackupPoolListResponse();
146
+ while (reader.pos < end) {
147
+ const tag = reader.uint32();
148
+ switch (tag >>> 3) {
149
+ case 1:
150
+ message.PoolNameList.push(reader.string());
151
+ break;
152
+ default:
153
+ reader.skipType(tag & 7);
154
+ break;
155
+ }
156
+ }
157
+ return message;
158
+ },
159
+ fromJSON(object) {
160
+ return { PoolNameList: Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList) ? object.PoolNameList.map((e) => String(e)) : [] };
161
+ },
162
+ toJSON(message) {
163
+ const obj = {};
164
+ if (message.PoolNameList) {
165
+ obj.PoolNameList = message.PoolNameList.map((e) => e);
166
+ }
167
+ else {
168
+ obj.PoolNameList = [];
169
+ }
170
+ return obj;
171
+ },
172
+ create(base) {
173
+ return exports.SnapshotBackupPoolListResponse.fromPartial(base !== null && base !== void 0 ? base : {});
174
+ },
175
+ fromPartial(object) {
176
+ var _a;
177
+ const message = createBaseSnapshotBackupPoolListResponse();
178
+ message.PoolNameList = ((_a = object.PoolNameList) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
179
+ return message;
180
+ },
181
+ };
182
+ function createBaseSnapshotDatasetRequest() {
183
+ return { DatasetPath: "" };
184
+ }
185
+ exports.SnapshotDatasetRequest = {
186
+ encode(message, writer = minimal_1.default.Writer.create()) {
187
+ if (message.DatasetPath !== "") {
188
+ writer.uint32(10).string(message.DatasetPath);
189
+ }
190
+ return writer;
191
+ },
192
+ decode(input, length) {
193
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
194
+ let end = length === undefined ? reader.len : reader.pos + length;
195
+ const message = createBaseSnapshotDatasetRequest();
196
+ while (reader.pos < end) {
197
+ const tag = reader.uint32();
198
+ switch (tag >>> 3) {
199
+ case 1:
200
+ message.DatasetPath = reader.string();
201
+ break;
202
+ default:
203
+ reader.skipType(tag & 7);
204
+ break;
205
+ }
206
+ }
207
+ return message;
208
+ },
209
+ fromJSON(object) {
210
+ return { DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "" };
211
+ },
212
+ toJSON(message) {
213
+ const obj = {};
214
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
215
+ return obj;
216
+ },
217
+ create(base) {
218
+ return exports.SnapshotDatasetRequest.fromPartial(base !== null && base !== void 0 ? base : {});
219
+ },
220
+ fromPartial(object) {
221
+ var _a;
222
+ const message = createBaseSnapshotDatasetRequest();
223
+ message.DatasetPath = (_a = object.DatasetPath) !== null && _a !== void 0 ? _a : "";
224
+ return message;
225
+ },
226
+ };
227
+ function createBaseSnapshotDatasetBackupRequest() {
228
+ return { PoolName: "", DatasetPath: "" };
229
+ }
230
+ exports.SnapshotDatasetBackupRequest = {
231
+ encode(message, writer = minimal_1.default.Writer.create()) {
232
+ if (message.PoolName !== "") {
233
+ writer.uint32(10).string(message.PoolName);
234
+ }
235
+ if (message.DatasetPath !== "") {
236
+ writer.uint32(18).string(message.DatasetPath);
237
+ }
238
+ return writer;
239
+ },
240
+ decode(input, length) {
241
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
242
+ let end = length === undefined ? reader.len : reader.pos + length;
243
+ const message = createBaseSnapshotDatasetBackupRequest();
244
+ while (reader.pos < end) {
245
+ const tag = reader.uint32();
246
+ switch (tag >>> 3) {
247
+ case 1:
248
+ message.PoolName = reader.string();
249
+ break;
250
+ case 2:
251
+ message.DatasetPath = reader.string();
252
+ break;
253
+ default:
254
+ reader.skipType(tag & 7);
255
+ break;
256
+ }
257
+ }
258
+ return message;
259
+ },
260
+ fromJSON(object) {
261
+ return {
262
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
263
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
264
+ };
265
+ },
266
+ toJSON(message) {
267
+ const obj = {};
268
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
269
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
270
+ return obj;
271
+ },
272
+ create(base) {
273
+ return exports.SnapshotDatasetBackupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
274
+ },
275
+ fromPartial(object) {
276
+ var _a, _b;
277
+ const message = createBaseSnapshotDatasetBackupRequest();
278
+ message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
279
+ message.DatasetPath = (_b = object.DatasetPath) !== null && _b !== void 0 ? _b : "";
280
+ return message;
281
+ },
282
+ };
283
+ function createBaseSnapshotDatasetDesc() {
284
+ return { Path: "", BytesUsed: 0, SnapshotBytesUsed: 0, CreatedAt: 0 };
285
+ }
286
+ exports.SnapshotDatasetDesc = {
287
+ encode(message, writer = minimal_1.default.Writer.create()) {
288
+ if (message.Path !== "") {
289
+ writer.uint32(10).string(message.Path);
290
+ }
291
+ if (message.BytesUsed !== 0) {
292
+ writer.uint32(16).uint64(message.BytesUsed);
293
+ }
294
+ if (message.SnapshotBytesUsed !== 0) {
295
+ writer.uint32(24).uint64(message.SnapshotBytesUsed);
296
+ }
297
+ if (message.CreatedAt !== 0) {
298
+ writer.uint32(32).uint64(message.CreatedAt);
299
+ }
300
+ return writer;
301
+ },
302
+ decode(input, length) {
303
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
304
+ let end = length === undefined ? reader.len : reader.pos + length;
305
+ const message = createBaseSnapshotDatasetDesc();
306
+ while (reader.pos < end) {
307
+ const tag = reader.uint32();
308
+ switch (tag >>> 3) {
309
+ case 1:
310
+ message.Path = reader.string();
311
+ break;
312
+ case 2:
313
+ message.BytesUsed = longToNumber(reader.uint64());
314
+ break;
315
+ case 3:
316
+ message.SnapshotBytesUsed = longToNumber(reader.uint64());
317
+ break;
318
+ case 4:
319
+ message.CreatedAt = longToNumber(reader.uint64());
320
+ break;
321
+ default:
322
+ reader.skipType(tag & 7);
323
+ break;
324
+ }
325
+ }
326
+ return message;
327
+ },
328
+ fromJSON(object) {
329
+ return {
330
+ Path: isSet(object.Path) ? String(object.Path) : "",
331
+ BytesUsed: isSet(object.BytesUsed) ? Number(object.BytesUsed) : 0,
332
+ SnapshotBytesUsed: isSet(object.SnapshotBytesUsed) ? Number(object.SnapshotBytesUsed) : 0,
333
+ CreatedAt: isSet(object.CreatedAt) ? Number(object.CreatedAt) : 0,
334
+ };
335
+ },
336
+ toJSON(message) {
337
+ const obj = {};
338
+ message.Path !== undefined && (obj.Path = message.Path);
339
+ message.BytesUsed !== undefined && (obj.BytesUsed = Math.round(message.BytesUsed));
340
+ message.SnapshotBytesUsed !== undefined && (obj.SnapshotBytesUsed = Math.round(message.SnapshotBytesUsed));
341
+ message.CreatedAt !== undefined && (obj.CreatedAt = Math.round(message.CreatedAt));
342
+ return obj;
343
+ },
344
+ create(base) {
345
+ return exports.SnapshotDatasetDesc.fromPartial(base !== null && base !== void 0 ? base : {});
346
+ },
347
+ fromPartial(object) {
348
+ var _a, _b, _c, _d;
349
+ const message = createBaseSnapshotDatasetDesc();
350
+ message.Path = (_a = object.Path) !== null && _a !== void 0 ? _a : "";
351
+ message.BytesUsed = (_b = object.BytesUsed) !== null && _b !== void 0 ? _b : 0;
352
+ message.SnapshotBytesUsed = (_c = object.SnapshotBytesUsed) !== null && _c !== void 0 ? _c : 0;
353
+ message.CreatedAt = (_d = object.CreatedAt) !== null && _d !== void 0 ? _d : 0;
354
+ return message;
355
+ },
356
+ };
357
+ function createBaseSnapshotDatasetListResponse() {
358
+ return { DatasetList: [] };
359
+ }
360
+ exports.SnapshotDatasetListResponse = {
361
+ encode(message, writer = minimal_1.default.Writer.create()) {
362
+ for (const v of message.DatasetList) {
363
+ exports.SnapshotDatasetDesc.encode(v, writer.uint32(10).fork()).ldelim();
364
+ }
365
+ return writer;
366
+ },
367
+ decode(input, length) {
368
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
369
+ let end = length === undefined ? reader.len : reader.pos + length;
370
+ const message = createBaseSnapshotDatasetListResponse();
371
+ while (reader.pos < end) {
372
+ const tag = reader.uint32();
373
+ switch (tag >>> 3) {
374
+ case 1:
375
+ message.DatasetList.push(exports.SnapshotDatasetDesc.decode(reader, reader.uint32()));
376
+ break;
377
+ default:
378
+ reader.skipType(tag & 7);
379
+ break;
380
+ }
381
+ }
382
+ return message;
383
+ },
384
+ fromJSON(object) {
385
+ return {
386
+ DatasetList: Array.isArray(object === null || object === void 0 ? void 0 : object.DatasetList)
387
+ ? object.DatasetList.map((e) => exports.SnapshotDatasetDesc.fromJSON(e))
388
+ : [],
389
+ };
390
+ },
391
+ toJSON(message) {
392
+ const obj = {};
393
+ if (message.DatasetList) {
394
+ obj.DatasetList = message.DatasetList.map((e) => e ? exports.SnapshotDatasetDesc.toJSON(e) : undefined);
395
+ }
396
+ else {
397
+ obj.DatasetList = [];
398
+ }
399
+ return obj;
400
+ },
401
+ create(base) {
402
+ return exports.SnapshotDatasetListResponse.fromPartial(base !== null && base !== void 0 ? base : {});
403
+ },
404
+ fromPartial(object) {
405
+ var _a;
406
+ const message = createBaseSnapshotDatasetListResponse();
407
+ message.DatasetList = ((_a = object.DatasetList) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SnapshotDatasetDesc.fromPartial(e))) || [];
408
+ return message;
409
+ },
410
+ };
411
+ function createBaseSnapshotRequest() {
412
+ return { DatasetPath: "", SnapshotName: "" };
413
+ }
414
+ exports.SnapshotRequest = {
415
+ encode(message, writer = minimal_1.default.Writer.create()) {
416
+ if (message.DatasetPath !== "") {
417
+ writer.uint32(10).string(message.DatasetPath);
418
+ }
419
+ if (message.SnapshotName !== "") {
420
+ writer.uint32(18).string(message.SnapshotName);
421
+ }
422
+ return writer;
423
+ },
424
+ decode(input, length) {
425
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
426
+ let end = length === undefined ? reader.len : reader.pos + length;
427
+ const message = createBaseSnapshotRequest();
428
+ while (reader.pos < end) {
429
+ const tag = reader.uint32();
430
+ switch (tag >>> 3) {
431
+ case 1:
432
+ message.DatasetPath = reader.string();
433
+ break;
434
+ case 2:
435
+ message.SnapshotName = reader.string();
436
+ break;
437
+ default:
438
+ reader.skipType(tag & 7);
439
+ break;
440
+ }
441
+ }
442
+ return message;
443
+ },
444
+ fromJSON(object) {
445
+ return {
446
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
447
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
448
+ };
449
+ },
450
+ toJSON(message) {
451
+ const obj = {};
452
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
453
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
454
+ return obj;
455
+ },
456
+ create(base) {
457
+ return exports.SnapshotRequest.fromPartial(base !== null && base !== void 0 ? base : {});
458
+ },
459
+ fromPartial(object) {
460
+ var _a, _b;
461
+ const message = createBaseSnapshotRequest();
462
+ message.DatasetPath = (_a = object.DatasetPath) !== null && _a !== void 0 ? _a : "";
463
+ message.SnapshotName = (_b = object.SnapshotName) !== null && _b !== void 0 ? _b : "";
464
+ return message;
465
+ },
466
+ };
467
+ function createBaseSnapshotDesc() {
468
+ return { Name: "", BytesUsed: 0, CreatedAt: 0 };
469
+ }
470
+ exports.SnapshotDesc = {
471
+ encode(message, writer = minimal_1.default.Writer.create()) {
472
+ if (message.Name !== "") {
473
+ writer.uint32(10).string(message.Name);
474
+ }
475
+ if (message.BytesUsed !== 0) {
476
+ writer.uint32(16).uint64(message.BytesUsed);
477
+ }
478
+ if (message.CreatedAt !== 0) {
479
+ writer.uint32(24).uint64(message.CreatedAt);
480
+ }
481
+ return writer;
482
+ },
483
+ decode(input, length) {
484
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
485
+ let end = length === undefined ? reader.len : reader.pos + length;
486
+ const message = createBaseSnapshotDesc();
487
+ while (reader.pos < end) {
488
+ const tag = reader.uint32();
489
+ switch (tag >>> 3) {
490
+ case 1:
491
+ message.Name = reader.string();
492
+ break;
493
+ case 2:
494
+ message.BytesUsed = longToNumber(reader.uint64());
495
+ break;
496
+ case 3:
497
+ message.CreatedAt = longToNumber(reader.uint64());
498
+ break;
499
+ default:
500
+ reader.skipType(tag & 7);
501
+ break;
502
+ }
503
+ }
504
+ return message;
505
+ },
506
+ fromJSON(object) {
507
+ return {
508
+ Name: isSet(object.Name) ? String(object.Name) : "",
509
+ BytesUsed: isSet(object.BytesUsed) ? Number(object.BytesUsed) : 0,
510
+ CreatedAt: isSet(object.CreatedAt) ? Number(object.CreatedAt) : 0,
511
+ };
512
+ },
513
+ toJSON(message) {
514
+ const obj = {};
515
+ message.Name !== undefined && (obj.Name = message.Name);
516
+ message.BytesUsed !== undefined && (obj.BytesUsed = Math.round(message.BytesUsed));
517
+ message.CreatedAt !== undefined && (obj.CreatedAt = Math.round(message.CreatedAt));
518
+ return obj;
519
+ },
520
+ create(base) {
521
+ return exports.SnapshotDesc.fromPartial(base !== null && base !== void 0 ? base : {});
522
+ },
523
+ fromPartial(object) {
524
+ var _a, _b, _c;
525
+ const message = createBaseSnapshotDesc();
526
+ message.Name = (_a = object.Name) !== null && _a !== void 0 ? _a : "";
527
+ message.BytesUsed = (_b = object.BytesUsed) !== null && _b !== void 0 ? _b : 0;
528
+ message.CreatedAt = (_c = object.CreatedAt) !== null && _c !== void 0 ? _c : 0;
529
+ return message;
530
+ },
531
+ };
532
+ function createBaseSnapshotListResponse() {
533
+ return { SnapshotList: [] };
534
+ }
535
+ exports.SnapshotListResponse = {
536
+ encode(message, writer = minimal_1.default.Writer.create()) {
537
+ for (const v of message.SnapshotList) {
538
+ exports.SnapshotDesc.encode(v, writer.uint32(10).fork()).ldelim();
539
+ }
540
+ return writer;
541
+ },
542
+ decode(input, length) {
543
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
544
+ let end = length === undefined ? reader.len : reader.pos + length;
545
+ const message = createBaseSnapshotListResponse();
546
+ while (reader.pos < end) {
547
+ const tag = reader.uint32();
548
+ switch (tag >>> 3) {
549
+ case 1:
550
+ message.SnapshotList.push(exports.SnapshotDesc.decode(reader, reader.uint32()));
551
+ break;
552
+ default:
553
+ reader.skipType(tag & 7);
554
+ break;
555
+ }
556
+ }
557
+ return message;
558
+ },
559
+ fromJSON(object) {
560
+ return {
561
+ SnapshotList: Array.isArray(object === null || object === void 0 ? void 0 : object.SnapshotList)
562
+ ? object.SnapshotList.map((e) => exports.SnapshotDesc.fromJSON(e))
563
+ : [],
564
+ };
565
+ },
566
+ toJSON(message) {
567
+ const obj = {};
568
+ if (message.SnapshotList) {
569
+ obj.SnapshotList = message.SnapshotList.map((e) => e ? exports.SnapshotDesc.toJSON(e) : undefined);
570
+ }
571
+ else {
572
+ obj.SnapshotList = [];
573
+ }
574
+ return obj;
575
+ },
576
+ create(base) {
577
+ return exports.SnapshotListResponse.fromPartial(base !== null && base !== void 0 ? base : {});
578
+ },
579
+ fromPartial(object) {
580
+ var _a;
581
+ const message = createBaseSnapshotListResponse();
582
+ message.SnapshotList = ((_a = object.SnapshotList) === null || _a === void 0 ? void 0 : _a.map((e) => exports.SnapshotDesc.fromPartial(e))) || [];
583
+ return message;
584
+ },
585
+ };
586
+ function createBaseSnapshotBackupRequest() {
587
+ return { PoolName: "", DatasetPath: "", SnapshotName: "" };
588
+ }
589
+ exports.SnapshotBackupRequest = {
590
+ encode(message, writer = minimal_1.default.Writer.create()) {
591
+ if (message.PoolName !== "") {
592
+ writer.uint32(10).string(message.PoolName);
593
+ }
594
+ if (message.DatasetPath !== "") {
595
+ writer.uint32(18).string(message.DatasetPath);
596
+ }
597
+ if (message.SnapshotName !== "") {
598
+ writer.uint32(26).string(message.SnapshotName);
599
+ }
600
+ return writer;
601
+ },
602
+ decode(input, length) {
603
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
604
+ let end = length === undefined ? reader.len : reader.pos + length;
605
+ const message = createBaseSnapshotBackupRequest();
606
+ while (reader.pos < end) {
607
+ const tag = reader.uint32();
608
+ switch (tag >>> 3) {
609
+ case 1:
610
+ message.PoolName = reader.string();
611
+ break;
612
+ case 2:
613
+ message.DatasetPath = reader.string();
614
+ break;
615
+ case 3:
616
+ message.SnapshotName = reader.string();
617
+ break;
618
+ default:
619
+ reader.skipType(tag & 7);
620
+ break;
621
+ }
622
+ }
623
+ return message;
624
+ },
625
+ fromJSON(object) {
626
+ return {
627
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
628
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
629
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
630
+ };
631
+ },
632
+ toJSON(message) {
633
+ const obj = {};
634
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
635
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
636
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
637
+ return obj;
638
+ },
639
+ create(base) {
640
+ return exports.SnapshotBackupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
641
+ },
642
+ fromPartial(object) {
643
+ var _a, _b, _c;
644
+ const message = createBaseSnapshotBackupRequest();
645
+ message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
646
+ message.DatasetPath = (_b = object.DatasetPath) !== null && _b !== void 0 ? _b : "";
647
+ message.SnapshotName = (_c = object.SnapshotName) !== null && _c !== void 0 ? _c : "";
648
+ return message;
649
+ },
650
+ };
651
+ function createBaseSnapshotBackupTransferRequest() {
652
+ return { PoolName: "", DatasetPath: "", SnapshotName: "", TransferMode: 0 };
653
+ }
654
+ exports.SnapshotBackupTransferRequest = {
655
+ encode(message, writer = minimal_1.default.Writer.create()) {
656
+ if (message.PoolName !== "") {
657
+ writer.uint32(10).string(message.PoolName);
658
+ }
659
+ if (message.DatasetPath !== "") {
660
+ writer.uint32(18).string(message.DatasetPath);
661
+ }
662
+ if (message.SnapshotName !== "") {
663
+ writer.uint32(26).string(message.SnapshotName);
664
+ }
665
+ if (message.TransferMode !== 0) {
666
+ writer.uint32(32).int32(message.TransferMode);
667
+ }
668
+ return writer;
669
+ },
670
+ decode(input, length) {
671
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
672
+ let end = length === undefined ? reader.len : reader.pos + length;
673
+ const message = createBaseSnapshotBackupTransferRequest();
674
+ while (reader.pos < end) {
675
+ const tag = reader.uint32();
676
+ switch (tag >>> 3) {
677
+ case 1:
678
+ message.PoolName = reader.string();
679
+ break;
680
+ case 2:
681
+ message.DatasetPath = reader.string();
682
+ break;
683
+ case 3:
684
+ message.SnapshotName = reader.string();
685
+ break;
686
+ case 4:
687
+ message.TransferMode = reader.int32();
688
+ break;
689
+ default:
690
+ reader.skipType(tag & 7);
691
+ break;
692
+ }
693
+ }
694
+ return message;
695
+ },
696
+ fromJSON(object) {
697
+ return {
698
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
699
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
700
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
701
+ TransferMode: isSet(object.TransferMode) ? snapshotTransferModeFromJSON(object.TransferMode) : 0,
702
+ };
703
+ },
704
+ toJSON(message) {
705
+ const obj = {};
706
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
707
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
708
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
709
+ message.TransferMode !== undefined && (obj.TransferMode = snapshotTransferModeToJSON(message.TransferMode));
710
+ return obj;
711
+ },
712
+ create(base) {
713
+ return exports.SnapshotBackupTransferRequest.fromPartial(base !== null && base !== void 0 ? base : {});
714
+ },
715
+ fromPartial(object) {
716
+ var _a, _b, _c, _d;
717
+ const message = createBaseSnapshotBackupTransferRequest();
718
+ message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
719
+ message.DatasetPath = (_b = object.DatasetPath) !== null && _b !== void 0 ? _b : "";
720
+ message.SnapshotName = (_c = object.SnapshotName) !== null && _c !== void 0 ? _c : "";
721
+ message.TransferMode = (_d = object.TransferMode) !== null && _d !== void 0 ? _d : 0;
722
+ return message;
723
+ },
724
+ };
725
+ function createBaseSnapshotBackupTransferResponse() {
726
+ return { BytesSent: 0, BytesTotal: 0 };
727
+ }
728
+ exports.SnapshotBackupTransferResponse = {
729
+ encode(message, writer = minimal_1.default.Writer.create()) {
730
+ if (message.BytesSent !== 0) {
731
+ writer.uint32(8).uint64(message.BytesSent);
732
+ }
733
+ if (message.BytesTotal !== 0) {
734
+ writer.uint32(16).uint64(message.BytesTotal);
735
+ }
736
+ return writer;
737
+ },
738
+ decode(input, length) {
739
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
740
+ let end = length === undefined ? reader.len : reader.pos + length;
741
+ const message = createBaseSnapshotBackupTransferResponse();
742
+ while (reader.pos < end) {
743
+ const tag = reader.uint32();
744
+ switch (tag >>> 3) {
745
+ case 1:
746
+ message.BytesSent = longToNumber(reader.uint64());
747
+ break;
748
+ case 2:
749
+ message.BytesTotal = longToNumber(reader.uint64());
750
+ break;
751
+ default:
752
+ reader.skipType(tag & 7);
753
+ break;
754
+ }
755
+ }
756
+ return message;
757
+ },
758
+ fromJSON(object) {
759
+ return {
760
+ BytesSent: isSet(object.BytesSent) ? Number(object.BytesSent) : 0,
761
+ BytesTotal: isSet(object.BytesTotal) ? Number(object.BytesTotal) : 0,
762
+ };
763
+ },
764
+ toJSON(message) {
765
+ const obj = {};
766
+ message.BytesSent !== undefined && (obj.BytesSent = Math.round(message.BytesSent));
767
+ message.BytesTotal !== undefined && (obj.BytesTotal = Math.round(message.BytesTotal));
768
+ return obj;
769
+ },
770
+ create(base) {
771
+ return exports.SnapshotBackupTransferResponse.fromPartial(base !== null && base !== void 0 ? base : {});
772
+ },
773
+ fromPartial(object) {
774
+ var _a, _b;
775
+ const message = createBaseSnapshotBackupTransferResponse();
776
+ message.BytesSent = (_a = object.BytesSent) !== null && _a !== void 0 ? _a : 0;
777
+ message.BytesTotal = (_b = object.BytesTotal) !== null && _b !== void 0 ? _b : 0;
778
+ return message;
779
+ },
780
+ };
781
+ function createBaseSnapshotBackupListRequest() {
782
+ return { PoolName: "", DatasetPath: "" };
783
+ }
784
+ exports.SnapshotBackupListRequest = {
785
+ encode(message, writer = minimal_1.default.Writer.create()) {
786
+ if (message.PoolName !== "") {
787
+ writer.uint32(10).string(message.PoolName);
788
+ }
789
+ if (message.DatasetPath !== "") {
790
+ writer.uint32(18).string(message.DatasetPath);
791
+ }
792
+ return writer;
793
+ },
794
+ decode(input, length) {
795
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
796
+ let end = length === undefined ? reader.len : reader.pos + length;
797
+ const message = createBaseSnapshotBackupListRequest();
798
+ while (reader.pos < end) {
799
+ const tag = reader.uint32();
800
+ switch (tag >>> 3) {
801
+ case 1:
802
+ message.PoolName = reader.string();
803
+ break;
804
+ case 2:
805
+ message.DatasetPath = reader.string();
806
+ break;
807
+ default:
808
+ reader.skipType(tag & 7);
809
+ break;
810
+ }
811
+ }
812
+ return message;
813
+ },
814
+ fromJSON(object) {
815
+ return {
816
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
817
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
818
+ };
819
+ },
820
+ toJSON(message) {
821
+ const obj = {};
822
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
823
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
824
+ return obj;
825
+ },
826
+ create(base) {
827
+ return exports.SnapshotBackupListRequest.fromPartial(base !== null && base !== void 0 ? base : {});
828
+ },
829
+ fromPartial(object) {
830
+ var _a, _b;
831
+ const message = createBaseSnapshotBackupListRequest();
832
+ message.PoolName = (_a = object.PoolName) !== null && _a !== void 0 ? _a : "";
833
+ message.DatasetPath = (_b = object.DatasetPath) !== null && _b !== void 0 ? _b : "";
834
+ return message;
835
+ },
836
+ };
837
+ function createBaseSnapshotStatusResponse() {
838
+ return { Status: 0, BytesSent: 0, BytesTotal: 0 };
839
+ }
840
+ exports.SnapshotStatusResponse = {
841
+ encode(message, writer = minimal_1.default.Writer.create()) {
842
+ if (message.Status !== 0) {
843
+ writer.uint32(8).int32(message.Status);
844
+ }
845
+ if (message.BytesSent !== 0) {
846
+ writer.uint32(16).uint64(message.BytesSent);
847
+ }
848
+ if (message.BytesTotal !== 0) {
849
+ writer.uint32(24).uint64(message.BytesTotal);
850
+ }
851
+ return writer;
852
+ },
853
+ decode(input, length) {
854
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
855
+ let end = length === undefined ? reader.len : reader.pos + length;
856
+ const message = createBaseSnapshotStatusResponse();
857
+ while (reader.pos < end) {
858
+ const tag = reader.uint32();
859
+ switch (tag >>> 3) {
860
+ case 1:
861
+ message.Status = reader.int32();
862
+ break;
863
+ case 2:
864
+ message.BytesSent = longToNumber(reader.uint64());
865
+ break;
866
+ case 3:
867
+ message.BytesTotal = longToNumber(reader.uint64());
868
+ break;
869
+ default:
870
+ reader.skipType(tag & 7);
871
+ break;
872
+ }
873
+ }
874
+ return message;
875
+ },
876
+ fromJSON(object) {
877
+ return {
878
+ Status: isSet(object.Status) ? snapshotManagerStatusFromJSON(object.Status) : 0,
879
+ BytesSent: isSet(object.BytesSent) ? Number(object.BytesSent) : 0,
880
+ BytesTotal: isSet(object.BytesTotal) ? Number(object.BytesTotal) : 0,
881
+ };
882
+ },
883
+ toJSON(message) {
884
+ const obj = {};
885
+ message.Status !== undefined && (obj.Status = snapshotManagerStatusToJSON(message.Status));
886
+ message.BytesSent !== undefined && (obj.BytesSent = Math.round(message.BytesSent));
887
+ message.BytesTotal !== undefined && (obj.BytesTotal = Math.round(message.BytesTotal));
888
+ return obj;
889
+ },
890
+ create(base) {
891
+ return exports.SnapshotStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
892
+ },
893
+ fromPartial(object) {
894
+ var _a, _b, _c;
895
+ const message = createBaseSnapshotStatusResponse();
896
+ message.Status = (_a = object.Status) !== null && _a !== void 0 ? _a : 0;
897
+ message.BytesSent = (_b = object.BytesSent) !== null && _b !== void 0 ? _b : 0;
898
+ message.BytesTotal = (_c = object.BytesTotal) !== null && _c !== void 0 ? _c : 0;
899
+ return message;
900
+ },
901
+ };
902
+ class OSSnapshotServiceClientImpl {
903
+ constructor(rpc) {
904
+ this.rpc = rpc;
905
+ this.BackupPoolAdd = this.BackupPoolAdd.bind(this);
906
+ this.BackupPoolDel = this.BackupPoolDel.bind(this);
907
+ this.BackupPoolList = this.BackupPoolList.bind(this);
908
+ this.DatasetAdd = this.DatasetAdd.bind(this);
909
+ this.DatasetDel = this.DatasetDel.bind(this);
910
+ this.DatasetList = this.DatasetList.bind(this);
911
+ this.DatasetBackupDel = this.DatasetBackupDel.bind(this);
912
+ this.DatasetBackupList = this.DatasetBackupList.bind(this);
913
+ this.SnapshotAdd = this.SnapshotAdd.bind(this);
914
+ this.SnapshotDel = this.SnapshotDel.bind(this);
915
+ this.SnapshotList = this.SnapshotList.bind(this);
916
+ this.SnapshotRestore = this.SnapshotRestore.bind(this);
917
+ this.SnapshotBackupAdd = this.SnapshotBackupAdd.bind(this);
918
+ this.SnapshotBackupDel = this.SnapshotBackupDel.bind(this);
919
+ this.SnapshotBackupList = this.SnapshotBackupList.bind(this);
920
+ this.SnapshotBackupRestore = this.SnapshotBackupRestore.bind(this);
921
+ this.GetStatus = this.GetStatus.bind(this);
922
+ this.StopTransfer = this.StopTransfer.bind(this);
923
+ }
924
+ BackupPoolAdd(request, metadata) {
925
+ return this.rpc.unary(exports.OSSnapshotServiceBackupPoolAddDesc, exports.SnapshotBackupPoolRequest.fromPartial(request), metadata);
926
+ }
927
+ BackupPoolDel(request, metadata) {
928
+ return this.rpc.unary(exports.OSSnapshotServiceBackupPoolDelDesc, exports.SnapshotBackupPoolRequest.fromPartial(request), metadata);
929
+ }
930
+ BackupPoolList(request, metadata) {
931
+ return this.rpc.unary(exports.OSSnapshotServiceBackupPoolListDesc, empty_1.Empty.fromPartial(request), metadata);
932
+ }
933
+ DatasetAdd(request, metadata) {
934
+ return this.rpc.unary(exports.OSSnapshotServiceDatasetAddDesc, exports.SnapshotDatasetRequest.fromPartial(request), metadata);
935
+ }
936
+ DatasetDel(request, metadata) {
937
+ return this.rpc.unary(exports.OSSnapshotServiceDatasetDelDesc, exports.SnapshotDatasetRequest.fromPartial(request), metadata);
938
+ }
939
+ DatasetList(request, metadata) {
940
+ return this.rpc.unary(exports.OSSnapshotServiceDatasetListDesc, empty_1.Empty.fromPartial(request), metadata);
941
+ }
942
+ DatasetBackupDel(request, metadata) {
943
+ return this.rpc.unary(exports.OSSnapshotServiceDatasetBackupDelDesc, exports.SnapshotDatasetBackupRequest.fromPartial(request), metadata);
944
+ }
945
+ DatasetBackupList(request, metadata) {
946
+ return this.rpc.unary(exports.OSSnapshotServiceDatasetBackupListDesc, exports.SnapshotBackupPoolRequest.fromPartial(request), metadata);
947
+ }
948
+ SnapshotAdd(request, metadata) {
949
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotAddDesc, exports.SnapshotRequest.fromPartial(request), metadata);
950
+ }
951
+ SnapshotDel(request, metadata) {
952
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotDelDesc, exports.SnapshotRequest.fromPartial(request), metadata);
953
+ }
954
+ SnapshotList(request, metadata) {
955
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotListDesc, exports.SnapshotDatasetRequest.fromPartial(request), metadata);
956
+ }
957
+ SnapshotRestore(request, metadata) {
958
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotRestoreDesc, exports.SnapshotRequest.fromPartial(request), metadata);
959
+ }
960
+ SnapshotBackupAdd(request, metadata) {
961
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotBackupAddDesc, exports.SnapshotBackupTransferRequest.fromPartial(request), metadata);
962
+ }
963
+ SnapshotBackupDel(request, metadata) {
964
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotBackupDelDesc, exports.SnapshotBackupRequest.fromPartial(request), metadata);
965
+ }
966
+ SnapshotBackupList(request, metadata) {
967
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotBackupListDesc, exports.SnapshotBackupListRequest.fromPartial(request), metadata);
968
+ }
969
+ SnapshotBackupRestore(request, metadata) {
970
+ return this.rpc.unary(exports.OSSnapshotServiceSnapshotBackupRestoreDesc, exports.SnapshotBackupTransferRequest.fromPartial(request), metadata);
971
+ }
972
+ GetStatus(request, metadata) {
973
+ return this.rpc.unary(exports.OSSnapshotServiceGetStatusDesc, empty_1.Empty.fromPartial(request), metadata);
974
+ }
975
+ StopTransfer(request, metadata) {
976
+ return this.rpc.unary(exports.OSSnapshotServiceStopTransferDesc, empty_1.Empty.fromPartial(request), metadata);
977
+ }
978
+ }
979
+ exports.OSSnapshotServiceClientImpl = OSSnapshotServiceClientImpl;
980
+ exports.OSSnapshotServiceDesc = { serviceName: "cloud.lazycat.apis.sys.OSSnapshotService" };
981
+ exports.OSSnapshotServiceBackupPoolAddDesc = {
982
+ methodName: "BackupPoolAdd",
983
+ service: exports.OSSnapshotServiceDesc,
984
+ requestStream: false,
985
+ responseStream: false,
986
+ requestType: {
987
+ serializeBinary() {
988
+ return exports.SnapshotBackupPoolRequest.encode(this).finish();
989
+ },
990
+ },
991
+ responseType: {
992
+ deserializeBinary(data) {
993
+ const value = empty_1.Empty.decode(data);
994
+ return Object.assign(Object.assign({}, value), { toObject() {
995
+ return value;
996
+ } });
997
+ },
998
+ },
999
+ };
1000
+ exports.OSSnapshotServiceBackupPoolDelDesc = {
1001
+ methodName: "BackupPoolDel",
1002
+ service: exports.OSSnapshotServiceDesc,
1003
+ requestStream: false,
1004
+ responseStream: false,
1005
+ requestType: {
1006
+ serializeBinary() {
1007
+ return exports.SnapshotBackupPoolRequest.encode(this).finish();
1008
+ },
1009
+ },
1010
+ responseType: {
1011
+ deserializeBinary(data) {
1012
+ const value = empty_1.Empty.decode(data);
1013
+ return Object.assign(Object.assign({}, value), { toObject() {
1014
+ return value;
1015
+ } });
1016
+ },
1017
+ },
1018
+ };
1019
+ exports.OSSnapshotServiceBackupPoolListDesc = {
1020
+ methodName: "BackupPoolList",
1021
+ service: exports.OSSnapshotServiceDesc,
1022
+ requestStream: false,
1023
+ responseStream: false,
1024
+ requestType: {
1025
+ serializeBinary() {
1026
+ return empty_1.Empty.encode(this).finish();
1027
+ },
1028
+ },
1029
+ responseType: {
1030
+ deserializeBinary(data) {
1031
+ const value = exports.SnapshotBackupPoolListResponse.decode(data);
1032
+ return Object.assign(Object.assign({}, value), { toObject() {
1033
+ return value;
1034
+ } });
1035
+ },
1036
+ },
1037
+ };
1038
+ exports.OSSnapshotServiceDatasetAddDesc = {
1039
+ methodName: "DatasetAdd",
1040
+ service: exports.OSSnapshotServiceDesc,
1041
+ requestStream: false,
1042
+ responseStream: false,
1043
+ requestType: {
1044
+ serializeBinary() {
1045
+ return exports.SnapshotDatasetRequest.encode(this).finish();
1046
+ },
1047
+ },
1048
+ responseType: {
1049
+ deserializeBinary(data) {
1050
+ const value = empty_1.Empty.decode(data);
1051
+ return Object.assign(Object.assign({}, value), { toObject() {
1052
+ return value;
1053
+ } });
1054
+ },
1055
+ },
1056
+ };
1057
+ exports.OSSnapshotServiceDatasetDelDesc = {
1058
+ methodName: "DatasetDel",
1059
+ service: exports.OSSnapshotServiceDesc,
1060
+ requestStream: false,
1061
+ responseStream: false,
1062
+ requestType: {
1063
+ serializeBinary() {
1064
+ return exports.SnapshotDatasetRequest.encode(this).finish();
1065
+ },
1066
+ },
1067
+ responseType: {
1068
+ deserializeBinary(data) {
1069
+ const value = empty_1.Empty.decode(data);
1070
+ return Object.assign(Object.assign({}, value), { toObject() {
1071
+ return value;
1072
+ } });
1073
+ },
1074
+ },
1075
+ };
1076
+ exports.OSSnapshotServiceDatasetListDesc = {
1077
+ methodName: "DatasetList",
1078
+ service: exports.OSSnapshotServiceDesc,
1079
+ requestStream: false,
1080
+ responseStream: false,
1081
+ requestType: {
1082
+ serializeBinary() {
1083
+ return empty_1.Empty.encode(this).finish();
1084
+ },
1085
+ },
1086
+ responseType: {
1087
+ deserializeBinary(data) {
1088
+ const value = exports.SnapshotDatasetListResponse.decode(data);
1089
+ return Object.assign(Object.assign({}, value), { toObject() {
1090
+ return value;
1091
+ } });
1092
+ },
1093
+ },
1094
+ };
1095
+ exports.OSSnapshotServiceDatasetBackupDelDesc = {
1096
+ methodName: "DatasetBackupDel",
1097
+ service: exports.OSSnapshotServiceDesc,
1098
+ requestStream: false,
1099
+ responseStream: false,
1100
+ requestType: {
1101
+ serializeBinary() {
1102
+ return exports.SnapshotDatasetBackupRequest.encode(this).finish();
1103
+ },
1104
+ },
1105
+ responseType: {
1106
+ deserializeBinary(data) {
1107
+ const value = empty_1.Empty.decode(data);
1108
+ return Object.assign(Object.assign({}, value), { toObject() {
1109
+ return value;
1110
+ } });
1111
+ },
1112
+ },
1113
+ };
1114
+ exports.OSSnapshotServiceDatasetBackupListDesc = {
1115
+ methodName: "DatasetBackupList",
1116
+ service: exports.OSSnapshotServiceDesc,
1117
+ requestStream: false,
1118
+ responseStream: false,
1119
+ requestType: {
1120
+ serializeBinary() {
1121
+ return exports.SnapshotBackupPoolRequest.encode(this).finish();
1122
+ },
1123
+ },
1124
+ responseType: {
1125
+ deserializeBinary(data) {
1126
+ const value = exports.SnapshotDatasetListResponse.decode(data);
1127
+ return Object.assign(Object.assign({}, value), { toObject() {
1128
+ return value;
1129
+ } });
1130
+ },
1131
+ },
1132
+ };
1133
+ exports.OSSnapshotServiceSnapshotAddDesc = {
1134
+ methodName: "SnapshotAdd",
1135
+ service: exports.OSSnapshotServiceDesc,
1136
+ requestStream: false,
1137
+ responseStream: false,
1138
+ requestType: {
1139
+ serializeBinary() {
1140
+ return exports.SnapshotRequest.encode(this).finish();
1141
+ },
1142
+ },
1143
+ responseType: {
1144
+ deserializeBinary(data) {
1145
+ const value = empty_1.Empty.decode(data);
1146
+ return Object.assign(Object.assign({}, value), { toObject() {
1147
+ return value;
1148
+ } });
1149
+ },
1150
+ },
1151
+ };
1152
+ exports.OSSnapshotServiceSnapshotDelDesc = {
1153
+ methodName: "SnapshotDel",
1154
+ service: exports.OSSnapshotServiceDesc,
1155
+ requestStream: false,
1156
+ responseStream: false,
1157
+ requestType: {
1158
+ serializeBinary() {
1159
+ return exports.SnapshotRequest.encode(this).finish();
1160
+ },
1161
+ },
1162
+ responseType: {
1163
+ deserializeBinary(data) {
1164
+ const value = empty_1.Empty.decode(data);
1165
+ return Object.assign(Object.assign({}, value), { toObject() {
1166
+ return value;
1167
+ } });
1168
+ },
1169
+ },
1170
+ };
1171
+ exports.OSSnapshotServiceSnapshotListDesc = {
1172
+ methodName: "SnapshotList",
1173
+ service: exports.OSSnapshotServiceDesc,
1174
+ requestStream: false,
1175
+ responseStream: false,
1176
+ requestType: {
1177
+ serializeBinary() {
1178
+ return exports.SnapshotDatasetRequest.encode(this).finish();
1179
+ },
1180
+ },
1181
+ responseType: {
1182
+ deserializeBinary(data) {
1183
+ const value = exports.SnapshotListResponse.decode(data);
1184
+ return Object.assign(Object.assign({}, value), { toObject() {
1185
+ return value;
1186
+ } });
1187
+ },
1188
+ },
1189
+ };
1190
+ exports.OSSnapshotServiceSnapshotRestoreDesc = {
1191
+ methodName: "SnapshotRestore",
1192
+ service: exports.OSSnapshotServiceDesc,
1193
+ requestStream: false,
1194
+ responseStream: false,
1195
+ requestType: {
1196
+ serializeBinary() {
1197
+ return exports.SnapshotRequest.encode(this).finish();
1198
+ },
1199
+ },
1200
+ responseType: {
1201
+ deserializeBinary(data) {
1202
+ const value = empty_1.Empty.decode(data);
1203
+ return Object.assign(Object.assign({}, value), { toObject() {
1204
+ return value;
1205
+ } });
1206
+ },
1207
+ },
1208
+ };
1209
+ exports.OSSnapshotServiceSnapshotBackupAddDesc = {
1210
+ methodName: "SnapshotBackupAdd",
1211
+ service: exports.OSSnapshotServiceDesc,
1212
+ requestStream: false,
1213
+ responseStream: false,
1214
+ requestType: {
1215
+ serializeBinary() {
1216
+ return exports.SnapshotBackupTransferRequest.encode(this).finish();
1217
+ },
1218
+ },
1219
+ responseType: {
1220
+ deserializeBinary(data) {
1221
+ const value = exports.SnapshotBackupTransferResponse.decode(data);
1222
+ return Object.assign(Object.assign({}, value), { toObject() {
1223
+ return value;
1224
+ } });
1225
+ },
1226
+ },
1227
+ };
1228
+ exports.OSSnapshotServiceSnapshotBackupDelDesc = {
1229
+ methodName: "SnapshotBackupDel",
1230
+ service: exports.OSSnapshotServiceDesc,
1231
+ requestStream: false,
1232
+ responseStream: false,
1233
+ requestType: {
1234
+ serializeBinary() {
1235
+ return exports.SnapshotBackupRequest.encode(this).finish();
1236
+ },
1237
+ },
1238
+ responseType: {
1239
+ deserializeBinary(data) {
1240
+ const value = empty_1.Empty.decode(data);
1241
+ return Object.assign(Object.assign({}, value), { toObject() {
1242
+ return value;
1243
+ } });
1244
+ },
1245
+ },
1246
+ };
1247
+ exports.OSSnapshotServiceSnapshotBackupListDesc = {
1248
+ methodName: "SnapshotBackupList",
1249
+ service: exports.OSSnapshotServiceDesc,
1250
+ requestStream: false,
1251
+ responseStream: false,
1252
+ requestType: {
1253
+ serializeBinary() {
1254
+ return exports.SnapshotBackupListRequest.encode(this).finish();
1255
+ },
1256
+ },
1257
+ responseType: {
1258
+ deserializeBinary(data) {
1259
+ const value = exports.SnapshotListResponse.decode(data);
1260
+ return Object.assign(Object.assign({}, value), { toObject() {
1261
+ return value;
1262
+ } });
1263
+ },
1264
+ },
1265
+ };
1266
+ exports.OSSnapshotServiceSnapshotBackupRestoreDesc = {
1267
+ methodName: "SnapshotBackupRestore",
1268
+ service: exports.OSSnapshotServiceDesc,
1269
+ requestStream: false,
1270
+ responseStream: false,
1271
+ requestType: {
1272
+ serializeBinary() {
1273
+ return exports.SnapshotBackupTransferRequest.encode(this).finish();
1274
+ },
1275
+ },
1276
+ responseType: {
1277
+ deserializeBinary(data) {
1278
+ const value = exports.SnapshotBackupTransferResponse.decode(data);
1279
+ return Object.assign(Object.assign({}, value), { toObject() {
1280
+ return value;
1281
+ } });
1282
+ },
1283
+ },
1284
+ };
1285
+ exports.OSSnapshotServiceGetStatusDesc = {
1286
+ methodName: "GetStatus",
1287
+ service: exports.OSSnapshotServiceDesc,
1288
+ requestStream: false,
1289
+ responseStream: false,
1290
+ requestType: {
1291
+ serializeBinary() {
1292
+ return empty_1.Empty.encode(this).finish();
1293
+ },
1294
+ },
1295
+ responseType: {
1296
+ deserializeBinary(data) {
1297
+ const value = exports.SnapshotStatusResponse.decode(data);
1298
+ return Object.assign(Object.assign({}, value), { toObject() {
1299
+ return value;
1300
+ } });
1301
+ },
1302
+ },
1303
+ };
1304
+ exports.OSSnapshotServiceStopTransferDesc = {
1305
+ methodName: "StopTransfer",
1306
+ service: exports.OSSnapshotServiceDesc,
1307
+ requestStream: false,
1308
+ responseStream: false,
1309
+ requestType: {
1310
+ serializeBinary() {
1311
+ return empty_1.Empty.encode(this).finish();
1312
+ },
1313
+ },
1314
+ responseType: {
1315
+ deserializeBinary(data) {
1316
+ const value = empty_1.Empty.decode(data);
1317
+ return Object.assign(Object.assign({}, value), { toObject() {
1318
+ return value;
1319
+ } });
1320
+ },
1321
+ },
1322
+ };
1323
+ class GrpcWebImpl {
1324
+ constructor(host, options) {
1325
+ this.host = host;
1326
+ this.options = options;
1327
+ }
1328
+ unary(methodDesc, _request, metadata) {
1329
+ var _a;
1330
+ const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
1331
+ const maybeCombinedMetadata = metadata && this.options.metadata
1332
+ ? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
1333
+ : metadata || this.options.metadata;
1334
+ return new Promise((resolve, reject) => {
1335
+ grpc_web_1.grpc.unary(methodDesc, {
1336
+ request,
1337
+ host: this.host,
1338
+ metadata: maybeCombinedMetadata,
1339
+ transport: this.options.transport,
1340
+ debug: this.options.debug,
1341
+ onEnd: function (response) {
1342
+ if (response.status === grpc_web_1.grpc.Code.OK) {
1343
+ resolve(response.message.toObject());
1344
+ }
1345
+ else {
1346
+ const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
1347
+ reject(err);
1348
+ }
1349
+ },
1350
+ });
1351
+ });
1352
+ }
1353
+ }
1354
+ exports.GrpcWebImpl = GrpcWebImpl;
1355
+ var tsProtoGlobalThis = (() => {
1356
+ if (typeof globalThis !== "undefined") {
1357
+ return globalThis;
1358
+ }
1359
+ if (typeof self !== "undefined") {
1360
+ return self;
1361
+ }
1362
+ if (typeof window !== "undefined") {
1363
+ return window;
1364
+ }
1365
+ if (typeof global !== "undefined") {
1366
+ return global;
1367
+ }
1368
+ throw "Unable to locate global object";
1369
+ })();
1370
+ function longToNumber(long) {
1371
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
1372
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1373
+ }
1374
+ return long.toNumber();
1375
+ }
1376
+ if (minimal_1.default.util.Long !== long_1.default) {
1377
+ minimal_1.default.util.Long = long_1.default;
1378
+ minimal_1.default.configure();
1379
+ }
1380
+ function isSet(value) {
1381
+ return value !== null && value !== undefined;
1382
+ }
1383
+ class GrpcWebError extends tsProtoGlobalThis.Error {
1384
+ constructor(message, code, metadata) {
1385
+ super(message);
1386
+ this.code = code;
1387
+ this.metadata = metadata;
1388
+ }
1389
+ }
1390
+ exports.GrpcWebError = GrpcWebError;
1391
+ //# sourceMappingURL=OS_snapshot.js.map