@aws-sdk/client-networkmanager 3.39.0 → 3.43.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 (120) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +1 -2
  3. package/dist-cjs/NetworkManager.js +120 -0
  4. package/dist-cjs/commands/GetNetworkResourceCountsCommand.js +36 -0
  5. package/dist-cjs/commands/GetNetworkResourceRelationshipsCommand.js +36 -0
  6. package/dist-cjs/commands/GetNetworkResourcesCommand.js +36 -0
  7. package/dist-cjs/commands/GetNetworkRoutesCommand.js +36 -0
  8. package/dist-cjs/commands/GetNetworkTelemetryCommand.js +36 -0
  9. package/dist-cjs/commands/GetRouteAnalysisCommand.js +36 -0
  10. package/dist-cjs/commands/StartRouteAnalysisCommand.js +36 -0
  11. package/dist-cjs/commands/UpdateNetworkResourceMetadataCommand.js +36 -0
  12. package/dist-cjs/commands/index.js +8 -0
  13. package/dist-cjs/endpoints.js +98 -7
  14. package/dist-cjs/models/models_0.js +238 -3
  15. package/dist-cjs/pagination/GetNetworkResourceCountsPaginator.js +35 -0
  16. package/dist-cjs/pagination/GetNetworkResourceRelationshipsPaginator.js +35 -0
  17. package/dist-cjs/pagination/GetNetworkResourcesPaginator.js +35 -0
  18. package/dist-cjs/pagination/GetNetworkTelemetryPaginator.js +35 -0
  19. package/dist-cjs/pagination/index.js +5 -1
  20. package/dist-cjs/protocols/Aws_restJson1.js +1352 -15
  21. package/dist-cjs/runtimeConfig.browser.js +6 -3
  22. package/dist-cjs/runtimeConfig.js +5 -3
  23. package/dist-es/NetworkManager.js +120 -0
  24. package/dist-es/commands/GetNetworkResourceCountsCommand.js +39 -0
  25. package/dist-es/commands/GetNetworkResourceRelationshipsCommand.js +39 -0
  26. package/dist-es/commands/GetNetworkResourcesCommand.js +39 -0
  27. package/dist-es/commands/GetNetworkRoutesCommand.js +39 -0
  28. package/dist-es/commands/GetNetworkTelemetryCommand.js +39 -0
  29. package/dist-es/commands/GetRouteAnalysisCommand.js +39 -0
  30. package/dist-es/commands/StartRouteAnalysisCommand.js +39 -0
  31. package/dist-es/commands/UpdateNetworkResourceMetadataCommand.js +39 -0
  32. package/dist-es/commands/index.js +8 -0
  33. package/dist-es/endpoints.js +98 -7
  34. package/dist-es/models/models_0.js +173 -0
  35. package/dist-es/pagination/GetNetworkResourceCountsPaginator.js +74 -0
  36. package/dist-es/pagination/GetNetworkResourceRelationshipsPaginator.js +74 -0
  37. package/dist-es/pagination/GetNetworkResourcesPaginator.js +74 -0
  38. package/dist-es/pagination/GetNetworkTelemetryPaginator.js +74 -0
  39. package/dist-es/pagination/index.js +5 -1
  40. package/dist-es/protocols/Aws_restJson1.js +1576 -142
  41. package/dist-es/runtimeConfig.browser.js +3 -2
  42. package/dist-es/runtimeConfig.js +3 -3
  43. package/dist-types/NetworkManager.d.ts +61 -4
  44. package/dist-types/NetworkManagerClient.d.ts +19 -4
  45. package/dist-types/commands/AssociateCustomerGatewayCommand.d.ts +1 -1
  46. package/dist-types/commands/AssociateLinkCommand.d.ts +1 -1
  47. package/dist-types/commands/AssociateTransitGatewayConnectPeerCommand.d.ts +1 -1
  48. package/dist-types/commands/CreateConnectionCommand.d.ts +1 -1
  49. package/dist-types/commands/CreateDeviceCommand.d.ts +1 -1
  50. package/dist-types/commands/CreateGlobalNetworkCommand.d.ts +1 -1
  51. package/dist-types/commands/CreateLinkCommand.d.ts +1 -1
  52. package/dist-types/commands/CreateSiteCommand.d.ts +1 -1
  53. package/dist-types/commands/DeleteConnectionCommand.d.ts +1 -1
  54. package/dist-types/commands/DeleteDeviceCommand.d.ts +1 -1
  55. package/dist-types/commands/DeleteGlobalNetworkCommand.d.ts +1 -1
  56. package/dist-types/commands/DeleteLinkCommand.d.ts +1 -1
  57. package/dist-types/commands/DeleteSiteCommand.d.ts +1 -1
  58. package/dist-types/commands/DeregisterTransitGatewayCommand.d.ts +1 -1
  59. package/dist-types/commands/DescribeGlobalNetworksCommand.d.ts +1 -1
  60. package/dist-types/commands/DisassociateCustomerGatewayCommand.d.ts +1 -1
  61. package/dist-types/commands/DisassociateLinkCommand.d.ts +1 -1
  62. package/dist-types/commands/DisassociateTransitGatewayConnectPeerCommand.d.ts +1 -1
  63. package/dist-types/commands/GetConnectionsCommand.d.ts +1 -1
  64. package/dist-types/commands/GetCustomerGatewayAssociationsCommand.d.ts +1 -1
  65. package/dist-types/commands/GetDevicesCommand.d.ts +1 -1
  66. package/dist-types/commands/GetLinkAssociationsCommand.d.ts +1 -1
  67. package/dist-types/commands/GetLinksCommand.d.ts +1 -1
  68. package/dist-types/commands/GetNetworkResourceCountsCommand.d.ts +35 -0
  69. package/dist-types/commands/GetNetworkResourceRelationshipsCommand.d.ts +35 -0
  70. package/dist-types/commands/GetNetworkResourcesCommand.d.ts +36 -0
  71. package/dist-types/commands/GetNetworkRoutesCommand.d.ts +35 -0
  72. package/dist-types/commands/GetNetworkTelemetryCommand.d.ts +35 -0
  73. package/dist-types/commands/GetRouteAnalysisCommand.d.ts +35 -0
  74. package/dist-types/commands/GetSitesCommand.d.ts +1 -1
  75. package/dist-types/commands/GetTransitGatewayConnectPeerAssociationsCommand.d.ts +1 -1
  76. package/dist-types/commands/GetTransitGatewayRegistrationsCommand.d.ts +1 -1
  77. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  78. package/dist-types/commands/RegisterTransitGatewayCommand.d.ts +3 -3
  79. package/dist-types/commands/StartRouteAnalysisCommand.d.ts +36 -0
  80. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  81. package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
  82. package/dist-types/commands/UpdateConnectionCommand.d.ts +1 -1
  83. package/dist-types/commands/UpdateDeviceCommand.d.ts +1 -1
  84. package/dist-types/commands/UpdateGlobalNetworkCommand.d.ts +1 -1
  85. package/dist-types/commands/UpdateLinkCommand.d.ts +1 -1
  86. package/dist-types/commands/UpdateNetworkResourceMetadataCommand.d.ts +35 -0
  87. package/dist-types/commands/UpdateSiteCommand.d.ts +1 -1
  88. package/dist-types/commands/index.d.ts +8 -0
  89. package/dist-types/models/models_0.d.ts +1412 -137
  90. package/dist-types/pagination/GetNetworkResourceCountsPaginator.d.ts +4 -0
  91. package/dist-types/pagination/GetNetworkResourceRelationshipsPaginator.d.ts +4 -0
  92. package/dist-types/pagination/GetNetworkResourcesPaginator.d.ts +4 -0
  93. package/dist-types/pagination/GetNetworkTelemetryPaginator.d.ts +4 -0
  94. package/dist-types/pagination/index.d.ts +5 -1
  95. package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
  96. package/dist-types/runtimeConfig.browser.d.ts +2 -0
  97. package/dist-types/runtimeConfig.d.ts +2 -0
  98. package/dist-types/runtimeConfig.native.d.ts +2 -0
  99. package/dist-types/ts3.4/NetworkManager.d.ts +40 -0
  100. package/dist-types/ts3.4/NetworkManagerClient.d.ts +14 -2
  101. package/dist-types/ts3.4/commands/GetNetworkResourceCountsCommand.d.ts +17 -0
  102. package/dist-types/ts3.4/commands/GetNetworkResourceRelationshipsCommand.d.ts +17 -0
  103. package/dist-types/ts3.4/commands/GetNetworkResourcesCommand.d.ts +17 -0
  104. package/dist-types/ts3.4/commands/GetNetworkRoutesCommand.d.ts +17 -0
  105. package/dist-types/ts3.4/commands/GetNetworkTelemetryCommand.d.ts +17 -0
  106. package/dist-types/ts3.4/commands/GetRouteAnalysisCommand.d.ts +17 -0
  107. package/dist-types/ts3.4/commands/StartRouteAnalysisCommand.d.ts +17 -0
  108. package/dist-types/ts3.4/commands/UpdateNetworkResourceMetadataCommand.d.ts +17 -0
  109. package/dist-types/ts3.4/commands/index.d.ts +8 -0
  110. package/dist-types/ts3.4/models/models_0.d.ts +511 -0
  111. package/dist-types/ts3.4/pagination/GetNetworkResourceCountsPaginator.d.ts +4 -0
  112. package/dist-types/ts3.4/pagination/GetNetworkResourceRelationshipsPaginator.d.ts +4 -0
  113. package/dist-types/ts3.4/pagination/GetNetworkResourcesPaginator.d.ts +4 -0
  114. package/dist-types/ts3.4/pagination/GetNetworkTelemetryPaginator.d.ts +4 -0
  115. package/dist-types/ts3.4/pagination/index.d.ts +5 -1
  116. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
  117. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  118. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  119. package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  120. package/package.json +23 -23
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1DescribeGlobalNetworksCommand = exports.deserializeAws_restJson1DeregisterTransitGatewayCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteLinkCommand = exports.deserializeAws_restJson1DeleteGlobalNetworkCommand = exports.deserializeAws_restJson1DeleteDeviceCommand = exports.deserializeAws_restJson1DeleteConnectionCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateLinkCommand = exports.deserializeAws_restJson1CreateGlobalNetworkCommand = exports.deserializeAws_restJson1CreateDeviceCommand = exports.deserializeAws_restJson1CreateConnectionCommand = exports.deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1AssociateLinkCommand = exports.deserializeAws_restJson1AssociateCustomerGatewayCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateLinkCommand = exports.serializeAws_restJson1UpdateGlobalNetworkCommand = exports.serializeAws_restJson1UpdateDeviceCommand = exports.serializeAws_restJson1UpdateConnectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1RegisterTransitGatewayCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetSitesCommand = exports.serializeAws_restJson1GetLinksCommand = exports.serializeAws_restJson1GetLinkAssociationsCommand = exports.serializeAws_restJson1GetDevicesCommand = exports.serializeAws_restJson1GetCustomerGatewayAssociationsCommand = exports.serializeAws_restJson1GetConnectionsCommand = exports.serializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1DisassociateLinkCommand = exports.serializeAws_restJson1DisassociateCustomerGatewayCommand = exports.serializeAws_restJson1DescribeGlobalNetworksCommand = exports.serializeAws_restJson1DeregisterTransitGatewayCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteLinkCommand = exports.serializeAws_restJson1DeleteGlobalNetworkCommand = exports.serializeAws_restJson1DeleteDeviceCommand = exports.serializeAws_restJson1DeleteConnectionCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateLinkCommand = exports.serializeAws_restJson1CreateGlobalNetworkCommand = exports.serializeAws_restJson1CreateDeviceCommand = exports.serializeAws_restJson1CreateConnectionCommand = exports.serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1AssociateLinkCommand = exports.serializeAws_restJson1AssociateCustomerGatewayCommand = void 0;
4
- exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateLinkCommand = exports.deserializeAws_restJson1UpdateGlobalNetworkCommand = exports.deserializeAws_restJson1UpdateDeviceCommand = exports.deserializeAws_restJson1UpdateConnectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1RegisterTransitGatewayCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetSitesCommand = exports.deserializeAws_restJson1GetLinksCommand = exports.deserializeAws_restJson1GetLinkAssociationsCommand = exports.deserializeAws_restJson1GetDevicesCommand = exports.deserializeAws_restJson1GetCustomerGatewayAssociationsCommand = exports.deserializeAws_restJson1GetConnectionsCommand = exports.deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1DisassociateLinkCommand = exports.deserializeAws_restJson1DisassociateCustomerGatewayCommand = void 0;
3
+ exports.deserializeAws_restJson1CreateLinkCommand = exports.deserializeAws_restJson1CreateGlobalNetworkCommand = exports.deserializeAws_restJson1CreateDeviceCommand = exports.deserializeAws_restJson1CreateConnectionCommand = exports.deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1AssociateLinkCommand = exports.deserializeAws_restJson1AssociateCustomerGatewayCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.serializeAws_restJson1UpdateLinkCommand = exports.serializeAws_restJson1UpdateGlobalNetworkCommand = exports.serializeAws_restJson1UpdateDeviceCommand = exports.serializeAws_restJson1UpdateConnectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartRouteAnalysisCommand = exports.serializeAws_restJson1RegisterTransitGatewayCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetSitesCommand = exports.serializeAws_restJson1GetRouteAnalysisCommand = exports.serializeAws_restJson1GetNetworkTelemetryCommand = exports.serializeAws_restJson1GetNetworkRoutesCommand = exports.serializeAws_restJson1GetNetworkResourcesCommand = exports.serializeAws_restJson1GetNetworkResourceRelationshipsCommand = exports.serializeAws_restJson1GetNetworkResourceCountsCommand = exports.serializeAws_restJson1GetLinksCommand = exports.serializeAws_restJson1GetLinkAssociationsCommand = exports.serializeAws_restJson1GetDevicesCommand = exports.serializeAws_restJson1GetCustomerGatewayAssociationsCommand = exports.serializeAws_restJson1GetConnectionsCommand = exports.serializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1DisassociateLinkCommand = exports.serializeAws_restJson1DisassociateCustomerGatewayCommand = exports.serializeAws_restJson1DescribeGlobalNetworksCommand = exports.serializeAws_restJson1DeregisterTransitGatewayCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteLinkCommand = exports.serializeAws_restJson1DeleteGlobalNetworkCommand = exports.serializeAws_restJson1DeleteDeviceCommand = exports.serializeAws_restJson1DeleteConnectionCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateLinkCommand = exports.serializeAws_restJson1CreateGlobalNetworkCommand = exports.serializeAws_restJson1CreateDeviceCommand = exports.serializeAws_restJson1CreateConnectionCommand = exports.serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1AssociateLinkCommand = exports.serializeAws_restJson1AssociateCustomerGatewayCommand = void 0;
4
+ exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.deserializeAws_restJson1UpdateLinkCommand = exports.deserializeAws_restJson1UpdateGlobalNetworkCommand = exports.deserializeAws_restJson1UpdateDeviceCommand = exports.deserializeAws_restJson1UpdateConnectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartRouteAnalysisCommand = exports.deserializeAws_restJson1RegisterTransitGatewayCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetSitesCommand = exports.deserializeAws_restJson1GetRouteAnalysisCommand = exports.deserializeAws_restJson1GetNetworkTelemetryCommand = exports.deserializeAws_restJson1GetNetworkRoutesCommand = exports.deserializeAws_restJson1GetNetworkResourcesCommand = exports.deserializeAws_restJson1GetNetworkResourceRelationshipsCommand = exports.deserializeAws_restJson1GetNetworkResourceCountsCommand = exports.deserializeAws_restJson1GetLinksCommand = exports.deserializeAws_restJson1GetLinkAssociationsCommand = exports.deserializeAws_restJson1GetDevicesCommand = exports.deserializeAws_restJson1GetCustomerGatewayAssociationsCommand = exports.deserializeAws_restJson1GetConnectionsCommand = exports.deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1DisassociateLinkCommand = exports.deserializeAws_restJson1DisassociateCustomerGatewayCommand = exports.deserializeAws_restJson1DescribeGlobalNetworksCommand = exports.deserializeAws_restJson1DeregisterTransitGatewayCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteLinkCommand = exports.deserializeAws_restJson1DeleteGlobalNetworkCommand = exports.deserializeAws_restJson1DeleteDeviceCommand = exports.deserializeAws_restJson1DeleteConnectionCommand = exports.deserializeAws_restJson1CreateSiteCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
7
  const serializeAws_restJson1AssociateCustomerGatewayCommand = async (input, context) => {
@@ -803,6 +803,250 @@ const serializeAws_restJson1GetLinksCommand = async (input, context) => {
803
803
  });
804
804
  };
805
805
  exports.serializeAws_restJson1GetLinksCommand = serializeAws_restJson1GetLinksCommand;
806
+ const serializeAws_restJson1GetNetworkResourceCountsCommand = async (input, context) => {
807
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
808
+ const headers = {};
809
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
810
+ "/global-networks/{GlobalNetworkId}/network-resource-count";
811
+ if (input.GlobalNetworkId !== undefined) {
812
+ const labelValue = input.GlobalNetworkId;
813
+ if (labelValue.length <= 0) {
814
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
815
+ }
816
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
817
+ }
818
+ else {
819
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
820
+ }
821
+ const query = {
822
+ ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }),
823
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
824
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
825
+ };
826
+ let body;
827
+ return new protocol_http_1.HttpRequest({
828
+ protocol,
829
+ hostname,
830
+ port,
831
+ method: "GET",
832
+ headers,
833
+ path: resolvedPath,
834
+ query,
835
+ body,
836
+ });
837
+ };
838
+ exports.serializeAws_restJson1GetNetworkResourceCountsCommand = serializeAws_restJson1GetNetworkResourceCountsCommand;
839
+ const serializeAws_restJson1GetNetworkResourceRelationshipsCommand = async (input, context) => {
840
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
841
+ const headers = {};
842
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
843
+ "/global-networks/{GlobalNetworkId}/network-resource-relationships";
844
+ if (input.GlobalNetworkId !== undefined) {
845
+ const labelValue = input.GlobalNetworkId;
846
+ if (labelValue.length <= 0) {
847
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
848
+ }
849
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
850
+ }
851
+ else {
852
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
853
+ }
854
+ const query = {
855
+ ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }),
856
+ ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }),
857
+ ...(input.AccountId !== undefined && { accountId: input.AccountId }),
858
+ ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }),
859
+ ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }),
860
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
861
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
862
+ };
863
+ let body;
864
+ return new protocol_http_1.HttpRequest({
865
+ protocol,
866
+ hostname,
867
+ port,
868
+ method: "GET",
869
+ headers,
870
+ path: resolvedPath,
871
+ query,
872
+ body,
873
+ });
874
+ };
875
+ exports.serializeAws_restJson1GetNetworkResourceRelationshipsCommand = serializeAws_restJson1GetNetworkResourceRelationshipsCommand;
876
+ const serializeAws_restJson1GetNetworkResourcesCommand = async (input, context) => {
877
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
878
+ const headers = {};
879
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
880
+ "/global-networks/{GlobalNetworkId}/network-resources";
881
+ if (input.GlobalNetworkId !== undefined) {
882
+ const labelValue = input.GlobalNetworkId;
883
+ if (labelValue.length <= 0) {
884
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
885
+ }
886
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
887
+ }
888
+ else {
889
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
890
+ }
891
+ const query = {
892
+ ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }),
893
+ ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }),
894
+ ...(input.AccountId !== undefined && { accountId: input.AccountId }),
895
+ ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }),
896
+ ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }),
897
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
898
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
899
+ };
900
+ let body;
901
+ return new protocol_http_1.HttpRequest({
902
+ protocol,
903
+ hostname,
904
+ port,
905
+ method: "GET",
906
+ headers,
907
+ path: resolvedPath,
908
+ query,
909
+ body,
910
+ });
911
+ };
912
+ exports.serializeAws_restJson1GetNetworkResourcesCommand = serializeAws_restJson1GetNetworkResourcesCommand;
913
+ const serializeAws_restJson1GetNetworkRoutesCommand = async (input, context) => {
914
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
915
+ const headers = {
916
+ "content-type": "application/json",
917
+ };
918
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
919
+ "/global-networks/{GlobalNetworkId}/network-routes";
920
+ if (input.GlobalNetworkId !== undefined) {
921
+ const labelValue = input.GlobalNetworkId;
922
+ if (labelValue.length <= 0) {
923
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
924
+ }
925
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
926
+ }
927
+ else {
928
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
929
+ }
930
+ let body;
931
+ body = JSON.stringify({
932
+ ...(input.DestinationFilters !== undefined &&
933
+ input.DestinationFilters !== null && {
934
+ DestinationFilters: serializeAws_restJson1FilterMap(input.DestinationFilters, context),
935
+ }),
936
+ ...(input.ExactCidrMatches !== undefined &&
937
+ input.ExactCidrMatches !== null && {
938
+ ExactCidrMatches: serializeAws_restJson1StringList(input.ExactCidrMatches, context),
939
+ }),
940
+ ...(input.LongestPrefixMatches !== undefined &&
941
+ input.LongestPrefixMatches !== null && {
942
+ LongestPrefixMatches: serializeAws_restJson1StringList(input.LongestPrefixMatches, context),
943
+ }),
944
+ ...(input.PrefixListIds !== undefined &&
945
+ input.PrefixListIds !== null && {
946
+ PrefixListIds: serializeAws_restJson1StringList(input.PrefixListIds, context),
947
+ }),
948
+ ...(input.RouteTableIdentifier !== undefined &&
949
+ input.RouteTableIdentifier !== null && {
950
+ RouteTableIdentifier: serializeAws_restJson1RouteTableIdentifier(input.RouteTableIdentifier, context),
951
+ }),
952
+ ...(input.States !== undefined &&
953
+ input.States !== null && { States: serializeAws_restJson1RouteStateList(input.States, context) }),
954
+ ...(input.SubnetOfMatches !== undefined &&
955
+ input.SubnetOfMatches !== null && {
956
+ SubnetOfMatches: serializeAws_restJson1StringList(input.SubnetOfMatches, context),
957
+ }),
958
+ ...(input.SupernetOfMatches !== undefined &&
959
+ input.SupernetOfMatches !== null && {
960
+ SupernetOfMatches: serializeAws_restJson1StringList(input.SupernetOfMatches, context),
961
+ }),
962
+ ...(input.Types !== undefined &&
963
+ input.Types !== null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) }),
964
+ });
965
+ return new protocol_http_1.HttpRequest({
966
+ protocol,
967
+ hostname,
968
+ port,
969
+ method: "POST",
970
+ headers,
971
+ path: resolvedPath,
972
+ body,
973
+ });
974
+ };
975
+ exports.serializeAws_restJson1GetNetworkRoutesCommand = serializeAws_restJson1GetNetworkRoutesCommand;
976
+ const serializeAws_restJson1GetNetworkTelemetryCommand = async (input, context) => {
977
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
978
+ const headers = {};
979
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
980
+ "/global-networks/{GlobalNetworkId}/network-telemetry";
981
+ if (input.GlobalNetworkId !== undefined) {
982
+ const labelValue = input.GlobalNetworkId;
983
+ if (labelValue.length <= 0) {
984
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
985
+ }
986
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
987
+ }
988
+ else {
989
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
990
+ }
991
+ const query = {
992
+ ...(input.RegisteredGatewayArn !== undefined && { registeredGatewayArn: input.RegisteredGatewayArn }),
993
+ ...(input.AwsRegion !== undefined && { awsRegion: input.AwsRegion }),
994
+ ...(input.AccountId !== undefined && { accountId: input.AccountId }),
995
+ ...(input.ResourceType !== undefined && { resourceType: input.ResourceType }),
996
+ ...(input.ResourceArn !== undefined && { resourceArn: input.ResourceArn }),
997
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
998
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
999
+ };
1000
+ let body;
1001
+ return new protocol_http_1.HttpRequest({
1002
+ protocol,
1003
+ hostname,
1004
+ port,
1005
+ method: "GET",
1006
+ headers,
1007
+ path: resolvedPath,
1008
+ query,
1009
+ body,
1010
+ });
1011
+ };
1012
+ exports.serializeAws_restJson1GetNetworkTelemetryCommand = serializeAws_restJson1GetNetworkTelemetryCommand;
1013
+ const serializeAws_restJson1GetRouteAnalysisCommand = async (input, context) => {
1014
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1015
+ const headers = {};
1016
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1017
+ "/global-networks/{GlobalNetworkId}/route-analyses/{RouteAnalysisId}";
1018
+ if (input.GlobalNetworkId !== undefined) {
1019
+ const labelValue = input.GlobalNetworkId;
1020
+ if (labelValue.length <= 0) {
1021
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
1022
+ }
1023
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1024
+ }
1025
+ else {
1026
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
1027
+ }
1028
+ if (input.RouteAnalysisId !== undefined) {
1029
+ const labelValue = input.RouteAnalysisId;
1030
+ if (labelValue.length <= 0) {
1031
+ throw new Error("Empty value provided for input HTTP label: RouteAnalysisId.");
1032
+ }
1033
+ resolvedPath = resolvedPath.replace("{RouteAnalysisId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1034
+ }
1035
+ else {
1036
+ throw new Error("No value provided for input HTTP label: RouteAnalysisId.");
1037
+ }
1038
+ let body;
1039
+ return new protocol_http_1.HttpRequest({
1040
+ protocol,
1041
+ hostname,
1042
+ port,
1043
+ method: "GET",
1044
+ headers,
1045
+ path: resolvedPath,
1046
+ body,
1047
+ });
1048
+ };
1049
+ exports.serializeAws_restJson1GetRouteAnalysisCommand = serializeAws_restJson1GetRouteAnalysisCommand;
806
1050
  const serializeAws_restJson1GetSitesCommand = async (input, context) => {
807
1051
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
808
1052
  const headers = {};
@@ -964,6 +1208,49 @@ const serializeAws_restJson1RegisterTransitGatewayCommand = async (input, contex
964
1208
  });
965
1209
  };
966
1210
  exports.serializeAws_restJson1RegisterTransitGatewayCommand = serializeAws_restJson1RegisterTransitGatewayCommand;
1211
+ const serializeAws_restJson1StartRouteAnalysisCommand = async (input, context) => {
1212
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1213
+ const headers = {
1214
+ "content-type": "application/json",
1215
+ };
1216
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1217
+ "/global-networks/{GlobalNetworkId}/route-analyses";
1218
+ if (input.GlobalNetworkId !== undefined) {
1219
+ const labelValue = input.GlobalNetworkId;
1220
+ if (labelValue.length <= 0) {
1221
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
1222
+ }
1223
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1224
+ }
1225
+ else {
1226
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
1227
+ }
1228
+ let body;
1229
+ body = JSON.stringify({
1230
+ ...(input.Destination !== undefined &&
1231
+ input.Destination !== null && {
1232
+ Destination: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Destination, context),
1233
+ }),
1234
+ ...(input.IncludeReturnPath !== undefined &&
1235
+ input.IncludeReturnPath !== null && { IncludeReturnPath: input.IncludeReturnPath }),
1236
+ ...(input.Source !== undefined &&
1237
+ input.Source !== null && {
1238
+ Source: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Source, context),
1239
+ }),
1240
+ ...(input.UseMiddleboxes !== undefined &&
1241
+ input.UseMiddleboxes !== null && { UseMiddleboxes: input.UseMiddleboxes }),
1242
+ });
1243
+ return new protocol_http_1.HttpRequest({
1244
+ protocol,
1245
+ hostname,
1246
+ port,
1247
+ method: "POST",
1248
+ headers,
1249
+ path: resolvedPath,
1250
+ body,
1251
+ });
1252
+ };
1253
+ exports.serializeAws_restJson1StartRouteAnalysisCommand = serializeAws_restJson1StartRouteAnalysisCommand;
967
1254
  const serializeAws_restJson1TagResourceCommand = async (input, context) => {
968
1255
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
969
1256
  const headers = {
@@ -1199,6 +1486,51 @@ const serializeAws_restJson1UpdateLinkCommand = async (input, context) => {
1199
1486
  });
1200
1487
  };
1201
1488
  exports.serializeAws_restJson1UpdateLinkCommand = serializeAws_restJson1UpdateLinkCommand;
1489
+ const serializeAws_restJson1UpdateNetworkResourceMetadataCommand = async (input, context) => {
1490
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1491
+ const headers = {
1492
+ "content-type": "application/json",
1493
+ };
1494
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1495
+ "/global-networks/{GlobalNetworkId}/network-resources/{ResourceArn}/metadata";
1496
+ if (input.GlobalNetworkId !== undefined) {
1497
+ const labelValue = input.GlobalNetworkId;
1498
+ if (labelValue.length <= 0) {
1499
+ throw new Error("Empty value provided for input HTTP label: GlobalNetworkId.");
1500
+ }
1501
+ resolvedPath = resolvedPath.replace("{GlobalNetworkId}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1502
+ }
1503
+ else {
1504
+ throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
1505
+ }
1506
+ if (input.ResourceArn !== undefined) {
1507
+ const labelValue = input.ResourceArn;
1508
+ if (labelValue.length <= 0) {
1509
+ throw new Error("Empty value provided for input HTTP label: ResourceArn.");
1510
+ }
1511
+ resolvedPath = resolvedPath.replace("{ResourceArn}", smithy_client_1.extendedEncodeURIComponent(labelValue));
1512
+ }
1513
+ else {
1514
+ throw new Error("No value provided for input HTTP label: ResourceArn.");
1515
+ }
1516
+ let body;
1517
+ body = JSON.stringify({
1518
+ ...(input.Metadata !== undefined &&
1519
+ input.Metadata !== null && {
1520
+ Metadata: serializeAws_restJson1NetworkResourceMetadataMap(input.Metadata, context),
1521
+ }),
1522
+ });
1523
+ return new protocol_http_1.HttpRequest({
1524
+ protocol,
1525
+ hostname,
1526
+ port,
1527
+ method: "PATCH",
1528
+ headers,
1529
+ path: resolvedPath,
1530
+ body,
1531
+ });
1532
+ };
1533
+ exports.serializeAws_restJson1UpdateNetworkResourceMetadataCommand = serializeAws_restJson1UpdateNetworkResourceMetadataCommand;
1202
1534
  const serializeAws_restJson1UpdateSiteCommand = async (input, context) => {
1203
1535
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1204
1536
  const headers = {
@@ -3299,22 +3631,522 @@ const deserializeAws_restJson1GetLinksCommandError = async (output, context) =>
3299
3631
  delete response.Message;
3300
3632
  return Promise.reject(Object.assign(new Error(message), response));
3301
3633
  };
3302
- const deserializeAws_restJson1GetSitesCommand = async (output, context) => {
3634
+ const deserializeAws_restJson1GetNetworkResourceCountsCommand = async (output, context) => {
3303
3635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3304
- return deserializeAws_restJson1GetSitesCommandError(output, context);
3636
+ return deserializeAws_restJson1GetNetworkResourceCountsCommandError(output, context);
3305
3637
  }
3306
3638
  const contents = {
3307
3639
  $metadata: deserializeMetadata(output),
3640
+ NetworkResourceCounts: undefined,
3308
3641
  NextToken: undefined,
3309
- Sites: undefined,
3310
3642
  };
3311
3643
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3644
+ if (data.NetworkResourceCounts !== undefined && data.NetworkResourceCounts !== null) {
3645
+ contents.NetworkResourceCounts = deserializeAws_restJson1NetworkResourceCountList(data.NetworkResourceCounts, context);
3646
+ }
3312
3647
  if (data.NextToken !== undefined && data.NextToken !== null) {
3313
3648
  contents.NextToken = smithy_client_1.expectString(data.NextToken);
3314
3649
  }
3315
- if (data.Sites !== undefined && data.Sites !== null) {
3316
- contents.Sites = deserializeAws_restJson1SiteList(data.Sites, context);
3317
- }
3650
+ return Promise.resolve(contents);
3651
+ };
3652
+ exports.deserializeAws_restJson1GetNetworkResourceCountsCommand = deserializeAws_restJson1GetNetworkResourceCountsCommand;
3653
+ const deserializeAws_restJson1GetNetworkResourceCountsCommandError = async (output, context) => {
3654
+ const parsedOutput = {
3655
+ ...output,
3656
+ body: await parseBody(output.body, context),
3657
+ };
3658
+ let response;
3659
+ let errorCode = "UnknownError";
3660
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3661
+ switch (errorCode) {
3662
+ case "AccessDeniedException":
3663
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3664
+ response = {
3665
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3666
+ name: errorCode,
3667
+ $metadata: deserializeMetadata(output),
3668
+ };
3669
+ break;
3670
+ case "InternalServerException":
3671
+ case "com.amazonaws.networkmanager#InternalServerException":
3672
+ response = {
3673
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3674
+ name: errorCode,
3675
+ $metadata: deserializeMetadata(output),
3676
+ };
3677
+ break;
3678
+ case "ThrottlingException":
3679
+ case "com.amazonaws.networkmanager#ThrottlingException":
3680
+ response = {
3681
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3682
+ name: errorCode,
3683
+ $metadata: deserializeMetadata(output),
3684
+ };
3685
+ break;
3686
+ case "ValidationException":
3687
+ case "com.amazonaws.networkmanager#ValidationException":
3688
+ response = {
3689
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3690
+ name: errorCode,
3691
+ $metadata: deserializeMetadata(output),
3692
+ };
3693
+ break;
3694
+ default:
3695
+ const parsedBody = parsedOutput.body;
3696
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3697
+ response = {
3698
+ ...parsedBody,
3699
+ name: `${errorCode}`,
3700
+ message: parsedBody.message || parsedBody.Message || errorCode,
3701
+ $fault: "client",
3702
+ $metadata: deserializeMetadata(output),
3703
+ };
3704
+ }
3705
+ const message = response.message || response.Message || errorCode;
3706
+ response.message = message;
3707
+ delete response.Message;
3708
+ return Promise.reject(Object.assign(new Error(message), response));
3709
+ };
3710
+ const deserializeAws_restJson1GetNetworkResourceRelationshipsCommand = async (output, context) => {
3711
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3712
+ return deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError(output, context);
3713
+ }
3714
+ const contents = {
3715
+ $metadata: deserializeMetadata(output),
3716
+ NextToken: undefined,
3717
+ Relationships: undefined,
3718
+ };
3719
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3720
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3721
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
3722
+ }
3723
+ if (data.Relationships !== undefined && data.Relationships !== null) {
3724
+ contents.Relationships = deserializeAws_restJson1RelationshipList(data.Relationships, context);
3725
+ }
3726
+ return Promise.resolve(contents);
3727
+ };
3728
+ exports.deserializeAws_restJson1GetNetworkResourceRelationshipsCommand = deserializeAws_restJson1GetNetworkResourceRelationshipsCommand;
3729
+ const deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError = async (output, context) => {
3730
+ const parsedOutput = {
3731
+ ...output,
3732
+ body: await parseBody(output.body, context),
3733
+ };
3734
+ let response;
3735
+ let errorCode = "UnknownError";
3736
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3737
+ switch (errorCode) {
3738
+ case "AccessDeniedException":
3739
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3740
+ response = {
3741
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3742
+ name: errorCode,
3743
+ $metadata: deserializeMetadata(output),
3744
+ };
3745
+ break;
3746
+ case "InternalServerException":
3747
+ case "com.amazonaws.networkmanager#InternalServerException":
3748
+ response = {
3749
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3750
+ name: errorCode,
3751
+ $metadata: deserializeMetadata(output),
3752
+ };
3753
+ break;
3754
+ case "ResourceNotFoundException":
3755
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
3756
+ response = {
3757
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3758
+ name: errorCode,
3759
+ $metadata: deserializeMetadata(output),
3760
+ };
3761
+ break;
3762
+ case "ThrottlingException":
3763
+ case "com.amazonaws.networkmanager#ThrottlingException":
3764
+ response = {
3765
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3766
+ name: errorCode,
3767
+ $metadata: deserializeMetadata(output),
3768
+ };
3769
+ break;
3770
+ case "ValidationException":
3771
+ case "com.amazonaws.networkmanager#ValidationException":
3772
+ response = {
3773
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3774
+ name: errorCode,
3775
+ $metadata: deserializeMetadata(output),
3776
+ };
3777
+ break;
3778
+ default:
3779
+ const parsedBody = parsedOutput.body;
3780
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3781
+ response = {
3782
+ ...parsedBody,
3783
+ name: `${errorCode}`,
3784
+ message: parsedBody.message || parsedBody.Message || errorCode,
3785
+ $fault: "client",
3786
+ $metadata: deserializeMetadata(output),
3787
+ };
3788
+ }
3789
+ const message = response.message || response.Message || errorCode;
3790
+ response.message = message;
3791
+ delete response.Message;
3792
+ return Promise.reject(Object.assign(new Error(message), response));
3793
+ };
3794
+ const deserializeAws_restJson1GetNetworkResourcesCommand = async (output, context) => {
3795
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3796
+ return deserializeAws_restJson1GetNetworkResourcesCommandError(output, context);
3797
+ }
3798
+ const contents = {
3799
+ $metadata: deserializeMetadata(output),
3800
+ NetworkResources: undefined,
3801
+ NextToken: undefined,
3802
+ };
3803
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3804
+ if (data.NetworkResources !== undefined && data.NetworkResources !== null) {
3805
+ contents.NetworkResources = deserializeAws_restJson1NetworkResourceList(data.NetworkResources, context);
3806
+ }
3807
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3808
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
3809
+ }
3810
+ return Promise.resolve(contents);
3811
+ };
3812
+ exports.deserializeAws_restJson1GetNetworkResourcesCommand = deserializeAws_restJson1GetNetworkResourcesCommand;
3813
+ const deserializeAws_restJson1GetNetworkResourcesCommandError = async (output, context) => {
3814
+ const parsedOutput = {
3815
+ ...output,
3816
+ body: await parseBody(output.body, context),
3817
+ };
3818
+ let response;
3819
+ let errorCode = "UnknownError";
3820
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3821
+ switch (errorCode) {
3822
+ case "AccessDeniedException":
3823
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3824
+ response = {
3825
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3826
+ name: errorCode,
3827
+ $metadata: deserializeMetadata(output),
3828
+ };
3829
+ break;
3830
+ case "InternalServerException":
3831
+ case "com.amazonaws.networkmanager#InternalServerException":
3832
+ response = {
3833
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3834
+ name: errorCode,
3835
+ $metadata: deserializeMetadata(output),
3836
+ };
3837
+ break;
3838
+ case "ResourceNotFoundException":
3839
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
3840
+ response = {
3841
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3842
+ name: errorCode,
3843
+ $metadata: deserializeMetadata(output),
3844
+ };
3845
+ break;
3846
+ case "ThrottlingException":
3847
+ case "com.amazonaws.networkmanager#ThrottlingException":
3848
+ response = {
3849
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3850
+ name: errorCode,
3851
+ $metadata: deserializeMetadata(output),
3852
+ };
3853
+ break;
3854
+ case "ValidationException":
3855
+ case "com.amazonaws.networkmanager#ValidationException":
3856
+ response = {
3857
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3858
+ name: errorCode,
3859
+ $metadata: deserializeMetadata(output),
3860
+ };
3861
+ break;
3862
+ default:
3863
+ const parsedBody = parsedOutput.body;
3864
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3865
+ response = {
3866
+ ...parsedBody,
3867
+ name: `${errorCode}`,
3868
+ message: parsedBody.message || parsedBody.Message || errorCode,
3869
+ $fault: "client",
3870
+ $metadata: deserializeMetadata(output),
3871
+ };
3872
+ }
3873
+ const message = response.message || response.Message || errorCode;
3874
+ response.message = message;
3875
+ delete response.Message;
3876
+ return Promise.reject(Object.assign(new Error(message), response));
3877
+ };
3878
+ const deserializeAws_restJson1GetNetworkRoutesCommand = async (output, context) => {
3879
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3880
+ return deserializeAws_restJson1GetNetworkRoutesCommandError(output, context);
3881
+ }
3882
+ const contents = {
3883
+ $metadata: deserializeMetadata(output),
3884
+ NetworkRoutes: undefined,
3885
+ RouteTableArn: undefined,
3886
+ RouteTableTimestamp: undefined,
3887
+ RouteTableType: undefined,
3888
+ };
3889
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3890
+ if (data.NetworkRoutes !== undefined && data.NetworkRoutes !== null) {
3891
+ contents.NetworkRoutes = deserializeAws_restJson1NetworkRouteList(data.NetworkRoutes, context);
3892
+ }
3893
+ if (data.RouteTableArn !== undefined && data.RouteTableArn !== null) {
3894
+ contents.RouteTableArn = smithy_client_1.expectString(data.RouteTableArn);
3895
+ }
3896
+ if (data.RouteTableTimestamp !== undefined && data.RouteTableTimestamp !== null) {
3897
+ contents.RouteTableTimestamp = smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(data.RouteTableTimestamp)));
3898
+ }
3899
+ if (data.RouteTableType !== undefined && data.RouteTableType !== null) {
3900
+ contents.RouteTableType = smithy_client_1.expectString(data.RouteTableType);
3901
+ }
3902
+ return Promise.resolve(contents);
3903
+ };
3904
+ exports.deserializeAws_restJson1GetNetworkRoutesCommand = deserializeAws_restJson1GetNetworkRoutesCommand;
3905
+ const deserializeAws_restJson1GetNetworkRoutesCommandError = async (output, context) => {
3906
+ const parsedOutput = {
3907
+ ...output,
3908
+ body: await parseBody(output.body, context),
3909
+ };
3910
+ let response;
3911
+ let errorCode = "UnknownError";
3912
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3913
+ switch (errorCode) {
3914
+ case "AccessDeniedException":
3915
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3916
+ response = {
3917
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
3918
+ name: errorCode,
3919
+ $metadata: deserializeMetadata(output),
3920
+ };
3921
+ break;
3922
+ case "InternalServerException":
3923
+ case "com.amazonaws.networkmanager#InternalServerException":
3924
+ response = {
3925
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
3926
+ name: errorCode,
3927
+ $metadata: deserializeMetadata(output),
3928
+ };
3929
+ break;
3930
+ case "ResourceNotFoundException":
3931
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
3932
+ response = {
3933
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
3934
+ name: errorCode,
3935
+ $metadata: deserializeMetadata(output),
3936
+ };
3937
+ break;
3938
+ case "ThrottlingException":
3939
+ case "com.amazonaws.networkmanager#ThrottlingException":
3940
+ response = {
3941
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
3942
+ name: errorCode,
3943
+ $metadata: deserializeMetadata(output),
3944
+ };
3945
+ break;
3946
+ case "ValidationException":
3947
+ case "com.amazonaws.networkmanager#ValidationException":
3948
+ response = {
3949
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
3950
+ name: errorCode,
3951
+ $metadata: deserializeMetadata(output),
3952
+ };
3953
+ break;
3954
+ default:
3955
+ const parsedBody = parsedOutput.body;
3956
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3957
+ response = {
3958
+ ...parsedBody,
3959
+ name: `${errorCode}`,
3960
+ message: parsedBody.message || parsedBody.Message || errorCode,
3961
+ $fault: "client",
3962
+ $metadata: deserializeMetadata(output),
3963
+ };
3964
+ }
3965
+ const message = response.message || response.Message || errorCode;
3966
+ response.message = message;
3967
+ delete response.Message;
3968
+ return Promise.reject(Object.assign(new Error(message), response));
3969
+ };
3970
+ const deserializeAws_restJson1GetNetworkTelemetryCommand = async (output, context) => {
3971
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3972
+ return deserializeAws_restJson1GetNetworkTelemetryCommandError(output, context);
3973
+ }
3974
+ const contents = {
3975
+ $metadata: deserializeMetadata(output),
3976
+ NetworkTelemetry: undefined,
3977
+ NextToken: undefined,
3978
+ };
3979
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3980
+ if (data.NetworkTelemetry !== undefined && data.NetworkTelemetry !== null) {
3981
+ contents.NetworkTelemetry = deserializeAws_restJson1NetworkTelemetryList(data.NetworkTelemetry, context);
3982
+ }
3983
+ if (data.NextToken !== undefined && data.NextToken !== null) {
3984
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
3985
+ }
3986
+ return Promise.resolve(contents);
3987
+ };
3988
+ exports.deserializeAws_restJson1GetNetworkTelemetryCommand = deserializeAws_restJson1GetNetworkTelemetryCommand;
3989
+ const deserializeAws_restJson1GetNetworkTelemetryCommandError = async (output, context) => {
3990
+ const parsedOutput = {
3991
+ ...output,
3992
+ body: await parseBody(output.body, context),
3993
+ };
3994
+ let response;
3995
+ let errorCode = "UnknownError";
3996
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3997
+ switch (errorCode) {
3998
+ case "AccessDeniedException":
3999
+ case "com.amazonaws.networkmanager#AccessDeniedException":
4000
+ response = {
4001
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
4002
+ name: errorCode,
4003
+ $metadata: deserializeMetadata(output),
4004
+ };
4005
+ break;
4006
+ case "InternalServerException":
4007
+ case "com.amazonaws.networkmanager#InternalServerException":
4008
+ response = {
4009
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
4010
+ name: errorCode,
4011
+ $metadata: deserializeMetadata(output),
4012
+ };
4013
+ break;
4014
+ case "ResourceNotFoundException":
4015
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
4016
+ response = {
4017
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
4018
+ name: errorCode,
4019
+ $metadata: deserializeMetadata(output),
4020
+ };
4021
+ break;
4022
+ case "ThrottlingException":
4023
+ case "com.amazonaws.networkmanager#ThrottlingException":
4024
+ response = {
4025
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
4026
+ name: errorCode,
4027
+ $metadata: deserializeMetadata(output),
4028
+ };
4029
+ break;
4030
+ case "ValidationException":
4031
+ case "com.amazonaws.networkmanager#ValidationException":
4032
+ response = {
4033
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
4034
+ name: errorCode,
4035
+ $metadata: deserializeMetadata(output),
4036
+ };
4037
+ break;
4038
+ default:
4039
+ const parsedBody = parsedOutput.body;
4040
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
4041
+ response = {
4042
+ ...parsedBody,
4043
+ name: `${errorCode}`,
4044
+ message: parsedBody.message || parsedBody.Message || errorCode,
4045
+ $fault: "client",
4046
+ $metadata: deserializeMetadata(output),
4047
+ };
4048
+ }
4049
+ const message = response.message || response.Message || errorCode;
4050
+ response.message = message;
4051
+ delete response.Message;
4052
+ return Promise.reject(Object.assign(new Error(message), response));
4053
+ };
4054
+ const deserializeAws_restJson1GetRouteAnalysisCommand = async (output, context) => {
4055
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4056
+ return deserializeAws_restJson1GetRouteAnalysisCommandError(output, context);
4057
+ }
4058
+ const contents = {
4059
+ $metadata: deserializeMetadata(output),
4060
+ RouteAnalysis: undefined,
4061
+ };
4062
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
4063
+ if (data.RouteAnalysis !== undefined && data.RouteAnalysis !== null) {
4064
+ contents.RouteAnalysis = deserializeAws_restJson1RouteAnalysis(data.RouteAnalysis, context);
4065
+ }
4066
+ return Promise.resolve(contents);
4067
+ };
4068
+ exports.deserializeAws_restJson1GetRouteAnalysisCommand = deserializeAws_restJson1GetRouteAnalysisCommand;
4069
+ const deserializeAws_restJson1GetRouteAnalysisCommandError = async (output, context) => {
4070
+ const parsedOutput = {
4071
+ ...output,
4072
+ body: await parseBody(output.body, context),
4073
+ };
4074
+ let response;
4075
+ let errorCode = "UnknownError";
4076
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4077
+ switch (errorCode) {
4078
+ case "AccessDeniedException":
4079
+ case "com.amazonaws.networkmanager#AccessDeniedException":
4080
+ response = {
4081
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
4082
+ name: errorCode,
4083
+ $metadata: deserializeMetadata(output),
4084
+ };
4085
+ break;
4086
+ case "InternalServerException":
4087
+ case "com.amazonaws.networkmanager#InternalServerException":
4088
+ response = {
4089
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
4090
+ name: errorCode,
4091
+ $metadata: deserializeMetadata(output),
4092
+ };
4093
+ break;
4094
+ case "ResourceNotFoundException":
4095
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
4096
+ response = {
4097
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
4098
+ name: errorCode,
4099
+ $metadata: deserializeMetadata(output),
4100
+ };
4101
+ break;
4102
+ case "ThrottlingException":
4103
+ case "com.amazonaws.networkmanager#ThrottlingException":
4104
+ response = {
4105
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
4106
+ name: errorCode,
4107
+ $metadata: deserializeMetadata(output),
4108
+ };
4109
+ break;
4110
+ case "ValidationException":
4111
+ case "com.amazonaws.networkmanager#ValidationException":
4112
+ response = {
4113
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
4114
+ name: errorCode,
4115
+ $metadata: deserializeMetadata(output),
4116
+ };
4117
+ break;
4118
+ default:
4119
+ const parsedBody = parsedOutput.body;
4120
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
4121
+ response = {
4122
+ ...parsedBody,
4123
+ name: `${errorCode}`,
4124
+ message: parsedBody.message || parsedBody.Message || errorCode,
4125
+ $fault: "client",
4126
+ $metadata: deserializeMetadata(output),
4127
+ };
4128
+ }
4129
+ const message = response.message || response.Message || errorCode;
4130
+ response.message = message;
4131
+ delete response.Message;
4132
+ return Promise.reject(Object.assign(new Error(message), response));
4133
+ };
4134
+ const deserializeAws_restJson1GetSitesCommand = async (output, context) => {
4135
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4136
+ return deserializeAws_restJson1GetSitesCommandError(output, context);
4137
+ }
4138
+ const contents = {
4139
+ $metadata: deserializeMetadata(output),
4140
+ NextToken: undefined,
4141
+ Sites: undefined,
4142
+ };
4143
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
4144
+ if (data.NextToken !== undefined && data.NextToken !== null) {
4145
+ contents.NextToken = smithy_client_1.expectString(data.NextToken);
4146
+ }
4147
+ if (data.Sites !== undefined && data.Sites !== null) {
4148
+ contents.Sites = deserializeAws_restJson1SiteList(data.Sites, context);
4149
+ }
3318
4150
  return Promise.resolve(contents);
3319
4151
  };
3320
4152
  exports.deserializeAws_restJson1GetSitesCommand = deserializeAws_restJson1GetSitesCommand;
@@ -3639,22 +4471,110 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
3639
4471
  delete response.Message;
3640
4472
  return Promise.reject(Object.assign(new Error(message), response));
3641
4473
  };
3642
- const deserializeAws_restJson1RegisterTransitGatewayCommand = async (output, context) => {
4474
+ const deserializeAws_restJson1RegisterTransitGatewayCommand = async (output, context) => {
4475
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4476
+ return deserializeAws_restJson1RegisterTransitGatewayCommandError(output, context);
4477
+ }
4478
+ const contents = {
4479
+ $metadata: deserializeMetadata(output),
4480
+ TransitGatewayRegistration: undefined,
4481
+ };
4482
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
4483
+ if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) {
4484
+ contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration(data.TransitGatewayRegistration, context);
4485
+ }
4486
+ return Promise.resolve(contents);
4487
+ };
4488
+ exports.deserializeAws_restJson1RegisterTransitGatewayCommand = deserializeAws_restJson1RegisterTransitGatewayCommand;
4489
+ const deserializeAws_restJson1RegisterTransitGatewayCommandError = async (output, context) => {
4490
+ const parsedOutput = {
4491
+ ...output,
4492
+ body: await parseBody(output.body, context),
4493
+ };
4494
+ let response;
4495
+ let errorCode = "UnknownError";
4496
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4497
+ switch (errorCode) {
4498
+ case "AccessDeniedException":
4499
+ case "com.amazonaws.networkmanager#AccessDeniedException":
4500
+ response = {
4501
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
4502
+ name: errorCode,
4503
+ $metadata: deserializeMetadata(output),
4504
+ };
4505
+ break;
4506
+ case "ConflictException":
4507
+ case "com.amazonaws.networkmanager#ConflictException":
4508
+ response = {
4509
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
4510
+ name: errorCode,
4511
+ $metadata: deserializeMetadata(output),
4512
+ };
4513
+ break;
4514
+ case "InternalServerException":
4515
+ case "com.amazonaws.networkmanager#InternalServerException":
4516
+ response = {
4517
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
4518
+ name: errorCode,
4519
+ $metadata: deserializeMetadata(output),
4520
+ };
4521
+ break;
4522
+ case "ResourceNotFoundException":
4523
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
4524
+ response = {
4525
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
4526
+ name: errorCode,
4527
+ $metadata: deserializeMetadata(output),
4528
+ };
4529
+ break;
4530
+ case "ThrottlingException":
4531
+ case "com.amazonaws.networkmanager#ThrottlingException":
4532
+ response = {
4533
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
4534
+ name: errorCode,
4535
+ $metadata: deserializeMetadata(output),
4536
+ };
4537
+ break;
4538
+ case "ValidationException":
4539
+ case "com.amazonaws.networkmanager#ValidationException":
4540
+ response = {
4541
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
4542
+ name: errorCode,
4543
+ $metadata: deserializeMetadata(output),
4544
+ };
4545
+ break;
4546
+ default:
4547
+ const parsedBody = parsedOutput.body;
4548
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
4549
+ response = {
4550
+ ...parsedBody,
4551
+ name: `${errorCode}`,
4552
+ message: parsedBody.message || parsedBody.Message || errorCode,
4553
+ $fault: "client",
4554
+ $metadata: deserializeMetadata(output),
4555
+ };
4556
+ }
4557
+ const message = response.message || response.Message || errorCode;
4558
+ response.message = message;
4559
+ delete response.Message;
4560
+ return Promise.reject(Object.assign(new Error(message), response));
4561
+ };
4562
+ const deserializeAws_restJson1StartRouteAnalysisCommand = async (output, context) => {
3643
4563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3644
- return deserializeAws_restJson1RegisterTransitGatewayCommandError(output, context);
4564
+ return deserializeAws_restJson1StartRouteAnalysisCommandError(output, context);
3645
4565
  }
3646
4566
  const contents = {
3647
4567
  $metadata: deserializeMetadata(output),
3648
- TransitGatewayRegistration: undefined,
4568
+ RouteAnalysis: undefined,
3649
4569
  };
3650
4570
  const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
3651
- if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) {
3652
- contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration(data.TransitGatewayRegistration, context);
4571
+ if (data.RouteAnalysis !== undefined && data.RouteAnalysis !== null) {
4572
+ contents.RouteAnalysis = deserializeAws_restJson1RouteAnalysis(data.RouteAnalysis, context);
3653
4573
  }
3654
4574
  return Promise.resolve(contents);
3655
4575
  };
3656
- exports.deserializeAws_restJson1RegisterTransitGatewayCommand = deserializeAws_restJson1RegisterTransitGatewayCommand;
3657
- const deserializeAws_restJson1RegisterTransitGatewayCommandError = async (output, context) => {
4576
+ exports.deserializeAws_restJson1StartRouteAnalysisCommand = deserializeAws_restJson1StartRouteAnalysisCommand;
4577
+ const deserializeAws_restJson1StartRouteAnalysisCommandError = async (output, context) => {
3658
4578
  const parsedOutput = {
3659
4579
  ...output,
3660
4580
  body: await parseBody(output.body, context),
@@ -4263,6 +5183,98 @@ const deserializeAws_restJson1UpdateLinkCommandError = async (output, context) =
4263
5183
  delete response.Message;
4264
5184
  return Promise.reject(Object.assign(new Error(message), response));
4265
5185
  };
5186
+ const deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = async (output, context) => {
5187
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5188
+ return deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError(output, context);
5189
+ }
5190
+ const contents = {
5191
+ $metadata: deserializeMetadata(output),
5192
+ Metadata: undefined,
5193
+ ResourceArn: undefined,
5194
+ };
5195
+ const data = smithy_client_1.expectNonNull(smithy_client_1.expectObject(await parseBody(output.body, context)), "body");
5196
+ if (data.Metadata !== undefined && data.Metadata !== null) {
5197
+ contents.Metadata = deserializeAws_restJson1NetworkResourceMetadataMap(data.Metadata, context);
5198
+ }
5199
+ if (data.ResourceArn !== undefined && data.ResourceArn !== null) {
5200
+ contents.ResourceArn = smithy_client_1.expectString(data.ResourceArn);
5201
+ }
5202
+ return Promise.resolve(contents);
5203
+ };
5204
+ exports.deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = deserializeAws_restJson1UpdateNetworkResourceMetadataCommand;
5205
+ const deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError = async (output, context) => {
5206
+ const parsedOutput = {
5207
+ ...output,
5208
+ body: await parseBody(output.body, context),
5209
+ };
5210
+ let response;
5211
+ let errorCode = "UnknownError";
5212
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5213
+ switch (errorCode) {
5214
+ case "AccessDeniedException":
5215
+ case "com.amazonaws.networkmanager#AccessDeniedException":
5216
+ response = {
5217
+ ...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
5218
+ name: errorCode,
5219
+ $metadata: deserializeMetadata(output),
5220
+ };
5221
+ break;
5222
+ case "ConflictException":
5223
+ case "com.amazonaws.networkmanager#ConflictException":
5224
+ response = {
5225
+ ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
5226
+ name: errorCode,
5227
+ $metadata: deserializeMetadata(output),
5228
+ };
5229
+ break;
5230
+ case "InternalServerException":
5231
+ case "com.amazonaws.networkmanager#InternalServerException":
5232
+ response = {
5233
+ ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
5234
+ name: errorCode,
5235
+ $metadata: deserializeMetadata(output),
5236
+ };
5237
+ break;
5238
+ case "ResourceNotFoundException":
5239
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
5240
+ response = {
5241
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
5242
+ name: errorCode,
5243
+ $metadata: deserializeMetadata(output),
5244
+ };
5245
+ break;
5246
+ case "ThrottlingException":
5247
+ case "com.amazonaws.networkmanager#ThrottlingException":
5248
+ response = {
5249
+ ...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
5250
+ name: errorCode,
5251
+ $metadata: deserializeMetadata(output),
5252
+ };
5253
+ break;
5254
+ case "ValidationException":
5255
+ case "com.amazonaws.networkmanager#ValidationException":
5256
+ response = {
5257
+ ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
5258
+ name: errorCode,
5259
+ $metadata: deserializeMetadata(output),
5260
+ };
5261
+ break;
5262
+ default:
5263
+ const parsedBody = parsedOutput.body;
5264
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
5265
+ response = {
5266
+ ...parsedBody,
5267
+ name: `${errorCode}`,
5268
+ message: parsedBody.message || parsedBody.Message || errorCode,
5269
+ $fault: "client",
5270
+ $metadata: deserializeMetadata(output),
5271
+ };
5272
+ }
5273
+ const message = response.message || response.Message || errorCode;
5274
+ response.message = message;
5275
+ delete response.Message;
5276
+ return Promise.reject(Object.assign(new Error(message), response));
5277
+ };
4266
5278
  const deserializeAws_restJson1UpdateSiteCommand = async (output, context) => {
4267
5279
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4268
5280
  return deserializeAws_restJson1UpdateSiteCommandError(output, context);
@@ -4407,11 +5419,15 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
4407
5419
  name: "ResourceNotFoundException",
4408
5420
  $fault: "client",
4409
5421
  $metadata: deserializeMetadata(parsedOutput),
5422
+ Context: undefined,
4410
5423
  Message: undefined,
4411
5424
  ResourceId: undefined,
4412
5425
  ResourceType: undefined,
4413
5426
  };
4414
5427
  const data = parsedOutput.body;
5428
+ if (data.Context !== undefined && data.Context !== null) {
5429
+ contents.Context = deserializeAws_restJson1ExceptionContextMap(data.Context, context);
5430
+ }
4415
5431
  if (data.Message !== undefined && data.Message !== null) {
4416
5432
  contents.Message = smithy_client_1.expectString(data.Message);
4417
5433
  }
@@ -4502,6 +5518,27 @@ const serializeAws_restJson1Bandwidth = (input, context) => {
4502
5518
  ...(input.UploadSpeed !== undefined && input.UploadSpeed !== null && { UploadSpeed: input.UploadSpeed }),
4503
5519
  };
4504
5520
  };
5521
+ const serializeAws_restJson1FilterMap = (input, context) => {
5522
+ return Object.entries(input).reduce((acc, [key, value]) => {
5523
+ if (value === null) {
5524
+ return acc;
5525
+ }
5526
+ return {
5527
+ ...acc,
5528
+ [key]: serializeAws_restJson1FilterValues(value, context),
5529
+ };
5530
+ }, {});
5531
+ };
5532
+ const serializeAws_restJson1FilterValues = (input, context) => {
5533
+ return input
5534
+ .filter((e) => e != null)
5535
+ .map((entry) => {
5536
+ if (entry === null) {
5537
+ return null;
5538
+ }
5539
+ return entry;
5540
+ });
5541
+ };
4505
5542
  const serializeAws_restJson1Location = (input, context) => {
4506
5543
  return {
4507
5544
  ...(input.Address !== undefined && input.Address !== null && { Address: input.Address }),
@@ -4509,6 +5546,60 @@ const serializeAws_restJson1Location = (input, context) => {
4509
5546
  ...(input.Longitude !== undefined && input.Longitude !== null && { Longitude: input.Longitude }),
4510
5547
  };
4511
5548
  };
5549
+ const serializeAws_restJson1NetworkResourceMetadataMap = (input, context) => {
5550
+ return Object.entries(input).reduce((acc, [key, value]) => {
5551
+ if (value === null) {
5552
+ return acc;
5553
+ }
5554
+ return {
5555
+ ...acc,
5556
+ [key]: value,
5557
+ };
5558
+ }, {});
5559
+ };
5560
+ const serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification = (input, context) => {
5561
+ return {
5562
+ ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }),
5563
+ ...(input.TransitGatewayAttachmentArn !== undefined &&
5564
+ input.TransitGatewayAttachmentArn !== null && { TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn }),
5565
+ };
5566
+ };
5567
+ const serializeAws_restJson1RouteStateList = (input, context) => {
5568
+ return input
5569
+ .filter((e) => e != null)
5570
+ .map((entry) => {
5571
+ if (entry === null) {
5572
+ return null;
5573
+ }
5574
+ return entry;
5575
+ });
5576
+ };
5577
+ const serializeAws_restJson1RouteTableIdentifier = (input, context) => {
5578
+ return {
5579
+ ...(input.TransitGatewayRouteTableArn !== undefined &&
5580
+ input.TransitGatewayRouteTableArn !== null && { TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn }),
5581
+ };
5582
+ };
5583
+ const serializeAws_restJson1RouteTypeList = (input, context) => {
5584
+ return input
5585
+ .filter((e) => e != null)
5586
+ .map((entry) => {
5587
+ if (entry === null) {
5588
+ return null;
5589
+ }
5590
+ return entry;
5591
+ });
5592
+ };
5593
+ const serializeAws_restJson1StringList = (input, context) => {
5594
+ return input
5595
+ .filter((e) => e != null)
5596
+ .map((entry) => {
5597
+ if (entry === null) {
5598
+ return null;
5599
+ }
5600
+ return entry;
5601
+ });
5602
+ };
4512
5603
  const serializeAws_restJson1Tag = (input, context) => {
4513
5604
  return {
4514
5605
  ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
@@ -4556,6 +5647,15 @@ const deserializeAws_restJson1Connection = (output, context) => {
4556
5647
  : undefined,
4557
5648
  };
4558
5649
  };
5650
+ const deserializeAws_restJson1ConnectionHealth = (output, context) => {
5651
+ return {
5652
+ Status: smithy_client_1.expectString(output.Status),
5653
+ Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
5654
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.Timestamp)))
5655
+ : undefined,
5656
+ Type: smithy_client_1.expectString(output.Type),
5657
+ };
5658
+ };
4559
5659
  const deserializeAws_restJson1ConnectionList = (output, context) => {
4560
5660
  return (output || [])
4561
5661
  .filter((e) => e != null)
@@ -4621,6 +5721,17 @@ const deserializeAws_restJson1DeviceList = (output, context) => {
4621
5721
  return deserializeAws_restJson1Device(entry, context);
4622
5722
  });
4623
5723
  };
5724
+ const deserializeAws_restJson1ExceptionContextMap = (output, context) => {
5725
+ return Object.entries(output).reduce((acc, [key, value]) => {
5726
+ if (value === null) {
5727
+ return acc;
5728
+ }
5729
+ return {
5730
+ ...acc,
5731
+ [key]: smithy_client_1.expectString(value),
5732
+ };
5733
+ }, {});
5734
+ };
4624
5735
  const deserializeAws_restJson1GlobalNetwork = (output, context) => {
4625
5736
  return {
4626
5737
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
@@ -4701,6 +5812,232 @@ const deserializeAws_restJson1Location = (output, context) => {
4701
5812
  Longitude: smithy_client_1.expectString(output.Longitude),
4702
5813
  };
4703
5814
  };
5815
+ const deserializeAws_restJson1NetworkResource = (output, context) => {
5816
+ return {
5817
+ AccountId: smithy_client_1.expectString(output.AccountId),
5818
+ AwsRegion: smithy_client_1.expectString(output.AwsRegion),
5819
+ Definition: smithy_client_1.expectString(output.Definition),
5820
+ DefinitionTimestamp: output.DefinitionTimestamp !== undefined && output.DefinitionTimestamp !== null
5821
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.DefinitionTimestamp)))
5822
+ : undefined,
5823
+ Metadata: output.Metadata !== undefined && output.Metadata !== null
5824
+ ? deserializeAws_restJson1NetworkResourceMetadataMap(output.Metadata, context)
5825
+ : undefined,
5826
+ RegisteredGatewayArn: smithy_client_1.expectString(output.RegisteredGatewayArn),
5827
+ ResourceArn: smithy_client_1.expectString(output.ResourceArn),
5828
+ ResourceId: smithy_client_1.expectString(output.ResourceId),
5829
+ ResourceType: smithy_client_1.expectString(output.ResourceType),
5830
+ Tags: output.Tags !== undefined && output.Tags !== null
5831
+ ? deserializeAws_restJson1TagList(output.Tags, context)
5832
+ : undefined,
5833
+ };
5834
+ };
5835
+ const deserializeAws_restJson1NetworkResourceCount = (output, context) => {
5836
+ return {
5837
+ Count: smithy_client_1.expectInt32(output.Count),
5838
+ ResourceType: smithy_client_1.expectString(output.ResourceType),
5839
+ };
5840
+ };
5841
+ const deserializeAws_restJson1NetworkResourceCountList = (output, context) => {
5842
+ return (output || [])
5843
+ .filter((e) => e != null)
5844
+ .map((entry) => {
5845
+ if (entry === null) {
5846
+ return null;
5847
+ }
5848
+ return deserializeAws_restJson1NetworkResourceCount(entry, context);
5849
+ });
5850
+ };
5851
+ const deserializeAws_restJson1NetworkResourceList = (output, context) => {
5852
+ return (output || [])
5853
+ .filter((e) => e != null)
5854
+ .map((entry) => {
5855
+ if (entry === null) {
5856
+ return null;
5857
+ }
5858
+ return deserializeAws_restJson1NetworkResource(entry, context);
5859
+ });
5860
+ };
5861
+ const deserializeAws_restJson1NetworkResourceMetadataMap = (output, context) => {
5862
+ return Object.entries(output).reduce((acc, [key, value]) => {
5863
+ if (value === null) {
5864
+ return acc;
5865
+ }
5866
+ return {
5867
+ ...acc,
5868
+ [key]: smithy_client_1.expectString(value),
5869
+ };
5870
+ }, {});
5871
+ };
5872
+ const deserializeAws_restJson1NetworkResourceSummary = (output, context) => {
5873
+ return {
5874
+ Definition: smithy_client_1.expectString(output.Definition),
5875
+ IsMiddlebox: smithy_client_1.expectBoolean(output.IsMiddlebox),
5876
+ NameTag: smithy_client_1.expectString(output.NameTag),
5877
+ RegisteredGatewayArn: smithy_client_1.expectString(output.RegisteredGatewayArn),
5878
+ ResourceArn: smithy_client_1.expectString(output.ResourceArn),
5879
+ ResourceType: smithy_client_1.expectString(output.ResourceType),
5880
+ };
5881
+ };
5882
+ const deserializeAws_restJson1NetworkRoute = (output, context) => {
5883
+ return {
5884
+ DestinationCidrBlock: smithy_client_1.expectString(output.DestinationCidrBlock),
5885
+ Destinations: output.Destinations !== undefined && output.Destinations !== null
5886
+ ? deserializeAws_restJson1NetworkRouteDestinationList(output.Destinations, context)
5887
+ : undefined,
5888
+ PrefixListId: smithy_client_1.expectString(output.PrefixListId),
5889
+ State: smithy_client_1.expectString(output.State),
5890
+ Type: smithy_client_1.expectString(output.Type),
5891
+ };
5892
+ };
5893
+ const deserializeAws_restJson1NetworkRouteDestination = (output, context) => {
5894
+ return {
5895
+ ResourceId: smithy_client_1.expectString(output.ResourceId),
5896
+ ResourceType: smithy_client_1.expectString(output.ResourceType),
5897
+ TransitGatewayAttachmentId: smithy_client_1.expectString(output.TransitGatewayAttachmentId),
5898
+ };
5899
+ };
5900
+ const deserializeAws_restJson1NetworkRouteDestinationList = (output, context) => {
5901
+ return (output || [])
5902
+ .filter((e) => e != null)
5903
+ .map((entry) => {
5904
+ if (entry === null) {
5905
+ return null;
5906
+ }
5907
+ return deserializeAws_restJson1NetworkRouteDestination(entry, context);
5908
+ });
5909
+ };
5910
+ const deserializeAws_restJson1NetworkRouteList = (output, context) => {
5911
+ return (output || [])
5912
+ .filter((e) => e != null)
5913
+ .map((entry) => {
5914
+ if (entry === null) {
5915
+ return null;
5916
+ }
5917
+ return deserializeAws_restJson1NetworkRoute(entry, context);
5918
+ });
5919
+ };
5920
+ const deserializeAws_restJson1NetworkTelemetry = (output, context) => {
5921
+ return {
5922
+ AccountId: smithy_client_1.expectString(output.AccountId),
5923
+ Address: smithy_client_1.expectString(output.Address),
5924
+ AwsRegion: smithy_client_1.expectString(output.AwsRegion),
5925
+ Health: output.Health !== undefined && output.Health !== null
5926
+ ? deserializeAws_restJson1ConnectionHealth(output.Health, context)
5927
+ : undefined,
5928
+ RegisteredGatewayArn: smithy_client_1.expectString(output.RegisteredGatewayArn),
5929
+ ResourceArn: smithy_client_1.expectString(output.ResourceArn),
5930
+ ResourceId: smithy_client_1.expectString(output.ResourceId),
5931
+ ResourceType: smithy_client_1.expectString(output.ResourceType),
5932
+ };
5933
+ };
5934
+ const deserializeAws_restJson1NetworkTelemetryList = (output, context) => {
5935
+ return (output || [])
5936
+ .filter((e) => e != null)
5937
+ .map((entry) => {
5938
+ if (entry === null) {
5939
+ return null;
5940
+ }
5941
+ return deserializeAws_restJson1NetworkTelemetry(entry, context);
5942
+ });
5943
+ };
5944
+ const deserializeAws_restJson1PathComponent = (output, context) => {
5945
+ return {
5946
+ DestinationCidrBlock: smithy_client_1.expectString(output.DestinationCidrBlock),
5947
+ Resource: output.Resource !== undefined && output.Resource !== null
5948
+ ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context)
5949
+ : undefined,
5950
+ Sequence: smithy_client_1.expectInt32(output.Sequence),
5951
+ };
5952
+ };
5953
+ const deserializeAws_restJson1PathComponentList = (output, context) => {
5954
+ return (output || [])
5955
+ .filter((e) => e != null)
5956
+ .map((entry) => {
5957
+ if (entry === null) {
5958
+ return null;
5959
+ }
5960
+ return deserializeAws_restJson1PathComponent(entry, context);
5961
+ });
5962
+ };
5963
+ const deserializeAws_restJson1ReasonContextMap = (output, context) => {
5964
+ return Object.entries(output).reduce((acc, [key, value]) => {
5965
+ if (value === null) {
5966
+ return acc;
5967
+ }
5968
+ return {
5969
+ ...acc,
5970
+ [key]: smithy_client_1.expectString(value),
5971
+ };
5972
+ }, {});
5973
+ };
5974
+ const deserializeAws_restJson1Relationship = (output, context) => {
5975
+ return {
5976
+ From: smithy_client_1.expectString(output.From),
5977
+ To: smithy_client_1.expectString(output.To),
5978
+ };
5979
+ };
5980
+ const deserializeAws_restJson1RelationshipList = (output, context) => {
5981
+ return (output || [])
5982
+ .filter((e) => e != null)
5983
+ .map((entry) => {
5984
+ if (entry === null) {
5985
+ return null;
5986
+ }
5987
+ return deserializeAws_restJson1Relationship(entry, context);
5988
+ });
5989
+ };
5990
+ const deserializeAws_restJson1RouteAnalysis = (output, context) => {
5991
+ return {
5992
+ Destination: output.Destination !== undefined && output.Destination !== null
5993
+ ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Destination, context)
5994
+ : undefined,
5995
+ ForwardPath: output.ForwardPath !== undefined && output.ForwardPath !== null
5996
+ ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context)
5997
+ : undefined,
5998
+ GlobalNetworkId: smithy_client_1.expectString(output.GlobalNetworkId),
5999
+ IncludeReturnPath: smithy_client_1.expectBoolean(output.IncludeReturnPath),
6000
+ OwnerAccountId: smithy_client_1.expectString(output.OwnerAccountId),
6001
+ ReturnPath: output.ReturnPath !== undefined && output.ReturnPath !== null
6002
+ ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context)
6003
+ : undefined,
6004
+ RouteAnalysisId: smithy_client_1.expectString(output.RouteAnalysisId),
6005
+ Source: output.Source !== undefined && output.Source !== null
6006
+ ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context)
6007
+ : undefined,
6008
+ StartTimestamp: output.StartTimestamp !== undefined && output.StartTimestamp !== null
6009
+ ? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.StartTimestamp)))
6010
+ : undefined,
6011
+ Status: smithy_client_1.expectString(output.Status),
6012
+ UseMiddleboxes: smithy_client_1.expectBoolean(output.UseMiddleboxes),
6013
+ };
6014
+ };
6015
+ const deserializeAws_restJson1RouteAnalysisCompletion = (output, context) => {
6016
+ return {
6017
+ ReasonCode: smithy_client_1.expectString(output.ReasonCode),
6018
+ ReasonContext: output.ReasonContext !== undefined && output.ReasonContext !== null
6019
+ ? deserializeAws_restJson1ReasonContextMap(output.ReasonContext, context)
6020
+ : undefined,
6021
+ ResultCode: smithy_client_1.expectString(output.ResultCode),
6022
+ };
6023
+ };
6024
+ const deserializeAws_restJson1RouteAnalysisEndpointOptions = (output, context) => {
6025
+ return {
6026
+ IpAddress: smithy_client_1.expectString(output.IpAddress),
6027
+ TransitGatewayArn: smithy_client_1.expectString(output.TransitGatewayArn),
6028
+ TransitGatewayAttachmentArn: smithy_client_1.expectString(output.TransitGatewayAttachmentArn),
6029
+ };
6030
+ };
6031
+ const deserializeAws_restJson1RouteAnalysisPath = (output, context) => {
6032
+ return {
6033
+ CompletionStatus: output.CompletionStatus !== undefined && output.CompletionStatus !== null
6034
+ ? deserializeAws_restJson1RouteAnalysisCompletion(output.CompletionStatus, context)
6035
+ : undefined,
6036
+ Path: output.Path !== undefined && output.Path !== null
6037
+ ? deserializeAws_restJson1PathComponentList(output.Path, context)
6038
+ : undefined,
6039
+ };
6040
+ };
4704
6041
  const deserializeAws_restJson1Site = (output, context) => {
4705
6042
  return {
4706
6043
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null