@aws-sdk/client-backup-gateway 3.927.0 → 3.928.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist-cjs/index.js +612 -905
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/BackupGatewayClient.js +2 -0
  4. package/dist-es/commands/AssociateGatewayToServerCommand.js +3 -9
  5. package/dist-es/commands/CreateGatewayCommand.js +3 -9
  6. package/dist-es/commands/DeleteGatewayCommand.js +3 -9
  7. package/dist-es/commands/DeleteHypervisorCommand.js +3 -9
  8. package/dist-es/commands/DisassociateGatewayFromServerCommand.js +3 -9
  9. package/dist-es/commands/GetBandwidthRateLimitScheduleCommand.js +3 -9
  10. package/dist-es/commands/GetGatewayCommand.js +3 -9
  11. package/dist-es/commands/GetHypervisorCommand.js +3 -9
  12. package/dist-es/commands/GetHypervisorPropertyMappingsCommand.js +3 -9
  13. package/dist-es/commands/GetVirtualMachineCommand.js +3 -9
  14. package/dist-es/commands/ImportHypervisorConfigurationCommand.js +3 -10
  15. package/dist-es/commands/ListGatewaysCommand.js +3 -9
  16. package/dist-es/commands/ListHypervisorsCommand.js +3 -9
  17. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  18. package/dist-es/commands/ListVirtualMachinesCommand.js +3 -9
  19. package/dist-es/commands/PutBandwidthRateLimitScheduleCommand.js +3 -9
  20. package/dist-es/commands/PutHypervisorPropertyMappingsCommand.js +3 -9
  21. package/dist-es/commands/PutMaintenanceStartTimeCommand.js +3 -9
  22. package/dist-es/commands/StartVirtualMachinesMetadataSyncCommand.js +3 -9
  23. package/dist-es/commands/TagResourceCommand.js +3 -9
  24. package/dist-es/commands/TestHypervisorConfigurationCommand.js +3 -10
  25. package/dist-es/commands/UntagResourceCommand.js +3 -9
  26. package/dist-es/commands/UpdateGatewayInformationCommand.js +3 -9
  27. package/dist-es/commands/UpdateGatewaySoftwareNowCommand.js +3 -9
  28. package/dist-es/commands/UpdateHypervisorCommand.js +3 -10
  29. package/dist-es/models/models_0.js +0 -16
  30. package/dist-es/runtimeConfig.shared.js +7 -0
  31. package/dist-es/schemas/schemas_0.js +544 -0
  32. package/dist-types/BackupGatewayClient.d.ts +10 -1
  33. package/dist-types/models/models_0.d.ts +0 -12
  34. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  35. package/dist-types/runtimeConfig.d.ts +1 -0
  36. package/dist-types/runtimeConfig.native.d.ts +1 -0
  37. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  38. package/dist-types/schemas/schemas_0.d.ts +105 -0
  39. package/dist-types/ts3.4/BackupGatewayClient.d.ts +4 -0
  40. package/dist-types/ts3.4/models/models_0.d.ts +0 -9
  41. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  42. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  43. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  45. package/dist-types/ts3.4/schemas/schemas_0.d.ts +111 -0
  46. package/package.json +5 -5
  47. package/dist-es/protocols/Aws_json1_0.js +0 -698
  48. package/dist-types/protocols/Aws_json1_0.d.ts +0 -227
  49. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +0 -305
@@ -1,698 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { BackupGatewayServiceException as __BaseException } from "../models/BackupGatewayServiceException";
5
- import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
6
- export const se_AssociateGatewayToServerCommand = async (input, context) => {
7
- const headers = sharedHeaders("AssociateGatewayToServer");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CreateGatewayCommand = async (input, context) => {
13
- const headers = sharedHeaders("CreateGateway");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_DeleteGatewayCommand = async (input, context) => {
19
- const headers = sharedHeaders("DeleteGateway");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DeleteHypervisorCommand = async (input, context) => {
25
- const headers = sharedHeaders("DeleteHypervisor");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DisassociateGatewayFromServerCommand = async (input, context) => {
31
- const headers = sharedHeaders("DisassociateGatewayFromServer");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_GetBandwidthRateLimitScheduleCommand = async (input, context) => {
37
- const headers = sharedHeaders("GetBandwidthRateLimitSchedule");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_GetGatewayCommand = async (input, context) => {
43
- const headers = sharedHeaders("GetGateway");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_GetHypervisorCommand = async (input, context) => {
49
- const headers = sharedHeaders("GetHypervisor");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_GetHypervisorPropertyMappingsCommand = async (input, context) => {
55
- const headers = sharedHeaders("GetHypervisorPropertyMappings");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_GetVirtualMachineCommand = async (input, context) => {
61
- const headers = sharedHeaders("GetVirtualMachine");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_ImportHypervisorConfigurationCommand = async (input, context) => {
67
- const headers = sharedHeaders("ImportHypervisorConfiguration");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_ListGatewaysCommand = async (input, context) => {
73
- const headers = sharedHeaders("ListGateways");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_ListHypervisorsCommand = async (input, context) => {
79
- const headers = sharedHeaders("ListHypervisors");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_ListTagsForResourceCommand = async (input, context) => {
85
- const headers = sharedHeaders("ListTagsForResource");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_ListVirtualMachinesCommand = async (input, context) => {
91
- const headers = sharedHeaders("ListVirtualMachines");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_PutBandwidthRateLimitScheduleCommand = async (input, context) => {
97
- const headers = sharedHeaders("PutBandwidthRateLimitSchedule");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_PutHypervisorPropertyMappingsCommand = async (input, context) => {
103
- const headers = sharedHeaders("PutHypervisorPropertyMappings");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_PutMaintenanceStartTimeCommand = async (input, context) => {
109
- const headers = sharedHeaders("PutMaintenanceStartTime");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_StartVirtualMachinesMetadataSyncCommand = async (input, context) => {
115
- const headers = sharedHeaders("StartVirtualMachinesMetadataSync");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_TagResourceCommand = async (input, context) => {
121
- const headers = sharedHeaders("TagResource");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_TestHypervisorConfigurationCommand = async (input, context) => {
127
- const headers = sharedHeaders("TestHypervisorConfiguration");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_UntagResourceCommand = async (input, context) => {
133
- const headers = sharedHeaders("UntagResource");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_UpdateGatewayInformationCommand = async (input, context) => {
139
- const headers = sharedHeaders("UpdateGatewayInformation");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const se_UpdateGatewaySoftwareNowCommand = async (input, context) => {
145
- const headers = sharedHeaders("UpdateGatewaySoftwareNow");
146
- let body;
147
- body = JSON.stringify(_json(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- export const se_UpdateHypervisorCommand = async (input, context) => {
151
- const headers = sharedHeaders("UpdateHypervisor");
152
- let body;
153
- body = JSON.stringify(_json(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- export const de_AssociateGatewayToServerCommand = async (output, context) => {
157
- if (output.statusCode >= 300) {
158
- return de_CommandError(output, context);
159
- }
160
- const data = await parseBody(output.body, context);
161
- let contents = {};
162
- contents = _json(data);
163
- const response = {
164
- $metadata: deserializeMetadata(output),
165
- ...contents,
166
- };
167
- return response;
168
- };
169
- export const de_CreateGatewayCommand = async (output, context) => {
170
- if (output.statusCode >= 300) {
171
- return de_CommandError(output, context);
172
- }
173
- const data = await parseBody(output.body, context);
174
- let contents = {};
175
- contents = _json(data);
176
- const response = {
177
- $metadata: deserializeMetadata(output),
178
- ...contents,
179
- };
180
- return response;
181
- };
182
- export const de_DeleteGatewayCommand = async (output, context) => {
183
- if (output.statusCode >= 300) {
184
- return de_CommandError(output, context);
185
- }
186
- const data = await parseBody(output.body, context);
187
- let contents = {};
188
- contents = _json(data);
189
- const response = {
190
- $metadata: deserializeMetadata(output),
191
- ...contents,
192
- };
193
- return response;
194
- };
195
- export const de_DeleteHypervisorCommand = async (output, context) => {
196
- if (output.statusCode >= 300) {
197
- return de_CommandError(output, context);
198
- }
199
- const data = await parseBody(output.body, context);
200
- let contents = {};
201
- contents = _json(data);
202
- const response = {
203
- $metadata: deserializeMetadata(output),
204
- ...contents,
205
- };
206
- return response;
207
- };
208
- export const de_DisassociateGatewayFromServerCommand = async (output, context) => {
209
- if (output.statusCode >= 300) {
210
- return de_CommandError(output, context);
211
- }
212
- const data = await parseBody(output.body, context);
213
- let contents = {};
214
- contents = _json(data);
215
- const response = {
216
- $metadata: deserializeMetadata(output),
217
- ...contents,
218
- };
219
- return response;
220
- };
221
- export const de_GetBandwidthRateLimitScheduleCommand = async (output, context) => {
222
- if (output.statusCode >= 300) {
223
- return de_CommandError(output, context);
224
- }
225
- const data = await parseBody(output.body, context);
226
- let contents = {};
227
- contents = _json(data);
228
- const response = {
229
- $metadata: deserializeMetadata(output),
230
- ...contents,
231
- };
232
- return response;
233
- };
234
- export const de_GetGatewayCommand = async (output, context) => {
235
- if (output.statusCode >= 300) {
236
- return de_CommandError(output, context);
237
- }
238
- const data = await parseBody(output.body, context);
239
- let contents = {};
240
- contents = de_GetGatewayOutput(data, context);
241
- const response = {
242
- $metadata: deserializeMetadata(output),
243
- ...contents,
244
- };
245
- return response;
246
- };
247
- export const de_GetHypervisorCommand = async (output, context) => {
248
- if (output.statusCode >= 300) {
249
- return de_CommandError(output, context);
250
- }
251
- const data = await parseBody(output.body, context);
252
- let contents = {};
253
- contents = de_GetHypervisorOutput(data, context);
254
- const response = {
255
- $metadata: deserializeMetadata(output),
256
- ...contents,
257
- };
258
- return response;
259
- };
260
- export const de_GetHypervisorPropertyMappingsCommand = async (output, context) => {
261
- if (output.statusCode >= 300) {
262
- return de_CommandError(output, context);
263
- }
264
- const data = await parseBody(output.body, context);
265
- let contents = {};
266
- contents = _json(data);
267
- const response = {
268
- $metadata: deserializeMetadata(output),
269
- ...contents,
270
- };
271
- return response;
272
- };
273
- export const de_GetVirtualMachineCommand = async (output, context) => {
274
- if (output.statusCode >= 300) {
275
- return de_CommandError(output, context);
276
- }
277
- const data = await parseBody(output.body, context);
278
- let contents = {};
279
- contents = de_GetVirtualMachineOutput(data, context);
280
- const response = {
281
- $metadata: deserializeMetadata(output),
282
- ...contents,
283
- };
284
- return response;
285
- };
286
- export const de_ImportHypervisorConfigurationCommand = async (output, context) => {
287
- if (output.statusCode >= 300) {
288
- return de_CommandError(output, context);
289
- }
290
- const data = await parseBody(output.body, context);
291
- let contents = {};
292
- contents = _json(data);
293
- const response = {
294
- $metadata: deserializeMetadata(output),
295
- ...contents,
296
- };
297
- return response;
298
- };
299
- export const de_ListGatewaysCommand = async (output, context) => {
300
- if (output.statusCode >= 300) {
301
- return de_CommandError(output, context);
302
- }
303
- const data = await parseBody(output.body, context);
304
- let contents = {};
305
- contents = de_ListGatewaysOutput(data, context);
306
- const response = {
307
- $metadata: deserializeMetadata(output),
308
- ...contents,
309
- };
310
- return response;
311
- };
312
- export const de_ListHypervisorsCommand = async (output, context) => {
313
- if (output.statusCode >= 300) {
314
- return de_CommandError(output, context);
315
- }
316
- const data = await parseBody(output.body, context);
317
- let contents = {};
318
- contents = _json(data);
319
- const response = {
320
- $metadata: deserializeMetadata(output),
321
- ...contents,
322
- };
323
- return response;
324
- };
325
- export const de_ListTagsForResourceCommand = async (output, context) => {
326
- if (output.statusCode >= 300) {
327
- return de_CommandError(output, context);
328
- }
329
- const data = await parseBody(output.body, context);
330
- let contents = {};
331
- contents = _json(data);
332
- const response = {
333
- $metadata: deserializeMetadata(output),
334
- ...contents,
335
- };
336
- return response;
337
- };
338
- export const de_ListVirtualMachinesCommand = async (output, context) => {
339
- if (output.statusCode >= 300) {
340
- return de_CommandError(output, context);
341
- }
342
- const data = await parseBody(output.body, context);
343
- let contents = {};
344
- contents = de_ListVirtualMachinesOutput(data, context);
345
- const response = {
346
- $metadata: deserializeMetadata(output),
347
- ...contents,
348
- };
349
- return response;
350
- };
351
- export const de_PutBandwidthRateLimitScheduleCommand = async (output, context) => {
352
- if (output.statusCode >= 300) {
353
- return de_CommandError(output, context);
354
- }
355
- const data = await parseBody(output.body, context);
356
- let contents = {};
357
- contents = _json(data);
358
- const response = {
359
- $metadata: deserializeMetadata(output),
360
- ...contents,
361
- };
362
- return response;
363
- };
364
- export const de_PutHypervisorPropertyMappingsCommand = async (output, context) => {
365
- if (output.statusCode >= 300) {
366
- return de_CommandError(output, context);
367
- }
368
- const data = await parseBody(output.body, context);
369
- let contents = {};
370
- contents = _json(data);
371
- const response = {
372
- $metadata: deserializeMetadata(output),
373
- ...contents,
374
- };
375
- return response;
376
- };
377
- export const de_PutMaintenanceStartTimeCommand = async (output, context) => {
378
- if (output.statusCode >= 300) {
379
- return de_CommandError(output, context);
380
- }
381
- const data = await parseBody(output.body, context);
382
- let contents = {};
383
- contents = _json(data);
384
- const response = {
385
- $metadata: deserializeMetadata(output),
386
- ...contents,
387
- };
388
- return response;
389
- };
390
- export const de_StartVirtualMachinesMetadataSyncCommand = async (output, context) => {
391
- if (output.statusCode >= 300) {
392
- return de_CommandError(output, context);
393
- }
394
- const data = await parseBody(output.body, context);
395
- let contents = {};
396
- contents = _json(data);
397
- const response = {
398
- $metadata: deserializeMetadata(output),
399
- ...contents,
400
- };
401
- return response;
402
- };
403
- export const de_TagResourceCommand = async (output, context) => {
404
- if (output.statusCode >= 300) {
405
- return de_CommandError(output, context);
406
- }
407
- const data = await parseBody(output.body, context);
408
- let contents = {};
409
- contents = _json(data);
410
- const response = {
411
- $metadata: deserializeMetadata(output),
412
- ...contents,
413
- };
414
- return response;
415
- };
416
- export const de_TestHypervisorConfigurationCommand = async (output, context) => {
417
- if (output.statusCode >= 300) {
418
- return de_CommandError(output, context);
419
- }
420
- const data = await parseBody(output.body, context);
421
- let contents = {};
422
- contents = _json(data);
423
- const response = {
424
- $metadata: deserializeMetadata(output),
425
- ...contents,
426
- };
427
- return response;
428
- };
429
- export const de_UntagResourceCommand = async (output, context) => {
430
- if (output.statusCode >= 300) {
431
- return de_CommandError(output, context);
432
- }
433
- const data = await parseBody(output.body, context);
434
- let contents = {};
435
- contents = _json(data);
436
- const response = {
437
- $metadata: deserializeMetadata(output),
438
- ...contents,
439
- };
440
- return response;
441
- };
442
- export const de_UpdateGatewayInformationCommand = async (output, context) => {
443
- if (output.statusCode >= 300) {
444
- return de_CommandError(output, context);
445
- }
446
- const data = await parseBody(output.body, context);
447
- let contents = {};
448
- contents = _json(data);
449
- const response = {
450
- $metadata: deserializeMetadata(output),
451
- ...contents,
452
- };
453
- return response;
454
- };
455
- export const de_UpdateGatewaySoftwareNowCommand = async (output, context) => {
456
- if (output.statusCode >= 300) {
457
- return de_CommandError(output, context);
458
- }
459
- const data = await parseBody(output.body, context);
460
- let contents = {};
461
- contents = _json(data);
462
- const response = {
463
- $metadata: deserializeMetadata(output),
464
- ...contents,
465
- };
466
- return response;
467
- };
468
- export const de_UpdateHypervisorCommand = async (output, context) => {
469
- if (output.statusCode >= 300) {
470
- return de_CommandError(output, context);
471
- }
472
- const data = await parseBody(output.body, context);
473
- let contents = {};
474
- contents = _json(data);
475
- const response = {
476
- $metadata: deserializeMetadata(output),
477
- ...contents,
478
- };
479
- return response;
480
- };
481
- const de_CommandError = async (output, context) => {
482
- const parsedOutput = {
483
- ...output,
484
- body: await parseErrorBody(output.body, context),
485
- };
486
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
487
- switch (errorCode) {
488
- case "ConflictException":
489
- case "com.amazonaws.backupgateway#ConflictException":
490
- throw await de_ConflictExceptionRes(parsedOutput, context);
491
- case "InternalServerException":
492
- case "com.amazonaws.backupgateway#InternalServerException":
493
- throw await de_InternalServerExceptionRes(parsedOutput, context);
494
- case "ThrottlingException":
495
- case "com.amazonaws.backupgateway#ThrottlingException":
496
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
497
- case "ValidationException":
498
- case "com.amazonaws.backupgateway#ValidationException":
499
- throw await de_ValidationExceptionRes(parsedOutput, context);
500
- case "ResourceNotFoundException":
501
- case "com.amazonaws.backupgateway#ResourceNotFoundException":
502
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
503
- case "AccessDeniedException":
504
- case "com.amazonaws.backupgateway#AccessDeniedException":
505
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
506
- default:
507
- const parsedBody = parsedOutput.body;
508
- return throwDefaultError({
509
- output,
510
- parsedBody,
511
- errorCode,
512
- });
513
- }
514
- };
515
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
516
- const body = parsedOutput.body;
517
- const deserialized = _json(body);
518
- const exception = new AccessDeniedException({
519
- $metadata: deserializeMetadata(parsedOutput),
520
- ...deserialized,
521
- });
522
- return __decorateServiceException(exception, body);
523
- };
524
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
525
- const body = parsedOutput.body;
526
- const deserialized = _json(body);
527
- const exception = new ConflictException({
528
- $metadata: deserializeMetadata(parsedOutput),
529
- ...deserialized,
530
- });
531
- return __decorateServiceException(exception, body);
532
- };
533
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
534
- const body = parsedOutput.body;
535
- const deserialized = _json(body);
536
- const exception = new InternalServerException({
537
- $metadata: deserializeMetadata(parsedOutput),
538
- ...deserialized,
539
- });
540
- return __decorateServiceException(exception, body);
541
- };
542
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
543
- const body = parsedOutput.body;
544
- const deserialized = _json(body);
545
- const exception = new ResourceNotFoundException({
546
- $metadata: deserializeMetadata(parsedOutput),
547
- ...deserialized,
548
- });
549
- return __decorateServiceException(exception, body);
550
- };
551
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
552
- const body = parsedOutput.body;
553
- const deserialized = _json(body);
554
- const exception = new ThrottlingException({
555
- $metadata: deserializeMetadata(parsedOutput),
556
- ...deserialized,
557
- });
558
- return __decorateServiceException(exception, body);
559
- };
560
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
561
- const body = parsedOutput.body;
562
- const deserialized = _json(body);
563
- const exception = new ValidationException({
564
- $metadata: deserializeMetadata(parsedOutput),
565
- ...deserialized,
566
- });
567
- return __decorateServiceException(exception, body);
568
- };
569
- const de_Gateway = (output, context) => {
570
- return take(output, {
571
- GatewayArn: __expectString,
572
- GatewayDisplayName: __expectString,
573
- GatewayType: __expectString,
574
- HypervisorId: __expectString,
575
- LastSeenTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
576
- });
577
- };
578
- const de_GatewayDetails = (output, context) => {
579
- return take(output, {
580
- GatewayArn: __expectString,
581
- GatewayDisplayName: __expectString,
582
- GatewayType: __expectString,
583
- HypervisorId: __expectString,
584
- LastSeenTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
585
- MaintenanceStartTime: _json,
586
- NextUpdateAvailabilityTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
587
- VpcEndpoint: __expectString,
588
- });
589
- };
590
- const de_Gateways = (output, context) => {
591
- const retVal = (output || [])
592
- .filter((e) => e != null)
593
- .map((entry) => {
594
- return de_Gateway(entry, context);
595
- });
596
- return retVal;
597
- };
598
- const de_GetGatewayOutput = (output, context) => {
599
- return take(output, {
600
- Gateway: (_) => de_GatewayDetails(_, context),
601
- });
602
- };
603
- const de_GetHypervisorOutput = (output, context) => {
604
- return take(output, {
605
- Hypervisor: (_) => de_HypervisorDetails(_, context),
606
- });
607
- };
608
- const de_GetVirtualMachineOutput = (output, context) => {
609
- return take(output, {
610
- VirtualMachine: (_) => de_VirtualMachineDetails(_, context),
611
- });
612
- };
613
- const de_HypervisorDetails = (output, context) => {
614
- return take(output, {
615
- Host: __expectString,
616
- HypervisorArn: __expectString,
617
- KmsKeyArn: __expectString,
618
- LastSuccessfulMetadataSyncTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
619
- LatestMetadataSyncStatus: __expectString,
620
- LatestMetadataSyncStatusMessage: __expectString,
621
- LogGroupArn: __expectString,
622
- Name: __expectString,
623
- State: __expectString,
624
- });
625
- };
626
- const de_ListGatewaysOutput = (output, context) => {
627
- return take(output, {
628
- Gateways: (_) => de_Gateways(_, context),
629
- NextToken: __expectString,
630
- });
631
- };
632
- const de_ListVirtualMachinesOutput = (output, context) => {
633
- return take(output, {
634
- NextToken: __expectString,
635
- VirtualMachines: (_) => de_VirtualMachines(_, context),
636
- });
637
- };
638
- const de_VirtualMachine = (output, context) => {
639
- return take(output, {
640
- HostName: __expectString,
641
- HypervisorId: __expectString,
642
- LastBackupDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
643
- Name: __expectString,
644
- Path: __expectString,
645
- ResourceArn: __expectString,
646
- });
647
- };
648
- const de_VirtualMachineDetails = (output, context) => {
649
- return take(output, {
650
- HostName: __expectString,
651
- HypervisorId: __expectString,
652
- LastBackupDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
653
- Name: __expectString,
654
- Path: __expectString,
655
- ResourceArn: __expectString,
656
- VmwareTags: _json,
657
- });
658
- };
659
- const de_VirtualMachines = (output, context) => {
660
- const retVal = (output || [])
661
- .filter((e) => e != null)
662
- .map((entry) => {
663
- return de_VirtualMachine(entry, context);
664
- });
665
- return retVal;
666
- };
667
- const deserializeMetadata = (output) => ({
668
- httpStatusCode: output.statusCode,
669
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
670
- extendedRequestId: output.headers["x-amz-id-2"],
671
- cfId: output.headers["x-amz-cf-id"],
672
- });
673
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
674
- const throwDefaultError = withBaseException(__BaseException);
675
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
676
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
677
- const contents = {
678
- protocol,
679
- hostname,
680
- port,
681
- method: "POST",
682
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
683
- headers,
684
- };
685
- if (resolvedHostname !== undefined) {
686
- contents.hostname = resolvedHostname;
687
- }
688
- if (body !== undefined) {
689
- contents.body = body;
690
- }
691
- return new __HttpRequest(contents);
692
- };
693
- function sharedHeaders(operation) {
694
- return {
695
- "content-type": "application/x-amz-json-1.0",
696
- "x-amz-target": `BackupOnPremises_v20210101.${operation}`,
697
- };
698
- }