@lazycatcloud/sdk 0.1.447 → 0.1.449

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