@aws-sdk/client-networkmanager 3.118.1 → 3.128.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 (65) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/NetworkManager.js +105 -0
  3. package/dist-cjs/commands/CreateTransitGatewayPeeringCommand.js +36 -0
  4. package/dist-cjs/commands/CreateTransitGatewayRouteTableAttachmentCommand.js +36 -0
  5. package/dist-cjs/commands/DeletePeeringCommand.js +36 -0
  6. package/dist-cjs/commands/GetCoreNetworkChangeEventsCommand.js +36 -0
  7. package/dist-cjs/commands/GetTransitGatewayPeeringCommand.js +36 -0
  8. package/dist-cjs/commands/GetTransitGatewayRouteTableAttachmentCommand.js +36 -0
  9. package/dist-cjs/commands/ListPeeringsCommand.js +36 -0
  10. package/dist-cjs/commands/index.js +7 -0
  11. package/dist-cjs/models/models_0.js +143 -5
  12. package/dist-cjs/pagination/GetCoreNetworkChangeEventsPaginator.js +36 -0
  13. package/dist-cjs/pagination/ListPeeringsPaginator.js +36 -0
  14. package/dist-cjs/pagination/index.js +3 -1
  15. package/dist-cjs/protocols/Aws_restJson1.js +1221 -659
  16. package/dist-es/NetworkManager.js +105 -0
  17. package/dist-es/commands/CreateTransitGatewayPeeringCommand.js +39 -0
  18. package/dist-es/commands/CreateTransitGatewayRouteTableAttachmentCommand.js +39 -0
  19. package/dist-es/commands/DeletePeeringCommand.js +39 -0
  20. package/dist-es/commands/GetCoreNetworkChangeEventsCommand.js +39 -0
  21. package/dist-es/commands/GetTransitGatewayPeeringCommand.js +39 -0
  22. package/dist-es/commands/GetTransitGatewayRouteTableAttachmentCommand.js +39 -0
  23. package/dist-es/commands/ListPeeringsCommand.js +39 -0
  24. package/dist-es/commands/index.js +7 -0
  25. package/dist-es/models/models_0.js +99 -0
  26. package/dist-es/pagination/GetCoreNetworkChangeEventsPaginator.js +75 -0
  27. package/dist-es/pagination/ListPeeringsPaginator.js +75 -0
  28. package/dist-es/pagination/index.js +3 -1
  29. package/dist-es/protocols/Aws_restJson1.js +1395 -655
  30. package/dist-types/NetworkManager.d.ts +56 -1
  31. package/dist-types/NetworkManagerClient.d.ts +9 -2
  32. package/dist-types/commands/CreateTransitGatewayPeeringCommand.d.ts +35 -0
  33. package/dist-types/commands/CreateTransitGatewayRouteTableAttachmentCommand.d.ts +35 -0
  34. package/dist-types/commands/DeletePeeringCommand.d.ts +35 -0
  35. package/dist-types/commands/GetCoreNetworkChangeEventsCommand.d.ts +35 -0
  36. package/dist-types/commands/GetCoreNetworkPolicyCommand.d.ts +1 -1
  37. package/dist-types/commands/GetTransitGatewayPeeringCommand.d.ts +35 -0
  38. package/dist-types/commands/GetTransitGatewayRouteTableAttachmentCommand.d.ts +35 -0
  39. package/dist-types/commands/ListOrganizationServiceAccessStatusCommand.d.ts +17 -0
  40. package/dist-types/commands/ListPeeringsCommand.d.ts +35 -0
  41. package/dist-types/commands/StartOrganizationServiceAccessUpdateCommand.d.ts +17 -0
  42. package/dist-types/commands/index.d.ts +7 -0
  43. package/dist-types/models/models_0.d.ts +460 -7
  44. package/dist-types/pagination/GetCoreNetworkChangeEventsPaginator.d.ts +4 -0
  45. package/dist-types/pagination/ListPeeringsPaginator.d.ts +4 -0
  46. package/dist-types/pagination/index.d.ts +3 -1
  47. package/dist-types/protocols/Aws_restJson1.d.ts +21 -0
  48. package/dist-types/ts3.4/NetworkManager.d.ts +37 -0
  49. package/dist-types/ts3.4/NetworkManagerClient.d.ts +9 -2
  50. package/dist-types/ts3.4/commands/CreateTransitGatewayPeeringCommand.d.ts +17 -0
  51. package/dist-types/ts3.4/commands/CreateTransitGatewayRouteTableAttachmentCommand.d.ts +17 -0
  52. package/dist-types/ts3.4/commands/DeletePeeringCommand.d.ts +17 -0
  53. package/dist-types/ts3.4/commands/GetCoreNetworkChangeEventsCommand.d.ts +17 -0
  54. package/dist-types/ts3.4/commands/GetTransitGatewayPeeringCommand.d.ts +17 -0
  55. package/dist-types/ts3.4/commands/GetTransitGatewayRouteTableAttachmentCommand.d.ts +17 -0
  56. package/dist-types/ts3.4/commands/ListOrganizationServiceAccessStatusCommand.d.ts +1 -0
  57. package/dist-types/ts3.4/commands/ListPeeringsCommand.d.ts +17 -0
  58. package/dist-types/ts3.4/commands/StartOrganizationServiceAccessUpdateCommand.d.ts +1 -0
  59. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  60. package/dist-types/ts3.4/models/models_0.d.ts +266 -1
  61. package/dist-types/ts3.4/pagination/GetCoreNetworkChangeEventsPaginator.d.ts +4 -0
  62. package/dist-types/ts3.4/pagination/ListPeeringsPaginator.d.ts +4 -0
  63. package/dist-types/ts3.4/pagination/index.d.ts +3 -1
  64. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +21 -0
  65. package/package.json +26 -26
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serializeAws_restJson1GetRouteAnalysisCommand = exports.serializeAws_restJson1GetResourcePolicyCommand = 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_restJson1GetCoreNetworkPolicyCommand = exports.serializeAws_restJson1GetCoreNetworkChangeSetCommand = exports.serializeAws_restJson1GetCoreNetworkCommand = exports.serializeAws_restJson1GetConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetConnectPeerCommand = exports.serializeAws_restJson1GetConnectionsCommand = exports.serializeAws_restJson1GetConnectAttachmentCommand = exports.serializeAws_restJson1ExecuteCoreNetworkChangeSetCommand = exports.serializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1DisassociateLinkCommand = exports.serializeAws_restJson1DisassociateCustomerGatewayCommand = exports.serializeAws_restJson1DisassociateConnectPeerCommand = exports.serializeAws_restJson1DescribeGlobalNetworksCommand = exports.serializeAws_restJson1DeregisterTransitGatewayCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteResourcePolicyCommand = exports.serializeAws_restJson1DeleteLinkCommand = exports.serializeAws_restJson1DeleteGlobalNetworkCommand = exports.serializeAws_restJson1DeleteDeviceCommand = exports.serializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = exports.serializeAws_restJson1DeleteCoreNetworkCommand = exports.serializeAws_restJson1DeleteConnectPeerCommand = exports.serializeAws_restJson1DeleteConnectionCommand = exports.serializeAws_restJson1DeleteAttachmentCommand = exports.serializeAws_restJson1CreateVpcAttachmentCommand = exports.serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateLinkCommand = exports.serializeAws_restJson1CreateGlobalNetworkCommand = exports.serializeAws_restJson1CreateDeviceCommand = exports.serializeAws_restJson1CreateCoreNetworkCommand = exports.serializeAws_restJson1CreateConnectPeerCommand = exports.serializeAws_restJson1CreateConnectionCommand = exports.serializeAws_restJson1CreateConnectAttachmentCommand = exports.serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1AssociateLinkCommand = exports.serializeAws_restJson1AssociateCustomerGatewayCommand = exports.serializeAws_restJson1AssociateConnectPeerCommand = exports.serializeAws_restJson1AcceptAttachmentCommand = void 0;
4
- exports.deserializeAws_restJson1DeleteGlobalNetworkCommand = exports.deserializeAws_restJson1DeleteDeviceCommand = exports.deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = exports.deserializeAws_restJson1DeleteCoreNetworkCommand = exports.deserializeAws_restJson1DeleteConnectPeerCommand = exports.deserializeAws_restJson1DeleteConnectionCommand = exports.deserializeAws_restJson1DeleteAttachmentCommand = exports.deserializeAws_restJson1CreateVpcAttachmentCommand = exports.deserializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateLinkCommand = exports.deserializeAws_restJson1CreateGlobalNetworkCommand = exports.deserializeAws_restJson1CreateDeviceCommand = exports.deserializeAws_restJson1CreateCoreNetworkCommand = exports.deserializeAws_restJson1CreateConnectPeerCommand = exports.deserializeAws_restJson1CreateConnectionCommand = exports.deserializeAws_restJson1CreateConnectAttachmentCommand = exports.deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1AssociateLinkCommand = exports.deserializeAws_restJson1AssociateCustomerGatewayCommand = exports.deserializeAws_restJson1AssociateConnectPeerCommand = exports.deserializeAws_restJson1AcceptAttachmentCommand = exports.serializeAws_restJson1UpdateVpcAttachmentCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.serializeAws_restJson1UpdateLinkCommand = exports.serializeAws_restJson1UpdateGlobalNetworkCommand = exports.serializeAws_restJson1UpdateDeviceCommand = exports.serializeAws_restJson1UpdateCoreNetworkCommand = exports.serializeAws_restJson1UpdateConnectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartRouteAnalysisCommand = exports.serializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = exports.serializeAws_restJson1RestoreCoreNetworkPolicyVersionCommand = exports.serializeAws_restJson1RejectAttachmentCommand = exports.serializeAws_restJson1RegisterTransitGatewayCommand = exports.serializeAws_restJson1PutResourcePolicyCommand = exports.serializeAws_restJson1PutCoreNetworkPolicyCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListOrganizationServiceAccessStatusCommand = exports.serializeAws_restJson1ListCoreNetworksCommand = exports.serializeAws_restJson1ListCoreNetworkPolicyVersionsCommand = exports.serializeAws_restJson1ListConnectPeersCommand = exports.serializeAws_restJson1ListAttachmentsCommand = exports.serializeAws_restJson1GetVpcAttachmentCommand = exports.serializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = exports.serializeAws_restJson1GetSitesCommand = void 0;
5
- exports.deserializeAws_restJson1UpdateCoreNetworkCommand = exports.deserializeAws_restJson1UpdateConnectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartRouteAnalysisCommand = exports.deserializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = exports.deserializeAws_restJson1RestoreCoreNetworkPolicyVersionCommand = exports.deserializeAws_restJson1RejectAttachmentCommand = exports.deserializeAws_restJson1RegisterTransitGatewayCommand = exports.deserializeAws_restJson1PutResourcePolicyCommand = exports.deserializeAws_restJson1PutCoreNetworkPolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListOrganizationServiceAccessStatusCommand = exports.deserializeAws_restJson1ListCoreNetworksCommand = exports.deserializeAws_restJson1ListCoreNetworkPolicyVersionsCommand = exports.deserializeAws_restJson1ListConnectPeersCommand = exports.deserializeAws_restJson1ListAttachmentsCommand = exports.deserializeAws_restJson1GetVpcAttachmentCommand = exports.deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = exports.deserializeAws_restJson1GetSitesCommand = exports.deserializeAws_restJson1GetRouteAnalysisCommand = exports.deserializeAws_restJson1GetResourcePolicyCommand = 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_restJson1GetCoreNetworkPolicyCommand = exports.deserializeAws_restJson1GetCoreNetworkChangeSetCommand = exports.deserializeAws_restJson1GetCoreNetworkCommand = exports.deserializeAws_restJson1GetConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetConnectPeerCommand = exports.deserializeAws_restJson1GetConnectionsCommand = exports.deserializeAws_restJson1GetConnectAttachmentCommand = exports.deserializeAws_restJson1ExecuteCoreNetworkChangeSetCommand = exports.deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1DisassociateLinkCommand = exports.deserializeAws_restJson1DisassociateCustomerGatewayCommand = exports.deserializeAws_restJson1DisassociateConnectPeerCommand = exports.deserializeAws_restJson1DescribeGlobalNetworksCommand = exports.deserializeAws_restJson1DeregisterTransitGatewayCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteResourcePolicyCommand = exports.deserializeAws_restJson1DeleteLinkCommand = void 0;
6
- exports.deserializeAws_restJson1UpdateVpcAttachmentCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.deserializeAws_restJson1UpdateLinkCommand = exports.deserializeAws_restJson1UpdateGlobalNetworkCommand = exports.deserializeAws_restJson1UpdateDeviceCommand = void 0;
3
+ exports.serializeAws_restJson1GetNetworkResourcesCommand = exports.serializeAws_restJson1GetNetworkResourceRelationshipsCommand = exports.serializeAws_restJson1GetNetworkResourceCountsCommand = exports.serializeAws_restJson1GetLinksCommand = exports.serializeAws_restJson1GetLinkAssociationsCommand = exports.serializeAws_restJson1GetDevicesCommand = exports.serializeAws_restJson1GetCustomerGatewayAssociationsCommand = exports.serializeAws_restJson1GetCoreNetworkPolicyCommand = exports.serializeAws_restJson1GetCoreNetworkChangeSetCommand = exports.serializeAws_restJson1GetCoreNetworkChangeEventsCommand = exports.serializeAws_restJson1GetCoreNetworkCommand = exports.serializeAws_restJson1GetConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetConnectPeerCommand = exports.serializeAws_restJson1GetConnectionsCommand = exports.serializeAws_restJson1GetConnectAttachmentCommand = exports.serializeAws_restJson1ExecuteCoreNetworkChangeSetCommand = exports.serializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1DisassociateLinkCommand = exports.serializeAws_restJson1DisassociateCustomerGatewayCommand = exports.serializeAws_restJson1DisassociateConnectPeerCommand = exports.serializeAws_restJson1DescribeGlobalNetworksCommand = exports.serializeAws_restJson1DeregisterTransitGatewayCommand = exports.serializeAws_restJson1DeleteSiteCommand = exports.serializeAws_restJson1DeleteResourcePolicyCommand = exports.serializeAws_restJson1DeletePeeringCommand = exports.serializeAws_restJson1DeleteLinkCommand = exports.serializeAws_restJson1DeleteGlobalNetworkCommand = exports.serializeAws_restJson1DeleteDeviceCommand = exports.serializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = exports.serializeAws_restJson1DeleteCoreNetworkCommand = exports.serializeAws_restJson1DeleteConnectPeerCommand = exports.serializeAws_restJson1DeleteConnectionCommand = exports.serializeAws_restJson1DeleteAttachmentCommand = exports.serializeAws_restJson1CreateVpcAttachmentCommand = exports.serializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = exports.serializeAws_restJson1CreateTransitGatewayPeeringCommand = exports.serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = exports.serializeAws_restJson1CreateSiteCommand = exports.serializeAws_restJson1CreateLinkCommand = exports.serializeAws_restJson1CreateGlobalNetworkCommand = exports.serializeAws_restJson1CreateDeviceCommand = exports.serializeAws_restJson1CreateCoreNetworkCommand = exports.serializeAws_restJson1CreateConnectPeerCommand = exports.serializeAws_restJson1CreateConnectionCommand = exports.serializeAws_restJson1CreateConnectAttachmentCommand = exports.serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.serializeAws_restJson1AssociateLinkCommand = exports.serializeAws_restJson1AssociateCustomerGatewayCommand = exports.serializeAws_restJson1AssociateConnectPeerCommand = exports.serializeAws_restJson1AcceptAttachmentCommand = void 0;
4
+ exports.deserializeAws_restJson1CreateTransitGatewayPeeringCommand = exports.deserializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = exports.deserializeAws_restJson1CreateSiteCommand = exports.deserializeAws_restJson1CreateLinkCommand = exports.deserializeAws_restJson1CreateGlobalNetworkCommand = exports.deserializeAws_restJson1CreateDeviceCommand = exports.deserializeAws_restJson1CreateCoreNetworkCommand = exports.deserializeAws_restJson1CreateConnectPeerCommand = exports.deserializeAws_restJson1CreateConnectionCommand = exports.deserializeAws_restJson1CreateConnectAttachmentCommand = exports.deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1AssociateLinkCommand = exports.deserializeAws_restJson1AssociateCustomerGatewayCommand = exports.deserializeAws_restJson1AssociateConnectPeerCommand = exports.deserializeAws_restJson1AcceptAttachmentCommand = exports.serializeAws_restJson1UpdateVpcAttachmentCommand = exports.serializeAws_restJson1UpdateSiteCommand = exports.serializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.serializeAws_restJson1UpdateLinkCommand = exports.serializeAws_restJson1UpdateGlobalNetworkCommand = exports.serializeAws_restJson1UpdateDeviceCommand = exports.serializeAws_restJson1UpdateCoreNetworkCommand = exports.serializeAws_restJson1UpdateConnectionCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartRouteAnalysisCommand = exports.serializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = exports.serializeAws_restJson1RestoreCoreNetworkPolicyVersionCommand = exports.serializeAws_restJson1RejectAttachmentCommand = exports.serializeAws_restJson1RegisterTransitGatewayCommand = exports.serializeAws_restJson1PutResourcePolicyCommand = exports.serializeAws_restJson1PutCoreNetworkPolicyCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListPeeringsCommand = exports.serializeAws_restJson1ListOrganizationServiceAccessStatusCommand = exports.serializeAws_restJson1ListCoreNetworksCommand = exports.serializeAws_restJson1ListCoreNetworkPolicyVersionsCommand = exports.serializeAws_restJson1ListConnectPeersCommand = exports.serializeAws_restJson1ListAttachmentsCommand = exports.serializeAws_restJson1GetVpcAttachmentCommand = exports.serializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = exports.serializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.serializeAws_restJson1GetTransitGatewayPeeringCommand = exports.serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.serializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = exports.serializeAws_restJson1GetSitesCommand = exports.serializeAws_restJson1GetRouteAnalysisCommand = exports.serializeAws_restJson1GetResourcePolicyCommand = exports.serializeAws_restJson1GetNetworkTelemetryCommand = exports.serializeAws_restJson1GetNetworkRoutesCommand = void 0;
5
+ exports.deserializeAws_restJson1ListCoreNetworksCommand = exports.deserializeAws_restJson1ListCoreNetworkPolicyVersionsCommand = exports.deserializeAws_restJson1ListConnectPeersCommand = exports.deserializeAws_restJson1ListAttachmentsCommand = exports.deserializeAws_restJson1GetVpcAttachmentCommand = exports.deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = exports.deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = exports.deserializeAws_restJson1GetTransitGatewayPeeringCommand = exports.deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = exports.deserializeAws_restJson1GetSitesCommand = exports.deserializeAws_restJson1GetRouteAnalysisCommand = exports.deserializeAws_restJson1GetResourcePolicyCommand = 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_restJson1GetCoreNetworkPolicyCommand = exports.deserializeAws_restJson1GetCoreNetworkChangeSetCommand = exports.deserializeAws_restJson1GetCoreNetworkChangeEventsCommand = exports.deserializeAws_restJson1GetCoreNetworkCommand = exports.deserializeAws_restJson1GetConnectPeerAssociationsCommand = exports.deserializeAws_restJson1GetConnectPeerCommand = exports.deserializeAws_restJson1GetConnectionsCommand = exports.deserializeAws_restJson1GetConnectAttachmentCommand = exports.deserializeAws_restJson1ExecuteCoreNetworkChangeSetCommand = exports.deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = exports.deserializeAws_restJson1DisassociateLinkCommand = exports.deserializeAws_restJson1DisassociateCustomerGatewayCommand = exports.deserializeAws_restJson1DisassociateConnectPeerCommand = exports.deserializeAws_restJson1DescribeGlobalNetworksCommand = exports.deserializeAws_restJson1DeregisterTransitGatewayCommand = exports.deserializeAws_restJson1DeleteSiteCommand = exports.deserializeAws_restJson1DeleteResourcePolicyCommand = exports.deserializeAws_restJson1DeletePeeringCommand = exports.deserializeAws_restJson1DeleteLinkCommand = exports.deserializeAws_restJson1DeleteGlobalNetworkCommand = exports.deserializeAws_restJson1DeleteDeviceCommand = exports.deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = exports.deserializeAws_restJson1DeleteCoreNetworkCommand = exports.deserializeAws_restJson1DeleteConnectPeerCommand = exports.deserializeAws_restJson1DeleteConnectionCommand = exports.deserializeAws_restJson1DeleteAttachmentCommand = exports.deserializeAws_restJson1CreateVpcAttachmentCommand = exports.deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = void 0;
6
+ exports.deserializeAws_restJson1UpdateVpcAttachmentCommand = exports.deserializeAws_restJson1UpdateSiteCommand = exports.deserializeAws_restJson1UpdateNetworkResourceMetadataCommand = exports.deserializeAws_restJson1UpdateLinkCommand = exports.deserializeAws_restJson1UpdateGlobalNetworkCommand = exports.deserializeAws_restJson1UpdateDeviceCommand = exports.deserializeAws_restJson1UpdateCoreNetworkCommand = exports.deserializeAws_restJson1UpdateConnectionCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartRouteAnalysisCommand = exports.deserializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = exports.deserializeAws_restJson1RestoreCoreNetworkPolicyVersionCommand = exports.deserializeAws_restJson1RejectAttachmentCommand = exports.deserializeAws_restJson1RegisterTransitGatewayCommand = exports.deserializeAws_restJson1PutResourcePolicyCommand = exports.deserializeAws_restJson1PutCoreNetworkPolicyCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListPeeringsCommand = exports.deserializeAws_restJson1ListOrganizationServiceAccessStatusCommand = void 0;
7
7
  const protocol_http_1 = require("@aws-sdk/protocol-http");
8
8
  const smithy_client_1 = require("@aws-sdk/smithy-client");
9
9
  const uuid_1 = require("uuid");
@@ -54,9 +54,9 @@ const serializeAws_restJson1AssociateConnectPeerCommand = async (input, context)
54
54
  }
55
55
  let body;
56
56
  body = JSON.stringify({
57
- ...(input.ConnectPeerId !== undefined && input.ConnectPeerId !== null && { ConnectPeerId: input.ConnectPeerId }),
58
- ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
59
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
57
+ ...(input.ConnectPeerId != null && { ConnectPeerId: input.ConnectPeerId }),
58
+ ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
59
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
60
60
  });
61
61
  return new protocol_http_1.HttpRequest({
62
62
  protocol,
@@ -88,10 +88,9 @@ const serializeAws_restJson1AssociateCustomerGatewayCommand = async (input, cont
88
88
  }
89
89
  let body;
90
90
  body = JSON.stringify({
91
- ...(input.CustomerGatewayArn !== undefined &&
92
- input.CustomerGatewayArn !== null && { CustomerGatewayArn: input.CustomerGatewayArn }),
93
- ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
94
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
91
+ ...(input.CustomerGatewayArn != null && { CustomerGatewayArn: input.CustomerGatewayArn }),
92
+ ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
93
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
95
94
  });
96
95
  return new protocol_http_1.HttpRequest({
97
96
  protocol,
@@ -123,8 +122,8 @@ const serializeAws_restJson1AssociateLinkCommand = async (input, context) => {
123
122
  }
124
123
  let body;
125
124
  body = JSON.stringify({
126
- ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
127
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
125
+ ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
126
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
128
127
  });
129
128
  return new protocol_http_1.HttpRequest({
130
129
  protocol,
@@ -156,10 +155,9 @@ const serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = async (i
156
155
  }
157
156
  let body;
158
157
  body = JSON.stringify({
159
- ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
160
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
161
- ...(input.TransitGatewayConnectPeerArn !== undefined &&
162
- input.TransitGatewayConnectPeerArn !== null && {
158
+ ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
159
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
160
+ ...(input.TransitGatewayConnectPeerArn != null && {
163
161
  TransitGatewayConnectPeerArn: input.TransitGatewayConnectPeerArn,
164
162
  }),
165
163
  });
@@ -184,14 +182,11 @@ const serializeAws_restJson1CreateConnectAttachmentCommand = async (input, conte
184
182
  let body;
185
183
  body = JSON.stringify({
186
184
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
187
- ...(input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId }),
188
- ...(input.EdgeLocation !== undefined && input.EdgeLocation !== null && { EdgeLocation: input.EdgeLocation }),
189
- ...(input.Options !== undefined &&
190
- input.Options !== null && { Options: serializeAws_restJson1ConnectAttachmentOptions(input.Options, context) }),
191
- ...(input.Tags !== undefined &&
192
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
193
- ...(input.TransportAttachmentId !== undefined &&
194
- input.TransportAttachmentId !== null && { TransportAttachmentId: input.TransportAttachmentId }),
185
+ ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
186
+ ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }),
187
+ ...(input.Options != null && { Options: serializeAws_restJson1ConnectAttachmentOptions(input.Options, context) }),
188
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
189
+ ...(input.TransportAttachmentId != null && { TransportAttachmentId: input.TransportAttachmentId }),
195
190
  });
196
191
  return new protocol_http_1.HttpRequest({
197
192
  protocol,
@@ -223,15 +218,12 @@ const serializeAws_restJson1CreateConnectionCommand = async (input, context) =>
223
218
  }
224
219
  let body;
225
220
  body = JSON.stringify({
226
- ...(input.ConnectedDeviceId !== undefined &&
227
- input.ConnectedDeviceId !== null && { ConnectedDeviceId: input.ConnectedDeviceId }),
228
- ...(input.ConnectedLinkId !== undefined &&
229
- input.ConnectedLinkId !== null && { ConnectedLinkId: input.ConnectedLinkId }),
230
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
231
- ...(input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId }),
232
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
233
- ...(input.Tags !== undefined &&
234
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
221
+ ...(input.ConnectedDeviceId != null && { ConnectedDeviceId: input.ConnectedDeviceId }),
222
+ ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }),
223
+ ...(input.Description != null && { Description: input.Description }),
224
+ ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
225
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
226
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
235
227
  });
236
228
  return new protocol_http_1.HttpRequest({
237
229
  protocol,
@@ -253,20 +245,15 @@ const serializeAws_restJson1CreateConnectPeerCommand = async (input, context) =>
253
245
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/connect-peers";
254
246
  let body;
255
247
  body = JSON.stringify({
256
- ...(input.BgpOptions !== undefined &&
257
- input.BgpOptions !== null && { BgpOptions: serializeAws_restJson1BgpOptions(input.BgpOptions, context) }),
248
+ ...(input.BgpOptions != null && { BgpOptions: serializeAws_restJson1BgpOptions(input.BgpOptions, context) }),
258
249
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
259
- ...(input.ConnectAttachmentId !== undefined &&
260
- input.ConnectAttachmentId !== null && { ConnectAttachmentId: input.ConnectAttachmentId }),
261
- ...(input.CoreNetworkAddress !== undefined &&
262
- input.CoreNetworkAddress !== null && { CoreNetworkAddress: input.CoreNetworkAddress }),
263
- ...(input.InsideCidrBlocks !== undefined &&
264
- input.InsideCidrBlocks !== null && {
250
+ ...(input.ConnectAttachmentId != null && { ConnectAttachmentId: input.ConnectAttachmentId }),
251
+ ...(input.CoreNetworkAddress != null && { CoreNetworkAddress: input.CoreNetworkAddress }),
252
+ ...(input.InsideCidrBlocks != null && {
265
253
  InsideCidrBlocks: serializeAws_restJson1ConstrainedStringList(input.InsideCidrBlocks, context),
266
254
  }),
267
- ...(input.PeerAddress !== undefined && input.PeerAddress !== null && { PeerAddress: input.PeerAddress }),
268
- ...(input.Tags !== undefined &&
269
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
255
+ ...(input.PeerAddress != null && { PeerAddress: input.PeerAddress }),
256
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
270
257
  });
271
258
  return new protocol_http_1.HttpRequest({
272
259
  protocol,
@@ -289,13 +276,10 @@ const serializeAws_restJson1CreateCoreNetworkCommand = async (input, context) =>
289
276
  let body;
290
277
  body = JSON.stringify({
291
278
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
292
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
293
- ...(input.GlobalNetworkId !== undefined &&
294
- input.GlobalNetworkId !== null && { GlobalNetworkId: input.GlobalNetworkId }),
295
- ...(input.PolicyDocument !== undefined &&
296
- input.PolicyDocument !== null && { PolicyDocument: input.PolicyDocument }),
297
- ...(input.Tags !== undefined &&
298
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
279
+ ...(input.Description != null && { Description: input.Description }),
280
+ ...(input.GlobalNetworkId != null && { GlobalNetworkId: input.GlobalNetworkId }),
281
+ ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }),
282
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
299
283
  });
300
284
  return new protocol_http_1.HttpRequest({
301
285
  protocol,
@@ -327,18 +311,15 @@ const serializeAws_restJson1CreateDeviceCommand = async (input, context) => {
327
311
  }
328
312
  let body;
329
313
  body = JSON.stringify({
330
- ...(input.AWSLocation !== undefined &&
331
- input.AWSLocation !== null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) }),
332
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
333
- ...(input.Location !== undefined &&
334
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }),
335
- ...(input.Model !== undefined && input.Model !== null && { Model: input.Model }),
336
- ...(input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber }),
337
- ...(input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId }),
338
- ...(input.Tags !== undefined &&
339
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
340
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
341
- ...(input.Vendor !== undefined && input.Vendor !== null && { Vendor: input.Vendor }),
314
+ ...(input.AWSLocation != null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) }),
315
+ ...(input.Description != null && { Description: input.Description }),
316
+ ...(input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) }),
317
+ ...(input.Model != null && { Model: input.Model }),
318
+ ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
319
+ ...(input.SiteId != null && { SiteId: input.SiteId }),
320
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
321
+ ...(input.Type != null && { Type: input.Type }),
322
+ ...(input.Vendor != null && { Vendor: input.Vendor }),
342
323
  });
343
324
  return new protocol_http_1.HttpRequest({
344
325
  protocol,
@@ -359,9 +340,8 @@ const serializeAws_restJson1CreateGlobalNetworkCommand = async (input, context)
359
340
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks";
360
341
  let body;
361
342
  body = JSON.stringify({
362
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
363
- ...(input.Tags !== undefined &&
364
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
343
+ ...(input.Description != null && { Description: input.Description }),
344
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
365
345
  });
366
346
  return new protocol_http_1.HttpRequest({
367
347
  protocol,
@@ -392,14 +372,12 @@ const serializeAws_restJson1CreateLinkCommand = async (input, context) => {
392
372
  }
393
373
  let body;
394
374
  body = JSON.stringify({
395
- ...(input.Bandwidth !== undefined &&
396
- input.Bandwidth !== null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) }),
397
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
398
- ...(input.Provider !== undefined && input.Provider !== null && { Provider: input.Provider }),
399
- ...(input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId }),
400
- ...(input.Tags !== undefined &&
401
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
402
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
375
+ ...(input.Bandwidth != null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) }),
376
+ ...(input.Description != null && { Description: input.Description }),
377
+ ...(input.Provider != null && { Provider: input.Provider }),
378
+ ...(input.SiteId != null && { SiteId: input.SiteId }),
379
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
380
+ ...(input.Type != null && { Type: input.Type }),
403
381
  });
404
382
  return new protocol_http_1.HttpRequest({
405
383
  protocol,
@@ -430,11 +408,9 @@ const serializeAws_restJson1CreateSiteCommand = async (input, context) => {
430
408
  }
431
409
  let body;
432
410
  body = JSON.stringify({
433
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
434
- ...(input.Location !== undefined &&
435
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }),
436
- ...(input.Tags !== undefined &&
437
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
411
+ ...(input.Description != null && { Description: input.Description }),
412
+ ...(input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) }),
413
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
438
414
  });
439
415
  return new protocol_http_1.HttpRequest({
440
416
  protocol,
@@ -457,11 +433,9 @@ const serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = async (input,
457
433
  let body;
458
434
  body = JSON.stringify({
459
435
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
460
- ...(input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId }),
461
- ...(input.Tags !== undefined &&
462
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
463
- ...(input.VpnConnectionArn !== undefined &&
464
- input.VpnConnectionArn !== null && { VpnConnectionArn: input.VpnConnectionArn }),
436
+ ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
437
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
438
+ ...(input.VpnConnectionArn != null && { VpnConnectionArn: input.VpnConnectionArn }),
465
439
  });
466
440
  return new protocol_http_1.HttpRequest({
467
441
  protocol,
@@ -474,6 +448,58 @@ const serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = async (input,
474
448
  });
475
449
  };
476
450
  exports.serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand;
451
+ const serializeAws_restJson1CreateTransitGatewayPeeringCommand = async (input, context) => {
452
+ var _a;
453
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
454
+ const headers = {
455
+ "content-type": "application/json",
456
+ };
457
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-peerings";
458
+ let body;
459
+ body = JSON.stringify({
460
+ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
461
+ ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
462
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
463
+ ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }),
464
+ });
465
+ return new protocol_http_1.HttpRequest({
466
+ protocol,
467
+ hostname,
468
+ port,
469
+ method: "POST",
470
+ headers,
471
+ path: resolvedPath,
472
+ body,
473
+ });
474
+ };
475
+ exports.serializeAws_restJson1CreateTransitGatewayPeeringCommand = serializeAws_restJson1CreateTransitGatewayPeeringCommand;
476
+ const serializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = async (input, context) => {
477
+ var _a;
478
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
479
+ const headers = {
480
+ "content-type": "application/json",
481
+ };
482
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-route-table-attachments";
483
+ let body;
484
+ body = JSON.stringify({
485
+ ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
486
+ ...(input.PeeringId != null && { PeeringId: input.PeeringId }),
487
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
488
+ ...(input.TransitGatewayRouteTableArn != null && {
489
+ TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
490
+ }),
491
+ });
492
+ return new protocol_http_1.HttpRequest({
493
+ protocol,
494
+ hostname,
495
+ port,
496
+ method: "POST",
497
+ headers,
498
+ path: resolvedPath,
499
+ body,
500
+ });
501
+ };
502
+ exports.serializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = serializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand;
477
503
  const serializeAws_restJson1CreateVpcAttachmentCommand = async (input, context) => {
478
504
  var _a;
479
505
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -484,14 +510,11 @@ const serializeAws_restJson1CreateVpcAttachmentCommand = async (input, context)
484
510
  let body;
485
511
  body = JSON.stringify({
486
512
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
487
- ...(input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId }),
488
- ...(input.Options !== undefined &&
489
- input.Options !== null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) }),
490
- ...(input.SubnetArns !== undefined &&
491
- input.SubnetArns !== null && { SubnetArns: serializeAws_restJson1SubnetArnList(input.SubnetArns, context) }),
492
- ...(input.Tags !== undefined &&
493
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
494
- ...(input.VpcArn !== undefined && input.VpcArn !== null && { VpcArn: input.VpcArn }),
513
+ ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
514
+ ...(input.Options != null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) }),
515
+ ...(input.SubnetArns != null && { SubnetArns: serializeAws_restJson1SubnetArnList(input.SubnetArns, context) }),
516
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
517
+ ...(input.VpcArn != null && { VpcArn: input.VpcArn }),
495
518
  });
496
519
  return new protocol_http_1.HttpRequest({
497
520
  protocol,
@@ -756,6 +779,32 @@ const serializeAws_restJson1DeleteLinkCommand = async (input, context) => {
756
779
  });
757
780
  };
758
781
  exports.serializeAws_restJson1DeleteLinkCommand = serializeAws_restJson1DeleteLinkCommand;
782
+ const serializeAws_restJson1DeletePeeringCommand = async (input, context) => {
783
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
784
+ const headers = {};
785
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/peerings/{PeeringId}";
786
+ if (input.PeeringId !== undefined) {
787
+ const labelValue = input.PeeringId;
788
+ if (labelValue.length <= 0) {
789
+ throw new Error("Empty value provided for input HTTP label: PeeringId.");
790
+ }
791
+ resolvedPath = resolvedPath.replace("{PeeringId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
792
+ }
793
+ else {
794
+ throw new Error("No value provided for input HTTP label: PeeringId.");
795
+ }
796
+ let body;
797
+ return new protocol_http_1.HttpRequest({
798
+ protocol,
799
+ hostname,
800
+ port,
801
+ method: "DELETE",
802
+ headers,
803
+ path: resolvedPath,
804
+ body,
805
+ });
806
+ };
807
+ exports.serializeAws_restJson1DeletePeeringCommand = serializeAws_restJson1DeletePeeringCommand;
759
808
  const serializeAws_restJson1DeleteResourcePolicyCommand = async (input, context) => {
760
809
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
761
810
  const headers = {};
@@ -1209,6 +1258,48 @@ const serializeAws_restJson1GetCoreNetworkCommand = async (input, context) => {
1209
1258
  });
1210
1259
  };
1211
1260
  exports.serializeAws_restJson1GetCoreNetworkCommand = serializeAws_restJson1GetCoreNetworkCommand;
1261
+ const serializeAws_restJson1GetCoreNetworkChangeEventsCommand = async (input, context) => {
1262
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1263
+ const headers = {};
1264
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1265
+ "/core-networks/{CoreNetworkId}/core-network-change-events/{PolicyVersionId}";
1266
+ if (input.CoreNetworkId !== undefined) {
1267
+ const labelValue = input.CoreNetworkId;
1268
+ if (labelValue.length <= 0) {
1269
+ throw new Error("Empty value provided for input HTTP label: CoreNetworkId.");
1270
+ }
1271
+ resolvedPath = resolvedPath.replace("{CoreNetworkId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1272
+ }
1273
+ else {
1274
+ throw new Error("No value provided for input HTTP label: CoreNetworkId.");
1275
+ }
1276
+ if (input.PolicyVersionId !== undefined) {
1277
+ const labelValue = input.PolicyVersionId.toString();
1278
+ if (labelValue.length <= 0) {
1279
+ throw new Error("Empty value provided for input HTTP label: PolicyVersionId.");
1280
+ }
1281
+ resolvedPath = resolvedPath.replace("{PolicyVersionId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1282
+ }
1283
+ else {
1284
+ throw new Error("No value provided for input HTTP label: PolicyVersionId.");
1285
+ }
1286
+ const query = {
1287
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
1288
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
1289
+ };
1290
+ let body;
1291
+ return new protocol_http_1.HttpRequest({
1292
+ protocol,
1293
+ hostname,
1294
+ port,
1295
+ method: "GET",
1296
+ headers,
1297
+ path: resolvedPath,
1298
+ query,
1299
+ body,
1300
+ });
1301
+ };
1302
+ exports.serializeAws_restJson1GetCoreNetworkChangeEventsCommand = serializeAws_restJson1GetCoreNetworkChangeEventsCommand;
1212
1303
  const serializeAws_restJson1GetCoreNetworkChangeSetCommand = async (input, context) => {
1213
1304
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1214
1305
  const headers = {};
@@ -1549,38 +1640,29 @@ const serializeAws_restJson1GetNetworkRoutesCommand = async (input, context) =>
1549
1640
  }
1550
1641
  let body;
1551
1642
  body = JSON.stringify({
1552
- ...(input.DestinationFilters !== undefined &&
1553
- input.DestinationFilters !== null && {
1643
+ ...(input.DestinationFilters != null && {
1554
1644
  DestinationFilters: serializeAws_restJson1FilterMap(input.DestinationFilters, context),
1555
1645
  }),
1556
- ...(input.ExactCidrMatches !== undefined &&
1557
- input.ExactCidrMatches !== null && {
1646
+ ...(input.ExactCidrMatches != null && {
1558
1647
  ExactCidrMatches: serializeAws_restJson1ConstrainedStringList(input.ExactCidrMatches, context),
1559
1648
  }),
1560
- ...(input.LongestPrefixMatches !== undefined &&
1561
- input.LongestPrefixMatches !== null && {
1649
+ ...(input.LongestPrefixMatches != null && {
1562
1650
  LongestPrefixMatches: serializeAws_restJson1ConstrainedStringList(input.LongestPrefixMatches, context),
1563
1651
  }),
1564
- ...(input.PrefixListIds !== undefined &&
1565
- input.PrefixListIds !== null && {
1652
+ ...(input.PrefixListIds != null && {
1566
1653
  PrefixListIds: serializeAws_restJson1ConstrainedStringList(input.PrefixListIds, context),
1567
1654
  }),
1568
- ...(input.RouteTableIdentifier !== undefined &&
1569
- input.RouteTableIdentifier !== null && {
1655
+ ...(input.RouteTableIdentifier != null && {
1570
1656
  RouteTableIdentifier: serializeAws_restJson1RouteTableIdentifier(input.RouteTableIdentifier, context),
1571
1657
  }),
1572
- ...(input.States !== undefined &&
1573
- input.States !== null && { States: serializeAws_restJson1RouteStateList(input.States, context) }),
1574
- ...(input.SubnetOfMatches !== undefined &&
1575
- input.SubnetOfMatches !== null && {
1658
+ ...(input.States != null && { States: serializeAws_restJson1RouteStateList(input.States, context) }),
1659
+ ...(input.SubnetOfMatches != null && {
1576
1660
  SubnetOfMatches: serializeAws_restJson1ConstrainedStringList(input.SubnetOfMatches, context),
1577
1661
  }),
1578
- ...(input.SupernetOfMatches !== undefined &&
1579
- input.SupernetOfMatches !== null && {
1662
+ ...(input.SupernetOfMatches != null && {
1580
1663
  SupernetOfMatches: serializeAws_restJson1ConstrainedStringList(input.SupernetOfMatches, context),
1581
1664
  }),
1582
- ...(input.Types !== undefined &&
1583
- input.Types !== null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) }),
1665
+ ...(input.Types != null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) }),
1584
1666
  });
1585
1667
  return new protocol_http_1.HttpRequest({
1586
1668
  protocol,
@@ -1788,6 +1870,32 @@ const serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = as
1788
1870
  });
1789
1871
  };
1790
1872
  exports.serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand;
1873
+ const serializeAws_restJson1GetTransitGatewayPeeringCommand = async (input, context) => {
1874
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1875
+ const headers = {};
1876
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-peerings/{PeeringId}";
1877
+ if (input.PeeringId !== undefined) {
1878
+ const labelValue = input.PeeringId;
1879
+ if (labelValue.length <= 0) {
1880
+ throw new Error("Empty value provided for input HTTP label: PeeringId.");
1881
+ }
1882
+ resolvedPath = resolvedPath.replace("{PeeringId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1883
+ }
1884
+ else {
1885
+ throw new Error("No value provided for input HTTP label: PeeringId.");
1886
+ }
1887
+ let body;
1888
+ return new protocol_http_1.HttpRequest({
1889
+ protocol,
1890
+ hostname,
1891
+ port,
1892
+ method: "GET",
1893
+ headers,
1894
+ path: resolvedPath,
1895
+ body,
1896
+ });
1897
+ };
1898
+ exports.serializeAws_restJson1GetTransitGatewayPeeringCommand = serializeAws_restJson1GetTransitGatewayPeeringCommand;
1791
1899
  const serializeAws_restJson1GetTransitGatewayRegistrationsCommand = async (input, context) => {
1792
1900
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1793
1901
  const headers = {};
@@ -1823,6 +1931,33 @@ const serializeAws_restJson1GetTransitGatewayRegistrationsCommand = async (input
1823
1931
  });
1824
1932
  };
1825
1933
  exports.serializeAws_restJson1GetTransitGatewayRegistrationsCommand = serializeAws_restJson1GetTransitGatewayRegistrationsCommand;
1934
+ const serializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = async (input, context) => {
1935
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1936
+ const headers = {};
1937
+ let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1938
+ "/transit-gateway-route-table-attachments/{AttachmentId}";
1939
+ if (input.AttachmentId !== undefined) {
1940
+ const labelValue = input.AttachmentId;
1941
+ if (labelValue.length <= 0) {
1942
+ throw new Error("Empty value provided for input HTTP label: AttachmentId.");
1943
+ }
1944
+ resolvedPath = resolvedPath.replace("{AttachmentId}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
1945
+ }
1946
+ else {
1947
+ throw new Error("No value provided for input HTTP label: AttachmentId.");
1948
+ }
1949
+ let body;
1950
+ return new protocol_http_1.HttpRequest({
1951
+ protocol,
1952
+ hostname,
1953
+ port,
1954
+ method: "GET",
1955
+ headers,
1956
+ path: resolvedPath,
1957
+ body,
1958
+ });
1959
+ };
1960
+ exports.serializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = serializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand;
1826
1961
  const serializeAws_restJson1GetVpcAttachmentCommand = async (input, context) => {
1827
1962
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1828
1963
  const headers = {};
@@ -1971,6 +2106,31 @@ const serializeAws_restJson1ListOrganizationServiceAccessStatusCommand = async (
1971
2106
  });
1972
2107
  };
1973
2108
  exports.serializeAws_restJson1ListOrganizationServiceAccessStatusCommand = serializeAws_restJson1ListOrganizationServiceAccessStatusCommand;
2109
+ const serializeAws_restJson1ListPeeringsCommand = async (input, context) => {
2110
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2111
+ const headers = {};
2112
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/peerings";
2113
+ const query = {
2114
+ ...(input.CoreNetworkId !== undefined && { coreNetworkId: input.CoreNetworkId }),
2115
+ ...(input.PeeringType !== undefined && { peeringType: input.PeeringType }),
2116
+ ...(input.EdgeLocation !== undefined && { edgeLocation: input.EdgeLocation }),
2117
+ ...(input.State !== undefined && { state: input.State }),
2118
+ ...(input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() }),
2119
+ ...(input.NextToken !== undefined && { nextToken: input.NextToken }),
2120
+ };
2121
+ let body;
2122
+ return new protocol_http_1.HttpRequest({
2123
+ protocol,
2124
+ hostname,
2125
+ port,
2126
+ method: "GET",
2127
+ headers,
2128
+ path: resolvedPath,
2129
+ query,
2130
+ body,
2131
+ });
2132
+ };
2133
+ exports.serializeAws_restJson1ListPeeringsCommand = serializeAws_restJson1ListPeeringsCommand;
1974
2134
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
1975
2135
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1976
2136
  const headers = {};
@@ -2018,11 +2178,9 @@ const serializeAws_restJson1PutCoreNetworkPolicyCommand = async (input, context)
2018
2178
  let body;
2019
2179
  body = JSON.stringify({
2020
2180
  ClientToken: (_a = input.ClientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
2021
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2022
- ...(input.LatestVersionId !== undefined &&
2023
- input.LatestVersionId !== null && { LatestVersionId: input.LatestVersionId }),
2024
- ...(input.PolicyDocument !== undefined &&
2025
- input.PolicyDocument !== null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
2181
+ ...(input.Description != null && { Description: input.Description }),
2182
+ ...(input.LatestVersionId != null && { LatestVersionId: input.LatestVersionId }),
2183
+ ...(input.PolicyDocument != null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
2026
2184
  });
2027
2185
  return new protocol_http_1.HttpRequest({
2028
2186
  protocol,
@@ -2053,8 +2211,7 @@ const serializeAws_restJson1PutResourcePolicyCommand = async (input, context) =>
2053
2211
  }
2054
2212
  let body;
2055
2213
  body = JSON.stringify({
2056
- ...(input.PolicyDocument !== undefined &&
2057
- input.PolicyDocument !== null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
2214
+ ...(input.PolicyDocument != null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
2058
2215
  });
2059
2216
  return new protocol_http_1.HttpRequest({
2060
2217
  protocol,
@@ -2086,8 +2243,7 @@ const serializeAws_restJson1RegisterTransitGatewayCommand = async (input, contex
2086
2243
  }
2087
2244
  let body;
2088
2245
  body = JSON.stringify({
2089
- ...(input.TransitGatewayArn !== undefined &&
2090
- input.TransitGatewayArn !== null && { TransitGatewayArn: input.TransitGatewayArn }),
2246
+ ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }),
2091
2247
  });
2092
2248
  return new protocol_http_1.HttpRequest({
2093
2249
  protocol,
@@ -2171,7 +2327,7 @@ const serializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = async
2171
2327
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/organizations/service-access";
2172
2328
  let body;
2173
2329
  body = JSON.stringify({
2174
- ...(input.Action !== undefined && input.Action !== null && { Action: input.Action }),
2330
+ ...(input.Action != null && { Action: input.Action }),
2175
2331
  });
2176
2332
  return new protocol_http_1.HttpRequest({
2177
2333
  protocol,
@@ -2203,18 +2359,14 @@ const serializeAws_restJson1StartRouteAnalysisCommand = async (input, context) =
2203
2359
  }
2204
2360
  let body;
2205
2361
  body = JSON.stringify({
2206
- ...(input.Destination !== undefined &&
2207
- input.Destination !== null && {
2362
+ ...(input.Destination != null && {
2208
2363
  Destination: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Destination, context),
2209
2364
  }),
2210
- ...(input.IncludeReturnPath !== undefined &&
2211
- input.IncludeReturnPath !== null && { IncludeReturnPath: input.IncludeReturnPath }),
2212
- ...(input.Source !== undefined &&
2213
- input.Source !== null && {
2365
+ ...(input.IncludeReturnPath != null && { IncludeReturnPath: input.IncludeReturnPath }),
2366
+ ...(input.Source != null && {
2214
2367
  Source: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Source, context),
2215
2368
  }),
2216
- ...(input.UseMiddleboxes !== undefined &&
2217
- input.UseMiddleboxes !== null && { UseMiddleboxes: input.UseMiddleboxes }),
2369
+ ...(input.UseMiddleboxes != null && { UseMiddleboxes: input.UseMiddleboxes }),
2218
2370
  });
2219
2371
  return new protocol_http_1.HttpRequest({
2220
2372
  protocol,
@@ -2245,8 +2397,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2245
2397
  }
2246
2398
  let body;
2247
2399
  body = JSON.stringify({
2248
- ...(input.Tags !== undefined &&
2249
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
2400
+ ...(input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) }),
2250
2401
  });
2251
2402
  return new protocol_http_1.HttpRequest({
2252
2403
  protocol,
@@ -2318,10 +2469,9 @@ const serializeAws_restJson1UpdateConnectionCommand = async (input, context) =>
2318
2469
  }
2319
2470
  let body;
2320
2471
  body = JSON.stringify({
2321
- ...(input.ConnectedLinkId !== undefined &&
2322
- input.ConnectedLinkId !== null && { ConnectedLinkId: input.ConnectedLinkId }),
2323
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2324
- ...(input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId }),
2472
+ ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }),
2473
+ ...(input.Description != null && { Description: input.Description }),
2474
+ ...(input.LinkId != null && { LinkId: input.LinkId }),
2325
2475
  });
2326
2476
  return new protocol_http_1.HttpRequest({
2327
2477
  protocol,
@@ -2352,7 +2502,7 @@ const serializeAws_restJson1UpdateCoreNetworkCommand = async (input, context) =>
2352
2502
  }
2353
2503
  let body;
2354
2504
  body = JSON.stringify({
2355
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2505
+ ...(input.Description != null && { Description: input.Description }),
2356
2506
  });
2357
2507
  return new protocol_http_1.HttpRequest({
2358
2508
  protocol,
@@ -2394,16 +2544,14 @@ const serializeAws_restJson1UpdateDeviceCommand = async (input, context) => {
2394
2544
  }
2395
2545
  let body;
2396
2546
  body = JSON.stringify({
2397
- ...(input.AWSLocation !== undefined &&
2398
- input.AWSLocation !== null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) }),
2399
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2400
- ...(input.Location !== undefined &&
2401
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }),
2402
- ...(input.Model !== undefined && input.Model !== null && { Model: input.Model }),
2403
- ...(input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber }),
2404
- ...(input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId }),
2405
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2406
- ...(input.Vendor !== undefined && input.Vendor !== null && { Vendor: input.Vendor }),
2547
+ ...(input.AWSLocation != null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) }),
2548
+ ...(input.Description != null && { Description: input.Description }),
2549
+ ...(input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) }),
2550
+ ...(input.Model != null && { Model: input.Model }),
2551
+ ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
2552
+ ...(input.SiteId != null && { SiteId: input.SiteId }),
2553
+ ...(input.Type != null && { Type: input.Type }),
2554
+ ...(input.Vendor != null && { Vendor: input.Vendor }),
2407
2555
  });
2408
2556
  return new protocol_http_1.HttpRequest({
2409
2557
  protocol,
@@ -2434,7 +2582,7 @@ const serializeAws_restJson1UpdateGlobalNetworkCommand = async (input, context)
2434
2582
  }
2435
2583
  let body;
2436
2584
  body = JSON.stringify({
2437
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2585
+ ...(input.Description != null && { Description: input.Description }),
2438
2586
  });
2439
2587
  return new protocol_http_1.HttpRequest({
2440
2588
  protocol,
@@ -2476,11 +2624,10 @@ const serializeAws_restJson1UpdateLinkCommand = async (input, context) => {
2476
2624
  }
2477
2625
  let body;
2478
2626
  body = JSON.stringify({
2479
- ...(input.Bandwidth !== undefined &&
2480
- input.Bandwidth !== null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) }),
2481
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2482
- ...(input.Provider !== undefined && input.Provider !== null && { Provider: input.Provider }),
2483
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2627
+ ...(input.Bandwidth != null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) }),
2628
+ ...(input.Description != null && { Description: input.Description }),
2629
+ ...(input.Provider != null && { Provider: input.Provider }),
2630
+ ...(input.Type != null && { Type: input.Type }),
2484
2631
  });
2485
2632
  return new protocol_http_1.HttpRequest({
2486
2633
  protocol,
@@ -2522,8 +2669,7 @@ const serializeAws_restJson1UpdateNetworkResourceMetadataCommand = async (input,
2522
2669
  }
2523
2670
  let body;
2524
2671
  body = JSON.stringify({
2525
- ...(input.Metadata !== undefined &&
2526
- input.Metadata !== null && {
2672
+ ...(input.Metadata != null && {
2527
2673
  Metadata: serializeAws_restJson1NetworkResourceMetadataMap(input.Metadata, context),
2528
2674
  }),
2529
2675
  });
@@ -2567,9 +2713,8 @@ const serializeAws_restJson1UpdateSiteCommand = async (input, context) => {
2567
2713
  }
2568
2714
  let body;
2569
2715
  body = JSON.stringify({
2570
- ...(input.Description !== undefined && input.Description !== null && { Description: input.Description }),
2571
- ...(input.Location !== undefined &&
2572
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) }),
2716
+ ...(input.Description != null && { Description: input.Description }),
2717
+ ...(input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) }),
2573
2718
  });
2574
2719
  return new protocol_http_1.HttpRequest({
2575
2720
  protocol,
@@ -2600,14 +2745,11 @@ const serializeAws_restJson1UpdateVpcAttachmentCommand = async (input, context)
2600
2745
  }
2601
2746
  let body;
2602
2747
  body = JSON.stringify({
2603
- ...(input.AddSubnetArns !== undefined &&
2604
- input.AddSubnetArns !== null && {
2748
+ ...(input.AddSubnetArns != null && {
2605
2749
  AddSubnetArns: serializeAws_restJson1SubnetArnList(input.AddSubnetArns, context),
2606
2750
  }),
2607
- ...(input.Options !== undefined &&
2608
- input.Options !== null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) }),
2609
- ...(input.RemoveSubnetArns !== undefined &&
2610
- input.RemoveSubnetArns !== null && {
2751
+ ...(input.Options != null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) }),
2752
+ ...(input.RemoveSubnetArns != null && {
2611
2753
  RemoveSubnetArns: serializeAws_restJson1SubnetArnList(input.RemoveSubnetArns, context),
2612
2754
  }),
2613
2755
  });
@@ -2643,8 +2785,7 @@ const deserializeAws_restJson1AcceptAttachmentCommandError = async (output, cont
2643
2785
  body: await parseBody(output.body, context),
2644
2786
  };
2645
2787
  let response;
2646
- let errorCode = "UnknownError";
2647
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2788
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2648
2789
  switch (errorCode) {
2649
2790
  case "AccessDeniedException":
2650
2791
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2666,10 +2807,12 @@ const deserializeAws_restJson1AcceptAttachmentCommandError = async (output, cont
2666
2807
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2667
2808
  default:
2668
2809
  const parsedBody = parsedOutput.body;
2810
+ const $metadata = deserializeMetadata(output);
2811
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2669
2812
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2670
- name: parsedBody.code || parsedBody.Code || errorCode,
2813
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2671
2814
  $fault: "client",
2672
- $metadata: deserializeMetadata(output),
2815
+ $metadata,
2673
2816
  });
2674
2817
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2675
2818
  }
@@ -2695,8 +2838,7 @@ const deserializeAws_restJson1AssociateConnectPeerCommandError = async (output,
2695
2838
  body: await parseBody(output.body, context),
2696
2839
  };
2697
2840
  let response;
2698
- let errorCode = "UnknownError";
2699
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2841
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2700
2842
  switch (errorCode) {
2701
2843
  case "AccessDeniedException":
2702
2844
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2721,10 +2863,12 @@ const deserializeAws_restJson1AssociateConnectPeerCommandError = async (output,
2721
2863
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2722
2864
  default:
2723
2865
  const parsedBody = parsedOutput.body;
2866
+ const $metadata = deserializeMetadata(output);
2867
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2724
2868
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2725
- name: parsedBody.code || parsedBody.Code || errorCode,
2869
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2726
2870
  $fault: "client",
2727
- $metadata: deserializeMetadata(output),
2871
+ $metadata,
2728
2872
  });
2729
2873
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2730
2874
  }
@@ -2750,8 +2894,7 @@ const deserializeAws_restJson1AssociateCustomerGatewayCommandError = async (outp
2750
2894
  body: await parseBody(output.body, context),
2751
2895
  };
2752
2896
  let response;
2753
- let errorCode = "UnknownError";
2754
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2897
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2755
2898
  switch (errorCode) {
2756
2899
  case "AccessDeniedException":
2757
2900
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2776,10 +2919,12 @@ const deserializeAws_restJson1AssociateCustomerGatewayCommandError = async (outp
2776
2919
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2777
2920
  default:
2778
2921
  const parsedBody = parsedOutput.body;
2922
+ const $metadata = deserializeMetadata(output);
2923
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2779
2924
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2780
- name: parsedBody.code || parsedBody.Code || errorCode,
2925
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2781
2926
  $fault: "client",
2782
- $metadata: deserializeMetadata(output),
2927
+ $metadata,
2783
2928
  });
2784
2929
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2785
2930
  }
@@ -2805,8 +2950,7 @@ const deserializeAws_restJson1AssociateLinkCommandError = async (output, context
2805
2950
  body: await parseBody(output.body, context),
2806
2951
  };
2807
2952
  let response;
2808
- let errorCode = "UnknownError";
2809
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2953
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2810
2954
  switch (errorCode) {
2811
2955
  case "AccessDeniedException":
2812
2956
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2831,10 +2975,12 @@ const deserializeAws_restJson1AssociateLinkCommandError = async (output, context
2831
2975
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2832
2976
  default:
2833
2977
  const parsedBody = parsedOutput.body;
2978
+ const $metadata = deserializeMetadata(output);
2979
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2834
2980
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2835
- name: parsedBody.code || parsedBody.Code || errorCode,
2981
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2836
2982
  $fault: "client",
2837
- $metadata: deserializeMetadata(output),
2983
+ $metadata,
2838
2984
  });
2839
2985
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2840
2986
  }
@@ -2860,8 +3006,7 @@ const deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommandError = a
2860
3006
  body: await parseBody(output.body, context),
2861
3007
  };
2862
3008
  let response;
2863
- let errorCode = "UnknownError";
2864
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3009
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2865
3010
  switch (errorCode) {
2866
3011
  case "AccessDeniedException":
2867
3012
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2886,10 +3031,12 @@ const deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommandError = a
2886
3031
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2887
3032
  default:
2888
3033
  const parsedBody = parsedOutput.body;
3034
+ const $metadata = deserializeMetadata(output);
3035
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2889
3036
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2890
- name: parsedBody.code || parsedBody.Code || errorCode,
3037
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2891
3038
  $fault: "client",
2892
- $metadata: deserializeMetadata(output),
3039
+ $metadata,
2893
3040
  });
2894
3041
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2895
3042
  }
@@ -2915,8 +3062,7 @@ const deserializeAws_restJson1CreateConnectAttachmentCommandError = async (outpu
2915
3062
  body: await parseBody(output.body, context),
2916
3063
  };
2917
3064
  let response;
2918
- let errorCode = "UnknownError";
2919
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3065
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2920
3066
  switch (errorCode) {
2921
3067
  case "AccessDeniedException":
2922
3068
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2938,10 +3084,12 @@ const deserializeAws_restJson1CreateConnectAttachmentCommandError = async (outpu
2938
3084
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2939
3085
  default:
2940
3086
  const parsedBody = parsedOutput.body;
3087
+ const $metadata = deserializeMetadata(output);
3088
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2941
3089
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2942
- name: parsedBody.code || parsedBody.Code || errorCode,
3090
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2943
3091
  $fault: "client",
2944
- $metadata: deserializeMetadata(output),
3092
+ $metadata,
2945
3093
  });
2946
3094
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2947
3095
  }
@@ -2967,8 +3115,7 @@ const deserializeAws_restJson1CreateConnectionCommandError = async (output, cont
2967
3115
  body: await parseBody(output.body, context),
2968
3116
  };
2969
3117
  let response;
2970
- let errorCode = "UnknownError";
2971
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3118
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2972
3119
  switch (errorCode) {
2973
3120
  case "AccessDeniedException":
2974
3121
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -2990,10 +3137,12 @@ const deserializeAws_restJson1CreateConnectionCommandError = async (output, cont
2990
3137
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
2991
3138
  default:
2992
3139
  const parsedBody = parsedOutput.body;
3140
+ const $metadata = deserializeMetadata(output);
3141
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2993
3142
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
2994
- name: parsedBody.code || parsedBody.Code || errorCode,
3143
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2995
3144
  $fault: "client",
2996
- $metadata: deserializeMetadata(output),
3145
+ $metadata,
2997
3146
  });
2998
3147
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2999
3148
  }
@@ -3019,8 +3168,7 @@ const deserializeAws_restJson1CreateConnectPeerCommandError = async (output, con
3019
3168
  body: await parseBody(output.body, context),
3020
3169
  };
3021
3170
  let response;
3022
- let errorCode = "UnknownError";
3023
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3171
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3024
3172
  switch (errorCode) {
3025
3173
  case "AccessDeniedException":
3026
3174
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3042,10 +3190,12 @@ const deserializeAws_restJson1CreateConnectPeerCommandError = async (output, con
3042
3190
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3043
3191
  default:
3044
3192
  const parsedBody = parsedOutput.body;
3193
+ const $metadata = deserializeMetadata(output);
3194
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3045
3195
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3046
- name: parsedBody.code || parsedBody.Code || errorCode,
3196
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3047
3197
  $fault: "client",
3048
- $metadata: deserializeMetadata(output),
3198
+ $metadata,
3049
3199
  });
3050
3200
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3051
3201
  }
@@ -3071,8 +3221,7 @@ const deserializeAws_restJson1CreateCoreNetworkCommandError = async (output, con
3071
3221
  body: await parseBody(output.body, context),
3072
3222
  };
3073
3223
  let response;
3074
- let errorCode = "UnknownError";
3075
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3224
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3076
3225
  switch (errorCode) {
3077
3226
  case "AccessDeniedException":
3078
3227
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3097,10 +3246,12 @@ const deserializeAws_restJson1CreateCoreNetworkCommandError = async (output, con
3097
3246
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3098
3247
  default:
3099
3248
  const parsedBody = parsedOutput.body;
3249
+ const $metadata = deserializeMetadata(output);
3250
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3100
3251
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3101
- name: parsedBody.code || parsedBody.Code || errorCode,
3252
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3102
3253
  $fault: "client",
3103
- $metadata: deserializeMetadata(output),
3254
+ $metadata,
3104
3255
  });
3105
3256
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3106
3257
  }
@@ -3126,8 +3277,7 @@ const deserializeAws_restJson1CreateDeviceCommandError = async (output, context)
3126
3277
  body: await parseBody(output.body, context),
3127
3278
  };
3128
3279
  let response;
3129
- let errorCode = "UnknownError";
3130
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3280
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3131
3281
  switch (errorCode) {
3132
3282
  case "AccessDeniedException":
3133
3283
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3152,10 +3302,12 @@ const deserializeAws_restJson1CreateDeviceCommandError = async (output, context)
3152
3302
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3153
3303
  default:
3154
3304
  const parsedBody = parsedOutput.body;
3305
+ const $metadata = deserializeMetadata(output);
3306
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3155
3307
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3156
- name: parsedBody.code || parsedBody.Code || errorCode,
3308
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3157
3309
  $fault: "client",
3158
- $metadata: deserializeMetadata(output),
3310
+ $metadata,
3159
3311
  });
3160
3312
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3161
3313
  }
@@ -3181,8 +3333,7 @@ const deserializeAws_restJson1CreateGlobalNetworkCommandError = async (output, c
3181
3333
  body: await parseBody(output.body, context),
3182
3334
  };
3183
3335
  let response;
3184
- let errorCode = "UnknownError";
3185
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3336
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3186
3337
  switch (errorCode) {
3187
3338
  case "AccessDeniedException":
3188
3339
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3204,10 +3355,12 @@ const deserializeAws_restJson1CreateGlobalNetworkCommandError = async (output, c
3204
3355
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3205
3356
  default:
3206
3357
  const parsedBody = parsedOutput.body;
3358
+ const $metadata = deserializeMetadata(output);
3359
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3207
3360
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3208
- name: parsedBody.code || parsedBody.Code || errorCode,
3361
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3209
3362
  $fault: "client",
3210
- $metadata: deserializeMetadata(output),
3363
+ $metadata,
3211
3364
  });
3212
3365
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3213
3366
  }
@@ -3233,8 +3386,7 @@ const deserializeAws_restJson1CreateLinkCommandError = async (output, context) =
3233
3386
  body: await parseBody(output.body, context),
3234
3387
  };
3235
3388
  let response;
3236
- let errorCode = "UnknownError";
3237
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3389
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3238
3390
  switch (errorCode) {
3239
3391
  case "AccessDeniedException":
3240
3392
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3259,10 +3411,12 @@ const deserializeAws_restJson1CreateLinkCommandError = async (output, context) =
3259
3411
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3260
3412
  default:
3261
3413
  const parsedBody = parsedOutput.body;
3414
+ const $metadata = deserializeMetadata(output);
3415
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3262
3416
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3263
- name: parsedBody.code || parsedBody.Code || errorCode,
3417
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3264
3418
  $fault: "client",
3265
- $metadata: deserializeMetadata(output),
3419
+ $metadata,
3266
3420
  });
3267
3421
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3268
3422
  }
@@ -3288,8 +3442,7 @@ const deserializeAws_restJson1CreateSiteCommandError = async (output, context) =
3288
3442
  body: await parseBody(output.body, context),
3289
3443
  };
3290
3444
  let response;
3291
- let errorCode = "UnknownError";
3292
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3445
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3293
3446
  switch (errorCode) {
3294
3447
  case "AccessDeniedException":
3295
3448
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3314,10 +3467,12 @@ const deserializeAws_restJson1CreateSiteCommandError = async (output, context) =
3314
3467
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3315
3468
  default:
3316
3469
  const parsedBody = parsedOutput.body;
3470
+ const $metadata = deserializeMetadata(output);
3471
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3317
3472
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3318
- name: parsedBody.code || parsedBody.Code || errorCode,
3473
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3319
3474
  $fault: "client",
3320
- $metadata: deserializeMetadata(output),
3475
+ $metadata,
3321
3476
  });
3322
3477
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3323
3478
  }
@@ -3343,8 +3498,60 @@ const deserializeAws_restJson1CreateSiteToSiteVpnAttachmentCommandError = async
3343
3498
  body: await parseBody(output.body, context),
3344
3499
  };
3345
3500
  let response;
3346
- let errorCode = "UnknownError";
3347
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3501
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3502
+ switch (errorCode) {
3503
+ case "AccessDeniedException":
3504
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3505
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3506
+ case "ConflictException":
3507
+ case "com.amazonaws.networkmanager#ConflictException":
3508
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3509
+ case "InternalServerException":
3510
+ case "com.amazonaws.networkmanager#InternalServerException":
3511
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3512
+ case "ResourceNotFoundException":
3513
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
3514
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3515
+ case "ThrottlingException":
3516
+ case "com.amazonaws.networkmanager#ThrottlingException":
3517
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3518
+ case "ValidationException":
3519
+ case "com.amazonaws.networkmanager#ValidationException":
3520
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3521
+ default:
3522
+ const parsedBody = parsedOutput.body;
3523
+ const $metadata = deserializeMetadata(output);
3524
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3525
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3526
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3527
+ $fault: "client",
3528
+ $metadata,
3529
+ });
3530
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3531
+ }
3532
+ };
3533
+ const deserializeAws_restJson1CreateTransitGatewayPeeringCommand = async (output, context) => {
3534
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3535
+ return deserializeAws_restJson1CreateTransitGatewayPeeringCommandError(output, context);
3536
+ }
3537
+ const contents = {
3538
+ $metadata: deserializeMetadata(output),
3539
+ TransitGatewayPeering: undefined,
3540
+ };
3541
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3542
+ if (data.TransitGatewayPeering !== undefined && data.TransitGatewayPeering !== null) {
3543
+ contents.TransitGatewayPeering = deserializeAws_restJson1TransitGatewayPeering(data.TransitGatewayPeering, context);
3544
+ }
3545
+ return Promise.resolve(contents);
3546
+ };
3547
+ exports.deserializeAws_restJson1CreateTransitGatewayPeeringCommand = deserializeAws_restJson1CreateTransitGatewayPeeringCommand;
3548
+ const deserializeAws_restJson1CreateTransitGatewayPeeringCommandError = async (output, context) => {
3549
+ const parsedOutput = {
3550
+ ...output,
3551
+ body: await parseBody(output.body, context),
3552
+ };
3553
+ let response;
3554
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3348
3555
  switch (errorCode) {
3349
3556
  case "AccessDeniedException":
3350
3557
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3366,10 +3573,65 @@ const deserializeAws_restJson1CreateSiteToSiteVpnAttachmentCommandError = async
3366
3573
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3367
3574
  default:
3368
3575
  const parsedBody = parsedOutput.body;
3576
+ const $metadata = deserializeMetadata(output);
3577
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3369
3578
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3370
- name: parsedBody.code || parsedBody.Code || errorCode,
3579
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3371
3580
  $fault: "client",
3372
- $metadata: deserializeMetadata(output),
3581
+ $metadata,
3582
+ });
3583
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3584
+ }
3585
+ };
3586
+ const deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = async (output, context) => {
3587
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3588
+ return deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommandError(output, context);
3589
+ }
3590
+ const contents = {
3591
+ $metadata: deserializeMetadata(output),
3592
+ TransitGatewayRouteTableAttachment: undefined,
3593
+ };
3594
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3595
+ if (data.TransitGatewayRouteTableAttachment !== undefined && data.TransitGatewayRouteTableAttachment !== null) {
3596
+ contents.TransitGatewayRouteTableAttachment = deserializeAws_restJson1TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
3597
+ }
3598
+ return Promise.resolve(contents);
3599
+ };
3600
+ exports.deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand;
3601
+ const deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommandError = async (output, context) => {
3602
+ const parsedOutput = {
3603
+ ...output,
3604
+ body: await parseBody(output.body, context),
3605
+ };
3606
+ let response;
3607
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3608
+ switch (errorCode) {
3609
+ case "AccessDeniedException":
3610
+ case "com.amazonaws.networkmanager#AccessDeniedException":
3611
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
3612
+ case "ConflictException":
3613
+ case "com.amazonaws.networkmanager#ConflictException":
3614
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
3615
+ case "InternalServerException":
3616
+ case "com.amazonaws.networkmanager#InternalServerException":
3617
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
3618
+ case "ResourceNotFoundException":
3619
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
3620
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
3621
+ case "ThrottlingException":
3622
+ case "com.amazonaws.networkmanager#ThrottlingException":
3623
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
3624
+ case "ValidationException":
3625
+ case "com.amazonaws.networkmanager#ValidationException":
3626
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3627
+ default:
3628
+ const parsedBody = parsedOutput.body;
3629
+ const $metadata = deserializeMetadata(output);
3630
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3631
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3632
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3633
+ $fault: "client",
3634
+ $metadata,
3373
3635
  });
3374
3636
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3375
3637
  }
@@ -3395,8 +3657,7 @@ const deserializeAws_restJson1CreateVpcAttachmentCommandError = async (output, c
3395
3657
  body: await parseBody(output.body, context),
3396
3658
  };
3397
3659
  let response;
3398
- let errorCode = "UnknownError";
3399
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3660
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3400
3661
  switch (errorCode) {
3401
3662
  case "AccessDeniedException":
3402
3663
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3418,10 +3679,12 @@ const deserializeAws_restJson1CreateVpcAttachmentCommandError = async (output, c
3418
3679
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3419
3680
  default:
3420
3681
  const parsedBody = parsedOutput.body;
3682
+ const $metadata = deserializeMetadata(output);
3683
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3421
3684
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3422
- name: parsedBody.code || parsedBody.Code || errorCode,
3685
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3423
3686
  $fault: "client",
3424
- $metadata: deserializeMetadata(output),
3687
+ $metadata,
3425
3688
  });
3426
3689
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3427
3690
  }
@@ -3447,8 +3710,7 @@ const deserializeAws_restJson1DeleteAttachmentCommandError = async (output, cont
3447
3710
  body: await parseBody(output.body, context),
3448
3711
  };
3449
3712
  let response;
3450
- let errorCode = "UnknownError";
3451
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3452
3714
  switch (errorCode) {
3453
3715
  case "AccessDeniedException":
3454
3716
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3470,10 +3732,12 @@ const deserializeAws_restJson1DeleteAttachmentCommandError = async (output, cont
3470
3732
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3471
3733
  default:
3472
3734
  const parsedBody = parsedOutput.body;
3735
+ const $metadata = deserializeMetadata(output);
3736
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3473
3737
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3474
- name: parsedBody.code || parsedBody.Code || errorCode,
3738
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3475
3739
  $fault: "client",
3476
- $metadata: deserializeMetadata(output),
3740
+ $metadata,
3477
3741
  });
3478
3742
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3479
3743
  }
@@ -3499,8 +3763,7 @@ const deserializeAws_restJson1DeleteConnectionCommandError = async (output, cont
3499
3763
  body: await parseBody(output.body, context),
3500
3764
  };
3501
3765
  let response;
3502
- let errorCode = "UnknownError";
3503
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3766
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3504
3767
  switch (errorCode) {
3505
3768
  case "AccessDeniedException":
3506
3769
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3522,10 +3785,12 @@ const deserializeAws_restJson1DeleteConnectionCommandError = async (output, cont
3522
3785
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3523
3786
  default:
3524
3787
  const parsedBody = parsedOutput.body;
3788
+ const $metadata = deserializeMetadata(output);
3789
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3525
3790
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3526
- name: parsedBody.code || parsedBody.Code || errorCode,
3791
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3527
3792
  $fault: "client",
3528
- $metadata: deserializeMetadata(output),
3793
+ $metadata,
3529
3794
  });
3530
3795
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3531
3796
  }
@@ -3551,8 +3816,7 @@ const deserializeAws_restJson1DeleteConnectPeerCommandError = async (output, con
3551
3816
  body: await parseBody(output.body, context),
3552
3817
  };
3553
3818
  let response;
3554
- let errorCode = "UnknownError";
3555
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3819
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3556
3820
  switch (errorCode) {
3557
3821
  case "AccessDeniedException":
3558
3822
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3574,10 +3838,12 @@ const deserializeAws_restJson1DeleteConnectPeerCommandError = async (output, con
3574
3838
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3575
3839
  default:
3576
3840
  const parsedBody = parsedOutput.body;
3841
+ const $metadata = deserializeMetadata(output);
3842
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3577
3843
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3578
- name: parsedBody.code || parsedBody.Code || errorCode,
3844
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3579
3845
  $fault: "client",
3580
- $metadata: deserializeMetadata(output),
3846
+ $metadata,
3581
3847
  });
3582
3848
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3583
3849
  }
@@ -3603,8 +3869,7 @@ const deserializeAws_restJson1DeleteCoreNetworkCommandError = async (output, con
3603
3869
  body: await parseBody(output.body, context),
3604
3870
  };
3605
3871
  let response;
3606
- let errorCode = "UnknownError";
3607
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3872
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3608
3873
  switch (errorCode) {
3609
3874
  case "AccessDeniedException":
3610
3875
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3626,10 +3891,12 @@ const deserializeAws_restJson1DeleteCoreNetworkCommandError = async (output, con
3626
3891
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3627
3892
  default:
3628
3893
  const parsedBody = parsedOutput.body;
3894
+ const $metadata = deserializeMetadata(output);
3895
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3629
3896
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3630
- name: parsedBody.code || parsedBody.Code || errorCode,
3897
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3631
3898
  $fault: "client",
3632
- $metadata: deserializeMetadata(output),
3899
+ $metadata,
3633
3900
  });
3634
3901
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3635
3902
  }
@@ -3655,8 +3922,7 @@ const deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError = async
3655
3922
  body: await parseBody(output.body, context),
3656
3923
  };
3657
3924
  let response;
3658
- let errorCode = "UnknownError";
3659
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3925
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3660
3926
  switch (errorCode) {
3661
3927
  case "AccessDeniedException":
3662
3928
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3678,10 +3944,12 @@ const deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError = async
3678
3944
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3679
3945
  default:
3680
3946
  const parsedBody = parsedOutput.body;
3947
+ const $metadata = deserializeMetadata(output);
3948
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3681
3949
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3682
- name: parsedBody.code || parsedBody.Code || errorCode,
3950
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3683
3951
  $fault: "client",
3684
- $metadata: deserializeMetadata(output),
3952
+ $metadata,
3685
3953
  });
3686
3954
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3687
3955
  }
@@ -3707,8 +3975,7 @@ const deserializeAws_restJson1DeleteDeviceCommandError = async (output, context)
3707
3975
  body: await parseBody(output.body, context),
3708
3976
  };
3709
3977
  let response;
3710
- let errorCode = "UnknownError";
3711
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3978
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3712
3979
  switch (errorCode) {
3713
3980
  case "AccessDeniedException":
3714
3981
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3730,10 +3997,12 @@ const deserializeAws_restJson1DeleteDeviceCommandError = async (output, context)
3730
3997
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3731
3998
  default:
3732
3999
  const parsedBody = parsedOutput.body;
4000
+ const $metadata = deserializeMetadata(output);
4001
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3733
4002
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3734
- name: parsedBody.code || parsedBody.Code || errorCode,
4003
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3735
4004
  $fault: "client",
3736
- $metadata: deserializeMetadata(output),
4005
+ $metadata,
3737
4006
  });
3738
4007
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3739
4008
  }
@@ -3759,8 +4028,7 @@ const deserializeAws_restJson1DeleteGlobalNetworkCommandError = async (output, c
3759
4028
  body: await parseBody(output.body, context),
3760
4029
  };
3761
4030
  let response;
3762
- let errorCode = "UnknownError";
3763
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4031
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3764
4032
  switch (errorCode) {
3765
4033
  case "AccessDeniedException":
3766
4034
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3782,10 +4050,12 @@ const deserializeAws_restJson1DeleteGlobalNetworkCommandError = async (output, c
3782
4050
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3783
4051
  default:
3784
4052
  const parsedBody = parsedOutput.body;
4053
+ const $metadata = deserializeMetadata(output);
4054
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3785
4055
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3786
- name: parsedBody.code || parsedBody.Code || errorCode,
4056
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3787
4057
  $fault: "client",
3788
- $metadata: deserializeMetadata(output),
4058
+ $metadata,
3789
4059
  });
3790
4060
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3791
4061
  }
@@ -3796,23 +4066,75 @@ const deserializeAws_restJson1DeleteLinkCommand = async (output, context) => {
3796
4066
  }
3797
4067
  const contents = {
3798
4068
  $metadata: deserializeMetadata(output),
3799
- Link: undefined,
4069
+ Link: undefined,
4070
+ };
4071
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4072
+ if (data.Link !== undefined && data.Link !== null) {
4073
+ contents.Link = deserializeAws_restJson1Link(data.Link, context);
4074
+ }
4075
+ return Promise.resolve(contents);
4076
+ };
4077
+ exports.deserializeAws_restJson1DeleteLinkCommand = deserializeAws_restJson1DeleteLinkCommand;
4078
+ const deserializeAws_restJson1DeleteLinkCommandError = async (output, context) => {
4079
+ const parsedOutput = {
4080
+ ...output,
4081
+ body: await parseBody(output.body, context),
4082
+ };
4083
+ let response;
4084
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4085
+ switch (errorCode) {
4086
+ case "AccessDeniedException":
4087
+ case "com.amazonaws.networkmanager#AccessDeniedException":
4088
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4089
+ case "ConflictException":
4090
+ case "com.amazonaws.networkmanager#ConflictException":
4091
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
4092
+ case "InternalServerException":
4093
+ case "com.amazonaws.networkmanager#InternalServerException":
4094
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
4095
+ case "ResourceNotFoundException":
4096
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
4097
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
4098
+ case "ThrottlingException":
4099
+ case "com.amazonaws.networkmanager#ThrottlingException":
4100
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4101
+ case "ValidationException":
4102
+ case "com.amazonaws.networkmanager#ValidationException":
4103
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4104
+ default:
4105
+ const parsedBody = parsedOutput.body;
4106
+ const $metadata = deserializeMetadata(output);
4107
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4108
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4109
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4110
+ $fault: "client",
4111
+ $metadata,
4112
+ });
4113
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4114
+ }
4115
+ };
4116
+ const deserializeAws_restJson1DeletePeeringCommand = async (output, context) => {
4117
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4118
+ return deserializeAws_restJson1DeletePeeringCommandError(output, context);
4119
+ }
4120
+ const contents = {
4121
+ $metadata: deserializeMetadata(output),
4122
+ Peering: undefined,
3800
4123
  };
3801
4124
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3802
- if (data.Link !== undefined && data.Link !== null) {
3803
- contents.Link = deserializeAws_restJson1Link(data.Link, context);
4125
+ if (data.Peering !== undefined && data.Peering !== null) {
4126
+ contents.Peering = deserializeAws_restJson1Peering(data.Peering, context);
3804
4127
  }
3805
4128
  return Promise.resolve(contents);
3806
4129
  };
3807
- exports.deserializeAws_restJson1DeleteLinkCommand = deserializeAws_restJson1DeleteLinkCommand;
3808
- const deserializeAws_restJson1DeleteLinkCommandError = async (output, context) => {
4130
+ exports.deserializeAws_restJson1DeletePeeringCommand = deserializeAws_restJson1DeletePeeringCommand;
4131
+ const deserializeAws_restJson1DeletePeeringCommandError = async (output, context) => {
3809
4132
  const parsedOutput = {
3810
4133
  ...output,
3811
4134
  body: await parseBody(output.body, context),
3812
4135
  };
3813
4136
  let response;
3814
- let errorCode = "UnknownError";
3815
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4137
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3816
4138
  switch (errorCode) {
3817
4139
  case "AccessDeniedException":
3818
4140
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3834,10 +4156,12 @@ const deserializeAws_restJson1DeleteLinkCommandError = async (output, context) =
3834
4156
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3835
4157
  default:
3836
4158
  const parsedBody = parsedOutput.body;
4159
+ const $metadata = deserializeMetadata(output);
4160
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3837
4161
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3838
- name: parsedBody.code || parsedBody.Code || errorCode,
4162
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3839
4163
  $fault: "client",
3840
- $metadata: deserializeMetadata(output),
4164
+ $metadata,
3841
4165
  });
3842
4166
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3843
4167
  }
@@ -3859,8 +4183,7 @@ const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (output,
3859
4183
  body: await parseBody(output.body, context),
3860
4184
  };
3861
4185
  let response;
3862
- let errorCode = "UnknownError";
3863
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4186
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3864
4187
  switch (errorCode) {
3865
4188
  case "AccessDeniedException":
3866
4189
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3879,10 +4202,12 @@ const deserializeAws_restJson1DeleteResourcePolicyCommandError = async (output,
3879
4202
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3880
4203
  default:
3881
4204
  const parsedBody = parsedOutput.body;
4205
+ const $metadata = deserializeMetadata(output);
4206
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3882
4207
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3883
- name: parsedBody.code || parsedBody.Code || errorCode,
4208
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3884
4209
  $fault: "client",
3885
- $metadata: deserializeMetadata(output),
4210
+ $metadata,
3886
4211
  });
3887
4212
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3888
4213
  }
@@ -3908,8 +4233,7 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
3908
4233
  body: await parseBody(output.body, context),
3909
4234
  };
3910
4235
  let response;
3911
- let errorCode = "UnknownError";
3912
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4236
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3913
4237
  switch (errorCode) {
3914
4238
  case "AccessDeniedException":
3915
4239
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3931,10 +4255,12 @@ const deserializeAws_restJson1DeleteSiteCommandError = async (output, context) =
3931
4255
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3932
4256
  default:
3933
4257
  const parsedBody = parsedOutput.body;
4258
+ const $metadata = deserializeMetadata(output);
4259
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3934
4260
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3935
- name: parsedBody.code || parsedBody.Code || errorCode,
4261
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3936
4262
  $fault: "client",
3937
- $metadata: deserializeMetadata(output),
4263
+ $metadata,
3938
4264
  });
3939
4265
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3940
4266
  }
@@ -3960,8 +4286,7 @@ const deserializeAws_restJson1DeregisterTransitGatewayCommandError = async (outp
3960
4286
  body: await parseBody(output.body, context),
3961
4287
  };
3962
4288
  let response;
3963
- let errorCode = "UnknownError";
3964
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4289
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3965
4290
  switch (errorCode) {
3966
4291
  case "AccessDeniedException":
3967
4292
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -3983,10 +4308,12 @@ const deserializeAws_restJson1DeregisterTransitGatewayCommandError = async (outp
3983
4308
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
3984
4309
  default:
3985
4310
  const parsedBody = parsedOutput.body;
4311
+ const $metadata = deserializeMetadata(output);
4312
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3986
4313
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
3987
- name: parsedBody.code || parsedBody.Code || errorCode,
4314
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3988
4315
  $fault: "client",
3989
- $metadata: deserializeMetadata(output),
4316
+ $metadata,
3990
4317
  });
3991
4318
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3992
4319
  }
@@ -4016,8 +4343,7 @@ const deserializeAws_restJson1DescribeGlobalNetworksCommandError = async (output
4016
4343
  body: await parseBody(output.body, context),
4017
4344
  };
4018
4345
  let response;
4019
- let errorCode = "UnknownError";
4020
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4346
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4021
4347
  switch (errorCode) {
4022
4348
  case "AccessDeniedException":
4023
4349
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4036,10 +4362,12 @@ const deserializeAws_restJson1DescribeGlobalNetworksCommandError = async (output
4036
4362
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4037
4363
  default:
4038
4364
  const parsedBody = parsedOutput.body;
4365
+ const $metadata = deserializeMetadata(output);
4366
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4039
4367
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4040
- name: parsedBody.code || parsedBody.Code || errorCode,
4368
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4041
4369
  $fault: "client",
4042
- $metadata: deserializeMetadata(output),
4370
+ $metadata,
4043
4371
  });
4044
4372
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4045
4373
  }
@@ -4065,8 +4393,7 @@ const deserializeAws_restJson1DisassociateConnectPeerCommandError = async (outpu
4065
4393
  body: await parseBody(output.body, context),
4066
4394
  };
4067
4395
  let response;
4068
- let errorCode = "UnknownError";
4069
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4396
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4070
4397
  switch (errorCode) {
4071
4398
  case "AccessDeniedException":
4072
4399
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4088,10 +4415,12 @@ const deserializeAws_restJson1DisassociateConnectPeerCommandError = async (outpu
4088
4415
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4089
4416
  default:
4090
4417
  const parsedBody = parsedOutput.body;
4418
+ const $metadata = deserializeMetadata(output);
4419
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4091
4420
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4092
- name: parsedBody.code || parsedBody.Code || errorCode,
4421
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4093
4422
  $fault: "client",
4094
- $metadata: deserializeMetadata(output),
4423
+ $metadata,
4095
4424
  });
4096
4425
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4097
4426
  }
@@ -4117,8 +4446,7 @@ const deserializeAws_restJson1DisassociateCustomerGatewayCommandError = async (o
4117
4446
  body: await parseBody(output.body, context),
4118
4447
  };
4119
4448
  let response;
4120
- let errorCode = "UnknownError";
4121
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4449
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4122
4450
  switch (errorCode) {
4123
4451
  case "AccessDeniedException":
4124
4452
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4140,10 +4468,12 @@ const deserializeAws_restJson1DisassociateCustomerGatewayCommandError = async (o
4140
4468
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4141
4469
  default:
4142
4470
  const parsedBody = parsedOutput.body;
4471
+ const $metadata = deserializeMetadata(output);
4472
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4143
4473
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4144
- name: parsedBody.code || parsedBody.Code || errorCode,
4474
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4145
4475
  $fault: "client",
4146
- $metadata: deserializeMetadata(output),
4476
+ $metadata,
4147
4477
  });
4148
4478
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4149
4479
  }
@@ -4169,8 +4499,7 @@ const deserializeAws_restJson1DisassociateLinkCommandError = async (output, cont
4169
4499
  body: await parseBody(output.body, context),
4170
4500
  };
4171
4501
  let response;
4172
- let errorCode = "UnknownError";
4173
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4502
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4174
4503
  switch (errorCode) {
4175
4504
  case "AccessDeniedException":
4176
4505
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4192,10 +4521,12 @@ const deserializeAws_restJson1DisassociateLinkCommandError = async (output, cont
4192
4521
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4193
4522
  default:
4194
4523
  const parsedBody = parsedOutput.body;
4524
+ const $metadata = deserializeMetadata(output);
4525
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4195
4526
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4196
- name: parsedBody.code || parsedBody.Code || errorCode,
4527
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4197
4528
  $fault: "client",
4198
- $metadata: deserializeMetadata(output),
4529
+ $metadata,
4199
4530
  });
4200
4531
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4201
4532
  }
@@ -4221,8 +4552,7 @@ const deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommandError
4221
4552
  body: await parseBody(output.body, context),
4222
4553
  };
4223
4554
  let response;
4224
- let errorCode = "UnknownError";
4225
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4555
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4226
4556
  switch (errorCode) {
4227
4557
  case "AccessDeniedException":
4228
4558
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4244,10 +4574,12 @@ const deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommandError
4244
4574
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4245
4575
  default:
4246
4576
  const parsedBody = parsedOutput.body;
4577
+ const $metadata = deserializeMetadata(output);
4578
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4247
4579
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4248
- name: parsedBody.code || parsedBody.Code || errorCode,
4580
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4249
4581
  $fault: "client",
4250
- $metadata: deserializeMetadata(output),
4582
+ $metadata,
4251
4583
  });
4252
4584
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4253
4585
  }
@@ -4269,8 +4601,7 @@ const deserializeAws_restJson1ExecuteCoreNetworkChangeSetCommandError = async (o
4269
4601
  body: await parseBody(output.body, context),
4270
4602
  };
4271
4603
  let response;
4272
- let errorCode = "UnknownError";
4273
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4604
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4274
4605
  switch (errorCode) {
4275
4606
  case "AccessDeniedException":
4276
4607
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4292,10 +4623,12 @@ const deserializeAws_restJson1ExecuteCoreNetworkChangeSetCommandError = async (o
4292
4623
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4293
4624
  default:
4294
4625
  const parsedBody = parsedOutput.body;
4626
+ const $metadata = deserializeMetadata(output);
4627
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4295
4628
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4296
- name: parsedBody.code || parsedBody.Code || errorCode,
4629
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4297
4630
  $fault: "client",
4298
- $metadata: deserializeMetadata(output),
4631
+ $metadata,
4299
4632
  });
4300
4633
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4301
4634
  }
@@ -4321,8 +4654,7 @@ const deserializeAws_restJson1GetConnectAttachmentCommandError = async (output,
4321
4654
  body: await parseBody(output.body, context),
4322
4655
  };
4323
4656
  let response;
4324
- let errorCode = "UnknownError";
4325
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4657
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4326
4658
  switch (errorCode) {
4327
4659
  case "AccessDeniedException":
4328
4660
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4341,10 +4673,12 @@ const deserializeAws_restJson1GetConnectAttachmentCommandError = async (output,
4341
4673
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4342
4674
  default:
4343
4675
  const parsedBody = parsedOutput.body;
4676
+ const $metadata = deserializeMetadata(output);
4677
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4344
4678
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4345
- name: parsedBody.code || parsedBody.Code || errorCode,
4679
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4346
4680
  $fault: "client",
4347
- $metadata: deserializeMetadata(output),
4681
+ $metadata,
4348
4682
  });
4349
4683
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4350
4684
  }
@@ -4374,8 +4708,7 @@ const deserializeAws_restJson1GetConnectionsCommandError = async (output, contex
4374
4708
  body: await parseBody(output.body, context),
4375
4709
  };
4376
4710
  let response;
4377
- let errorCode = "UnknownError";
4378
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4711
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4379
4712
  switch (errorCode) {
4380
4713
  case "AccessDeniedException":
4381
4714
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4394,10 +4727,12 @@ const deserializeAws_restJson1GetConnectionsCommandError = async (output, contex
4394
4727
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4395
4728
  default:
4396
4729
  const parsedBody = parsedOutput.body;
4730
+ const $metadata = deserializeMetadata(output);
4731
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4397
4732
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4398
- name: parsedBody.code || parsedBody.Code || errorCode,
4733
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4399
4734
  $fault: "client",
4400
- $metadata: deserializeMetadata(output),
4735
+ $metadata,
4401
4736
  });
4402
4737
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4403
4738
  }
@@ -4423,8 +4758,7 @@ const deserializeAws_restJson1GetConnectPeerCommandError = async (output, contex
4423
4758
  body: await parseBody(output.body, context),
4424
4759
  };
4425
4760
  let response;
4426
- let errorCode = "UnknownError";
4427
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4761
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4428
4762
  switch (errorCode) {
4429
4763
  case "AccessDeniedException":
4430
4764
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4443,10 +4777,12 @@ const deserializeAws_restJson1GetConnectPeerCommandError = async (output, contex
4443
4777
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4444
4778
  default:
4445
4779
  const parsedBody = parsedOutput.body;
4780
+ const $metadata = deserializeMetadata(output);
4781
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4446
4782
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4447
- name: parsedBody.code || parsedBody.Code || errorCode,
4783
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4448
4784
  $fault: "client",
4449
- $metadata: deserializeMetadata(output),
4785
+ $metadata,
4450
4786
  });
4451
4787
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4452
4788
  }
@@ -4476,8 +4812,7 @@ const deserializeAws_restJson1GetConnectPeerAssociationsCommandError = async (ou
4476
4812
  body: await parseBody(output.body, context),
4477
4813
  };
4478
4814
  let response;
4479
- let errorCode = "UnknownError";
4480
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4815
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4481
4816
  switch (errorCode) {
4482
4817
  case "AccessDeniedException":
4483
4818
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4499,10 +4834,12 @@ const deserializeAws_restJson1GetConnectPeerAssociationsCommandError = async (ou
4499
4834
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4500
4835
  default:
4501
4836
  const parsedBody = parsedOutput.body;
4837
+ const $metadata = deserializeMetadata(output);
4838
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4502
4839
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4503
- name: parsedBody.code || parsedBody.Code || errorCode,
4840
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4504
4841
  $fault: "client",
4505
- $metadata: deserializeMetadata(output),
4842
+ $metadata,
4506
4843
  });
4507
4844
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4508
4845
  }
@@ -4528,8 +4865,61 @@ const deserializeAws_restJson1GetCoreNetworkCommandError = async (output, contex
4528
4865
  body: await parseBody(output.body, context),
4529
4866
  };
4530
4867
  let response;
4531
- let errorCode = "UnknownError";
4532
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4868
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4869
+ switch (errorCode) {
4870
+ case "AccessDeniedException":
4871
+ case "com.amazonaws.networkmanager#AccessDeniedException":
4872
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
4873
+ case "InternalServerException":
4874
+ case "com.amazonaws.networkmanager#InternalServerException":
4875
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
4876
+ case "ResourceNotFoundException":
4877
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
4878
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
4879
+ case "ThrottlingException":
4880
+ case "com.amazonaws.networkmanager#ThrottlingException":
4881
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
4882
+ case "ValidationException":
4883
+ case "com.amazonaws.networkmanager#ValidationException":
4884
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4885
+ default:
4886
+ const parsedBody = parsedOutput.body;
4887
+ const $metadata = deserializeMetadata(output);
4888
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4889
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4890
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4891
+ $fault: "client",
4892
+ $metadata,
4893
+ });
4894
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4895
+ }
4896
+ };
4897
+ const deserializeAws_restJson1GetCoreNetworkChangeEventsCommand = async (output, context) => {
4898
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4899
+ return deserializeAws_restJson1GetCoreNetworkChangeEventsCommandError(output, context);
4900
+ }
4901
+ const contents = {
4902
+ $metadata: deserializeMetadata(output),
4903
+ CoreNetworkChangeEvents: undefined,
4904
+ NextToken: undefined,
4905
+ };
4906
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4907
+ if (data.CoreNetworkChangeEvents !== undefined && data.CoreNetworkChangeEvents !== null) {
4908
+ contents.CoreNetworkChangeEvents = deserializeAws_restJson1CoreNetworkChangeEventList(data.CoreNetworkChangeEvents, context);
4909
+ }
4910
+ if (data.NextToken !== undefined && data.NextToken !== null) {
4911
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4912
+ }
4913
+ return Promise.resolve(contents);
4914
+ };
4915
+ exports.deserializeAws_restJson1GetCoreNetworkChangeEventsCommand = deserializeAws_restJson1GetCoreNetworkChangeEventsCommand;
4916
+ const deserializeAws_restJson1GetCoreNetworkChangeEventsCommandError = async (output, context) => {
4917
+ const parsedOutput = {
4918
+ ...output,
4919
+ body: await parseBody(output.body, context),
4920
+ };
4921
+ let response;
4922
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4533
4923
  switch (errorCode) {
4534
4924
  case "AccessDeniedException":
4535
4925
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4548,10 +4938,12 @@ const deserializeAws_restJson1GetCoreNetworkCommandError = async (output, contex
4548
4938
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4549
4939
  default:
4550
4940
  const parsedBody = parsedOutput.body;
4941
+ const $metadata = deserializeMetadata(output);
4942
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4551
4943
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4552
- name: parsedBody.code || parsedBody.Code || errorCode,
4944
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4553
4945
  $fault: "client",
4554
- $metadata: deserializeMetadata(output),
4946
+ $metadata,
4555
4947
  });
4556
4948
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4557
4949
  }
@@ -4581,8 +4973,7 @@ const deserializeAws_restJson1GetCoreNetworkChangeSetCommandError = async (outpu
4581
4973
  body: await parseBody(output.body, context),
4582
4974
  };
4583
4975
  let response;
4584
- let errorCode = "UnknownError";
4585
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4976
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4586
4977
  switch (errorCode) {
4587
4978
  case "AccessDeniedException":
4588
4979
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4601,10 +4992,12 @@ const deserializeAws_restJson1GetCoreNetworkChangeSetCommandError = async (outpu
4601
4992
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4602
4993
  default:
4603
4994
  const parsedBody = parsedOutput.body;
4995
+ const $metadata = deserializeMetadata(output);
4996
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4604
4997
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4605
- name: parsedBody.code || parsedBody.Code || errorCode,
4998
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4606
4999
  $fault: "client",
4607
- $metadata: deserializeMetadata(output),
5000
+ $metadata,
4608
5001
  });
4609
5002
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4610
5003
  }
@@ -4630,8 +5023,7 @@ const deserializeAws_restJson1GetCoreNetworkPolicyCommandError = async (output,
4630
5023
  body: await parseBody(output.body, context),
4631
5024
  };
4632
5025
  let response;
4633
- let errorCode = "UnknownError";
4634
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5026
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4635
5027
  switch (errorCode) {
4636
5028
  case "AccessDeniedException":
4637
5029
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4650,10 +5042,12 @@ const deserializeAws_restJson1GetCoreNetworkPolicyCommandError = async (output,
4650
5042
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4651
5043
  default:
4652
5044
  const parsedBody = parsedOutput.body;
5045
+ const $metadata = deserializeMetadata(output);
5046
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4653
5047
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4654
- name: parsedBody.code || parsedBody.Code || errorCode,
5048
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4655
5049
  $fault: "client",
4656
- $metadata: deserializeMetadata(output),
5050
+ $metadata,
4657
5051
  });
4658
5052
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4659
5053
  }
@@ -4683,8 +5077,7 @@ const deserializeAws_restJson1GetCustomerGatewayAssociationsCommandError = async
4683
5077
  body: await parseBody(output.body, context),
4684
5078
  };
4685
5079
  let response;
4686
- let errorCode = "UnknownError";
4687
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5080
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4688
5081
  switch (errorCode) {
4689
5082
  case "AccessDeniedException":
4690
5083
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4706,10 +5099,12 @@ const deserializeAws_restJson1GetCustomerGatewayAssociationsCommandError = async
4706
5099
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4707
5100
  default:
4708
5101
  const parsedBody = parsedOutput.body;
5102
+ const $metadata = deserializeMetadata(output);
5103
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4709
5104
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4710
- name: parsedBody.code || parsedBody.Code || errorCode,
5105
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4711
5106
  $fault: "client",
4712
- $metadata: deserializeMetadata(output),
5107
+ $metadata,
4713
5108
  });
4714
5109
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4715
5110
  }
@@ -4739,8 +5134,7 @@ const deserializeAws_restJson1GetDevicesCommandError = async (output, context) =
4739
5134
  body: await parseBody(output.body, context),
4740
5135
  };
4741
5136
  let response;
4742
- let errorCode = "UnknownError";
4743
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5137
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4744
5138
  switch (errorCode) {
4745
5139
  case "AccessDeniedException":
4746
5140
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4759,10 +5153,12 @@ const deserializeAws_restJson1GetDevicesCommandError = async (output, context) =
4759
5153
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4760
5154
  default:
4761
5155
  const parsedBody = parsedOutput.body;
5156
+ const $metadata = deserializeMetadata(output);
5157
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4762
5158
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4763
- name: parsedBody.code || parsedBody.Code || errorCode,
5159
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4764
5160
  $fault: "client",
4765
- $metadata: deserializeMetadata(output),
5161
+ $metadata,
4766
5162
  });
4767
5163
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4768
5164
  }
@@ -4792,8 +5188,7 @@ const deserializeAws_restJson1GetLinkAssociationsCommandError = async (output, c
4792
5188
  body: await parseBody(output.body, context),
4793
5189
  };
4794
5190
  let response;
4795
- let errorCode = "UnknownError";
4796
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5191
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4797
5192
  switch (errorCode) {
4798
5193
  case "AccessDeniedException":
4799
5194
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4812,10 +5207,12 @@ const deserializeAws_restJson1GetLinkAssociationsCommandError = async (output, c
4812
5207
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4813
5208
  default:
4814
5209
  const parsedBody = parsedOutput.body;
5210
+ const $metadata = deserializeMetadata(output);
5211
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4815
5212
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4816
- name: parsedBody.code || parsedBody.Code || errorCode,
5213
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4817
5214
  $fault: "client",
4818
- $metadata: deserializeMetadata(output),
5215
+ $metadata,
4819
5216
  });
4820
5217
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4821
5218
  }
@@ -4845,8 +5242,7 @@ const deserializeAws_restJson1GetLinksCommandError = async (output, context) =>
4845
5242
  body: await parseBody(output.body, context),
4846
5243
  };
4847
5244
  let response;
4848
- let errorCode = "UnknownError";
4849
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5245
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4850
5246
  switch (errorCode) {
4851
5247
  case "AccessDeniedException":
4852
5248
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4865,10 +5261,12 @@ const deserializeAws_restJson1GetLinksCommandError = async (output, context) =>
4865
5261
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4866
5262
  default:
4867
5263
  const parsedBody = parsedOutput.body;
5264
+ const $metadata = deserializeMetadata(output);
5265
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4868
5266
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4869
- name: parsedBody.code || parsedBody.Code || errorCode,
5267
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4870
5268
  $fault: "client",
4871
- $metadata: deserializeMetadata(output),
5269
+ $metadata,
4872
5270
  });
4873
5271
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4874
5272
  }
@@ -4898,8 +5296,7 @@ const deserializeAws_restJson1GetNetworkResourceCountsCommandError = async (outp
4898
5296
  body: await parseBody(output.body, context),
4899
5297
  };
4900
5298
  let response;
4901
- let errorCode = "UnknownError";
4902
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5299
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4903
5300
  switch (errorCode) {
4904
5301
  case "AccessDeniedException":
4905
5302
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4915,10 +5312,12 @@ const deserializeAws_restJson1GetNetworkResourceCountsCommandError = async (outp
4915
5312
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4916
5313
  default:
4917
5314
  const parsedBody = parsedOutput.body;
5315
+ const $metadata = deserializeMetadata(output);
5316
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4918
5317
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4919
- name: parsedBody.code || parsedBody.Code || errorCode,
5318
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4920
5319
  $fault: "client",
4921
- $metadata: deserializeMetadata(output),
5320
+ $metadata,
4922
5321
  });
4923
5322
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4924
5323
  }
@@ -4948,8 +5347,7 @@ const deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError = asyn
4948
5347
  body: await parseBody(output.body, context),
4949
5348
  };
4950
5349
  let response;
4951
- let errorCode = "UnknownError";
4952
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5350
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4953
5351
  switch (errorCode) {
4954
5352
  case "AccessDeniedException":
4955
5353
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -4968,10 +5366,12 @@ const deserializeAws_restJson1GetNetworkResourceRelationshipsCommandError = asyn
4968
5366
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
4969
5367
  default:
4970
5368
  const parsedBody = parsedOutput.body;
5369
+ const $metadata = deserializeMetadata(output);
5370
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4971
5371
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
4972
- name: parsedBody.code || parsedBody.Code || errorCode,
5372
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4973
5373
  $fault: "client",
4974
- $metadata: deserializeMetadata(output),
5374
+ $metadata,
4975
5375
  });
4976
5376
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4977
5377
  }
@@ -5001,8 +5401,7 @@ const deserializeAws_restJson1GetNetworkResourcesCommandError = async (output, c
5001
5401
  body: await parseBody(output.body, context),
5002
5402
  };
5003
5403
  let response;
5004
- let errorCode = "UnknownError";
5005
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5404
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5006
5405
  switch (errorCode) {
5007
5406
  case "AccessDeniedException":
5008
5407
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5021,10 +5420,12 @@ const deserializeAws_restJson1GetNetworkResourcesCommandError = async (output, c
5021
5420
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5022
5421
  default:
5023
5422
  const parsedBody = parsedOutput.body;
5423
+ const $metadata = deserializeMetadata(output);
5424
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5024
5425
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5025
- name: parsedBody.code || parsedBody.Code || errorCode,
5426
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5026
5427
  $fault: "client",
5027
- $metadata: deserializeMetadata(output),
5428
+ $metadata,
5028
5429
  });
5029
5430
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5030
5431
  }
@@ -5066,8 +5467,7 @@ const deserializeAws_restJson1GetNetworkRoutesCommandError = async (output, cont
5066
5467
  body: await parseBody(output.body, context),
5067
5468
  };
5068
5469
  let response;
5069
- let errorCode = "UnknownError";
5070
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5470
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5071
5471
  switch (errorCode) {
5072
5472
  case "AccessDeniedException":
5073
5473
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5086,10 +5486,12 @@ const deserializeAws_restJson1GetNetworkRoutesCommandError = async (output, cont
5086
5486
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5087
5487
  default:
5088
5488
  const parsedBody = parsedOutput.body;
5489
+ const $metadata = deserializeMetadata(output);
5490
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5089
5491
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5090
- name: parsedBody.code || parsedBody.Code || errorCode,
5492
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5091
5493
  $fault: "client",
5092
- $metadata: deserializeMetadata(output),
5494
+ $metadata,
5093
5495
  });
5094
5496
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5095
5497
  }
@@ -5119,8 +5521,7 @@ const deserializeAws_restJson1GetNetworkTelemetryCommandError = async (output, c
5119
5521
  body: await parseBody(output.body, context),
5120
5522
  };
5121
5523
  let response;
5122
- let errorCode = "UnknownError";
5123
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5524
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5124
5525
  switch (errorCode) {
5125
5526
  case "AccessDeniedException":
5126
5527
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5139,10 +5540,12 @@ const deserializeAws_restJson1GetNetworkTelemetryCommandError = async (output, c
5139
5540
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5140
5541
  default:
5141
5542
  const parsedBody = parsedOutput.body;
5543
+ const $metadata = deserializeMetadata(output);
5544
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5142
5545
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5143
- name: parsedBody.code || parsedBody.Code || errorCode,
5546
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5144
5547
  $fault: "client",
5145
- $metadata: deserializeMetadata(output),
5548
+ $metadata,
5146
5549
  });
5147
5550
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5148
5551
  }
@@ -5168,8 +5571,7 @@ const deserializeAws_restJson1GetResourcePolicyCommandError = async (output, con
5168
5571
  body: await parseBody(output.body, context),
5169
5572
  };
5170
5573
  let response;
5171
- let errorCode = "UnknownError";
5172
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5574
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5173
5575
  switch (errorCode) {
5174
5576
  case "AccessDeniedException":
5175
5577
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5185,10 +5587,12 @@ const deserializeAws_restJson1GetResourcePolicyCommandError = async (output, con
5185
5587
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5186
5588
  default:
5187
5589
  const parsedBody = parsedOutput.body;
5590
+ const $metadata = deserializeMetadata(output);
5591
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5188
5592
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5189
- name: parsedBody.code || parsedBody.Code || errorCode,
5593
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5190
5594
  $fault: "client",
5191
- $metadata: deserializeMetadata(output),
5595
+ $metadata,
5192
5596
  });
5193
5597
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5194
5598
  }
@@ -5214,8 +5618,7 @@ const deserializeAws_restJson1GetRouteAnalysisCommandError = async (output, cont
5214
5618
  body: await parseBody(output.body, context),
5215
5619
  };
5216
5620
  let response;
5217
- let errorCode = "UnknownError";
5218
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5621
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5219
5622
  switch (errorCode) {
5220
5623
  case "AccessDeniedException":
5221
5624
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5234,10 +5637,12 @@ const deserializeAws_restJson1GetRouteAnalysisCommandError = async (output, cont
5234
5637
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5235
5638
  default:
5236
5639
  const parsedBody = parsedOutput.body;
5640
+ const $metadata = deserializeMetadata(output);
5641
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5237
5642
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5238
- name: parsedBody.code || parsedBody.Code || errorCode,
5643
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5239
5644
  $fault: "client",
5240
- $metadata: deserializeMetadata(output),
5645
+ $metadata,
5241
5646
  });
5242
5647
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5243
5648
  }
@@ -5267,8 +5672,7 @@ const deserializeAws_restJson1GetSitesCommandError = async (output, context) =>
5267
5672
  body: await parseBody(output.body, context),
5268
5673
  };
5269
5674
  let response;
5270
- let errorCode = "UnknownError";
5271
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5675
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5272
5676
  switch (errorCode) {
5273
5677
  case "AccessDeniedException":
5274
5678
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5287,10 +5691,12 @@ const deserializeAws_restJson1GetSitesCommandError = async (output, context) =>
5287
5691
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5288
5692
  default:
5289
5693
  const parsedBody = parsedOutput.body;
5694
+ const $metadata = deserializeMetadata(output);
5695
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5290
5696
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5291
- name: parsedBody.code || parsedBody.Code || errorCode,
5697
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5292
5698
  $fault: "client",
5293
- $metadata: deserializeMetadata(output),
5699
+ $metadata,
5294
5700
  });
5295
5701
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5296
5702
  }
@@ -5316,8 +5722,7 @@ const deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError = async (ou
5316
5722
  body: await parseBody(output.body, context),
5317
5723
  };
5318
5724
  let response;
5319
- let errorCode = "UnknownError";
5320
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5725
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5321
5726
  switch (errorCode) {
5322
5727
  case "AccessDeniedException":
5323
5728
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5336,10 +5741,12 @@ const deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError = async (ou
5336
5741
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5337
5742
  default:
5338
5743
  const parsedBody = parsedOutput.body;
5744
+ const $metadata = deserializeMetadata(output);
5745
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5339
5746
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5340
- name: parsedBody.code || parsedBody.Code || errorCode,
5747
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5341
5748
  $fault: "client",
5342
- $metadata: deserializeMetadata(output),
5749
+ $metadata,
5343
5750
  });
5344
5751
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5345
5752
  }
@@ -5369,8 +5776,7 @@ const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandErr
5369
5776
  body: await parseBody(output.body, context),
5370
5777
  };
5371
5778
  let response;
5372
- let errorCode = "UnknownError";
5373
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5779
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5374
5780
  switch (errorCode) {
5375
5781
  case "AccessDeniedException":
5376
5782
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5392,10 +5798,62 @@ const deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandErr
5392
5798
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5393
5799
  default:
5394
5800
  const parsedBody = parsedOutput.body;
5801
+ const $metadata = deserializeMetadata(output);
5802
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5803
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5804
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5805
+ $fault: "client",
5806
+ $metadata,
5807
+ });
5808
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5809
+ }
5810
+ };
5811
+ const deserializeAws_restJson1GetTransitGatewayPeeringCommand = async (output, context) => {
5812
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5813
+ return deserializeAws_restJson1GetTransitGatewayPeeringCommandError(output, context);
5814
+ }
5815
+ const contents = {
5816
+ $metadata: deserializeMetadata(output),
5817
+ TransitGatewayPeering: undefined,
5818
+ };
5819
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5820
+ if (data.TransitGatewayPeering !== undefined && data.TransitGatewayPeering !== null) {
5821
+ contents.TransitGatewayPeering = deserializeAws_restJson1TransitGatewayPeering(data.TransitGatewayPeering, context);
5822
+ }
5823
+ return Promise.resolve(contents);
5824
+ };
5825
+ exports.deserializeAws_restJson1GetTransitGatewayPeeringCommand = deserializeAws_restJson1GetTransitGatewayPeeringCommand;
5826
+ const deserializeAws_restJson1GetTransitGatewayPeeringCommandError = async (output, context) => {
5827
+ const parsedOutput = {
5828
+ ...output,
5829
+ body: await parseBody(output.body, context),
5830
+ };
5831
+ let response;
5832
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5833
+ switch (errorCode) {
5834
+ case "AccessDeniedException":
5835
+ case "com.amazonaws.networkmanager#AccessDeniedException":
5836
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5837
+ case "InternalServerException":
5838
+ case "com.amazonaws.networkmanager#InternalServerException":
5839
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
5840
+ case "ResourceNotFoundException":
5841
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
5842
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
5843
+ case "ThrottlingException":
5844
+ case "com.amazonaws.networkmanager#ThrottlingException":
5845
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5846
+ case "ValidationException":
5847
+ case "com.amazonaws.networkmanager#ValidationException":
5848
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5849
+ default:
5850
+ const parsedBody = parsedOutput.body;
5851
+ const $metadata = deserializeMetadata(output);
5852
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5395
5853
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5396
- name: parsedBody.code || parsedBody.Code || errorCode,
5854
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5397
5855
  $fault: "client",
5398
- $metadata: deserializeMetadata(output),
5856
+ $metadata,
5399
5857
  });
5400
5858
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5401
5859
  }
@@ -5425,8 +5883,57 @@ const deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = async
5425
5883
  body: await parseBody(output.body, context),
5426
5884
  };
5427
5885
  let response;
5428
- let errorCode = "UnknownError";
5429
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5886
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5887
+ switch (errorCode) {
5888
+ case "AccessDeniedException":
5889
+ case "com.amazonaws.networkmanager#AccessDeniedException":
5890
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
5891
+ case "InternalServerException":
5892
+ case "com.amazonaws.networkmanager#InternalServerException":
5893
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
5894
+ case "ResourceNotFoundException":
5895
+ case "com.amazonaws.networkmanager#ResourceNotFoundException":
5896
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
5897
+ case "ThrottlingException":
5898
+ case "com.amazonaws.networkmanager#ThrottlingException":
5899
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
5900
+ case "ValidationException":
5901
+ case "com.amazonaws.networkmanager#ValidationException":
5902
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5903
+ default:
5904
+ const parsedBody = parsedOutput.body;
5905
+ const $metadata = deserializeMetadata(output);
5906
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5907
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5908
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5909
+ $fault: "client",
5910
+ $metadata,
5911
+ });
5912
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5913
+ }
5914
+ };
5915
+ const deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = async (output, context) => {
5916
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
5917
+ return deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommandError(output, context);
5918
+ }
5919
+ const contents = {
5920
+ $metadata: deserializeMetadata(output),
5921
+ TransitGatewayRouteTableAttachment: undefined,
5922
+ };
5923
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5924
+ if (data.TransitGatewayRouteTableAttachment !== undefined && data.TransitGatewayRouteTableAttachment !== null) {
5925
+ contents.TransitGatewayRouteTableAttachment = deserializeAws_restJson1TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
5926
+ }
5927
+ return Promise.resolve(contents);
5928
+ };
5929
+ exports.deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand;
5930
+ const deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommandError = async (output, context) => {
5931
+ const parsedOutput = {
5932
+ ...output,
5933
+ body: await parseBody(output.body, context),
5934
+ };
5935
+ let response;
5936
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5430
5937
  switch (errorCode) {
5431
5938
  case "AccessDeniedException":
5432
5939
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5445,10 +5952,12 @@ const deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = async
5445
5952
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5446
5953
  default:
5447
5954
  const parsedBody = parsedOutput.body;
5955
+ const $metadata = deserializeMetadata(output);
5956
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5448
5957
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5449
- name: parsedBody.code || parsedBody.Code || errorCode,
5958
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5450
5959
  $fault: "client",
5451
- $metadata: deserializeMetadata(output),
5960
+ $metadata,
5452
5961
  });
5453
5962
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5454
5963
  }
@@ -5474,8 +5983,7 @@ const deserializeAws_restJson1GetVpcAttachmentCommandError = async (output, cont
5474
5983
  body: await parseBody(output.body, context),
5475
5984
  };
5476
5985
  let response;
5477
- let errorCode = "UnknownError";
5478
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5986
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5479
5987
  switch (errorCode) {
5480
5988
  case "AccessDeniedException":
5481
5989
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5494,10 +6002,12 @@ const deserializeAws_restJson1GetVpcAttachmentCommandError = async (output, cont
5494
6002
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5495
6003
  default:
5496
6004
  const parsedBody = parsedOutput.body;
6005
+ const $metadata = deserializeMetadata(output);
6006
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5497
6007
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5498
- name: parsedBody.code || parsedBody.Code || errorCode,
6008
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5499
6009
  $fault: "client",
5500
- $metadata: deserializeMetadata(output),
6010
+ $metadata,
5501
6011
  });
5502
6012
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5503
6013
  }
@@ -5527,8 +6037,7 @@ const deserializeAws_restJson1ListAttachmentsCommandError = async (output, conte
5527
6037
  body: await parseBody(output.body, context),
5528
6038
  };
5529
6039
  let response;
5530
- let errorCode = "UnknownError";
5531
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6040
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5532
6041
  switch (errorCode) {
5533
6042
  case "AccessDeniedException":
5534
6043
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5544,10 +6053,12 @@ const deserializeAws_restJson1ListAttachmentsCommandError = async (output, conte
5544
6053
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5545
6054
  default:
5546
6055
  const parsedBody = parsedOutput.body;
6056
+ const $metadata = deserializeMetadata(output);
6057
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5547
6058
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5548
- name: parsedBody.code || parsedBody.Code || errorCode,
6059
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5549
6060
  $fault: "client",
5550
- $metadata: deserializeMetadata(output),
6061
+ $metadata,
5551
6062
  });
5552
6063
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5553
6064
  }
@@ -5577,8 +6088,7 @@ const deserializeAws_restJson1ListConnectPeersCommandError = async (output, cont
5577
6088
  body: await parseBody(output.body, context),
5578
6089
  };
5579
6090
  let response;
5580
- let errorCode = "UnknownError";
5581
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6091
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5582
6092
  switch (errorCode) {
5583
6093
  case "AccessDeniedException":
5584
6094
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5594,10 +6104,12 @@ const deserializeAws_restJson1ListConnectPeersCommandError = async (output, cont
5594
6104
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5595
6105
  default:
5596
6106
  const parsedBody = parsedOutput.body;
6107
+ const $metadata = deserializeMetadata(output);
6108
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5597
6109
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5598
- name: parsedBody.code || parsedBody.Code || errorCode,
6110
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5599
6111
  $fault: "client",
5600
- $metadata: deserializeMetadata(output),
6112
+ $metadata,
5601
6113
  });
5602
6114
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5603
6115
  }
@@ -5627,8 +6139,7 @@ const deserializeAws_restJson1ListCoreNetworkPolicyVersionsCommandError = async
5627
6139
  body: await parseBody(output.body, context),
5628
6140
  };
5629
6141
  let response;
5630
- let errorCode = "UnknownError";
5631
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6142
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5632
6143
  switch (errorCode) {
5633
6144
  case "AccessDeniedException":
5634
6145
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5647,10 +6158,12 @@ const deserializeAws_restJson1ListCoreNetworkPolicyVersionsCommandError = async
5647
6158
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5648
6159
  default:
5649
6160
  const parsedBody = parsedOutput.body;
6161
+ const $metadata = deserializeMetadata(output);
6162
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5650
6163
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5651
- name: parsedBody.code || parsedBody.Code || errorCode,
6164
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5652
6165
  $fault: "client",
5653
- $metadata: deserializeMetadata(output),
6166
+ $metadata,
5654
6167
  });
5655
6168
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5656
6169
  }
@@ -5680,8 +6193,7 @@ const deserializeAws_restJson1ListCoreNetworksCommandError = async (output, cont
5680
6193
  body: await parseBody(output.body, context),
5681
6194
  };
5682
6195
  let response;
5683
- let errorCode = "UnknownError";
5684
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6196
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5685
6197
  switch (errorCode) {
5686
6198
  case "AccessDeniedException":
5687
6199
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5697,10 +6209,12 @@ const deserializeAws_restJson1ListCoreNetworksCommandError = async (output, cont
5697
6209
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5698
6210
  default:
5699
6211
  const parsedBody = parsedOutput.body;
6212
+ const $metadata = deserializeMetadata(output);
6213
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5700
6214
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5701
- name: parsedBody.code || parsedBody.Code || errorCode,
6215
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5702
6216
  $fault: "client",
5703
- $metadata: deserializeMetadata(output),
6217
+ $metadata,
5704
6218
  });
5705
6219
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5706
6220
  }
@@ -5730,15 +6244,67 @@ const deserializeAws_restJson1ListOrganizationServiceAccessStatusCommandError =
5730
6244
  body: await parseBody(output.body, context),
5731
6245
  };
5732
6246
  let response;
5733
- let errorCode = "UnknownError";
5734
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6247
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6248
+ switch (errorCode) {
6249
+ default:
6250
+ const parsedBody = parsedOutput.body;
6251
+ const $metadata = deserializeMetadata(output);
6252
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6253
+ response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6254
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6255
+ $fault: "client",
6256
+ $metadata,
6257
+ });
6258
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6259
+ }
6260
+ };
6261
+ const deserializeAws_restJson1ListPeeringsCommand = async (output, context) => {
6262
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6263
+ return deserializeAws_restJson1ListPeeringsCommandError(output, context);
6264
+ }
6265
+ const contents = {
6266
+ $metadata: deserializeMetadata(output),
6267
+ NextToken: undefined,
6268
+ Peerings: undefined,
6269
+ };
6270
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
6271
+ if (data.NextToken !== undefined && data.NextToken !== null) {
6272
+ contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
6273
+ }
6274
+ if (data.Peerings !== undefined && data.Peerings !== null) {
6275
+ contents.Peerings = deserializeAws_restJson1PeeringList(data.Peerings, context);
6276
+ }
6277
+ return Promise.resolve(contents);
6278
+ };
6279
+ exports.deserializeAws_restJson1ListPeeringsCommand = deserializeAws_restJson1ListPeeringsCommand;
6280
+ const deserializeAws_restJson1ListPeeringsCommandError = async (output, context) => {
6281
+ const parsedOutput = {
6282
+ ...output,
6283
+ body: await parseBody(output.body, context),
6284
+ };
6285
+ let response;
6286
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5735
6287
  switch (errorCode) {
6288
+ case "AccessDeniedException":
6289
+ case "com.amazonaws.networkmanager#AccessDeniedException":
6290
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
6291
+ case "InternalServerException":
6292
+ case "com.amazonaws.networkmanager#InternalServerException":
6293
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
6294
+ case "ThrottlingException":
6295
+ case "com.amazonaws.networkmanager#ThrottlingException":
6296
+ throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
6297
+ case "ValidationException":
6298
+ case "com.amazonaws.networkmanager#ValidationException":
6299
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5736
6300
  default:
5737
6301
  const parsedBody = parsedOutput.body;
6302
+ const $metadata = deserializeMetadata(output);
6303
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5738
6304
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5739
- name: parsedBody.code || parsedBody.Code || errorCode,
6305
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5740
6306
  $fault: "client",
5741
- $metadata: deserializeMetadata(output),
6307
+ $metadata,
5742
6308
  });
5743
6309
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5744
6310
  }
@@ -5764,8 +6330,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
5764
6330
  body: await parseBody(output.body, context),
5765
6331
  };
5766
6332
  let response;
5767
- let errorCode = "UnknownError";
5768
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6333
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5769
6334
  switch (errorCode) {
5770
6335
  case "AccessDeniedException":
5771
6336
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5784,10 +6349,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
5784
6349
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5785
6350
  default:
5786
6351
  const parsedBody = parsedOutput.body;
6352
+ const $metadata = deserializeMetadata(output);
6353
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5787
6354
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5788
- name: parsedBody.code || parsedBody.Code || errorCode,
6355
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5789
6356
  $fault: "client",
5790
- $metadata: deserializeMetadata(output),
6357
+ $metadata,
5791
6358
  });
5792
6359
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5793
6360
  }
@@ -5813,8 +6380,7 @@ const deserializeAws_restJson1PutCoreNetworkPolicyCommandError = async (output,
5813
6380
  body: await parseBody(output.body, context),
5814
6381
  };
5815
6382
  let response;
5816
- let errorCode = "UnknownError";
5817
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6383
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5818
6384
  switch (errorCode) {
5819
6385
  case "AccessDeniedException":
5820
6386
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5839,10 +6405,12 @@ const deserializeAws_restJson1PutCoreNetworkPolicyCommandError = async (output,
5839
6405
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5840
6406
  default:
5841
6407
  const parsedBody = parsedOutput.body;
6408
+ const $metadata = deserializeMetadata(output);
6409
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5842
6410
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5843
- name: parsedBody.code || parsedBody.Code || errorCode,
6411
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5844
6412
  $fault: "client",
5845
- $metadata: deserializeMetadata(output),
6413
+ $metadata,
5846
6414
  });
5847
6415
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5848
6416
  }
@@ -5864,8 +6432,7 @@ const deserializeAws_restJson1PutResourcePolicyCommandError = async (output, con
5864
6432
  body: await parseBody(output.body, context),
5865
6433
  };
5866
6434
  let response;
5867
- let errorCode = "UnknownError";
5868
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6435
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5869
6436
  switch (errorCode) {
5870
6437
  case "AccessDeniedException":
5871
6438
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5887,10 +6454,12 @@ const deserializeAws_restJson1PutResourcePolicyCommandError = async (output, con
5887
6454
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5888
6455
  default:
5889
6456
  const parsedBody = parsedOutput.body;
6457
+ const $metadata = deserializeMetadata(output);
6458
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5890
6459
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5891
- name: parsedBody.code || parsedBody.Code || errorCode,
6460
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5892
6461
  $fault: "client",
5893
- $metadata: deserializeMetadata(output),
6462
+ $metadata,
5894
6463
  });
5895
6464
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5896
6465
  }
@@ -5916,8 +6485,7 @@ const deserializeAws_restJson1RegisterTransitGatewayCommandError = async (output
5916
6485
  body: await parseBody(output.body, context),
5917
6486
  };
5918
6487
  let response;
5919
- let errorCode = "UnknownError";
5920
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6488
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5921
6489
  switch (errorCode) {
5922
6490
  case "AccessDeniedException":
5923
6491
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5939,10 +6507,12 @@ const deserializeAws_restJson1RegisterTransitGatewayCommandError = async (output
5939
6507
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5940
6508
  default:
5941
6509
  const parsedBody = parsedOutput.body;
6510
+ const $metadata = deserializeMetadata(output);
6511
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5942
6512
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5943
- name: parsedBody.code || parsedBody.Code || errorCode,
6513
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5944
6514
  $fault: "client",
5945
- $metadata: deserializeMetadata(output),
6515
+ $metadata,
5946
6516
  });
5947
6517
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5948
6518
  }
@@ -5968,8 +6538,7 @@ const deserializeAws_restJson1RejectAttachmentCommandError = async (output, cont
5968
6538
  body: await parseBody(output.body, context),
5969
6539
  };
5970
6540
  let response;
5971
- let errorCode = "UnknownError";
5972
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6541
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5973
6542
  switch (errorCode) {
5974
6543
  case "AccessDeniedException":
5975
6544
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -5991,10 +6560,12 @@ const deserializeAws_restJson1RejectAttachmentCommandError = async (output, cont
5991
6560
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
5992
6561
  default:
5993
6562
  const parsedBody = parsedOutput.body;
6563
+ const $metadata = deserializeMetadata(output);
6564
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5994
6565
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
5995
- name: parsedBody.code || parsedBody.Code || errorCode,
6566
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5996
6567
  $fault: "client",
5997
- $metadata: deserializeMetadata(output),
6568
+ $metadata,
5998
6569
  });
5999
6570
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6000
6571
  }
@@ -6020,8 +6591,7 @@ const deserializeAws_restJson1RestoreCoreNetworkPolicyVersionCommandError = asyn
6020
6591
  body: await parseBody(output.body, context),
6021
6592
  };
6022
6593
  let response;
6023
- let errorCode = "UnknownError";
6024
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6594
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6025
6595
  switch (errorCode) {
6026
6596
  case "AccessDeniedException":
6027
6597
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6043,10 +6613,12 @@ const deserializeAws_restJson1RestoreCoreNetworkPolicyVersionCommandError = asyn
6043
6613
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6044
6614
  default:
6045
6615
  const parsedBody = parsedOutput.body;
6616
+ const $metadata = deserializeMetadata(output);
6617
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6046
6618
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6047
- name: parsedBody.code || parsedBody.Code || errorCode,
6619
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6048
6620
  $fault: "client",
6049
- $metadata: deserializeMetadata(output),
6621
+ $metadata,
6050
6622
  });
6051
6623
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6052
6624
  }
@@ -6072,8 +6644,7 @@ const deserializeAws_restJson1StartOrganizationServiceAccessUpdateCommandError =
6072
6644
  body: await parseBody(output.body, context),
6073
6645
  };
6074
6646
  let response;
6075
- let errorCode = "UnknownError";
6076
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6647
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6077
6648
  switch (errorCode) {
6078
6649
  case "AccessDeniedException":
6079
6650
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6095,10 +6666,12 @@ const deserializeAws_restJson1StartOrganizationServiceAccessUpdateCommandError =
6095
6666
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6096
6667
  default:
6097
6668
  const parsedBody = parsedOutput.body;
6669
+ const $metadata = deserializeMetadata(output);
6670
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6098
6671
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6099
- name: parsedBody.code || parsedBody.Code || errorCode,
6672
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6100
6673
  $fault: "client",
6101
- $metadata: deserializeMetadata(output),
6674
+ $metadata,
6102
6675
  });
6103
6676
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6104
6677
  }
@@ -6124,8 +6697,7 @@ const deserializeAws_restJson1StartRouteAnalysisCommandError = async (output, co
6124
6697
  body: await parseBody(output.body, context),
6125
6698
  };
6126
6699
  let response;
6127
- let errorCode = "UnknownError";
6128
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6700
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6129
6701
  switch (errorCode) {
6130
6702
  case "AccessDeniedException":
6131
6703
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6147,10 +6719,12 @@ const deserializeAws_restJson1StartRouteAnalysisCommandError = async (output, co
6147
6719
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6148
6720
  default:
6149
6721
  const parsedBody = parsedOutput.body;
6722
+ const $metadata = deserializeMetadata(output);
6723
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6150
6724
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6151
- name: parsedBody.code || parsedBody.Code || errorCode,
6725
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6152
6726
  $fault: "client",
6153
- $metadata: deserializeMetadata(output),
6727
+ $metadata,
6154
6728
  });
6155
6729
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6156
6730
  }
@@ -6172,8 +6746,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
6172
6746
  body: await parseBody(output.body, context),
6173
6747
  };
6174
6748
  let response;
6175
- let errorCode = "UnknownError";
6176
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6749
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6177
6750
  switch (errorCode) {
6178
6751
  case "AccessDeniedException":
6179
6752
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6198,10 +6771,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
6198
6771
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6199
6772
  default:
6200
6773
  const parsedBody = parsedOutput.body;
6774
+ const $metadata = deserializeMetadata(output);
6775
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6201
6776
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6202
- name: parsedBody.code || parsedBody.Code || errorCode,
6777
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6203
6778
  $fault: "client",
6204
- $metadata: deserializeMetadata(output),
6779
+ $metadata,
6205
6780
  });
6206
6781
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6207
6782
  }
@@ -6223,8 +6798,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
6223
6798
  body: await parseBody(output.body, context),
6224
6799
  };
6225
6800
  let response;
6226
- let errorCode = "UnknownError";
6227
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6801
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6228
6802
  switch (errorCode) {
6229
6803
  case "AccessDeniedException":
6230
6804
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6246,10 +6820,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
6246
6820
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6247
6821
  default:
6248
6822
  const parsedBody = parsedOutput.body;
6823
+ const $metadata = deserializeMetadata(output);
6824
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6249
6825
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6250
- name: parsedBody.code || parsedBody.Code || errorCode,
6826
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6251
6827
  $fault: "client",
6252
- $metadata: deserializeMetadata(output),
6828
+ $metadata,
6253
6829
  });
6254
6830
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6255
6831
  }
@@ -6275,8 +6851,7 @@ const deserializeAws_restJson1UpdateConnectionCommandError = async (output, cont
6275
6851
  body: await parseBody(output.body, context),
6276
6852
  };
6277
6853
  let response;
6278
- let errorCode = "UnknownError";
6279
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6854
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6280
6855
  switch (errorCode) {
6281
6856
  case "AccessDeniedException":
6282
6857
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6298,10 +6873,12 @@ const deserializeAws_restJson1UpdateConnectionCommandError = async (output, cont
6298
6873
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6299
6874
  default:
6300
6875
  const parsedBody = parsedOutput.body;
6876
+ const $metadata = deserializeMetadata(output);
6877
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6301
6878
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6302
- name: parsedBody.code || parsedBody.Code || errorCode,
6879
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6303
6880
  $fault: "client",
6304
- $metadata: deserializeMetadata(output),
6881
+ $metadata,
6305
6882
  });
6306
6883
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6307
6884
  }
@@ -6327,8 +6904,7 @@ const deserializeAws_restJson1UpdateCoreNetworkCommandError = async (output, con
6327
6904
  body: await parseBody(output.body, context),
6328
6905
  };
6329
6906
  let response;
6330
- let errorCode = "UnknownError";
6331
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6907
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6332
6908
  switch (errorCode) {
6333
6909
  case "AccessDeniedException":
6334
6910
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6350,10 +6926,12 @@ const deserializeAws_restJson1UpdateCoreNetworkCommandError = async (output, con
6350
6926
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6351
6927
  default:
6352
6928
  const parsedBody = parsedOutput.body;
6929
+ const $metadata = deserializeMetadata(output);
6930
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6353
6931
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6354
- name: parsedBody.code || parsedBody.Code || errorCode,
6932
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6355
6933
  $fault: "client",
6356
- $metadata: deserializeMetadata(output),
6934
+ $metadata,
6357
6935
  });
6358
6936
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6359
6937
  }
@@ -6379,8 +6957,7 @@ const deserializeAws_restJson1UpdateDeviceCommandError = async (output, context)
6379
6957
  body: await parseBody(output.body, context),
6380
6958
  };
6381
6959
  let response;
6382
- let errorCode = "UnknownError";
6383
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6960
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6384
6961
  switch (errorCode) {
6385
6962
  case "AccessDeniedException":
6386
6963
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6402,10 +6979,12 @@ const deserializeAws_restJson1UpdateDeviceCommandError = async (output, context)
6402
6979
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6403
6980
  default:
6404
6981
  const parsedBody = parsedOutput.body;
6982
+ const $metadata = deserializeMetadata(output);
6983
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6405
6984
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6406
- name: parsedBody.code || parsedBody.Code || errorCode,
6985
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6407
6986
  $fault: "client",
6408
- $metadata: deserializeMetadata(output),
6987
+ $metadata,
6409
6988
  });
6410
6989
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6411
6990
  }
@@ -6431,8 +7010,7 @@ const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async (output, c
6431
7010
  body: await parseBody(output.body, context),
6432
7011
  };
6433
7012
  let response;
6434
- let errorCode = "UnknownError";
6435
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7013
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6436
7014
  switch (errorCode) {
6437
7015
  case "AccessDeniedException":
6438
7016
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6454,10 +7032,12 @@ const deserializeAws_restJson1UpdateGlobalNetworkCommandError = async (output, c
6454
7032
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6455
7033
  default:
6456
7034
  const parsedBody = parsedOutput.body;
7035
+ const $metadata = deserializeMetadata(output);
7036
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6457
7037
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6458
- name: parsedBody.code || parsedBody.Code || errorCode,
7038
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6459
7039
  $fault: "client",
6460
- $metadata: deserializeMetadata(output),
7040
+ $metadata,
6461
7041
  });
6462
7042
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6463
7043
  }
@@ -6483,8 +7063,7 @@ const deserializeAws_restJson1UpdateLinkCommandError = async (output, context) =
6483
7063
  body: await parseBody(output.body, context),
6484
7064
  };
6485
7065
  let response;
6486
- let errorCode = "UnknownError";
6487
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7066
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6488
7067
  switch (errorCode) {
6489
7068
  case "AccessDeniedException":
6490
7069
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6509,10 +7088,12 @@ const deserializeAws_restJson1UpdateLinkCommandError = async (output, context) =
6509
7088
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6510
7089
  default:
6511
7090
  const parsedBody = parsedOutput.body;
7091
+ const $metadata = deserializeMetadata(output);
7092
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6512
7093
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6513
- name: parsedBody.code || parsedBody.Code || errorCode,
7094
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6514
7095
  $fault: "client",
6515
- $metadata: deserializeMetadata(output),
7096
+ $metadata,
6516
7097
  });
6517
7098
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6518
7099
  }
@@ -6542,8 +7123,7 @@ const deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError = async
6542
7123
  body: await parseBody(output.body, context),
6543
7124
  };
6544
7125
  let response;
6545
- let errorCode = "UnknownError";
6546
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7126
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6547
7127
  switch (errorCode) {
6548
7128
  case "AccessDeniedException":
6549
7129
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6565,10 +7145,12 @@ const deserializeAws_restJson1UpdateNetworkResourceMetadataCommandError = async
6565
7145
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6566
7146
  default:
6567
7147
  const parsedBody = parsedOutput.body;
7148
+ const $metadata = deserializeMetadata(output);
7149
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6568
7150
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6569
- name: parsedBody.code || parsedBody.Code || errorCode,
7151
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6570
7152
  $fault: "client",
6571
- $metadata: deserializeMetadata(output),
7153
+ $metadata,
6572
7154
  });
6573
7155
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6574
7156
  }
@@ -6594,8 +7176,7 @@ const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) =
6594
7176
  body: await parseBody(output.body, context),
6595
7177
  };
6596
7178
  let response;
6597
- let errorCode = "UnknownError";
6598
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7179
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6599
7180
  switch (errorCode) {
6600
7181
  case "AccessDeniedException":
6601
7182
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6617,10 +7198,12 @@ const deserializeAws_restJson1UpdateSiteCommandError = async (output, context) =
6617
7198
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6618
7199
  default:
6619
7200
  const parsedBody = parsedOutput.body;
7201
+ const $metadata = deserializeMetadata(output);
7202
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6620
7203
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6621
- name: parsedBody.code || parsedBody.Code || errorCode,
7204
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6622
7205
  $fault: "client",
6623
- $metadata: deserializeMetadata(output),
7206
+ $metadata,
6624
7207
  });
6625
7208
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6626
7209
  }
@@ -6646,8 +7229,7 @@ const deserializeAws_restJson1UpdateVpcAttachmentCommandError = async (output, c
6646
7229
  body: await parseBody(output.body, context),
6647
7230
  };
6648
7231
  let response;
6649
- let errorCode = "UnknownError";
6650
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7232
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6651
7233
  switch (errorCode) {
6652
7234
  case "AccessDeniedException":
6653
7235
  case "com.amazonaws.networkmanager#AccessDeniedException":
@@ -6669,10 +7251,12 @@ const deserializeAws_restJson1UpdateVpcAttachmentCommandError = async (output, c
6669
7251
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
6670
7252
  default:
6671
7253
  const parsedBody = parsedOutput.body;
7254
+ const $metadata = deserializeMetadata(output);
7255
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6672
7256
  response = new NetworkManagerServiceException_1.NetworkManagerServiceException({
6673
- name: parsedBody.code || parsedBody.Code || errorCode,
7257
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6674
7258
  $fault: "client",
6675
- $metadata: deserializeMetadata(output),
7259
+ $metadata,
6676
7260
  });
6677
7261
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6678
7262
  }
@@ -6817,24 +7401,24 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
6817
7401
  };
6818
7402
  const serializeAws_restJson1AWSLocation = (input, context) => {
6819
7403
  return {
6820
- ...(input.SubnetArn !== undefined && input.SubnetArn !== null && { SubnetArn: input.SubnetArn }),
6821
- ...(input.Zone !== undefined && input.Zone !== null && { Zone: input.Zone }),
7404
+ ...(input.SubnetArn != null && { SubnetArn: input.SubnetArn }),
7405
+ ...(input.Zone != null && { Zone: input.Zone }),
6822
7406
  };
6823
7407
  };
6824
7408
  const serializeAws_restJson1Bandwidth = (input, context) => {
6825
7409
  return {
6826
- ...(input.DownloadSpeed !== undefined && input.DownloadSpeed !== null && { DownloadSpeed: input.DownloadSpeed }),
6827
- ...(input.UploadSpeed !== undefined && input.UploadSpeed !== null && { UploadSpeed: input.UploadSpeed }),
7410
+ ...(input.DownloadSpeed != null && { DownloadSpeed: input.DownloadSpeed }),
7411
+ ...(input.UploadSpeed != null && { UploadSpeed: input.UploadSpeed }),
6828
7412
  };
6829
7413
  };
6830
7414
  const serializeAws_restJson1BgpOptions = (input, context) => {
6831
7415
  return {
6832
- ...(input.PeerAsn !== undefined && input.PeerAsn !== null && { PeerAsn: input.PeerAsn }),
7416
+ ...(input.PeerAsn != null && { PeerAsn: input.PeerAsn }),
6833
7417
  };
6834
7418
  };
6835
7419
  const serializeAws_restJson1ConnectAttachmentOptions = (input, context) => {
6836
7420
  return {
6837
- ...(input.Protocol !== undefined && input.Protocol !== null && { Protocol: input.Protocol }),
7421
+ ...(input.Protocol != null && { Protocol: input.Protocol }),
6838
7422
  };
6839
7423
  };
6840
7424
  const serializeAws_restJson1ConstrainedStringList = (input, context) => {
@@ -6849,9 +7433,9 @@ const serializeAws_restJson1ConstrainedStringList = (input, context) => {
6849
7433
  };
6850
7434
  const serializeAws_restJson1CoreNetworkSegmentEdgeIdentifier = (input, context) => {
6851
7435
  return {
6852
- ...(input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId }),
6853
- ...(input.EdgeLocation !== undefined && input.EdgeLocation !== null && { EdgeLocation: input.EdgeLocation }),
6854
- ...(input.SegmentName !== undefined && input.SegmentName !== null && { SegmentName: input.SegmentName }),
7436
+ ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
7437
+ ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }),
7438
+ ...(input.SegmentName != null && { SegmentName: input.SegmentName }),
6855
7439
  };
6856
7440
  };
6857
7441
  const serializeAws_restJson1FilterMap = (input, context) => {
@@ -6877,9 +7461,9 @@ const serializeAws_restJson1FilterValues = (input, context) => {
6877
7461
  };
6878
7462
  const serializeAws_restJson1Location = (input, context) => {
6879
7463
  return {
6880
- ...(input.Address !== undefined && input.Address !== null && { Address: input.Address }),
6881
- ...(input.Latitude !== undefined && input.Latitude !== null && { Latitude: input.Latitude }),
6882
- ...(input.Longitude !== undefined && input.Longitude !== null && { Longitude: input.Longitude }),
7464
+ ...(input.Address != null && { Address: input.Address }),
7465
+ ...(input.Latitude != null && { Latitude: input.Latitude }),
7466
+ ...(input.Longitude != null && { Longitude: input.Longitude }),
6883
7467
  };
6884
7468
  };
6885
7469
  const serializeAws_restJson1NetworkResourceMetadataMap = (input, context) => {
@@ -6895,9 +7479,10 @@ const serializeAws_restJson1NetworkResourceMetadataMap = (input, context) => {
6895
7479
  };
6896
7480
  const serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification = (input, context) => {
6897
7481
  return {
6898
- ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }),
6899
- ...(input.TransitGatewayAttachmentArn !== undefined &&
6900
- input.TransitGatewayAttachmentArn !== null && { TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn }),
7482
+ ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
7483
+ ...(input.TransitGatewayAttachmentArn != null && {
7484
+ TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn,
7485
+ }),
6901
7486
  };
6902
7487
  };
6903
7488
  const serializeAws_restJson1RouteStateList = (input, context) => {
@@ -6912,12 +7497,12 @@ const serializeAws_restJson1RouteStateList = (input, context) => {
6912
7497
  };
6913
7498
  const serializeAws_restJson1RouteTableIdentifier = (input, context) => {
6914
7499
  return {
6915
- ...(input.CoreNetworkSegmentEdge !== undefined &&
6916
- input.CoreNetworkSegmentEdge !== null && {
7500
+ ...(input.CoreNetworkSegmentEdge != null && {
6917
7501
  CoreNetworkSegmentEdge: serializeAws_restJson1CoreNetworkSegmentEdgeIdentifier(input.CoreNetworkSegmentEdge, context),
6918
7502
  }),
6919
- ...(input.TransitGatewayRouteTableArn !== undefined &&
6920
- input.TransitGatewayRouteTableArn !== null && { TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn }),
7503
+ ...(input.TransitGatewayRouteTableArn != null && {
7504
+ TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
7505
+ }),
6921
7506
  };
6922
7507
  };
6923
7508
  const serializeAws_restJson1RouteTypeList = (input, context) => {
@@ -6942,8 +7527,8 @@ const serializeAws_restJson1SubnetArnList = (input, context) => {
6942
7527
  };
6943
7528
  const serializeAws_restJson1Tag = (input, context) => {
6944
7529
  return {
6945
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
6946
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
7530
+ ...(input.Key != null && { Key: input.Key }),
7531
+ ...(input.Value != null && { Value: input.Value }),
6947
7532
  };
6948
7533
  };
6949
7534
  const serializeAws_restJson1TagList = (input, context) => {
@@ -6958,7 +7543,7 @@ const serializeAws_restJson1TagList = (input, context) => {
6958
7543
  };
6959
7544
  const serializeAws_restJson1VpcOptions = (input, context) => {
6960
7545
  return {
6961
- ...(input.Ipv6Support !== undefined && input.Ipv6Support !== null && { Ipv6Support: input.Ipv6Support }),
7546
+ ...(input.Ipv6Support != null && { Ipv6Support: input.Ipv6Support }),
6962
7547
  };
6963
7548
  };
6964
7549
  const deserializeAws_restJson1AccountStatus = (output, context) => {
@@ -6985,23 +7570,17 @@ const deserializeAws_restJson1Attachment = (output, context) => {
6985
7570
  AttachmentType: (0, smithy_client_1.expectString)(output.AttachmentType),
6986
7571
  CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
6987
7572
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6988
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
6989
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
6990
- : undefined,
7573
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6991
7574
  EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6992
7575
  OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
6993
- ProposedSegmentChange: output.ProposedSegmentChange !== undefined && output.ProposedSegmentChange !== null
7576
+ ProposedSegmentChange: output.ProposedSegmentChange != null
6994
7577
  ? deserializeAws_restJson1ProposedSegmentChange(output.ProposedSegmentChange, context)
6995
7578
  : undefined,
6996
7579
  ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
6997
7580
  SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6998
7581
  State: (0, smithy_client_1.expectString)(output.State),
6999
- Tags: output.Tags !== undefined && output.Tags !== null
7000
- ? deserializeAws_restJson1TagList(output.Tags, context)
7001
- : undefined,
7002
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
7003
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt)))
7004
- : undefined,
7582
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7583
+ UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
7005
7584
  };
7006
7585
  };
7007
7586
  const deserializeAws_restJson1AttachmentList = (output, context) => {
@@ -7029,12 +7608,8 @@ const deserializeAws_restJson1Bandwidth = (output, context) => {
7029
7608
  };
7030
7609
  const deserializeAws_restJson1ConnectAttachment = (output, context) => {
7031
7610
  return {
7032
- Attachment: output.Attachment !== undefined && output.Attachment !== null
7033
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
7034
- : undefined,
7035
- Options: output.Options !== undefined && output.Options !== null
7036
- ? deserializeAws_restJson1ConnectAttachmentOptions(output.Options, context)
7037
- : undefined,
7611
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
7612
+ Options: output.Options != null ? deserializeAws_restJson1ConnectAttachmentOptions(output.Options, context) : undefined,
7038
7613
  TransportAttachmentId: (0, smithy_client_1.expectString)(output.TransportAttachmentId),
7039
7614
  };
7040
7615
  };
@@ -7049,25 +7624,19 @@ const deserializeAws_restJson1Connection = (output, context) => {
7049
7624
  ConnectedLinkId: (0, smithy_client_1.expectString)(output.ConnectedLinkId),
7050
7625
  ConnectionArn: (0, smithy_client_1.expectString)(output.ConnectionArn),
7051
7626
  ConnectionId: (0, smithy_client_1.expectString)(output.ConnectionId),
7052
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7053
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7054
- : undefined,
7627
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7055
7628
  Description: (0, smithy_client_1.expectString)(output.Description),
7056
7629
  DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
7057
7630
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7058
7631
  LinkId: (0, smithy_client_1.expectString)(output.LinkId),
7059
7632
  State: (0, smithy_client_1.expectString)(output.State),
7060
- Tags: output.Tags !== undefined && output.Tags !== null
7061
- ? deserializeAws_restJson1TagList(output.Tags, context)
7062
- : undefined,
7633
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7063
7634
  };
7064
7635
  };
7065
7636
  const deserializeAws_restJson1ConnectionHealth = (output, context) => {
7066
7637
  return {
7067
7638
  Status: (0, smithy_client_1.expectString)(output.Status),
7068
- Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
7069
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp)))
7070
- : undefined,
7639
+ Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
7071
7640
  Type: (0, smithy_client_1.expectString)(output.Type),
7072
7641
  };
7073
7642
  };
@@ -7084,20 +7653,16 @@ const deserializeAws_restJson1ConnectionList = (output, context) => {
7084
7653
  };
7085
7654
  const deserializeAws_restJson1ConnectPeer = (output, context) => {
7086
7655
  return {
7087
- Configuration: output.Configuration !== undefined && output.Configuration !== null
7656
+ Configuration: output.Configuration != null
7088
7657
  ? deserializeAws_restJson1ConnectPeerConfiguration(output.Configuration, context)
7089
7658
  : undefined,
7090
7659
  ConnectAttachmentId: (0, smithy_client_1.expectString)(output.ConnectAttachmentId),
7091
7660
  ConnectPeerId: (0, smithy_client_1.expectString)(output.ConnectPeerId),
7092
7661
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7093
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7094
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7095
- : undefined,
7662
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7096
7663
  EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
7097
7664
  State: (0, smithy_client_1.expectString)(output.State),
7098
- Tags: output.Tags !== undefined && output.Tags !== null
7099
- ? deserializeAws_restJson1TagList(output.Tags, context)
7100
- : undefined,
7665
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7101
7666
  };
7102
7667
  };
7103
7668
  const deserializeAws_restJson1ConnectPeerAssociation = (output, context) => {
@@ -7141,11 +7706,11 @@ const deserializeAws_restJson1ConnectPeerBgpConfigurationList = (output, context
7141
7706
  };
7142
7707
  const deserializeAws_restJson1ConnectPeerConfiguration = (output, context) => {
7143
7708
  return {
7144
- BgpConfigurations: output.BgpConfigurations !== undefined && output.BgpConfigurations !== null
7709
+ BgpConfigurations: output.BgpConfigurations != null
7145
7710
  ? deserializeAws_restJson1ConnectPeerBgpConfigurationList(output.BgpConfigurations, context)
7146
7711
  : undefined,
7147
7712
  CoreNetworkAddress: (0, smithy_client_1.expectString)(output.CoreNetworkAddress),
7148
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
7713
+ InsideCidrBlocks: output.InsideCidrBlocks != null
7149
7714
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
7150
7715
  : undefined,
7151
7716
  PeerAddress: (0, smithy_client_1.expectString)(output.PeerAddress),
@@ -7158,13 +7723,9 @@ const deserializeAws_restJson1ConnectPeerSummary = (output, context) => {
7158
7723
  ConnectPeerId: (0, smithy_client_1.expectString)(output.ConnectPeerId),
7159
7724
  ConnectPeerState: (0, smithy_client_1.expectString)(output.ConnectPeerState),
7160
7725
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7161
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7162
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7163
- : undefined,
7726
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7164
7727
  EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
7165
- Tags: output.Tags !== undefined && output.Tags !== null
7166
- ? deserializeAws_restJson1TagList(output.Tags, context)
7167
- : undefined,
7728
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7168
7729
  };
7169
7730
  };
7170
7731
  const deserializeAws_restJson1ConnectPeerSummaryList = (output, context) => {
@@ -7193,36 +7754,56 @@ const deserializeAws_restJson1CoreNetwork = (output, context) => {
7193
7754
  return {
7194
7755
  CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
7195
7756
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7196
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7197
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7198
- : undefined,
7757
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7199
7758
  Description: (0, smithy_client_1.expectString)(output.Description),
7200
- Edges: output.Edges !== undefined && output.Edges !== null
7201
- ? deserializeAws_restJson1CoreNetworkEdgeList(output.Edges, context)
7202
- : undefined,
7759
+ Edges: output.Edges != null ? deserializeAws_restJson1CoreNetworkEdgeList(output.Edges, context) : undefined,
7203
7760
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7204
- Segments: output.Segments !== undefined && output.Segments !== null
7205
- ? deserializeAws_restJson1CoreNetworkSegmentList(output.Segments, context)
7206
- : undefined,
7761
+ Segments: output.Segments != null ? deserializeAws_restJson1CoreNetworkSegmentList(output.Segments, context) : undefined,
7207
7762
  State: (0, smithy_client_1.expectString)(output.State),
7208
- Tags: output.Tags !== undefined && output.Tags !== null
7209
- ? deserializeAws_restJson1TagList(output.Tags, context)
7210
- : undefined,
7763
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7211
7764
  };
7212
7765
  };
7213
7766
  const deserializeAws_restJson1CoreNetworkChange = (output, context) => {
7214
7767
  return {
7215
7768
  Action: (0, smithy_client_1.expectString)(output.Action),
7216
7769
  Identifier: (0, smithy_client_1.expectString)(output.Identifier),
7217
- NewValues: output.NewValues !== undefined && output.NewValues !== null
7218
- ? deserializeAws_restJson1CoreNetworkChangeValues(output.NewValues, context)
7219
- : undefined,
7220
- PreviousValues: output.PreviousValues !== undefined && output.PreviousValues !== null
7770
+ IdentifierPath: (0, smithy_client_1.expectString)(output.IdentifierPath),
7771
+ NewValues: output.NewValues != null ? deserializeAws_restJson1CoreNetworkChangeValues(output.NewValues, context) : undefined,
7772
+ PreviousValues: output.PreviousValues != null
7221
7773
  ? deserializeAws_restJson1CoreNetworkChangeValues(output.PreviousValues, context)
7222
7774
  : undefined,
7223
7775
  Type: (0, smithy_client_1.expectString)(output.Type),
7224
7776
  };
7225
7777
  };
7778
+ const deserializeAws_restJson1CoreNetworkChangeEvent = (output, context) => {
7779
+ return {
7780
+ Action: (0, smithy_client_1.expectString)(output.Action),
7781
+ EventTime: output.EventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EventTime))) : undefined,
7782
+ IdentifierPath: (0, smithy_client_1.expectString)(output.IdentifierPath),
7783
+ Status: (0, smithy_client_1.expectString)(output.Status),
7784
+ Type: (0, smithy_client_1.expectString)(output.Type),
7785
+ Values: output.Values != null ? deserializeAws_restJson1CoreNetworkChangeEventValues(output.Values, context) : undefined,
7786
+ };
7787
+ };
7788
+ const deserializeAws_restJson1CoreNetworkChangeEventList = (output, context) => {
7789
+ const retVal = (output || [])
7790
+ .filter((e) => e != null)
7791
+ .map((entry) => {
7792
+ if (entry === null) {
7793
+ return null;
7794
+ }
7795
+ return deserializeAws_restJson1CoreNetworkChangeEvent(entry, context);
7796
+ });
7797
+ return retVal;
7798
+ };
7799
+ const deserializeAws_restJson1CoreNetworkChangeEventValues = (output, context) => {
7800
+ return {
7801
+ AttachmentId: (0, smithy_client_1.expectString)(output.AttachmentId),
7802
+ Cidr: (0, smithy_client_1.expectString)(output.Cidr),
7803
+ EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
7804
+ SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
7805
+ };
7806
+ };
7226
7807
  const deserializeAws_restJson1CoreNetworkChangeList = (output, context) => {
7227
7808
  const retVal = (output || [])
7228
7809
  .filter((e) => e != null)
@@ -7239,14 +7820,14 @@ const deserializeAws_restJson1CoreNetworkChangeValues = (output, context) => {
7239
7820
  Asn: (0, smithy_client_1.expectLong)(output.Asn),
7240
7821
  Cidr: (0, smithy_client_1.expectString)(output.Cidr),
7241
7822
  DestinationIdentifier: (0, smithy_client_1.expectString)(output.DestinationIdentifier),
7242
- EdgeLocations: output.EdgeLocations !== undefined && output.EdgeLocations !== null
7823
+ EdgeLocations: output.EdgeLocations != null
7243
7824
  ? deserializeAws_restJson1ExternalRegionCodeList(output.EdgeLocations, context)
7244
7825
  : undefined,
7245
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
7826
+ InsideCidrBlocks: output.InsideCidrBlocks != null
7246
7827
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
7247
7828
  : undefined,
7248
7829
  SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
7249
- SharedSegments: output.SharedSegments !== undefined && output.SharedSegments !== null
7830
+ SharedSegments: output.SharedSegments != null
7250
7831
  ? deserializeAws_restJson1ConstrainedStringList(output.SharedSegments, context)
7251
7832
  : undefined,
7252
7833
  };
@@ -7255,7 +7836,7 @@ const deserializeAws_restJson1CoreNetworkEdge = (output, context) => {
7255
7836
  return {
7256
7837
  Asn: (0, smithy_client_1.expectLong)(output.Asn),
7257
7838
  EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
7258
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
7839
+ InsideCidrBlocks: output.InsideCidrBlocks != null
7259
7840
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
7260
7841
  : undefined,
7261
7842
  };
@@ -7276,14 +7857,10 @@ const deserializeAws_restJson1CoreNetworkPolicy = (output, context) => {
7276
7857
  Alias: (0, smithy_client_1.expectString)(output.Alias),
7277
7858
  ChangeSetState: (0, smithy_client_1.expectString)(output.ChangeSetState),
7278
7859
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7279
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7280
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7281
- : undefined,
7860
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7282
7861
  Description: (0, smithy_client_1.expectString)(output.Description),
7283
- PolicyDocument: output.PolicyDocument !== undefined && output.PolicyDocument !== null
7284
- ? new smithy_client_1.LazyJsonString(output.PolicyDocument)
7285
- : undefined,
7286
- PolicyErrors: output.PolicyErrors !== undefined && output.PolicyErrors !== null
7862
+ PolicyDocument: output.PolicyDocument != null ? new smithy_client_1.LazyJsonString(output.PolicyDocument) : undefined,
7863
+ PolicyErrors: output.PolicyErrors != null
7287
7864
  ? deserializeAws_restJson1CoreNetworkPolicyErrorList(output.PolicyErrors, context)
7288
7865
  : undefined,
7289
7866
  PolicyVersionId: (0, smithy_client_1.expectInt32)(output.PolicyVersionId),
@@ -7312,9 +7889,7 @@ const deserializeAws_restJson1CoreNetworkPolicyVersion = (output, context) => {
7312
7889
  Alias: (0, smithy_client_1.expectString)(output.Alias),
7313
7890
  ChangeSetState: (0, smithy_client_1.expectString)(output.ChangeSetState),
7314
7891
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7315
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7316
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7317
- : undefined,
7892
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7318
7893
  Description: (0, smithy_client_1.expectString)(output.Description),
7319
7894
  PolicyVersionId: (0, smithy_client_1.expectInt32)(output.PolicyVersionId),
7320
7895
  };
@@ -7332,11 +7907,11 @@ const deserializeAws_restJson1CoreNetworkPolicyVersionList = (output, context) =
7332
7907
  };
7333
7908
  const deserializeAws_restJson1CoreNetworkSegment = (output, context) => {
7334
7909
  return {
7335
- EdgeLocations: output.EdgeLocations !== undefined && output.EdgeLocations !== null
7910
+ EdgeLocations: output.EdgeLocations != null
7336
7911
  ? deserializeAws_restJson1ExternalRegionCodeList(output.EdgeLocations, context)
7337
7912
  : undefined,
7338
7913
  Name: (0, smithy_client_1.expectString)(output.Name),
7339
- SharedSegments: output.SharedSegments !== undefined && output.SharedSegments !== null
7914
+ SharedSegments: output.SharedSegments != null
7340
7915
  ? deserializeAws_restJson1ConstrainedStringList(output.SharedSegments, context)
7341
7916
  : undefined,
7342
7917
  };
@@ -7367,9 +7942,7 @@ const deserializeAws_restJson1CoreNetworkSummary = (output, context) => {
7367
7942
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7368
7943
  OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
7369
7944
  State: (0, smithy_client_1.expectString)(output.State),
7370
- Tags: output.Tags !== undefined && output.Tags !== null
7371
- ? deserializeAws_restJson1TagList(output.Tags, context)
7372
- : undefined,
7945
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7373
7946
  };
7374
7947
  };
7375
7948
  const deserializeAws_restJson1CoreNetworkSummaryList = (output, context) => {
@@ -7405,26 +7978,18 @@ const deserializeAws_restJson1CustomerGatewayAssociationList = (output, context)
7405
7978
  };
7406
7979
  const deserializeAws_restJson1Device = (output, context) => {
7407
7980
  return {
7408
- AWSLocation: output.AWSLocation !== undefined && output.AWSLocation !== null
7409
- ? deserializeAws_restJson1AWSLocation(output.AWSLocation, context)
7410
- : undefined,
7411
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7412
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7413
- : undefined,
7981
+ AWSLocation: output.AWSLocation != null ? deserializeAws_restJson1AWSLocation(output.AWSLocation, context) : undefined,
7982
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7414
7983
  Description: (0, smithy_client_1.expectString)(output.Description),
7415
7984
  DeviceArn: (0, smithy_client_1.expectString)(output.DeviceArn),
7416
7985
  DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
7417
7986
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7418
- Location: output.Location !== undefined && output.Location !== null
7419
- ? deserializeAws_restJson1Location(output.Location, context)
7420
- : undefined,
7987
+ Location: output.Location != null ? deserializeAws_restJson1Location(output.Location, context) : undefined,
7421
7988
  Model: (0, smithy_client_1.expectString)(output.Model),
7422
7989
  SerialNumber: (0, smithy_client_1.expectString)(output.SerialNumber),
7423
7990
  SiteId: (0, smithy_client_1.expectString)(output.SiteId),
7424
7991
  State: (0, smithy_client_1.expectString)(output.State),
7425
- Tags: output.Tags !== undefined && output.Tags !== null
7426
- ? deserializeAws_restJson1TagList(output.Tags, context)
7427
- : undefined,
7992
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7428
7993
  Type: (0, smithy_client_1.expectString)(output.Type),
7429
7994
  Vendor: (0, smithy_client_1.expectString)(output.Vendor),
7430
7995
  };
@@ -7464,16 +8029,12 @@ const deserializeAws_restJson1ExternalRegionCodeList = (output, context) => {
7464
8029
  };
7465
8030
  const deserializeAws_restJson1GlobalNetwork = (output, context) => {
7466
8031
  return {
7467
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7468
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7469
- : undefined,
8032
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7470
8033
  Description: (0, smithy_client_1.expectString)(output.Description),
7471
8034
  GlobalNetworkArn: (0, smithy_client_1.expectString)(output.GlobalNetworkArn),
7472
8035
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7473
8036
  State: (0, smithy_client_1.expectString)(output.State),
7474
- Tags: output.Tags !== undefined && output.Tags !== null
7475
- ? deserializeAws_restJson1TagList(output.Tags, context)
7476
- : undefined,
8037
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7477
8038
  };
7478
8039
  };
7479
8040
  const deserializeAws_restJson1GlobalNetworkList = (output, context) => {
@@ -7489,12 +8050,8 @@ const deserializeAws_restJson1GlobalNetworkList = (output, context) => {
7489
8050
  };
7490
8051
  const deserializeAws_restJson1Link = (output, context) => {
7491
8052
  return {
7492
- Bandwidth: output.Bandwidth !== undefined && output.Bandwidth !== null
7493
- ? deserializeAws_restJson1Bandwidth(output.Bandwidth, context)
7494
- : undefined,
7495
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7496
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7497
- : undefined,
8053
+ Bandwidth: output.Bandwidth != null ? deserializeAws_restJson1Bandwidth(output.Bandwidth, context) : undefined,
8054
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7498
8055
  Description: (0, smithy_client_1.expectString)(output.Description),
7499
8056
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7500
8057
  LinkArn: (0, smithy_client_1.expectString)(output.LinkArn),
@@ -7502,9 +8059,7 @@ const deserializeAws_restJson1Link = (output, context) => {
7502
8059
  Provider: (0, smithy_client_1.expectString)(output.Provider),
7503
8060
  SiteId: (0, smithy_client_1.expectString)(output.SiteId),
7504
8061
  State: (0, smithy_client_1.expectString)(output.State),
7505
- Tags: output.Tags !== undefined && output.Tags !== null
7506
- ? deserializeAws_restJson1TagList(output.Tags, context)
7507
- : undefined,
8062
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7508
8063
  Type: (0, smithy_client_1.expectString)(output.Type),
7509
8064
  };
7510
8065
  };
@@ -7551,19 +8106,17 @@ const deserializeAws_restJson1NetworkResource = (output, context) => {
7551
8106
  AwsRegion: (0, smithy_client_1.expectString)(output.AwsRegion),
7552
8107
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7553
8108
  Definition: (0, smithy_client_1.expectString)(output.Definition),
7554
- DefinitionTimestamp: output.DefinitionTimestamp !== undefined && output.DefinitionTimestamp !== null
8109
+ DefinitionTimestamp: output.DefinitionTimestamp != null
7555
8110
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DefinitionTimestamp)))
7556
8111
  : undefined,
7557
- Metadata: output.Metadata !== undefined && output.Metadata !== null
8112
+ Metadata: output.Metadata != null
7558
8113
  ? deserializeAws_restJson1NetworkResourceMetadataMap(output.Metadata, context)
7559
8114
  : undefined,
7560
8115
  RegisteredGatewayArn: (0, smithy_client_1.expectString)(output.RegisteredGatewayArn),
7561
8116
  ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
7562
8117
  ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
7563
8118
  ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
7564
- Tags: output.Tags !== undefined && output.Tags !== null
7565
- ? deserializeAws_restJson1TagList(output.Tags, context)
7566
- : undefined,
8119
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7567
8120
  };
7568
8121
  };
7569
8122
  const deserializeAws_restJson1NetworkResourceCount = (output, context) => {
@@ -7618,7 +8171,7 @@ const deserializeAws_restJson1NetworkResourceSummary = (output, context) => {
7618
8171
  const deserializeAws_restJson1NetworkRoute = (output, context) => {
7619
8172
  return {
7620
8173
  DestinationCidrBlock: (0, smithy_client_1.expectString)(output.DestinationCidrBlock),
7621
- Destinations: output.Destinations !== undefined && output.Destinations !== null
8174
+ Destinations: output.Destinations != null
7622
8175
  ? deserializeAws_restJson1NetworkRouteDestinationList(output.Destinations, context)
7623
8176
  : undefined,
7624
8177
  PrefixListId: (0, smithy_client_1.expectString)(output.PrefixListId),
@@ -7664,9 +8217,7 @@ const deserializeAws_restJson1NetworkTelemetry = (output, context) => {
7664
8217
  Address: (0, smithy_client_1.expectString)(output.Address),
7665
8218
  AwsRegion: (0, smithy_client_1.expectString)(output.AwsRegion),
7666
8219
  CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7667
- Health: output.Health !== undefined && output.Health !== null
7668
- ? deserializeAws_restJson1ConnectionHealth(output.Health, context)
7669
- : undefined,
8220
+ Health: output.Health != null ? deserializeAws_restJson1ConnectionHealth(output.Health, context) : undefined,
7670
8221
  RegisteredGatewayArn: (0, smithy_client_1.expectString)(output.RegisteredGatewayArn),
7671
8222
  ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
7672
8223
  ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
@@ -7686,7 +8237,7 @@ const deserializeAws_restJson1NetworkTelemetryList = (output, context) => {
7686
8237
  };
7687
8238
  const deserializeAws_restJson1OrganizationStatus = (output, context) => {
7688
8239
  return {
7689
- AccountStatusList: output.AccountStatusList !== undefined && output.AccountStatusList !== null
8240
+ AccountStatusList: output.AccountStatusList != null
7690
8241
  ? deserializeAws_restJson1AccountStatusList(output.AccountStatusList, context)
7691
8242
  : undefined,
7692
8243
  OrganizationAwsServiceAccessStatus: (0, smithy_client_1.expectString)(output.OrganizationAwsServiceAccessStatus),
@@ -7697,9 +8248,7 @@ const deserializeAws_restJson1OrganizationStatus = (output, context) => {
7697
8248
  const deserializeAws_restJson1PathComponent = (output, context) => {
7698
8249
  return {
7699
8250
  DestinationCidrBlock: (0, smithy_client_1.expectString)(output.DestinationCidrBlock),
7700
- Resource: output.Resource !== undefined && output.Resource !== null
7701
- ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context)
7702
- : undefined,
8251
+ Resource: output.Resource != null ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context) : undefined,
7703
8252
  Sequence: (0, smithy_client_1.expectInt32)(output.Sequence),
7704
8253
  };
7705
8254
  };
@@ -7714,13 +8263,36 @@ const deserializeAws_restJson1PathComponentList = (output, context) => {
7714
8263
  });
7715
8264
  return retVal;
7716
8265
  };
8266
+ const deserializeAws_restJson1Peering = (output, context) => {
8267
+ return {
8268
+ CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
8269
+ CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
8270
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
8271
+ EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
8272
+ OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
8273
+ PeeringId: (0, smithy_client_1.expectString)(output.PeeringId),
8274
+ PeeringType: (0, smithy_client_1.expectString)(output.PeeringType),
8275
+ ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
8276
+ State: (0, smithy_client_1.expectString)(output.State),
8277
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
8278
+ };
8279
+ };
8280
+ const deserializeAws_restJson1PeeringList = (output, context) => {
8281
+ const retVal = (output || [])
8282
+ .filter((e) => e != null)
8283
+ .map((entry) => {
8284
+ if (entry === null) {
8285
+ return null;
8286
+ }
8287
+ return deserializeAws_restJson1Peering(entry, context);
8288
+ });
8289
+ return retVal;
8290
+ };
7717
8291
  const deserializeAws_restJson1ProposedSegmentChange = (output, context) => {
7718
8292
  return {
7719
8293
  AttachmentPolicyRuleNumber: (0, smithy_client_1.expectInt32)(output.AttachmentPolicyRuleNumber),
7720
8294
  SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
7721
- Tags: output.Tags !== undefined && output.Tags !== null
7722
- ? deserializeAws_restJson1TagList(output.Tags, context)
7723
- : undefined,
8295
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7724
8296
  };
7725
8297
  };
7726
8298
  const deserializeAws_restJson1ReasonContextMap = (output, context) => {
@@ -7753,23 +8325,17 @@ const deserializeAws_restJson1RelationshipList = (output, context) => {
7753
8325
  };
7754
8326
  const deserializeAws_restJson1RouteAnalysis = (output, context) => {
7755
8327
  return {
7756
- Destination: output.Destination !== undefined && output.Destination !== null
8328
+ Destination: output.Destination != null
7757
8329
  ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Destination, context)
7758
8330
  : undefined,
7759
- ForwardPath: output.ForwardPath !== undefined && output.ForwardPath !== null
7760
- ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context)
7761
- : undefined,
8331
+ ForwardPath: output.ForwardPath != null ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context) : undefined,
7762
8332
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7763
8333
  IncludeReturnPath: (0, smithy_client_1.expectBoolean)(output.IncludeReturnPath),
7764
8334
  OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
7765
- ReturnPath: output.ReturnPath !== undefined && output.ReturnPath !== null
7766
- ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context)
7767
- : undefined,
8335
+ ReturnPath: output.ReturnPath != null ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context) : undefined,
7768
8336
  RouteAnalysisId: (0, smithy_client_1.expectString)(output.RouteAnalysisId),
7769
- Source: output.Source !== undefined && output.Source !== null
7770
- ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context)
7771
- : undefined,
7772
- StartTimestamp: output.StartTimestamp !== undefined && output.StartTimestamp !== null
8337
+ Source: output.Source != null ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context) : undefined,
8338
+ StartTimestamp: output.StartTimestamp != null
7773
8339
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTimestamp)))
7774
8340
  : undefined,
7775
8341
  Status: (0, smithy_client_1.expectString)(output.Status),
@@ -7779,7 +8345,7 @@ const deserializeAws_restJson1RouteAnalysis = (output, context) => {
7779
8345
  const deserializeAws_restJson1RouteAnalysisCompletion = (output, context) => {
7780
8346
  return {
7781
8347
  ReasonCode: (0, smithy_client_1.expectString)(output.ReasonCode),
7782
- ReasonContext: output.ReasonContext !== undefined && output.ReasonContext !== null
8348
+ ReasonContext: output.ReasonContext != null
7783
8349
  ? deserializeAws_restJson1ReasonContextMap(output.ReasonContext, context)
7784
8350
  : undefined,
7785
8351
  ResultCode: (0, smithy_client_1.expectString)(output.ResultCode),
@@ -7794,30 +8360,22 @@ const deserializeAws_restJson1RouteAnalysisEndpointOptions = (output, context) =
7794
8360
  };
7795
8361
  const deserializeAws_restJson1RouteAnalysisPath = (output, context) => {
7796
8362
  return {
7797
- CompletionStatus: output.CompletionStatus !== undefined && output.CompletionStatus !== null
8363
+ CompletionStatus: output.CompletionStatus != null
7798
8364
  ? deserializeAws_restJson1RouteAnalysisCompletion(output.CompletionStatus, context)
7799
8365
  : undefined,
7800
- Path: output.Path !== undefined && output.Path !== null
7801
- ? deserializeAws_restJson1PathComponentList(output.Path, context)
7802
- : undefined,
8366
+ Path: output.Path != null ? deserializeAws_restJson1PathComponentList(output.Path, context) : undefined,
7803
8367
  };
7804
8368
  };
7805
8369
  const deserializeAws_restJson1Site = (output, context) => {
7806
8370
  return {
7807
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
7808
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt)))
7809
- : undefined,
8371
+ CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7810
8372
  Description: (0, smithy_client_1.expectString)(output.Description),
7811
8373
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7812
- Location: output.Location !== undefined && output.Location !== null
7813
- ? deserializeAws_restJson1Location(output.Location, context)
7814
- : undefined,
8374
+ Location: output.Location != null ? deserializeAws_restJson1Location(output.Location, context) : undefined,
7815
8375
  SiteArn: (0, smithy_client_1.expectString)(output.SiteArn),
7816
8376
  SiteId: (0, smithy_client_1.expectString)(output.SiteId),
7817
8377
  State: (0, smithy_client_1.expectString)(output.State),
7818
- Tags: output.Tags !== undefined && output.Tags !== null
7819
- ? deserializeAws_restJson1TagList(output.Tags, context)
7820
- : undefined,
8378
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
7821
8379
  };
7822
8380
  };
7823
8381
  const deserializeAws_restJson1SiteList = (output, context) => {
@@ -7833,9 +8391,7 @@ const deserializeAws_restJson1SiteList = (output, context) => {
7833
8391
  };
7834
8392
  const deserializeAws_restJson1SiteToSiteVpnAttachment = (output, context) => {
7835
8393
  return {
7836
- Attachment: output.Attachment !== undefined && output.Attachment !== null
7837
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
7838
- : undefined,
8394
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
7839
8395
  VpnConnectionArn: (0, smithy_client_1.expectString)(output.VpnConnectionArn),
7840
8396
  };
7841
8397
  };
@@ -7887,10 +8443,16 @@ const deserializeAws_restJson1TransitGatewayConnectPeerAssociationList = (output
7887
8443
  });
7888
8444
  return retVal;
7889
8445
  };
8446
+ const deserializeAws_restJson1TransitGatewayPeering = (output, context) => {
8447
+ return {
8448
+ Peering: output.Peering != null ? deserializeAws_restJson1Peering(output.Peering, context) : undefined,
8449
+ TransitGatewayArn: (0, smithy_client_1.expectString)(output.TransitGatewayArn),
8450
+ };
8451
+ };
7890
8452
  const deserializeAws_restJson1TransitGatewayRegistration = (output, context) => {
7891
8453
  return {
7892
8454
  GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7893
- State: output.State !== undefined && output.State !== null
8455
+ State: output.State != null
7894
8456
  ? deserializeAws_restJson1TransitGatewayRegistrationStateReason(output.State, context)
7895
8457
  : undefined,
7896
8458
  TransitGatewayArn: (0, smithy_client_1.expectString)(output.TransitGatewayArn),
@@ -7913,6 +8475,13 @@ const deserializeAws_restJson1TransitGatewayRegistrationStateReason = (output, c
7913
8475
  Message: (0, smithy_client_1.expectString)(output.Message),
7914
8476
  };
7915
8477
  };
8478
+ const deserializeAws_restJson1TransitGatewayRouteTableAttachment = (output, context) => {
8479
+ return {
8480
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
8481
+ PeeringId: (0, smithy_client_1.expectString)(output.PeeringId),
8482
+ TransitGatewayRouteTableArn: (0, smithy_client_1.expectString)(output.TransitGatewayRouteTableArn),
8483
+ };
8484
+ };
7916
8485
  const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
7917
8486
  return {
7918
8487
  Message: (0, smithy_client_1.expectString)(output.Message),
@@ -7932,15 +8501,9 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) =
7932
8501
  };
7933
8502
  const deserializeAws_restJson1VpcAttachment = (output, context) => {
7934
8503
  return {
7935
- Attachment: output.Attachment !== undefined && output.Attachment !== null
7936
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
7937
- : undefined,
7938
- Options: output.Options !== undefined && output.Options !== null
7939
- ? deserializeAws_restJson1VpcOptions(output.Options, context)
7940
- : undefined,
7941
- SubnetArns: output.SubnetArns !== undefined && output.SubnetArns !== null
7942
- ? deserializeAws_restJson1SubnetArnList(output.SubnetArns, context)
7943
- : undefined,
8504
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
8505
+ Options: output.Options != null ? deserializeAws_restJson1VpcOptions(output.Options, context) : undefined,
8506
+ SubnetArns: output.SubnetArns != null ? deserializeAws_restJson1SubnetArnList(output.SubnetArns, context) : undefined,
7944
8507
  };
7945
8508
  };
7946
8509
  const deserializeAws_restJson1VpcOptions = (output, context) => {
@@ -7997,5 +8560,4 @@ const loadRestJsonErrorCode = (output, data) => {
7997
8560
  if (data["__type"] !== undefined) {
7998
8561
  return sanitizeErrorCode(data["__type"]);
7999
8562
  }
8000
- return "";
8001
8563
  };