@aws-sdk/client-backup-gateway 3.231.0 → 3.232.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 (47) hide show
  1. package/dist-cjs/BackupGateway.js +90 -0
  2. package/dist-cjs/commands/GetBandwidthRateLimitScheduleCommand.js +46 -0
  3. package/dist-cjs/commands/GetHypervisorCommand.js +46 -0
  4. package/dist-cjs/commands/GetHypervisorPropertyMappingsCommand.js +46 -0
  5. package/dist-cjs/commands/PutBandwidthRateLimitScheduleCommand.js +46 -0
  6. package/dist-cjs/commands/PutHypervisorPropertyMappingsCommand.js +46 -0
  7. package/dist-cjs/commands/StartVirtualMachinesMetadataSyncCommand.js +46 -0
  8. package/dist-cjs/commands/index.js +6 -0
  9. package/dist-cjs/endpoint/ruleset.js +1 -10
  10. package/dist-cjs/models/models_0.js +78 -6
  11. package/dist-cjs/protocols/Aws_json1_0.js +538 -1
  12. package/dist-es/BackupGateway.js +90 -0
  13. package/dist-es/commands/GetBandwidthRateLimitScheduleCommand.js +42 -0
  14. package/dist-es/commands/GetHypervisorCommand.js +42 -0
  15. package/dist-es/commands/GetHypervisorPropertyMappingsCommand.js +42 -0
  16. package/dist-es/commands/PutBandwidthRateLimitScheduleCommand.js +42 -0
  17. package/dist-es/commands/PutHypervisorPropertyMappingsCommand.js +42 -0
  18. package/dist-es/commands/StartVirtualMachinesMetadataSyncCommand.js +42 -0
  19. package/dist-es/commands/index.js +6 -0
  20. package/dist-es/endpoint/ruleset.js +1 -10
  21. package/dist-es/models/models_0.js +60 -4
  22. package/dist-es/protocols/Aws_json1_0.js +526 -1
  23. package/dist-types/BackupGateway.d.ts +54 -0
  24. package/dist-types/BackupGatewayClient.d.ts +8 -2
  25. package/dist-types/commands/GetBandwidthRateLimitScheduleCommand.d.ts +40 -0
  26. package/dist-types/commands/GetHypervisorCommand.d.ts +39 -0
  27. package/dist-types/commands/GetHypervisorPropertyMappingsCommand.d.ts +39 -0
  28. package/dist-types/commands/PutBandwidthRateLimitScheduleCommand.d.ts +40 -0
  29. package/dist-types/commands/PutHypervisorPropertyMappingsCommand.d.ts +39 -0
  30. package/dist-types/commands/StartVirtualMachinesMetadataSyncCommand.d.ts +37 -0
  31. package/dist-types/commands/index.d.ts +6 -0
  32. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  33. package/dist-types/models/models_0.d.ts +355 -22
  34. package/dist-types/protocols/Aws_json1_0.d.ts +18 -0
  35. package/dist-types/ts3.4/BackupGateway.d.ts +102 -0
  36. package/dist-types/ts3.4/BackupGatewayClient.d.ts +36 -0
  37. package/dist-types/ts3.4/commands/GetBandwidthRateLimitScheduleCommand.d.ts +41 -0
  38. package/dist-types/ts3.4/commands/GetHypervisorCommand.d.ts +34 -0
  39. package/dist-types/ts3.4/commands/GetHypervisorPropertyMappingsCommand.d.ts +41 -0
  40. package/dist-types/ts3.4/commands/PutBandwidthRateLimitScheduleCommand.d.ts +41 -0
  41. package/dist-types/ts3.4/commands/PutHypervisorPropertyMappingsCommand.d.ts +41 -0
  42. package/dist-types/ts3.4/commands/StartVirtualMachinesMetadataSyncCommand.d.ts +41 -0
  43. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  44. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  45. package/dist-types/ts3.4/models/models_0.d.ts +142 -15
  46. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +72 -0
  47. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
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";
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 serializeAws_json1_0AssociateGatewayToServerCommand = async (input, context) => {
@@ -47,6 +47,15 @@ export const serializeAws_json1_0DisassociateGatewayFromServerCommand = async (i
47
47
  body = JSON.stringify(serializeAws_json1_0DisassociateGatewayFromServerInput(input, context));
48
48
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
49
  };
50
+ export const serializeAws_json1_0GetBandwidthRateLimitScheduleCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.0",
53
+ "x-amz-target": "BackupOnPremises_v20210101.GetBandwidthRateLimitSchedule",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(serializeAws_json1_0GetBandwidthRateLimitScheduleInput(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
50
59
  export const serializeAws_json1_0GetGatewayCommand = async (input, context) => {
51
60
  const headers = {
52
61
  "content-type": "application/x-amz-json-1.0",
@@ -56,6 +65,24 @@ export const serializeAws_json1_0GetGatewayCommand = async (input, context) => {
56
65
  body = JSON.stringify(serializeAws_json1_0GetGatewayInput(input, context));
57
66
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
67
  };
68
+ export const serializeAws_json1_0GetHypervisorCommand = async (input, context) => {
69
+ const headers = {
70
+ "content-type": "application/x-amz-json-1.0",
71
+ "x-amz-target": "BackupOnPremises_v20210101.GetHypervisor",
72
+ };
73
+ let body;
74
+ body = JSON.stringify(serializeAws_json1_0GetHypervisorInput(input, context));
75
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
+ };
77
+ export const serializeAws_json1_0GetHypervisorPropertyMappingsCommand = async (input, context) => {
78
+ const headers = {
79
+ "content-type": "application/x-amz-json-1.0",
80
+ "x-amz-target": "BackupOnPremises_v20210101.GetHypervisorPropertyMappings",
81
+ };
82
+ let body;
83
+ body = JSON.stringify(serializeAws_json1_0GetHypervisorPropertyMappingsInput(input, context));
84
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
+ };
59
86
  export const serializeAws_json1_0GetVirtualMachineCommand = async (input, context) => {
60
87
  const headers = {
61
88
  "content-type": "application/x-amz-json-1.0",
@@ -110,6 +137,24 @@ export const serializeAws_json1_0ListVirtualMachinesCommand = async (input, cont
110
137
  body = JSON.stringify(serializeAws_json1_0ListVirtualMachinesInput(input, context));
111
138
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
139
  };
140
+ export const serializeAws_json1_0PutBandwidthRateLimitScheduleCommand = async (input, context) => {
141
+ const headers = {
142
+ "content-type": "application/x-amz-json-1.0",
143
+ "x-amz-target": "BackupOnPremises_v20210101.PutBandwidthRateLimitSchedule",
144
+ };
145
+ let body;
146
+ body = JSON.stringify(serializeAws_json1_0PutBandwidthRateLimitScheduleInput(input, context));
147
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
+ };
149
+ export const serializeAws_json1_0PutHypervisorPropertyMappingsCommand = async (input, context) => {
150
+ const headers = {
151
+ "content-type": "application/x-amz-json-1.0",
152
+ "x-amz-target": "BackupOnPremises_v20210101.PutHypervisorPropertyMappings",
153
+ };
154
+ let body;
155
+ body = JSON.stringify(serializeAws_json1_0PutHypervisorPropertyMappingsInput(input, context));
156
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
+ };
113
158
  export const serializeAws_json1_0PutMaintenanceStartTimeCommand = async (input, context) => {
114
159
  const headers = {
115
160
  "content-type": "application/x-amz-json-1.0",
@@ -119,6 +164,15 @@ export const serializeAws_json1_0PutMaintenanceStartTimeCommand = async (input,
119
164
  body = JSON.stringify(serializeAws_json1_0PutMaintenanceStartTimeInput(input, context));
120
165
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
166
  };
167
+ export const serializeAws_json1_0StartVirtualMachinesMetadataSyncCommand = async (input, context) => {
168
+ const headers = {
169
+ "content-type": "application/x-amz-json-1.0",
170
+ "x-amz-target": "BackupOnPremises_v20210101.StartVirtualMachinesMetadataSync",
171
+ };
172
+ let body;
173
+ body = JSON.stringify(serializeAws_json1_0StartVirtualMachinesMetadataSyncInput(input, context));
174
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
+ };
122
176
  export const serializeAws_json1_0TagResourceCommand = async (input, context) => {
123
177
  const headers = {
124
178
  "content-type": "application/x-amz-json-1.0",
@@ -319,6 +373,9 @@ const deserializeAws_json1_0DeleteHypervisorCommandError = async (output, contex
319
373
  case "AccessDeniedException":
320
374
  case "com.amazonaws.backupgateway#AccessDeniedException":
321
375
  throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
376
+ case "ConflictException":
377
+ case "com.amazonaws.backupgateway#ConflictException":
378
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
322
379
  case "InternalServerException":
323
380
  case "com.amazonaws.backupgateway#InternalServerException":
324
381
  throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
@@ -386,6 +443,48 @@ const deserializeAws_json1_0DisassociateGatewayFromServerCommandError = async (o
386
443
  });
387
444
  }
388
445
  };
446
+ export const deserializeAws_json1_0GetBandwidthRateLimitScheduleCommand = async (output, context) => {
447
+ if (output.statusCode >= 300) {
448
+ return deserializeAws_json1_0GetBandwidthRateLimitScheduleCommandError(output, context);
449
+ }
450
+ const data = await parseBody(output.body, context);
451
+ let contents = {};
452
+ contents = deserializeAws_json1_0GetBandwidthRateLimitScheduleOutput(data, context);
453
+ const response = {
454
+ $metadata: deserializeMetadata(output),
455
+ ...contents,
456
+ };
457
+ return Promise.resolve(response);
458
+ };
459
+ const deserializeAws_json1_0GetBandwidthRateLimitScheduleCommandError = async (output, context) => {
460
+ const parsedOutput = {
461
+ ...output,
462
+ body: await parseErrorBody(output.body, context),
463
+ };
464
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
465
+ switch (errorCode) {
466
+ case "InternalServerException":
467
+ case "com.amazonaws.backupgateway#InternalServerException":
468
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
469
+ case "ResourceNotFoundException":
470
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
471
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
472
+ case "ThrottlingException":
473
+ case "com.amazonaws.backupgateway#ThrottlingException":
474
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
475
+ case "ValidationException":
476
+ case "com.amazonaws.backupgateway#ValidationException":
477
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
478
+ default:
479
+ const parsedBody = parsedOutput.body;
480
+ throwDefaultError({
481
+ output,
482
+ parsedBody,
483
+ exceptionCtor: __BaseException,
484
+ errorCode,
485
+ });
486
+ }
487
+ };
389
488
  export const deserializeAws_json1_0GetGatewayCommand = async (output, context) => {
390
489
  if (output.statusCode >= 300) {
391
490
  return deserializeAws_json1_0GetGatewayCommandError(output, context);
@@ -428,6 +527,90 @@ const deserializeAws_json1_0GetGatewayCommandError = async (output, context) =>
428
527
  });
429
528
  }
430
529
  };
530
+ export const deserializeAws_json1_0GetHypervisorCommand = async (output, context) => {
531
+ if (output.statusCode >= 300) {
532
+ return deserializeAws_json1_0GetHypervisorCommandError(output, context);
533
+ }
534
+ const data = await parseBody(output.body, context);
535
+ let contents = {};
536
+ contents = deserializeAws_json1_0GetHypervisorOutput(data, context);
537
+ const response = {
538
+ $metadata: deserializeMetadata(output),
539
+ ...contents,
540
+ };
541
+ return Promise.resolve(response);
542
+ };
543
+ const deserializeAws_json1_0GetHypervisorCommandError = async (output, context) => {
544
+ const parsedOutput = {
545
+ ...output,
546
+ body: await parseErrorBody(output.body, context),
547
+ };
548
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
549
+ switch (errorCode) {
550
+ case "InternalServerException":
551
+ case "com.amazonaws.backupgateway#InternalServerException":
552
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
553
+ case "ResourceNotFoundException":
554
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
555
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
556
+ case "ThrottlingException":
557
+ case "com.amazonaws.backupgateway#ThrottlingException":
558
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
559
+ case "ValidationException":
560
+ case "com.amazonaws.backupgateway#ValidationException":
561
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
562
+ default:
563
+ const parsedBody = parsedOutput.body;
564
+ throwDefaultError({
565
+ output,
566
+ parsedBody,
567
+ exceptionCtor: __BaseException,
568
+ errorCode,
569
+ });
570
+ }
571
+ };
572
+ export const deserializeAws_json1_0GetHypervisorPropertyMappingsCommand = async (output, context) => {
573
+ if (output.statusCode >= 300) {
574
+ return deserializeAws_json1_0GetHypervisorPropertyMappingsCommandError(output, context);
575
+ }
576
+ const data = await parseBody(output.body, context);
577
+ let contents = {};
578
+ contents = deserializeAws_json1_0GetHypervisorPropertyMappingsOutput(data, context);
579
+ const response = {
580
+ $metadata: deserializeMetadata(output),
581
+ ...contents,
582
+ };
583
+ return Promise.resolve(response);
584
+ };
585
+ const deserializeAws_json1_0GetHypervisorPropertyMappingsCommandError = async (output, context) => {
586
+ const parsedOutput = {
587
+ ...output,
588
+ body: await parseErrorBody(output.body, context),
589
+ };
590
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
591
+ switch (errorCode) {
592
+ case "InternalServerException":
593
+ case "com.amazonaws.backupgateway#InternalServerException":
594
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
595
+ case "ResourceNotFoundException":
596
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
597
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
598
+ case "ThrottlingException":
599
+ case "com.amazonaws.backupgateway#ThrottlingException":
600
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
601
+ case "ValidationException":
602
+ case "com.amazonaws.backupgateway#ValidationException":
603
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
604
+ default:
605
+ const parsedBody = parsedOutput.body;
606
+ throwDefaultError({
607
+ output,
608
+ parsedBody,
609
+ exceptionCtor: __BaseException,
610
+ errorCode,
611
+ });
612
+ }
613
+ };
431
614
  export const deserializeAws_json1_0GetVirtualMachineCommand = async (output, context) => {
432
615
  if (output.statusCode >= 300) {
433
616
  return deserializeAws_json1_0GetVirtualMachineCommandError(output, context);
@@ -493,6 +676,9 @@ const deserializeAws_json1_0ImportHypervisorConfigurationCommandError = async (o
493
676
  case "AccessDeniedException":
494
677
  case "com.amazonaws.backupgateway#AccessDeniedException":
495
678
  throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
679
+ case "ConflictException":
680
+ case "com.amazonaws.backupgateway#ConflictException":
681
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
496
682
  case "InternalServerException":
497
683
  case "com.amazonaws.backupgateway#InternalServerException":
498
684
  throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
@@ -671,6 +857,96 @@ const deserializeAws_json1_0ListVirtualMachinesCommandError = async (output, con
671
857
  });
672
858
  }
673
859
  };
860
+ export const deserializeAws_json1_0PutBandwidthRateLimitScheduleCommand = async (output, context) => {
861
+ if (output.statusCode >= 300) {
862
+ return deserializeAws_json1_0PutBandwidthRateLimitScheduleCommandError(output, context);
863
+ }
864
+ const data = await parseBody(output.body, context);
865
+ let contents = {};
866
+ contents = deserializeAws_json1_0PutBandwidthRateLimitScheduleOutput(data, context);
867
+ const response = {
868
+ $metadata: deserializeMetadata(output),
869
+ ...contents,
870
+ };
871
+ return Promise.resolve(response);
872
+ };
873
+ const deserializeAws_json1_0PutBandwidthRateLimitScheduleCommandError = async (output, context) => {
874
+ const parsedOutput = {
875
+ ...output,
876
+ body: await parseErrorBody(output.body, context),
877
+ };
878
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
879
+ switch (errorCode) {
880
+ case "InternalServerException":
881
+ case "com.amazonaws.backupgateway#InternalServerException":
882
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
883
+ case "ResourceNotFoundException":
884
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
885
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
886
+ case "ThrottlingException":
887
+ case "com.amazonaws.backupgateway#ThrottlingException":
888
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
889
+ case "ValidationException":
890
+ case "com.amazonaws.backupgateway#ValidationException":
891
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
892
+ default:
893
+ const parsedBody = parsedOutput.body;
894
+ throwDefaultError({
895
+ output,
896
+ parsedBody,
897
+ exceptionCtor: __BaseException,
898
+ errorCode,
899
+ });
900
+ }
901
+ };
902
+ export const deserializeAws_json1_0PutHypervisorPropertyMappingsCommand = async (output, context) => {
903
+ if (output.statusCode >= 300) {
904
+ return deserializeAws_json1_0PutHypervisorPropertyMappingsCommandError(output, context);
905
+ }
906
+ const data = await parseBody(output.body, context);
907
+ let contents = {};
908
+ contents = deserializeAws_json1_0PutHypervisorPropertyMappingsOutput(data, context);
909
+ const response = {
910
+ $metadata: deserializeMetadata(output),
911
+ ...contents,
912
+ };
913
+ return Promise.resolve(response);
914
+ };
915
+ const deserializeAws_json1_0PutHypervisorPropertyMappingsCommandError = async (output, context) => {
916
+ const parsedOutput = {
917
+ ...output,
918
+ body: await parseErrorBody(output.body, context),
919
+ };
920
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
+ switch (errorCode) {
922
+ case "AccessDeniedException":
923
+ case "com.amazonaws.backupgateway#AccessDeniedException":
924
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
925
+ case "ConflictException":
926
+ case "com.amazonaws.backupgateway#ConflictException":
927
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
928
+ case "InternalServerException":
929
+ case "com.amazonaws.backupgateway#InternalServerException":
930
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
931
+ case "ResourceNotFoundException":
932
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
933
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
934
+ case "ThrottlingException":
935
+ case "com.amazonaws.backupgateway#ThrottlingException":
936
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
937
+ case "ValidationException":
938
+ case "com.amazonaws.backupgateway#ValidationException":
939
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
940
+ default:
941
+ const parsedBody = parsedOutput.body;
942
+ throwDefaultError({
943
+ output,
944
+ parsedBody,
945
+ exceptionCtor: __BaseException,
946
+ errorCode,
947
+ });
948
+ }
949
+ };
674
950
  export const deserializeAws_json1_0PutMaintenanceStartTimeCommand = async (output, context) => {
675
951
  if (output.statusCode >= 300) {
676
952
  return deserializeAws_json1_0PutMaintenanceStartTimeCommandError(output, context);
@@ -716,6 +992,51 @@ const deserializeAws_json1_0PutMaintenanceStartTimeCommandError = async (output,
716
992
  });
717
993
  }
718
994
  };
995
+ export const deserializeAws_json1_0StartVirtualMachinesMetadataSyncCommand = async (output, context) => {
996
+ if (output.statusCode >= 300) {
997
+ return deserializeAws_json1_0StartVirtualMachinesMetadataSyncCommandError(output, context);
998
+ }
999
+ const data = await parseBody(output.body, context);
1000
+ let contents = {};
1001
+ contents = deserializeAws_json1_0StartVirtualMachinesMetadataSyncOutput(data, context);
1002
+ const response = {
1003
+ $metadata: deserializeMetadata(output),
1004
+ ...contents,
1005
+ };
1006
+ return Promise.resolve(response);
1007
+ };
1008
+ const deserializeAws_json1_0StartVirtualMachinesMetadataSyncCommandError = async (output, context) => {
1009
+ const parsedOutput = {
1010
+ ...output,
1011
+ body: await parseErrorBody(output.body, context),
1012
+ };
1013
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1014
+ switch (errorCode) {
1015
+ case "AccessDeniedException":
1016
+ case "com.amazonaws.backupgateway#AccessDeniedException":
1017
+ throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
1018
+ case "InternalServerException":
1019
+ case "com.amazonaws.backupgateway#InternalServerException":
1020
+ throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
1021
+ case "ResourceNotFoundException":
1022
+ case "com.amazonaws.backupgateway#ResourceNotFoundException":
1023
+ throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
1024
+ case "ThrottlingException":
1025
+ case "com.amazonaws.backupgateway#ThrottlingException":
1026
+ throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
1027
+ case "ValidationException":
1028
+ case "com.amazonaws.backupgateway#ValidationException":
1029
+ throw await deserializeAws_json1_0ValidationExceptionResponse(parsedOutput, context);
1030
+ default:
1031
+ const parsedBody = parsedOutput.body;
1032
+ throwDefaultError({
1033
+ output,
1034
+ parsedBody,
1035
+ exceptionCtor: __BaseException,
1036
+ errorCode,
1037
+ });
1038
+ }
1039
+ };
719
1040
  export const deserializeAws_json1_0TagResourceCommand = async (output, context) => {
720
1041
  if (output.statusCode >= 300) {
721
1042
  return deserializeAws_json1_0TagResourceCommandError(output, context);
@@ -955,6 +1276,9 @@ const deserializeAws_json1_0UpdateHypervisorCommandError = async (output, contex
955
1276
  case "AccessDeniedException":
956
1277
  case "com.amazonaws.backupgateway#AccessDeniedException":
957
1278
  throw await deserializeAws_json1_0AccessDeniedExceptionResponse(parsedOutput, context);
1279
+ case "ConflictException":
1280
+ case "com.amazonaws.backupgateway#ConflictException":
1281
+ throw await deserializeAws_json1_0ConflictExceptionResponse(parsedOutput, context);
958
1282
  case "InternalServerException":
959
1283
  case "com.amazonaws.backupgateway#InternalServerException":
960
1284
  throw await deserializeAws_json1_0InternalServerExceptionResponse(parsedOutput, context);
@@ -1037,6 +1361,25 @@ const serializeAws_json1_0AssociateGatewayToServerInput = (input, context) => {
1037
1361
  ...(input.ServerArn != null && { ServerArn: input.ServerArn }),
1038
1362
  };
1039
1363
  };
1364
+ const serializeAws_json1_0BandwidthRateLimitInterval = (input, context) => {
1365
+ return {
1366
+ ...(input.AverageUploadRateLimitInBitsPerSec != null && {
1367
+ AverageUploadRateLimitInBitsPerSec: input.AverageUploadRateLimitInBitsPerSec,
1368
+ }),
1369
+ ...(input.DaysOfWeek != null && { DaysOfWeek: serializeAws_json1_0DaysOfWeek(input.DaysOfWeek, context) }),
1370
+ ...(input.EndHourOfDay != null && { EndHourOfDay: input.EndHourOfDay }),
1371
+ ...(input.EndMinuteOfHour != null && { EndMinuteOfHour: input.EndMinuteOfHour }),
1372
+ ...(input.StartHourOfDay != null && { StartHourOfDay: input.StartHourOfDay }),
1373
+ ...(input.StartMinuteOfHour != null && { StartMinuteOfHour: input.StartMinuteOfHour }),
1374
+ };
1375
+ };
1376
+ const serializeAws_json1_0BandwidthRateLimitIntervals = (input, context) => {
1377
+ return input
1378
+ .filter((e) => e != null)
1379
+ .map((entry) => {
1380
+ return serializeAws_json1_0BandwidthRateLimitInterval(entry, context);
1381
+ });
1382
+ };
1040
1383
  const serializeAws_json1_0CreateGatewayInput = (input, context) => {
1041
1384
  return {
1042
1385
  ...(input.ActivationKey != null && { ActivationKey: input.ActivationKey }),
@@ -1045,6 +1388,13 @@ const serializeAws_json1_0CreateGatewayInput = (input, context) => {
1045
1388
  ...(input.Tags != null && { Tags: serializeAws_json1_0Tags(input.Tags, context) }),
1046
1389
  };
1047
1390
  };
1391
+ const serializeAws_json1_0DaysOfWeek = (input, context) => {
1392
+ return input
1393
+ .filter((e) => e != null)
1394
+ .map((entry) => {
1395
+ return entry;
1396
+ });
1397
+ };
1048
1398
  const serializeAws_json1_0DeleteGatewayInput = (input, context) => {
1049
1399
  return {
1050
1400
  ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
@@ -1060,11 +1410,26 @@ const serializeAws_json1_0DisassociateGatewayFromServerInput = (input, context)
1060
1410
  ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1061
1411
  };
1062
1412
  };
1413
+ const serializeAws_json1_0GetBandwidthRateLimitScheduleInput = (input, context) => {
1414
+ return {
1415
+ ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1416
+ };
1417
+ };
1063
1418
  const serializeAws_json1_0GetGatewayInput = (input, context) => {
1064
1419
  return {
1065
1420
  ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1066
1421
  };
1067
1422
  };
1423
+ const serializeAws_json1_0GetHypervisorInput = (input, context) => {
1424
+ return {
1425
+ ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1426
+ };
1427
+ };
1428
+ const serializeAws_json1_0GetHypervisorPropertyMappingsInput = (input, context) => {
1429
+ return {
1430
+ ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1431
+ };
1432
+ };
1068
1433
  const serializeAws_json1_0GetVirtualMachineInput = (input, context) => {
1069
1434
  return {
1070
1435
  ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
@@ -1104,6 +1469,23 @@ const serializeAws_json1_0ListVirtualMachinesInput = (input, context) => {
1104
1469
  ...(input.NextToken != null && { NextToken: input.NextToken }),
1105
1470
  };
1106
1471
  };
1472
+ const serializeAws_json1_0PutBandwidthRateLimitScheduleInput = (input, context) => {
1473
+ return {
1474
+ ...(input.BandwidthRateLimitIntervals != null && {
1475
+ BandwidthRateLimitIntervals: serializeAws_json1_0BandwidthRateLimitIntervals(input.BandwidthRateLimitIntervals, context),
1476
+ }),
1477
+ ...(input.GatewayArn != null && { GatewayArn: input.GatewayArn }),
1478
+ };
1479
+ };
1480
+ const serializeAws_json1_0PutHypervisorPropertyMappingsInput = (input, context) => {
1481
+ return {
1482
+ ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1483
+ ...(input.IamRoleArn != null && { IamRoleArn: input.IamRoleArn }),
1484
+ ...(input.VmwareToAwsTagMappings != null && {
1485
+ VmwareToAwsTagMappings: serializeAws_json1_0VmwareToAwsTagMappings(input.VmwareToAwsTagMappings, context),
1486
+ }),
1487
+ };
1488
+ };
1107
1489
  const serializeAws_json1_0PutMaintenanceStartTimeInput = (input, context) => {
1108
1490
  return {
1109
1491
  ...(input.DayOfMonth != null && { DayOfMonth: input.DayOfMonth }),
@@ -1113,6 +1495,11 @@ const serializeAws_json1_0PutMaintenanceStartTimeInput = (input, context) => {
1113
1495
  ...(input.MinuteOfHour != null && { MinuteOfHour: input.MinuteOfHour }),
1114
1496
  };
1115
1497
  };
1498
+ const serializeAws_json1_0StartVirtualMachinesMetadataSyncInput = (input, context) => {
1499
+ return {
1500
+ ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1501
+ };
1502
+ };
1116
1503
  const serializeAws_json1_0Tag = (input, context) => {
1117
1504
  return {
1118
1505
  ...(input.Key != null && { Key: input.Key }),
@@ -1168,11 +1555,27 @@ const serializeAws_json1_0UpdateHypervisorInput = (input, context) => {
1168
1555
  return {
1169
1556
  ...(input.Host != null && { Host: input.Host }),
1170
1557
  ...(input.HypervisorArn != null && { HypervisorArn: input.HypervisorArn }),
1558
+ ...(input.LogGroupArn != null && { LogGroupArn: input.LogGroupArn }),
1171
1559
  ...(input.Name != null && { Name: input.Name }),
1172
1560
  ...(input.Password != null && { Password: input.Password }),
1173
1561
  ...(input.Username != null && { Username: input.Username }),
1174
1562
  };
1175
1563
  };
1564
+ const serializeAws_json1_0VmwareToAwsTagMapping = (input, context) => {
1565
+ return {
1566
+ ...(input.AwsTagKey != null && { AwsTagKey: input.AwsTagKey }),
1567
+ ...(input.AwsTagValue != null && { AwsTagValue: input.AwsTagValue }),
1568
+ ...(input.VmwareCategory != null && { VmwareCategory: input.VmwareCategory }),
1569
+ ...(input.VmwareTagName != null && { VmwareTagName: input.VmwareTagName }),
1570
+ };
1571
+ };
1572
+ const serializeAws_json1_0VmwareToAwsTagMappings = (input, context) => {
1573
+ return input
1574
+ .filter((e) => e != null)
1575
+ .map((entry) => {
1576
+ return serializeAws_json1_0VmwareToAwsTagMapping(entry, context);
1577
+ });
1578
+ };
1176
1579
  const deserializeAws_json1_0AccessDeniedException = (output, context) => {
1177
1580
  return {
1178
1581
  ErrorCode: __expectString(output.ErrorCode),
@@ -1184,6 +1587,27 @@ const deserializeAws_json1_0AssociateGatewayToServerOutput = (output, context) =
1184
1587
  GatewayArn: __expectString(output.GatewayArn),
1185
1588
  };
1186
1589
  };
1590
+ const deserializeAws_json1_0BandwidthRateLimitInterval = (output, context) => {
1591
+ return {
1592
+ AverageUploadRateLimitInBitsPerSec: __expectLong(output.AverageUploadRateLimitInBitsPerSec),
1593
+ DaysOfWeek: output.DaysOfWeek != null ? deserializeAws_json1_0DaysOfWeek(output.DaysOfWeek, context) : undefined,
1594
+ EndHourOfDay: __expectInt32(output.EndHourOfDay),
1595
+ EndMinuteOfHour: __expectInt32(output.EndMinuteOfHour),
1596
+ StartHourOfDay: __expectInt32(output.StartHourOfDay),
1597
+ StartMinuteOfHour: __expectInt32(output.StartMinuteOfHour),
1598
+ };
1599
+ };
1600
+ const deserializeAws_json1_0BandwidthRateLimitIntervals = (output, context) => {
1601
+ const retVal = (output || [])
1602
+ .filter((e) => e != null)
1603
+ .map((entry) => {
1604
+ if (entry === null) {
1605
+ return null;
1606
+ }
1607
+ return deserializeAws_json1_0BandwidthRateLimitInterval(entry, context);
1608
+ });
1609
+ return retVal;
1610
+ };
1187
1611
  const deserializeAws_json1_0ConflictException = (output, context) => {
1188
1612
  return {
1189
1613
  ErrorCode: __expectString(output.ErrorCode),
@@ -1195,6 +1619,17 @@ const deserializeAws_json1_0CreateGatewayOutput = (output, context) => {
1195
1619
  GatewayArn: __expectString(output.GatewayArn),
1196
1620
  };
1197
1621
  };
1622
+ const deserializeAws_json1_0DaysOfWeek = (output, context) => {
1623
+ const retVal = (output || [])
1624
+ .filter((e) => e != null)
1625
+ .map((entry) => {
1626
+ if (entry === null) {
1627
+ return null;
1628
+ }
1629
+ return __expectInt32(entry);
1630
+ });
1631
+ return retVal;
1632
+ };
1198
1633
  const deserializeAws_json1_0DeleteGatewayOutput = (output, context) => {
1199
1634
  return {
1200
1635
  GatewayArn: __expectString(output.GatewayArn),
@@ -1250,11 +1685,33 @@ const deserializeAws_json1_0Gateways = (output, context) => {
1250
1685
  });
1251
1686
  return retVal;
1252
1687
  };
1688
+ const deserializeAws_json1_0GetBandwidthRateLimitScheduleOutput = (output, context) => {
1689
+ return {
1690
+ BandwidthRateLimitIntervals: output.BandwidthRateLimitIntervals != null
1691
+ ? deserializeAws_json1_0BandwidthRateLimitIntervals(output.BandwidthRateLimitIntervals, context)
1692
+ : undefined,
1693
+ GatewayArn: __expectString(output.GatewayArn),
1694
+ };
1695
+ };
1253
1696
  const deserializeAws_json1_0GetGatewayOutput = (output, context) => {
1254
1697
  return {
1255
1698
  Gateway: output.Gateway != null ? deserializeAws_json1_0GatewayDetails(output.Gateway, context) : undefined,
1256
1699
  };
1257
1700
  };
1701
+ const deserializeAws_json1_0GetHypervisorOutput = (output, context) => {
1702
+ return {
1703
+ Hypervisor: output.Hypervisor != null ? deserializeAws_json1_0HypervisorDetails(output.Hypervisor, context) : undefined,
1704
+ };
1705
+ };
1706
+ const deserializeAws_json1_0GetHypervisorPropertyMappingsOutput = (output, context) => {
1707
+ return {
1708
+ HypervisorArn: __expectString(output.HypervisorArn),
1709
+ IamRoleArn: __expectString(output.IamRoleArn),
1710
+ VmwareToAwsTagMappings: output.VmwareToAwsTagMappings != null
1711
+ ? deserializeAws_json1_0VmwareToAwsTagMappings(output.VmwareToAwsTagMappings, context)
1712
+ : undefined,
1713
+ };
1714
+ };
1258
1715
  const deserializeAws_json1_0GetVirtualMachineOutput = (output, context) => {
1259
1716
  return {
1260
1717
  VirtualMachine: output.VirtualMachine != null
@@ -1271,6 +1728,21 @@ const deserializeAws_json1_0Hypervisor = (output, context) => {
1271
1728
  State: __expectString(output.State),
1272
1729
  };
1273
1730
  };
1731
+ const deserializeAws_json1_0HypervisorDetails = (output, context) => {
1732
+ return {
1733
+ Host: __expectString(output.Host),
1734
+ HypervisorArn: __expectString(output.HypervisorArn),
1735
+ KmsKeyArn: __expectString(output.KmsKeyArn),
1736
+ LastSuccessfulMetadataSyncTime: output.LastSuccessfulMetadataSyncTime != null
1737
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastSuccessfulMetadataSyncTime)))
1738
+ : undefined,
1739
+ LatestMetadataSyncStatus: __expectString(output.LatestMetadataSyncStatus),
1740
+ LatestMetadataSyncStatusMessage: __expectString(output.LatestMetadataSyncStatusMessage),
1741
+ LogGroupArn: __expectString(output.LogGroupArn),
1742
+ Name: __expectString(output.Name),
1743
+ State: __expectString(output.State),
1744
+ };
1745
+ };
1274
1746
  const deserializeAws_json1_0Hypervisors = (output, context) => {
1275
1747
  const retVal = (output || [])
1276
1748
  .filter((e) => e != null)
@@ -1327,6 +1799,16 @@ const deserializeAws_json1_0MaintenanceStartTime = (output, context) => {
1327
1799
  MinuteOfHour: __expectInt32(output.MinuteOfHour),
1328
1800
  };
1329
1801
  };
1802
+ const deserializeAws_json1_0PutBandwidthRateLimitScheduleOutput = (output, context) => {
1803
+ return {
1804
+ GatewayArn: __expectString(output.GatewayArn),
1805
+ };
1806
+ };
1807
+ const deserializeAws_json1_0PutHypervisorPropertyMappingsOutput = (output, context) => {
1808
+ return {
1809
+ HypervisorArn: __expectString(output.HypervisorArn),
1810
+ };
1811
+ };
1330
1812
  const deserializeAws_json1_0PutMaintenanceStartTimeOutput = (output, context) => {
1331
1813
  return {
1332
1814
  GatewayArn: __expectString(output.GatewayArn),
@@ -1338,6 +1820,11 @@ const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
1338
1820
  Message: __expectString(output.Message),
1339
1821
  };
1340
1822
  };
1823
+ const deserializeAws_json1_0StartVirtualMachinesMetadataSyncOutput = (output, context) => {
1824
+ return {
1825
+ HypervisorArn: __expectString(output.HypervisorArn),
1826
+ };
1827
+ };
1341
1828
  const deserializeAws_json1_0Tag = (output, context) => {
1342
1829
  return {
1343
1830
  Key: __expectString(output.Key),
@@ -1417,6 +1904,7 @@ const deserializeAws_json1_0VirtualMachineDetails = (output, context) => {
1417
1904
  Name: __expectString(output.Name),
1418
1905
  Path: __expectString(output.Path),
1419
1906
  ResourceArn: __expectString(output.ResourceArn),
1907
+ VmwareTags: output.VmwareTags != null ? deserializeAws_json1_0VmwareTags(output.VmwareTags, context) : undefined,
1420
1908
  };
1421
1909
  };
1422
1910
  const deserializeAws_json1_0VirtualMachines = (output, context) => {
@@ -1430,6 +1918,43 @@ const deserializeAws_json1_0VirtualMachines = (output, context) => {
1430
1918
  });
1431
1919
  return retVal;
1432
1920
  };
1921
+ const deserializeAws_json1_0VmwareTag = (output, context) => {
1922
+ return {
1923
+ VmwareCategory: __expectString(output.VmwareCategory),
1924
+ VmwareTagDescription: __expectString(output.VmwareTagDescription),
1925
+ VmwareTagName: __expectString(output.VmwareTagName),
1926
+ };
1927
+ };
1928
+ const deserializeAws_json1_0VmwareTags = (output, context) => {
1929
+ const retVal = (output || [])
1930
+ .filter((e) => e != null)
1931
+ .map((entry) => {
1932
+ if (entry === null) {
1933
+ return null;
1934
+ }
1935
+ return deserializeAws_json1_0VmwareTag(entry, context);
1936
+ });
1937
+ return retVal;
1938
+ };
1939
+ const deserializeAws_json1_0VmwareToAwsTagMapping = (output, context) => {
1940
+ return {
1941
+ AwsTagKey: __expectString(output.AwsTagKey),
1942
+ AwsTagValue: __expectString(output.AwsTagValue),
1943
+ VmwareCategory: __expectString(output.VmwareCategory),
1944
+ VmwareTagName: __expectString(output.VmwareTagName),
1945
+ };
1946
+ };
1947
+ const deserializeAws_json1_0VmwareToAwsTagMappings = (output, context) => {
1948
+ const retVal = (output || [])
1949
+ .filter((e) => e != null)
1950
+ .map((entry) => {
1951
+ if (entry === null) {
1952
+ return null;
1953
+ }
1954
+ return deserializeAws_json1_0VmwareToAwsTagMapping(entry, context);
1955
+ });
1956
+ return retVal;
1957
+ };
1433
1958
  const deserializeMetadata = (output) => ({
1434
1959
  httpStatusCode: output.statusCode,
1435
1960
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],