@aws-sdk/client-backup-gateway 3.312.0 → 3.315.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.
@@ -1,155 +1,155 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { BackupGatewayServiceException as __BaseException } from "../models/BackupGatewayServiceException";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  export const se_AssociateGatewayToServerCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("AssociateGatewayToServer");
7
7
  let body;
8
- body = JSON.stringify(se_AssociateGatewayToServerInput(input, context));
8
+ body = JSON.stringify(_json(input));
9
9
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
10
10
  };
11
11
  export const se_CreateGatewayCommand = async (input, context) => {
12
12
  const headers = sharedHeaders("CreateGateway");
13
13
  let body;
14
- body = JSON.stringify(se_CreateGatewayInput(input, context));
14
+ body = JSON.stringify(_json(input));
15
15
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
16
  };
17
17
  export const se_DeleteGatewayCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("DeleteGateway");
19
19
  let body;
20
- body = JSON.stringify(se_DeleteGatewayInput(input, context));
20
+ body = JSON.stringify(_json(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  export const se_DeleteHypervisorCommand = async (input, context) => {
24
24
  const headers = sharedHeaders("DeleteHypervisor");
25
25
  let body;
26
- body = JSON.stringify(se_DeleteHypervisorInput(input, context));
26
+ body = JSON.stringify(_json(input));
27
27
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
28
  };
29
29
  export const se_DisassociateGatewayFromServerCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("DisassociateGatewayFromServer");
31
31
  let body;
32
- body = JSON.stringify(se_DisassociateGatewayFromServerInput(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_GetBandwidthRateLimitScheduleCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("GetBandwidthRateLimitSchedule");
37
37
  let body;
38
- body = JSON.stringify(se_GetBandwidthRateLimitScheduleInput(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_GetGatewayCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("GetGateway");
43
43
  let body;
44
- body = JSON.stringify(se_GetGatewayInput(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_GetHypervisorCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("GetHypervisor");
49
49
  let body;
50
- body = JSON.stringify(se_GetHypervisorInput(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_GetHypervisorPropertyMappingsCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("GetHypervisorPropertyMappings");
55
55
  let body;
56
- body = JSON.stringify(se_GetHypervisorPropertyMappingsInput(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_GetVirtualMachineCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("GetVirtualMachine");
61
61
  let body;
62
- body = JSON.stringify(se_GetVirtualMachineInput(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_ImportHypervisorConfigurationCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("ImportHypervisorConfiguration");
67
67
  let body;
68
- body = JSON.stringify(se_ImportHypervisorConfigurationInput(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_ListGatewaysCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("ListGateways");
73
73
  let body;
74
- body = JSON.stringify(se_ListGatewaysInput(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_ListHypervisorsCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("ListHypervisors");
79
79
  let body;
80
- body = JSON.stringify(se_ListHypervisorsInput(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const se_ListTagsForResourceCommand = async (input, context) => {
84
84
  const headers = sharedHeaders("ListTagsForResource");
85
85
  let body;
86
- body = JSON.stringify(se_ListTagsForResourceInput(input, context));
86
+ body = JSON.stringify(_json(input));
87
87
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
88
88
  };
89
89
  export const se_ListVirtualMachinesCommand = async (input, context) => {
90
90
  const headers = sharedHeaders("ListVirtualMachines");
91
91
  let body;
92
- body = JSON.stringify(se_ListVirtualMachinesInput(input, context));
92
+ body = JSON.stringify(_json(input));
93
93
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
94
  };
95
95
  export const se_PutBandwidthRateLimitScheduleCommand = async (input, context) => {
96
96
  const headers = sharedHeaders("PutBandwidthRateLimitSchedule");
97
97
  let body;
98
- body = JSON.stringify(se_PutBandwidthRateLimitScheduleInput(input, context));
98
+ body = JSON.stringify(_json(input));
99
99
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
100
  };
101
101
  export const se_PutHypervisorPropertyMappingsCommand = async (input, context) => {
102
102
  const headers = sharedHeaders("PutHypervisorPropertyMappings");
103
103
  let body;
104
- body = JSON.stringify(se_PutHypervisorPropertyMappingsInput(input, context));
104
+ body = JSON.stringify(_json(input));
105
105
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
106
  };
107
107
  export const se_PutMaintenanceStartTimeCommand = async (input, context) => {
108
108
  const headers = sharedHeaders("PutMaintenanceStartTime");
109
109
  let body;
110
- body = JSON.stringify(se_PutMaintenanceStartTimeInput(input, context));
110
+ body = JSON.stringify(_json(input));
111
111
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
112
  };
113
113
  export const se_StartVirtualMachinesMetadataSyncCommand = async (input, context) => {
114
114
  const headers = sharedHeaders("StartVirtualMachinesMetadataSync");
115
115
  let body;
116
- body = JSON.stringify(se_StartVirtualMachinesMetadataSyncInput(input, context));
116
+ body = JSON.stringify(_json(input));
117
117
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
118
118
  };
119
119
  export const se_TagResourceCommand = async (input, context) => {
120
120
  const headers = sharedHeaders("TagResource");
121
121
  let body;
122
- body = JSON.stringify(se_TagResourceInput(input, context));
122
+ body = JSON.stringify(_json(input));
123
123
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
124
124
  };
125
125
  export const se_TestHypervisorConfigurationCommand = async (input, context) => {
126
126
  const headers = sharedHeaders("TestHypervisorConfiguration");
127
127
  let body;
128
- body = JSON.stringify(se_TestHypervisorConfigurationInput(input, context));
128
+ body = JSON.stringify(_json(input));
129
129
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
130
130
  };
131
131
  export const se_UntagResourceCommand = async (input, context) => {
132
132
  const headers = sharedHeaders("UntagResource");
133
133
  let body;
134
- body = JSON.stringify(se_UntagResourceInput(input, context));
134
+ body = JSON.stringify(_json(input));
135
135
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
136
136
  };
137
137
  export const se_UpdateGatewayInformationCommand = async (input, context) => {
138
138
  const headers = sharedHeaders("UpdateGatewayInformation");
139
139
  let body;
140
- body = JSON.stringify(se_UpdateGatewayInformationInput(input, context));
140
+ body = JSON.stringify(_json(input));
141
141
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
142
  };
143
143
  export const se_UpdateGatewaySoftwareNowCommand = async (input, context) => {
144
144
  const headers = sharedHeaders("UpdateGatewaySoftwareNow");
145
145
  let body;
146
- body = JSON.stringify(se_UpdateGatewaySoftwareNowInput(input, context));
146
+ body = JSON.stringify(_json(input));
147
147
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
148
  };
149
149
  export const se_UpdateHypervisorCommand = async (input, context) => {
150
150
  const headers = sharedHeaders("UpdateHypervisor");
151
151
  let body;
152
- body = JSON.stringify(se_UpdateHypervisorInput(input, context));
152
+ body = JSON.stringify(_json(input));
153
153
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
154
  };
155
155
  export const de_AssociateGatewayToServerCommand = async (output, context) => {
@@ -158,12 +158,12 @@ export const de_AssociateGatewayToServerCommand = async (output, context) => {
158
158
  }
159
159
  const data = await parseBody(output.body, context);
160
160
  let contents = {};
161
- contents = de_AssociateGatewayToServerOutput(data, context);
161
+ contents = _json(data);
162
162
  const response = {
163
163
  $metadata: deserializeMetadata(output),
164
164
  ...contents,
165
165
  };
166
- return Promise.resolve(response);
166
+ return response;
167
167
  };
168
168
  const de_AssociateGatewayToServerCommandError = async (output, context) => {
169
169
  const parsedOutput = {
@@ -186,10 +186,9 @@ const de_AssociateGatewayToServerCommandError = async (output, context) => {
186
186
  throw await de_ValidationExceptionRes(parsedOutput, context);
187
187
  default:
188
188
  const parsedBody = parsedOutput.body;
189
- throwDefaultError({
189
+ return throwDefaultError({
190
190
  output,
191
191
  parsedBody,
192
- exceptionCtor: __BaseException,
193
192
  errorCode,
194
193
  });
195
194
  }
@@ -200,12 +199,12 @@ export const de_CreateGatewayCommand = async (output, context) => {
200
199
  }
201
200
  const data = await parseBody(output.body, context);
202
201
  let contents = {};
203
- contents = de_CreateGatewayOutput(data, context);
202
+ contents = _json(data);
204
203
  const response = {
205
204
  $metadata: deserializeMetadata(output),
206
205
  ...contents,
207
206
  };
208
- return Promise.resolve(response);
207
+ return response;
209
208
  };
210
209
  const de_CreateGatewayCommandError = async (output, context) => {
211
210
  const parsedOutput = {
@@ -225,10 +224,9 @@ const de_CreateGatewayCommandError = async (output, context) => {
225
224
  throw await de_ValidationExceptionRes(parsedOutput, context);
226
225
  default:
227
226
  const parsedBody = parsedOutput.body;
228
- throwDefaultError({
227
+ return throwDefaultError({
229
228
  output,
230
229
  parsedBody,
231
- exceptionCtor: __BaseException,
232
230
  errorCode,
233
231
  });
234
232
  }
@@ -239,12 +237,12 @@ export const de_DeleteGatewayCommand = async (output, context) => {
239
237
  }
240
238
  const data = await parseBody(output.body, context);
241
239
  let contents = {};
242
- contents = de_DeleteGatewayOutput(data, context);
240
+ contents = _json(data);
243
241
  const response = {
244
242
  $metadata: deserializeMetadata(output),
245
243
  ...contents,
246
244
  };
247
- return Promise.resolve(response);
245
+ return response;
248
246
  };
249
247
  const de_DeleteGatewayCommandError = async (output, context) => {
250
248
  const parsedOutput = {
@@ -267,10 +265,9 @@ const de_DeleteGatewayCommandError = async (output, context) => {
267
265
  throw await de_ValidationExceptionRes(parsedOutput, context);
268
266
  default:
269
267
  const parsedBody = parsedOutput.body;
270
- throwDefaultError({
268
+ return throwDefaultError({
271
269
  output,
272
270
  parsedBody,
273
- exceptionCtor: __BaseException,
274
271
  errorCode,
275
272
  });
276
273
  }
@@ -281,12 +278,12 @@ export const de_DeleteHypervisorCommand = async (output, context) => {
281
278
  }
282
279
  const data = await parseBody(output.body, context);
283
280
  let contents = {};
284
- contents = de_DeleteHypervisorOutput(data, context);
281
+ contents = _json(data);
285
282
  const response = {
286
283
  $metadata: deserializeMetadata(output),
287
284
  ...contents,
288
285
  };
289
- return Promise.resolve(response);
286
+ return response;
290
287
  };
291
288
  const de_DeleteHypervisorCommandError = async (output, context) => {
292
289
  const parsedOutput = {
@@ -315,10 +312,9 @@ const de_DeleteHypervisorCommandError = async (output, context) => {
315
312
  throw await de_ValidationExceptionRes(parsedOutput, context);
316
313
  default:
317
314
  const parsedBody = parsedOutput.body;
318
- throwDefaultError({
315
+ return throwDefaultError({
319
316
  output,
320
317
  parsedBody,
321
- exceptionCtor: __BaseException,
322
318
  errorCode,
323
319
  });
324
320
  }
@@ -329,12 +325,12 @@ export const de_DisassociateGatewayFromServerCommand = async (output, context) =
329
325
  }
330
326
  const data = await parseBody(output.body, context);
331
327
  let contents = {};
332
- contents = de_DisassociateGatewayFromServerOutput(data, context);
328
+ contents = _json(data);
333
329
  const response = {
334
330
  $metadata: deserializeMetadata(output),
335
331
  ...contents,
336
332
  };
337
- return Promise.resolve(response);
333
+ return response;
338
334
  };
339
335
  const de_DisassociateGatewayFromServerCommandError = async (output, context) => {
340
336
  const parsedOutput = {
@@ -360,10 +356,9 @@ const de_DisassociateGatewayFromServerCommandError = async (output, context) =>
360
356
  throw await de_ValidationExceptionRes(parsedOutput, context);
361
357
  default:
362
358
  const parsedBody = parsedOutput.body;
363
- throwDefaultError({
359
+ return throwDefaultError({
364
360
  output,
365
361
  parsedBody,
366
- exceptionCtor: __BaseException,
367
362
  errorCode,
368
363
  });
369
364
  }
@@ -374,12 +369,12 @@ export const de_GetBandwidthRateLimitScheduleCommand = async (output, context) =
374
369
  }
375
370
  const data = await parseBody(output.body, context);
376
371
  let contents = {};
377
- contents = de_GetBandwidthRateLimitScheduleOutput(data, context);
372
+ contents = _json(data);
378
373
  const response = {
379
374
  $metadata: deserializeMetadata(output),
380
375
  ...contents,
381
376
  };
382
- return Promise.resolve(response);
377
+ return response;
383
378
  };
384
379
  const de_GetBandwidthRateLimitScheduleCommandError = async (output, context) => {
385
380
  const parsedOutput = {
@@ -402,10 +397,9 @@ const de_GetBandwidthRateLimitScheduleCommandError = async (output, context) =>
402
397
  throw await de_ValidationExceptionRes(parsedOutput, context);
403
398
  default:
404
399
  const parsedBody = parsedOutput.body;
405
- throwDefaultError({
400
+ return throwDefaultError({
406
401
  output,
407
402
  parsedBody,
408
- exceptionCtor: __BaseException,
409
403
  errorCode,
410
404
  });
411
405
  }
@@ -421,7 +415,7 @@ export const de_GetGatewayCommand = async (output, context) => {
421
415
  $metadata: deserializeMetadata(output),
422
416
  ...contents,
423
417
  };
424
- return Promise.resolve(response);
418
+ return response;
425
419
  };
426
420
  const de_GetGatewayCommandError = async (output, context) => {
427
421
  const parsedOutput = {
@@ -444,10 +438,9 @@ const de_GetGatewayCommandError = async (output, context) => {
444
438
  throw await de_ValidationExceptionRes(parsedOutput, context);
445
439
  default:
446
440
  const parsedBody = parsedOutput.body;
447
- throwDefaultError({
441
+ return throwDefaultError({
448
442
  output,
449
443
  parsedBody,
450
- exceptionCtor: __BaseException,
451
444
  errorCode,
452
445
  });
453
446
  }
@@ -463,7 +456,7 @@ export const de_GetHypervisorCommand = async (output, context) => {
463
456
  $metadata: deserializeMetadata(output),
464
457
  ...contents,
465
458
  };
466
- return Promise.resolve(response);
459
+ return response;
467
460
  };
468
461
  const de_GetHypervisorCommandError = async (output, context) => {
469
462
  const parsedOutput = {
@@ -486,10 +479,9 @@ const de_GetHypervisorCommandError = async (output, context) => {
486
479
  throw await de_ValidationExceptionRes(parsedOutput, context);
487
480
  default:
488
481
  const parsedBody = parsedOutput.body;
489
- throwDefaultError({
482
+ return throwDefaultError({
490
483
  output,
491
484
  parsedBody,
492
- exceptionCtor: __BaseException,
493
485
  errorCode,
494
486
  });
495
487
  }
@@ -500,12 +492,12 @@ export const de_GetHypervisorPropertyMappingsCommand = async (output, context) =
500
492
  }
501
493
  const data = await parseBody(output.body, context);
502
494
  let contents = {};
503
- contents = de_GetHypervisorPropertyMappingsOutput(data, context);
495
+ contents = _json(data);
504
496
  const response = {
505
497
  $metadata: deserializeMetadata(output),
506
498
  ...contents,
507
499
  };
508
- return Promise.resolve(response);
500
+ return response;
509
501
  };
510
502
  const de_GetHypervisorPropertyMappingsCommandError = async (output, context) => {
511
503
  const parsedOutput = {
@@ -528,10 +520,9 @@ const de_GetHypervisorPropertyMappingsCommandError = async (output, context) =>
528
520
  throw await de_ValidationExceptionRes(parsedOutput, context);
529
521
  default:
530
522
  const parsedBody = parsedOutput.body;
531
- throwDefaultError({
523
+ return throwDefaultError({
532
524
  output,
533
525
  parsedBody,
534
- exceptionCtor: __BaseException,
535
526
  errorCode,
536
527
  });
537
528
  }
@@ -547,7 +538,7 @@ export const de_GetVirtualMachineCommand = async (output, context) => {
547
538
  $metadata: deserializeMetadata(output),
548
539
  ...contents,
549
540
  };
550
- return Promise.resolve(response);
541
+ return response;
551
542
  };
552
543
  const de_GetVirtualMachineCommandError = async (output, context) => {
553
544
  const parsedOutput = {
@@ -570,10 +561,9 @@ const de_GetVirtualMachineCommandError = async (output, context) => {
570
561
  throw await de_ValidationExceptionRes(parsedOutput, context);
571
562
  default:
572
563
  const parsedBody = parsedOutput.body;
573
- throwDefaultError({
564
+ return throwDefaultError({
574
565
  output,
575
566
  parsedBody,
576
- exceptionCtor: __BaseException,
577
567
  errorCode,
578
568
  });
579
569
  }
@@ -584,12 +574,12 @@ export const de_ImportHypervisorConfigurationCommand = async (output, context) =
584
574
  }
585
575
  const data = await parseBody(output.body, context);
586
576
  let contents = {};
587
- contents = de_ImportHypervisorConfigurationOutput(data, context);
577
+ contents = _json(data);
588
578
  const response = {
589
579
  $metadata: deserializeMetadata(output),
590
580
  ...contents,
591
581
  };
592
- return Promise.resolve(response);
582
+ return response;
593
583
  };
594
584
  const de_ImportHypervisorConfigurationCommandError = async (output, context) => {
595
585
  const parsedOutput = {
@@ -615,10 +605,9 @@ const de_ImportHypervisorConfigurationCommandError = async (output, context) =>
615
605
  throw await de_ValidationExceptionRes(parsedOutput, context);
616
606
  default:
617
607
  const parsedBody = parsedOutput.body;
618
- throwDefaultError({
608
+ return throwDefaultError({
619
609
  output,
620
610
  parsedBody,
621
- exceptionCtor: __BaseException,
622
611
  errorCode,
623
612
  });
624
613
  }
@@ -634,7 +623,7 @@ export const de_ListGatewaysCommand = async (output, context) => {
634
623
  $metadata: deserializeMetadata(output),
635
624
  ...contents,
636
625
  };
637
- return Promise.resolve(response);
626
+ return response;
638
627
  };
639
628
  const de_ListGatewaysCommandError = async (output, context) => {
640
629
  const parsedOutput = {
@@ -654,10 +643,9 @@ const de_ListGatewaysCommandError = async (output, context) => {
654
643
  throw await de_ValidationExceptionRes(parsedOutput, context);
655
644
  default:
656
645
  const parsedBody = parsedOutput.body;
657
- throwDefaultError({
646
+ return throwDefaultError({
658
647
  output,
659
648
  parsedBody,
660
- exceptionCtor: __BaseException,
661
649
  errorCode,
662
650
  });
663
651
  }
@@ -668,12 +656,12 @@ export const de_ListHypervisorsCommand = async (output, context) => {
668
656
  }
669
657
  const data = await parseBody(output.body, context);
670
658
  let contents = {};
671
- contents = de_ListHypervisorsOutput(data, context);
659
+ contents = _json(data);
672
660
  const response = {
673
661
  $metadata: deserializeMetadata(output),
674
662
  ...contents,
675
663
  };
676
- return Promise.resolve(response);
664
+ return response;
677
665
  };
678
666
  const de_ListHypervisorsCommandError = async (output, context) => {
679
667
  const parsedOutput = {
@@ -693,10 +681,9 @@ const de_ListHypervisorsCommandError = async (output, context) => {
693
681
  throw await de_ValidationExceptionRes(parsedOutput, context);
694
682
  default:
695
683
  const parsedBody = parsedOutput.body;
696
- throwDefaultError({
684
+ return throwDefaultError({
697
685
  output,
698
686
  parsedBody,
699
- exceptionCtor: __BaseException,
700
687
  errorCode,
701
688
  });
702
689
  }
@@ -707,12 +694,12 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
707
694
  }
708
695
  const data = await parseBody(output.body, context);
709
696
  let contents = {};
710
- contents = de_ListTagsForResourceOutput(data, context);
697
+ contents = _json(data);
711
698
  const response = {
712
699
  $metadata: deserializeMetadata(output),
713
700
  ...contents,
714
701
  };
715
- return Promise.resolve(response);
702
+ return response;
716
703
  };
717
704
  const de_ListTagsForResourceCommandError = async (output, context) => {
718
705
  const parsedOutput = {
@@ -735,10 +722,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
735
722
  throw await de_ValidationExceptionRes(parsedOutput, context);
736
723
  default:
737
724
  const parsedBody = parsedOutput.body;
738
- throwDefaultError({
725
+ return throwDefaultError({
739
726
  output,
740
727
  parsedBody,
741
- exceptionCtor: __BaseException,
742
728
  errorCode,
743
729
  });
744
730
  }
@@ -754,7 +740,7 @@ export const de_ListVirtualMachinesCommand = async (output, context) => {
754
740
  $metadata: deserializeMetadata(output),
755
741
  ...contents,
756
742
  };
757
- return Promise.resolve(response);
743
+ return response;
758
744
  };
759
745
  const de_ListVirtualMachinesCommandError = async (output, context) => {
760
746
  const parsedOutput = {
@@ -774,10 +760,9 @@ const de_ListVirtualMachinesCommandError = async (output, context) => {
774
760
  throw await de_ValidationExceptionRes(parsedOutput, context);
775
761
  default:
776
762
  const parsedBody = parsedOutput.body;
777
- throwDefaultError({
763
+ return throwDefaultError({
778
764
  output,
779
765
  parsedBody,
780
- exceptionCtor: __BaseException,
781
766
  errorCode,
782
767
  });
783
768
  }
@@ -788,12 +773,12 @@ export const de_PutBandwidthRateLimitScheduleCommand = async (output, context) =
788
773
  }
789
774
  const data = await parseBody(output.body, context);
790
775
  let contents = {};
791
- contents = de_PutBandwidthRateLimitScheduleOutput(data, context);
776
+ contents = _json(data);
792
777
  const response = {
793
778
  $metadata: deserializeMetadata(output),
794
779
  ...contents,
795
780
  };
796
- return Promise.resolve(response);
781
+ return response;
797
782
  };
798
783
  const de_PutBandwidthRateLimitScheduleCommandError = async (output, context) => {
799
784
  const parsedOutput = {
@@ -816,10 +801,9 @@ const de_PutBandwidthRateLimitScheduleCommandError = async (output, context) =>
816
801
  throw await de_ValidationExceptionRes(parsedOutput, context);
817
802
  default:
818
803
  const parsedBody = parsedOutput.body;
819
- throwDefaultError({
804
+ return throwDefaultError({
820
805
  output,
821
806
  parsedBody,
822
- exceptionCtor: __BaseException,
823
807
  errorCode,
824
808
  });
825
809
  }
@@ -830,12 +814,12 @@ export const de_PutHypervisorPropertyMappingsCommand = async (output, context) =
830
814
  }
831
815
  const data = await parseBody(output.body, context);
832
816
  let contents = {};
833
- contents = de_PutHypervisorPropertyMappingsOutput(data, context);
817
+ contents = _json(data);
834
818
  const response = {
835
819
  $metadata: deserializeMetadata(output),
836
820
  ...contents,
837
821
  };
838
- return Promise.resolve(response);
822
+ return response;
839
823
  };
840
824
  const de_PutHypervisorPropertyMappingsCommandError = async (output, context) => {
841
825
  const parsedOutput = {
@@ -864,10 +848,9 @@ const de_PutHypervisorPropertyMappingsCommandError = async (output, context) =>
864
848
  throw await de_ValidationExceptionRes(parsedOutput, context);
865
849
  default:
866
850
  const parsedBody = parsedOutput.body;
867
- throwDefaultError({
851
+ return throwDefaultError({
868
852
  output,
869
853
  parsedBody,
870
- exceptionCtor: __BaseException,
871
854
  errorCode,
872
855
  });
873
856
  }
@@ -878,12 +861,12 @@ export const de_PutMaintenanceStartTimeCommand = async (output, context) => {
878
861
  }
879
862
  const data = await parseBody(output.body, context);
880
863
  let contents = {};
881
- contents = de_PutMaintenanceStartTimeOutput(data, context);
864
+ contents = _json(data);
882
865
  const response = {
883
866
  $metadata: deserializeMetadata(output),
884
867
  ...contents,
885
868
  };
886
- return Promise.resolve(response);
869
+ return response;
887
870
  };
888
871
  const de_PutMaintenanceStartTimeCommandError = async (output, context) => {
889
872
  const parsedOutput = {
@@ -909,10 +892,9 @@ const de_PutMaintenanceStartTimeCommandError = async (output, context) => {
909
892
  throw await de_ValidationExceptionRes(parsedOutput, context);
910
893
  default:
911
894
  const parsedBody = parsedOutput.body;
912
- throwDefaultError({
895
+ return throwDefaultError({
913
896
  output,
914
897
  parsedBody,
915
- exceptionCtor: __BaseException,
916
898
  errorCode,
917
899
  });
918
900
  }
@@ -923,12 +905,12 @@ export const de_StartVirtualMachinesMetadataSyncCommand = async (output, context
923
905
  }
924
906
  const data = await parseBody(output.body, context);
925
907
  let contents = {};
926
- contents = de_StartVirtualMachinesMetadataSyncOutput(data, context);
908
+ contents = _json(data);
927
909
  const response = {
928
910
  $metadata: deserializeMetadata(output),
929
911
  ...contents,
930
912
  };
931
- return Promise.resolve(response);
913
+ return response;
932
914
  };
933
915
  const de_StartVirtualMachinesMetadataSyncCommandError = async (output, context) => {
934
916
  const parsedOutput = {
@@ -954,10 +936,9 @@ const de_StartVirtualMachinesMetadataSyncCommandError = async (output, context)
954
936
  throw await de_ValidationExceptionRes(parsedOutput, context);
955
937
  default:
956
938
  const parsedBody = parsedOutput.body;
957
- throwDefaultError({
939
+ return throwDefaultError({
958
940
  output,
959
941
  parsedBody,
960
- exceptionCtor: __BaseException,
961
942
  errorCode,
962
943
  });
963
944
  }
@@ -968,12 +949,12 @@ export const de_TagResourceCommand = async (output, context) => {
968
949
  }
969
950
  const data = await parseBody(output.body, context);
970
951
  let contents = {};
971
- contents = de_TagResourceOutput(data, context);
952
+ contents = _json(data);
972
953
  const response = {
973
954
  $metadata: deserializeMetadata(output),
974
955
  ...contents,
975
956
  };
976
- return Promise.resolve(response);
957
+ return response;
977
958
  };
978
959
  const de_TagResourceCommandError = async (output, context) => {
979
960
  const parsedOutput = {
@@ -996,10 +977,9 @@ const de_TagResourceCommandError = async (output, context) => {
996
977
  throw await de_ValidationExceptionRes(parsedOutput, context);
997
978
  default:
998
979
  const parsedBody = parsedOutput.body;
999
- throwDefaultError({
980
+ return throwDefaultError({
1000
981
  output,
1001
982
  parsedBody,
1002
- exceptionCtor: __BaseException,
1003
983
  errorCode,
1004
984
  });
1005
985
  }
@@ -1010,12 +990,12 @@ export const de_TestHypervisorConfigurationCommand = async (output, context) =>
1010
990
  }
1011
991
  const data = await parseBody(output.body, context);
1012
992
  let contents = {};
1013
- contents = de_TestHypervisorConfigurationOutput(data, context);
993
+ contents = _json(data);
1014
994
  const response = {
1015
995
  $metadata: deserializeMetadata(output),
1016
996
  ...contents,
1017
997
  };
1018
- return Promise.resolve(response);
998
+ return response;
1019
999
  };
1020
1000
  const de_TestHypervisorConfigurationCommandError = async (output, context) => {
1021
1001
  const parsedOutput = {
@@ -1041,10 +1021,9 @@ const de_TestHypervisorConfigurationCommandError = async (output, context) => {
1041
1021
  throw await de_ValidationExceptionRes(parsedOutput, context);
1042
1022
  default:
1043
1023
  const parsedBody = parsedOutput.body;
1044
- throwDefaultError({
1024
+ return throwDefaultError({
1045
1025
  output,
1046
1026
  parsedBody,
1047
- exceptionCtor: __BaseException,
1048
1027
  errorCode,
1049
1028
  });
1050
1029
  }
@@ -1055,12 +1034,12 @@ export const de_UntagResourceCommand = async (output, context) => {
1055
1034
  }
1056
1035
  const data = await parseBody(output.body, context);
1057
1036
  let contents = {};
1058
- contents = de_UntagResourceOutput(data, context);
1037
+ contents = _json(data);
1059
1038
  const response = {
1060
1039
  $metadata: deserializeMetadata(output),
1061
1040
  ...contents,
1062
1041
  };
1063
- return Promise.resolve(response);
1042
+ return response;
1064
1043
  };
1065
1044
  const de_UntagResourceCommandError = async (output, context) => {
1066
1045
  const parsedOutput = {
@@ -1083,10 +1062,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1083
1062
  throw await de_ValidationExceptionRes(parsedOutput, context);
1084
1063
  default:
1085
1064
  const parsedBody = parsedOutput.body;
1086
- throwDefaultError({
1065
+ return throwDefaultError({
1087
1066
  output,
1088
1067
  parsedBody,
1089
- exceptionCtor: __BaseException,
1090
1068
  errorCode,
1091
1069
  });
1092
1070
  }
@@ -1097,12 +1075,12 @@ export const de_UpdateGatewayInformationCommand = async (output, context) => {
1097
1075
  }
1098
1076
  const data = await parseBody(output.body, context);
1099
1077
  let contents = {};
1100
- contents = de_UpdateGatewayInformationOutput(data, context);
1078
+ contents = _json(data);
1101
1079
  const response = {
1102
1080
  $metadata: deserializeMetadata(output),
1103
1081
  ...contents,
1104
1082
  };
1105
- return Promise.resolve(response);
1083
+ return response;
1106
1084
  };
1107
1085
  const de_UpdateGatewayInformationCommandError = async (output, context) => {
1108
1086
  const parsedOutput = {
@@ -1128,10 +1106,9 @@ const de_UpdateGatewayInformationCommandError = async (output, context) => {
1128
1106
  throw await de_ValidationExceptionRes(parsedOutput, context);
1129
1107
  default:
1130
1108
  const parsedBody = parsedOutput.body;
1131
- throwDefaultError({
1109
+ return throwDefaultError({
1132
1110
  output,
1133
1111
  parsedBody,
1134
- exceptionCtor: __BaseException,
1135
1112
  errorCode,
1136
1113
  });
1137
1114
  }
@@ -1142,12 +1119,12 @@ export const de_UpdateGatewaySoftwareNowCommand = async (output, context) => {
1142
1119
  }
1143
1120
  const data = await parseBody(output.body, context);
1144
1121
  let contents = {};
1145
- contents = de_UpdateGatewaySoftwareNowOutput(data, context);
1122
+ contents = _json(data);
1146
1123
  const response = {
1147
1124
  $metadata: deserializeMetadata(output),
1148
1125
  ...contents,
1149
1126
  };
1150
- return Promise.resolve(response);
1127
+ return response;
1151
1128
  };
1152
1129
  const de_UpdateGatewaySoftwareNowCommandError = async (output, context) => {
1153
1130
  const parsedOutput = {
@@ -1170,10 +1147,9 @@ const de_UpdateGatewaySoftwareNowCommandError = async (output, context) => {
1170
1147
  throw await de_ValidationExceptionRes(parsedOutput, context);
1171
1148
  default:
1172
1149
  const parsedBody = parsedOutput.body;
1173
- throwDefaultError({
1150
+ return throwDefaultError({
1174
1151
  output,
1175
1152
  parsedBody,
1176
- exceptionCtor: __BaseException,
1177
1153
  errorCode,
1178
1154
  });
1179
1155
  }
@@ -1184,12 +1160,12 @@ export const de_UpdateHypervisorCommand = async (output, context) => {
1184
1160
  }
1185
1161
  const data = await parseBody(output.body, context);
1186
1162
  let contents = {};
1187
- contents = de_UpdateHypervisorOutput(data, context);
1163
+ contents = _json(data);
1188
1164
  const response = {
1189
1165
  $metadata: deserializeMetadata(output),
1190
1166
  ...contents,
1191
1167
  };
1192
- return Promise.resolve(response);
1168
+ return response;
1193
1169
  };
1194
1170
  const de_UpdateHypervisorCommandError = async (output, context) => {
1195
1171
  const parsedOutput = {
@@ -1218,17 +1194,16 @@ const de_UpdateHypervisorCommandError = async (output, context) => {
1218
1194
  throw await de_ValidationExceptionRes(parsedOutput, context);
1219
1195
  default:
1220
1196
  const parsedBody = parsedOutput.body;
1221
- throwDefaultError({
1197
+ return throwDefaultError({
1222
1198
  output,
1223
1199
  parsedBody,
1224
- exceptionCtor: __BaseException,
1225
1200
  errorCode,
1226
1201
  });
1227
1202
  }
1228
1203
  };
1229
1204
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1230
1205
  const body = parsedOutput.body;
1231
- const deserialized = de_AccessDeniedException(body, context);
1206
+ const deserialized = _json(body);
1232
1207
  const exception = new AccessDeniedException({
1233
1208
  $metadata: deserializeMetadata(parsedOutput),
1234
1209
  ...deserialized,
@@ -1237,7 +1212,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1237
1212
  };
1238
1213
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1239
1214
  const body = parsedOutput.body;
1240
- const deserialized = de_ConflictException(body, context);
1215
+ const deserialized = _json(body);
1241
1216
  const exception = new ConflictException({
1242
1217
  $metadata: deserializeMetadata(parsedOutput),
1243
1218
  ...deserialized,
@@ -1246,7 +1221,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1246
1221
  };
1247
1222
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1248
1223
  const body = parsedOutput.body;
1249
- const deserialized = de_InternalServerException(body, context);
1224
+ const deserialized = _json(body);
1250
1225
  const exception = new InternalServerException({
1251
1226
  $metadata: deserializeMetadata(parsedOutput),
1252
1227
  ...deserialized,
@@ -1255,7 +1230,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1255
1230
  };
1256
1231
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1257
1232
  const body = parsedOutput.body;
1258
- const deserialized = de_ResourceNotFoundException(body, context);
1233
+ const deserialized = _json(body);
1259
1234
  const exception = new ResourceNotFoundException({
1260
1235
  $metadata: deserializeMetadata(parsedOutput),
1261
1236
  ...deserialized,
@@ -1264,7 +1239,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1264
1239
  };
1265
1240
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1266
1241
  const body = parsedOutput.body;
1267
- const deserialized = de_ThrottlingException(body, context);
1242
+ const deserialized = _json(body);
1268
1243
  const exception = new ThrottlingException({
1269
1244
  $metadata: deserializeMetadata(parsedOutput),
1270
1245
  ...deserialized,
@@ -1273,607 +1248,111 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1273
1248
  };
1274
1249
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1275
1250
  const body = parsedOutput.body;
1276
- const deserialized = de_ValidationException(body, context);
1251
+ const deserialized = _json(body);
1277
1252
  const exception = new ValidationException({
1278
1253
  $metadata: deserializeMetadata(parsedOutput),
1279
1254
  ...deserialized,
1280
1255
  });
1281
1256
  return __decorateServiceException(exception, body);
1282
1257
  };
1283
- const se_AssociateGatewayToServerInput = (input, context) => {
1284
- return {
1285
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1286
- ...(input.ServerArn != null && { ServerArn: input.ServerArn }),
1287
- };
1288
- };
1289
- const se_BandwidthRateLimitInterval = (input, context) => {
1290
- return {
1291
- ...(input.AverageUploadRateLimitInBitsPerSec != null && {
1292
- AverageUploadRateLimitInBitsPerSec: input.AverageUploadRateLimitInBitsPerSec,
1293
- }),
1294
- ...(input.DaysOfWeek != null && { DaysOfWeek: se_DaysOfWeek(input.DaysOfWeek, context) }),
1295
- ...(input.EndHourOfDay != null && { EndHourOfDay: input.EndHourOfDay }),
1296
- ...(input.EndMinuteOfHour != null && { EndMinuteOfHour: input.EndMinuteOfHour }),
1297
- ...(input.StartHourOfDay != null && { StartHourOfDay: input.StartHourOfDay }),
1298
- ...(input.StartMinuteOfHour != null && { StartMinuteOfHour: input.StartMinuteOfHour }),
1299
- };
1300
- };
1301
- const se_BandwidthRateLimitIntervals = (input, context) => {
1302
- return input
1303
- .filter((e) => e != null)
1304
- .map((entry) => {
1305
- return se_BandwidthRateLimitInterval(entry, context);
1306
- });
1307
- };
1308
- const se_CreateGatewayInput = (input, context) => {
1309
- return {
1310
- ...(input.ActivationKey != null && { ActivationKey: input.ActivationKey }),
1311
- ...(input.GatewayDisplayName != null && { GatewayDisplayName: input.GatewayDisplayName }),
1312
- ...(input.GatewayType != null && { GatewayType: input.GatewayType }),
1313
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
1314
- };
1315
- };
1316
- const se_DaysOfWeek = (input, context) => {
1317
- return input
1318
- .filter((e) => e != null)
1319
- .map((entry) => {
1320
- return entry;
1321
- });
1322
- };
1323
- const se_DeleteGatewayInput = (input, context) => {
1324
- return {
1325
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1326
- };
1327
- };
1328
- const se_DeleteHypervisorInput = (input, context) => {
1329
- return {
1330
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1331
- };
1332
- };
1333
- const se_DisassociateGatewayFromServerInput = (input, context) => {
1334
- return {
1335
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1336
- };
1337
- };
1338
- const se_GetBandwidthRateLimitScheduleInput = (input, context) => {
1339
- return {
1340
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1341
- };
1342
- };
1343
- const se_GetGatewayInput = (input, context) => {
1344
- return {
1345
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1346
- };
1347
- };
1348
- const se_GetHypervisorInput = (input, context) => {
1349
- return {
1350
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1351
- };
1352
- };
1353
- const se_GetHypervisorPropertyMappingsInput = (input, context) => {
1354
- return {
1355
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1356
- };
1357
- };
1358
- const se_GetVirtualMachineInput = (input, context) => {
1359
- return {
1360
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1361
- };
1362
- };
1363
- const se_ImportHypervisorConfigurationInput = (input, context) => {
1364
- return {
1365
- ...(input.Host != null && { Host: input.Host }),
1366
- ...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
1367
- ...(input.Name != null && { Name: input.Name }),
1368
- ...(input.Password != null && { Password: input.Password }),
1369
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
1370
- ...(input.Username != null && { Username: input.Username }),
1371
- };
1372
- };
1373
- const se_ListGatewaysInput = (input, context) => {
1374
- return {
1375
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1376
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1377
- };
1378
- };
1379
- const se_ListHypervisorsInput = (input, context) => {
1380
- return {
1381
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1382
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1383
- };
1384
- };
1385
- const se_ListTagsForResourceInput = (input, context) => {
1386
- return {
1387
- ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
1388
- };
1389
- };
1390
- const se_ListVirtualMachinesInput = (input, context) => {
1391
- return {
1392
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1393
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1394
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1395
- };
1396
- };
1397
- const se_PutBandwidthRateLimitScheduleInput = (input, context) => {
1398
- return {
1399
- ...(input.BandwidthRateLimitIntervals != null && {
1400
- BandwidthRateLimitIntervals: se_BandwidthRateLimitIntervals(input.BandwidthRateLimitIntervals, context),
1401
- }),
1402
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1403
- };
1404
- };
1405
- const se_PutHypervisorPropertyMappingsInput = (input, context) => {
1406
- return {
1407
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1408
- ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
1409
- ...(input.VmwareToAwsTagMappings != null && {
1410
- VmwareToAwsTagMappings: se_VmwareToAwsTagMappings(input.VmwareToAwsTagMappings, context),
1411
- }),
1412
- };
1413
- };
1414
- const se_PutMaintenanceStartTimeInput = (input, context) => {
1415
- return {
1416
- ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }),
1417
- ...(input.DayOfWeek != null && { DayOfWeek: input.DayOfWeek }),
1418
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1419
- ...(input.HourOfDay != null && { HourOfDay: input.HourOfDay }),
1420
- ...(input.MinuteOfHour != null && { MinuteOfHour: input.MinuteOfHour }),
1421
- };
1422
- };
1423
- const se_StartVirtualMachinesMetadataSyncInput = (input, context) => {
1424
- return {
1425
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1426
- };
1427
- };
1428
- const se_Tag = (input, context) => {
1429
- return {
1430
- ...(input.Key != null && { Key: input.Key }),
1431
- ...(input.Value != null && { Value: input.Value }),
1432
- };
1433
- };
1434
- const se_TagKeys = (input, context) => {
1435
- return input
1436
- .filter((e) => e != null)
1437
- .map((entry) => {
1438
- return entry;
1439
- });
1440
- };
1441
- const se_TagResourceInput = (input, context) => {
1442
- return {
1443
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1444
- ...(input.Tags != null && { Tags: se_Tags(input.Tags, context) }),
1445
- };
1446
- };
1447
- const se_Tags = (input, context) => {
1448
- return input
1449
- .filter((e) => e != null)
1450
- .map((entry) => {
1451
- return se_Tag(entry, context);
1452
- });
1453
- };
1454
- const se_TestHypervisorConfigurationInput = (input, context) => {
1455
- return {
1456
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1457
- ...(input.Host != null && { Host: input.Host }),
1458
- ...(input.Password != null && { Password: input.Password }),
1459
- ...(input.Username != null && { Username: input.Username }),
1460
- };
1461
- };
1462
- const se_UntagResourceInput = (input, context) => {
1463
- return {
1464
- ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }),
1465
- ...(input.TagKeys != null && { TagKeys: se_TagKeys(input.TagKeys, context) }),
1466
- };
1467
- };
1468
- const se_UpdateGatewayInformationInput = (input, context) => {
1469
- return {
1470
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1471
- ...(input.GatewayDisplayName != null && { GatewayDisplayName: input.GatewayDisplayName }),
1472
- };
1473
- };
1474
- const se_UpdateGatewaySoftwareNowInput = (input, context) => {
1475
- return {
1476
- ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1477
- };
1478
- };
1479
- const se_UpdateHypervisorInput = (input, context) => {
1480
- return {
1481
- ...(input.Host != null && { Host: input.Host }),
1482
- ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1483
- ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }),
1484
- ...(input.Name != null && { Name: input.Name }),
1485
- ...(input.Password != null && { Password: input.Password }),
1486
- ...(input.Username != null && { Username: input.Username }),
1487
- };
1488
- };
1489
- const se_VmwareToAwsTagMapping = (input, context) => {
1490
- return {
1491
- ...(input.AwsTagKey != null && { AwsTagKey: input.AwsTagKey }),
1492
- ...(input.AwsTagValue != null && { AwsTagValue: input.AwsTagValue }),
1493
- ...(input.VmwareCategory != null && { VmwareCategory: input.VmwareCategory }),
1494
- ...(input.VmwareTagName != null && { VmwareTagName: input.VmwareTagName }),
1495
- };
1496
- };
1497
- const se_VmwareToAwsTagMappings = (input, context) => {
1498
- return input
1499
- .filter((e) => e != null)
1500
- .map((entry) => {
1501
- return se_VmwareToAwsTagMapping(entry, context);
1502
- });
1503
- };
1504
- const de_AccessDeniedException = (output, context) => {
1505
- return {
1506
- ErrorCode: __expectString(output.ErrorCode),
1507
- Message: __expectString(output.Message),
1508
- };
1509
- };
1510
- const de_AssociateGatewayToServerOutput = (output, context) => {
1511
- return {
1512
- GatewayArn: __expectString(output.GatewayArn),
1513
- };
1514
- };
1515
- const de_BandwidthRateLimitInterval = (output, context) => {
1516
- return {
1517
- AverageUploadRateLimitInBitsPerSec: __expectLong(output.AverageUploadRateLimitInBitsPerSec),
1518
- DaysOfWeek: output.DaysOfWeek != null ? de_DaysOfWeek(output.DaysOfWeek, context) : undefined,
1519
- EndHourOfDay: __expectInt32(output.EndHourOfDay),
1520
- EndMinuteOfHour: __expectInt32(output.EndMinuteOfHour),
1521
- StartHourOfDay: __expectInt32(output.StartHourOfDay),
1522
- StartMinuteOfHour: __expectInt32(output.StartMinuteOfHour),
1523
- };
1524
- };
1525
- const de_BandwidthRateLimitIntervals = (output, context) => {
1526
- const retVal = (output || [])
1527
- .filter((e) => e != null)
1528
- .map((entry) => {
1529
- if (entry === null) {
1530
- return null;
1531
- }
1532
- return de_BandwidthRateLimitInterval(entry, context);
1533
- });
1534
- return retVal;
1535
- };
1536
- const de_ConflictException = (output, context) => {
1537
- return {
1538
- ErrorCode: __expectString(output.ErrorCode),
1539
- Message: __expectString(output.Message),
1540
- };
1541
- };
1542
- const de_CreateGatewayOutput = (output, context) => {
1543
- return {
1544
- GatewayArn: __expectString(output.GatewayArn),
1545
- };
1546
- };
1547
- const de_DaysOfWeek = (output, context) => {
1548
- const retVal = (output || [])
1549
- .filter((e) => e != null)
1550
- .map((entry) => {
1551
- if (entry === null) {
1552
- return null;
1553
- }
1554
- return __expectInt32(entry);
1555
- });
1556
- return retVal;
1557
- };
1558
- const de_DeleteGatewayOutput = (output, context) => {
1559
- return {
1560
- GatewayArn: __expectString(output.GatewayArn),
1561
- };
1562
- };
1563
- const de_DeleteHypervisorOutput = (output, context) => {
1564
- return {
1565
- HypervisorArn: __expectString(output.HypervisorArn),
1566
- };
1567
- };
1568
- const de_DisassociateGatewayFromServerOutput = (output, context) => {
1569
- return {
1570
- GatewayArn: __expectString(output.GatewayArn),
1571
- };
1572
- };
1573
1258
  const de_Gateway = (output, context) => {
1574
- return {
1575
- GatewayArn: __expectString(output.GatewayArn),
1576
- GatewayDisplayName: __expectString(output.GatewayDisplayName),
1577
- GatewayType: __expectString(output.GatewayType),
1578
- HypervisorId: __expectString(output.HypervisorId),
1579
- LastSeenTime: output.LastSeenTime != null
1580
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenTime)))
1581
- : undefined,
1582
- };
1259
+ return take(output, {
1260
+ GatewayArn: __expectString,
1261
+ GatewayDisplayName: __expectString,
1262
+ GatewayType: __expectString,
1263
+ HypervisorId: __expectString,
1264
+ LastSeenTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1265
+ });
1583
1266
  };
1584
1267
  const de_GatewayDetails = (output, context) => {
1585
- return {
1586
- GatewayArn: __expectString(output.GatewayArn),
1587
- GatewayDisplayName: __expectString(output.GatewayDisplayName),
1588
- GatewayType: __expectString(output.GatewayType),
1589
- HypervisorId: __expectString(output.HypervisorId),
1590
- LastSeenTime: output.LastSeenTime != null
1591
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSeenTime)))
1592
- : undefined,
1593
- MaintenanceStartTime: output.MaintenanceStartTime != null ? de_MaintenanceStartTime(output.MaintenanceStartTime, context) : undefined,
1594
- NextUpdateAvailabilityTime: output.NextUpdateAvailabilityTime != null
1595
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextUpdateAvailabilityTime)))
1596
- : undefined,
1597
- VpcEndpoint: __expectString(output.VpcEndpoint),
1598
- };
1268
+ return take(output, {
1269
+ GatewayArn: __expectString,
1270
+ GatewayDisplayName: __expectString,
1271
+ GatewayType: __expectString,
1272
+ HypervisorId: __expectString,
1273
+ LastSeenTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1274
+ MaintenanceStartTime: _json,
1275
+ NextUpdateAvailabilityTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1276
+ VpcEndpoint: __expectString,
1277
+ });
1599
1278
  };
1600
1279
  const de_Gateways = (output, context) => {
1601
1280
  const retVal = (output || [])
1602
1281
  .filter((e) => e != null)
1603
1282
  .map((entry) => {
1604
- if (entry === null) {
1605
- return null;
1606
- }
1607
1283
  return de_Gateway(entry, context);
1608
1284
  });
1609
1285
  return retVal;
1610
1286
  };
1611
- const de_GetBandwidthRateLimitScheduleOutput = (output, context) => {
1612
- return {
1613
- BandwidthRateLimitIntervals: output.BandwidthRateLimitIntervals != null
1614
- ? de_BandwidthRateLimitIntervals(output.BandwidthRateLimitIntervals, context)
1615
- : undefined,
1616
- GatewayArn: __expectString(output.GatewayArn),
1617
- };
1618
- };
1619
1287
  const de_GetGatewayOutput = (output, context) => {
1620
- return {
1621
- Gateway: output.Gateway != null ? de_GatewayDetails(output.Gateway, context) : undefined,
1622
- };
1288
+ return take(output, {
1289
+ Gateway: (_) => de_GatewayDetails(_, context),
1290
+ });
1623
1291
  };
1624
1292
  const de_GetHypervisorOutput = (output, context) => {
1625
- return {
1626
- Hypervisor: output.Hypervisor != null ? de_HypervisorDetails(output.Hypervisor, context) : undefined,
1627
- };
1628
- };
1629
- const de_GetHypervisorPropertyMappingsOutput = (output, context) => {
1630
- return {
1631
- HypervisorArn: __expectString(output.HypervisorArn),
1632
- IamRoleArn: __expectString(output.IamRoleArn),
1633
- VmwareToAwsTagMappings: output.VmwareToAwsTagMappings != null
1634
- ? de_VmwareToAwsTagMappings(output.VmwareToAwsTagMappings, context)
1635
- : undefined,
1636
- };
1293
+ return take(output, {
1294
+ Hypervisor: (_) => de_HypervisorDetails(_, context),
1295
+ });
1637
1296
  };
1638
1297
  const de_GetVirtualMachineOutput = (output, context) => {
1639
- return {
1640
- VirtualMachine: output.VirtualMachine != null ? de_VirtualMachineDetails(output.VirtualMachine, context) : undefined,
1641
- };
1642
- };
1643
- const de_Hypervisor = (output, context) => {
1644
- return {
1645
- Host: __expectString(output.Host),
1646
- HypervisorArn: __expectString(output.HypervisorArn),
1647
- KmsKeyArn: __expectString(output.KmsKeyArn),
1648
- Name: __expectString(output.Name),
1649
- State: __expectString(output.State),
1650
- };
1298
+ return take(output, {
1299
+ VirtualMachine: (_) => de_VirtualMachineDetails(_, context),
1300
+ });
1651
1301
  };
1652
1302
  const de_HypervisorDetails = (output, context) => {
1653
- return {
1654
- Host: __expectString(output.Host),
1655
- HypervisorArn: __expectString(output.HypervisorArn),
1656
- KmsKeyArn: __expectString(output.KmsKeyArn),
1657
- LastSuccessfulMetadataSyncTime: output.LastSuccessfulMetadataSyncTime != null
1658
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulMetadataSyncTime)))
1659
- : undefined,
1660
- LatestMetadataSyncStatus: __expectString(output.LatestMetadataSyncStatus),
1661
- LatestMetadataSyncStatusMessage: __expectString(output.LatestMetadataSyncStatusMessage),
1662
- LogGroupArn: __expectString(output.LogGroupArn),
1663
- Name: __expectString(output.Name),
1664
- State: __expectString(output.State),
1665
- };
1666
- };
1667
- const de_Hypervisors = (output, context) => {
1668
- const retVal = (output || [])
1669
- .filter((e) => e != null)
1670
- .map((entry) => {
1671
- if (entry === null) {
1672
- return null;
1673
- }
1674
- return de_Hypervisor(entry, context);
1303
+ return take(output, {
1304
+ Host: __expectString,
1305
+ HypervisorArn: __expectString,
1306
+ KmsKeyArn: __expectString,
1307
+ LastSuccessfulMetadataSyncTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1308
+ LatestMetadataSyncStatus: __expectString,
1309
+ LatestMetadataSyncStatusMessage: __expectString,
1310
+ LogGroupArn: __expectString,
1311
+ Name: __expectString,
1312
+ State: __expectString,
1675
1313
  });
1676
- return retVal;
1677
- };
1678
- const de_ImportHypervisorConfigurationOutput = (output, context) => {
1679
- return {
1680
- HypervisorArn: __expectString(output.HypervisorArn),
1681
- };
1682
- };
1683
- const de_InternalServerException = (output, context) => {
1684
- return {
1685
- ErrorCode: __expectString(output.ErrorCode),
1686
- Message: __expectString(output.Message),
1687
- };
1688
1314
  };
1689
1315
  const de_ListGatewaysOutput = (output, context) => {
1690
- return {
1691
- Gateways: output.Gateways != null ? de_Gateways(output.Gateways, context) : undefined,
1692
- NextToken: __expectString(output.NextToken),
1693
- };
1694
- };
1695
- const de_ListHypervisorsOutput = (output, context) => {
1696
- return {
1697
- Hypervisors: output.Hypervisors != null ? de_Hypervisors(output.Hypervisors, context) : undefined,
1698
- NextToken: __expectString(output.NextToken),
1699
- };
1700
- };
1701
- const de_ListTagsForResourceOutput = (output, context) => {
1702
- return {
1703
- ResourceArn: __expectString(output.ResourceArn),
1704
- Tags: output.Tags != null ? de_Tags(output.Tags, context) : undefined,
1705
- };
1316
+ return take(output, {
1317
+ Gateways: (_) => de_Gateways(_, context),
1318
+ NextToken: __expectString,
1319
+ });
1706
1320
  };
1707
1321
  const de_ListVirtualMachinesOutput = (output, context) => {
1708
- return {
1709
- NextToken: __expectString(output.NextToken),
1710
- VirtualMachines: output.VirtualMachines != null ? de_VirtualMachines(output.VirtualMachines, context) : undefined,
1711
- };
1712
- };
1713
- const de_MaintenanceStartTime = (output, context) => {
1714
- return {
1715
- DayOfMonth: __expectInt32(output.DayOfMonth),
1716
- DayOfWeek: __expectInt32(output.DayOfWeek),
1717
- HourOfDay: __expectInt32(output.HourOfDay),
1718
- MinuteOfHour: __expectInt32(output.MinuteOfHour),
1719
- };
1720
- };
1721
- const de_PutBandwidthRateLimitScheduleOutput = (output, context) => {
1722
- return {
1723
- GatewayArn: __expectString(output.GatewayArn),
1724
- };
1725
- };
1726
- const de_PutHypervisorPropertyMappingsOutput = (output, context) => {
1727
- return {
1728
- HypervisorArn: __expectString(output.HypervisorArn),
1729
- };
1730
- };
1731
- const de_PutMaintenanceStartTimeOutput = (output, context) => {
1732
- return {
1733
- GatewayArn: __expectString(output.GatewayArn),
1734
- };
1735
- };
1736
- const de_ResourceNotFoundException = (output, context) => {
1737
- return {
1738
- ErrorCode: __expectString(output.ErrorCode),
1739
- Message: __expectString(output.Message),
1740
- };
1741
- };
1742
- const de_StartVirtualMachinesMetadataSyncOutput = (output, context) => {
1743
- return {
1744
- HypervisorArn: __expectString(output.HypervisorArn),
1745
- };
1746
- };
1747
- const de_Tag = (output, context) => {
1748
- return {
1749
- Key: __expectString(output.Key),
1750
- Value: __expectString(output.Value),
1751
- };
1752
- };
1753
- const de_TagResourceOutput = (output, context) => {
1754
- return {
1755
- ResourceARN: __expectString(output.ResourceARN),
1756
- };
1757
- };
1758
- const de_Tags = (output, context) => {
1759
- const retVal = (output || [])
1760
- .filter((e) => e != null)
1761
- .map((entry) => {
1762
- if (entry === null) {
1763
- return null;
1764
- }
1765
- return de_Tag(entry, context);
1322
+ return take(output, {
1323
+ NextToken: __expectString,
1324
+ VirtualMachines: (_) => de_VirtualMachines(_, context),
1766
1325
  });
1767
- return retVal;
1768
- };
1769
- const de_TestHypervisorConfigurationOutput = (output, context) => {
1770
- return {};
1771
- };
1772
- const de_ThrottlingException = (output, context) => {
1773
- return {
1774
- ErrorCode: __expectString(output.ErrorCode),
1775
- Message: __expectString(output.Message),
1776
- };
1777
- };
1778
- const de_UntagResourceOutput = (output, context) => {
1779
- return {
1780
- ResourceARN: __expectString(output.ResourceARN),
1781
- };
1782
- };
1783
- const de_UpdateGatewayInformationOutput = (output, context) => {
1784
- return {
1785
- GatewayArn: __expectString(output.GatewayArn),
1786
- };
1787
- };
1788
- const de_UpdateGatewaySoftwareNowOutput = (output, context) => {
1789
- return {
1790
- GatewayArn: __expectString(output.GatewayArn),
1791
- };
1792
- };
1793
- const de_UpdateHypervisorOutput = (output, context) => {
1794
- return {
1795
- HypervisorArn: __expectString(output.HypervisorArn),
1796
- };
1797
- };
1798
- const de_ValidationException = (output, context) => {
1799
- return {
1800
- ErrorCode: __expectString(output.ErrorCode),
1801
- Message: __expectString(output.Message),
1802
- };
1803
1326
  };
1804
1327
  const de_VirtualMachine = (output, context) => {
1805
- return {
1806
- HostName: __expectString(output.HostName),
1807
- HypervisorId: __expectString(output.HypervisorId),
1808
- LastBackupDate: output.LastBackupDate != null
1809
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastBackupDate)))
1810
- : undefined,
1811
- Name: __expectString(output.Name),
1812
- Path: __expectString(output.Path),
1813
- ResourceArn: __expectString(output.ResourceArn),
1814
- };
1328
+ return take(output, {
1329
+ HostName: __expectString,
1330
+ HypervisorId: __expectString,
1331
+ LastBackupDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1332
+ Name: __expectString,
1333
+ Path: __expectString,
1334
+ ResourceArn: __expectString,
1335
+ });
1815
1336
  };
1816
1337
  const de_VirtualMachineDetails = (output, context) => {
1817
- return {
1818
- HostName: __expectString(output.HostName),
1819
- HypervisorId: __expectString(output.HypervisorId),
1820
- LastBackupDate: output.LastBackupDate != null
1821
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastBackupDate)))
1822
- : undefined,
1823
- Name: __expectString(output.Name),
1824
- Path: __expectString(output.Path),
1825
- ResourceArn: __expectString(output.ResourceArn),
1826
- VmwareTags: output.VmwareTags != null ? de_VmwareTags(output.VmwareTags, context) : undefined,
1827
- };
1338
+ return take(output, {
1339
+ HostName: __expectString,
1340
+ HypervisorId: __expectString,
1341
+ LastBackupDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1342
+ Name: __expectString,
1343
+ Path: __expectString,
1344
+ ResourceArn: __expectString,
1345
+ VmwareTags: _json,
1346
+ });
1828
1347
  };
1829
1348
  const de_VirtualMachines = (output, context) => {
1830
1349
  const retVal = (output || [])
1831
1350
  .filter((e) => e != null)
1832
1351
  .map((entry) => {
1833
- if (entry === null) {
1834
- return null;
1835
- }
1836
1352
  return de_VirtualMachine(entry, context);
1837
1353
  });
1838
1354
  return retVal;
1839
1355
  };
1840
- const de_VmwareTag = (output, context) => {
1841
- return {
1842
- VmwareCategory: __expectString(output.VmwareCategory),
1843
- VmwareTagDescription: __expectString(output.VmwareTagDescription),
1844
- VmwareTagName: __expectString(output.VmwareTagName),
1845
- };
1846
- };
1847
- const de_VmwareTags = (output, context) => {
1848
- const retVal = (output || [])
1849
- .filter((e) => e != null)
1850
- .map((entry) => {
1851
- if (entry === null) {
1852
- return null;
1853
- }
1854
- return de_VmwareTag(entry, context);
1855
- });
1856
- return retVal;
1857
- };
1858
- const de_VmwareToAwsTagMapping = (output, context) => {
1859
- return {
1860
- AwsTagKey: __expectString(output.AwsTagKey),
1861
- AwsTagValue: __expectString(output.AwsTagValue),
1862
- VmwareCategory: __expectString(output.VmwareCategory),
1863
- VmwareTagName: __expectString(output.VmwareTagName),
1864
- };
1865
- };
1866
- const de_VmwareToAwsTagMappings = (output, context) => {
1867
- const retVal = (output || [])
1868
- .filter((e) => e != null)
1869
- .map((entry) => {
1870
- if (entry === null) {
1871
- return null;
1872
- }
1873
- return de_VmwareToAwsTagMapping(entry, context);
1874
- });
1875
- return retVal;
1876
- };
1877
1356
  const deserializeMetadata = (output) => ({
1878
1357
  httpStatusCode: output.statusCode,
1879
1358
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1887,6 +1366,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1887
1366
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1888
1367
  };
1889
1368
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1369
+ const throwDefaultError = withBaseException(__BaseException);
1890
1370
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1891
1371
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1892
1372
  const contents = {