@aws-sdk/client-direct-connect 3.489.0 → 3.495.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 (75) hide show
  1. package/dist-cjs/DirectConnect.js +1 -137
  2. package/dist-cjs/DirectConnectClient.js +1 -43
  3. package/dist-cjs/commands/AcceptDirectConnectGatewayAssociationProposalCommand.js +1 -28
  4. package/dist-cjs/commands/AllocateConnectionOnInterconnectCommand.js +1 -28
  5. package/dist-cjs/commands/AllocateHostedConnectionCommand.js +1 -28
  6. package/dist-cjs/commands/AllocatePrivateVirtualInterfaceCommand.js +1 -28
  7. package/dist-cjs/commands/AllocatePublicVirtualInterfaceCommand.js +1 -28
  8. package/dist-cjs/commands/AllocateTransitVirtualInterfaceCommand.js +1 -28
  9. package/dist-cjs/commands/AssociateConnectionWithLagCommand.js +1 -28
  10. package/dist-cjs/commands/AssociateHostedConnectionCommand.js +1 -28
  11. package/dist-cjs/commands/AssociateMacSecKeyCommand.js +1 -28
  12. package/dist-cjs/commands/AssociateVirtualInterfaceCommand.js +1 -28
  13. package/dist-cjs/commands/ConfirmConnectionCommand.js +1 -28
  14. package/dist-cjs/commands/ConfirmCustomerAgreementCommand.js +1 -28
  15. package/dist-cjs/commands/ConfirmPrivateVirtualInterfaceCommand.js +1 -28
  16. package/dist-cjs/commands/ConfirmPublicVirtualInterfaceCommand.js +1 -28
  17. package/dist-cjs/commands/ConfirmTransitVirtualInterfaceCommand.js +1 -28
  18. package/dist-cjs/commands/CreateBGPPeerCommand.js +1 -28
  19. package/dist-cjs/commands/CreateConnectionCommand.js +1 -28
  20. package/dist-cjs/commands/CreateDirectConnectGatewayAssociationCommand.js +1 -28
  21. package/dist-cjs/commands/CreateDirectConnectGatewayAssociationProposalCommand.js +1 -28
  22. package/dist-cjs/commands/CreateDirectConnectGatewayCommand.js +1 -28
  23. package/dist-cjs/commands/CreateInterconnectCommand.js +1 -28
  24. package/dist-cjs/commands/CreateLagCommand.js +1 -28
  25. package/dist-cjs/commands/CreatePrivateVirtualInterfaceCommand.js +1 -28
  26. package/dist-cjs/commands/CreatePublicVirtualInterfaceCommand.js +1 -28
  27. package/dist-cjs/commands/CreateTransitVirtualInterfaceCommand.js +1 -28
  28. package/dist-cjs/commands/DeleteBGPPeerCommand.js +1 -28
  29. package/dist-cjs/commands/DeleteConnectionCommand.js +1 -28
  30. package/dist-cjs/commands/DeleteDirectConnectGatewayAssociationCommand.js +1 -28
  31. package/dist-cjs/commands/DeleteDirectConnectGatewayAssociationProposalCommand.js +1 -28
  32. package/dist-cjs/commands/DeleteDirectConnectGatewayCommand.js +1 -28
  33. package/dist-cjs/commands/DeleteInterconnectCommand.js +1 -28
  34. package/dist-cjs/commands/DeleteLagCommand.js +1 -28
  35. package/dist-cjs/commands/DeleteVirtualInterfaceCommand.js +1 -28
  36. package/dist-cjs/commands/DescribeConnectionLoaCommand.js +1 -28
  37. package/dist-cjs/commands/DescribeConnectionsCommand.js +1 -28
  38. package/dist-cjs/commands/DescribeConnectionsOnInterconnectCommand.js +1 -28
  39. package/dist-cjs/commands/DescribeCustomerMetadataCommand.js +1 -28
  40. package/dist-cjs/commands/DescribeDirectConnectGatewayAssociationProposalsCommand.js +1 -28
  41. package/dist-cjs/commands/DescribeDirectConnectGatewayAssociationsCommand.js +1 -28
  42. package/dist-cjs/commands/DescribeDirectConnectGatewayAttachmentsCommand.js +1 -28
  43. package/dist-cjs/commands/DescribeDirectConnectGatewaysCommand.js +1 -28
  44. package/dist-cjs/commands/DescribeHostedConnectionsCommand.js +1 -28
  45. package/dist-cjs/commands/DescribeInterconnectLoaCommand.js +1 -28
  46. package/dist-cjs/commands/DescribeInterconnectsCommand.js +1 -28
  47. package/dist-cjs/commands/DescribeLagsCommand.js +1 -28
  48. package/dist-cjs/commands/DescribeLoaCommand.js +1 -28
  49. package/dist-cjs/commands/DescribeLocationsCommand.js +1 -28
  50. package/dist-cjs/commands/DescribeRouterConfigurationCommand.js +1 -28
  51. package/dist-cjs/commands/DescribeTagsCommand.js +1 -28
  52. package/dist-cjs/commands/DescribeVirtualGatewaysCommand.js +1 -28
  53. package/dist-cjs/commands/DescribeVirtualInterfacesCommand.js +1 -28
  54. package/dist-cjs/commands/DisassociateConnectionFromLagCommand.js +1 -28
  55. package/dist-cjs/commands/DisassociateMacSecKeyCommand.js +1 -28
  56. package/dist-cjs/commands/ListVirtualInterfaceTestHistoryCommand.js +1 -28
  57. package/dist-cjs/commands/StartBgpFailoverTestCommand.js +1 -28
  58. package/dist-cjs/commands/StopBgpFailoverTestCommand.js +1 -28
  59. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  60. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  61. package/dist-cjs/commands/UpdateConnectionCommand.js +1 -28
  62. package/dist-cjs/commands/UpdateDirectConnectGatewayAssociationCommand.js +1 -28
  63. package/dist-cjs/commands/UpdateDirectConnectGatewayCommand.js +1 -28
  64. package/dist-cjs/commands/UpdateLagCommand.js +1 -28
  65. package/dist-cjs/commands/UpdateVirtualInterfaceAttributesCommand.js +1 -28
  66. package/dist-cjs/commands/index.js +1 -66
  67. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  68. package/dist-cjs/extensionConfiguration.js +1 -2
  69. package/dist-cjs/index.js +4536 -10
  70. package/dist-cjs/models/DirectConnectServiceException.js +1 -12
  71. package/dist-cjs/models/index.js +1 -4
  72. package/dist-cjs/models/models_0.js +1 -157
  73. package/dist-cjs/protocols/Aws_json1_1.js +1 -3050
  74. package/dist-cjs/runtimeExtensions.js +1 -22
  75. package/package.json +39 -39
@@ -1,3050 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_DescribeVirtualGatewaysCommand = exports.se_DescribeTagsCommand = exports.se_DescribeRouterConfigurationCommand = exports.se_DescribeLocationsCommand = exports.se_DescribeLoaCommand = exports.se_DescribeLagsCommand = exports.se_DescribeInterconnectsCommand = exports.se_DescribeInterconnectLoaCommand = exports.se_DescribeHostedConnectionsCommand = exports.se_DescribeDirectConnectGatewaysCommand = exports.se_DescribeDirectConnectGatewayAttachmentsCommand = exports.se_DescribeDirectConnectGatewayAssociationsCommand = exports.se_DescribeDirectConnectGatewayAssociationProposalsCommand = exports.se_DescribeCustomerMetadataCommand = exports.se_DescribeConnectionsOnInterconnectCommand = exports.se_DescribeConnectionsCommand = exports.se_DescribeConnectionLoaCommand = exports.se_DeleteVirtualInterfaceCommand = exports.se_DeleteLagCommand = exports.se_DeleteInterconnectCommand = exports.se_DeleteDirectConnectGatewayAssociationProposalCommand = exports.se_DeleteDirectConnectGatewayAssociationCommand = exports.se_DeleteDirectConnectGatewayCommand = exports.se_DeleteConnectionCommand = exports.se_DeleteBGPPeerCommand = exports.se_CreateTransitVirtualInterfaceCommand = exports.se_CreatePublicVirtualInterfaceCommand = exports.se_CreatePrivateVirtualInterfaceCommand = exports.se_CreateLagCommand = exports.se_CreateInterconnectCommand = exports.se_CreateDirectConnectGatewayAssociationProposalCommand = exports.se_CreateDirectConnectGatewayAssociationCommand = exports.se_CreateDirectConnectGatewayCommand = exports.se_CreateConnectionCommand = exports.se_CreateBGPPeerCommand = exports.se_ConfirmTransitVirtualInterfaceCommand = exports.se_ConfirmPublicVirtualInterfaceCommand = exports.se_ConfirmPrivateVirtualInterfaceCommand = exports.se_ConfirmCustomerAgreementCommand = exports.se_ConfirmConnectionCommand = exports.se_AssociateVirtualInterfaceCommand = exports.se_AssociateMacSecKeyCommand = exports.se_AssociateHostedConnectionCommand = exports.se_AssociateConnectionWithLagCommand = exports.se_AllocateTransitVirtualInterfaceCommand = exports.se_AllocatePublicVirtualInterfaceCommand = exports.se_AllocatePrivateVirtualInterfaceCommand = exports.se_AllocateHostedConnectionCommand = exports.se_AllocateConnectionOnInterconnectCommand = exports.se_AcceptDirectConnectGatewayAssociationProposalCommand = void 0;
4
- exports.de_DescribeCustomerMetadataCommand = exports.de_DescribeConnectionsOnInterconnectCommand = exports.de_DescribeConnectionsCommand = exports.de_DescribeConnectionLoaCommand = exports.de_DeleteVirtualInterfaceCommand = exports.de_DeleteLagCommand = exports.de_DeleteInterconnectCommand = exports.de_DeleteDirectConnectGatewayAssociationProposalCommand = exports.de_DeleteDirectConnectGatewayAssociationCommand = exports.de_DeleteDirectConnectGatewayCommand = exports.de_DeleteConnectionCommand = exports.de_DeleteBGPPeerCommand = exports.de_CreateTransitVirtualInterfaceCommand = exports.de_CreatePublicVirtualInterfaceCommand = exports.de_CreatePrivateVirtualInterfaceCommand = exports.de_CreateLagCommand = exports.de_CreateInterconnectCommand = exports.de_CreateDirectConnectGatewayAssociationProposalCommand = exports.de_CreateDirectConnectGatewayAssociationCommand = exports.de_CreateDirectConnectGatewayCommand = exports.de_CreateConnectionCommand = exports.de_CreateBGPPeerCommand = exports.de_ConfirmTransitVirtualInterfaceCommand = exports.de_ConfirmPublicVirtualInterfaceCommand = exports.de_ConfirmPrivateVirtualInterfaceCommand = exports.de_ConfirmCustomerAgreementCommand = exports.de_ConfirmConnectionCommand = exports.de_AssociateVirtualInterfaceCommand = exports.de_AssociateMacSecKeyCommand = exports.de_AssociateHostedConnectionCommand = exports.de_AssociateConnectionWithLagCommand = exports.de_AllocateTransitVirtualInterfaceCommand = exports.de_AllocatePublicVirtualInterfaceCommand = exports.de_AllocatePrivateVirtualInterfaceCommand = exports.de_AllocateHostedConnectionCommand = exports.de_AllocateConnectionOnInterconnectCommand = exports.de_AcceptDirectConnectGatewayAssociationProposalCommand = exports.se_UpdateVirtualInterfaceAttributesCommand = exports.se_UpdateLagCommand = exports.se_UpdateDirectConnectGatewayAssociationCommand = exports.se_UpdateDirectConnectGatewayCommand = exports.se_UpdateConnectionCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopBgpFailoverTestCommand = exports.se_StartBgpFailoverTestCommand = exports.se_ListVirtualInterfaceTestHistoryCommand = exports.se_DisassociateMacSecKeyCommand = exports.se_DisassociateConnectionFromLagCommand = exports.se_DescribeVirtualInterfacesCommand = void 0;
5
- exports.de_UpdateVirtualInterfaceAttributesCommand = exports.de_UpdateLagCommand = exports.de_UpdateDirectConnectGatewayAssociationCommand = exports.de_UpdateDirectConnectGatewayCommand = exports.de_UpdateConnectionCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopBgpFailoverTestCommand = exports.de_StartBgpFailoverTestCommand = exports.de_ListVirtualInterfaceTestHistoryCommand = exports.de_DisassociateMacSecKeyCommand = exports.de_DisassociateConnectionFromLagCommand = exports.de_DescribeVirtualInterfacesCommand = exports.de_DescribeVirtualGatewaysCommand = exports.de_DescribeTagsCommand = exports.de_DescribeRouterConfigurationCommand = exports.de_DescribeLocationsCommand = exports.de_DescribeLoaCommand = exports.de_DescribeLagsCommand = exports.de_DescribeInterconnectsCommand = exports.de_DescribeInterconnectLoaCommand = exports.de_DescribeHostedConnectionsCommand = exports.de_DescribeDirectConnectGatewaysCommand = exports.de_DescribeDirectConnectGatewayAttachmentsCommand = exports.de_DescribeDirectConnectGatewayAssociationsCommand = exports.de_DescribeDirectConnectGatewayAssociationProposalsCommand = void 0;
6
- const protocol_http_1 = require("@smithy/protocol-http");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const DirectConnectServiceException_1 = require("../models/DirectConnectServiceException");
9
- const models_0_1 = require("../models/models_0");
10
- const se_AcceptDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
11
- const headers = sharedHeaders("AcceptDirectConnectGatewayAssociationProposal");
12
- let body;
13
- body = JSON.stringify((0, smithy_client_1._json)(input));
14
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
15
- };
16
- exports.se_AcceptDirectConnectGatewayAssociationProposalCommand = se_AcceptDirectConnectGatewayAssociationProposalCommand;
17
- const se_AllocateConnectionOnInterconnectCommand = async (input, context) => {
18
- const headers = sharedHeaders("AllocateConnectionOnInterconnect");
19
- let body;
20
- body = JSON.stringify((0, smithy_client_1._json)(input));
21
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
- };
23
- exports.se_AllocateConnectionOnInterconnectCommand = se_AllocateConnectionOnInterconnectCommand;
24
- const se_AllocateHostedConnectionCommand = async (input, context) => {
25
- const headers = sharedHeaders("AllocateHostedConnection");
26
- let body;
27
- body = JSON.stringify((0, smithy_client_1._json)(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- exports.se_AllocateHostedConnectionCommand = se_AllocateHostedConnectionCommand;
31
- const se_AllocatePrivateVirtualInterfaceCommand = async (input, context) => {
32
- const headers = sharedHeaders("AllocatePrivateVirtualInterface");
33
- let body;
34
- body = JSON.stringify((0, smithy_client_1._json)(input));
35
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
- };
37
- exports.se_AllocatePrivateVirtualInterfaceCommand = se_AllocatePrivateVirtualInterfaceCommand;
38
- const se_AllocatePublicVirtualInterfaceCommand = async (input, context) => {
39
- const headers = sharedHeaders("AllocatePublicVirtualInterface");
40
- let body;
41
- body = JSON.stringify((0, smithy_client_1._json)(input));
42
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
- };
44
- exports.se_AllocatePublicVirtualInterfaceCommand = se_AllocatePublicVirtualInterfaceCommand;
45
- const se_AllocateTransitVirtualInterfaceCommand = async (input, context) => {
46
- const headers = sharedHeaders("AllocateTransitVirtualInterface");
47
- let body;
48
- body = JSON.stringify((0, smithy_client_1._json)(input));
49
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
- };
51
- exports.se_AllocateTransitVirtualInterfaceCommand = se_AllocateTransitVirtualInterfaceCommand;
52
- const se_AssociateConnectionWithLagCommand = async (input, context) => {
53
- const headers = sharedHeaders("AssociateConnectionWithLag");
54
- let body;
55
- body = JSON.stringify((0, smithy_client_1._json)(input));
56
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
- };
58
- exports.se_AssociateConnectionWithLagCommand = se_AssociateConnectionWithLagCommand;
59
- const se_AssociateHostedConnectionCommand = async (input, context) => {
60
- const headers = sharedHeaders("AssociateHostedConnection");
61
- let body;
62
- body = JSON.stringify((0, smithy_client_1._json)(input));
63
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
- };
65
- exports.se_AssociateHostedConnectionCommand = se_AssociateHostedConnectionCommand;
66
- const se_AssociateMacSecKeyCommand = async (input, context) => {
67
- const headers = sharedHeaders("AssociateMacSecKey");
68
- let body;
69
- body = JSON.stringify((0, smithy_client_1._json)(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- exports.se_AssociateMacSecKeyCommand = se_AssociateMacSecKeyCommand;
73
- const se_AssociateVirtualInterfaceCommand = async (input, context) => {
74
- const headers = sharedHeaders("AssociateVirtualInterface");
75
- let body;
76
- body = JSON.stringify((0, smithy_client_1._json)(input));
77
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
- };
79
- exports.se_AssociateVirtualInterfaceCommand = se_AssociateVirtualInterfaceCommand;
80
- const se_ConfirmConnectionCommand = async (input, context) => {
81
- const headers = sharedHeaders("ConfirmConnection");
82
- let body;
83
- body = JSON.stringify((0, smithy_client_1._json)(input));
84
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
- };
86
- exports.se_ConfirmConnectionCommand = se_ConfirmConnectionCommand;
87
- const se_ConfirmCustomerAgreementCommand = async (input, context) => {
88
- const headers = sharedHeaders("ConfirmCustomerAgreement");
89
- let body;
90
- body = JSON.stringify((0, smithy_client_1._json)(input));
91
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
92
- };
93
- exports.se_ConfirmCustomerAgreementCommand = se_ConfirmCustomerAgreementCommand;
94
- const se_ConfirmPrivateVirtualInterfaceCommand = async (input, context) => {
95
- const headers = sharedHeaders("ConfirmPrivateVirtualInterface");
96
- let body;
97
- body = JSON.stringify((0, smithy_client_1._json)(input));
98
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
- };
100
- exports.se_ConfirmPrivateVirtualInterfaceCommand = se_ConfirmPrivateVirtualInterfaceCommand;
101
- const se_ConfirmPublicVirtualInterfaceCommand = async (input, context) => {
102
- const headers = sharedHeaders("ConfirmPublicVirtualInterface");
103
- let body;
104
- body = JSON.stringify((0, smithy_client_1._json)(input));
105
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
106
- };
107
- exports.se_ConfirmPublicVirtualInterfaceCommand = se_ConfirmPublicVirtualInterfaceCommand;
108
- const se_ConfirmTransitVirtualInterfaceCommand = async (input, context) => {
109
- const headers = sharedHeaders("ConfirmTransitVirtualInterface");
110
- let body;
111
- body = JSON.stringify((0, smithy_client_1._json)(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- exports.se_ConfirmTransitVirtualInterfaceCommand = se_ConfirmTransitVirtualInterfaceCommand;
115
- const se_CreateBGPPeerCommand = async (input, context) => {
116
- const headers = sharedHeaders("CreateBGPPeer");
117
- let body;
118
- body = JSON.stringify((0, smithy_client_1._json)(input));
119
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
- };
121
- exports.se_CreateBGPPeerCommand = se_CreateBGPPeerCommand;
122
- const se_CreateConnectionCommand = async (input, context) => {
123
- const headers = sharedHeaders("CreateConnection");
124
- let body;
125
- body = JSON.stringify((0, smithy_client_1._json)(input));
126
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
127
- };
128
- exports.se_CreateConnectionCommand = se_CreateConnectionCommand;
129
- const se_CreateDirectConnectGatewayCommand = async (input, context) => {
130
- const headers = sharedHeaders("CreateDirectConnectGateway");
131
- let body;
132
- body = JSON.stringify((0, smithy_client_1._json)(input));
133
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
134
- };
135
- exports.se_CreateDirectConnectGatewayCommand = se_CreateDirectConnectGatewayCommand;
136
- const se_CreateDirectConnectGatewayAssociationCommand = async (input, context) => {
137
- const headers = sharedHeaders("CreateDirectConnectGatewayAssociation");
138
- let body;
139
- body = JSON.stringify((0, smithy_client_1._json)(input));
140
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
141
- };
142
- exports.se_CreateDirectConnectGatewayAssociationCommand = se_CreateDirectConnectGatewayAssociationCommand;
143
- const se_CreateDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
144
- const headers = sharedHeaders("CreateDirectConnectGatewayAssociationProposal");
145
- let body;
146
- body = JSON.stringify((0, smithy_client_1._json)(input));
147
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
148
- };
149
- exports.se_CreateDirectConnectGatewayAssociationProposalCommand = se_CreateDirectConnectGatewayAssociationProposalCommand;
150
- const se_CreateInterconnectCommand = async (input, context) => {
151
- const headers = sharedHeaders("CreateInterconnect");
152
- let body;
153
- body = JSON.stringify((0, smithy_client_1._json)(input));
154
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
- };
156
- exports.se_CreateInterconnectCommand = se_CreateInterconnectCommand;
157
- const se_CreateLagCommand = async (input, context) => {
158
- const headers = sharedHeaders("CreateLag");
159
- let body;
160
- body = JSON.stringify((0, smithy_client_1._json)(input));
161
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
- };
163
- exports.se_CreateLagCommand = se_CreateLagCommand;
164
- const se_CreatePrivateVirtualInterfaceCommand = async (input, context) => {
165
- const headers = sharedHeaders("CreatePrivateVirtualInterface");
166
- let body;
167
- body = JSON.stringify((0, smithy_client_1._json)(input));
168
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
169
- };
170
- exports.se_CreatePrivateVirtualInterfaceCommand = se_CreatePrivateVirtualInterfaceCommand;
171
- const se_CreatePublicVirtualInterfaceCommand = async (input, context) => {
172
- const headers = sharedHeaders("CreatePublicVirtualInterface");
173
- let body;
174
- body = JSON.stringify((0, smithy_client_1._json)(input));
175
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
- };
177
- exports.se_CreatePublicVirtualInterfaceCommand = se_CreatePublicVirtualInterfaceCommand;
178
- const se_CreateTransitVirtualInterfaceCommand = async (input, context) => {
179
- const headers = sharedHeaders("CreateTransitVirtualInterface");
180
- let body;
181
- body = JSON.stringify((0, smithy_client_1._json)(input));
182
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
- };
184
- exports.se_CreateTransitVirtualInterfaceCommand = se_CreateTransitVirtualInterfaceCommand;
185
- const se_DeleteBGPPeerCommand = async (input, context) => {
186
- const headers = sharedHeaders("DeleteBGPPeer");
187
- let body;
188
- body = JSON.stringify((0, smithy_client_1._json)(input));
189
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
190
- };
191
- exports.se_DeleteBGPPeerCommand = se_DeleteBGPPeerCommand;
192
- const se_DeleteConnectionCommand = async (input, context) => {
193
- const headers = sharedHeaders("DeleteConnection");
194
- let body;
195
- body = JSON.stringify((0, smithy_client_1._json)(input));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
- exports.se_DeleteConnectionCommand = se_DeleteConnectionCommand;
199
- const se_DeleteDirectConnectGatewayCommand = async (input, context) => {
200
- const headers = sharedHeaders("DeleteDirectConnectGateway");
201
- let body;
202
- body = JSON.stringify((0, smithy_client_1._json)(input));
203
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
- };
205
- exports.se_DeleteDirectConnectGatewayCommand = se_DeleteDirectConnectGatewayCommand;
206
- const se_DeleteDirectConnectGatewayAssociationCommand = async (input, context) => {
207
- const headers = sharedHeaders("DeleteDirectConnectGatewayAssociation");
208
- let body;
209
- body = JSON.stringify((0, smithy_client_1._json)(input));
210
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
211
- };
212
- exports.se_DeleteDirectConnectGatewayAssociationCommand = se_DeleteDirectConnectGatewayAssociationCommand;
213
- const se_DeleteDirectConnectGatewayAssociationProposalCommand = async (input, context) => {
214
- const headers = sharedHeaders("DeleteDirectConnectGatewayAssociationProposal");
215
- let body;
216
- body = JSON.stringify((0, smithy_client_1._json)(input));
217
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
218
- };
219
- exports.se_DeleteDirectConnectGatewayAssociationProposalCommand = se_DeleteDirectConnectGatewayAssociationProposalCommand;
220
- const se_DeleteInterconnectCommand = async (input, context) => {
221
- const headers = sharedHeaders("DeleteInterconnect");
222
- let body;
223
- body = JSON.stringify((0, smithy_client_1._json)(input));
224
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
225
- };
226
- exports.se_DeleteInterconnectCommand = se_DeleteInterconnectCommand;
227
- const se_DeleteLagCommand = async (input, context) => {
228
- const headers = sharedHeaders("DeleteLag");
229
- let body;
230
- body = JSON.stringify((0, smithy_client_1._json)(input));
231
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
232
- };
233
- exports.se_DeleteLagCommand = se_DeleteLagCommand;
234
- const se_DeleteVirtualInterfaceCommand = async (input, context) => {
235
- const headers = sharedHeaders("DeleteVirtualInterface");
236
- let body;
237
- body = JSON.stringify((0, smithy_client_1._json)(input));
238
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
239
- };
240
- exports.se_DeleteVirtualInterfaceCommand = se_DeleteVirtualInterfaceCommand;
241
- const se_DescribeConnectionLoaCommand = async (input, context) => {
242
- const headers = sharedHeaders("DescribeConnectionLoa");
243
- let body;
244
- body = JSON.stringify((0, smithy_client_1._json)(input));
245
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
246
- };
247
- exports.se_DescribeConnectionLoaCommand = se_DescribeConnectionLoaCommand;
248
- const se_DescribeConnectionsCommand = async (input, context) => {
249
- const headers = sharedHeaders("DescribeConnections");
250
- let body;
251
- body = JSON.stringify((0, smithy_client_1._json)(input));
252
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
253
- };
254
- exports.se_DescribeConnectionsCommand = se_DescribeConnectionsCommand;
255
- const se_DescribeConnectionsOnInterconnectCommand = async (input, context) => {
256
- const headers = sharedHeaders("DescribeConnectionsOnInterconnect");
257
- let body;
258
- body = JSON.stringify((0, smithy_client_1._json)(input));
259
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
260
- };
261
- exports.se_DescribeConnectionsOnInterconnectCommand = se_DescribeConnectionsOnInterconnectCommand;
262
- const se_DescribeCustomerMetadataCommand = async (input, context) => {
263
- const headers = sharedHeaders("DescribeCustomerMetadata");
264
- const body = "{}";
265
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
- };
267
- exports.se_DescribeCustomerMetadataCommand = se_DescribeCustomerMetadataCommand;
268
- const se_DescribeDirectConnectGatewayAssociationProposalsCommand = async (input, context) => {
269
- const headers = sharedHeaders("DescribeDirectConnectGatewayAssociationProposals");
270
- let body;
271
- body = JSON.stringify((0, smithy_client_1._json)(input));
272
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
273
- };
274
- exports.se_DescribeDirectConnectGatewayAssociationProposalsCommand = se_DescribeDirectConnectGatewayAssociationProposalsCommand;
275
- const se_DescribeDirectConnectGatewayAssociationsCommand = async (input, context) => {
276
- const headers = sharedHeaders("DescribeDirectConnectGatewayAssociations");
277
- let body;
278
- body = JSON.stringify((0, smithy_client_1._json)(input));
279
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
280
- };
281
- exports.se_DescribeDirectConnectGatewayAssociationsCommand = se_DescribeDirectConnectGatewayAssociationsCommand;
282
- const se_DescribeDirectConnectGatewayAttachmentsCommand = async (input, context) => {
283
- const headers = sharedHeaders("DescribeDirectConnectGatewayAttachments");
284
- let body;
285
- body = JSON.stringify((0, smithy_client_1._json)(input));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
- exports.se_DescribeDirectConnectGatewayAttachmentsCommand = se_DescribeDirectConnectGatewayAttachmentsCommand;
289
- const se_DescribeDirectConnectGatewaysCommand = async (input, context) => {
290
- const headers = sharedHeaders("DescribeDirectConnectGateways");
291
- let body;
292
- body = JSON.stringify((0, smithy_client_1._json)(input));
293
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
- };
295
- exports.se_DescribeDirectConnectGatewaysCommand = se_DescribeDirectConnectGatewaysCommand;
296
- const se_DescribeHostedConnectionsCommand = async (input, context) => {
297
- const headers = sharedHeaders("DescribeHostedConnections");
298
- let body;
299
- body = JSON.stringify((0, smithy_client_1._json)(input));
300
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
- };
302
- exports.se_DescribeHostedConnectionsCommand = se_DescribeHostedConnectionsCommand;
303
- const se_DescribeInterconnectLoaCommand = async (input, context) => {
304
- const headers = sharedHeaders("DescribeInterconnectLoa");
305
- let body;
306
- body = JSON.stringify((0, smithy_client_1._json)(input));
307
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
- };
309
- exports.se_DescribeInterconnectLoaCommand = se_DescribeInterconnectLoaCommand;
310
- const se_DescribeInterconnectsCommand = async (input, context) => {
311
- const headers = sharedHeaders("DescribeInterconnects");
312
- let body;
313
- body = JSON.stringify((0, smithy_client_1._json)(input));
314
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
315
- };
316
- exports.se_DescribeInterconnectsCommand = se_DescribeInterconnectsCommand;
317
- const se_DescribeLagsCommand = async (input, context) => {
318
- const headers = sharedHeaders("DescribeLags");
319
- let body;
320
- body = JSON.stringify((0, smithy_client_1._json)(input));
321
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
322
- };
323
- exports.se_DescribeLagsCommand = se_DescribeLagsCommand;
324
- const se_DescribeLoaCommand = async (input, context) => {
325
- const headers = sharedHeaders("DescribeLoa");
326
- let body;
327
- body = JSON.stringify((0, smithy_client_1._json)(input));
328
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
329
- };
330
- exports.se_DescribeLoaCommand = se_DescribeLoaCommand;
331
- const se_DescribeLocationsCommand = async (input, context) => {
332
- const headers = sharedHeaders("DescribeLocations");
333
- const body = "{}";
334
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
335
- };
336
- exports.se_DescribeLocationsCommand = se_DescribeLocationsCommand;
337
- const se_DescribeRouterConfigurationCommand = async (input, context) => {
338
- const headers = sharedHeaders("DescribeRouterConfiguration");
339
- let body;
340
- body = JSON.stringify((0, smithy_client_1._json)(input));
341
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
342
- };
343
- exports.se_DescribeRouterConfigurationCommand = se_DescribeRouterConfigurationCommand;
344
- const se_DescribeTagsCommand = async (input, context) => {
345
- const headers = sharedHeaders("DescribeTags");
346
- let body;
347
- body = JSON.stringify((0, smithy_client_1._json)(input));
348
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
349
- };
350
- exports.se_DescribeTagsCommand = se_DescribeTagsCommand;
351
- const se_DescribeVirtualGatewaysCommand = async (input, context) => {
352
- const headers = sharedHeaders("DescribeVirtualGateways");
353
- const body = "{}";
354
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
355
- };
356
- exports.se_DescribeVirtualGatewaysCommand = se_DescribeVirtualGatewaysCommand;
357
- const se_DescribeVirtualInterfacesCommand = async (input, context) => {
358
- const headers = sharedHeaders("DescribeVirtualInterfaces");
359
- let body;
360
- body = JSON.stringify((0, smithy_client_1._json)(input));
361
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
362
- };
363
- exports.se_DescribeVirtualInterfacesCommand = se_DescribeVirtualInterfacesCommand;
364
- const se_DisassociateConnectionFromLagCommand = async (input, context) => {
365
- const headers = sharedHeaders("DisassociateConnectionFromLag");
366
- let body;
367
- body = JSON.stringify((0, smithy_client_1._json)(input));
368
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
369
- };
370
- exports.se_DisassociateConnectionFromLagCommand = se_DisassociateConnectionFromLagCommand;
371
- const se_DisassociateMacSecKeyCommand = async (input, context) => {
372
- const headers = sharedHeaders("DisassociateMacSecKey");
373
- let body;
374
- body = JSON.stringify((0, smithy_client_1._json)(input));
375
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
376
- };
377
- exports.se_DisassociateMacSecKeyCommand = se_DisassociateMacSecKeyCommand;
378
- const se_ListVirtualInterfaceTestHistoryCommand = async (input, context) => {
379
- const headers = sharedHeaders("ListVirtualInterfaceTestHistory");
380
- let body;
381
- body = JSON.stringify((0, smithy_client_1._json)(input));
382
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
383
- };
384
- exports.se_ListVirtualInterfaceTestHistoryCommand = se_ListVirtualInterfaceTestHistoryCommand;
385
- const se_StartBgpFailoverTestCommand = async (input, context) => {
386
- const headers = sharedHeaders("StartBgpFailoverTest");
387
- let body;
388
- body = JSON.stringify((0, smithy_client_1._json)(input));
389
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
390
- };
391
- exports.se_StartBgpFailoverTestCommand = se_StartBgpFailoverTestCommand;
392
- const se_StopBgpFailoverTestCommand = async (input, context) => {
393
- const headers = sharedHeaders("StopBgpFailoverTest");
394
- let body;
395
- body = JSON.stringify((0, smithy_client_1._json)(input));
396
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
397
- };
398
- exports.se_StopBgpFailoverTestCommand = se_StopBgpFailoverTestCommand;
399
- const se_TagResourceCommand = async (input, context) => {
400
- const headers = sharedHeaders("TagResource");
401
- let body;
402
- body = JSON.stringify((0, smithy_client_1._json)(input));
403
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
404
- };
405
- exports.se_TagResourceCommand = se_TagResourceCommand;
406
- const se_UntagResourceCommand = async (input, context) => {
407
- const headers = sharedHeaders("UntagResource");
408
- let body;
409
- body = JSON.stringify((0, smithy_client_1._json)(input));
410
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
411
- };
412
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
413
- const se_UpdateConnectionCommand = async (input, context) => {
414
- const headers = sharedHeaders("UpdateConnection");
415
- let body;
416
- body = JSON.stringify((0, smithy_client_1._json)(input));
417
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
418
- };
419
- exports.se_UpdateConnectionCommand = se_UpdateConnectionCommand;
420
- const se_UpdateDirectConnectGatewayCommand = async (input, context) => {
421
- const headers = sharedHeaders("UpdateDirectConnectGateway");
422
- let body;
423
- body = JSON.stringify((0, smithy_client_1._json)(input));
424
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
425
- };
426
- exports.se_UpdateDirectConnectGatewayCommand = se_UpdateDirectConnectGatewayCommand;
427
- const se_UpdateDirectConnectGatewayAssociationCommand = async (input, context) => {
428
- const headers = sharedHeaders("UpdateDirectConnectGatewayAssociation");
429
- let body;
430
- body = JSON.stringify((0, smithy_client_1._json)(input));
431
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
432
- };
433
- exports.se_UpdateDirectConnectGatewayAssociationCommand = se_UpdateDirectConnectGatewayAssociationCommand;
434
- const se_UpdateLagCommand = async (input, context) => {
435
- const headers = sharedHeaders("UpdateLag");
436
- let body;
437
- body = JSON.stringify((0, smithy_client_1._json)(input));
438
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
439
- };
440
- exports.se_UpdateLagCommand = se_UpdateLagCommand;
441
- const se_UpdateVirtualInterfaceAttributesCommand = async (input, context) => {
442
- const headers = sharedHeaders("UpdateVirtualInterfaceAttributes");
443
- let body;
444
- body = JSON.stringify((0, smithy_client_1._json)(input));
445
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
446
- };
447
- exports.se_UpdateVirtualInterfaceAttributesCommand = se_UpdateVirtualInterfaceAttributesCommand;
448
- const de_AcceptDirectConnectGatewayAssociationProposalCommand = async (output, context) => {
449
- if (output.statusCode >= 300) {
450
- return de_AcceptDirectConnectGatewayAssociationProposalCommandError(output, context);
451
- }
452
- const data = await parseBody(output.body, context);
453
- let contents = {};
454
- contents = (0, smithy_client_1._json)(data);
455
- const response = {
456
- $metadata: deserializeMetadata(output),
457
- ...contents,
458
- };
459
- return response;
460
- };
461
- exports.de_AcceptDirectConnectGatewayAssociationProposalCommand = de_AcceptDirectConnectGatewayAssociationProposalCommand;
462
- const de_AcceptDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
463
- const parsedOutput = {
464
- ...output,
465
- body: await parseErrorBody(output.body, context),
466
- };
467
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
468
- switch (errorCode) {
469
- case "DirectConnectClientException":
470
- case "com.amazonaws.directconnect#DirectConnectClientException":
471
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
472
- case "DirectConnectServerException":
473
- case "com.amazonaws.directconnect#DirectConnectServerException":
474
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
475
- default:
476
- const parsedBody = parsedOutput.body;
477
- return throwDefaultError({
478
- output,
479
- parsedBody,
480
- errorCode,
481
- });
482
- }
483
- };
484
- const de_AllocateConnectionOnInterconnectCommand = async (output, context) => {
485
- if (output.statusCode >= 300) {
486
- return de_AllocateConnectionOnInterconnectCommandError(output, context);
487
- }
488
- const data = await parseBody(output.body, context);
489
- let contents = {};
490
- contents = de_Connection(data, context);
491
- const response = {
492
- $metadata: deserializeMetadata(output),
493
- ...contents,
494
- };
495
- return response;
496
- };
497
- exports.de_AllocateConnectionOnInterconnectCommand = de_AllocateConnectionOnInterconnectCommand;
498
- const de_AllocateConnectionOnInterconnectCommandError = async (output, context) => {
499
- const parsedOutput = {
500
- ...output,
501
- body: await parseErrorBody(output.body, context),
502
- };
503
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
504
- switch (errorCode) {
505
- case "DirectConnectClientException":
506
- case "com.amazonaws.directconnect#DirectConnectClientException":
507
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
508
- case "DirectConnectServerException":
509
- case "com.amazonaws.directconnect#DirectConnectServerException":
510
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
511
- default:
512
- const parsedBody = parsedOutput.body;
513
- return throwDefaultError({
514
- output,
515
- parsedBody,
516
- errorCode,
517
- });
518
- }
519
- };
520
- const de_AllocateHostedConnectionCommand = async (output, context) => {
521
- if (output.statusCode >= 300) {
522
- return de_AllocateHostedConnectionCommandError(output, context);
523
- }
524
- const data = await parseBody(output.body, context);
525
- let contents = {};
526
- contents = de_Connection(data, context);
527
- const response = {
528
- $metadata: deserializeMetadata(output),
529
- ...contents,
530
- };
531
- return response;
532
- };
533
- exports.de_AllocateHostedConnectionCommand = de_AllocateHostedConnectionCommand;
534
- const de_AllocateHostedConnectionCommandError = async (output, context) => {
535
- const parsedOutput = {
536
- ...output,
537
- body: await parseErrorBody(output.body, context),
538
- };
539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
540
- switch (errorCode) {
541
- case "DirectConnectClientException":
542
- case "com.amazonaws.directconnect#DirectConnectClientException":
543
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
544
- case "DirectConnectServerException":
545
- case "com.amazonaws.directconnect#DirectConnectServerException":
546
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
547
- case "DuplicateTagKeysException":
548
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
549
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
550
- case "TooManyTagsException":
551
- case "com.amazonaws.directconnect#TooManyTagsException":
552
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
553
- default:
554
- const parsedBody = parsedOutput.body;
555
- return throwDefaultError({
556
- output,
557
- parsedBody,
558
- errorCode,
559
- });
560
- }
561
- };
562
- const de_AllocatePrivateVirtualInterfaceCommand = async (output, context) => {
563
- if (output.statusCode >= 300) {
564
- return de_AllocatePrivateVirtualInterfaceCommandError(output, context);
565
- }
566
- const data = await parseBody(output.body, context);
567
- let contents = {};
568
- contents = (0, smithy_client_1._json)(data);
569
- const response = {
570
- $metadata: deserializeMetadata(output),
571
- ...contents,
572
- };
573
- return response;
574
- };
575
- exports.de_AllocatePrivateVirtualInterfaceCommand = de_AllocatePrivateVirtualInterfaceCommand;
576
- const de_AllocatePrivateVirtualInterfaceCommandError = async (output, context) => {
577
- const parsedOutput = {
578
- ...output,
579
- body: await parseErrorBody(output.body, context),
580
- };
581
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
582
- switch (errorCode) {
583
- case "DirectConnectClientException":
584
- case "com.amazonaws.directconnect#DirectConnectClientException":
585
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
586
- case "DirectConnectServerException":
587
- case "com.amazonaws.directconnect#DirectConnectServerException":
588
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
589
- case "DuplicateTagKeysException":
590
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
591
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
592
- case "TooManyTagsException":
593
- case "com.amazonaws.directconnect#TooManyTagsException":
594
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
595
- default:
596
- const parsedBody = parsedOutput.body;
597
- return throwDefaultError({
598
- output,
599
- parsedBody,
600
- errorCode,
601
- });
602
- }
603
- };
604
- const de_AllocatePublicVirtualInterfaceCommand = async (output, context) => {
605
- if (output.statusCode >= 300) {
606
- return de_AllocatePublicVirtualInterfaceCommandError(output, context);
607
- }
608
- const data = await parseBody(output.body, context);
609
- let contents = {};
610
- contents = (0, smithy_client_1._json)(data);
611
- const response = {
612
- $metadata: deserializeMetadata(output),
613
- ...contents,
614
- };
615
- return response;
616
- };
617
- exports.de_AllocatePublicVirtualInterfaceCommand = de_AllocatePublicVirtualInterfaceCommand;
618
- const de_AllocatePublicVirtualInterfaceCommandError = async (output, context) => {
619
- const parsedOutput = {
620
- ...output,
621
- body: await parseErrorBody(output.body, context),
622
- };
623
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
624
- switch (errorCode) {
625
- case "DirectConnectClientException":
626
- case "com.amazonaws.directconnect#DirectConnectClientException":
627
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
628
- case "DirectConnectServerException":
629
- case "com.amazonaws.directconnect#DirectConnectServerException":
630
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
631
- case "DuplicateTagKeysException":
632
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
633
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
634
- case "TooManyTagsException":
635
- case "com.amazonaws.directconnect#TooManyTagsException":
636
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
637
- default:
638
- const parsedBody = parsedOutput.body;
639
- return throwDefaultError({
640
- output,
641
- parsedBody,
642
- errorCode,
643
- });
644
- }
645
- };
646
- const de_AllocateTransitVirtualInterfaceCommand = async (output, context) => {
647
- if (output.statusCode >= 300) {
648
- return de_AllocateTransitVirtualInterfaceCommandError(output, context);
649
- }
650
- const data = await parseBody(output.body, context);
651
- let contents = {};
652
- contents = (0, smithy_client_1._json)(data);
653
- const response = {
654
- $metadata: deserializeMetadata(output),
655
- ...contents,
656
- };
657
- return response;
658
- };
659
- exports.de_AllocateTransitVirtualInterfaceCommand = de_AllocateTransitVirtualInterfaceCommand;
660
- const de_AllocateTransitVirtualInterfaceCommandError = async (output, context) => {
661
- const parsedOutput = {
662
- ...output,
663
- body: await parseErrorBody(output.body, context),
664
- };
665
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
666
- switch (errorCode) {
667
- case "DirectConnectClientException":
668
- case "com.amazonaws.directconnect#DirectConnectClientException":
669
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
670
- case "DirectConnectServerException":
671
- case "com.amazonaws.directconnect#DirectConnectServerException":
672
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
673
- case "DuplicateTagKeysException":
674
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
675
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
676
- case "TooManyTagsException":
677
- case "com.amazonaws.directconnect#TooManyTagsException":
678
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
679
- default:
680
- const parsedBody = parsedOutput.body;
681
- return throwDefaultError({
682
- output,
683
- parsedBody,
684
- errorCode,
685
- });
686
- }
687
- };
688
- const de_AssociateConnectionWithLagCommand = async (output, context) => {
689
- if (output.statusCode >= 300) {
690
- return de_AssociateConnectionWithLagCommandError(output, context);
691
- }
692
- const data = await parseBody(output.body, context);
693
- let contents = {};
694
- contents = de_Connection(data, context);
695
- const response = {
696
- $metadata: deserializeMetadata(output),
697
- ...contents,
698
- };
699
- return response;
700
- };
701
- exports.de_AssociateConnectionWithLagCommand = de_AssociateConnectionWithLagCommand;
702
- const de_AssociateConnectionWithLagCommandError = async (output, context) => {
703
- const parsedOutput = {
704
- ...output,
705
- body: await parseErrorBody(output.body, context),
706
- };
707
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
708
- switch (errorCode) {
709
- case "DirectConnectClientException":
710
- case "com.amazonaws.directconnect#DirectConnectClientException":
711
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
712
- case "DirectConnectServerException":
713
- case "com.amazonaws.directconnect#DirectConnectServerException":
714
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
715
- default:
716
- const parsedBody = parsedOutput.body;
717
- return throwDefaultError({
718
- output,
719
- parsedBody,
720
- errorCode,
721
- });
722
- }
723
- };
724
- const de_AssociateHostedConnectionCommand = async (output, context) => {
725
- if (output.statusCode >= 300) {
726
- return de_AssociateHostedConnectionCommandError(output, context);
727
- }
728
- const data = await parseBody(output.body, context);
729
- let contents = {};
730
- contents = de_Connection(data, context);
731
- const response = {
732
- $metadata: deserializeMetadata(output),
733
- ...contents,
734
- };
735
- return response;
736
- };
737
- exports.de_AssociateHostedConnectionCommand = de_AssociateHostedConnectionCommand;
738
- const de_AssociateHostedConnectionCommandError = async (output, context) => {
739
- const parsedOutput = {
740
- ...output,
741
- body: await parseErrorBody(output.body, context),
742
- };
743
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
744
- switch (errorCode) {
745
- case "DirectConnectClientException":
746
- case "com.amazonaws.directconnect#DirectConnectClientException":
747
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
748
- case "DirectConnectServerException":
749
- case "com.amazonaws.directconnect#DirectConnectServerException":
750
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
751
- default:
752
- const parsedBody = parsedOutput.body;
753
- return throwDefaultError({
754
- output,
755
- parsedBody,
756
- errorCode,
757
- });
758
- }
759
- };
760
- const de_AssociateMacSecKeyCommand = async (output, context) => {
761
- if (output.statusCode >= 300) {
762
- return de_AssociateMacSecKeyCommandError(output, context);
763
- }
764
- const data = await parseBody(output.body, context);
765
- let contents = {};
766
- contents = (0, smithy_client_1._json)(data);
767
- const response = {
768
- $metadata: deserializeMetadata(output),
769
- ...contents,
770
- };
771
- return response;
772
- };
773
- exports.de_AssociateMacSecKeyCommand = de_AssociateMacSecKeyCommand;
774
- const de_AssociateMacSecKeyCommandError = async (output, context) => {
775
- const parsedOutput = {
776
- ...output,
777
- body: await parseErrorBody(output.body, context),
778
- };
779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
- switch (errorCode) {
781
- case "DirectConnectClientException":
782
- case "com.amazonaws.directconnect#DirectConnectClientException":
783
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
784
- case "DirectConnectServerException":
785
- case "com.amazonaws.directconnect#DirectConnectServerException":
786
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
787
- default:
788
- const parsedBody = parsedOutput.body;
789
- return throwDefaultError({
790
- output,
791
- parsedBody,
792
- errorCode,
793
- });
794
- }
795
- };
796
- const de_AssociateVirtualInterfaceCommand = async (output, context) => {
797
- if (output.statusCode >= 300) {
798
- return de_AssociateVirtualInterfaceCommandError(output, context);
799
- }
800
- const data = await parseBody(output.body, context);
801
- let contents = {};
802
- contents = (0, smithy_client_1._json)(data);
803
- const response = {
804
- $metadata: deserializeMetadata(output),
805
- ...contents,
806
- };
807
- return response;
808
- };
809
- exports.de_AssociateVirtualInterfaceCommand = de_AssociateVirtualInterfaceCommand;
810
- const de_AssociateVirtualInterfaceCommandError = async (output, context) => {
811
- const parsedOutput = {
812
- ...output,
813
- body: await parseErrorBody(output.body, context),
814
- };
815
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
816
- switch (errorCode) {
817
- case "DirectConnectClientException":
818
- case "com.amazonaws.directconnect#DirectConnectClientException":
819
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
820
- case "DirectConnectServerException":
821
- case "com.amazonaws.directconnect#DirectConnectServerException":
822
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
823
- default:
824
- const parsedBody = parsedOutput.body;
825
- return throwDefaultError({
826
- output,
827
- parsedBody,
828
- errorCode,
829
- });
830
- }
831
- };
832
- const de_ConfirmConnectionCommand = async (output, context) => {
833
- if (output.statusCode >= 300) {
834
- return de_ConfirmConnectionCommandError(output, context);
835
- }
836
- const data = await parseBody(output.body, context);
837
- let contents = {};
838
- contents = (0, smithy_client_1._json)(data);
839
- const response = {
840
- $metadata: deserializeMetadata(output),
841
- ...contents,
842
- };
843
- return response;
844
- };
845
- exports.de_ConfirmConnectionCommand = de_ConfirmConnectionCommand;
846
- const de_ConfirmConnectionCommandError = async (output, context) => {
847
- const parsedOutput = {
848
- ...output,
849
- body: await parseErrorBody(output.body, context),
850
- };
851
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
852
- switch (errorCode) {
853
- case "DirectConnectClientException":
854
- case "com.amazonaws.directconnect#DirectConnectClientException":
855
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
856
- case "DirectConnectServerException":
857
- case "com.amazonaws.directconnect#DirectConnectServerException":
858
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
859
- default:
860
- const parsedBody = parsedOutput.body;
861
- return throwDefaultError({
862
- output,
863
- parsedBody,
864
- errorCode,
865
- });
866
- }
867
- };
868
- const de_ConfirmCustomerAgreementCommand = async (output, context) => {
869
- if (output.statusCode >= 300) {
870
- return de_ConfirmCustomerAgreementCommandError(output, context);
871
- }
872
- const data = await parseBody(output.body, context);
873
- let contents = {};
874
- contents = (0, smithy_client_1._json)(data);
875
- const response = {
876
- $metadata: deserializeMetadata(output),
877
- ...contents,
878
- };
879
- return response;
880
- };
881
- exports.de_ConfirmCustomerAgreementCommand = de_ConfirmCustomerAgreementCommand;
882
- const de_ConfirmCustomerAgreementCommandError = async (output, context) => {
883
- const parsedOutput = {
884
- ...output,
885
- body: await parseErrorBody(output.body, context),
886
- };
887
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
888
- switch (errorCode) {
889
- case "DirectConnectClientException":
890
- case "com.amazonaws.directconnect#DirectConnectClientException":
891
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
892
- case "DirectConnectServerException":
893
- case "com.amazonaws.directconnect#DirectConnectServerException":
894
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
895
- default:
896
- const parsedBody = parsedOutput.body;
897
- return throwDefaultError({
898
- output,
899
- parsedBody,
900
- errorCode,
901
- });
902
- }
903
- };
904
- const de_ConfirmPrivateVirtualInterfaceCommand = async (output, context) => {
905
- if (output.statusCode >= 300) {
906
- return de_ConfirmPrivateVirtualInterfaceCommandError(output, context);
907
- }
908
- const data = await parseBody(output.body, context);
909
- let contents = {};
910
- contents = (0, smithy_client_1._json)(data);
911
- const response = {
912
- $metadata: deserializeMetadata(output),
913
- ...contents,
914
- };
915
- return response;
916
- };
917
- exports.de_ConfirmPrivateVirtualInterfaceCommand = de_ConfirmPrivateVirtualInterfaceCommand;
918
- const de_ConfirmPrivateVirtualInterfaceCommandError = async (output, context) => {
919
- const parsedOutput = {
920
- ...output,
921
- body: await parseErrorBody(output.body, context),
922
- };
923
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
924
- switch (errorCode) {
925
- case "DirectConnectClientException":
926
- case "com.amazonaws.directconnect#DirectConnectClientException":
927
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
928
- case "DirectConnectServerException":
929
- case "com.amazonaws.directconnect#DirectConnectServerException":
930
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
931
- default:
932
- const parsedBody = parsedOutput.body;
933
- return throwDefaultError({
934
- output,
935
- parsedBody,
936
- errorCode,
937
- });
938
- }
939
- };
940
- const de_ConfirmPublicVirtualInterfaceCommand = async (output, context) => {
941
- if (output.statusCode >= 300) {
942
- return de_ConfirmPublicVirtualInterfaceCommandError(output, context);
943
- }
944
- const data = await parseBody(output.body, context);
945
- let contents = {};
946
- contents = (0, smithy_client_1._json)(data);
947
- const response = {
948
- $metadata: deserializeMetadata(output),
949
- ...contents,
950
- };
951
- return response;
952
- };
953
- exports.de_ConfirmPublicVirtualInterfaceCommand = de_ConfirmPublicVirtualInterfaceCommand;
954
- const de_ConfirmPublicVirtualInterfaceCommandError = async (output, context) => {
955
- const parsedOutput = {
956
- ...output,
957
- body: await parseErrorBody(output.body, context),
958
- };
959
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
960
- switch (errorCode) {
961
- case "DirectConnectClientException":
962
- case "com.amazonaws.directconnect#DirectConnectClientException":
963
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
964
- case "DirectConnectServerException":
965
- case "com.amazonaws.directconnect#DirectConnectServerException":
966
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
967
- default:
968
- const parsedBody = parsedOutput.body;
969
- return throwDefaultError({
970
- output,
971
- parsedBody,
972
- errorCode,
973
- });
974
- }
975
- };
976
- const de_ConfirmTransitVirtualInterfaceCommand = async (output, context) => {
977
- if (output.statusCode >= 300) {
978
- return de_ConfirmTransitVirtualInterfaceCommandError(output, context);
979
- }
980
- const data = await parseBody(output.body, context);
981
- let contents = {};
982
- contents = (0, smithy_client_1._json)(data);
983
- const response = {
984
- $metadata: deserializeMetadata(output),
985
- ...contents,
986
- };
987
- return response;
988
- };
989
- exports.de_ConfirmTransitVirtualInterfaceCommand = de_ConfirmTransitVirtualInterfaceCommand;
990
- const de_ConfirmTransitVirtualInterfaceCommandError = async (output, context) => {
991
- const parsedOutput = {
992
- ...output,
993
- body: await parseErrorBody(output.body, context),
994
- };
995
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
996
- switch (errorCode) {
997
- case "DirectConnectClientException":
998
- case "com.amazonaws.directconnect#DirectConnectClientException":
999
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1000
- case "DirectConnectServerException":
1001
- case "com.amazonaws.directconnect#DirectConnectServerException":
1002
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1003
- default:
1004
- const parsedBody = parsedOutput.body;
1005
- return throwDefaultError({
1006
- output,
1007
- parsedBody,
1008
- errorCode,
1009
- });
1010
- }
1011
- };
1012
- const de_CreateBGPPeerCommand = async (output, context) => {
1013
- if (output.statusCode >= 300) {
1014
- return de_CreateBGPPeerCommandError(output, context);
1015
- }
1016
- const data = await parseBody(output.body, context);
1017
- let contents = {};
1018
- contents = (0, smithy_client_1._json)(data);
1019
- const response = {
1020
- $metadata: deserializeMetadata(output),
1021
- ...contents,
1022
- };
1023
- return response;
1024
- };
1025
- exports.de_CreateBGPPeerCommand = de_CreateBGPPeerCommand;
1026
- const de_CreateBGPPeerCommandError = async (output, context) => {
1027
- const parsedOutput = {
1028
- ...output,
1029
- body: await parseErrorBody(output.body, context),
1030
- };
1031
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1032
- switch (errorCode) {
1033
- case "DirectConnectClientException":
1034
- case "com.amazonaws.directconnect#DirectConnectClientException":
1035
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1036
- case "DirectConnectServerException":
1037
- case "com.amazonaws.directconnect#DirectConnectServerException":
1038
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1039
- default:
1040
- const parsedBody = parsedOutput.body;
1041
- return throwDefaultError({
1042
- output,
1043
- parsedBody,
1044
- errorCode,
1045
- });
1046
- }
1047
- };
1048
- const de_CreateConnectionCommand = async (output, context) => {
1049
- if (output.statusCode >= 300) {
1050
- return de_CreateConnectionCommandError(output, context);
1051
- }
1052
- const data = await parseBody(output.body, context);
1053
- let contents = {};
1054
- contents = de_Connection(data, context);
1055
- const response = {
1056
- $metadata: deserializeMetadata(output),
1057
- ...contents,
1058
- };
1059
- return response;
1060
- };
1061
- exports.de_CreateConnectionCommand = de_CreateConnectionCommand;
1062
- const de_CreateConnectionCommandError = async (output, context) => {
1063
- const parsedOutput = {
1064
- ...output,
1065
- body: await parseErrorBody(output.body, context),
1066
- };
1067
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1068
- switch (errorCode) {
1069
- case "DirectConnectClientException":
1070
- case "com.amazonaws.directconnect#DirectConnectClientException":
1071
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1072
- case "DirectConnectServerException":
1073
- case "com.amazonaws.directconnect#DirectConnectServerException":
1074
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1075
- case "DuplicateTagKeysException":
1076
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1077
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1078
- case "TooManyTagsException":
1079
- case "com.amazonaws.directconnect#TooManyTagsException":
1080
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1081
- default:
1082
- const parsedBody = parsedOutput.body;
1083
- return throwDefaultError({
1084
- output,
1085
- parsedBody,
1086
- errorCode,
1087
- });
1088
- }
1089
- };
1090
- const de_CreateDirectConnectGatewayCommand = async (output, context) => {
1091
- if (output.statusCode >= 300) {
1092
- return de_CreateDirectConnectGatewayCommandError(output, context);
1093
- }
1094
- const data = await parseBody(output.body, context);
1095
- let contents = {};
1096
- contents = (0, smithy_client_1._json)(data);
1097
- const response = {
1098
- $metadata: deserializeMetadata(output),
1099
- ...contents,
1100
- };
1101
- return response;
1102
- };
1103
- exports.de_CreateDirectConnectGatewayCommand = de_CreateDirectConnectGatewayCommand;
1104
- const de_CreateDirectConnectGatewayCommandError = async (output, context) => {
1105
- const parsedOutput = {
1106
- ...output,
1107
- body: await parseErrorBody(output.body, context),
1108
- };
1109
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1110
- switch (errorCode) {
1111
- case "DirectConnectClientException":
1112
- case "com.amazonaws.directconnect#DirectConnectClientException":
1113
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1114
- case "DirectConnectServerException":
1115
- case "com.amazonaws.directconnect#DirectConnectServerException":
1116
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1117
- default:
1118
- const parsedBody = parsedOutput.body;
1119
- return throwDefaultError({
1120
- output,
1121
- parsedBody,
1122
- errorCode,
1123
- });
1124
- }
1125
- };
1126
- const de_CreateDirectConnectGatewayAssociationCommand = async (output, context) => {
1127
- if (output.statusCode >= 300) {
1128
- return de_CreateDirectConnectGatewayAssociationCommandError(output, context);
1129
- }
1130
- const data = await parseBody(output.body, context);
1131
- let contents = {};
1132
- contents = (0, smithy_client_1._json)(data);
1133
- const response = {
1134
- $metadata: deserializeMetadata(output),
1135
- ...contents,
1136
- };
1137
- return response;
1138
- };
1139
- exports.de_CreateDirectConnectGatewayAssociationCommand = de_CreateDirectConnectGatewayAssociationCommand;
1140
- const de_CreateDirectConnectGatewayAssociationCommandError = async (output, context) => {
1141
- const parsedOutput = {
1142
- ...output,
1143
- body: await parseErrorBody(output.body, context),
1144
- };
1145
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1146
- switch (errorCode) {
1147
- case "DirectConnectClientException":
1148
- case "com.amazonaws.directconnect#DirectConnectClientException":
1149
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1150
- case "DirectConnectServerException":
1151
- case "com.amazonaws.directconnect#DirectConnectServerException":
1152
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1153
- default:
1154
- const parsedBody = parsedOutput.body;
1155
- return throwDefaultError({
1156
- output,
1157
- parsedBody,
1158
- errorCode,
1159
- });
1160
- }
1161
- };
1162
- const de_CreateDirectConnectGatewayAssociationProposalCommand = async (output, context) => {
1163
- if (output.statusCode >= 300) {
1164
- return de_CreateDirectConnectGatewayAssociationProposalCommandError(output, context);
1165
- }
1166
- const data = await parseBody(output.body, context);
1167
- let contents = {};
1168
- contents = (0, smithy_client_1._json)(data);
1169
- const response = {
1170
- $metadata: deserializeMetadata(output),
1171
- ...contents,
1172
- };
1173
- return response;
1174
- };
1175
- exports.de_CreateDirectConnectGatewayAssociationProposalCommand = de_CreateDirectConnectGatewayAssociationProposalCommand;
1176
- const de_CreateDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
1177
- const parsedOutput = {
1178
- ...output,
1179
- body: await parseErrorBody(output.body, context),
1180
- };
1181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1182
- switch (errorCode) {
1183
- case "DirectConnectClientException":
1184
- case "com.amazonaws.directconnect#DirectConnectClientException":
1185
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1186
- case "DirectConnectServerException":
1187
- case "com.amazonaws.directconnect#DirectConnectServerException":
1188
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1189
- default:
1190
- const parsedBody = parsedOutput.body;
1191
- return throwDefaultError({
1192
- output,
1193
- parsedBody,
1194
- errorCode,
1195
- });
1196
- }
1197
- };
1198
- const de_CreateInterconnectCommand = async (output, context) => {
1199
- if (output.statusCode >= 300) {
1200
- return de_CreateInterconnectCommandError(output, context);
1201
- }
1202
- const data = await parseBody(output.body, context);
1203
- let contents = {};
1204
- contents = de_Interconnect(data, context);
1205
- const response = {
1206
- $metadata: deserializeMetadata(output),
1207
- ...contents,
1208
- };
1209
- return response;
1210
- };
1211
- exports.de_CreateInterconnectCommand = de_CreateInterconnectCommand;
1212
- const de_CreateInterconnectCommandError = async (output, context) => {
1213
- const parsedOutput = {
1214
- ...output,
1215
- body: await parseErrorBody(output.body, context),
1216
- };
1217
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1218
- switch (errorCode) {
1219
- case "DirectConnectClientException":
1220
- case "com.amazonaws.directconnect#DirectConnectClientException":
1221
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1222
- case "DirectConnectServerException":
1223
- case "com.amazonaws.directconnect#DirectConnectServerException":
1224
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1225
- case "DuplicateTagKeysException":
1226
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1227
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1228
- case "TooManyTagsException":
1229
- case "com.amazonaws.directconnect#TooManyTagsException":
1230
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1231
- default:
1232
- const parsedBody = parsedOutput.body;
1233
- return throwDefaultError({
1234
- output,
1235
- parsedBody,
1236
- errorCode,
1237
- });
1238
- }
1239
- };
1240
- const de_CreateLagCommand = async (output, context) => {
1241
- if (output.statusCode >= 300) {
1242
- return de_CreateLagCommandError(output, context);
1243
- }
1244
- const data = await parseBody(output.body, context);
1245
- let contents = {};
1246
- contents = de_Lag(data, context);
1247
- const response = {
1248
- $metadata: deserializeMetadata(output),
1249
- ...contents,
1250
- };
1251
- return response;
1252
- };
1253
- exports.de_CreateLagCommand = de_CreateLagCommand;
1254
- const de_CreateLagCommandError = async (output, context) => {
1255
- const parsedOutput = {
1256
- ...output,
1257
- body: await parseErrorBody(output.body, context),
1258
- };
1259
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1260
- switch (errorCode) {
1261
- case "DirectConnectClientException":
1262
- case "com.amazonaws.directconnect#DirectConnectClientException":
1263
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1264
- case "DirectConnectServerException":
1265
- case "com.amazonaws.directconnect#DirectConnectServerException":
1266
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1267
- case "DuplicateTagKeysException":
1268
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1269
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1270
- case "TooManyTagsException":
1271
- case "com.amazonaws.directconnect#TooManyTagsException":
1272
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1273
- default:
1274
- const parsedBody = parsedOutput.body;
1275
- return throwDefaultError({
1276
- output,
1277
- parsedBody,
1278
- errorCode,
1279
- });
1280
- }
1281
- };
1282
- const de_CreatePrivateVirtualInterfaceCommand = async (output, context) => {
1283
- if (output.statusCode >= 300) {
1284
- return de_CreatePrivateVirtualInterfaceCommandError(output, context);
1285
- }
1286
- const data = await parseBody(output.body, context);
1287
- let contents = {};
1288
- contents = (0, smithy_client_1._json)(data);
1289
- const response = {
1290
- $metadata: deserializeMetadata(output),
1291
- ...contents,
1292
- };
1293
- return response;
1294
- };
1295
- exports.de_CreatePrivateVirtualInterfaceCommand = de_CreatePrivateVirtualInterfaceCommand;
1296
- const de_CreatePrivateVirtualInterfaceCommandError = async (output, context) => {
1297
- const parsedOutput = {
1298
- ...output,
1299
- body: await parseErrorBody(output.body, context),
1300
- };
1301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1302
- switch (errorCode) {
1303
- case "DirectConnectClientException":
1304
- case "com.amazonaws.directconnect#DirectConnectClientException":
1305
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1306
- case "DirectConnectServerException":
1307
- case "com.amazonaws.directconnect#DirectConnectServerException":
1308
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1309
- case "DuplicateTagKeysException":
1310
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1311
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1312
- case "TooManyTagsException":
1313
- case "com.amazonaws.directconnect#TooManyTagsException":
1314
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1315
- default:
1316
- const parsedBody = parsedOutput.body;
1317
- return throwDefaultError({
1318
- output,
1319
- parsedBody,
1320
- errorCode,
1321
- });
1322
- }
1323
- };
1324
- const de_CreatePublicVirtualInterfaceCommand = async (output, context) => {
1325
- if (output.statusCode >= 300) {
1326
- return de_CreatePublicVirtualInterfaceCommandError(output, context);
1327
- }
1328
- const data = await parseBody(output.body, context);
1329
- let contents = {};
1330
- contents = (0, smithy_client_1._json)(data);
1331
- const response = {
1332
- $metadata: deserializeMetadata(output),
1333
- ...contents,
1334
- };
1335
- return response;
1336
- };
1337
- exports.de_CreatePublicVirtualInterfaceCommand = de_CreatePublicVirtualInterfaceCommand;
1338
- const de_CreatePublicVirtualInterfaceCommandError = async (output, context) => {
1339
- const parsedOutput = {
1340
- ...output,
1341
- body: await parseErrorBody(output.body, context),
1342
- };
1343
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1344
- switch (errorCode) {
1345
- case "DirectConnectClientException":
1346
- case "com.amazonaws.directconnect#DirectConnectClientException":
1347
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1348
- case "DirectConnectServerException":
1349
- case "com.amazonaws.directconnect#DirectConnectServerException":
1350
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1351
- case "DuplicateTagKeysException":
1352
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1353
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1354
- case "TooManyTagsException":
1355
- case "com.amazonaws.directconnect#TooManyTagsException":
1356
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1357
- default:
1358
- const parsedBody = parsedOutput.body;
1359
- return throwDefaultError({
1360
- output,
1361
- parsedBody,
1362
- errorCode,
1363
- });
1364
- }
1365
- };
1366
- const de_CreateTransitVirtualInterfaceCommand = async (output, context) => {
1367
- if (output.statusCode >= 300) {
1368
- return de_CreateTransitVirtualInterfaceCommandError(output, context);
1369
- }
1370
- const data = await parseBody(output.body, context);
1371
- let contents = {};
1372
- contents = (0, smithy_client_1._json)(data);
1373
- const response = {
1374
- $metadata: deserializeMetadata(output),
1375
- ...contents,
1376
- };
1377
- return response;
1378
- };
1379
- exports.de_CreateTransitVirtualInterfaceCommand = de_CreateTransitVirtualInterfaceCommand;
1380
- const de_CreateTransitVirtualInterfaceCommandError = async (output, context) => {
1381
- const parsedOutput = {
1382
- ...output,
1383
- body: await parseErrorBody(output.body, context),
1384
- };
1385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
- switch (errorCode) {
1387
- case "DirectConnectClientException":
1388
- case "com.amazonaws.directconnect#DirectConnectClientException":
1389
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1390
- case "DirectConnectServerException":
1391
- case "com.amazonaws.directconnect#DirectConnectServerException":
1392
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1393
- case "DuplicateTagKeysException":
1394
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
1395
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
1396
- case "TooManyTagsException":
1397
- case "com.amazonaws.directconnect#TooManyTagsException":
1398
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1399
- default:
1400
- const parsedBody = parsedOutput.body;
1401
- return throwDefaultError({
1402
- output,
1403
- parsedBody,
1404
- errorCode,
1405
- });
1406
- }
1407
- };
1408
- const de_DeleteBGPPeerCommand = async (output, context) => {
1409
- if (output.statusCode >= 300) {
1410
- return de_DeleteBGPPeerCommandError(output, context);
1411
- }
1412
- const data = await parseBody(output.body, context);
1413
- let contents = {};
1414
- contents = (0, smithy_client_1._json)(data);
1415
- const response = {
1416
- $metadata: deserializeMetadata(output),
1417
- ...contents,
1418
- };
1419
- return response;
1420
- };
1421
- exports.de_DeleteBGPPeerCommand = de_DeleteBGPPeerCommand;
1422
- const de_DeleteBGPPeerCommandError = async (output, context) => {
1423
- const parsedOutput = {
1424
- ...output,
1425
- body: await parseErrorBody(output.body, context),
1426
- };
1427
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
- switch (errorCode) {
1429
- case "DirectConnectClientException":
1430
- case "com.amazonaws.directconnect#DirectConnectClientException":
1431
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1432
- case "DirectConnectServerException":
1433
- case "com.amazonaws.directconnect#DirectConnectServerException":
1434
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1435
- default:
1436
- const parsedBody = parsedOutput.body;
1437
- return throwDefaultError({
1438
- output,
1439
- parsedBody,
1440
- errorCode,
1441
- });
1442
- }
1443
- };
1444
- const de_DeleteConnectionCommand = async (output, context) => {
1445
- if (output.statusCode >= 300) {
1446
- return de_DeleteConnectionCommandError(output, context);
1447
- }
1448
- const data = await parseBody(output.body, context);
1449
- let contents = {};
1450
- contents = de_Connection(data, context);
1451
- const response = {
1452
- $metadata: deserializeMetadata(output),
1453
- ...contents,
1454
- };
1455
- return response;
1456
- };
1457
- exports.de_DeleteConnectionCommand = de_DeleteConnectionCommand;
1458
- const de_DeleteConnectionCommandError = async (output, context) => {
1459
- const parsedOutput = {
1460
- ...output,
1461
- body: await parseErrorBody(output.body, context),
1462
- };
1463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1464
- switch (errorCode) {
1465
- case "DirectConnectClientException":
1466
- case "com.amazonaws.directconnect#DirectConnectClientException":
1467
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1468
- case "DirectConnectServerException":
1469
- case "com.amazonaws.directconnect#DirectConnectServerException":
1470
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1471
- default:
1472
- const parsedBody = parsedOutput.body;
1473
- return throwDefaultError({
1474
- output,
1475
- parsedBody,
1476
- errorCode,
1477
- });
1478
- }
1479
- };
1480
- const de_DeleteDirectConnectGatewayCommand = async (output, context) => {
1481
- if (output.statusCode >= 300) {
1482
- return de_DeleteDirectConnectGatewayCommandError(output, context);
1483
- }
1484
- const data = await parseBody(output.body, context);
1485
- let contents = {};
1486
- contents = (0, smithy_client_1._json)(data);
1487
- const response = {
1488
- $metadata: deserializeMetadata(output),
1489
- ...contents,
1490
- };
1491
- return response;
1492
- };
1493
- exports.de_DeleteDirectConnectGatewayCommand = de_DeleteDirectConnectGatewayCommand;
1494
- const de_DeleteDirectConnectGatewayCommandError = async (output, context) => {
1495
- const parsedOutput = {
1496
- ...output,
1497
- body: await parseErrorBody(output.body, context),
1498
- };
1499
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1500
- switch (errorCode) {
1501
- case "DirectConnectClientException":
1502
- case "com.amazonaws.directconnect#DirectConnectClientException":
1503
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1504
- case "DirectConnectServerException":
1505
- case "com.amazonaws.directconnect#DirectConnectServerException":
1506
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1507
- default:
1508
- const parsedBody = parsedOutput.body;
1509
- return throwDefaultError({
1510
- output,
1511
- parsedBody,
1512
- errorCode,
1513
- });
1514
- }
1515
- };
1516
- const de_DeleteDirectConnectGatewayAssociationCommand = async (output, context) => {
1517
- if (output.statusCode >= 300) {
1518
- return de_DeleteDirectConnectGatewayAssociationCommandError(output, context);
1519
- }
1520
- const data = await parseBody(output.body, context);
1521
- let contents = {};
1522
- contents = (0, smithy_client_1._json)(data);
1523
- const response = {
1524
- $metadata: deserializeMetadata(output),
1525
- ...contents,
1526
- };
1527
- return response;
1528
- };
1529
- exports.de_DeleteDirectConnectGatewayAssociationCommand = de_DeleteDirectConnectGatewayAssociationCommand;
1530
- const de_DeleteDirectConnectGatewayAssociationCommandError = async (output, context) => {
1531
- const parsedOutput = {
1532
- ...output,
1533
- body: await parseErrorBody(output.body, context),
1534
- };
1535
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1536
- switch (errorCode) {
1537
- case "DirectConnectClientException":
1538
- case "com.amazonaws.directconnect#DirectConnectClientException":
1539
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1540
- case "DirectConnectServerException":
1541
- case "com.amazonaws.directconnect#DirectConnectServerException":
1542
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1543
- default:
1544
- const parsedBody = parsedOutput.body;
1545
- return throwDefaultError({
1546
- output,
1547
- parsedBody,
1548
- errorCode,
1549
- });
1550
- }
1551
- };
1552
- const de_DeleteDirectConnectGatewayAssociationProposalCommand = async (output, context) => {
1553
- if (output.statusCode >= 300) {
1554
- return de_DeleteDirectConnectGatewayAssociationProposalCommandError(output, context);
1555
- }
1556
- const data = await parseBody(output.body, context);
1557
- let contents = {};
1558
- contents = (0, smithy_client_1._json)(data);
1559
- const response = {
1560
- $metadata: deserializeMetadata(output),
1561
- ...contents,
1562
- };
1563
- return response;
1564
- };
1565
- exports.de_DeleteDirectConnectGatewayAssociationProposalCommand = de_DeleteDirectConnectGatewayAssociationProposalCommand;
1566
- const de_DeleteDirectConnectGatewayAssociationProposalCommandError = async (output, context) => {
1567
- const parsedOutput = {
1568
- ...output,
1569
- body: await parseErrorBody(output.body, context),
1570
- };
1571
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1572
- switch (errorCode) {
1573
- case "DirectConnectClientException":
1574
- case "com.amazonaws.directconnect#DirectConnectClientException":
1575
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1576
- case "DirectConnectServerException":
1577
- case "com.amazonaws.directconnect#DirectConnectServerException":
1578
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1579
- default:
1580
- const parsedBody = parsedOutput.body;
1581
- return throwDefaultError({
1582
- output,
1583
- parsedBody,
1584
- errorCode,
1585
- });
1586
- }
1587
- };
1588
- const de_DeleteInterconnectCommand = async (output, context) => {
1589
- if (output.statusCode >= 300) {
1590
- return de_DeleteInterconnectCommandError(output, context);
1591
- }
1592
- const data = await parseBody(output.body, context);
1593
- let contents = {};
1594
- contents = (0, smithy_client_1._json)(data);
1595
- const response = {
1596
- $metadata: deserializeMetadata(output),
1597
- ...contents,
1598
- };
1599
- return response;
1600
- };
1601
- exports.de_DeleteInterconnectCommand = de_DeleteInterconnectCommand;
1602
- const de_DeleteInterconnectCommandError = async (output, context) => {
1603
- const parsedOutput = {
1604
- ...output,
1605
- body: await parseErrorBody(output.body, context),
1606
- };
1607
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1608
- switch (errorCode) {
1609
- case "DirectConnectClientException":
1610
- case "com.amazonaws.directconnect#DirectConnectClientException":
1611
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1612
- case "DirectConnectServerException":
1613
- case "com.amazonaws.directconnect#DirectConnectServerException":
1614
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1615
- default:
1616
- const parsedBody = parsedOutput.body;
1617
- return throwDefaultError({
1618
- output,
1619
- parsedBody,
1620
- errorCode,
1621
- });
1622
- }
1623
- };
1624
- const de_DeleteLagCommand = async (output, context) => {
1625
- if (output.statusCode >= 300) {
1626
- return de_DeleteLagCommandError(output, context);
1627
- }
1628
- const data = await parseBody(output.body, context);
1629
- let contents = {};
1630
- contents = de_Lag(data, context);
1631
- const response = {
1632
- $metadata: deserializeMetadata(output),
1633
- ...contents,
1634
- };
1635
- return response;
1636
- };
1637
- exports.de_DeleteLagCommand = de_DeleteLagCommand;
1638
- const de_DeleteLagCommandError = async (output, context) => {
1639
- const parsedOutput = {
1640
- ...output,
1641
- body: await parseErrorBody(output.body, context),
1642
- };
1643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
- switch (errorCode) {
1645
- case "DirectConnectClientException":
1646
- case "com.amazonaws.directconnect#DirectConnectClientException":
1647
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1648
- case "DirectConnectServerException":
1649
- case "com.amazonaws.directconnect#DirectConnectServerException":
1650
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1651
- default:
1652
- const parsedBody = parsedOutput.body;
1653
- return throwDefaultError({
1654
- output,
1655
- parsedBody,
1656
- errorCode,
1657
- });
1658
- }
1659
- };
1660
- const de_DeleteVirtualInterfaceCommand = async (output, context) => {
1661
- if (output.statusCode >= 300) {
1662
- return de_DeleteVirtualInterfaceCommandError(output, context);
1663
- }
1664
- const data = await parseBody(output.body, context);
1665
- let contents = {};
1666
- contents = (0, smithy_client_1._json)(data);
1667
- const response = {
1668
- $metadata: deserializeMetadata(output),
1669
- ...contents,
1670
- };
1671
- return response;
1672
- };
1673
- exports.de_DeleteVirtualInterfaceCommand = de_DeleteVirtualInterfaceCommand;
1674
- const de_DeleteVirtualInterfaceCommandError = async (output, context) => {
1675
- const parsedOutput = {
1676
- ...output,
1677
- body: await parseErrorBody(output.body, context),
1678
- };
1679
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1680
- switch (errorCode) {
1681
- case "DirectConnectClientException":
1682
- case "com.amazonaws.directconnect#DirectConnectClientException":
1683
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1684
- case "DirectConnectServerException":
1685
- case "com.amazonaws.directconnect#DirectConnectServerException":
1686
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1687
- default:
1688
- const parsedBody = parsedOutput.body;
1689
- return throwDefaultError({
1690
- output,
1691
- parsedBody,
1692
- errorCode,
1693
- });
1694
- }
1695
- };
1696
- const de_DescribeConnectionLoaCommand = async (output, context) => {
1697
- if (output.statusCode >= 300) {
1698
- return de_DescribeConnectionLoaCommandError(output, context);
1699
- }
1700
- const data = await parseBody(output.body, context);
1701
- let contents = {};
1702
- contents = de_DescribeConnectionLoaResponse(data, context);
1703
- const response = {
1704
- $metadata: deserializeMetadata(output),
1705
- ...contents,
1706
- };
1707
- return response;
1708
- };
1709
- exports.de_DescribeConnectionLoaCommand = de_DescribeConnectionLoaCommand;
1710
- const de_DescribeConnectionLoaCommandError = async (output, context) => {
1711
- const parsedOutput = {
1712
- ...output,
1713
- body: await parseErrorBody(output.body, context),
1714
- };
1715
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1716
- switch (errorCode) {
1717
- case "DirectConnectClientException":
1718
- case "com.amazonaws.directconnect#DirectConnectClientException":
1719
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1720
- case "DirectConnectServerException":
1721
- case "com.amazonaws.directconnect#DirectConnectServerException":
1722
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1723
- default:
1724
- const parsedBody = parsedOutput.body;
1725
- return throwDefaultError({
1726
- output,
1727
- parsedBody,
1728
- errorCode,
1729
- });
1730
- }
1731
- };
1732
- const de_DescribeConnectionsCommand = async (output, context) => {
1733
- if (output.statusCode >= 300) {
1734
- return de_DescribeConnectionsCommandError(output, context);
1735
- }
1736
- const data = await parseBody(output.body, context);
1737
- let contents = {};
1738
- contents = de_Connections(data, context);
1739
- const response = {
1740
- $metadata: deserializeMetadata(output),
1741
- ...contents,
1742
- };
1743
- return response;
1744
- };
1745
- exports.de_DescribeConnectionsCommand = de_DescribeConnectionsCommand;
1746
- const de_DescribeConnectionsCommandError = async (output, context) => {
1747
- const parsedOutput = {
1748
- ...output,
1749
- body: await parseErrorBody(output.body, context),
1750
- };
1751
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1752
- switch (errorCode) {
1753
- case "DirectConnectClientException":
1754
- case "com.amazonaws.directconnect#DirectConnectClientException":
1755
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1756
- case "DirectConnectServerException":
1757
- case "com.amazonaws.directconnect#DirectConnectServerException":
1758
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1759
- default:
1760
- const parsedBody = parsedOutput.body;
1761
- return throwDefaultError({
1762
- output,
1763
- parsedBody,
1764
- errorCode,
1765
- });
1766
- }
1767
- };
1768
- const de_DescribeConnectionsOnInterconnectCommand = async (output, context) => {
1769
- if (output.statusCode >= 300) {
1770
- return de_DescribeConnectionsOnInterconnectCommandError(output, context);
1771
- }
1772
- const data = await parseBody(output.body, context);
1773
- let contents = {};
1774
- contents = de_Connections(data, context);
1775
- const response = {
1776
- $metadata: deserializeMetadata(output),
1777
- ...contents,
1778
- };
1779
- return response;
1780
- };
1781
- exports.de_DescribeConnectionsOnInterconnectCommand = de_DescribeConnectionsOnInterconnectCommand;
1782
- const de_DescribeConnectionsOnInterconnectCommandError = async (output, context) => {
1783
- const parsedOutput = {
1784
- ...output,
1785
- body: await parseErrorBody(output.body, context),
1786
- };
1787
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1788
- switch (errorCode) {
1789
- case "DirectConnectClientException":
1790
- case "com.amazonaws.directconnect#DirectConnectClientException":
1791
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1792
- case "DirectConnectServerException":
1793
- case "com.amazonaws.directconnect#DirectConnectServerException":
1794
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1795
- default:
1796
- const parsedBody = parsedOutput.body;
1797
- return throwDefaultError({
1798
- output,
1799
- parsedBody,
1800
- errorCode,
1801
- });
1802
- }
1803
- };
1804
- const de_DescribeCustomerMetadataCommand = async (output, context) => {
1805
- if (output.statusCode >= 300) {
1806
- return de_DescribeCustomerMetadataCommandError(output, context);
1807
- }
1808
- const data = await parseBody(output.body, context);
1809
- let contents = {};
1810
- contents = (0, smithy_client_1._json)(data);
1811
- const response = {
1812
- $metadata: deserializeMetadata(output),
1813
- ...contents,
1814
- };
1815
- return response;
1816
- };
1817
- exports.de_DescribeCustomerMetadataCommand = de_DescribeCustomerMetadataCommand;
1818
- const de_DescribeCustomerMetadataCommandError = async (output, context) => {
1819
- const parsedOutput = {
1820
- ...output,
1821
- body: await parseErrorBody(output.body, context),
1822
- };
1823
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1824
- switch (errorCode) {
1825
- case "DirectConnectClientException":
1826
- case "com.amazonaws.directconnect#DirectConnectClientException":
1827
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1828
- case "DirectConnectServerException":
1829
- case "com.amazonaws.directconnect#DirectConnectServerException":
1830
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1831
- default:
1832
- const parsedBody = parsedOutput.body;
1833
- return throwDefaultError({
1834
- output,
1835
- parsedBody,
1836
- errorCode,
1837
- });
1838
- }
1839
- };
1840
- const de_DescribeDirectConnectGatewayAssociationProposalsCommand = async (output, context) => {
1841
- if (output.statusCode >= 300) {
1842
- return de_DescribeDirectConnectGatewayAssociationProposalsCommandError(output, context);
1843
- }
1844
- const data = await parseBody(output.body, context);
1845
- let contents = {};
1846
- contents = (0, smithy_client_1._json)(data);
1847
- const response = {
1848
- $metadata: deserializeMetadata(output),
1849
- ...contents,
1850
- };
1851
- return response;
1852
- };
1853
- exports.de_DescribeDirectConnectGatewayAssociationProposalsCommand = de_DescribeDirectConnectGatewayAssociationProposalsCommand;
1854
- const de_DescribeDirectConnectGatewayAssociationProposalsCommandError = async (output, context) => {
1855
- const parsedOutput = {
1856
- ...output,
1857
- body: await parseErrorBody(output.body, context),
1858
- };
1859
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1860
- switch (errorCode) {
1861
- case "DirectConnectClientException":
1862
- case "com.amazonaws.directconnect#DirectConnectClientException":
1863
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1864
- case "DirectConnectServerException":
1865
- case "com.amazonaws.directconnect#DirectConnectServerException":
1866
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1867
- default:
1868
- const parsedBody = parsedOutput.body;
1869
- return throwDefaultError({
1870
- output,
1871
- parsedBody,
1872
- errorCode,
1873
- });
1874
- }
1875
- };
1876
- const de_DescribeDirectConnectGatewayAssociationsCommand = async (output, context) => {
1877
- if (output.statusCode >= 300) {
1878
- return de_DescribeDirectConnectGatewayAssociationsCommandError(output, context);
1879
- }
1880
- const data = await parseBody(output.body, context);
1881
- let contents = {};
1882
- contents = (0, smithy_client_1._json)(data);
1883
- const response = {
1884
- $metadata: deserializeMetadata(output),
1885
- ...contents,
1886
- };
1887
- return response;
1888
- };
1889
- exports.de_DescribeDirectConnectGatewayAssociationsCommand = de_DescribeDirectConnectGatewayAssociationsCommand;
1890
- const de_DescribeDirectConnectGatewayAssociationsCommandError = async (output, context) => {
1891
- const parsedOutput = {
1892
- ...output,
1893
- body: await parseErrorBody(output.body, context),
1894
- };
1895
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1896
- switch (errorCode) {
1897
- case "DirectConnectClientException":
1898
- case "com.amazonaws.directconnect#DirectConnectClientException":
1899
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1900
- case "DirectConnectServerException":
1901
- case "com.amazonaws.directconnect#DirectConnectServerException":
1902
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1903
- default:
1904
- const parsedBody = parsedOutput.body;
1905
- return throwDefaultError({
1906
- output,
1907
- parsedBody,
1908
- errorCode,
1909
- });
1910
- }
1911
- };
1912
- const de_DescribeDirectConnectGatewayAttachmentsCommand = async (output, context) => {
1913
- if (output.statusCode >= 300) {
1914
- return de_DescribeDirectConnectGatewayAttachmentsCommandError(output, context);
1915
- }
1916
- const data = await parseBody(output.body, context);
1917
- let contents = {};
1918
- contents = (0, smithy_client_1._json)(data);
1919
- const response = {
1920
- $metadata: deserializeMetadata(output),
1921
- ...contents,
1922
- };
1923
- return response;
1924
- };
1925
- exports.de_DescribeDirectConnectGatewayAttachmentsCommand = de_DescribeDirectConnectGatewayAttachmentsCommand;
1926
- const de_DescribeDirectConnectGatewayAttachmentsCommandError = async (output, context) => {
1927
- const parsedOutput = {
1928
- ...output,
1929
- body: await parseErrorBody(output.body, context),
1930
- };
1931
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1932
- switch (errorCode) {
1933
- case "DirectConnectClientException":
1934
- case "com.amazonaws.directconnect#DirectConnectClientException":
1935
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1936
- case "DirectConnectServerException":
1937
- case "com.amazonaws.directconnect#DirectConnectServerException":
1938
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1939
- default:
1940
- const parsedBody = parsedOutput.body;
1941
- return throwDefaultError({
1942
- output,
1943
- parsedBody,
1944
- errorCode,
1945
- });
1946
- }
1947
- };
1948
- const de_DescribeDirectConnectGatewaysCommand = async (output, context) => {
1949
- if (output.statusCode >= 300) {
1950
- return de_DescribeDirectConnectGatewaysCommandError(output, context);
1951
- }
1952
- const data = await parseBody(output.body, context);
1953
- let contents = {};
1954
- contents = (0, smithy_client_1._json)(data);
1955
- const response = {
1956
- $metadata: deserializeMetadata(output),
1957
- ...contents,
1958
- };
1959
- return response;
1960
- };
1961
- exports.de_DescribeDirectConnectGatewaysCommand = de_DescribeDirectConnectGatewaysCommand;
1962
- const de_DescribeDirectConnectGatewaysCommandError = async (output, context) => {
1963
- const parsedOutput = {
1964
- ...output,
1965
- body: await parseErrorBody(output.body, context),
1966
- };
1967
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1968
- switch (errorCode) {
1969
- case "DirectConnectClientException":
1970
- case "com.amazonaws.directconnect#DirectConnectClientException":
1971
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
1972
- case "DirectConnectServerException":
1973
- case "com.amazonaws.directconnect#DirectConnectServerException":
1974
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
1975
- default:
1976
- const parsedBody = parsedOutput.body;
1977
- return throwDefaultError({
1978
- output,
1979
- parsedBody,
1980
- errorCode,
1981
- });
1982
- }
1983
- };
1984
- const de_DescribeHostedConnectionsCommand = async (output, context) => {
1985
- if (output.statusCode >= 300) {
1986
- return de_DescribeHostedConnectionsCommandError(output, context);
1987
- }
1988
- const data = await parseBody(output.body, context);
1989
- let contents = {};
1990
- contents = de_Connections(data, context);
1991
- const response = {
1992
- $metadata: deserializeMetadata(output),
1993
- ...contents,
1994
- };
1995
- return response;
1996
- };
1997
- exports.de_DescribeHostedConnectionsCommand = de_DescribeHostedConnectionsCommand;
1998
- const de_DescribeHostedConnectionsCommandError = async (output, context) => {
1999
- const parsedOutput = {
2000
- ...output,
2001
- body: await parseErrorBody(output.body, context),
2002
- };
2003
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2004
- switch (errorCode) {
2005
- case "DirectConnectClientException":
2006
- case "com.amazonaws.directconnect#DirectConnectClientException":
2007
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2008
- case "DirectConnectServerException":
2009
- case "com.amazonaws.directconnect#DirectConnectServerException":
2010
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2011
- default:
2012
- const parsedBody = parsedOutput.body;
2013
- return throwDefaultError({
2014
- output,
2015
- parsedBody,
2016
- errorCode,
2017
- });
2018
- }
2019
- };
2020
- const de_DescribeInterconnectLoaCommand = async (output, context) => {
2021
- if (output.statusCode >= 300) {
2022
- return de_DescribeInterconnectLoaCommandError(output, context);
2023
- }
2024
- const data = await parseBody(output.body, context);
2025
- let contents = {};
2026
- contents = de_DescribeInterconnectLoaResponse(data, context);
2027
- const response = {
2028
- $metadata: deserializeMetadata(output),
2029
- ...contents,
2030
- };
2031
- return response;
2032
- };
2033
- exports.de_DescribeInterconnectLoaCommand = de_DescribeInterconnectLoaCommand;
2034
- const de_DescribeInterconnectLoaCommandError = async (output, context) => {
2035
- const parsedOutput = {
2036
- ...output,
2037
- body: await parseErrorBody(output.body, context),
2038
- };
2039
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2040
- switch (errorCode) {
2041
- case "DirectConnectClientException":
2042
- case "com.amazonaws.directconnect#DirectConnectClientException":
2043
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2044
- case "DirectConnectServerException":
2045
- case "com.amazonaws.directconnect#DirectConnectServerException":
2046
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2047
- default:
2048
- const parsedBody = parsedOutput.body;
2049
- return throwDefaultError({
2050
- output,
2051
- parsedBody,
2052
- errorCode,
2053
- });
2054
- }
2055
- };
2056
- const de_DescribeInterconnectsCommand = async (output, context) => {
2057
- if (output.statusCode >= 300) {
2058
- return de_DescribeInterconnectsCommandError(output, context);
2059
- }
2060
- const data = await parseBody(output.body, context);
2061
- let contents = {};
2062
- contents = de_Interconnects(data, context);
2063
- const response = {
2064
- $metadata: deserializeMetadata(output),
2065
- ...contents,
2066
- };
2067
- return response;
2068
- };
2069
- exports.de_DescribeInterconnectsCommand = de_DescribeInterconnectsCommand;
2070
- const de_DescribeInterconnectsCommandError = async (output, context) => {
2071
- const parsedOutput = {
2072
- ...output,
2073
- body: await parseErrorBody(output.body, context),
2074
- };
2075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2076
- switch (errorCode) {
2077
- case "DirectConnectClientException":
2078
- case "com.amazonaws.directconnect#DirectConnectClientException":
2079
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2080
- case "DirectConnectServerException":
2081
- case "com.amazonaws.directconnect#DirectConnectServerException":
2082
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2083
- default:
2084
- const parsedBody = parsedOutput.body;
2085
- return throwDefaultError({
2086
- output,
2087
- parsedBody,
2088
- errorCode,
2089
- });
2090
- }
2091
- };
2092
- const de_DescribeLagsCommand = async (output, context) => {
2093
- if (output.statusCode >= 300) {
2094
- return de_DescribeLagsCommandError(output, context);
2095
- }
2096
- const data = await parseBody(output.body, context);
2097
- let contents = {};
2098
- contents = de_Lags(data, context);
2099
- const response = {
2100
- $metadata: deserializeMetadata(output),
2101
- ...contents,
2102
- };
2103
- return response;
2104
- };
2105
- exports.de_DescribeLagsCommand = de_DescribeLagsCommand;
2106
- const de_DescribeLagsCommandError = async (output, context) => {
2107
- const parsedOutput = {
2108
- ...output,
2109
- body: await parseErrorBody(output.body, context),
2110
- };
2111
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2112
- switch (errorCode) {
2113
- case "DirectConnectClientException":
2114
- case "com.amazonaws.directconnect#DirectConnectClientException":
2115
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2116
- case "DirectConnectServerException":
2117
- case "com.amazonaws.directconnect#DirectConnectServerException":
2118
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2119
- default:
2120
- const parsedBody = parsedOutput.body;
2121
- return throwDefaultError({
2122
- output,
2123
- parsedBody,
2124
- errorCode,
2125
- });
2126
- }
2127
- };
2128
- const de_DescribeLoaCommand = async (output, context) => {
2129
- if (output.statusCode >= 300) {
2130
- return de_DescribeLoaCommandError(output, context);
2131
- }
2132
- const data = await parseBody(output.body, context);
2133
- let contents = {};
2134
- contents = de_Loa(data, context);
2135
- const response = {
2136
- $metadata: deserializeMetadata(output),
2137
- ...contents,
2138
- };
2139
- return response;
2140
- };
2141
- exports.de_DescribeLoaCommand = de_DescribeLoaCommand;
2142
- const de_DescribeLoaCommandError = async (output, context) => {
2143
- const parsedOutput = {
2144
- ...output,
2145
- body: await parseErrorBody(output.body, context),
2146
- };
2147
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2148
- switch (errorCode) {
2149
- case "DirectConnectClientException":
2150
- case "com.amazonaws.directconnect#DirectConnectClientException":
2151
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2152
- case "DirectConnectServerException":
2153
- case "com.amazonaws.directconnect#DirectConnectServerException":
2154
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2155
- default:
2156
- const parsedBody = parsedOutput.body;
2157
- return throwDefaultError({
2158
- output,
2159
- parsedBody,
2160
- errorCode,
2161
- });
2162
- }
2163
- };
2164
- const de_DescribeLocationsCommand = async (output, context) => {
2165
- if (output.statusCode >= 300) {
2166
- return de_DescribeLocationsCommandError(output, context);
2167
- }
2168
- const data = await parseBody(output.body, context);
2169
- let contents = {};
2170
- contents = (0, smithy_client_1._json)(data);
2171
- const response = {
2172
- $metadata: deserializeMetadata(output),
2173
- ...contents,
2174
- };
2175
- return response;
2176
- };
2177
- exports.de_DescribeLocationsCommand = de_DescribeLocationsCommand;
2178
- const de_DescribeLocationsCommandError = async (output, context) => {
2179
- const parsedOutput = {
2180
- ...output,
2181
- body: await parseErrorBody(output.body, context),
2182
- };
2183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
- switch (errorCode) {
2185
- case "DirectConnectClientException":
2186
- case "com.amazonaws.directconnect#DirectConnectClientException":
2187
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2188
- case "DirectConnectServerException":
2189
- case "com.amazonaws.directconnect#DirectConnectServerException":
2190
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2191
- default:
2192
- const parsedBody = parsedOutput.body;
2193
- return throwDefaultError({
2194
- output,
2195
- parsedBody,
2196
- errorCode,
2197
- });
2198
- }
2199
- };
2200
- const de_DescribeRouterConfigurationCommand = async (output, context) => {
2201
- if (output.statusCode >= 300) {
2202
- return de_DescribeRouterConfigurationCommandError(output, context);
2203
- }
2204
- const data = await parseBody(output.body, context);
2205
- let contents = {};
2206
- contents = (0, smithy_client_1._json)(data);
2207
- const response = {
2208
- $metadata: deserializeMetadata(output),
2209
- ...contents,
2210
- };
2211
- return response;
2212
- };
2213
- exports.de_DescribeRouterConfigurationCommand = de_DescribeRouterConfigurationCommand;
2214
- const de_DescribeRouterConfigurationCommandError = async (output, context) => {
2215
- const parsedOutput = {
2216
- ...output,
2217
- body: await parseErrorBody(output.body, context),
2218
- };
2219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2220
- switch (errorCode) {
2221
- case "DirectConnectClientException":
2222
- case "com.amazonaws.directconnect#DirectConnectClientException":
2223
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2224
- case "DirectConnectServerException":
2225
- case "com.amazonaws.directconnect#DirectConnectServerException":
2226
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2227
- default:
2228
- const parsedBody = parsedOutput.body;
2229
- return throwDefaultError({
2230
- output,
2231
- parsedBody,
2232
- errorCode,
2233
- });
2234
- }
2235
- };
2236
- const de_DescribeTagsCommand = async (output, context) => {
2237
- if (output.statusCode >= 300) {
2238
- return de_DescribeTagsCommandError(output, context);
2239
- }
2240
- const data = await parseBody(output.body, context);
2241
- let contents = {};
2242
- contents = (0, smithy_client_1._json)(data);
2243
- const response = {
2244
- $metadata: deserializeMetadata(output),
2245
- ...contents,
2246
- };
2247
- return response;
2248
- };
2249
- exports.de_DescribeTagsCommand = de_DescribeTagsCommand;
2250
- const de_DescribeTagsCommandError = async (output, context) => {
2251
- const parsedOutput = {
2252
- ...output,
2253
- body: await parseErrorBody(output.body, context),
2254
- };
2255
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2256
- switch (errorCode) {
2257
- case "DirectConnectClientException":
2258
- case "com.amazonaws.directconnect#DirectConnectClientException":
2259
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2260
- case "DirectConnectServerException":
2261
- case "com.amazonaws.directconnect#DirectConnectServerException":
2262
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2263
- default:
2264
- const parsedBody = parsedOutput.body;
2265
- return throwDefaultError({
2266
- output,
2267
- parsedBody,
2268
- errorCode,
2269
- });
2270
- }
2271
- };
2272
- const de_DescribeVirtualGatewaysCommand = async (output, context) => {
2273
- if (output.statusCode >= 300) {
2274
- return de_DescribeVirtualGatewaysCommandError(output, context);
2275
- }
2276
- const data = await parseBody(output.body, context);
2277
- let contents = {};
2278
- contents = (0, smithy_client_1._json)(data);
2279
- const response = {
2280
- $metadata: deserializeMetadata(output),
2281
- ...contents,
2282
- };
2283
- return response;
2284
- };
2285
- exports.de_DescribeVirtualGatewaysCommand = de_DescribeVirtualGatewaysCommand;
2286
- const de_DescribeVirtualGatewaysCommandError = async (output, context) => {
2287
- const parsedOutput = {
2288
- ...output,
2289
- body: await parseErrorBody(output.body, context),
2290
- };
2291
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2292
- switch (errorCode) {
2293
- case "DirectConnectClientException":
2294
- case "com.amazonaws.directconnect#DirectConnectClientException":
2295
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2296
- case "DirectConnectServerException":
2297
- case "com.amazonaws.directconnect#DirectConnectServerException":
2298
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2299
- default:
2300
- const parsedBody = parsedOutput.body;
2301
- return throwDefaultError({
2302
- output,
2303
- parsedBody,
2304
- errorCode,
2305
- });
2306
- }
2307
- };
2308
- const de_DescribeVirtualInterfacesCommand = async (output, context) => {
2309
- if (output.statusCode >= 300) {
2310
- return de_DescribeVirtualInterfacesCommandError(output, context);
2311
- }
2312
- const data = await parseBody(output.body, context);
2313
- let contents = {};
2314
- contents = (0, smithy_client_1._json)(data);
2315
- const response = {
2316
- $metadata: deserializeMetadata(output),
2317
- ...contents,
2318
- };
2319
- return response;
2320
- };
2321
- exports.de_DescribeVirtualInterfacesCommand = de_DescribeVirtualInterfacesCommand;
2322
- const de_DescribeVirtualInterfacesCommandError = async (output, context) => {
2323
- const parsedOutput = {
2324
- ...output,
2325
- body: await parseErrorBody(output.body, context),
2326
- };
2327
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2328
- switch (errorCode) {
2329
- case "DirectConnectClientException":
2330
- case "com.amazonaws.directconnect#DirectConnectClientException":
2331
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2332
- case "DirectConnectServerException":
2333
- case "com.amazonaws.directconnect#DirectConnectServerException":
2334
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2335
- default:
2336
- const parsedBody = parsedOutput.body;
2337
- return throwDefaultError({
2338
- output,
2339
- parsedBody,
2340
- errorCode,
2341
- });
2342
- }
2343
- };
2344
- const de_DisassociateConnectionFromLagCommand = async (output, context) => {
2345
- if (output.statusCode >= 300) {
2346
- return de_DisassociateConnectionFromLagCommandError(output, context);
2347
- }
2348
- const data = await parseBody(output.body, context);
2349
- let contents = {};
2350
- contents = de_Connection(data, context);
2351
- const response = {
2352
- $metadata: deserializeMetadata(output),
2353
- ...contents,
2354
- };
2355
- return response;
2356
- };
2357
- exports.de_DisassociateConnectionFromLagCommand = de_DisassociateConnectionFromLagCommand;
2358
- const de_DisassociateConnectionFromLagCommandError = async (output, context) => {
2359
- const parsedOutput = {
2360
- ...output,
2361
- body: await parseErrorBody(output.body, context),
2362
- };
2363
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2364
- switch (errorCode) {
2365
- case "DirectConnectClientException":
2366
- case "com.amazonaws.directconnect#DirectConnectClientException":
2367
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2368
- case "DirectConnectServerException":
2369
- case "com.amazonaws.directconnect#DirectConnectServerException":
2370
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2371
- default:
2372
- const parsedBody = parsedOutput.body;
2373
- return throwDefaultError({
2374
- output,
2375
- parsedBody,
2376
- errorCode,
2377
- });
2378
- }
2379
- };
2380
- const de_DisassociateMacSecKeyCommand = async (output, context) => {
2381
- if (output.statusCode >= 300) {
2382
- return de_DisassociateMacSecKeyCommandError(output, context);
2383
- }
2384
- const data = await parseBody(output.body, context);
2385
- let contents = {};
2386
- contents = (0, smithy_client_1._json)(data);
2387
- const response = {
2388
- $metadata: deserializeMetadata(output),
2389
- ...contents,
2390
- };
2391
- return response;
2392
- };
2393
- exports.de_DisassociateMacSecKeyCommand = de_DisassociateMacSecKeyCommand;
2394
- const de_DisassociateMacSecKeyCommandError = async (output, context) => {
2395
- const parsedOutput = {
2396
- ...output,
2397
- body: await parseErrorBody(output.body, context),
2398
- };
2399
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2400
- switch (errorCode) {
2401
- case "DirectConnectClientException":
2402
- case "com.amazonaws.directconnect#DirectConnectClientException":
2403
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2404
- case "DirectConnectServerException":
2405
- case "com.amazonaws.directconnect#DirectConnectServerException":
2406
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2407
- default:
2408
- const parsedBody = parsedOutput.body;
2409
- return throwDefaultError({
2410
- output,
2411
- parsedBody,
2412
- errorCode,
2413
- });
2414
- }
2415
- };
2416
- const de_ListVirtualInterfaceTestHistoryCommand = async (output, context) => {
2417
- if (output.statusCode >= 300) {
2418
- return de_ListVirtualInterfaceTestHistoryCommandError(output, context);
2419
- }
2420
- const data = await parseBody(output.body, context);
2421
- let contents = {};
2422
- contents = de_ListVirtualInterfaceTestHistoryResponse(data, context);
2423
- const response = {
2424
- $metadata: deserializeMetadata(output),
2425
- ...contents,
2426
- };
2427
- return response;
2428
- };
2429
- exports.de_ListVirtualInterfaceTestHistoryCommand = de_ListVirtualInterfaceTestHistoryCommand;
2430
- const de_ListVirtualInterfaceTestHistoryCommandError = async (output, context) => {
2431
- const parsedOutput = {
2432
- ...output,
2433
- body: await parseErrorBody(output.body, context),
2434
- };
2435
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2436
- switch (errorCode) {
2437
- case "DirectConnectClientException":
2438
- case "com.amazonaws.directconnect#DirectConnectClientException":
2439
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2440
- case "DirectConnectServerException":
2441
- case "com.amazonaws.directconnect#DirectConnectServerException":
2442
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2443
- default:
2444
- const parsedBody = parsedOutput.body;
2445
- return throwDefaultError({
2446
- output,
2447
- parsedBody,
2448
- errorCode,
2449
- });
2450
- }
2451
- };
2452
- const de_StartBgpFailoverTestCommand = async (output, context) => {
2453
- if (output.statusCode >= 300) {
2454
- return de_StartBgpFailoverTestCommandError(output, context);
2455
- }
2456
- const data = await parseBody(output.body, context);
2457
- let contents = {};
2458
- contents = de_StartBgpFailoverTestResponse(data, context);
2459
- const response = {
2460
- $metadata: deserializeMetadata(output),
2461
- ...contents,
2462
- };
2463
- return response;
2464
- };
2465
- exports.de_StartBgpFailoverTestCommand = de_StartBgpFailoverTestCommand;
2466
- const de_StartBgpFailoverTestCommandError = async (output, context) => {
2467
- const parsedOutput = {
2468
- ...output,
2469
- body: await parseErrorBody(output.body, context),
2470
- };
2471
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2472
- switch (errorCode) {
2473
- case "DirectConnectClientException":
2474
- case "com.amazonaws.directconnect#DirectConnectClientException":
2475
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2476
- case "DirectConnectServerException":
2477
- case "com.amazonaws.directconnect#DirectConnectServerException":
2478
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2479
- default:
2480
- const parsedBody = parsedOutput.body;
2481
- return throwDefaultError({
2482
- output,
2483
- parsedBody,
2484
- errorCode,
2485
- });
2486
- }
2487
- };
2488
- const de_StopBgpFailoverTestCommand = async (output, context) => {
2489
- if (output.statusCode >= 300) {
2490
- return de_StopBgpFailoverTestCommandError(output, context);
2491
- }
2492
- const data = await parseBody(output.body, context);
2493
- let contents = {};
2494
- contents = de_StopBgpFailoverTestResponse(data, context);
2495
- const response = {
2496
- $metadata: deserializeMetadata(output),
2497
- ...contents,
2498
- };
2499
- return response;
2500
- };
2501
- exports.de_StopBgpFailoverTestCommand = de_StopBgpFailoverTestCommand;
2502
- const de_StopBgpFailoverTestCommandError = async (output, context) => {
2503
- const parsedOutput = {
2504
- ...output,
2505
- body: await parseErrorBody(output.body, context),
2506
- };
2507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2508
- switch (errorCode) {
2509
- case "DirectConnectClientException":
2510
- case "com.amazonaws.directconnect#DirectConnectClientException":
2511
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2512
- case "DirectConnectServerException":
2513
- case "com.amazonaws.directconnect#DirectConnectServerException":
2514
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2515
- default:
2516
- const parsedBody = parsedOutput.body;
2517
- return throwDefaultError({
2518
- output,
2519
- parsedBody,
2520
- errorCode,
2521
- });
2522
- }
2523
- };
2524
- const de_TagResourceCommand = async (output, context) => {
2525
- if (output.statusCode >= 300) {
2526
- return de_TagResourceCommandError(output, context);
2527
- }
2528
- const data = await parseBody(output.body, context);
2529
- let contents = {};
2530
- contents = (0, smithy_client_1._json)(data);
2531
- const response = {
2532
- $metadata: deserializeMetadata(output),
2533
- ...contents,
2534
- };
2535
- return response;
2536
- };
2537
- exports.de_TagResourceCommand = de_TagResourceCommand;
2538
- const de_TagResourceCommandError = async (output, context) => {
2539
- const parsedOutput = {
2540
- ...output,
2541
- body: await parseErrorBody(output.body, context),
2542
- };
2543
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2544
- switch (errorCode) {
2545
- case "DirectConnectClientException":
2546
- case "com.amazonaws.directconnect#DirectConnectClientException":
2547
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2548
- case "DirectConnectServerException":
2549
- case "com.amazonaws.directconnect#DirectConnectServerException":
2550
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2551
- case "DuplicateTagKeysException":
2552
- case "com.amazonaws.directconnect#DuplicateTagKeysException":
2553
- throw await de_DuplicateTagKeysExceptionRes(parsedOutput, context);
2554
- case "TooManyTagsException":
2555
- case "com.amazonaws.directconnect#TooManyTagsException":
2556
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2557
- default:
2558
- const parsedBody = parsedOutput.body;
2559
- return throwDefaultError({
2560
- output,
2561
- parsedBody,
2562
- errorCode,
2563
- });
2564
- }
2565
- };
2566
- const de_UntagResourceCommand = async (output, context) => {
2567
- if (output.statusCode >= 300) {
2568
- return de_UntagResourceCommandError(output, context);
2569
- }
2570
- const data = await parseBody(output.body, context);
2571
- let contents = {};
2572
- contents = (0, smithy_client_1._json)(data);
2573
- const response = {
2574
- $metadata: deserializeMetadata(output),
2575
- ...contents,
2576
- };
2577
- return response;
2578
- };
2579
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2580
- const de_UntagResourceCommandError = async (output, context) => {
2581
- const parsedOutput = {
2582
- ...output,
2583
- body: await parseErrorBody(output.body, context),
2584
- };
2585
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2586
- switch (errorCode) {
2587
- case "DirectConnectClientException":
2588
- case "com.amazonaws.directconnect#DirectConnectClientException":
2589
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2590
- case "DirectConnectServerException":
2591
- case "com.amazonaws.directconnect#DirectConnectServerException":
2592
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2593
- default:
2594
- const parsedBody = parsedOutput.body;
2595
- return throwDefaultError({
2596
- output,
2597
- parsedBody,
2598
- errorCode,
2599
- });
2600
- }
2601
- };
2602
- const de_UpdateConnectionCommand = async (output, context) => {
2603
- if (output.statusCode >= 300) {
2604
- return de_UpdateConnectionCommandError(output, context);
2605
- }
2606
- const data = await parseBody(output.body, context);
2607
- let contents = {};
2608
- contents = de_Connection(data, context);
2609
- const response = {
2610
- $metadata: deserializeMetadata(output),
2611
- ...contents,
2612
- };
2613
- return response;
2614
- };
2615
- exports.de_UpdateConnectionCommand = de_UpdateConnectionCommand;
2616
- const de_UpdateConnectionCommandError = async (output, context) => {
2617
- const parsedOutput = {
2618
- ...output,
2619
- body: await parseErrorBody(output.body, context),
2620
- };
2621
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2622
- switch (errorCode) {
2623
- case "DirectConnectClientException":
2624
- case "com.amazonaws.directconnect#DirectConnectClientException":
2625
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2626
- case "DirectConnectServerException":
2627
- case "com.amazonaws.directconnect#DirectConnectServerException":
2628
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2629
- default:
2630
- const parsedBody = parsedOutput.body;
2631
- return throwDefaultError({
2632
- output,
2633
- parsedBody,
2634
- errorCode,
2635
- });
2636
- }
2637
- };
2638
- const de_UpdateDirectConnectGatewayCommand = async (output, context) => {
2639
- if (output.statusCode >= 300) {
2640
- return de_UpdateDirectConnectGatewayCommandError(output, context);
2641
- }
2642
- const data = await parseBody(output.body, context);
2643
- let contents = {};
2644
- contents = (0, smithy_client_1._json)(data);
2645
- const response = {
2646
- $metadata: deserializeMetadata(output),
2647
- ...contents,
2648
- };
2649
- return response;
2650
- };
2651
- exports.de_UpdateDirectConnectGatewayCommand = de_UpdateDirectConnectGatewayCommand;
2652
- const de_UpdateDirectConnectGatewayCommandError = async (output, context) => {
2653
- const parsedOutput = {
2654
- ...output,
2655
- body: await parseErrorBody(output.body, context),
2656
- };
2657
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2658
- switch (errorCode) {
2659
- case "DirectConnectClientException":
2660
- case "com.amazonaws.directconnect#DirectConnectClientException":
2661
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2662
- case "DirectConnectServerException":
2663
- case "com.amazonaws.directconnect#DirectConnectServerException":
2664
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2665
- default:
2666
- const parsedBody = parsedOutput.body;
2667
- return throwDefaultError({
2668
- output,
2669
- parsedBody,
2670
- errorCode,
2671
- });
2672
- }
2673
- };
2674
- const de_UpdateDirectConnectGatewayAssociationCommand = async (output, context) => {
2675
- if (output.statusCode >= 300) {
2676
- return de_UpdateDirectConnectGatewayAssociationCommandError(output, context);
2677
- }
2678
- const data = await parseBody(output.body, context);
2679
- let contents = {};
2680
- contents = (0, smithy_client_1._json)(data);
2681
- const response = {
2682
- $metadata: deserializeMetadata(output),
2683
- ...contents,
2684
- };
2685
- return response;
2686
- };
2687
- exports.de_UpdateDirectConnectGatewayAssociationCommand = de_UpdateDirectConnectGatewayAssociationCommand;
2688
- const de_UpdateDirectConnectGatewayAssociationCommandError = async (output, context) => {
2689
- const parsedOutput = {
2690
- ...output,
2691
- body: await parseErrorBody(output.body, context),
2692
- };
2693
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2694
- switch (errorCode) {
2695
- case "DirectConnectClientException":
2696
- case "com.amazonaws.directconnect#DirectConnectClientException":
2697
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2698
- case "DirectConnectServerException":
2699
- case "com.amazonaws.directconnect#DirectConnectServerException":
2700
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2701
- default:
2702
- const parsedBody = parsedOutput.body;
2703
- return throwDefaultError({
2704
- output,
2705
- parsedBody,
2706
- errorCode,
2707
- });
2708
- }
2709
- };
2710
- const de_UpdateLagCommand = async (output, context) => {
2711
- if (output.statusCode >= 300) {
2712
- return de_UpdateLagCommandError(output, context);
2713
- }
2714
- const data = await parseBody(output.body, context);
2715
- let contents = {};
2716
- contents = de_Lag(data, context);
2717
- const response = {
2718
- $metadata: deserializeMetadata(output),
2719
- ...contents,
2720
- };
2721
- return response;
2722
- };
2723
- exports.de_UpdateLagCommand = de_UpdateLagCommand;
2724
- const de_UpdateLagCommandError = async (output, context) => {
2725
- const parsedOutput = {
2726
- ...output,
2727
- body: await parseErrorBody(output.body, context),
2728
- };
2729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2730
- switch (errorCode) {
2731
- case "DirectConnectClientException":
2732
- case "com.amazonaws.directconnect#DirectConnectClientException":
2733
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2734
- case "DirectConnectServerException":
2735
- case "com.amazonaws.directconnect#DirectConnectServerException":
2736
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2737
- default:
2738
- const parsedBody = parsedOutput.body;
2739
- return throwDefaultError({
2740
- output,
2741
- parsedBody,
2742
- errorCode,
2743
- });
2744
- }
2745
- };
2746
- const de_UpdateVirtualInterfaceAttributesCommand = async (output, context) => {
2747
- if (output.statusCode >= 300) {
2748
- return de_UpdateVirtualInterfaceAttributesCommandError(output, context);
2749
- }
2750
- const data = await parseBody(output.body, context);
2751
- let contents = {};
2752
- contents = (0, smithy_client_1._json)(data);
2753
- const response = {
2754
- $metadata: deserializeMetadata(output),
2755
- ...contents,
2756
- };
2757
- return response;
2758
- };
2759
- exports.de_UpdateVirtualInterfaceAttributesCommand = de_UpdateVirtualInterfaceAttributesCommand;
2760
- const de_UpdateVirtualInterfaceAttributesCommandError = async (output, context) => {
2761
- const parsedOutput = {
2762
- ...output,
2763
- body: await parseErrorBody(output.body, context),
2764
- };
2765
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2766
- switch (errorCode) {
2767
- case "DirectConnectClientException":
2768
- case "com.amazonaws.directconnect#DirectConnectClientException":
2769
- throw await de_DirectConnectClientExceptionRes(parsedOutput, context);
2770
- case "DirectConnectServerException":
2771
- case "com.amazonaws.directconnect#DirectConnectServerException":
2772
- throw await de_DirectConnectServerExceptionRes(parsedOutput, context);
2773
- default:
2774
- const parsedBody = parsedOutput.body;
2775
- return throwDefaultError({
2776
- output,
2777
- parsedBody,
2778
- errorCode,
2779
- });
2780
- }
2781
- };
2782
- const de_DirectConnectClientExceptionRes = async (parsedOutput, context) => {
2783
- const body = parsedOutput.body;
2784
- const deserialized = (0, smithy_client_1._json)(body);
2785
- const exception = new models_0_1.DirectConnectClientException({
2786
- $metadata: deserializeMetadata(parsedOutput),
2787
- ...deserialized,
2788
- });
2789
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2790
- };
2791
- const de_DirectConnectServerExceptionRes = async (parsedOutput, context) => {
2792
- const body = parsedOutput.body;
2793
- const deserialized = (0, smithy_client_1._json)(body);
2794
- const exception = new models_0_1.DirectConnectServerException({
2795
- $metadata: deserializeMetadata(parsedOutput),
2796
- ...deserialized,
2797
- });
2798
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2799
- };
2800
- const de_DuplicateTagKeysExceptionRes = async (parsedOutput, context) => {
2801
- const body = parsedOutput.body;
2802
- const deserialized = (0, smithy_client_1._json)(body);
2803
- const exception = new models_0_1.DuplicateTagKeysException({
2804
- $metadata: deserializeMetadata(parsedOutput),
2805
- ...deserialized,
2806
- });
2807
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2808
- };
2809
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2810
- const body = parsedOutput.body;
2811
- const deserialized = (0, smithy_client_1._json)(body);
2812
- const exception = new models_0_1.TooManyTagsException({
2813
- $metadata: deserializeMetadata(parsedOutput),
2814
- ...deserialized,
2815
- });
2816
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2817
- };
2818
- const de_Connection = (output, context) => {
2819
- return (0, smithy_client_1.take)(output, {
2820
- awsDevice: smithy_client_1.expectString,
2821
- awsDeviceV2: smithy_client_1.expectString,
2822
- awsLogicalDeviceId: smithy_client_1.expectString,
2823
- bandwidth: smithy_client_1.expectString,
2824
- connectionId: smithy_client_1.expectString,
2825
- connectionName: smithy_client_1.expectString,
2826
- connectionState: smithy_client_1.expectString,
2827
- encryptionMode: smithy_client_1.expectString,
2828
- hasLogicalRedundancy: smithy_client_1.expectString,
2829
- jumboFrameCapable: smithy_client_1.expectBoolean,
2830
- lagId: smithy_client_1.expectString,
2831
- loaIssueTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2832
- location: smithy_client_1.expectString,
2833
- macSecCapable: smithy_client_1.expectBoolean,
2834
- macSecKeys: smithy_client_1._json,
2835
- ownerAccount: smithy_client_1.expectString,
2836
- partnerName: smithy_client_1.expectString,
2837
- portEncryptionStatus: smithy_client_1.expectString,
2838
- providerName: smithy_client_1.expectString,
2839
- region: smithy_client_1.expectString,
2840
- tags: smithy_client_1._json,
2841
- vlan: smithy_client_1.expectInt32,
2842
- });
2843
- };
2844
- const de_ConnectionList = (output, context) => {
2845
- const retVal = (output || [])
2846
- .filter((e) => e != null)
2847
- .map((entry) => {
2848
- return de_Connection(entry, context);
2849
- });
2850
- return retVal;
2851
- };
2852
- const de_Connections = (output, context) => {
2853
- return (0, smithy_client_1.take)(output, {
2854
- connections: (_) => de_ConnectionList(_, context),
2855
- });
2856
- };
2857
- const de_DescribeConnectionLoaResponse = (output, context) => {
2858
- return (0, smithy_client_1.take)(output, {
2859
- loa: (_) => de_Loa(_, context),
2860
- });
2861
- };
2862
- const de_DescribeInterconnectLoaResponse = (output, context) => {
2863
- return (0, smithy_client_1.take)(output, {
2864
- loa: (_) => de_Loa(_, context),
2865
- });
2866
- };
2867
- const de_Interconnect = (output, context) => {
2868
- return (0, smithy_client_1.take)(output, {
2869
- awsDevice: smithy_client_1.expectString,
2870
- awsDeviceV2: smithy_client_1.expectString,
2871
- awsLogicalDeviceId: smithy_client_1.expectString,
2872
- bandwidth: smithy_client_1.expectString,
2873
- hasLogicalRedundancy: smithy_client_1.expectString,
2874
- interconnectId: smithy_client_1.expectString,
2875
- interconnectName: smithy_client_1.expectString,
2876
- interconnectState: smithy_client_1.expectString,
2877
- jumboFrameCapable: smithy_client_1.expectBoolean,
2878
- lagId: smithy_client_1.expectString,
2879
- loaIssueTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2880
- location: smithy_client_1.expectString,
2881
- providerName: smithy_client_1.expectString,
2882
- region: smithy_client_1.expectString,
2883
- tags: smithy_client_1._json,
2884
- });
2885
- };
2886
- const de_InterconnectList = (output, context) => {
2887
- const retVal = (output || [])
2888
- .filter((e) => e != null)
2889
- .map((entry) => {
2890
- return de_Interconnect(entry, context);
2891
- });
2892
- return retVal;
2893
- };
2894
- const de_Interconnects = (output, context) => {
2895
- return (0, smithy_client_1.take)(output, {
2896
- interconnects: (_) => de_InterconnectList(_, context),
2897
- });
2898
- };
2899
- const de_Lag = (output, context) => {
2900
- return (0, smithy_client_1.take)(output, {
2901
- allowsHostedConnections: smithy_client_1.expectBoolean,
2902
- awsDevice: smithy_client_1.expectString,
2903
- awsDeviceV2: smithy_client_1.expectString,
2904
- awsLogicalDeviceId: smithy_client_1.expectString,
2905
- connections: (_) => de_ConnectionList(_, context),
2906
- connectionsBandwidth: smithy_client_1.expectString,
2907
- encryptionMode: smithy_client_1.expectString,
2908
- hasLogicalRedundancy: smithy_client_1.expectString,
2909
- jumboFrameCapable: smithy_client_1.expectBoolean,
2910
- lagId: smithy_client_1.expectString,
2911
- lagName: smithy_client_1.expectString,
2912
- lagState: smithy_client_1.expectString,
2913
- location: smithy_client_1.expectString,
2914
- macSecCapable: smithy_client_1.expectBoolean,
2915
- macSecKeys: smithy_client_1._json,
2916
- minimumLinks: smithy_client_1.expectInt32,
2917
- numberOfConnections: smithy_client_1.expectInt32,
2918
- ownerAccount: smithy_client_1.expectString,
2919
- providerName: smithy_client_1.expectString,
2920
- region: smithy_client_1.expectString,
2921
- tags: smithy_client_1._json,
2922
- });
2923
- };
2924
- const de_LagList = (output, context) => {
2925
- const retVal = (output || [])
2926
- .filter((e) => e != null)
2927
- .map((entry) => {
2928
- return de_Lag(entry, context);
2929
- });
2930
- return retVal;
2931
- };
2932
- const de_Lags = (output, context) => {
2933
- return (0, smithy_client_1.take)(output, {
2934
- lags: (_) => de_LagList(_, context),
2935
- });
2936
- };
2937
- const de_ListVirtualInterfaceTestHistoryResponse = (output, context) => {
2938
- return (0, smithy_client_1.take)(output, {
2939
- nextToken: smithy_client_1.expectString,
2940
- virtualInterfaceTestHistory: (_) => de_VirtualInterfaceTestHistoryList(_, context),
2941
- });
2942
- };
2943
- const de_Loa = (output, context) => {
2944
- return (0, smithy_client_1.take)(output, {
2945
- loaContent: context.base64Decoder,
2946
- loaContentType: smithy_client_1.expectString,
2947
- });
2948
- };
2949
- const de_StartBgpFailoverTestResponse = (output, context) => {
2950
- return (0, smithy_client_1.take)(output, {
2951
- virtualInterfaceTest: (_) => de_VirtualInterfaceTestHistory(_, context),
2952
- });
2953
- };
2954
- const de_StopBgpFailoverTestResponse = (output, context) => {
2955
- return (0, smithy_client_1.take)(output, {
2956
- virtualInterfaceTest: (_) => de_VirtualInterfaceTestHistory(_, context),
2957
- });
2958
- };
2959
- const de_VirtualInterfaceTestHistory = (output, context) => {
2960
- return (0, smithy_client_1.take)(output, {
2961
- bgpPeers: smithy_client_1._json,
2962
- endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2963
- ownerAccount: smithy_client_1.expectString,
2964
- startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2965
- status: smithy_client_1.expectString,
2966
- testDurationInMinutes: smithy_client_1.expectInt32,
2967
- testId: smithy_client_1.expectString,
2968
- virtualInterfaceId: smithy_client_1.expectString,
2969
- });
2970
- };
2971
- const de_VirtualInterfaceTestHistoryList = (output, context) => {
2972
- const retVal = (output || [])
2973
- .filter((e) => e != null)
2974
- .map((entry) => {
2975
- return de_VirtualInterfaceTestHistory(entry, context);
2976
- });
2977
- return retVal;
2978
- };
2979
- const deserializeMetadata = (output) => ({
2980
- httpStatusCode: output.statusCode,
2981
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2982
- extendedRequestId: output.headers["x-amz-id-2"],
2983
- cfId: output.headers["x-amz-cf-id"],
2984
- });
2985
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2986
- const throwDefaultError = (0, smithy_client_1.withBaseException)(DirectConnectServiceException_1.DirectConnectServiceException);
2987
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2988
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2989
- const contents = {
2990
- protocol,
2991
- hostname,
2992
- port,
2993
- method: "POST",
2994
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2995
- headers,
2996
- };
2997
- if (resolvedHostname !== undefined) {
2998
- contents.hostname = resolvedHostname;
2999
- }
3000
- if (body !== undefined) {
3001
- contents.body = body;
3002
- }
3003
- return new protocol_http_1.HttpRequest(contents);
3004
- };
3005
- function sharedHeaders(operation) {
3006
- return {
3007
- "content-type": "application/x-amz-json-1.1",
3008
- "x-amz-target": `OvertureService.${operation}`,
3009
- };
3010
- }
3011
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
3012
- if (encoded.length) {
3013
- return JSON.parse(encoded);
3014
- }
3015
- return {};
3016
- });
3017
- const parseErrorBody = async (errorBody, context) => {
3018
- const value = await parseBody(errorBody, context);
3019
- value.message = value.message ?? value.Message;
3020
- return value;
3021
- };
3022
- const loadRestJsonErrorCode = (output, data) => {
3023
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3024
- const sanitizeErrorCode = (rawValue) => {
3025
- let cleanValue = rawValue;
3026
- if (typeof cleanValue === "number") {
3027
- cleanValue = cleanValue.toString();
3028
- }
3029
- if (cleanValue.indexOf(",") >= 0) {
3030
- cleanValue = cleanValue.split(",")[0];
3031
- }
3032
- if (cleanValue.indexOf(":") >= 0) {
3033
- cleanValue = cleanValue.split(":")[0];
3034
- }
3035
- if (cleanValue.indexOf("#") >= 0) {
3036
- cleanValue = cleanValue.split("#")[1];
3037
- }
3038
- return cleanValue;
3039
- };
3040
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3041
- if (headerKey !== undefined) {
3042
- return sanitizeErrorCode(output.headers[headerKey]);
3043
- }
3044
- if (data.code !== undefined) {
3045
- return sanitizeErrorCode(data.code);
3046
- }
3047
- if (data["__type"] !== undefined) {
3048
- return sanitizeErrorCode(data["__type"]);
3049
- }
3050
- };
1
+ module.exports = require("../index.js");