@aws-sdk/client-networkmanager 3.310.0 → 3.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,11 +35,11 @@ const se_AssociateConnectPeerCommand = async (input, context) => {
35
35
  "/global-networks/{GlobalNetworkId}/connect-peer-associations";
36
36
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
37
37
  let body;
38
- body = JSON.stringify({
39
- ...(input.ConnectPeerId != null && { ConnectPeerId: input.ConnectPeerId }),
40
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
41
- ...(input.LinkId != null && { LinkId: input.LinkId }),
42
- });
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ ConnectPeerId: [],
40
+ DeviceId: [],
41
+ LinkId: [],
42
+ }));
43
43
  return new protocol_http_1.HttpRequest({
44
44
  protocol,
45
45
  hostname,
@@ -60,11 +60,11 @@ const se_AssociateCustomerGatewayCommand = async (input, context) => {
60
60
  "/global-networks/{GlobalNetworkId}/customer-gateway-associations";
61
61
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
62
62
  let body;
63
- body = JSON.stringify({
64
- ...(input.CustomerGatewayArn != null && { CustomerGatewayArn: input.CustomerGatewayArn }),
65
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
66
- ...(input.LinkId != null && { LinkId: input.LinkId }),
67
- });
63
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
64
+ CustomerGatewayArn: [],
65
+ DeviceId: [],
66
+ LinkId: [],
67
+ }));
68
68
  return new protocol_http_1.HttpRequest({
69
69
  protocol,
70
70
  hostname,
@@ -85,10 +85,10 @@ const se_AssociateLinkCommand = async (input, context) => {
85
85
  "/global-networks/{GlobalNetworkId}/link-associations";
86
86
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
87
87
  let body;
88
- body = JSON.stringify({
89
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
90
- ...(input.LinkId != null && { LinkId: input.LinkId }),
91
- });
88
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
89
+ DeviceId: [],
90
+ LinkId: [],
91
+ }));
92
92
  return new protocol_http_1.HttpRequest({
93
93
  protocol,
94
94
  hostname,
@@ -109,13 +109,11 @@ const se_AssociateTransitGatewayConnectPeerCommand = async (input, context) => {
109
109
  "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations";
110
110
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
111
111
  let body;
112
- body = JSON.stringify({
113
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
114
- ...(input.LinkId != null && { LinkId: input.LinkId }),
115
- ...(input.TransitGatewayConnectPeerArn != null && {
116
- TransitGatewayConnectPeerArn: input.TransitGatewayConnectPeerArn,
117
- }),
118
- });
112
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
113
+ DeviceId: [],
114
+ LinkId: [],
115
+ TransitGatewayConnectPeerArn: [],
116
+ }));
119
117
  return new protocol_http_1.HttpRequest({
120
118
  protocol,
121
119
  hostname,
@@ -134,14 +132,14 @@ const se_CreateConnectAttachmentCommand = async (input, context) => {
134
132
  };
135
133
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connect-attachments";
136
134
  let body;
137
- body = JSON.stringify({
138
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
139
- ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
140
- ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }),
141
- ...(input.Options != null && { Options: se_ConnectAttachmentOptions(input.Options, context) }),
142
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
143
- ...(input.TransportAttachmentId != null && { TransportAttachmentId: input.TransportAttachmentId }),
144
- });
135
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
136
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
137
+ CoreNetworkId: [],
138
+ EdgeLocation: [],
139
+ Options: (_) => (0, smithy_client_1._json)(_),
140
+ Tags: (_) => (0, smithy_client_1._json)(_),
141
+ TransportAttachmentId: [],
142
+ }));
145
143
  return new protocol_http_1.HttpRequest({
146
144
  protocol,
147
145
  hostname,
@@ -162,14 +160,14 @@ const se_CreateConnectionCommand = async (input, context) => {
162
160
  "/global-networks/{GlobalNetworkId}/connections";
163
161
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
164
162
  let body;
165
- body = JSON.stringify({
166
- ...(input.ConnectedDeviceId != null && { ConnectedDeviceId: input.ConnectedDeviceId }),
167
- ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }),
168
- ...(input.Description != null && { Description: input.Description }),
169
- ...(input.DeviceId != null && { DeviceId: input.DeviceId }),
170
- ...(input.LinkId != null && { LinkId: input.LinkId }),
171
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
172
- });
163
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
164
+ ConnectedDeviceId: [],
165
+ ConnectedLinkId: [],
166
+ Description: [],
167
+ DeviceId: [],
168
+ LinkId: [],
169
+ Tags: (_) => (0, smithy_client_1._json)(_),
170
+ }));
173
171
  return new protocol_http_1.HttpRequest({
174
172
  protocol,
175
173
  hostname,
@@ -188,17 +186,15 @@ const se_CreateConnectPeerCommand = async (input, context) => {
188
186
  };
189
187
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connect-peers";
190
188
  let body;
191
- body = JSON.stringify({
192
- ...(input.BgpOptions != null && { BgpOptions: se_BgpOptions(input.BgpOptions, context) }),
193
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
194
- ...(input.ConnectAttachmentId != null && { ConnectAttachmentId: input.ConnectAttachmentId }),
195
- ...(input.CoreNetworkAddress != null && { CoreNetworkAddress: input.CoreNetworkAddress }),
196
- ...(input.InsideCidrBlocks != null && {
197
- InsideCidrBlocks: se_ConstrainedStringList(input.InsideCidrBlocks, context),
198
- }),
199
- ...(input.PeerAddress != null && { PeerAddress: input.PeerAddress }),
200
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
201
- });
189
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
190
+ BgpOptions: (_) => (0, smithy_client_1._json)(_),
191
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
192
+ ConnectAttachmentId: [],
193
+ CoreNetworkAddress: [],
194
+ InsideCidrBlocks: (_) => (0, smithy_client_1._json)(_),
195
+ PeerAddress: [],
196
+ Tags: (_) => (0, smithy_client_1._json)(_),
197
+ }));
202
198
  return new protocol_http_1.HttpRequest({
203
199
  protocol,
204
200
  hostname,
@@ -217,13 +213,13 @@ const se_CreateCoreNetworkCommand = async (input, context) => {
217
213
  };
218
214
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/core-networks";
219
215
  let body;
220
- body = JSON.stringify({
221
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
222
- ...(input.Description != null && { Description: input.Description }),
223
- ...(input.GlobalNetworkId != null && { GlobalNetworkId: input.GlobalNetworkId }),
224
- ...(input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument }),
225
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
226
- });
216
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
217
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
218
+ Description: [],
219
+ GlobalNetworkId: [],
220
+ PolicyDocument: [],
221
+ Tags: (_) => (0, smithy_client_1._json)(_),
222
+ }));
227
223
  return new protocol_http_1.HttpRequest({
228
224
  protocol,
229
225
  hostname,
@@ -244,17 +240,17 @@ const se_CreateDeviceCommand = async (input, context) => {
244
240
  "/global-networks/{GlobalNetworkId}/devices";
245
241
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
246
242
  let body;
247
- body = JSON.stringify({
248
- ...(input.AWSLocation != null && { AWSLocation: se_AWSLocation(input.AWSLocation, context) }),
249
- ...(input.Description != null && { Description: input.Description }),
250
- ...(input.Location != null && { Location: se_Location(input.Location, context) }),
251
- ...(input.Model != null && { Model: input.Model }),
252
- ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
253
- ...(input.SiteId != null && { SiteId: input.SiteId }),
254
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
255
- ...(input.Type != null && { Type: input.Type }),
256
- ...(input.Vendor != null && { Vendor: input.Vendor }),
257
- });
243
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
244
+ AWSLocation: (_) => (0, smithy_client_1._json)(_),
245
+ Description: [],
246
+ Location: (_) => (0, smithy_client_1._json)(_),
247
+ Model: [],
248
+ SerialNumber: [],
249
+ SiteId: [],
250
+ Tags: (_) => (0, smithy_client_1._json)(_),
251
+ Type: [],
252
+ Vendor: [],
253
+ }));
258
254
  return new protocol_http_1.HttpRequest({
259
255
  protocol,
260
256
  hostname,
@@ -273,10 +269,10 @@ const se_CreateGlobalNetworkCommand = async (input, context) => {
273
269
  };
274
270
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks";
275
271
  let body;
276
- body = JSON.stringify({
277
- ...(input.Description != null && { Description: input.Description }),
278
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
279
- });
272
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
273
+ Description: [],
274
+ Tags: (_) => (0, smithy_client_1._json)(_),
275
+ }));
280
276
  return new protocol_http_1.HttpRequest({
281
277
  protocol,
282
278
  hostname,
@@ -296,14 +292,14 @@ const se_CreateLinkCommand = async (input, context) => {
296
292
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks/{GlobalNetworkId}/links";
297
293
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
298
294
  let body;
299
- body = JSON.stringify({
300
- ...(input.Bandwidth != null && { Bandwidth: se_Bandwidth(input.Bandwidth, context) }),
301
- ...(input.Description != null && { Description: input.Description }),
302
- ...(input.Provider != null && { Provider: input.Provider }),
303
- ...(input.SiteId != null && { SiteId: input.SiteId }),
304
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
305
- ...(input.Type != null && { Type: input.Type }),
306
- });
295
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
296
+ Bandwidth: (_) => (0, smithy_client_1._json)(_),
297
+ Description: [],
298
+ Provider: [],
299
+ SiteId: [],
300
+ Tags: (_) => (0, smithy_client_1._json)(_),
301
+ Type: [],
302
+ }));
307
303
  return new protocol_http_1.HttpRequest({
308
304
  protocol,
309
305
  hostname,
@@ -323,11 +319,11 @@ const se_CreateSiteCommand = async (input, context) => {
323
319
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks/{GlobalNetworkId}/sites";
324
320
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
325
321
  let body;
326
- body = JSON.stringify({
327
- ...(input.Description != null && { Description: input.Description }),
328
- ...(input.Location != null && { Location: se_Location(input.Location, context) }),
329
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
330
- });
322
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
323
+ Description: [],
324
+ Location: (_) => (0, smithy_client_1._json)(_),
325
+ Tags: (_) => (0, smithy_client_1._json)(_),
326
+ }));
331
327
  return new protocol_http_1.HttpRequest({
332
328
  protocol,
333
329
  hostname,
@@ -346,12 +342,12 @@ const se_CreateSiteToSiteVpnAttachmentCommand = async (input, context) => {
346
342
  };
347
343
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/site-to-site-vpn-attachments";
348
344
  let body;
349
- body = JSON.stringify({
350
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
351
- ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
352
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
353
- ...(input.VpnConnectionArn != null && { VpnConnectionArn: input.VpnConnectionArn }),
354
- });
345
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
346
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
347
+ CoreNetworkId: [],
348
+ Tags: (_) => (0, smithy_client_1._json)(_),
349
+ VpnConnectionArn: [],
350
+ }));
355
351
  return new protocol_http_1.HttpRequest({
356
352
  protocol,
357
353
  hostname,
@@ -370,12 +366,12 @@ const se_CreateTransitGatewayPeeringCommand = async (input, context) => {
370
366
  };
371
367
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-peerings";
372
368
  let body;
373
- body = JSON.stringify({
374
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
375
- ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
376
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
377
- ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }),
378
- });
369
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
370
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
371
+ CoreNetworkId: [],
372
+ Tags: (_) => (0, smithy_client_1._json)(_),
373
+ TransitGatewayArn: [],
374
+ }));
379
375
  return new protocol_http_1.HttpRequest({
380
376
  protocol,
381
377
  hostname,
@@ -394,14 +390,12 @@ const se_CreateTransitGatewayRouteTableAttachmentCommand = async (input, context
394
390
  };
395
391
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/transit-gateway-route-table-attachments";
396
392
  let body;
397
- body = JSON.stringify({
398
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
399
- ...(input.PeeringId != null && { PeeringId: input.PeeringId }),
400
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
401
- ...(input.TransitGatewayRouteTableArn != null && {
402
- TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
403
- }),
404
- });
393
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
394
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
395
+ PeeringId: [],
396
+ Tags: (_) => (0, smithy_client_1._json)(_),
397
+ TransitGatewayRouteTableArn: [],
398
+ }));
405
399
  return new protocol_http_1.HttpRequest({
406
400
  protocol,
407
401
  hostname,
@@ -420,14 +414,14 @@ const se_CreateVpcAttachmentCommand = async (input, context) => {
420
414
  };
421
415
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpc-attachments";
422
416
  let body;
423
- body = JSON.stringify({
424
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
425
- ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
426
- ...(input.Options != null && { Options: se_VpcOptions(input.Options, context) }),
427
- ...(input.SubnetArns != null && { SubnetArns: se_SubnetArnList(input.SubnetArns, context) }),
428
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
429
- ...(input.VpcArn != null && { VpcArn: input.VpcArn }),
430
- });
417
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
418
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
419
+ CoreNetworkId: [],
420
+ Options: (_) => (0, smithy_client_1._json)(_),
421
+ SubnetArns: (_) => (0, smithy_client_1._json)(_),
422
+ Tags: (_) => (0, smithy_client_1._json)(_),
423
+ VpcArn: [],
424
+ }));
431
425
  return new protocol_http_1.HttpRequest({
432
426
  protocol,
433
427
  hostname,
@@ -659,7 +653,7 @@ const se_DescribeGlobalNetworksCommand = async (input, context) => {
659
653
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
660
654
  const headers = {};
661
655
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks";
662
- const query = map({
656
+ const query = (0, smithy_client_1.map)({
663
657
  globalNetworkIds: [
664
658
  () => input.GlobalNetworkIds !== void 0,
665
659
  () => (input.GlobalNetworkIds || []).map((_entry) => _entry),
@@ -724,7 +718,7 @@ const se_DisassociateLinkCommand = async (input, context) => {
724
718
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
725
719
  "/global-networks/{GlobalNetworkId}/link-associations";
726
720
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
727
- const query = map({
721
+ const query = (0, smithy_client_1.map)({
728
722
  deviceId: [, (0, smithy_client_1.expectNonNull)(input.DeviceId, `DeviceId`)],
729
723
  linkId: [, (0, smithy_client_1.expectNonNull)(input.LinkId, `LinkId`)],
730
724
  });
@@ -802,7 +796,7 @@ const se_GetConnectionsCommand = async (input, context) => {
802
796
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
803
797
  "/global-networks/{GlobalNetworkId}/connections";
804
798
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
805
- const query = map({
799
+ const query = (0, smithy_client_1.map)({
806
800
  connectionIds: [
807
801
  () => input.ConnectionIds !== void 0,
808
802
  () => (input.ConnectionIds || []).map((_entry) => _entry),
@@ -847,7 +841,7 @@ const se_GetConnectPeerAssociationsCommand = async (input, context) => {
847
841
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
848
842
  "/global-networks/{GlobalNetworkId}/connect-peer-associations";
849
843
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
850
- const query = map({
844
+ const query = (0, smithy_client_1.map)({
851
845
  connectPeerIds: [
852
846
  () => input.ConnectPeerIds !== void 0,
853
847
  () => (input.ConnectPeerIds || []).map((_entry) => _entry),
@@ -892,7 +886,7 @@ const se_GetCoreNetworkChangeEventsCommand = async (input, context) => {
892
886
  "/core-networks/{CoreNetworkId}/core-network-change-events/{PolicyVersionId}";
893
887
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
894
888
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyVersionId", () => input.PolicyVersionId.toString(), "{PolicyVersionId}", false);
895
- const query = map({
889
+ const query = (0, smithy_client_1.map)({
896
890
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
897
891
  nextToken: [, input.NextToken],
898
892
  });
@@ -916,7 +910,7 @@ const se_GetCoreNetworkChangeSetCommand = async (input, context) => {
916
910
  "/core-networks/{CoreNetworkId}/core-network-change-sets/{PolicyVersionId}";
917
911
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
918
912
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "PolicyVersionId", () => input.PolicyVersionId.toString(), "{PolicyVersionId}", false);
919
- const query = map({
913
+ const query = (0, smithy_client_1.map)({
920
914
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
921
915
  nextToken: [, input.NextToken],
922
916
  });
@@ -939,7 +933,7 @@ const se_GetCoreNetworkPolicyCommand = async (input, context) => {
939
933
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
940
934
  "/core-networks/{CoreNetworkId}/core-network-policy";
941
935
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
942
- const query = map({
936
+ const query = (0, smithy_client_1.map)({
943
937
  policyVersionId: [() => input.PolicyVersionId !== void 0, () => input.PolicyVersionId.toString()],
944
938
  alias: [, input.Alias],
945
939
  });
@@ -962,7 +956,7 @@ const se_GetCustomerGatewayAssociationsCommand = async (input, context) => {
962
956
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
963
957
  "/global-networks/{GlobalNetworkId}/customer-gateway-associations";
964
958
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
965
- const query = map({
959
+ const query = (0, smithy_client_1.map)({
966
960
  customerGatewayArns: [
967
961
  () => input.CustomerGatewayArns !== void 0,
968
962
  () => (input.CustomerGatewayArns || []).map((_entry) => _entry),
@@ -989,7 +983,7 @@ const se_GetDevicesCommand = async (input, context) => {
989
983
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
990
984
  "/global-networks/{GlobalNetworkId}/devices";
991
985
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
992
- const query = map({
986
+ const query = (0, smithy_client_1.map)({
993
987
  deviceIds: [() => input.DeviceIds !== void 0, () => (input.DeviceIds || []).map((_entry) => _entry)],
994
988
  siteId: [, input.SiteId],
995
989
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -1014,7 +1008,7 @@ const se_GetLinkAssociationsCommand = async (input, context) => {
1014
1008
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1015
1009
  "/global-networks/{GlobalNetworkId}/link-associations";
1016
1010
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1017
- const query = map({
1011
+ const query = (0, smithy_client_1.map)({
1018
1012
  deviceId: [, input.DeviceId],
1019
1013
  linkId: [, input.LinkId],
1020
1014
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -1038,7 +1032,7 @@ const se_GetLinksCommand = async (input, context) => {
1038
1032
  const headers = {};
1039
1033
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks/{GlobalNetworkId}/links";
1040
1034
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1041
- const query = map({
1035
+ const query = (0, smithy_client_1.map)({
1042
1036
  linkIds: [() => input.LinkIds !== void 0, () => (input.LinkIds || []).map((_entry) => _entry)],
1043
1037
  siteId: [, input.SiteId],
1044
1038
  type: [, input.Type],
@@ -1065,7 +1059,7 @@ const se_GetNetworkResourceCountsCommand = async (input, context) => {
1065
1059
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1066
1060
  "/global-networks/{GlobalNetworkId}/network-resource-count";
1067
1061
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1068
- const query = map({
1062
+ const query = (0, smithy_client_1.map)({
1069
1063
  resourceType: [, input.ResourceType],
1070
1064
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1071
1065
  nextToken: [, input.NextToken],
@@ -1089,7 +1083,7 @@ const se_GetNetworkResourceRelationshipsCommand = async (input, context) => {
1089
1083
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1090
1084
  "/global-networks/{GlobalNetworkId}/network-resource-relationships";
1091
1085
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1092
- const query = map({
1086
+ const query = (0, smithy_client_1.map)({
1093
1087
  coreNetworkId: [, input.CoreNetworkId],
1094
1088
  registeredGatewayArn: [, input.RegisteredGatewayArn],
1095
1089
  awsRegion: [, input.AwsRegion],
@@ -1118,7 +1112,7 @@ const se_GetNetworkResourcesCommand = async (input, context) => {
1118
1112
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1119
1113
  "/global-networks/{GlobalNetworkId}/network-resources";
1120
1114
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1121
- const query = map({
1115
+ const query = (0, smithy_client_1.map)({
1122
1116
  coreNetworkId: [, input.CoreNetworkId],
1123
1117
  registeredGatewayArn: [, input.RegisteredGatewayArn],
1124
1118
  awsRegion: [, input.AwsRegion],
@@ -1150,25 +1144,17 @@ const se_GetNetworkRoutesCommand = async (input, context) => {
1150
1144
  "/global-networks/{GlobalNetworkId}/network-routes";
1151
1145
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1152
1146
  let body;
1153
- body = JSON.stringify({
1154
- ...(input.DestinationFilters != null && { DestinationFilters: se_FilterMap(input.DestinationFilters, context) }),
1155
- ...(input.ExactCidrMatches != null && {
1156
- ExactCidrMatches: se_ConstrainedStringList(input.ExactCidrMatches, context),
1157
- }),
1158
- ...(input.LongestPrefixMatches != null && {
1159
- LongestPrefixMatches: se_ConstrainedStringList(input.LongestPrefixMatches, context),
1160
- }),
1161
- ...(input.PrefixListIds != null && { PrefixListIds: se_ConstrainedStringList(input.PrefixListIds, context) }),
1162
- ...(input.RouteTableIdentifier != null && {
1163
- RouteTableIdentifier: se_RouteTableIdentifier(input.RouteTableIdentifier, context),
1164
- }),
1165
- ...(input.States != null && { States: se_RouteStateList(input.States, context) }),
1166
- ...(input.SubnetOfMatches != null && { SubnetOfMatches: se_ConstrainedStringList(input.SubnetOfMatches, context) }),
1167
- ...(input.SupernetOfMatches != null && {
1168
- SupernetOfMatches: se_ConstrainedStringList(input.SupernetOfMatches, context),
1169
- }),
1170
- ...(input.Types != null && { Types: se_RouteTypeList(input.Types, context) }),
1171
- });
1147
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1148
+ DestinationFilters: (_) => (0, smithy_client_1._json)(_),
1149
+ ExactCidrMatches: (_) => (0, smithy_client_1._json)(_),
1150
+ LongestPrefixMatches: (_) => (0, smithy_client_1._json)(_),
1151
+ PrefixListIds: (_) => (0, smithy_client_1._json)(_),
1152
+ RouteTableIdentifier: (_) => (0, smithy_client_1._json)(_),
1153
+ States: (_) => (0, smithy_client_1._json)(_),
1154
+ SubnetOfMatches: (_) => (0, smithy_client_1._json)(_),
1155
+ SupernetOfMatches: (_) => (0, smithy_client_1._json)(_),
1156
+ Types: (_) => (0, smithy_client_1._json)(_),
1157
+ }));
1172
1158
  return new protocol_http_1.HttpRequest({
1173
1159
  protocol,
1174
1160
  hostname,
@@ -1186,7 +1172,7 @@ const se_GetNetworkTelemetryCommand = async (input, context) => {
1186
1172
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1187
1173
  "/global-networks/{GlobalNetworkId}/network-telemetry";
1188
1174
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1189
- const query = map({
1175
+ const query = (0, smithy_client_1.map)({
1190
1176
  coreNetworkId: [, input.CoreNetworkId],
1191
1177
  registeredGatewayArn: [, input.RegisteredGatewayArn],
1192
1178
  awsRegion: [, input.AwsRegion],
@@ -1250,7 +1236,7 @@ const se_GetSitesCommand = async (input, context) => {
1250
1236
  const headers = {};
1251
1237
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks/{GlobalNetworkId}/sites";
1252
1238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1253
- const query = map({
1239
+ const query = (0, smithy_client_1.map)({
1254
1240
  siteIds: [() => input.SiteIds !== void 0, () => (input.SiteIds || []).map((_entry) => _entry)],
1255
1241
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1256
1242
  nextToken: [, input.NextToken],
@@ -1292,7 +1278,7 @@ const se_GetTransitGatewayConnectPeerAssociationsCommand = async (input, context
1292
1278
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1293
1279
  "/global-networks/{GlobalNetworkId}/transit-gateway-connect-peer-associations";
1294
1280
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1295
- const query = map({
1281
+ const query = (0, smithy_client_1.map)({
1296
1282
  transitGatewayConnectPeerArns: [
1297
1283
  () => input.TransitGatewayConnectPeerArns !== void 0,
1298
1284
  () => (input.TransitGatewayConnectPeerArns || []).map((_entry) => _entry),
@@ -1336,7 +1322,7 @@ const se_GetTransitGatewayRegistrationsCommand = async (input, context) => {
1336
1322
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1337
1323
  "/global-networks/{GlobalNetworkId}/transit-gateway-registrations";
1338
1324
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1339
- const query = map({
1325
+ const query = (0, smithy_client_1.map)({
1340
1326
  transitGatewayArns: [
1341
1327
  () => input.TransitGatewayArns !== void 0,
1342
1328
  () => (input.TransitGatewayArns || []).map((_entry) => _entry),
@@ -1396,7 +1382,7 @@ const se_ListAttachmentsCommand = async (input, context) => {
1396
1382
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1397
1383
  const headers = {};
1398
1384
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/attachments";
1399
- const query = map({
1385
+ const query = (0, smithy_client_1.map)({
1400
1386
  coreNetworkId: [, input.CoreNetworkId],
1401
1387
  attachmentType: [, input.AttachmentType],
1402
1388
  edgeLocation: [, input.EdgeLocation],
@@ -1421,7 +1407,7 @@ const se_ListConnectPeersCommand = async (input, context) => {
1421
1407
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1422
1408
  const headers = {};
1423
1409
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/connect-peers";
1424
- const query = map({
1410
+ const query = (0, smithy_client_1.map)({
1425
1411
  coreNetworkId: [, input.CoreNetworkId],
1426
1412
  connectAttachmentId: [, input.ConnectAttachmentId],
1427
1413
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -1446,7 +1432,7 @@ const se_ListCoreNetworkPolicyVersionsCommand = async (input, context) => {
1446
1432
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1447
1433
  "/core-networks/{CoreNetworkId}/core-network-policy-versions";
1448
1434
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
1449
- const query = map({
1435
+ const query = (0, smithy_client_1.map)({
1450
1436
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1451
1437
  nextToken: [, input.NextToken],
1452
1438
  });
@@ -1467,7 +1453,7 @@ const se_ListCoreNetworksCommand = async (input, context) => {
1467
1453
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1468
1454
  const headers = {};
1469
1455
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/core-networks";
1470
- const query = map({
1456
+ const query = (0, smithy_client_1.map)({
1471
1457
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1472
1458
  nextToken: [, input.NextToken],
1473
1459
  });
@@ -1488,7 +1474,7 @@ const se_ListOrganizationServiceAccessStatusCommand = async (input, context) =>
1488
1474
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1489
1475
  const headers = {};
1490
1476
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizations/service-access";
1491
- const query = map({
1477
+ const query = (0, smithy_client_1.map)({
1492
1478
  maxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
1493
1479
  nextToken: [, input.NextToken],
1494
1480
  });
@@ -1509,7 +1495,7 @@ const se_ListPeeringsCommand = async (input, context) => {
1509
1495
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1510
1496
  const headers = {};
1511
1497
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/peerings";
1512
- const query = map({
1498
+ const query = (0, smithy_client_1.map)({
1513
1499
  coreNetworkId: [, input.CoreNetworkId],
1514
1500
  peeringType: [, input.PeeringType],
1515
1501
  edgeLocation: [, input.EdgeLocation],
@@ -1556,12 +1542,12 @@ const se_PutCoreNetworkPolicyCommand = async (input, context) => {
1556
1542
  "/core-networks/{CoreNetworkId}/core-network-policy";
1557
1543
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
1558
1544
  let body;
1559
- body = JSON.stringify({
1560
- ClientToken: input.ClientToken ?? (0, uuid_1.v4)(),
1561
- ...(input.Description != null && { Description: input.Description }),
1562
- ...(input.LatestVersionId != null && { LatestVersionId: input.LatestVersionId }),
1563
- ...(input.PolicyDocument != null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
1564
- });
1545
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1546
+ ClientToken: (_) => _ ?? (0, uuid_1.v4)(),
1547
+ Description: [],
1548
+ LatestVersionId: [],
1549
+ PolicyDocument: (_) => smithy_client_1.LazyJsonString.fromObject(_),
1550
+ }));
1565
1551
  return new protocol_http_1.HttpRequest({
1566
1552
  protocol,
1567
1553
  hostname,
@@ -1581,9 +1567,9 @@ const se_PutResourcePolicyCommand = async (input, context) => {
1581
1567
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/resource-policy/{ResourceArn}";
1582
1568
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1583
1569
  let body;
1584
- body = JSON.stringify({
1585
- ...(input.PolicyDocument != null && { PolicyDocument: smithy_client_1.LazyJsonString.fromObject(input.PolicyDocument) }),
1586
- });
1570
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1571
+ PolicyDocument: (_) => smithy_client_1.LazyJsonString.fromObject(_),
1572
+ }));
1587
1573
  return new protocol_http_1.HttpRequest({
1588
1574
  protocol,
1589
1575
  hostname,
@@ -1604,9 +1590,9 @@ const se_RegisterTransitGatewayCommand = async (input, context) => {
1604
1590
  "/global-networks/{GlobalNetworkId}/transit-gateway-registrations";
1605
1591
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1606
1592
  let body;
1607
- body = JSON.stringify({
1608
- ...(input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn }),
1609
- });
1593
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1594
+ TransitGatewayArn: [],
1595
+ }));
1610
1596
  return new protocol_http_1.HttpRequest({
1611
1597
  protocol,
1612
1598
  hostname,
@@ -1661,9 +1647,9 @@ const se_StartOrganizationServiceAccessUpdateCommand = async (input, context) =>
1661
1647
  };
1662
1648
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/organizations/service-access";
1663
1649
  let body;
1664
- body = JSON.stringify({
1665
- ...(input.Action != null && { Action: input.Action }),
1666
- });
1650
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1651
+ Action: [],
1652
+ }));
1667
1653
  return new protocol_http_1.HttpRequest({
1668
1654
  protocol,
1669
1655
  hostname,
@@ -1684,14 +1670,12 @@ const se_StartRouteAnalysisCommand = async (input, context) => {
1684
1670
  "/global-networks/{GlobalNetworkId}/route-analyses";
1685
1671
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1686
1672
  let body;
1687
- body = JSON.stringify({
1688
- ...(input.Destination != null && {
1689
- Destination: se_RouteAnalysisEndpointOptionsSpecification(input.Destination, context),
1690
- }),
1691
- ...(input.IncludeReturnPath != null && { IncludeReturnPath: input.IncludeReturnPath }),
1692
- ...(input.Source != null && { Source: se_RouteAnalysisEndpointOptionsSpecification(input.Source, context) }),
1693
- ...(input.UseMiddleboxes != null && { UseMiddleboxes: input.UseMiddleboxes }),
1694
- });
1673
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1674
+ Destination: (_) => (0, smithy_client_1._json)(_),
1675
+ IncludeReturnPath: [],
1676
+ Source: (_) => (0, smithy_client_1._json)(_),
1677
+ UseMiddleboxes: [],
1678
+ }));
1695
1679
  return new protocol_http_1.HttpRequest({
1696
1680
  protocol,
1697
1681
  hostname,
@@ -1711,9 +1695,9 @@ const se_TagResourceCommand = async (input, context) => {
1711
1695
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
1712
1696
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1713
1697
  let body;
1714
- body = JSON.stringify({
1715
- ...(input.Tags != null && { Tags: se_TagList(input.Tags, context) }),
1716
- });
1698
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1699
+ Tags: (_) => (0, smithy_client_1._json)(_),
1700
+ }));
1717
1701
  return new protocol_http_1.HttpRequest({
1718
1702
  protocol,
1719
1703
  hostname,
@@ -1730,7 +1714,7 @@ const se_UntagResourceCommand = async (input, context) => {
1730
1714
  const headers = {};
1731
1715
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
1732
1716
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1733
- const query = map({
1717
+ const query = (0, smithy_client_1.map)({
1734
1718
  tagKeys: [
1735
1719
  (0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
1736
1720
  () => (input.TagKeys || []).map((_entry) => _entry),
@@ -1759,11 +1743,11 @@ const se_UpdateConnectionCommand = async (input, context) => {
1759
1743
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1760
1744
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ConnectionId", () => input.ConnectionId, "{ConnectionId}", false);
1761
1745
  let body;
1762
- body = JSON.stringify({
1763
- ...(input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId }),
1764
- ...(input.Description != null && { Description: input.Description }),
1765
- ...(input.LinkId != null && { LinkId: input.LinkId }),
1766
- });
1746
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1747
+ ConnectedLinkId: [],
1748
+ Description: [],
1749
+ LinkId: [],
1750
+ }));
1767
1751
  return new protocol_http_1.HttpRequest({
1768
1752
  protocol,
1769
1753
  hostname,
@@ -1783,9 +1767,9 @@ const se_UpdateCoreNetworkCommand = async (input, context) => {
1783
1767
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/core-networks/{CoreNetworkId}";
1784
1768
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CoreNetworkId", () => input.CoreNetworkId, "{CoreNetworkId}", false);
1785
1769
  let body;
1786
- body = JSON.stringify({
1787
- ...(input.Description != null && { Description: input.Description }),
1788
- });
1770
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1771
+ Description: [],
1772
+ }));
1789
1773
  return new protocol_http_1.HttpRequest({
1790
1774
  protocol,
1791
1775
  hostname,
@@ -1807,16 +1791,16 @@ const se_UpdateDeviceCommand = async (input, context) => {
1807
1791
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1808
1792
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DeviceId", () => input.DeviceId, "{DeviceId}", false);
1809
1793
  let body;
1810
- body = JSON.stringify({
1811
- ...(input.AWSLocation != null && { AWSLocation: se_AWSLocation(input.AWSLocation, context) }),
1812
- ...(input.Description != null && { Description: input.Description }),
1813
- ...(input.Location != null && { Location: se_Location(input.Location, context) }),
1814
- ...(input.Model != null && { Model: input.Model }),
1815
- ...(input.SerialNumber != null && { SerialNumber: input.SerialNumber }),
1816
- ...(input.SiteId != null && { SiteId: input.SiteId }),
1817
- ...(input.Type != null && { Type: input.Type }),
1818
- ...(input.Vendor != null && { Vendor: input.Vendor }),
1819
- });
1794
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1795
+ AWSLocation: (_) => (0, smithy_client_1._json)(_),
1796
+ Description: [],
1797
+ Location: (_) => (0, smithy_client_1._json)(_),
1798
+ Model: [],
1799
+ SerialNumber: [],
1800
+ SiteId: [],
1801
+ Type: [],
1802
+ Vendor: [],
1803
+ }));
1820
1804
  return new protocol_http_1.HttpRequest({
1821
1805
  protocol,
1822
1806
  hostname,
@@ -1836,9 +1820,9 @@ const se_UpdateGlobalNetworkCommand = async (input, context) => {
1836
1820
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-networks/{GlobalNetworkId}";
1837
1821
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1838
1822
  let body;
1839
- body = JSON.stringify({
1840
- ...(input.Description != null && { Description: input.Description }),
1841
- });
1823
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1824
+ Description: [],
1825
+ }));
1842
1826
  return new protocol_http_1.HttpRequest({
1843
1827
  protocol,
1844
1828
  hostname,
@@ -1860,12 +1844,12 @@ const se_UpdateLinkCommand = async (input, context) => {
1860
1844
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1861
1845
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LinkId", () => input.LinkId, "{LinkId}", false);
1862
1846
  let body;
1863
- body = JSON.stringify({
1864
- ...(input.Bandwidth != null && { Bandwidth: se_Bandwidth(input.Bandwidth, context) }),
1865
- ...(input.Description != null && { Description: input.Description }),
1866
- ...(input.Provider != null && { Provider: input.Provider }),
1867
- ...(input.Type != null && { Type: input.Type }),
1868
- });
1847
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1848
+ Bandwidth: (_) => (0, smithy_client_1._json)(_),
1849
+ Description: [],
1850
+ Provider: [],
1851
+ Type: [],
1852
+ }));
1869
1853
  return new protocol_http_1.HttpRequest({
1870
1854
  protocol,
1871
1855
  hostname,
@@ -1887,9 +1871,9 @@ const se_UpdateNetworkResourceMetadataCommand = async (input, context) => {
1887
1871
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1888
1872
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
1889
1873
  let body;
1890
- body = JSON.stringify({
1891
- ...(input.Metadata != null && { Metadata: se_NetworkResourceMetadataMap(input.Metadata, context) }),
1892
- });
1874
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1875
+ Metadata: (_) => (0, smithy_client_1._json)(_),
1876
+ }));
1893
1877
  return new protocol_http_1.HttpRequest({
1894
1878
  protocol,
1895
1879
  hostname,
@@ -1911,10 +1895,10 @@ const se_UpdateSiteCommand = async (input, context) => {
1911
1895
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "GlobalNetworkId", () => input.GlobalNetworkId, "{GlobalNetworkId}", false);
1912
1896
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "SiteId", () => input.SiteId, "{SiteId}", false);
1913
1897
  let body;
1914
- body = JSON.stringify({
1915
- ...(input.Description != null && { Description: input.Description }),
1916
- ...(input.Location != null && { Location: se_Location(input.Location, context) }),
1917
- });
1898
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1899
+ Description: [],
1900
+ Location: (_) => (0, smithy_client_1._json)(_),
1901
+ }));
1918
1902
  return new protocol_http_1.HttpRequest({
1919
1903
  protocol,
1920
1904
  hostname,
@@ -1934,11 +1918,11 @@ const se_UpdateVpcAttachmentCommand = async (input, context) => {
1934
1918
  let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpc-attachments/{AttachmentId}";
1935
1919
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "AttachmentId", () => input.AttachmentId, "{AttachmentId}", false);
1936
1920
  let body;
1937
- body = JSON.stringify({
1938
- ...(input.AddSubnetArns != null && { AddSubnetArns: se_SubnetArnList(input.AddSubnetArns, context) }),
1939
- ...(input.Options != null && { Options: se_VpcOptions(input.Options, context) }),
1940
- ...(input.RemoveSubnetArns != null && { RemoveSubnetArns: se_SubnetArnList(input.RemoveSubnetArns, context) }),
1941
- });
1921
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
1922
+ AddSubnetArns: (_) => (0, smithy_client_1._json)(_),
1923
+ Options: (_) => (0, smithy_client_1._json)(_),
1924
+ RemoveSubnetArns: (_) => (0, smithy_client_1._json)(_),
1925
+ }));
1942
1926
  return new protocol_http_1.HttpRequest({
1943
1927
  protocol,
1944
1928
  hostname,
@@ -1954,13 +1938,14 @@ const de_AcceptAttachmentCommand = async (output, context) => {
1954
1938
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1955
1939
  return de_AcceptAttachmentCommandError(output, context);
1956
1940
  }
1957
- const contents = map({
1941
+ const contents = (0, smithy_client_1.map)({
1958
1942
  $metadata: deserializeMetadata(output),
1959
1943
  });
1960
1944
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1961
- if (data.Attachment != null) {
1962
- contents.Attachment = de_Attachment(data.Attachment, context);
1963
- }
1945
+ const doc = (0, smithy_client_1.take)(data, {
1946
+ Attachment: (_) => de_Attachment(_, context),
1947
+ });
1948
+ Object.assign(contents, doc);
1964
1949
  return contents;
1965
1950
  };
1966
1951
  exports.de_AcceptAttachmentCommand = de_AcceptAttachmentCommand;
@@ -1991,10 +1976,9 @@ const de_AcceptAttachmentCommandError = async (output, context) => {
1991
1976
  throw await de_ValidationExceptionRes(parsedOutput, context);
1992
1977
  default:
1993
1978
  const parsedBody = parsedOutput.body;
1994
- (0, smithy_client_1.throwDefaultError)({
1979
+ return throwDefaultError({
1995
1980
  output,
1996
1981
  parsedBody,
1997
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
1998
1982
  errorCode,
1999
1983
  });
2000
1984
  }
@@ -2003,13 +1987,14 @@ const de_AssociateConnectPeerCommand = async (output, context) => {
2003
1987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2004
1988
  return de_AssociateConnectPeerCommandError(output, context);
2005
1989
  }
2006
- const contents = map({
1990
+ const contents = (0, smithy_client_1.map)({
2007
1991
  $metadata: deserializeMetadata(output),
2008
1992
  });
2009
1993
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2010
- if (data.ConnectPeerAssociation != null) {
2011
- contents.ConnectPeerAssociation = de_ConnectPeerAssociation(data.ConnectPeerAssociation, context);
2012
- }
1994
+ const doc = (0, smithy_client_1.take)(data, {
1995
+ ConnectPeerAssociation: smithy_client_1._json,
1996
+ });
1997
+ Object.assign(contents, doc);
2013
1998
  return contents;
2014
1999
  };
2015
2000
  exports.de_AssociateConnectPeerCommand = de_AssociateConnectPeerCommand;
@@ -2043,10 +2028,9 @@ const de_AssociateConnectPeerCommandError = async (output, context) => {
2043
2028
  throw await de_ValidationExceptionRes(parsedOutput, context);
2044
2029
  default:
2045
2030
  const parsedBody = parsedOutput.body;
2046
- (0, smithy_client_1.throwDefaultError)({
2031
+ return throwDefaultError({
2047
2032
  output,
2048
2033
  parsedBody,
2049
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2050
2034
  errorCode,
2051
2035
  });
2052
2036
  }
@@ -2055,13 +2039,14 @@ const de_AssociateCustomerGatewayCommand = async (output, context) => {
2055
2039
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2056
2040
  return de_AssociateCustomerGatewayCommandError(output, context);
2057
2041
  }
2058
- const contents = map({
2042
+ const contents = (0, smithy_client_1.map)({
2059
2043
  $metadata: deserializeMetadata(output),
2060
2044
  });
2061
2045
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2062
- if (data.CustomerGatewayAssociation != null) {
2063
- contents.CustomerGatewayAssociation = de_CustomerGatewayAssociation(data.CustomerGatewayAssociation, context);
2064
- }
2046
+ const doc = (0, smithy_client_1.take)(data, {
2047
+ CustomerGatewayAssociation: smithy_client_1._json,
2048
+ });
2049
+ Object.assign(contents, doc);
2065
2050
  return contents;
2066
2051
  };
2067
2052
  exports.de_AssociateCustomerGatewayCommand = de_AssociateCustomerGatewayCommand;
@@ -2095,10 +2080,9 @@ const de_AssociateCustomerGatewayCommandError = async (output, context) => {
2095
2080
  throw await de_ValidationExceptionRes(parsedOutput, context);
2096
2081
  default:
2097
2082
  const parsedBody = parsedOutput.body;
2098
- (0, smithy_client_1.throwDefaultError)({
2083
+ return throwDefaultError({
2099
2084
  output,
2100
2085
  parsedBody,
2101
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2102
2086
  errorCode,
2103
2087
  });
2104
2088
  }
@@ -2107,13 +2091,14 @@ const de_AssociateLinkCommand = async (output, context) => {
2107
2091
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2108
2092
  return de_AssociateLinkCommandError(output, context);
2109
2093
  }
2110
- const contents = map({
2094
+ const contents = (0, smithy_client_1.map)({
2111
2095
  $metadata: deserializeMetadata(output),
2112
2096
  });
2113
2097
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2114
- if (data.LinkAssociation != null) {
2115
- contents.LinkAssociation = de_LinkAssociation(data.LinkAssociation, context);
2116
- }
2098
+ const doc = (0, smithy_client_1.take)(data, {
2099
+ LinkAssociation: smithy_client_1._json,
2100
+ });
2101
+ Object.assign(contents, doc);
2117
2102
  return contents;
2118
2103
  };
2119
2104
  exports.de_AssociateLinkCommand = de_AssociateLinkCommand;
@@ -2147,10 +2132,9 @@ const de_AssociateLinkCommandError = async (output, context) => {
2147
2132
  throw await de_ValidationExceptionRes(parsedOutput, context);
2148
2133
  default:
2149
2134
  const parsedBody = parsedOutput.body;
2150
- (0, smithy_client_1.throwDefaultError)({
2135
+ return throwDefaultError({
2151
2136
  output,
2152
2137
  parsedBody,
2153
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2154
2138
  errorCode,
2155
2139
  });
2156
2140
  }
@@ -2159,13 +2143,14 @@ const de_AssociateTransitGatewayConnectPeerCommand = async (output, context) =>
2159
2143
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2160
2144
  return de_AssociateTransitGatewayConnectPeerCommandError(output, context);
2161
2145
  }
2162
- const contents = map({
2146
+ const contents = (0, smithy_client_1.map)({
2163
2147
  $metadata: deserializeMetadata(output),
2164
2148
  });
2165
2149
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2166
- if (data.TransitGatewayConnectPeerAssociation != null) {
2167
- contents.TransitGatewayConnectPeerAssociation = de_TransitGatewayConnectPeerAssociation(data.TransitGatewayConnectPeerAssociation, context);
2168
- }
2150
+ const doc = (0, smithy_client_1.take)(data, {
2151
+ TransitGatewayConnectPeerAssociation: smithy_client_1._json,
2152
+ });
2153
+ Object.assign(contents, doc);
2169
2154
  return contents;
2170
2155
  };
2171
2156
  exports.de_AssociateTransitGatewayConnectPeerCommand = de_AssociateTransitGatewayConnectPeerCommand;
@@ -2199,10 +2184,9 @@ const de_AssociateTransitGatewayConnectPeerCommandError = async (output, context
2199
2184
  throw await de_ValidationExceptionRes(parsedOutput, context);
2200
2185
  default:
2201
2186
  const parsedBody = parsedOutput.body;
2202
- (0, smithy_client_1.throwDefaultError)({
2187
+ return throwDefaultError({
2203
2188
  output,
2204
2189
  parsedBody,
2205
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2206
2190
  errorCode,
2207
2191
  });
2208
2192
  }
@@ -2211,13 +2195,14 @@ const de_CreateConnectAttachmentCommand = async (output, context) => {
2211
2195
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2212
2196
  return de_CreateConnectAttachmentCommandError(output, context);
2213
2197
  }
2214
- const contents = map({
2198
+ const contents = (0, smithy_client_1.map)({
2215
2199
  $metadata: deserializeMetadata(output),
2216
2200
  });
2217
2201
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2218
- if (data.ConnectAttachment != null) {
2219
- contents.ConnectAttachment = de_ConnectAttachment(data.ConnectAttachment, context);
2220
- }
2202
+ const doc = (0, smithy_client_1.take)(data, {
2203
+ ConnectAttachment: (_) => de_ConnectAttachment(_, context),
2204
+ });
2205
+ Object.assign(contents, doc);
2221
2206
  return contents;
2222
2207
  };
2223
2208
  exports.de_CreateConnectAttachmentCommand = de_CreateConnectAttachmentCommand;
@@ -2248,10 +2233,9 @@ const de_CreateConnectAttachmentCommandError = async (output, context) => {
2248
2233
  throw await de_ValidationExceptionRes(parsedOutput, context);
2249
2234
  default:
2250
2235
  const parsedBody = parsedOutput.body;
2251
- (0, smithy_client_1.throwDefaultError)({
2236
+ return throwDefaultError({
2252
2237
  output,
2253
2238
  parsedBody,
2254
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2255
2239
  errorCode,
2256
2240
  });
2257
2241
  }
@@ -2260,13 +2244,14 @@ const de_CreateConnectionCommand = async (output, context) => {
2260
2244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2261
2245
  return de_CreateConnectionCommandError(output, context);
2262
2246
  }
2263
- const contents = map({
2247
+ const contents = (0, smithy_client_1.map)({
2264
2248
  $metadata: deserializeMetadata(output),
2265
2249
  });
2266
2250
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2267
- if (data.Connection != null) {
2268
- contents.Connection = de_Connection(data.Connection, context);
2269
- }
2251
+ const doc = (0, smithy_client_1.take)(data, {
2252
+ Connection: (_) => de_Connection(_, context),
2253
+ });
2254
+ Object.assign(contents, doc);
2270
2255
  return contents;
2271
2256
  };
2272
2257
  exports.de_CreateConnectionCommand = de_CreateConnectionCommand;
@@ -2297,10 +2282,9 @@ const de_CreateConnectionCommandError = async (output, context) => {
2297
2282
  throw await de_ValidationExceptionRes(parsedOutput, context);
2298
2283
  default:
2299
2284
  const parsedBody = parsedOutput.body;
2300
- (0, smithy_client_1.throwDefaultError)({
2285
+ return throwDefaultError({
2301
2286
  output,
2302
2287
  parsedBody,
2303
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2304
2288
  errorCode,
2305
2289
  });
2306
2290
  }
@@ -2309,13 +2293,14 @@ const de_CreateConnectPeerCommand = async (output, context) => {
2309
2293
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2310
2294
  return de_CreateConnectPeerCommandError(output, context);
2311
2295
  }
2312
- const contents = map({
2296
+ const contents = (0, smithy_client_1.map)({
2313
2297
  $metadata: deserializeMetadata(output),
2314
2298
  });
2315
2299
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2316
- if (data.ConnectPeer != null) {
2317
- contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context);
2318
- }
2300
+ const doc = (0, smithy_client_1.take)(data, {
2301
+ ConnectPeer: (_) => de_ConnectPeer(_, context),
2302
+ });
2303
+ Object.assign(contents, doc);
2319
2304
  return contents;
2320
2305
  };
2321
2306
  exports.de_CreateConnectPeerCommand = de_CreateConnectPeerCommand;
@@ -2346,10 +2331,9 @@ const de_CreateConnectPeerCommandError = async (output, context) => {
2346
2331
  throw await de_ValidationExceptionRes(parsedOutput, context);
2347
2332
  default:
2348
2333
  const parsedBody = parsedOutput.body;
2349
- (0, smithy_client_1.throwDefaultError)({
2334
+ return throwDefaultError({
2350
2335
  output,
2351
2336
  parsedBody,
2352
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2353
2337
  errorCode,
2354
2338
  });
2355
2339
  }
@@ -2358,13 +2342,14 @@ const de_CreateCoreNetworkCommand = async (output, context) => {
2358
2342
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2359
2343
  return de_CreateCoreNetworkCommandError(output, context);
2360
2344
  }
2361
- const contents = map({
2345
+ const contents = (0, smithy_client_1.map)({
2362
2346
  $metadata: deserializeMetadata(output),
2363
2347
  });
2364
2348
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2365
- if (data.CoreNetwork != null) {
2366
- contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context);
2367
- }
2349
+ const doc = (0, smithy_client_1.take)(data, {
2350
+ CoreNetwork: (_) => de_CoreNetwork(_, context),
2351
+ });
2352
+ Object.assign(contents, doc);
2368
2353
  return contents;
2369
2354
  };
2370
2355
  exports.de_CreateCoreNetworkCommand = de_CreateCoreNetworkCommand;
@@ -2398,10 +2383,9 @@ const de_CreateCoreNetworkCommandError = async (output, context) => {
2398
2383
  throw await de_ValidationExceptionRes(parsedOutput, context);
2399
2384
  default:
2400
2385
  const parsedBody = parsedOutput.body;
2401
- (0, smithy_client_1.throwDefaultError)({
2386
+ return throwDefaultError({
2402
2387
  output,
2403
2388
  parsedBody,
2404
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2405
2389
  errorCode,
2406
2390
  });
2407
2391
  }
@@ -2410,13 +2394,14 @@ const de_CreateDeviceCommand = async (output, context) => {
2410
2394
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2411
2395
  return de_CreateDeviceCommandError(output, context);
2412
2396
  }
2413
- const contents = map({
2397
+ const contents = (0, smithy_client_1.map)({
2414
2398
  $metadata: deserializeMetadata(output),
2415
2399
  });
2416
2400
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2417
- if (data.Device != null) {
2418
- contents.Device = de_Device(data.Device, context);
2419
- }
2401
+ const doc = (0, smithy_client_1.take)(data, {
2402
+ Device: (_) => de_Device(_, context),
2403
+ });
2404
+ Object.assign(contents, doc);
2420
2405
  return contents;
2421
2406
  };
2422
2407
  exports.de_CreateDeviceCommand = de_CreateDeviceCommand;
@@ -2450,10 +2435,9 @@ const de_CreateDeviceCommandError = async (output, context) => {
2450
2435
  throw await de_ValidationExceptionRes(parsedOutput, context);
2451
2436
  default:
2452
2437
  const parsedBody = parsedOutput.body;
2453
- (0, smithy_client_1.throwDefaultError)({
2438
+ return throwDefaultError({
2454
2439
  output,
2455
2440
  parsedBody,
2456
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2457
2441
  errorCode,
2458
2442
  });
2459
2443
  }
@@ -2462,13 +2446,14 @@ const de_CreateGlobalNetworkCommand = async (output, context) => {
2462
2446
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2463
2447
  return de_CreateGlobalNetworkCommandError(output, context);
2464
2448
  }
2465
- const contents = map({
2449
+ const contents = (0, smithy_client_1.map)({
2466
2450
  $metadata: deserializeMetadata(output),
2467
2451
  });
2468
2452
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2469
- if (data.GlobalNetwork != null) {
2470
- contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context);
2471
- }
2453
+ const doc = (0, smithy_client_1.take)(data, {
2454
+ GlobalNetwork: (_) => de_GlobalNetwork(_, context),
2455
+ });
2456
+ Object.assign(contents, doc);
2472
2457
  return contents;
2473
2458
  };
2474
2459
  exports.de_CreateGlobalNetworkCommand = de_CreateGlobalNetworkCommand;
@@ -2499,10 +2484,9 @@ const de_CreateGlobalNetworkCommandError = async (output, context) => {
2499
2484
  throw await de_ValidationExceptionRes(parsedOutput, context);
2500
2485
  default:
2501
2486
  const parsedBody = parsedOutput.body;
2502
- (0, smithy_client_1.throwDefaultError)({
2487
+ return throwDefaultError({
2503
2488
  output,
2504
2489
  parsedBody,
2505
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2506
2490
  errorCode,
2507
2491
  });
2508
2492
  }
@@ -2511,13 +2495,14 @@ const de_CreateLinkCommand = async (output, context) => {
2511
2495
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2512
2496
  return de_CreateLinkCommandError(output, context);
2513
2497
  }
2514
- const contents = map({
2498
+ const contents = (0, smithy_client_1.map)({
2515
2499
  $metadata: deserializeMetadata(output),
2516
2500
  });
2517
2501
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2518
- if (data.Link != null) {
2519
- contents.Link = de_Link(data.Link, context);
2520
- }
2502
+ const doc = (0, smithy_client_1.take)(data, {
2503
+ Link: (_) => de_Link(_, context),
2504
+ });
2505
+ Object.assign(contents, doc);
2521
2506
  return contents;
2522
2507
  };
2523
2508
  exports.de_CreateLinkCommand = de_CreateLinkCommand;
@@ -2551,10 +2536,9 @@ const de_CreateLinkCommandError = async (output, context) => {
2551
2536
  throw await de_ValidationExceptionRes(parsedOutput, context);
2552
2537
  default:
2553
2538
  const parsedBody = parsedOutput.body;
2554
- (0, smithy_client_1.throwDefaultError)({
2539
+ return throwDefaultError({
2555
2540
  output,
2556
2541
  parsedBody,
2557
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2558
2542
  errorCode,
2559
2543
  });
2560
2544
  }
@@ -2563,13 +2547,14 @@ const de_CreateSiteCommand = async (output, context) => {
2563
2547
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2564
2548
  return de_CreateSiteCommandError(output, context);
2565
2549
  }
2566
- const contents = map({
2550
+ const contents = (0, smithy_client_1.map)({
2567
2551
  $metadata: deserializeMetadata(output),
2568
2552
  });
2569
2553
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2570
- if (data.Site != null) {
2571
- contents.Site = de_Site(data.Site, context);
2572
- }
2554
+ const doc = (0, smithy_client_1.take)(data, {
2555
+ Site: (_) => de_Site(_, context),
2556
+ });
2557
+ Object.assign(contents, doc);
2573
2558
  return contents;
2574
2559
  };
2575
2560
  exports.de_CreateSiteCommand = de_CreateSiteCommand;
@@ -2603,10 +2588,9 @@ const de_CreateSiteCommandError = async (output, context) => {
2603
2588
  throw await de_ValidationExceptionRes(parsedOutput, context);
2604
2589
  default:
2605
2590
  const parsedBody = parsedOutput.body;
2606
- (0, smithy_client_1.throwDefaultError)({
2591
+ return throwDefaultError({
2607
2592
  output,
2608
2593
  parsedBody,
2609
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2610
2594
  errorCode,
2611
2595
  });
2612
2596
  }
@@ -2615,13 +2599,14 @@ const de_CreateSiteToSiteVpnAttachmentCommand = async (output, context) => {
2615
2599
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2616
2600
  return de_CreateSiteToSiteVpnAttachmentCommandError(output, context);
2617
2601
  }
2618
- const contents = map({
2602
+ const contents = (0, smithy_client_1.map)({
2619
2603
  $metadata: deserializeMetadata(output),
2620
2604
  });
2621
2605
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2622
- if (data.SiteToSiteVpnAttachment != null) {
2623
- contents.SiteToSiteVpnAttachment = de_SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context);
2624
- }
2606
+ const doc = (0, smithy_client_1.take)(data, {
2607
+ SiteToSiteVpnAttachment: (_) => de_SiteToSiteVpnAttachment(_, context),
2608
+ });
2609
+ Object.assign(contents, doc);
2625
2610
  return contents;
2626
2611
  };
2627
2612
  exports.de_CreateSiteToSiteVpnAttachmentCommand = de_CreateSiteToSiteVpnAttachmentCommand;
@@ -2652,10 +2637,9 @@ const de_CreateSiteToSiteVpnAttachmentCommandError = async (output, context) =>
2652
2637
  throw await de_ValidationExceptionRes(parsedOutput, context);
2653
2638
  default:
2654
2639
  const parsedBody = parsedOutput.body;
2655
- (0, smithy_client_1.throwDefaultError)({
2640
+ return throwDefaultError({
2656
2641
  output,
2657
2642
  parsedBody,
2658
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2659
2643
  errorCode,
2660
2644
  });
2661
2645
  }
@@ -2664,13 +2648,14 @@ const de_CreateTransitGatewayPeeringCommand = async (output, context) => {
2664
2648
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2665
2649
  return de_CreateTransitGatewayPeeringCommandError(output, context);
2666
2650
  }
2667
- const contents = map({
2651
+ const contents = (0, smithy_client_1.map)({
2668
2652
  $metadata: deserializeMetadata(output),
2669
2653
  });
2670
2654
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2671
- if (data.TransitGatewayPeering != null) {
2672
- contents.TransitGatewayPeering = de_TransitGatewayPeering(data.TransitGatewayPeering, context);
2673
- }
2655
+ const doc = (0, smithy_client_1.take)(data, {
2656
+ TransitGatewayPeering: (_) => de_TransitGatewayPeering(_, context),
2657
+ });
2658
+ Object.assign(contents, doc);
2674
2659
  return contents;
2675
2660
  };
2676
2661
  exports.de_CreateTransitGatewayPeeringCommand = de_CreateTransitGatewayPeeringCommand;
@@ -2701,10 +2686,9 @@ const de_CreateTransitGatewayPeeringCommandError = async (output, context) => {
2701
2686
  throw await de_ValidationExceptionRes(parsedOutput, context);
2702
2687
  default:
2703
2688
  const parsedBody = parsedOutput.body;
2704
- (0, smithy_client_1.throwDefaultError)({
2689
+ return throwDefaultError({
2705
2690
  output,
2706
2691
  parsedBody,
2707
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2708
2692
  errorCode,
2709
2693
  });
2710
2694
  }
@@ -2713,13 +2697,14 @@ const de_CreateTransitGatewayRouteTableAttachmentCommand = async (output, contex
2713
2697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2714
2698
  return de_CreateTransitGatewayRouteTableAttachmentCommandError(output, context);
2715
2699
  }
2716
- const contents = map({
2700
+ const contents = (0, smithy_client_1.map)({
2717
2701
  $metadata: deserializeMetadata(output),
2718
2702
  });
2719
2703
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2720
- if (data.TransitGatewayRouteTableAttachment != null) {
2721
- contents.TransitGatewayRouteTableAttachment = de_TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
2722
- }
2704
+ const doc = (0, smithy_client_1.take)(data, {
2705
+ TransitGatewayRouteTableAttachment: (_) => de_TransitGatewayRouteTableAttachment(_, context),
2706
+ });
2707
+ Object.assign(contents, doc);
2723
2708
  return contents;
2724
2709
  };
2725
2710
  exports.de_CreateTransitGatewayRouteTableAttachmentCommand = de_CreateTransitGatewayRouteTableAttachmentCommand;
@@ -2750,10 +2735,9 @@ const de_CreateTransitGatewayRouteTableAttachmentCommandError = async (output, c
2750
2735
  throw await de_ValidationExceptionRes(parsedOutput, context);
2751
2736
  default:
2752
2737
  const parsedBody = parsedOutput.body;
2753
- (0, smithy_client_1.throwDefaultError)({
2738
+ return throwDefaultError({
2754
2739
  output,
2755
2740
  parsedBody,
2756
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2757
2741
  errorCode,
2758
2742
  });
2759
2743
  }
@@ -2762,13 +2746,14 @@ const de_CreateVpcAttachmentCommand = async (output, context) => {
2762
2746
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2763
2747
  return de_CreateVpcAttachmentCommandError(output, context);
2764
2748
  }
2765
- const contents = map({
2749
+ const contents = (0, smithy_client_1.map)({
2766
2750
  $metadata: deserializeMetadata(output),
2767
2751
  });
2768
2752
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2769
- if (data.VpcAttachment != null) {
2770
- contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context);
2771
- }
2753
+ const doc = (0, smithy_client_1.take)(data, {
2754
+ VpcAttachment: (_) => de_VpcAttachment(_, context),
2755
+ });
2756
+ Object.assign(contents, doc);
2772
2757
  return contents;
2773
2758
  };
2774
2759
  exports.de_CreateVpcAttachmentCommand = de_CreateVpcAttachmentCommand;
@@ -2799,10 +2784,9 @@ const de_CreateVpcAttachmentCommandError = async (output, context) => {
2799
2784
  throw await de_ValidationExceptionRes(parsedOutput, context);
2800
2785
  default:
2801
2786
  const parsedBody = parsedOutput.body;
2802
- (0, smithy_client_1.throwDefaultError)({
2787
+ return throwDefaultError({
2803
2788
  output,
2804
2789
  parsedBody,
2805
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2806
2790
  errorCode,
2807
2791
  });
2808
2792
  }
@@ -2811,13 +2795,14 @@ const de_DeleteAttachmentCommand = async (output, context) => {
2811
2795
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2812
2796
  return de_DeleteAttachmentCommandError(output, context);
2813
2797
  }
2814
- const contents = map({
2798
+ const contents = (0, smithy_client_1.map)({
2815
2799
  $metadata: deserializeMetadata(output),
2816
2800
  });
2817
2801
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2818
- if (data.Attachment != null) {
2819
- contents.Attachment = de_Attachment(data.Attachment, context);
2820
- }
2802
+ const doc = (0, smithy_client_1.take)(data, {
2803
+ Attachment: (_) => de_Attachment(_, context),
2804
+ });
2805
+ Object.assign(contents, doc);
2821
2806
  return contents;
2822
2807
  };
2823
2808
  exports.de_DeleteAttachmentCommand = de_DeleteAttachmentCommand;
@@ -2848,10 +2833,9 @@ const de_DeleteAttachmentCommandError = async (output, context) => {
2848
2833
  throw await de_ValidationExceptionRes(parsedOutput, context);
2849
2834
  default:
2850
2835
  const parsedBody = parsedOutput.body;
2851
- (0, smithy_client_1.throwDefaultError)({
2836
+ return throwDefaultError({
2852
2837
  output,
2853
2838
  parsedBody,
2854
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2855
2839
  errorCode,
2856
2840
  });
2857
2841
  }
@@ -2860,13 +2844,14 @@ const de_DeleteConnectionCommand = async (output, context) => {
2860
2844
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2861
2845
  return de_DeleteConnectionCommandError(output, context);
2862
2846
  }
2863
- const contents = map({
2847
+ const contents = (0, smithy_client_1.map)({
2864
2848
  $metadata: deserializeMetadata(output),
2865
2849
  });
2866
2850
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2867
- if (data.Connection != null) {
2868
- contents.Connection = de_Connection(data.Connection, context);
2869
- }
2851
+ const doc = (0, smithy_client_1.take)(data, {
2852
+ Connection: (_) => de_Connection(_, context),
2853
+ });
2854
+ Object.assign(contents, doc);
2870
2855
  return contents;
2871
2856
  };
2872
2857
  exports.de_DeleteConnectionCommand = de_DeleteConnectionCommand;
@@ -2897,10 +2882,9 @@ const de_DeleteConnectionCommandError = async (output, context) => {
2897
2882
  throw await de_ValidationExceptionRes(parsedOutput, context);
2898
2883
  default:
2899
2884
  const parsedBody = parsedOutput.body;
2900
- (0, smithy_client_1.throwDefaultError)({
2885
+ return throwDefaultError({
2901
2886
  output,
2902
2887
  parsedBody,
2903
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2904
2888
  errorCode,
2905
2889
  });
2906
2890
  }
@@ -2909,13 +2893,14 @@ const de_DeleteConnectPeerCommand = async (output, context) => {
2909
2893
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2910
2894
  return de_DeleteConnectPeerCommandError(output, context);
2911
2895
  }
2912
- const contents = map({
2896
+ const contents = (0, smithy_client_1.map)({
2913
2897
  $metadata: deserializeMetadata(output),
2914
2898
  });
2915
2899
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2916
- if (data.ConnectPeer != null) {
2917
- contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context);
2918
- }
2900
+ const doc = (0, smithy_client_1.take)(data, {
2901
+ ConnectPeer: (_) => de_ConnectPeer(_, context),
2902
+ });
2903
+ Object.assign(contents, doc);
2919
2904
  return contents;
2920
2905
  };
2921
2906
  exports.de_DeleteConnectPeerCommand = de_DeleteConnectPeerCommand;
@@ -2946,10 +2931,9 @@ const de_DeleteConnectPeerCommandError = async (output, context) => {
2946
2931
  throw await de_ValidationExceptionRes(parsedOutput, context);
2947
2932
  default:
2948
2933
  const parsedBody = parsedOutput.body;
2949
- (0, smithy_client_1.throwDefaultError)({
2934
+ return throwDefaultError({
2950
2935
  output,
2951
2936
  parsedBody,
2952
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
2953
2937
  errorCode,
2954
2938
  });
2955
2939
  }
@@ -2958,13 +2942,14 @@ const de_DeleteCoreNetworkCommand = async (output, context) => {
2958
2942
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2959
2943
  return de_DeleteCoreNetworkCommandError(output, context);
2960
2944
  }
2961
- const contents = map({
2945
+ const contents = (0, smithy_client_1.map)({
2962
2946
  $metadata: deserializeMetadata(output),
2963
2947
  });
2964
2948
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2965
- if (data.CoreNetwork != null) {
2966
- contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context);
2967
- }
2949
+ const doc = (0, smithy_client_1.take)(data, {
2950
+ CoreNetwork: (_) => de_CoreNetwork(_, context),
2951
+ });
2952
+ Object.assign(contents, doc);
2968
2953
  return contents;
2969
2954
  };
2970
2955
  exports.de_DeleteCoreNetworkCommand = de_DeleteCoreNetworkCommand;
@@ -2995,10 +2980,9 @@ const de_DeleteCoreNetworkCommandError = async (output, context) => {
2995
2980
  throw await de_ValidationExceptionRes(parsedOutput, context);
2996
2981
  default:
2997
2982
  const parsedBody = parsedOutput.body;
2998
- (0, smithy_client_1.throwDefaultError)({
2983
+ return throwDefaultError({
2999
2984
  output,
3000
2985
  parsedBody,
3001
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3002
2986
  errorCode,
3003
2987
  });
3004
2988
  }
@@ -3007,13 +2991,14 @@ const de_DeleteCoreNetworkPolicyVersionCommand = async (output, context) => {
3007
2991
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3008
2992
  return de_DeleteCoreNetworkPolicyVersionCommandError(output, context);
3009
2993
  }
3010
- const contents = map({
2994
+ const contents = (0, smithy_client_1.map)({
3011
2995
  $metadata: deserializeMetadata(output),
3012
2996
  });
3013
2997
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3014
- if (data.CoreNetworkPolicy != null) {
3015
- contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context);
3016
- }
2998
+ const doc = (0, smithy_client_1.take)(data, {
2999
+ CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context),
3000
+ });
3001
+ Object.assign(contents, doc);
3017
3002
  return contents;
3018
3003
  };
3019
3004
  exports.de_DeleteCoreNetworkPolicyVersionCommand = de_DeleteCoreNetworkPolicyVersionCommand;
@@ -3044,10 +3029,9 @@ const de_DeleteCoreNetworkPolicyVersionCommandError = async (output, context) =>
3044
3029
  throw await de_ValidationExceptionRes(parsedOutput, context);
3045
3030
  default:
3046
3031
  const parsedBody = parsedOutput.body;
3047
- (0, smithy_client_1.throwDefaultError)({
3032
+ return throwDefaultError({
3048
3033
  output,
3049
3034
  parsedBody,
3050
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3051
3035
  errorCode,
3052
3036
  });
3053
3037
  }
@@ -3056,13 +3040,14 @@ const de_DeleteDeviceCommand = async (output, context) => {
3056
3040
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3057
3041
  return de_DeleteDeviceCommandError(output, context);
3058
3042
  }
3059
- const contents = map({
3043
+ const contents = (0, smithy_client_1.map)({
3060
3044
  $metadata: deserializeMetadata(output),
3061
3045
  });
3062
3046
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3063
- if (data.Device != null) {
3064
- contents.Device = de_Device(data.Device, context);
3065
- }
3047
+ const doc = (0, smithy_client_1.take)(data, {
3048
+ Device: (_) => de_Device(_, context),
3049
+ });
3050
+ Object.assign(contents, doc);
3066
3051
  return contents;
3067
3052
  };
3068
3053
  exports.de_DeleteDeviceCommand = de_DeleteDeviceCommand;
@@ -3093,10 +3078,9 @@ const de_DeleteDeviceCommandError = async (output, context) => {
3093
3078
  throw await de_ValidationExceptionRes(parsedOutput, context);
3094
3079
  default:
3095
3080
  const parsedBody = parsedOutput.body;
3096
- (0, smithy_client_1.throwDefaultError)({
3081
+ return throwDefaultError({
3097
3082
  output,
3098
3083
  parsedBody,
3099
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3100
3084
  errorCode,
3101
3085
  });
3102
3086
  }
@@ -3105,13 +3089,14 @@ const de_DeleteGlobalNetworkCommand = async (output, context) => {
3105
3089
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3106
3090
  return de_DeleteGlobalNetworkCommandError(output, context);
3107
3091
  }
3108
- const contents = map({
3092
+ const contents = (0, smithy_client_1.map)({
3109
3093
  $metadata: deserializeMetadata(output),
3110
3094
  });
3111
3095
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3112
- if (data.GlobalNetwork != null) {
3113
- contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context);
3114
- }
3096
+ const doc = (0, smithy_client_1.take)(data, {
3097
+ GlobalNetwork: (_) => de_GlobalNetwork(_, context),
3098
+ });
3099
+ Object.assign(contents, doc);
3115
3100
  return contents;
3116
3101
  };
3117
3102
  exports.de_DeleteGlobalNetworkCommand = de_DeleteGlobalNetworkCommand;
@@ -3142,10 +3127,9 @@ const de_DeleteGlobalNetworkCommandError = async (output, context) => {
3142
3127
  throw await de_ValidationExceptionRes(parsedOutput, context);
3143
3128
  default:
3144
3129
  const parsedBody = parsedOutput.body;
3145
- (0, smithy_client_1.throwDefaultError)({
3130
+ return throwDefaultError({
3146
3131
  output,
3147
3132
  parsedBody,
3148
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3149
3133
  errorCode,
3150
3134
  });
3151
3135
  }
@@ -3154,13 +3138,14 @@ const de_DeleteLinkCommand = async (output, context) => {
3154
3138
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3155
3139
  return de_DeleteLinkCommandError(output, context);
3156
3140
  }
3157
- const contents = map({
3141
+ const contents = (0, smithy_client_1.map)({
3158
3142
  $metadata: deserializeMetadata(output),
3159
3143
  });
3160
3144
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3161
- if (data.Link != null) {
3162
- contents.Link = de_Link(data.Link, context);
3163
- }
3145
+ const doc = (0, smithy_client_1.take)(data, {
3146
+ Link: (_) => de_Link(_, context),
3147
+ });
3148
+ Object.assign(contents, doc);
3164
3149
  return contents;
3165
3150
  };
3166
3151
  exports.de_DeleteLinkCommand = de_DeleteLinkCommand;
@@ -3191,10 +3176,9 @@ const de_DeleteLinkCommandError = async (output, context) => {
3191
3176
  throw await de_ValidationExceptionRes(parsedOutput, context);
3192
3177
  default:
3193
3178
  const parsedBody = parsedOutput.body;
3194
- (0, smithy_client_1.throwDefaultError)({
3179
+ return throwDefaultError({
3195
3180
  output,
3196
3181
  parsedBody,
3197
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3198
3182
  errorCode,
3199
3183
  });
3200
3184
  }
@@ -3203,13 +3187,14 @@ const de_DeletePeeringCommand = async (output, context) => {
3203
3187
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3204
3188
  return de_DeletePeeringCommandError(output, context);
3205
3189
  }
3206
- const contents = map({
3190
+ const contents = (0, smithy_client_1.map)({
3207
3191
  $metadata: deserializeMetadata(output),
3208
3192
  });
3209
3193
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3210
- if (data.Peering != null) {
3211
- contents.Peering = de_Peering(data.Peering, context);
3212
- }
3194
+ const doc = (0, smithy_client_1.take)(data, {
3195
+ Peering: (_) => de_Peering(_, context),
3196
+ });
3197
+ Object.assign(contents, doc);
3213
3198
  return contents;
3214
3199
  };
3215
3200
  exports.de_DeletePeeringCommand = de_DeletePeeringCommand;
@@ -3240,10 +3225,9 @@ const de_DeletePeeringCommandError = async (output, context) => {
3240
3225
  throw await de_ValidationExceptionRes(parsedOutput, context);
3241
3226
  default:
3242
3227
  const parsedBody = parsedOutput.body;
3243
- (0, smithy_client_1.throwDefaultError)({
3228
+ return throwDefaultError({
3244
3229
  output,
3245
3230
  parsedBody,
3246
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3247
3231
  errorCode,
3248
3232
  });
3249
3233
  }
@@ -3252,7 +3236,7 @@ const de_DeleteResourcePolicyCommand = async (output, context) => {
3252
3236
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3253
3237
  return de_DeleteResourcePolicyCommandError(output, context);
3254
3238
  }
3255
- const contents = map({
3239
+ const contents = (0, smithy_client_1.map)({
3256
3240
  $metadata: deserializeMetadata(output),
3257
3241
  });
3258
3242
  await collectBody(output.body, context);
@@ -3283,10 +3267,9 @@ const de_DeleteResourcePolicyCommandError = async (output, context) => {
3283
3267
  throw await de_ValidationExceptionRes(parsedOutput, context);
3284
3268
  default:
3285
3269
  const parsedBody = parsedOutput.body;
3286
- (0, smithy_client_1.throwDefaultError)({
3270
+ return throwDefaultError({
3287
3271
  output,
3288
3272
  parsedBody,
3289
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3290
3273
  errorCode,
3291
3274
  });
3292
3275
  }
@@ -3295,13 +3278,14 @@ const de_DeleteSiteCommand = async (output, context) => {
3295
3278
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3296
3279
  return de_DeleteSiteCommandError(output, context);
3297
3280
  }
3298
- const contents = map({
3281
+ const contents = (0, smithy_client_1.map)({
3299
3282
  $metadata: deserializeMetadata(output),
3300
3283
  });
3301
3284
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3302
- if (data.Site != null) {
3303
- contents.Site = de_Site(data.Site, context);
3304
- }
3285
+ const doc = (0, smithy_client_1.take)(data, {
3286
+ Site: (_) => de_Site(_, context),
3287
+ });
3288
+ Object.assign(contents, doc);
3305
3289
  return contents;
3306
3290
  };
3307
3291
  exports.de_DeleteSiteCommand = de_DeleteSiteCommand;
@@ -3332,10 +3316,9 @@ const de_DeleteSiteCommandError = async (output, context) => {
3332
3316
  throw await de_ValidationExceptionRes(parsedOutput, context);
3333
3317
  default:
3334
3318
  const parsedBody = parsedOutput.body;
3335
- (0, smithy_client_1.throwDefaultError)({
3319
+ return throwDefaultError({
3336
3320
  output,
3337
3321
  parsedBody,
3338
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3339
3322
  errorCode,
3340
3323
  });
3341
3324
  }
@@ -3344,13 +3327,14 @@ const de_DeregisterTransitGatewayCommand = async (output, context) => {
3344
3327
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3345
3328
  return de_DeregisterTransitGatewayCommandError(output, context);
3346
3329
  }
3347
- const contents = map({
3330
+ const contents = (0, smithy_client_1.map)({
3348
3331
  $metadata: deserializeMetadata(output),
3349
3332
  });
3350
3333
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3351
- if (data.TransitGatewayRegistration != null) {
3352
- contents.TransitGatewayRegistration = de_TransitGatewayRegistration(data.TransitGatewayRegistration, context);
3353
- }
3334
+ const doc = (0, smithy_client_1.take)(data, {
3335
+ TransitGatewayRegistration: smithy_client_1._json,
3336
+ });
3337
+ Object.assign(contents, doc);
3354
3338
  return contents;
3355
3339
  };
3356
3340
  exports.de_DeregisterTransitGatewayCommand = de_DeregisterTransitGatewayCommand;
@@ -3381,10 +3365,9 @@ const de_DeregisterTransitGatewayCommandError = async (output, context) => {
3381
3365
  throw await de_ValidationExceptionRes(parsedOutput, context);
3382
3366
  default:
3383
3367
  const parsedBody = parsedOutput.body;
3384
- (0, smithy_client_1.throwDefaultError)({
3368
+ return throwDefaultError({
3385
3369
  output,
3386
3370
  parsedBody,
3387
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3388
3371
  errorCode,
3389
3372
  });
3390
3373
  }
@@ -3393,16 +3376,15 @@ const de_DescribeGlobalNetworksCommand = async (output, context) => {
3393
3376
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3394
3377
  return de_DescribeGlobalNetworksCommandError(output, context);
3395
3378
  }
3396
- const contents = map({
3379
+ const contents = (0, smithy_client_1.map)({
3397
3380
  $metadata: deserializeMetadata(output),
3398
3381
  });
3399
3382
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3400
- if (data.GlobalNetworks != null) {
3401
- contents.GlobalNetworks = de_GlobalNetworkList(data.GlobalNetworks, context);
3402
- }
3403
- if (data.NextToken != null) {
3404
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3405
- }
3383
+ const doc = (0, smithy_client_1.take)(data, {
3384
+ GlobalNetworks: (_) => de_GlobalNetworkList(_, context),
3385
+ NextToken: smithy_client_1.expectString,
3386
+ });
3387
+ Object.assign(contents, doc);
3406
3388
  return contents;
3407
3389
  };
3408
3390
  exports.de_DescribeGlobalNetworksCommand = de_DescribeGlobalNetworksCommand;
@@ -3430,10 +3412,9 @@ const de_DescribeGlobalNetworksCommandError = async (output, context) => {
3430
3412
  throw await de_ValidationExceptionRes(parsedOutput, context);
3431
3413
  default:
3432
3414
  const parsedBody = parsedOutput.body;
3433
- (0, smithy_client_1.throwDefaultError)({
3415
+ return throwDefaultError({
3434
3416
  output,
3435
3417
  parsedBody,
3436
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3437
3418
  errorCode,
3438
3419
  });
3439
3420
  }
@@ -3442,13 +3423,14 @@ const de_DisassociateConnectPeerCommand = async (output, context) => {
3442
3423
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3443
3424
  return de_DisassociateConnectPeerCommandError(output, context);
3444
3425
  }
3445
- const contents = map({
3426
+ const contents = (0, smithy_client_1.map)({
3446
3427
  $metadata: deserializeMetadata(output),
3447
3428
  });
3448
3429
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3449
- if (data.ConnectPeerAssociation != null) {
3450
- contents.ConnectPeerAssociation = de_ConnectPeerAssociation(data.ConnectPeerAssociation, context);
3451
- }
3430
+ const doc = (0, smithy_client_1.take)(data, {
3431
+ ConnectPeerAssociation: smithy_client_1._json,
3432
+ });
3433
+ Object.assign(contents, doc);
3452
3434
  return contents;
3453
3435
  };
3454
3436
  exports.de_DisassociateConnectPeerCommand = de_DisassociateConnectPeerCommand;
@@ -3479,10 +3461,9 @@ const de_DisassociateConnectPeerCommandError = async (output, context) => {
3479
3461
  throw await de_ValidationExceptionRes(parsedOutput, context);
3480
3462
  default:
3481
3463
  const parsedBody = parsedOutput.body;
3482
- (0, smithy_client_1.throwDefaultError)({
3464
+ return throwDefaultError({
3483
3465
  output,
3484
3466
  parsedBody,
3485
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3486
3467
  errorCode,
3487
3468
  });
3488
3469
  }
@@ -3491,13 +3472,14 @@ const de_DisassociateCustomerGatewayCommand = async (output, context) => {
3491
3472
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3492
3473
  return de_DisassociateCustomerGatewayCommandError(output, context);
3493
3474
  }
3494
- const contents = map({
3475
+ const contents = (0, smithy_client_1.map)({
3495
3476
  $metadata: deserializeMetadata(output),
3496
3477
  });
3497
3478
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3498
- if (data.CustomerGatewayAssociation != null) {
3499
- contents.CustomerGatewayAssociation = de_CustomerGatewayAssociation(data.CustomerGatewayAssociation, context);
3500
- }
3479
+ const doc = (0, smithy_client_1.take)(data, {
3480
+ CustomerGatewayAssociation: smithy_client_1._json,
3481
+ });
3482
+ Object.assign(contents, doc);
3501
3483
  return contents;
3502
3484
  };
3503
3485
  exports.de_DisassociateCustomerGatewayCommand = de_DisassociateCustomerGatewayCommand;
@@ -3528,10 +3510,9 @@ const de_DisassociateCustomerGatewayCommandError = async (output, context) => {
3528
3510
  throw await de_ValidationExceptionRes(parsedOutput, context);
3529
3511
  default:
3530
3512
  const parsedBody = parsedOutput.body;
3531
- (0, smithy_client_1.throwDefaultError)({
3513
+ return throwDefaultError({
3532
3514
  output,
3533
3515
  parsedBody,
3534
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3535
3516
  errorCode,
3536
3517
  });
3537
3518
  }
@@ -3540,13 +3521,14 @@ const de_DisassociateLinkCommand = async (output, context) => {
3540
3521
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3541
3522
  return de_DisassociateLinkCommandError(output, context);
3542
3523
  }
3543
- const contents = map({
3524
+ const contents = (0, smithy_client_1.map)({
3544
3525
  $metadata: deserializeMetadata(output),
3545
3526
  });
3546
3527
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3547
- if (data.LinkAssociation != null) {
3548
- contents.LinkAssociation = de_LinkAssociation(data.LinkAssociation, context);
3549
- }
3528
+ const doc = (0, smithy_client_1.take)(data, {
3529
+ LinkAssociation: smithy_client_1._json,
3530
+ });
3531
+ Object.assign(contents, doc);
3550
3532
  return contents;
3551
3533
  };
3552
3534
  exports.de_DisassociateLinkCommand = de_DisassociateLinkCommand;
@@ -3577,10 +3559,9 @@ const de_DisassociateLinkCommandError = async (output, context) => {
3577
3559
  throw await de_ValidationExceptionRes(parsedOutput, context);
3578
3560
  default:
3579
3561
  const parsedBody = parsedOutput.body;
3580
- (0, smithy_client_1.throwDefaultError)({
3562
+ return throwDefaultError({
3581
3563
  output,
3582
3564
  parsedBody,
3583
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3584
3565
  errorCode,
3585
3566
  });
3586
3567
  }
@@ -3589,13 +3570,14 @@ const de_DisassociateTransitGatewayConnectPeerCommand = async (output, context)
3589
3570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3590
3571
  return de_DisassociateTransitGatewayConnectPeerCommandError(output, context);
3591
3572
  }
3592
- const contents = map({
3573
+ const contents = (0, smithy_client_1.map)({
3593
3574
  $metadata: deserializeMetadata(output),
3594
3575
  });
3595
3576
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3596
- if (data.TransitGatewayConnectPeerAssociation != null) {
3597
- contents.TransitGatewayConnectPeerAssociation = de_TransitGatewayConnectPeerAssociation(data.TransitGatewayConnectPeerAssociation, context);
3598
- }
3577
+ const doc = (0, smithy_client_1.take)(data, {
3578
+ TransitGatewayConnectPeerAssociation: smithy_client_1._json,
3579
+ });
3580
+ Object.assign(contents, doc);
3599
3581
  return contents;
3600
3582
  };
3601
3583
  exports.de_DisassociateTransitGatewayConnectPeerCommand = de_DisassociateTransitGatewayConnectPeerCommand;
@@ -3626,10 +3608,9 @@ const de_DisassociateTransitGatewayConnectPeerCommandError = async (output, cont
3626
3608
  throw await de_ValidationExceptionRes(parsedOutput, context);
3627
3609
  default:
3628
3610
  const parsedBody = parsedOutput.body;
3629
- (0, smithy_client_1.throwDefaultError)({
3611
+ return throwDefaultError({
3630
3612
  output,
3631
3613
  parsedBody,
3632
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3633
3614
  errorCode,
3634
3615
  });
3635
3616
  }
@@ -3638,7 +3619,7 @@ const de_ExecuteCoreNetworkChangeSetCommand = async (output, context) => {
3638
3619
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3639
3620
  return de_ExecuteCoreNetworkChangeSetCommandError(output, context);
3640
3621
  }
3641
- const contents = map({
3622
+ const contents = (0, smithy_client_1.map)({
3642
3623
  $metadata: deserializeMetadata(output),
3643
3624
  });
3644
3625
  await collectBody(output.body, context);
@@ -3672,10 +3653,9 @@ const de_ExecuteCoreNetworkChangeSetCommandError = async (output, context) => {
3672
3653
  throw await de_ValidationExceptionRes(parsedOutput, context);
3673
3654
  default:
3674
3655
  const parsedBody = parsedOutput.body;
3675
- (0, smithy_client_1.throwDefaultError)({
3656
+ return throwDefaultError({
3676
3657
  output,
3677
3658
  parsedBody,
3678
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3679
3659
  errorCode,
3680
3660
  });
3681
3661
  }
@@ -3684,13 +3664,14 @@ const de_GetConnectAttachmentCommand = async (output, context) => {
3684
3664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3685
3665
  return de_GetConnectAttachmentCommandError(output, context);
3686
3666
  }
3687
- const contents = map({
3667
+ const contents = (0, smithy_client_1.map)({
3688
3668
  $metadata: deserializeMetadata(output),
3689
3669
  });
3690
3670
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3691
- if (data.ConnectAttachment != null) {
3692
- contents.ConnectAttachment = de_ConnectAttachment(data.ConnectAttachment, context);
3693
- }
3671
+ const doc = (0, smithy_client_1.take)(data, {
3672
+ ConnectAttachment: (_) => de_ConnectAttachment(_, context),
3673
+ });
3674
+ Object.assign(contents, doc);
3694
3675
  return contents;
3695
3676
  };
3696
3677
  exports.de_GetConnectAttachmentCommand = de_GetConnectAttachmentCommand;
@@ -3718,10 +3699,9 @@ const de_GetConnectAttachmentCommandError = async (output, context) => {
3718
3699
  throw await de_ValidationExceptionRes(parsedOutput, context);
3719
3700
  default:
3720
3701
  const parsedBody = parsedOutput.body;
3721
- (0, smithy_client_1.throwDefaultError)({
3702
+ return throwDefaultError({
3722
3703
  output,
3723
3704
  parsedBody,
3724
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3725
3705
  errorCode,
3726
3706
  });
3727
3707
  }
@@ -3730,16 +3710,15 @@ const de_GetConnectionsCommand = async (output, context) => {
3730
3710
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3731
3711
  return de_GetConnectionsCommandError(output, context);
3732
3712
  }
3733
- const contents = map({
3713
+ const contents = (0, smithy_client_1.map)({
3734
3714
  $metadata: deserializeMetadata(output),
3735
3715
  });
3736
3716
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3737
- if (data.Connections != null) {
3738
- contents.Connections = de_ConnectionList(data.Connections, context);
3739
- }
3740
- if (data.NextToken != null) {
3741
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3742
- }
3717
+ const doc = (0, smithy_client_1.take)(data, {
3718
+ Connections: (_) => de_ConnectionList(_, context),
3719
+ NextToken: smithy_client_1.expectString,
3720
+ });
3721
+ Object.assign(contents, doc);
3743
3722
  return contents;
3744
3723
  };
3745
3724
  exports.de_GetConnectionsCommand = de_GetConnectionsCommand;
@@ -3767,10 +3746,9 @@ const de_GetConnectionsCommandError = async (output, context) => {
3767
3746
  throw await de_ValidationExceptionRes(parsedOutput, context);
3768
3747
  default:
3769
3748
  const parsedBody = parsedOutput.body;
3770
- (0, smithy_client_1.throwDefaultError)({
3749
+ return throwDefaultError({
3771
3750
  output,
3772
3751
  parsedBody,
3773
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3774
3752
  errorCode,
3775
3753
  });
3776
3754
  }
@@ -3779,13 +3757,14 @@ const de_GetConnectPeerCommand = async (output, context) => {
3779
3757
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3780
3758
  return de_GetConnectPeerCommandError(output, context);
3781
3759
  }
3782
- const contents = map({
3760
+ const contents = (0, smithy_client_1.map)({
3783
3761
  $metadata: deserializeMetadata(output),
3784
3762
  });
3785
3763
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3786
- if (data.ConnectPeer != null) {
3787
- contents.ConnectPeer = de_ConnectPeer(data.ConnectPeer, context);
3788
- }
3764
+ const doc = (0, smithy_client_1.take)(data, {
3765
+ ConnectPeer: (_) => de_ConnectPeer(_, context),
3766
+ });
3767
+ Object.assign(contents, doc);
3789
3768
  return contents;
3790
3769
  };
3791
3770
  exports.de_GetConnectPeerCommand = de_GetConnectPeerCommand;
@@ -3813,10 +3792,9 @@ const de_GetConnectPeerCommandError = async (output, context) => {
3813
3792
  throw await de_ValidationExceptionRes(parsedOutput, context);
3814
3793
  default:
3815
3794
  const parsedBody = parsedOutput.body;
3816
- (0, smithy_client_1.throwDefaultError)({
3795
+ return throwDefaultError({
3817
3796
  output,
3818
3797
  parsedBody,
3819
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3820
3798
  errorCode,
3821
3799
  });
3822
3800
  }
@@ -3825,16 +3803,15 @@ const de_GetConnectPeerAssociationsCommand = async (output, context) => {
3825
3803
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3826
3804
  return de_GetConnectPeerAssociationsCommandError(output, context);
3827
3805
  }
3828
- const contents = map({
3806
+ const contents = (0, smithy_client_1.map)({
3829
3807
  $metadata: deserializeMetadata(output),
3830
3808
  });
3831
3809
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3832
- if (data.ConnectPeerAssociations != null) {
3833
- contents.ConnectPeerAssociations = de_ConnectPeerAssociationList(data.ConnectPeerAssociations, context);
3834
- }
3835
- if (data.NextToken != null) {
3836
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3837
- }
3810
+ const doc = (0, smithy_client_1.take)(data, {
3811
+ ConnectPeerAssociations: smithy_client_1._json,
3812
+ NextToken: smithy_client_1.expectString,
3813
+ });
3814
+ Object.assign(contents, doc);
3838
3815
  return contents;
3839
3816
  };
3840
3817
  exports.de_GetConnectPeerAssociationsCommand = de_GetConnectPeerAssociationsCommand;
@@ -3865,10 +3842,9 @@ const de_GetConnectPeerAssociationsCommandError = async (output, context) => {
3865
3842
  throw await de_ValidationExceptionRes(parsedOutput, context);
3866
3843
  default:
3867
3844
  const parsedBody = parsedOutput.body;
3868
- (0, smithy_client_1.throwDefaultError)({
3845
+ return throwDefaultError({
3869
3846
  output,
3870
3847
  parsedBody,
3871
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3872
3848
  errorCode,
3873
3849
  });
3874
3850
  }
@@ -3877,13 +3853,14 @@ const de_GetCoreNetworkCommand = async (output, context) => {
3877
3853
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3878
3854
  return de_GetCoreNetworkCommandError(output, context);
3879
3855
  }
3880
- const contents = map({
3856
+ const contents = (0, smithy_client_1.map)({
3881
3857
  $metadata: deserializeMetadata(output),
3882
3858
  });
3883
3859
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3884
- if (data.CoreNetwork != null) {
3885
- contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context);
3886
- }
3860
+ const doc = (0, smithy_client_1.take)(data, {
3861
+ CoreNetwork: (_) => de_CoreNetwork(_, context),
3862
+ });
3863
+ Object.assign(contents, doc);
3887
3864
  return contents;
3888
3865
  };
3889
3866
  exports.de_GetCoreNetworkCommand = de_GetCoreNetworkCommand;
@@ -3911,10 +3888,9 @@ const de_GetCoreNetworkCommandError = async (output, context) => {
3911
3888
  throw await de_ValidationExceptionRes(parsedOutput, context);
3912
3889
  default:
3913
3890
  const parsedBody = parsedOutput.body;
3914
- (0, smithy_client_1.throwDefaultError)({
3891
+ return throwDefaultError({
3915
3892
  output,
3916
3893
  parsedBody,
3917
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3918
3894
  errorCode,
3919
3895
  });
3920
3896
  }
@@ -3923,16 +3899,15 @@ const de_GetCoreNetworkChangeEventsCommand = async (output, context) => {
3923
3899
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3924
3900
  return de_GetCoreNetworkChangeEventsCommandError(output, context);
3925
3901
  }
3926
- const contents = map({
3902
+ const contents = (0, smithy_client_1.map)({
3927
3903
  $metadata: deserializeMetadata(output),
3928
3904
  });
3929
3905
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3930
- if (data.CoreNetworkChangeEvents != null) {
3931
- contents.CoreNetworkChangeEvents = de_CoreNetworkChangeEventList(data.CoreNetworkChangeEvents, context);
3932
- }
3933
- if (data.NextToken != null) {
3934
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3935
- }
3906
+ const doc = (0, smithy_client_1.take)(data, {
3907
+ CoreNetworkChangeEvents: (_) => de_CoreNetworkChangeEventList(_, context),
3908
+ NextToken: smithy_client_1.expectString,
3909
+ });
3910
+ Object.assign(contents, doc);
3936
3911
  return contents;
3937
3912
  };
3938
3913
  exports.de_GetCoreNetworkChangeEventsCommand = de_GetCoreNetworkChangeEventsCommand;
@@ -3960,10 +3935,9 @@ const de_GetCoreNetworkChangeEventsCommandError = async (output, context) => {
3960
3935
  throw await de_ValidationExceptionRes(parsedOutput, context);
3961
3936
  default:
3962
3937
  const parsedBody = parsedOutput.body;
3963
- (0, smithy_client_1.throwDefaultError)({
3938
+ return throwDefaultError({
3964
3939
  output,
3965
3940
  parsedBody,
3966
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
3967
3941
  errorCode,
3968
3942
  });
3969
3943
  }
@@ -3972,16 +3946,15 @@ const de_GetCoreNetworkChangeSetCommand = async (output, context) => {
3972
3946
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3973
3947
  return de_GetCoreNetworkChangeSetCommandError(output, context);
3974
3948
  }
3975
- const contents = map({
3949
+ const contents = (0, smithy_client_1.map)({
3976
3950
  $metadata: deserializeMetadata(output),
3977
3951
  });
3978
3952
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
3979
- if (data.CoreNetworkChanges != null) {
3980
- contents.CoreNetworkChanges = de_CoreNetworkChangeList(data.CoreNetworkChanges, context);
3981
- }
3982
- if (data.NextToken != null) {
3983
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
3984
- }
3953
+ const doc = (0, smithy_client_1.take)(data, {
3954
+ CoreNetworkChanges: smithy_client_1._json,
3955
+ NextToken: smithy_client_1.expectString,
3956
+ });
3957
+ Object.assign(contents, doc);
3985
3958
  return contents;
3986
3959
  };
3987
3960
  exports.de_GetCoreNetworkChangeSetCommand = de_GetCoreNetworkChangeSetCommand;
@@ -4009,10 +3982,9 @@ const de_GetCoreNetworkChangeSetCommandError = async (output, context) => {
4009
3982
  throw await de_ValidationExceptionRes(parsedOutput, context);
4010
3983
  default:
4011
3984
  const parsedBody = parsedOutput.body;
4012
- (0, smithy_client_1.throwDefaultError)({
3985
+ return throwDefaultError({
4013
3986
  output,
4014
3987
  parsedBody,
4015
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4016
3988
  errorCode,
4017
3989
  });
4018
3990
  }
@@ -4021,13 +3993,14 @@ const de_GetCoreNetworkPolicyCommand = async (output, context) => {
4021
3993
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4022
3994
  return de_GetCoreNetworkPolicyCommandError(output, context);
4023
3995
  }
4024
- const contents = map({
3996
+ const contents = (0, smithy_client_1.map)({
4025
3997
  $metadata: deserializeMetadata(output),
4026
3998
  });
4027
3999
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4028
- if (data.CoreNetworkPolicy != null) {
4029
- contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context);
4030
- }
4000
+ const doc = (0, smithy_client_1.take)(data, {
4001
+ CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context),
4002
+ });
4003
+ Object.assign(contents, doc);
4031
4004
  return contents;
4032
4005
  };
4033
4006
  exports.de_GetCoreNetworkPolicyCommand = de_GetCoreNetworkPolicyCommand;
@@ -4055,10 +4028,9 @@ const de_GetCoreNetworkPolicyCommandError = async (output, context) => {
4055
4028
  throw await de_ValidationExceptionRes(parsedOutput, context);
4056
4029
  default:
4057
4030
  const parsedBody = parsedOutput.body;
4058
- (0, smithy_client_1.throwDefaultError)({
4031
+ return throwDefaultError({
4059
4032
  output,
4060
4033
  parsedBody,
4061
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4062
4034
  errorCode,
4063
4035
  });
4064
4036
  }
@@ -4067,16 +4039,15 @@ const de_GetCustomerGatewayAssociationsCommand = async (output, context) => {
4067
4039
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4068
4040
  return de_GetCustomerGatewayAssociationsCommandError(output, context);
4069
4041
  }
4070
- const contents = map({
4042
+ const contents = (0, smithy_client_1.map)({
4071
4043
  $metadata: deserializeMetadata(output),
4072
4044
  });
4073
4045
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4074
- if (data.CustomerGatewayAssociations != null) {
4075
- contents.CustomerGatewayAssociations = de_CustomerGatewayAssociationList(data.CustomerGatewayAssociations, context);
4076
- }
4077
- if (data.NextToken != null) {
4078
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4079
- }
4046
+ const doc = (0, smithy_client_1.take)(data, {
4047
+ CustomerGatewayAssociations: smithy_client_1._json,
4048
+ NextToken: smithy_client_1.expectString,
4049
+ });
4050
+ Object.assign(contents, doc);
4080
4051
  return contents;
4081
4052
  };
4082
4053
  exports.de_GetCustomerGatewayAssociationsCommand = de_GetCustomerGatewayAssociationsCommand;
@@ -4107,10 +4078,9 @@ const de_GetCustomerGatewayAssociationsCommandError = async (output, context) =>
4107
4078
  throw await de_ValidationExceptionRes(parsedOutput, context);
4108
4079
  default:
4109
4080
  const parsedBody = parsedOutput.body;
4110
- (0, smithy_client_1.throwDefaultError)({
4081
+ return throwDefaultError({
4111
4082
  output,
4112
4083
  parsedBody,
4113
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4114
4084
  errorCode,
4115
4085
  });
4116
4086
  }
@@ -4119,16 +4089,15 @@ const de_GetDevicesCommand = async (output, context) => {
4119
4089
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4120
4090
  return de_GetDevicesCommandError(output, context);
4121
4091
  }
4122
- const contents = map({
4092
+ const contents = (0, smithy_client_1.map)({
4123
4093
  $metadata: deserializeMetadata(output),
4124
4094
  });
4125
4095
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4126
- if (data.Devices != null) {
4127
- contents.Devices = de_DeviceList(data.Devices, context);
4128
- }
4129
- if (data.NextToken != null) {
4130
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4131
- }
4096
+ const doc = (0, smithy_client_1.take)(data, {
4097
+ Devices: (_) => de_DeviceList(_, context),
4098
+ NextToken: smithy_client_1.expectString,
4099
+ });
4100
+ Object.assign(contents, doc);
4132
4101
  return contents;
4133
4102
  };
4134
4103
  exports.de_GetDevicesCommand = de_GetDevicesCommand;
@@ -4156,10 +4125,9 @@ const de_GetDevicesCommandError = async (output, context) => {
4156
4125
  throw await de_ValidationExceptionRes(parsedOutput, context);
4157
4126
  default:
4158
4127
  const parsedBody = parsedOutput.body;
4159
- (0, smithy_client_1.throwDefaultError)({
4128
+ return throwDefaultError({
4160
4129
  output,
4161
4130
  parsedBody,
4162
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4163
4131
  errorCode,
4164
4132
  });
4165
4133
  }
@@ -4168,16 +4136,15 @@ const de_GetLinkAssociationsCommand = async (output, context) => {
4168
4136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4169
4137
  return de_GetLinkAssociationsCommandError(output, context);
4170
4138
  }
4171
- const contents = map({
4139
+ const contents = (0, smithy_client_1.map)({
4172
4140
  $metadata: deserializeMetadata(output),
4173
4141
  });
4174
4142
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4175
- if (data.LinkAssociations != null) {
4176
- contents.LinkAssociations = de_LinkAssociationList(data.LinkAssociations, context);
4177
- }
4178
- if (data.NextToken != null) {
4179
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4180
- }
4143
+ const doc = (0, smithy_client_1.take)(data, {
4144
+ LinkAssociations: smithy_client_1._json,
4145
+ NextToken: smithy_client_1.expectString,
4146
+ });
4147
+ Object.assign(contents, doc);
4181
4148
  return contents;
4182
4149
  };
4183
4150
  exports.de_GetLinkAssociationsCommand = de_GetLinkAssociationsCommand;
@@ -4205,10 +4172,9 @@ const de_GetLinkAssociationsCommandError = async (output, context) => {
4205
4172
  throw await de_ValidationExceptionRes(parsedOutput, context);
4206
4173
  default:
4207
4174
  const parsedBody = parsedOutput.body;
4208
- (0, smithy_client_1.throwDefaultError)({
4175
+ return throwDefaultError({
4209
4176
  output,
4210
4177
  parsedBody,
4211
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4212
4178
  errorCode,
4213
4179
  });
4214
4180
  }
@@ -4217,16 +4183,15 @@ const de_GetLinksCommand = async (output, context) => {
4217
4183
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4218
4184
  return de_GetLinksCommandError(output, context);
4219
4185
  }
4220
- const contents = map({
4186
+ const contents = (0, smithy_client_1.map)({
4221
4187
  $metadata: deserializeMetadata(output),
4222
4188
  });
4223
4189
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4224
- if (data.Links != null) {
4225
- contents.Links = de_LinkList(data.Links, context);
4226
- }
4227
- if (data.NextToken != null) {
4228
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4229
- }
4190
+ const doc = (0, smithy_client_1.take)(data, {
4191
+ Links: (_) => de_LinkList(_, context),
4192
+ NextToken: smithy_client_1.expectString,
4193
+ });
4194
+ Object.assign(contents, doc);
4230
4195
  return contents;
4231
4196
  };
4232
4197
  exports.de_GetLinksCommand = de_GetLinksCommand;
@@ -4254,10 +4219,9 @@ const de_GetLinksCommandError = async (output, context) => {
4254
4219
  throw await de_ValidationExceptionRes(parsedOutput, context);
4255
4220
  default:
4256
4221
  const parsedBody = parsedOutput.body;
4257
- (0, smithy_client_1.throwDefaultError)({
4222
+ return throwDefaultError({
4258
4223
  output,
4259
4224
  parsedBody,
4260
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4261
4225
  errorCode,
4262
4226
  });
4263
4227
  }
@@ -4266,16 +4230,15 @@ const de_GetNetworkResourceCountsCommand = async (output, context) => {
4266
4230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4267
4231
  return de_GetNetworkResourceCountsCommandError(output, context);
4268
4232
  }
4269
- const contents = map({
4233
+ const contents = (0, smithy_client_1.map)({
4270
4234
  $metadata: deserializeMetadata(output),
4271
4235
  });
4272
4236
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4273
- if (data.NetworkResourceCounts != null) {
4274
- contents.NetworkResourceCounts = de_NetworkResourceCountList(data.NetworkResourceCounts, context);
4275
- }
4276
- if (data.NextToken != null) {
4277
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4278
- }
4237
+ const doc = (0, smithy_client_1.take)(data, {
4238
+ NetworkResourceCounts: smithy_client_1._json,
4239
+ NextToken: smithy_client_1.expectString,
4240
+ });
4241
+ Object.assign(contents, doc);
4279
4242
  return contents;
4280
4243
  };
4281
4244
  exports.de_GetNetworkResourceCountsCommand = de_GetNetworkResourceCountsCommand;
@@ -4300,10 +4263,9 @@ const de_GetNetworkResourceCountsCommandError = async (output, context) => {
4300
4263
  throw await de_ValidationExceptionRes(parsedOutput, context);
4301
4264
  default:
4302
4265
  const parsedBody = parsedOutput.body;
4303
- (0, smithy_client_1.throwDefaultError)({
4266
+ return throwDefaultError({
4304
4267
  output,
4305
4268
  parsedBody,
4306
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4307
4269
  errorCode,
4308
4270
  });
4309
4271
  }
@@ -4312,16 +4274,15 @@ const de_GetNetworkResourceRelationshipsCommand = async (output, context) => {
4312
4274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4313
4275
  return de_GetNetworkResourceRelationshipsCommandError(output, context);
4314
4276
  }
4315
- const contents = map({
4277
+ const contents = (0, smithy_client_1.map)({
4316
4278
  $metadata: deserializeMetadata(output),
4317
4279
  });
4318
4280
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4319
- if (data.NextToken != null) {
4320
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4321
- }
4322
- if (data.Relationships != null) {
4323
- contents.Relationships = de_RelationshipList(data.Relationships, context);
4324
- }
4281
+ const doc = (0, smithy_client_1.take)(data, {
4282
+ NextToken: smithy_client_1.expectString,
4283
+ Relationships: smithy_client_1._json,
4284
+ });
4285
+ Object.assign(contents, doc);
4325
4286
  return contents;
4326
4287
  };
4327
4288
  exports.de_GetNetworkResourceRelationshipsCommand = de_GetNetworkResourceRelationshipsCommand;
@@ -4349,10 +4310,9 @@ const de_GetNetworkResourceRelationshipsCommandError = async (output, context) =
4349
4310
  throw await de_ValidationExceptionRes(parsedOutput, context);
4350
4311
  default:
4351
4312
  const parsedBody = parsedOutput.body;
4352
- (0, smithy_client_1.throwDefaultError)({
4313
+ return throwDefaultError({
4353
4314
  output,
4354
4315
  parsedBody,
4355
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4356
4316
  errorCode,
4357
4317
  });
4358
4318
  }
@@ -4361,16 +4321,15 @@ const de_GetNetworkResourcesCommand = async (output, context) => {
4361
4321
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4362
4322
  return de_GetNetworkResourcesCommandError(output, context);
4363
4323
  }
4364
- const contents = map({
4324
+ const contents = (0, smithy_client_1.map)({
4365
4325
  $metadata: deserializeMetadata(output),
4366
4326
  });
4367
4327
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4368
- if (data.NetworkResources != null) {
4369
- contents.NetworkResources = de_NetworkResourceList(data.NetworkResources, context);
4370
- }
4371
- if (data.NextToken != null) {
4372
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4373
- }
4328
+ const doc = (0, smithy_client_1.take)(data, {
4329
+ NetworkResources: (_) => de_NetworkResourceList(_, context),
4330
+ NextToken: smithy_client_1.expectString,
4331
+ });
4332
+ Object.assign(contents, doc);
4374
4333
  return contents;
4375
4334
  };
4376
4335
  exports.de_GetNetworkResourcesCommand = de_GetNetworkResourcesCommand;
@@ -4398,10 +4357,9 @@ const de_GetNetworkResourcesCommandError = async (output, context) => {
4398
4357
  throw await de_ValidationExceptionRes(parsedOutput, context);
4399
4358
  default:
4400
4359
  const parsedBody = parsedOutput.body;
4401
- (0, smithy_client_1.throwDefaultError)({
4360
+ return throwDefaultError({
4402
4361
  output,
4403
4362
  parsedBody,
4404
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4405
4363
  errorCode,
4406
4364
  });
4407
4365
  }
@@ -4410,25 +4368,18 @@ const de_GetNetworkRoutesCommand = async (output, context) => {
4410
4368
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4411
4369
  return de_GetNetworkRoutesCommandError(output, context);
4412
4370
  }
4413
- const contents = map({
4371
+ const contents = (0, smithy_client_1.map)({
4414
4372
  $metadata: deserializeMetadata(output),
4415
4373
  });
4416
4374
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4417
- if (data.CoreNetworkSegmentEdge != null) {
4418
- contents.CoreNetworkSegmentEdge = de_CoreNetworkSegmentEdgeIdentifier(data.CoreNetworkSegmentEdge, context);
4419
- }
4420
- if (data.NetworkRoutes != null) {
4421
- contents.NetworkRoutes = de_NetworkRouteList(data.NetworkRoutes, context);
4422
- }
4423
- if (data.RouteTableArn != null) {
4424
- contents.RouteTableArn = (0, smithy_client_1.expectString)(data.RouteTableArn);
4425
- }
4426
- if (data.RouteTableTimestamp != null) {
4427
- contents.RouteTableTimestamp = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.RouteTableTimestamp)));
4428
- }
4429
- if (data.RouteTableType != null) {
4430
- contents.RouteTableType = (0, smithy_client_1.expectString)(data.RouteTableType);
4431
- }
4375
+ const doc = (0, smithy_client_1.take)(data, {
4376
+ CoreNetworkSegmentEdge: smithy_client_1._json,
4377
+ NetworkRoutes: smithy_client_1._json,
4378
+ RouteTableArn: smithy_client_1.expectString,
4379
+ RouteTableTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4380
+ RouteTableType: smithy_client_1.expectString,
4381
+ });
4382
+ Object.assign(contents, doc);
4432
4383
  return contents;
4433
4384
  };
4434
4385
  exports.de_GetNetworkRoutesCommand = de_GetNetworkRoutesCommand;
@@ -4456,10 +4407,9 @@ const de_GetNetworkRoutesCommandError = async (output, context) => {
4456
4407
  throw await de_ValidationExceptionRes(parsedOutput, context);
4457
4408
  default:
4458
4409
  const parsedBody = parsedOutput.body;
4459
- (0, smithy_client_1.throwDefaultError)({
4410
+ return throwDefaultError({
4460
4411
  output,
4461
4412
  parsedBody,
4462
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4463
4413
  errorCode,
4464
4414
  });
4465
4415
  }
@@ -4468,16 +4418,15 @@ const de_GetNetworkTelemetryCommand = async (output, context) => {
4468
4418
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4469
4419
  return de_GetNetworkTelemetryCommandError(output, context);
4470
4420
  }
4471
- const contents = map({
4421
+ const contents = (0, smithy_client_1.map)({
4472
4422
  $metadata: deserializeMetadata(output),
4473
4423
  });
4474
4424
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4475
- if (data.NetworkTelemetry != null) {
4476
- contents.NetworkTelemetry = de_NetworkTelemetryList(data.NetworkTelemetry, context);
4477
- }
4478
- if (data.NextToken != null) {
4479
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4480
- }
4425
+ const doc = (0, smithy_client_1.take)(data, {
4426
+ NetworkTelemetry: (_) => de_NetworkTelemetryList(_, context),
4427
+ NextToken: smithy_client_1.expectString,
4428
+ });
4429
+ Object.assign(contents, doc);
4481
4430
  return contents;
4482
4431
  };
4483
4432
  exports.de_GetNetworkTelemetryCommand = de_GetNetworkTelemetryCommand;
@@ -4505,10 +4454,9 @@ const de_GetNetworkTelemetryCommandError = async (output, context) => {
4505
4454
  throw await de_ValidationExceptionRes(parsedOutput, context);
4506
4455
  default:
4507
4456
  const parsedBody = parsedOutput.body;
4508
- (0, smithy_client_1.throwDefaultError)({
4457
+ return throwDefaultError({
4509
4458
  output,
4510
4459
  parsedBody,
4511
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4512
4460
  errorCode,
4513
4461
  });
4514
4462
  }
@@ -4517,13 +4465,14 @@ const de_GetResourcePolicyCommand = async (output, context) => {
4517
4465
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4518
4466
  return de_GetResourcePolicyCommandError(output, context);
4519
4467
  }
4520
- const contents = map({
4468
+ const contents = (0, smithy_client_1.map)({
4521
4469
  $metadata: deserializeMetadata(output),
4522
4470
  });
4523
4471
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4524
- if (data.PolicyDocument != null) {
4525
- contents.PolicyDocument = new smithy_client_1.LazyJsonString(data.PolicyDocument);
4526
- }
4472
+ const doc = (0, smithy_client_1.take)(data, {
4473
+ PolicyDocument: (_) => new smithy_client_1.LazyJsonString(_),
4474
+ });
4475
+ Object.assign(contents, doc);
4527
4476
  return contents;
4528
4477
  };
4529
4478
  exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
@@ -4548,10 +4497,9 @@ const de_GetResourcePolicyCommandError = async (output, context) => {
4548
4497
  throw await de_ValidationExceptionRes(parsedOutput, context);
4549
4498
  default:
4550
4499
  const parsedBody = parsedOutput.body;
4551
- (0, smithy_client_1.throwDefaultError)({
4500
+ return throwDefaultError({
4552
4501
  output,
4553
4502
  parsedBody,
4554
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4555
4503
  errorCode,
4556
4504
  });
4557
4505
  }
@@ -4560,13 +4508,14 @@ const de_GetRouteAnalysisCommand = async (output, context) => {
4560
4508
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4561
4509
  return de_GetRouteAnalysisCommandError(output, context);
4562
4510
  }
4563
- const contents = map({
4511
+ const contents = (0, smithy_client_1.map)({
4564
4512
  $metadata: deserializeMetadata(output),
4565
4513
  });
4566
4514
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4567
- if (data.RouteAnalysis != null) {
4568
- contents.RouteAnalysis = de_RouteAnalysis(data.RouteAnalysis, context);
4569
- }
4515
+ const doc = (0, smithy_client_1.take)(data, {
4516
+ RouteAnalysis: (_) => de_RouteAnalysis(_, context),
4517
+ });
4518
+ Object.assign(contents, doc);
4570
4519
  return contents;
4571
4520
  };
4572
4521
  exports.de_GetRouteAnalysisCommand = de_GetRouteAnalysisCommand;
@@ -4594,10 +4543,9 @@ const de_GetRouteAnalysisCommandError = async (output, context) => {
4594
4543
  throw await de_ValidationExceptionRes(parsedOutput, context);
4595
4544
  default:
4596
4545
  const parsedBody = parsedOutput.body;
4597
- (0, smithy_client_1.throwDefaultError)({
4546
+ return throwDefaultError({
4598
4547
  output,
4599
4548
  parsedBody,
4600
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4601
4549
  errorCode,
4602
4550
  });
4603
4551
  }
@@ -4606,16 +4554,15 @@ const de_GetSitesCommand = async (output, context) => {
4606
4554
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4607
4555
  return de_GetSitesCommandError(output, context);
4608
4556
  }
4609
- const contents = map({
4557
+ const contents = (0, smithy_client_1.map)({
4610
4558
  $metadata: deserializeMetadata(output),
4611
4559
  });
4612
4560
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4613
- if (data.NextToken != null) {
4614
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4615
- }
4616
- if (data.Sites != null) {
4617
- contents.Sites = de_SiteList(data.Sites, context);
4618
- }
4561
+ const doc = (0, smithy_client_1.take)(data, {
4562
+ NextToken: smithy_client_1.expectString,
4563
+ Sites: (_) => de_SiteList(_, context),
4564
+ });
4565
+ Object.assign(contents, doc);
4619
4566
  return contents;
4620
4567
  };
4621
4568
  exports.de_GetSitesCommand = de_GetSitesCommand;
@@ -4643,10 +4590,9 @@ const de_GetSitesCommandError = async (output, context) => {
4643
4590
  throw await de_ValidationExceptionRes(parsedOutput, context);
4644
4591
  default:
4645
4592
  const parsedBody = parsedOutput.body;
4646
- (0, smithy_client_1.throwDefaultError)({
4593
+ return throwDefaultError({
4647
4594
  output,
4648
4595
  parsedBody,
4649
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4650
4596
  errorCode,
4651
4597
  });
4652
4598
  }
@@ -4655,13 +4601,14 @@ const de_GetSiteToSiteVpnAttachmentCommand = async (output, context) => {
4655
4601
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4656
4602
  return de_GetSiteToSiteVpnAttachmentCommandError(output, context);
4657
4603
  }
4658
- const contents = map({
4604
+ const contents = (0, smithy_client_1.map)({
4659
4605
  $metadata: deserializeMetadata(output),
4660
4606
  });
4661
4607
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4662
- if (data.SiteToSiteVpnAttachment != null) {
4663
- contents.SiteToSiteVpnAttachment = de_SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context);
4664
- }
4608
+ const doc = (0, smithy_client_1.take)(data, {
4609
+ SiteToSiteVpnAttachment: (_) => de_SiteToSiteVpnAttachment(_, context),
4610
+ });
4611
+ Object.assign(contents, doc);
4665
4612
  return contents;
4666
4613
  };
4667
4614
  exports.de_GetSiteToSiteVpnAttachmentCommand = de_GetSiteToSiteVpnAttachmentCommand;
@@ -4689,10 +4636,9 @@ const de_GetSiteToSiteVpnAttachmentCommandError = async (output, context) => {
4689
4636
  throw await de_ValidationExceptionRes(parsedOutput, context);
4690
4637
  default:
4691
4638
  const parsedBody = parsedOutput.body;
4692
- (0, smithy_client_1.throwDefaultError)({
4639
+ return throwDefaultError({
4693
4640
  output,
4694
4641
  parsedBody,
4695
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4696
4642
  errorCode,
4697
4643
  });
4698
4644
  }
@@ -4701,16 +4647,15 @@ const de_GetTransitGatewayConnectPeerAssociationsCommand = async (output, contex
4701
4647
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4702
4648
  return de_GetTransitGatewayConnectPeerAssociationsCommandError(output, context);
4703
4649
  }
4704
- const contents = map({
4650
+ const contents = (0, smithy_client_1.map)({
4705
4651
  $metadata: deserializeMetadata(output),
4706
4652
  });
4707
4653
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4708
- if (data.NextToken != null) {
4709
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4710
- }
4711
- if (data.TransitGatewayConnectPeerAssociations != null) {
4712
- contents.TransitGatewayConnectPeerAssociations = de_TransitGatewayConnectPeerAssociationList(data.TransitGatewayConnectPeerAssociations, context);
4713
- }
4654
+ const doc = (0, smithy_client_1.take)(data, {
4655
+ NextToken: smithy_client_1.expectString,
4656
+ TransitGatewayConnectPeerAssociations: smithy_client_1._json,
4657
+ });
4658
+ Object.assign(contents, doc);
4714
4659
  return contents;
4715
4660
  };
4716
4661
  exports.de_GetTransitGatewayConnectPeerAssociationsCommand = de_GetTransitGatewayConnectPeerAssociationsCommand;
@@ -4741,10 +4686,9 @@ const de_GetTransitGatewayConnectPeerAssociationsCommandError = async (output, c
4741
4686
  throw await de_ValidationExceptionRes(parsedOutput, context);
4742
4687
  default:
4743
4688
  const parsedBody = parsedOutput.body;
4744
- (0, smithy_client_1.throwDefaultError)({
4689
+ return throwDefaultError({
4745
4690
  output,
4746
4691
  parsedBody,
4747
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4748
4692
  errorCode,
4749
4693
  });
4750
4694
  }
@@ -4753,13 +4697,14 @@ const de_GetTransitGatewayPeeringCommand = async (output, context) => {
4753
4697
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4754
4698
  return de_GetTransitGatewayPeeringCommandError(output, context);
4755
4699
  }
4756
- const contents = map({
4700
+ const contents = (0, smithy_client_1.map)({
4757
4701
  $metadata: deserializeMetadata(output),
4758
4702
  });
4759
4703
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4760
- if (data.TransitGatewayPeering != null) {
4761
- contents.TransitGatewayPeering = de_TransitGatewayPeering(data.TransitGatewayPeering, context);
4762
- }
4704
+ const doc = (0, smithy_client_1.take)(data, {
4705
+ TransitGatewayPeering: (_) => de_TransitGatewayPeering(_, context),
4706
+ });
4707
+ Object.assign(contents, doc);
4763
4708
  return contents;
4764
4709
  };
4765
4710
  exports.de_GetTransitGatewayPeeringCommand = de_GetTransitGatewayPeeringCommand;
@@ -4787,10 +4732,9 @@ const de_GetTransitGatewayPeeringCommandError = async (output, context) => {
4787
4732
  throw await de_ValidationExceptionRes(parsedOutput, context);
4788
4733
  default:
4789
4734
  const parsedBody = parsedOutput.body;
4790
- (0, smithy_client_1.throwDefaultError)({
4735
+ return throwDefaultError({
4791
4736
  output,
4792
4737
  parsedBody,
4793
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4794
4738
  errorCode,
4795
4739
  });
4796
4740
  }
@@ -4799,16 +4743,15 @@ const de_GetTransitGatewayRegistrationsCommand = async (output, context) => {
4799
4743
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4800
4744
  return de_GetTransitGatewayRegistrationsCommandError(output, context);
4801
4745
  }
4802
- const contents = map({
4746
+ const contents = (0, smithy_client_1.map)({
4803
4747
  $metadata: deserializeMetadata(output),
4804
4748
  });
4805
4749
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4806
- if (data.NextToken != null) {
4807
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4808
- }
4809
- if (data.TransitGatewayRegistrations != null) {
4810
- contents.TransitGatewayRegistrations = de_TransitGatewayRegistrationList(data.TransitGatewayRegistrations, context);
4811
- }
4750
+ const doc = (0, smithy_client_1.take)(data, {
4751
+ NextToken: smithy_client_1.expectString,
4752
+ TransitGatewayRegistrations: smithy_client_1._json,
4753
+ });
4754
+ Object.assign(contents, doc);
4812
4755
  return contents;
4813
4756
  };
4814
4757
  exports.de_GetTransitGatewayRegistrationsCommand = de_GetTransitGatewayRegistrationsCommand;
@@ -4836,10 +4779,9 @@ const de_GetTransitGatewayRegistrationsCommandError = async (output, context) =>
4836
4779
  throw await de_ValidationExceptionRes(parsedOutput, context);
4837
4780
  default:
4838
4781
  const parsedBody = parsedOutput.body;
4839
- (0, smithy_client_1.throwDefaultError)({
4782
+ return throwDefaultError({
4840
4783
  output,
4841
4784
  parsedBody,
4842
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4843
4785
  errorCode,
4844
4786
  });
4845
4787
  }
@@ -4848,13 +4790,14 @@ const de_GetTransitGatewayRouteTableAttachmentCommand = async (output, context)
4848
4790
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4849
4791
  return de_GetTransitGatewayRouteTableAttachmentCommandError(output, context);
4850
4792
  }
4851
- const contents = map({
4793
+ const contents = (0, smithy_client_1.map)({
4852
4794
  $metadata: deserializeMetadata(output),
4853
4795
  });
4854
4796
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4855
- if (data.TransitGatewayRouteTableAttachment != null) {
4856
- contents.TransitGatewayRouteTableAttachment = de_TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
4857
- }
4797
+ const doc = (0, smithy_client_1.take)(data, {
4798
+ TransitGatewayRouteTableAttachment: (_) => de_TransitGatewayRouteTableAttachment(_, context),
4799
+ });
4800
+ Object.assign(contents, doc);
4858
4801
  return contents;
4859
4802
  };
4860
4803
  exports.de_GetTransitGatewayRouteTableAttachmentCommand = de_GetTransitGatewayRouteTableAttachmentCommand;
@@ -4882,10 +4825,9 @@ const de_GetTransitGatewayRouteTableAttachmentCommandError = async (output, cont
4882
4825
  throw await de_ValidationExceptionRes(parsedOutput, context);
4883
4826
  default:
4884
4827
  const parsedBody = parsedOutput.body;
4885
- (0, smithy_client_1.throwDefaultError)({
4828
+ return throwDefaultError({
4886
4829
  output,
4887
4830
  parsedBody,
4888
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4889
4831
  errorCode,
4890
4832
  });
4891
4833
  }
@@ -4894,13 +4836,14 @@ const de_GetVpcAttachmentCommand = async (output, context) => {
4894
4836
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4895
4837
  return de_GetVpcAttachmentCommandError(output, context);
4896
4838
  }
4897
- const contents = map({
4839
+ const contents = (0, smithy_client_1.map)({
4898
4840
  $metadata: deserializeMetadata(output),
4899
4841
  });
4900
4842
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4901
- if (data.VpcAttachment != null) {
4902
- contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context);
4903
- }
4843
+ const doc = (0, smithy_client_1.take)(data, {
4844
+ VpcAttachment: (_) => de_VpcAttachment(_, context),
4845
+ });
4846
+ Object.assign(contents, doc);
4904
4847
  return contents;
4905
4848
  };
4906
4849
  exports.de_GetVpcAttachmentCommand = de_GetVpcAttachmentCommand;
@@ -4928,10 +4871,9 @@ const de_GetVpcAttachmentCommandError = async (output, context) => {
4928
4871
  throw await de_ValidationExceptionRes(parsedOutput, context);
4929
4872
  default:
4930
4873
  const parsedBody = parsedOutput.body;
4931
- (0, smithy_client_1.throwDefaultError)({
4874
+ return throwDefaultError({
4932
4875
  output,
4933
4876
  parsedBody,
4934
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4935
4877
  errorCode,
4936
4878
  });
4937
4879
  }
@@ -4940,16 +4882,15 @@ const de_ListAttachmentsCommand = async (output, context) => {
4940
4882
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4941
4883
  return de_ListAttachmentsCommandError(output, context);
4942
4884
  }
4943
- const contents = map({
4885
+ const contents = (0, smithy_client_1.map)({
4944
4886
  $metadata: deserializeMetadata(output),
4945
4887
  });
4946
4888
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4947
- if (data.Attachments != null) {
4948
- contents.Attachments = de_AttachmentList(data.Attachments, context);
4949
- }
4950
- if (data.NextToken != null) {
4951
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4952
- }
4889
+ const doc = (0, smithy_client_1.take)(data, {
4890
+ Attachments: (_) => de_AttachmentList(_, context),
4891
+ NextToken: smithy_client_1.expectString,
4892
+ });
4893
+ Object.assign(contents, doc);
4953
4894
  return contents;
4954
4895
  };
4955
4896
  exports.de_ListAttachmentsCommand = de_ListAttachmentsCommand;
@@ -4974,10 +4915,9 @@ const de_ListAttachmentsCommandError = async (output, context) => {
4974
4915
  throw await de_ValidationExceptionRes(parsedOutput, context);
4975
4916
  default:
4976
4917
  const parsedBody = parsedOutput.body;
4977
- (0, smithy_client_1.throwDefaultError)({
4918
+ return throwDefaultError({
4978
4919
  output,
4979
4920
  parsedBody,
4980
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
4981
4921
  errorCode,
4982
4922
  });
4983
4923
  }
@@ -4986,16 +4926,15 @@ const de_ListConnectPeersCommand = async (output, context) => {
4986
4926
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4987
4927
  return de_ListConnectPeersCommandError(output, context);
4988
4928
  }
4989
- const contents = map({
4929
+ const contents = (0, smithy_client_1.map)({
4990
4930
  $metadata: deserializeMetadata(output),
4991
4931
  });
4992
4932
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
4993
- if (data.ConnectPeers != null) {
4994
- contents.ConnectPeers = de_ConnectPeerSummaryList(data.ConnectPeers, context);
4995
- }
4996
- if (data.NextToken != null) {
4997
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
4998
- }
4933
+ const doc = (0, smithy_client_1.take)(data, {
4934
+ ConnectPeers: (_) => de_ConnectPeerSummaryList(_, context),
4935
+ NextToken: smithy_client_1.expectString,
4936
+ });
4937
+ Object.assign(contents, doc);
4999
4938
  return contents;
5000
4939
  };
5001
4940
  exports.de_ListConnectPeersCommand = de_ListConnectPeersCommand;
@@ -5020,10 +4959,9 @@ const de_ListConnectPeersCommandError = async (output, context) => {
5020
4959
  throw await de_ValidationExceptionRes(parsedOutput, context);
5021
4960
  default:
5022
4961
  const parsedBody = parsedOutput.body;
5023
- (0, smithy_client_1.throwDefaultError)({
4962
+ return throwDefaultError({
5024
4963
  output,
5025
4964
  parsedBody,
5026
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5027
4965
  errorCode,
5028
4966
  });
5029
4967
  }
@@ -5032,16 +4970,15 @@ const de_ListCoreNetworkPolicyVersionsCommand = async (output, context) => {
5032
4970
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5033
4971
  return de_ListCoreNetworkPolicyVersionsCommandError(output, context);
5034
4972
  }
5035
- const contents = map({
4973
+ const contents = (0, smithy_client_1.map)({
5036
4974
  $metadata: deserializeMetadata(output),
5037
4975
  });
5038
4976
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5039
- if (data.CoreNetworkPolicyVersions != null) {
5040
- contents.CoreNetworkPolicyVersions = de_CoreNetworkPolicyVersionList(data.CoreNetworkPolicyVersions, context);
5041
- }
5042
- if (data.NextToken != null) {
5043
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
5044
- }
4977
+ const doc = (0, smithy_client_1.take)(data, {
4978
+ CoreNetworkPolicyVersions: (_) => de_CoreNetworkPolicyVersionList(_, context),
4979
+ NextToken: smithy_client_1.expectString,
4980
+ });
4981
+ Object.assign(contents, doc);
5045
4982
  return contents;
5046
4983
  };
5047
4984
  exports.de_ListCoreNetworkPolicyVersionsCommand = de_ListCoreNetworkPolicyVersionsCommand;
@@ -5069,10 +5006,9 @@ const de_ListCoreNetworkPolicyVersionsCommandError = async (output, context) =>
5069
5006
  throw await de_ValidationExceptionRes(parsedOutput, context);
5070
5007
  default:
5071
5008
  const parsedBody = parsedOutput.body;
5072
- (0, smithy_client_1.throwDefaultError)({
5009
+ return throwDefaultError({
5073
5010
  output,
5074
5011
  parsedBody,
5075
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5076
5012
  errorCode,
5077
5013
  });
5078
5014
  }
@@ -5081,16 +5017,15 @@ const de_ListCoreNetworksCommand = async (output, context) => {
5081
5017
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5082
5018
  return de_ListCoreNetworksCommandError(output, context);
5083
5019
  }
5084
- const contents = map({
5020
+ const contents = (0, smithy_client_1.map)({
5085
5021
  $metadata: deserializeMetadata(output),
5086
5022
  });
5087
5023
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5088
- if (data.CoreNetworks != null) {
5089
- contents.CoreNetworks = de_CoreNetworkSummaryList(data.CoreNetworks, context);
5090
- }
5091
- if (data.NextToken != null) {
5092
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
5093
- }
5024
+ const doc = (0, smithy_client_1.take)(data, {
5025
+ CoreNetworks: smithy_client_1._json,
5026
+ NextToken: smithy_client_1.expectString,
5027
+ });
5028
+ Object.assign(contents, doc);
5094
5029
  return contents;
5095
5030
  };
5096
5031
  exports.de_ListCoreNetworksCommand = de_ListCoreNetworksCommand;
@@ -5115,10 +5050,9 @@ const de_ListCoreNetworksCommandError = async (output, context) => {
5115
5050
  throw await de_ValidationExceptionRes(parsedOutput, context);
5116
5051
  default:
5117
5052
  const parsedBody = parsedOutput.body;
5118
- (0, smithy_client_1.throwDefaultError)({
5053
+ return throwDefaultError({
5119
5054
  output,
5120
5055
  parsedBody,
5121
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5122
5056
  errorCode,
5123
5057
  });
5124
5058
  }
@@ -5127,16 +5061,15 @@ const de_ListOrganizationServiceAccessStatusCommand = async (output, context) =>
5127
5061
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5128
5062
  return de_ListOrganizationServiceAccessStatusCommandError(output, context);
5129
5063
  }
5130
- const contents = map({
5064
+ const contents = (0, smithy_client_1.map)({
5131
5065
  $metadata: deserializeMetadata(output),
5132
5066
  });
5133
5067
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5134
- if (data.NextToken != null) {
5135
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
5136
- }
5137
- if (data.OrganizationStatus != null) {
5138
- contents.OrganizationStatus = de_OrganizationStatus(data.OrganizationStatus, context);
5139
- }
5068
+ const doc = (0, smithy_client_1.take)(data, {
5069
+ NextToken: smithy_client_1.expectString,
5070
+ OrganizationStatus: smithy_client_1._json,
5071
+ });
5072
+ Object.assign(contents, doc);
5140
5073
  return contents;
5141
5074
  };
5142
5075
  exports.de_ListOrganizationServiceAccessStatusCommand = de_ListOrganizationServiceAccessStatusCommand;
@@ -5147,10 +5080,9 @@ const de_ListOrganizationServiceAccessStatusCommandError = async (output, contex
5147
5080
  };
5148
5081
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5149
5082
  const parsedBody = parsedOutput.body;
5150
- (0, smithy_client_1.throwDefaultError)({
5083
+ return throwDefaultError({
5151
5084
  output,
5152
5085
  parsedBody,
5153
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5154
5086
  errorCode,
5155
5087
  });
5156
5088
  };
@@ -5158,16 +5090,15 @@ const de_ListPeeringsCommand = async (output, context) => {
5158
5090
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5159
5091
  return de_ListPeeringsCommandError(output, context);
5160
5092
  }
5161
- const contents = map({
5093
+ const contents = (0, smithy_client_1.map)({
5162
5094
  $metadata: deserializeMetadata(output),
5163
5095
  });
5164
5096
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5165
- if (data.NextToken != null) {
5166
- contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
5167
- }
5168
- if (data.Peerings != null) {
5169
- contents.Peerings = de_PeeringList(data.Peerings, context);
5170
- }
5097
+ const doc = (0, smithy_client_1.take)(data, {
5098
+ NextToken: smithy_client_1.expectString,
5099
+ Peerings: (_) => de_PeeringList(_, context),
5100
+ });
5101
+ Object.assign(contents, doc);
5171
5102
  return contents;
5172
5103
  };
5173
5104
  exports.de_ListPeeringsCommand = de_ListPeeringsCommand;
@@ -5192,10 +5123,9 @@ const de_ListPeeringsCommandError = async (output, context) => {
5192
5123
  throw await de_ValidationExceptionRes(parsedOutput, context);
5193
5124
  default:
5194
5125
  const parsedBody = parsedOutput.body;
5195
- (0, smithy_client_1.throwDefaultError)({
5126
+ return throwDefaultError({
5196
5127
  output,
5197
5128
  parsedBody,
5198
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5199
5129
  errorCode,
5200
5130
  });
5201
5131
  }
@@ -5204,13 +5134,14 @@ const de_ListTagsForResourceCommand = async (output, context) => {
5204
5134
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5205
5135
  return de_ListTagsForResourceCommandError(output, context);
5206
5136
  }
5207
- const contents = map({
5137
+ const contents = (0, smithy_client_1.map)({
5208
5138
  $metadata: deserializeMetadata(output),
5209
5139
  });
5210
5140
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5211
- if (data.TagList != null) {
5212
- contents.TagList = de_TagList(data.TagList, context);
5213
- }
5141
+ const doc = (0, smithy_client_1.take)(data, {
5142
+ TagList: smithy_client_1._json,
5143
+ });
5144
+ Object.assign(contents, doc);
5214
5145
  return contents;
5215
5146
  };
5216
5147
  exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
@@ -5238,10 +5169,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
5238
5169
  throw await de_ValidationExceptionRes(parsedOutput, context);
5239
5170
  default:
5240
5171
  const parsedBody = parsedOutput.body;
5241
- (0, smithy_client_1.throwDefaultError)({
5172
+ return throwDefaultError({
5242
5173
  output,
5243
5174
  parsedBody,
5244
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5245
5175
  errorCode,
5246
5176
  });
5247
5177
  }
@@ -5250,13 +5180,14 @@ const de_PutCoreNetworkPolicyCommand = async (output, context) => {
5250
5180
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5251
5181
  return de_PutCoreNetworkPolicyCommandError(output, context);
5252
5182
  }
5253
- const contents = map({
5183
+ const contents = (0, smithy_client_1.map)({
5254
5184
  $metadata: deserializeMetadata(output),
5255
5185
  });
5256
5186
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5257
- if (data.CoreNetworkPolicy != null) {
5258
- contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context);
5259
- }
5187
+ const doc = (0, smithy_client_1.take)(data, {
5188
+ CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context),
5189
+ });
5190
+ Object.assign(contents, doc);
5260
5191
  return contents;
5261
5192
  };
5262
5193
  exports.de_PutCoreNetworkPolicyCommand = de_PutCoreNetworkPolicyCommand;
@@ -5290,10 +5221,9 @@ const de_PutCoreNetworkPolicyCommandError = async (output, context) => {
5290
5221
  throw await de_ValidationExceptionRes(parsedOutput, context);
5291
5222
  default:
5292
5223
  const parsedBody = parsedOutput.body;
5293
- (0, smithy_client_1.throwDefaultError)({
5224
+ return throwDefaultError({
5294
5225
  output,
5295
5226
  parsedBody,
5296
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5297
5227
  errorCode,
5298
5228
  });
5299
5229
  }
@@ -5302,7 +5232,7 @@ const de_PutResourcePolicyCommand = async (output, context) => {
5302
5232
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5303
5233
  return de_PutResourcePolicyCommandError(output, context);
5304
5234
  }
5305
- const contents = map({
5235
+ const contents = (0, smithy_client_1.map)({
5306
5236
  $metadata: deserializeMetadata(output),
5307
5237
  });
5308
5238
  await collectBody(output.body, context);
@@ -5336,10 +5266,9 @@ const de_PutResourcePolicyCommandError = async (output, context) => {
5336
5266
  throw await de_ValidationExceptionRes(parsedOutput, context);
5337
5267
  default:
5338
5268
  const parsedBody = parsedOutput.body;
5339
- (0, smithy_client_1.throwDefaultError)({
5269
+ return throwDefaultError({
5340
5270
  output,
5341
5271
  parsedBody,
5342
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5343
5272
  errorCode,
5344
5273
  });
5345
5274
  }
@@ -5348,13 +5277,14 @@ const de_RegisterTransitGatewayCommand = async (output, context) => {
5348
5277
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5349
5278
  return de_RegisterTransitGatewayCommandError(output, context);
5350
5279
  }
5351
- const contents = map({
5280
+ const contents = (0, smithy_client_1.map)({
5352
5281
  $metadata: deserializeMetadata(output),
5353
5282
  });
5354
5283
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5355
- if (data.TransitGatewayRegistration != null) {
5356
- contents.TransitGatewayRegistration = de_TransitGatewayRegistration(data.TransitGatewayRegistration, context);
5357
- }
5284
+ const doc = (0, smithy_client_1.take)(data, {
5285
+ TransitGatewayRegistration: smithy_client_1._json,
5286
+ });
5287
+ Object.assign(contents, doc);
5358
5288
  return contents;
5359
5289
  };
5360
5290
  exports.de_RegisterTransitGatewayCommand = de_RegisterTransitGatewayCommand;
@@ -5385,10 +5315,9 @@ const de_RegisterTransitGatewayCommandError = async (output, context) => {
5385
5315
  throw await de_ValidationExceptionRes(parsedOutput, context);
5386
5316
  default:
5387
5317
  const parsedBody = parsedOutput.body;
5388
- (0, smithy_client_1.throwDefaultError)({
5318
+ return throwDefaultError({
5389
5319
  output,
5390
5320
  parsedBody,
5391
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5392
5321
  errorCode,
5393
5322
  });
5394
5323
  }
@@ -5397,13 +5326,14 @@ const de_RejectAttachmentCommand = async (output, context) => {
5397
5326
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5398
5327
  return de_RejectAttachmentCommandError(output, context);
5399
5328
  }
5400
- const contents = map({
5329
+ const contents = (0, smithy_client_1.map)({
5401
5330
  $metadata: deserializeMetadata(output),
5402
5331
  });
5403
5332
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5404
- if (data.Attachment != null) {
5405
- contents.Attachment = de_Attachment(data.Attachment, context);
5406
- }
5333
+ const doc = (0, smithy_client_1.take)(data, {
5334
+ Attachment: (_) => de_Attachment(_, context),
5335
+ });
5336
+ Object.assign(contents, doc);
5407
5337
  return contents;
5408
5338
  };
5409
5339
  exports.de_RejectAttachmentCommand = de_RejectAttachmentCommand;
@@ -5434,10 +5364,9 @@ const de_RejectAttachmentCommandError = async (output, context) => {
5434
5364
  throw await de_ValidationExceptionRes(parsedOutput, context);
5435
5365
  default:
5436
5366
  const parsedBody = parsedOutput.body;
5437
- (0, smithy_client_1.throwDefaultError)({
5367
+ return throwDefaultError({
5438
5368
  output,
5439
5369
  parsedBody,
5440
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5441
5370
  errorCode,
5442
5371
  });
5443
5372
  }
@@ -5446,13 +5375,14 @@ const de_RestoreCoreNetworkPolicyVersionCommand = async (output, context) => {
5446
5375
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5447
5376
  return de_RestoreCoreNetworkPolicyVersionCommandError(output, context);
5448
5377
  }
5449
- const contents = map({
5378
+ const contents = (0, smithy_client_1.map)({
5450
5379
  $metadata: deserializeMetadata(output),
5451
5380
  });
5452
5381
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5453
- if (data.CoreNetworkPolicy != null) {
5454
- contents.CoreNetworkPolicy = de_CoreNetworkPolicy(data.CoreNetworkPolicy, context);
5455
- }
5382
+ const doc = (0, smithy_client_1.take)(data, {
5383
+ CoreNetworkPolicy: (_) => de_CoreNetworkPolicy(_, context),
5384
+ });
5385
+ Object.assign(contents, doc);
5456
5386
  return contents;
5457
5387
  };
5458
5388
  exports.de_RestoreCoreNetworkPolicyVersionCommand = de_RestoreCoreNetworkPolicyVersionCommand;
@@ -5483,10 +5413,9 @@ const de_RestoreCoreNetworkPolicyVersionCommandError = async (output, context) =
5483
5413
  throw await de_ValidationExceptionRes(parsedOutput, context);
5484
5414
  default:
5485
5415
  const parsedBody = parsedOutput.body;
5486
- (0, smithy_client_1.throwDefaultError)({
5416
+ return throwDefaultError({
5487
5417
  output,
5488
5418
  parsedBody,
5489
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5490
5419
  errorCode,
5491
5420
  });
5492
5421
  }
@@ -5495,13 +5424,14 @@ const de_StartOrganizationServiceAccessUpdateCommand = async (output, context) =
5495
5424
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5496
5425
  return de_StartOrganizationServiceAccessUpdateCommandError(output, context);
5497
5426
  }
5498
- const contents = map({
5427
+ const contents = (0, smithy_client_1.map)({
5499
5428
  $metadata: deserializeMetadata(output),
5500
5429
  });
5501
5430
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5502
- if (data.OrganizationStatus != null) {
5503
- contents.OrganizationStatus = de_OrganizationStatus(data.OrganizationStatus, context);
5504
- }
5431
+ const doc = (0, smithy_client_1.take)(data, {
5432
+ OrganizationStatus: smithy_client_1._json,
5433
+ });
5434
+ Object.assign(contents, doc);
5505
5435
  return contents;
5506
5436
  };
5507
5437
  exports.de_StartOrganizationServiceAccessUpdateCommand = de_StartOrganizationServiceAccessUpdateCommand;
@@ -5532,10 +5462,9 @@ const de_StartOrganizationServiceAccessUpdateCommandError = async (output, conte
5532
5462
  throw await de_ValidationExceptionRes(parsedOutput, context);
5533
5463
  default:
5534
5464
  const parsedBody = parsedOutput.body;
5535
- (0, smithy_client_1.throwDefaultError)({
5465
+ return throwDefaultError({
5536
5466
  output,
5537
5467
  parsedBody,
5538
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5539
5468
  errorCode,
5540
5469
  });
5541
5470
  }
@@ -5544,13 +5473,14 @@ const de_StartRouteAnalysisCommand = async (output, context) => {
5544
5473
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5545
5474
  return de_StartRouteAnalysisCommandError(output, context);
5546
5475
  }
5547
- const contents = map({
5476
+ const contents = (0, smithy_client_1.map)({
5548
5477
  $metadata: deserializeMetadata(output),
5549
5478
  });
5550
5479
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5551
- if (data.RouteAnalysis != null) {
5552
- contents.RouteAnalysis = de_RouteAnalysis(data.RouteAnalysis, context);
5553
- }
5480
+ const doc = (0, smithy_client_1.take)(data, {
5481
+ RouteAnalysis: (_) => de_RouteAnalysis(_, context),
5482
+ });
5483
+ Object.assign(contents, doc);
5554
5484
  return contents;
5555
5485
  };
5556
5486
  exports.de_StartRouteAnalysisCommand = de_StartRouteAnalysisCommand;
@@ -5581,10 +5511,9 @@ const de_StartRouteAnalysisCommandError = async (output, context) => {
5581
5511
  throw await de_ValidationExceptionRes(parsedOutput, context);
5582
5512
  default:
5583
5513
  const parsedBody = parsedOutput.body;
5584
- (0, smithy_client_1.throwDefaultError)({
5514
+ return throwDefaultError({
5585
5515
  output,
5586
5516
  parsedBody,
5587
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5588
5517
  errorCode,
5589
5518
  });
5590
5519
  }
@@ -5593,7 +5522,7 @@ const de_TagResourceCommand = async (output, context) => {
5593
5522
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5594
5523
  return de_TagResourceCommandError(output, context);
5595
5524
  }
5596
- const contents = map({
5525
+ const contents = (0, smithy_client_1.map)({
5597
5526
  $metadata: deserializeMetadata(output),
5598
5527
  });
5599
5528
  await collectBody(output.body, context);
@@ -5630,10 +5559,9 @@ const de_TagResourceCommandError = async (output, context) => {
5630
5559
  throw await de_ValidationExceptionRes(parsedOutput, context);
5631
5560
  default:
5632
5561
  const parsedBody = parsedOutput.body;
5633
- (0, smithy_client_1.throwDefaultError)({
5562
+ return throwDefaultError({
5634
5563
  output,
5635
5564
  parsedBody,
5636
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5637
5565
  errorCode,
5638
5566
  });
5639
5567
  }
@@ -5642,7 +5570,7 @@ const de_UntagResourceCommand = async (output, context) => {
5642
5570
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5643
5571
  return de_UntagResourceCommandError(output, context);
5644
5572
  }
5645
- const contents = map({
5573
+ const contents = (0, smithy_client_1.map)({
5646
5574
  $metadata: deserializeMetadata(output),
5647
5575
  });
5648
5576
  await collectBody(output.body, context);
@@ -5676,10 +5604,9 @@ const de_UntagResourceCommandError = async (output, context) => {
5676
5604
  throw await de_ValidationExceptionRes(parsedOutput, context);
5677
5605
  default:
5678
5606
  const parsedBody = parsedOutput.body;
5679
- (0, smithy_client_1.throwDefaultError)({
5607
+ return throwDefaultError({
5680
5608
  output,
5681
5609
  parsedBody,
5682
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5683
5610
  errorCode,
5684
5611
  });
5685
5612
  }
@@ -5688,13 +5615,14 @@ const de_UpdateConnectionCommand = async (output, context) => {
5688
5615
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5689
5616
  return de_UpdateConnectionCommandError(output, context);
5690
5617
  }
5691
- const contents = map({
5618
+ const contents = (0, smithy_client_1.map)({
5692
5619
  $metadata: deserializeMetadata(output),
5693
5620
  });
5694
5621
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5695
- if (data.Connection != null) {
5696
- contents.Connection = de_Connection(data.Connection, context);
5697
- }
5622
+ const doc = (0, smithy_client_1.take)(data, {
5623
+ Connection: (_) => de_Connection(_, context),
5624
+ });
5625
+ Object.assign(contents, doc);
5698
5626
  return contents;
5699
5627
  };
5700
5628
  exports.de_UpdateConnectionCommand = de_UpdateConnectionCommand;
@@ -5725,10 +5653,9 @@ const de_UpdateConnectionCommandError = async (output, context) => {
5725
5653
  throw await de_ValidationExceptionRes(parsedOutput, context);
5726
5654
  default:
5727
5655
  const parsedBody = parsedOutput.body;
5728
- (0, smithy_client_1.throwDefaultError)({
5656
+ return throwDefaultError({
5729
5657
  output,
5730
5658
  parsedBody,
5731
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5732
5659
  errorCode,
5733
5660
  });
5734
5661
  }
@@ -5737,13 +5664,14 @@ const de_UpdateCoreNetworkCommand = async (output, context) => {
5737
5664
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5738
5665
  return de_UpdateCoreNetworkCommandError(output, context);
5739
5666
  }
5740
- const contents = map({
5667
+ const contents = (0, smithy_client_1.map)({
5741
5668
  $metadata: deserializeMetadata(output),
5742
5669
  });
5743
5670
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5744
- if (data.CoreNetwork != null) {
5745
- contents.CoreNetwork = de_CoreNetwork(data.CoreNetwork, context);
5746
- }
5671
+ const doc = (0, smithy_client_1.take)(data, {
5672
+ CoreNetwork: (_) => de_CoreNetwork(_, context),
5673
+ });
5674
+ Object.assign(contents, doc);
5747
5675
  return contents;
5748
5676
  };
5749
5677
  exports.de_UpdateCoreNetworkCommand = de_UpdateCoreNetworkCommand;
@@ -5774,10 +5702,9 @@ const de_UpdateCoreNetworkCommandError = async (output, context) => {
5774
5702
  throw await de_ValidationExceptionRes(parsedOutput, context);
5775
5703
  default:
5776
5704
  const parsedBody = parsedOutput.body;
5777
- (0, smithy_client_1.throwDefaultError)({
5705
+ return throwDefaultError({
5778
5706
  output,
5779
5707
  parsedBody,
5780
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5781
5708
  errorCode,
5782
5709
  });
5783
5710
  }
@@ -5786,13 +5713,14 @@ const de_UpdateDeviceCommand = async (output, context) => {
5786
5713
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5787
5714
  return de_UpdateDeviceCommandError(output, context);
5788
5715
  }
5789
- const contents = map({
5716
+ const contents = (0, smithy_client_1.map)({
5790
5717
  $metadata: deserializeMetadata(output),
5791
5718
  });
5792
5719
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5793
- if (data.Device != null) {
5794
- contents.Device = de_Device(data.Device, context);
5795
- }
5720
+ const doc = (0, smithy_client_1.take)(data, {
5721
+ Device: (_) => de_Device(_, context),
5722
+ });
5723
+ Object.assign(contents, doc);
5796
5724
  return contents;
5797
5725
  };
5798
5726
  exports.de_UpdateDeviceCommand = de_UpdateDeviceCommand;
@@ -5823,10 +5751,9 @@ const de_UpdateDeviceCommandError = async (output, context) => {
5823
5751
  throw await de_ValidationExceptionRes(parsedOutput, context);
5824
5752
  default:
5825
5753
  const parsedBody = parsedOutput.body;
5826
- (0, smithy_client_1.throwDefaultError)({
5754
+ return throwDefaultError({
5827
5755
  output,
5828
5756
  parsedBody,
5829
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5830
5757
  errorCode,
5831
5758
  });
5832
5759
  }
@@ -5835,13 +5762,14 @@ const de_UpdateGlobalNetworkCommand = async (output, context) => {
5835
5762
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5836
5763
  return de_UpdateGlobalNetworkCommandError(output, context);
5837
5764
  }
5838
- const contents = map({
5765
+ const contents = (0, smithy_client_1.map)({
5839
5766
  $metadata: deserializeMetadata(output),
5840
5767
  });
5841
5768
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5842
- if (data.GlobalNetwork != null) {
5843
- contents.GlobalNetwork = de_GlobalNetwork(data.GlobalNetwork, context);
5844
- }
5769
+ const doc = (0, smithy_client_1.take)(data, {
5770
+ GlobalNetwork: (_) => de_GlobalNetwork(_, context),
5771
+ });
5772
+ Object.assign(contents, doc);
5845
5773
  return contents;
5846
5774
  };
5847
5775
  exports.de_UpdateGlobalNetworkCommand = de_UpdateGlobalNetworkCommand;
@@ -5872,10 +5800,9 @@ const de_UpdateGlobalNetworkCommandError = async (output, context) => {
5872
5800
  throw await de_ValidationExceptionRes(parsedOutput, context);
5873
5801
  default:
5874
5802
  const parsedBody = parsedOutput.body;
5875
- (0, smithy_client_1.throwDefaultError)({
5803
+ return throwDefaultError({
5876
5804
  output,
5877
5805
  parsedBody,
5878
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5879
5806
  errorCode,
5880
5807
  });
5881
5808
  }
@@ -5884,13 +5811,14 @@ const de_UpdateLinkCommand = async (output, context) => {
5884
5811
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5885
5812
  return de_UpdateLinkCommandError(output, context);
5886
5813
  }
5887
- const contents = map({
5814
+ const contents = (0, smithy_client_1.map)({
5888
5815
  $metadata: deserializeMetadata(output),
5889
5816
  });
5890
5817
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5891
- if (data.Link != null) {
5892
- contents.Link = de_Link(data.Link, context);
5893
- }
5818
+ const doc = (0, smithy_client_1.take)(data, {
5819
+ Link: (_) => de_Link(_, context),
5820
+ });
5821
+ Object.assign(contents, doc);
5894
5822
  return contents;
5895
5823
  };
5896
5824
  exports.de_UpdateLinkCommand = de_UpdateLinkCommand;
@@ -5924,10 +5852,9 @@ const de_UpdateLinkCommandError = async (output, context) => {
5924
5852
  throw await de_ValidationExceptionRes(parsedOutput, context);
5925
5853
  default:
5926
5854
  const parsedBody = parsedOutput.body;
5927
- (0, smithy_client_1.throwDefaultError)({
5855
+ return throwDefaultError({
5928
5856
  output,
5929
5857
  parsedBody,
5930
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5931
5858
  errorCode,
5932
5859
  });
5933
5860
  }
@@ -5936,16 +5863,15 @@ const de_UpdateNetworkResourceMetadataCommand = async (output, context) => {
5936
5863
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5937
5864
  return de_UpdateNetworkResourceMetadataCommandError(output, context);
5938
5865
  }
5939
- const contents = map({
5866
+ const contents = (0, smithy_client_1.map)({
5940
5867
  $metadata: deserializeMetadata(output),
5941
5868
  });
5942
5869
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5943
- if (data.Metadata != null) {
5944
- contents.Metadata = de_NetworkResourceMetadataMap(data.Metadata, context);
5945
- }
5946
- if (data.ResourceArn != null) {
5947
- contents.ResourceArn = (0, smithy_client_1.expectString)(data.ResourceArn);
5948
- }
5870
+ const doc = (0, smithy_client_1.take)(data, {
5871
+ Metadata: smithy_client_1._json,
5872
+ ResourceArn: smithy_client_1.expectString,
5873
+ });
5874
+ Object.assign(contents, doc);
5949
5875
  return contents;
5950
5876
  };
5951
5877
  exports.de_UpdateNetworkResourceMetadataCommand = de_UpdateNetworkResourceMetadataCommand;
@@ -5976,10 +5902,9 @@ const de_UpdateNetworkResourceMetadataCommandError = async (output, context) =>
5976
5902
  throw await de_ValidationExceptionRes(parsedOutput, context);
5977
5903
  default:
5978
5904
  const parsedBody = parsedOutput.body;
5979
- (0, smithy_client_1.throwDefaultError)({
5905
+ return throwDefaultError({
5980
5906
  output,
5981
5907
  parsedBody,
5982
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
5983
5908
  errorCode,
5984
5909
  });
5985
5910
  }
@@ -5988,13 +5913,14 @@ const de_UpdateSiteCommand = async (output, context) => {
5988
5913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
5989
5914
  return de_UpdateSiteCommandError(output, context);
5990
5915
  }
5991
- const contents = map({
5916
+ const contents = (0, smithy_client_1.map)({
5992
5917
  $metadata: deserializeMetadata(output),
5993
5918
  });
5994
5919
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
5995
- if (data.Site != null) {
5996
- contents.Site = de_Site(data.Site, context);
5997
- }
5920
+ const doc = (0, smithy_client_1.take)(data, {
5921
+ Site: (_) => de_Site(_, context),
5922
+ });
5923
+ Object.assign(contents, doc);
5998
5924
  return contents;
5999
5925
  };
6000
5926
  exports.de_UpdateSiteCommand = de_UpdateSiteCommand;
@@ -6025,10 +5951,9 @@ const de_UpdateSiteCommandError = async (output, context) => {
6025
5951
  throw await de_ValidationExceptionRes(parsedOutput, context);
6026
5952
  default:
6027
5953
  const parsedBody = parsedOutput.body;
6028
- (0, smithy_client_1.throwDefaultError)({
5954
+ return throwDefaultError({
6029
5955
  output,
6030
5956
  parsedBody,
6031
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
6032
5957
  errorCode,
6033
5958
  });
6034
5959
  }
@@ -6037,13 +5962,14 @@ const de_UpdateVpcAttachmentCommand = async (output, context) => {
6037
5962
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6038
5963
  return de_UpdateVpcAttachmentCommandError(output, context);
6039
5964
  }
6040
- const contents = map({
5965
+ const contents = (0, smithy_client_1.map)({
6041
5966
  $metadata: deserializeMetadata(output),
6042
5967
  });
6043
5968
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
6044
- if (data.VpcAttachment != null) {
6045
- contents.VpcAttachment = de_VpcAttachment(data.VpcAttachment, context);
6046
- }
5969
+ const doc = (0, smithy_client_1.take)(data, {
5970
+ VpcAttachment: (_) => de_VpcAttachment(_, context),
5971
+ });
5972
+ Object.assign(contents, doc);
6047
5973
  return contents;
6048
5974
  };
6049
5975
  exports.de_UpdateVpcAttachmentCommand = de_UpdateVpcAttachmentCommand;
@@ -6074,21 +6000,21 @@ const de_UpdateVpcAttachmentCommandError = async (output, context) => {
6074
6000
  throw await de_ValidationExceptionRes(parsedOutput, context);
6075
6001
  default:
6076
6002
  const parsedBody = parsedOutput.body;
6077
- (0, smithy_client_1.throwDefaultError)({
6003
+ return throwDefaultError({
6078
6004
  output,
6079
6005
  parsedBody,
6080
- exceptionCtor: NetworkManagerServiceException_1.NetworkManagerServiceException,
6081
6006
  errorCode,
6082
6007
  });
6083
6008
  }
6084
6009
  };
6085
- const map = smithy_client_1.map;
6010
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(NetworkManagerServiceException_1.NetworkManagerServiceException);
6086
6011
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
6087
- const contents = map({});
6012
+ const contents = (0, smithy_client_1.map)({});
6088
6013
  const data = parsedOutput.body;
6089
- if (data.Message != null) {
6090
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6091
- }
6014
+ const doc = (0, smithy_client_1.take)(data, {
6015
+ Message: smithy_client_1.expectString,
6016
+ });
6017
+ Object.assign(contents, doc);
6092
6018
  const exception = new models_0_1.AccessDeniedException({
6093
6019
  $metadata: deserializeMetadata(parsedOutput),
6094
6020
  ...contents,
@@ -6096,17 +6022,14 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
6096
6022
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6097
6023
  };
6098
6024
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
6099
- const contents = map({});
6025
+ const contents = (0, smithy_client_1.map)({});
6100
6026
  const data = parsedOutput.body;
6101
- if (data.Message != null) {
6102
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6103
- }
6104
- if (data.ResourceId != null) {
6105
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
6106
- }
6107
- if (data.ResourceType != null) {
6108
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
6109
- }
6027
+ const doc = (0, smithy_client_1.take)(data, {
6028
+ Message: smithy_client_1.expectString,
6029
+ ResourceId: smithy_client_1.expectString,
6030
+ ResourceType: smithy_client_1.expectString,
6031
+ });
6032
+ Object.assign(contents, doc);
6110
6033
  const exception = new models_0_1.ConflictException({
6111
6034
  $metadata: deserializeMetadata(parsedOutput),
6112
6035
  ...contents,
@@ -6114,14 +6037,13 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
6114
6037
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6115
6038
  };
6116
6039
  const de_CoreNetworkPolicyExceptionRes = async (parsedOutput, context) => {
6117
- const contents = map({});
6040
+ const contents = (0, smithy_client_1.map)({});
6118
6041
  const data = parsedOutput.body;
6119
- if (data.Errors != null) {
6120
- contents.Errors = de_CoreNetworkPolicyErrorList(data.Errors, context);
6121
- }
6122
- if (data.Message != null) {
6123
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6124
- }
6042
+ const doc = (0, smithy_client_1.take)(data, {
6043
+ Errors: smithy_client_1._json,
6044
+ Message: smithy_client_1.expectString,
6045
+ });
6046
+ Object.assign(contents, doc);
6125
6047
  const exception = new models_0_1.CoreNetworkPolicyException({
6126
6048
  $metadata: deserializeMetadata(parsedOutput),
6127
6049
  ...contents,
@@ -6129,16 +6051,17 @@ const de_CoreNetworkPolicyExceptionRes = async (parsedOutput, context) => {
6129
6051
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6130
6052
  };
6131
6053
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
6132
- const contents = map({
6054
+ const contents = (0, smithy_client_1.map)({
6133
6055
  RetryAfterSeconds: [
6134
6056
  () => void 0 !== parsedOutput.headers["retry-after"],
6135
6057
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
6136
6058
  ],
6137
6059
  });
6138
6060
  const data = parsedOutput.body;
6139
- if (data.Message != null) {
6140
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6141
- }
6061
+ const doc = (0, smithy_client_1.take)(data, {
6062
+ Message: smithy_client_1.expectString,
6063
+ });
6064
+ Object.assign(contents, doc);
6142
6065
  const exception = new models_0_1.InternalServerException({
6143
6066
  $metadata: deserializeMetadata(parsedOutput),
6144
6067
  ...contents,
@@ -6146,20 +6069,15 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
6146
6069
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6147
6070
  };
6148
6071
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
6149
- const contents = map({});
6072
+ const contents = (0, smithy_client_1.map)({});
6150
6073
  const data = parsedOutput.body;
6151
- if (data.Context != null) {
6152
- contents.Context = de_ExceptionContextMap(data.Context, context);
6153
- }
6154
- if (data.Message != null) {
6155
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6156
- }
6157
- if (data.ResourceId != null) {
6158
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
6159
- }
6160
- if (data.ResourceType != null) {
6161
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
6162
- }
6074
+ const doc = (0, smithy_client_1.take)(data, {
6075
+ Context: smithy_client_1._json,
6076
+ Message: smithy_client_1.expectString,
6077
+ ResourceId: smithy_client_1.expectString,
6078
+ ResourceType: smithy_client_1.expectString,
6079
+ });
6080
+ Object.assign(contents, doc);
6163
6081
  const exception = new models_0_1.ResourceNotFoundException({
6164
6082
  $metadata: deserializeMetadata(parsedOutput),
6165
6083
  ...contents,
@@ -6167,23 +6085,16 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
6167
6085
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6168
6086
  };
6169
6087
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
6170
- const contents = map({});
6088
+ const contents = (0, smithy_client_1.map)({});
6171
6089
  const data = parsedOutput.body;
6172
- if (data.LimitCode != null) {
6173
- contents.LimitCode = (0, smithy_client_1.expectString)(data.LimitCode);
6174
- }
6175
- if (data.Message != null) {
6176
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6177
- }
6178
- if (data.ResourceId != null) {
6179
- contents.ResourceId = (0, smithy_client_1.expectString)(data.ResourceId);
6180
- }
6181
- if (data.ResourceType != null) {
6182
- contents.ResourceType = (0, smithy_client_1.expectString)(data.ResourceType);
6183
- }
6184
- if (data.ServiceCode != null) {
6185
- contents.ServiceCode = (0, smithy_client_1.expectString)(data.ServiceCode);
6186
- }
6090
+ const doc = (0, smithy_client_1.take)(data, {
6091
+ LimitCode: smithy_client_1.expectString,
6092
+ Message: smithy_client_1.expectString,
6093
+ ResourceId: smithy_client_1.expectString,
6094
+ ResourceType: smithy_client_1.expectString,
6095
+ ServiceCode: smithy_client_1.expectString,
6096
+ });
6097
+ Object.assign(contents, doc);
6187
6098
  const exception = new models_0_1.ServiceQuotaExceededException({
6188
6099
  $metadata: deserializeMetadata(parsedOutput),
6189
6100
  ...contents,
@@ -6191,16 +6102,17 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
6191
6102
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6192
6103
  };
6193
6104
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
6194
- const contents = map({
6105
+ const contents = (0, smithy_client_1.map)({
6195
6106
  RetryAfterSeconds: [
6196
6107
  () => void 0 !== parsedOutput.headers["retry-after"],
6197
6108
  () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers["retry-after"]),
6198
6109
  ],
6199
6110
  });
6200
6111
  const data = parsedOutput.body;
6201
- if (data.Message != null) {
6202
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6203
- }
6112
+ const doc = (0, smithy_client_1.take)(data, {
6113
+ Message: smithy_client_1.expectString,
6114
+ });
6115
+ Object.assign(contents, doc);
6204
6116
  const exception = new models_0_1.ThrottlingException({
6205
6117
  $metadata: deserializeMetadata(parsedOutput),
6206
6118
  ...contents,
@@ -6208,1075 +6120,369 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
6208
6120
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6209
6121
  };
6210
6122
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
6211
- const contents = map({});
6123
+ const contents = (0, smithy_client_1.map)({});
6212
6124
  const data = parsedOutput.body;
6213
- if (data.Fields != null) {
6214
- contents.Fields = de_ValidationExceptionFieldList(data.Fields, context);
6215
- }
6216
- if (data.Message != null) {
6217
- contents.Message = (0, smithy_client_1.expectString)(data.Message);
6218
- }
6219
- if (data.Reason != null) {
6220
- contents.Reason = (0, smithy_client_1.expectString)(data.Reason);
6221
- }
6125
+ const doc = (0, smithy_client_1.take)(data, {
6126
+ Fields: smithy_client_1._json,
6127
+ Message: smithy_client_1.expectString,
6128
+ Reason: smithy_client_1.expectString,
6129
+ });
6130
+ Object.assign(contents, doc);
6222
6131
  const exception = new models_0_1.ValidationException({
6223
6132
  $metadata: deserializeMetadata(parsedOutput),
6224
6133
  ...contents,
6225
6134
  });
6226
6135
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
6227
6136
  };
6228
- const se_AWSLocation = (input, context) => {
6229
- return {
6230
- ...(input.SubnetArn != null && { SubnetArn: input.SubnetArn }),
6231
- ...(input.Zone != null && { Zone: input.Zone }),
6232
- };
6233
- };
6234
- const se_Bandwidth = (input, context) => {
6235
- return {
6236
- ...(input.DownloadSpeed != null && { DownloadSpeed: input.DownloadSpeed }),
6237
- ...(input.UploadSpeed != null && { UploadSpeed: input.UploadSpeed }),
6238
- };
6239
- };
6240
- const se_BgpOptions = (input, context) => {
6241
- return {
6242
- ...(input.PeerAsn != null && { PeerAsn: input.PeerAsn }),
6243
- };
6244
- };
6245
- const se_ConnectAttachmentOptions = (input, context) => {
6246
- return {
6247
- ...(input.Protocol != null && { Protocol: input.Protocol }),
6248
- };
6137
+ const de_Attachment = (output, context) => {
6138
+ return (0, smithy_client_1.take)(output, {
6139
+ AttachmentId: smithy_client_1.expectString,
6140
+ AttachmentPolicyRuleNumber: smithy_client_1.expectInt32,
6141
+ AttachmentType: smithy_client_1.expectString,
6142
+ CoreNetworkArn: smithy_client_1.expectString,
6143
+ CoreNetworkId: smithy_client_1.expectString,
6144
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6145
+ EdgeLocation: smithy_client_1.expectString,
6146
+ OwnerAccountId: smithy_client_1.expectString,
6147
+ ProposedSegmentChange: smithy_client_1._json,
6148
+ ResourceArn: smithy_client_1.expectString,
6149
+ SegmentName: smithy_client_1.expectString,
6150
+ State: smithy_client_1.expectString,
6151
+ Tags: smithy_client_1._json,
6152
+ UpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6153
+ });
6249
6154
  };
6250
- const se_ConstrainedStringList = (input, context) => {
6251
- return input
6155
+ const de_AttachmentList = (output, context) => {
6156
+ const retVal = (output || [])
6252
6157
  .filter((e) => e != null)
6253
6158
  .map((entry) => {
6254
- return entry;
6255
- });
6256
- };
6257
- const se_CoreNetworkSegmentEdgeIdentifier = (input, context) => {
6258
- return {
6259
- ...(input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId }),
6260
- ...(input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation }),
6261
- ...(input.SegmentName != null && { SegmentName: input.SegmentName }),
6262
- };
6263
- };
6264
- const se_FilterMap = (input, context) => {
6265
- return Object.entries(input).reduce((acc, [key, value]) => {
6266
- if (value === null) {
6267
- return acc;
6268
- }
6269
- acc[key] = se_FilterValues(value, context);
6270
- return acc;
6271
- }, {});
6272
- };
6273
- const se_FilterValues = (input, context) => {
6274
- return input
6275
- .filter((e) => e != null)
6276
- .map((entry) => {
6277
- return entry;
6278
- });
6279
- };
6280
- const se_Location = (input, context) => {
6281
- return {
6282
- ...(input.Address != null && { Address: input.Address }),
6283
- ...(input.Latitude != null && { Latitude: input.Latitude }),
6284
- ...(input.Longitude != null && { Longitude: input.Longitude }),
6285
- };
6286
- };
6287
- const se_NetworkResourceMetadataMap = (input, context) => {
6288
- return Object.entries(input).reduce((acc, [key, value]) => {
6289
- if (value === null) {
6290
- return acc;
6291
- }
6292
- acc[key] = value;
6293
- return acc;
6294
- }, {});
6295
- };
6296
- const se_RouteAnalysisEndpointOptionsSpecification = (input, context) => {
6297
- return {
6298
- ...(input.IpAddress != null && { IpAddress: input.IpAddress }),
6299
- ...(input.TransitGatewayAttachmentArn != null && {
6300
- TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn,
6301
- }),
6302
- };
6303
- };
6304
- const se_RouteStateList = (input, context) => {
6305
- return input
6306
- .filter((e) => e != null)
6307
- .map((entry) => {
6308
- return entry;
6309
- });
6310
- };
6311
- const se_RouteTableIdentifier = (input, context) => {
6312
- return {
6313
- ...(input.CoreNetworkSegmentEdge != null && {
6314
- CoreNetworkSegmentEdge: se_CoreNetworkSegmentEdgeIdentifier(input.CoreNetworkSegmentEdge, context),
6315
- }),
6316
- ...(input.TransitGatewayRouteTableArn != null && {
6317
- TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
6318
- }),
6319
- };
6320
- };
6321
- const se_RouteTypeList = (input, context) => {
6322
- return input
6323
- .filter((e) => e != null)
6324
- .map((entry) => {
6325
- return entry;
6326
- });
6327
- };
6328
- const se_SubnetArnList = (input, context) => {
6329
- return input
6330
- .filter((e) => e != null)
6331
- .map((entry) => {
6332
- return entry;
6333
- });
6334
- };
6335
- const se_Tag = (input, context) => {
6336
- return {
6337
- ...(input.Key != null && { Key: input.Key }),
6338
- ...(input.Value != null && { Value: input.Value }),
6339
- };
6340
- };
6341
- const se_TagList = (input, context) => {
6342
- return input
6343
- .filter((e) => e != null)
6344
- .map((entry) => {
6345
- return se_Tag(entry, context);
6346
- });
6347
- };
6348
- const se_VpcOptions = (input, context) => {
6349
- return {
6350
- ...(input.ApplianceModeSupport != null && { ApplianceModeSupport: input.ApplianceModeSupport }),
6351
- ...(input.Ipv6Support != null && { Ipv6Support: input.Ipv6Support }),
6352
- };
6353
- };
6354
- const de_AccountStatus = (output, context) => {
6355
- return {
6356
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
6357
- SLRDeploymentStatus: (0, smithy_client_1.expectString)(output.SLRDeploymentStatus),
6358
- };
6359
- };
6360
- const de_AccountStatusList = (output, context) => {
6361
- const retVal = (output || [])
6362
- .filter((e) => e != null)
6363
- .map((entry) => {
6364
- if (entry === null) {
6365
- return null;
6366
- }
6367
- return de_AccountStatus(entry, context);
6368
- });
6369
- return retVal;
6370
- };
6371
- const de_Attachment = (output, context) => {
6372
- return {
6373
- AttachmentId: (0, smithy_client_1.expectString)(output.AttachmentId),
6374
- AttachmentPolicyRuleNumber: (0, smithy_client_1.expectInt32)(output.AttachmentPolicyRuleNumber),
6375
- AttachmentType: (0, smithy_client_1.expectString)(output.AttachmentType),
6376
- CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
6377
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6378
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6379
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6380
- OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
6381
- ProposedSegmentChange: output.ProposedSegmentChange != null
6382
- ? de_ProposedSegmentChange(output.ProposedSegmentChange, context)
6383
- : undefined,
6384
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
6385
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6386
- State: (0, smithy_client_1.expectString)(output.State),
6387
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6388
- UpdatedAt: output.UpdatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.UpdatedAt))) : undefined,
6389
- };
6390
- };
6391
- const de_AttachmentList = (output, context) => {
6392
- const retVal = (output || [])
6393
- .filter((e) => e != null)
6394
- .map((entry) => {
6395
- if (entry === null) {
6396
- return null;
6397
- }
6398
- return de_Attachment(entry, context);
6159
+ return de_Attachment(entry, context);
6399
6160
  });
6400
6161
  return retVal;
6401
6162
  };
6402
- const de_AWSLocation = (output, context) => {
6403
- return {
6404
- SubnetArn: (0, smithy_client_1.expectString)(output.SubnetArn),
6405
- Zone: (0, smithy_client_1.expectString)(output.Zone),
6406
- };
6407
- };
6408
- const de_Bandwidth = (output, context) => {
6409
- return {
6410
- DownloadSpeed: (0, smithy_client_1.expectInt32)(output.DownloadSpeed),
6411
- UploadSpeed: (0, smithy_client_1.expectInt32)(output.UploadSpeed),
6412
- };
6413
- };
6414
6163
  const de_ConnectAttachment = (output, context) => {
6415
- return {
6416
- Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined,
6417
- Options: output.Options != null ? de_ConnectAttachmentOptions(output.Options, context) : undefined,
6418
- TransportAttachmentId: (0, smithy_client_1.expectString)(output.TransportAttachmentId),
6419
- };
6420
- };
6421
- const de_ConnectAttachmentOptions = (output, context) => {
6422
- return {
6423
- Protocol: (0, smithy_client_1.expectString)(output.Protocol),
6424
- };
6164
+ return (0, smithy_client_1.take)(output, {
6165
+ Attachment: (_) => de_Attachment(_, context),
6166
+ Options: smithy_client_1._json,
6167
+ TransportAttachmentId: smithy_client_1.expectString,
6168
+ });
6425
6169
  };
6426
6170
  const de_Connection = (output, context) => {
6427
- return {
6428
- ConnectedDeviceId: (0, smithy_client_1.expectString)(output.ConnectedDeviceId),
6429
- ConnectedLinkId: (0, smithy_client_1.expectString)(output.ConnectedLinkId),
6430
- ConnectionArn: (0, smithy_client_1.expectString)(output.ConnectionArn),
6431
- ConnectionId: (0, smithy_client_1.expectString)(output.ConnectionId),
6432
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6433
- Description: (0, smithy_client_1.expectString)(output.Description),
6434
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
6435
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6436
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
6437
- State: (0, smithy_client_1.expectString)(output.State),
6438
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6439
- };
6171
+ return (0, smithy_client_1.take)(output, {
6172
+ ConnectedDeviceId: smithy_client_1.expectString,
6173
+ ConnectedLinkId: smithy_client_1.expectString,
6174
+ ConnectionArn: smithy_client_1.expectString,
6175
+ ConnectionId: smithy_client_1.expectString,
6176
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6177
+ Description: smithy_client_1.expectString,
6178
+ DeviceId: smithy_client_1.expectString,
6179
+ GlobalNetworkId: smithy_client_1.expectString,
6180
+ LinkId: smithy_client_1.expectString,
6181
+ State: smithy_client_1.expectString,
6182
+ Tags: smithy_client_1._json,
6183
+ });
6440
6184
  };
6441
6185
  const de_ConnectionHealth = (output, context) => {
6442
- return {
6443
- Status: (0, smithy_client_1.expectString)(output.Status),
6444
- Timestamp: output.Timestamp != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Timestamp))) : undefined,
6445
- Type: (0, smithy_client_1.expectString)(output.Type),
6446
- };
6186
+ return (0, smithy_client_1.take)(output, {
6187
+ Status: smithy_client_1.expectString,
6188
+ Timestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6189
+ Type: smithy_client_1.expectString,
6190
+ });
6447
6191
  };
6448
6192
  const de_ConnectionList = (output, context) => {
6449
6193
  const retVal = (output || [])
6450
6194
  .filter((e) => e != null)
6451
6195
  .map((entry) => {
6452
- if (entry === null) {
6453
- return null;
6454
- }
6455
6196
  return de_Connection(entry, context);
6456
6197
  });
6457
6198
  return retVal;
6458
6199
  };
6459
6200
  const de_ConnectPeer = (output, context) => {
6460
- return {
6461
- Configuration: output.Configuration != null ? de_ConnectPeerConfiguration(output.Configuration, context) : undefined,
6462
- ConnectAttachmentId: (0, smithy_client_1.expectString)(output.ConnectAttachmentId),
6463
- ConnectPeerId: (0, smithy_client_1.expectString)(output.ConnectPeerId),
6464
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6465
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6466
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6467
- State: (0, smithy_client_1.expectString)(output.State),
6468
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6469
- };
6470
- };
6471
- const de_ConnectPeerAssociation = (output, context) => {
6472
- return {
6473
- ConnectPeerId: (0, smithy_client_1.expectString)(output.ConnectPeerId),
6474
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
6475
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6476
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
6477
- State: (0, smithy_client_1.expectString)(output.State),
6478
- };
6479
- };
6480
- const de_ConnectPeerAssociationList = (output, context) => {
6481
- const retVal = (output || [])
6482
- .filter((e) => e != null)
6483
- .map((entry) => {
6484
- if (entry === null) {
6485
- return null;
6486
- }
6487
- return de_ConnectPeerAssociation(entry, context);
6201
+ return (0, smithy_client_1.take)(output, {
6202
+ Configuration: smithy_client_1._json,
6203
+ ConnectAttachmentId: smithy_client_1.expectString,
6204
+ ConnectPeerId: smithy_client_1.expectString,
6205
+ CoreNetworkId: smithy_client_1.expectString,
6206
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6207
+ EdgeLocation: smithy_client_1.expectString,
6208
+ State: smithy_client_1.expectString,
6209
+ Tags: smithy_client_1._json,
6488
6210
  });
6489
- return retVal;
6490
- };
6491
- const de_ConnectPeerBgpConfiguration = (output, context) => {
6492
- return {
6493
- CoreNetworkAddress: (0, smithy_client_1.expectString)(output.CoreNetworkAddress),
6494
- CoreNetworkAsn: (0, smithy_client_1.expectLong)(output.CoreNetworkAsn),
6495
- PeerAddress: (0, smithy_client_1.expectString)(output.PeerAddress),
6496
- PeerAsn: (0, smithy_client_1.expectLong)(output.PeerAsn),
6497
- };
6498
- };
6499
- const de_ConnectPeerBgpConfigurationList = (output, context) => {
6500
- const retVal = (output || [])
6501
- .filter((e) => e != null)
6502
- .map((entry) => {
6503
- if (entry === null) {
6504
- return null;
6505
- }
6506
- return de_ConnectPeerBgpConfiguration(entry, context);
6507
- });
6508
- return retVal;
6509
- };
6510
- const de_ConnectPeerConfiguration = (output, context) => {
6511
- return {
6512
- BgpConfigurations: output.BgpConfigurations != null
6513
- ? de_ConnectPeerBgpConfigurationList(output.BgpConfigurations, context)
6514
- : undefined,
6515
- CoreNetworkAddress: (0, smithy_client_1.expectString)(output.CoreNetworkAddress),
6516
- InsideCidrBlocks: output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined,
6517
- PeerAddress: (0, smithy_client_1.expectString)(output.PeerAddress),
6518
- Protocol: (0, smithy_client_1.expectString)(output.Protocol),
6519
- };
6520
6211
  };
6521
6212
  const de_ConnectPeerSummary = (output, context) => {
6522
- return {
6523
- ConnectAttachmentId: (0, smithy_client_1.expectString)(output.ConnectAttachmentId),
6524
- ConnectPeerId: (0, smithy_client_1.expectString)(output.ConnectPeerId),
6525
- ConnectPeerState: (0, smithy_client_1.expectString)(output.ConnectPeerState),
6526
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6527
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6528
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6529
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6530
- };
6213
+ return (0, smithy_client_1.take)(output, {
6214
+ ConnectAttachmentId: smithy_client_1.expectString,
6215
+ ConnectPeerId: smithy_client_1.expectString,
6216
+ ConnectPeerState: smithy_client_1.expectString,
6217
+ CoreNetworkId: smithy_client_1.expectString,
6218
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6219
+ EdgeLocation: smithy_client_1.expectString,
6220
+ Tags: smithy_client_1._json,
6221
+ });
6531
6222
  };
6532
6223
  const de_ConnectPeerSummaryList = (output, context) => {
6533
6224
  const retVal = (output || [])
6534
6225
  .filter((e) => e != null)
6535
6226
  .map((entry) => {
6536
- if (entry === null) {
6537
- return null;
6538
- }
6539
6227
  return de_ConnectPeerSummary(entry, context);
6540
6228
  });
6541
6229
  return retVal;
6542
6230
  };
6543
- const de_ConstrainedStringList = (output, context) => {
6544
- const retVal = (output || [])
6545
- .filter((e) => e != null)
6546
- .map((entry) => {
6547
- if (entry === null) {
6548
- return null;
6549
- }
6550
- return (0, smithy_client_1.expectString)(entry);
6551
- });
6552
- return retVal;
6553
- };
6554
6231
  const de_CoreNetwork = (output, context) => {
6555
- return {
6556
- CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
6557
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6558
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6559
- Description: (0, smithy_client_1.expectString)(output.Description),
6560
- Edges: output.Edges != null ? de_CoreNetworkEdgeList(output.Edges, context) : undefined,
6561
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6562
- Segments: output.Segments != null ? de_CoreNetworkSegmentList(output.Segments, context) : undefined,
6563
- State: (0, smithy_client_1.expectString)(output.State),
6564
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6565
- };
6566
- };
6567
- const de_CoreNetworkChange = (output, context) => {
6568
- return {
6569
- Action: (0, smithy_client_1.expectString)(output.Action),
6570
- Identifier: (0, smithy_client_1.expectString)(output.Identifier),
6571
- IdentifierPath: (0, smithy_client_1.expectString)(output.IdentifierPath),
6572
- NewValues: output.NewValues != null ? de_CoreNetworkChangeValues(output.NewValues, context) : undefined,
6573
- PreviousValues: output.PreviousValues != null ? de_CoreNetworkChangeValues(output.PreviousValues, context) : undefined,
6574
- Type: (0, smithy_client_1.expectString)(output.Type),
6575
- };
6232
+ return (0, smithy_client_1.take)(output, {
6233
+ CoreNetworkArn: smithy_client_1.expectString,
6234
+ CoreNetworkId: smithy_client_1.expectString,
6235
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6236
+ Description: smithy_client_1.expectString,
6237
+ Edges: smithy_client_1._json,
6238
+ GlobalNetworkId: smithy_client_1.expectString,
6239
+ Segments: smithy_client_1._json,
6240
+ State: smithy_client_1.expectString,
6241
+ Tags: smithy_client_1._json,
6242
+ });
6576
6243
  };
6577
6244
  const de_CoreNetworkChangeEvent = (output, context) => {
6578
- return {
6579
- Action: (0, smithy_client_1.expectString)(output.Action),
6580
- EventTime: output.EventTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EventTime))) : undefined,
6581
- IdentifierPath: (0, smithy_client_1.expectString)(output.IdentifierPath),
6582
- Status: (0, smithy_client_1.expectString)(output.Status),
6583
- Type: (0, smithy_client_1.expectString)(output.Type),
6584
- Values: output.Values != null ? de_CoreNetworkChangeEventValues(output.Values, context) : undefined,
6585
- };
6245
+ return (0, smithy_client_1.take)(output, {
6246
+ Action: smithy_client_1.expectString,
6247
+ EventTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6248
+ IdentifierPath: smithy_client_1.expectString,
6249
+ Status: smithy_client_1.expectString,
6250
+ Type: smithy_client_1.expectString,
6251
+ Values: smithy_client_1._json,
6252
+ });
6586
6253
  };
6587
6254
  const de_CoreNetworkChangeEventList = (output, context) => {
6588
6255
  const retVal = (output || [])
6589
6256
  .filter((e) => e != null)
6590
6257
  .map((entry) => {
6591
- if (entry === null) {
6592
- return null;
6593
- }
6594
6258
  return de_CoreNetworkChangeEvent(entry, context);
6595
6259
  });
6596
6260
  return retVal;
6597
6261
  };
6598
- const de_CoreNetworkChangeEventValues = (output, context) => {
6599
- return {
6600
- AttachmentId: (0, smithy_client_1.expectString)(output.AttachmentId),
6601
- Cidr: (0, smithy_client_1.expectString)(output.Cidr),
6602
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6603
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6604
- };
6605
- };
6606
- const de_CoreNetworkChangeList = (output, context) => {
6607
- const retVal = (output || [])
6608
- .filter((e) => e != null)
6609
- .map((entry) => {
6610
- if (entry === null) {
6611
- return null;
6612
- }
6613
- return de_CoreNetworkChange(entry, context);
6614
- });
6615
- return retVal;
6616
- };
6617
- const de_CoreNetworkChangeValues = (output, context) => {
6618
- return {
6619
- Asn: (0, smithy_client_1.expectLong)(output.Asn),
6620
- Cidr: (0, smithy_client_1.expectString)(output.Cidr),
6621
- DestinationIdentifier: (0, smithy_client_1.expectString)(output.DestinationIdentifier),
6622
- EdgeLocations: output.EdgeLocations != null ? de_ExternalRegionCodeList(output.EdgeLocations, context) : undefined,
6623
- InsideCidrBlocks: output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined,
6624
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6625
- SharedSegments: output.SharedSegments != null ? de_ConstrainedStringList(output.SharedSegments, context) : undefined,
6626
- };
6627
- };
6628
- const de_CoreNetworkEdge = (output, context) => {
6629
- return {
6630
- Asn: (0, smithy_client_1.expectLong)(output.Asn),
6631
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6632
- InsideCidrBlocks: output.InsideCidrBlocks != null ? de_ConstrainedStringList(output.InsideCidrBlocks, context) : undefined,
6633
- };
6634
- };
6635
- const de_CoreNetworkEdgeList = (output, context) => {
6636
- const retVal = (output || [])
6637
- .filter((e) => e != null)
6638
- .map((entry) => {
6639
- if (entry === null) {
6640
- return null;
6641
- }
6642
- return de_CoreNetworkEdge(entry, context);
6643
- });
6644
- return retVal;
6645
- };
6646
6262
  const de_CoreNetworkPolicy = (output, context) => {
6647
- return {
6648
- Alias: (0, smithy_client_1.expectString)(output.Alias),
6649
- ChangeSetState: (0, smithy_client_1.expectString)(output.ChangeSetState),
6650
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6651
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6652
- Description: (0, smithy_client_1.expectString)(output.Description),
6653
- PolicyDocument: output.PolicyDocument != null ? new smithy_client_1.LazyJsonString(output.PolicyDocument) : undefined,
6654
- PolicyErrors: output.PolicyErrors != null ? de_CoreNetworkPolicyErrorList(output.PolicyErrors, context) : undefined,
6655
- PolicyVersionId: (0, smithy_client_1.expectInt32)(output.PolicyVersionId),
6656
- };
6657
- };
6658
- const de_CoreNetworkPolicyError = (output, context) => {
6659
- return {
6660
- ErrorCode: (0, smithy_client_1.expectString)(output.ErrorCode),
6661
- Message: (0, smithy_client_1.expectString)(output.Message),
6662
- Path: (0, smithy_client_1.expectString)(output.Path),
6663
- };
6664
- };
6665
- const de_CoreNetworkPolicyErrorList = (output, context) => {
6666
- const retVal = (output || [])
6667
- .filter((e) => e != null)
6668
- .map((entry) => {
6669
- if (entry === null) {
6670
- return null;
6671
- }
6672
- return de_CoreNetworkPolicyError(entry, context);
6263
+ return (0, smithy_client_1.take)(output, {
6264
+ Alias: smithy_client_1.expectString,
6265
+ ChangeSetState: smithy_client_1.expectString,
6266
+ CoreNetworkId: smithy_client_1.expectString,
6267
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6268
+ Description: smithy_client_1.expectString,
6269
+ PolicyDocument: (_) => new smithy_client_1.LazyJsonString(_),
6270
+ PolicyErrors: smithy_client_1._json,
6271
+ PolicyVersionId: smithy_client_1.expectInt32,
6673
6272
  });
6674
- return retVal;
6675
6273
  };
6676
6274
  const de_CoreNetworkPolicyVersion = (output, context) => {
6677
- return {
6678
- Alias: (0, smithy_client_1.expectString)(output.Alias),
6679
- ChangeSetState: (0, smithy_client_1.expectString)(output.ChangeSetState),
6680
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6681
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6682
- Description: (0, smithy_client_1.expectString)(output.Description),
6683
- PolicyVersionId: (0, smithy_client_1.expectInt32)(output.PolicyVersionId),
6684
- };
6275
+ return (0, smithy_client_1.take)(output, {
6276
+ Alias: smithy_client_1.expectString,
6277
+ ChangeSetState: smithy_client_1.expectString,
6278
+ CoreNetworkId: smithy_client_1.expectString,
6279
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6280
+ Description: smithy_client_1.expectString,
6281
+ PolicyVersionId: smithy_client_1.expectInt32,
6282
+ });
6685
6283
  };
6686
6284
  const de_CoreNetworkPolicyVersionList = (output, context) => {
6687
6285
  const retVal = (output || [])
6688
6286
  .filter((e) => e != null)
6689
6287
  .map((entry) => {
6690
- if (entry === null) {
6691
- return null;
6692
- }
6693
6288
  return de_CoreNetworkPolicyVersion(entry, context);
6694
6289
  });
6695
6290
  return retVal;
6696
6291
  };
6697
- const de_CoreNetworkSegment = (output, context) => {
6698
- return {
6699
- EdgeLocations: output.EdgeLocations != null ? de_ExternalRegionCodeList(output.EdgeLocations, context) : undefined,
6700
- Name: (0, smithy_client_1.expectString)(output.Name),
6701
- SharedSegments: output.SharedSegments != null ? de_ConstrainedStringList(output.SharedSegments, context) : undefined,
6702
- };
6703
- };
6704
- const de_CoreNetworkSegmentEdgeIdentifier = (output, context) => {
6705
- return {
6706
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6707
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6708
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6709
- };
6710
- };
6711
- const de_CoreNetworkSegmentList = (output, context) => {
6712
- const retVal = (output || [])
6713
- .filter((e) => e != null)
6714
- .map((entry) => {
6715
- if (entry === null) {
6716
- return null;
6717
- }
6718
- return de_CoreNetworkSegment(entry, context);
6719
- });
6720
- return retVal;
6721
- };
6722
- const de_CoreNetworkSummary = (output, context) => {
6723
- return {
6724
- CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
6725
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6726
- Description: (0, smithy_client_1.expectString)(output.Description),
6727
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6728
- OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
6729
- State: (0, smithy_client_1.expectString)(output.State),
6730
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6731
- };
6732
- };
6733
- const de_CoreNetworkSummaryList = (output, context) => {
6734
- const retVal = (output || [])
6735
- .filter((e) => e != null)
6736
- .map((entry) => {
6737
- if (entry === null) {
6738
- return null;
6739
- }
6740
- return de_CoreNetworkSummary(entry, context);
6741
- });
6742
- return retVal;
6743
- };
6744
- const de_CustomerGatewayAssociation = (output, context) => {
6745
- return {
6746
- CustomerGatewayArn: (0, smithy_client_1.expectString)(output.CustomerGatewayArn),
6747
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
6748
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6749
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
6750
- State: (0, smithy_client_1.expectString)(output.State),
6751
- };
6752
- };
6753
- const de_CustomerGatewayAssociationList = (output, context) => {
6754
- const retVal = (output || [])
6755
- .filter((e) => e != null)
6756
- .map((entry) => {
6757
- if (entry === null) {
6758
- return null;
6759
- }
6760
- return de_CustomerGatewayAssociation(entry, context);
6761
- });
6762
- return retVal;
6763
- };
6764
6292
  const de_Device = (output, context) => {
6765
- return {
6766
- AWSLocation: output.AWSLocation != null ? de_AWSLocation(output.AWSLocation, context) : undefined,
6767
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6768
- Description: (0, smithy_client_1.expectString)(output.Description),
6769
- DeviceArn: (0, smithy_client_1.expectString)(output.DeviceArn),
6770
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
6771
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6772
- Location: output.Location != null ? de_Location(output.Location, context) : undefined,
6773
- Model: (0, smithy_client_1.expectString)(output.Model),
6774
- SerialNumber: (0, smithy_client_1.expectString)(output.SerialNumber),
6775
- SiteId: (0, smithy_client_1.expectString)(output.SiteId),
6776
- State: (0, smithy_client_1.expectString)(output.State),
6777
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6778
- Type: (0, smithy_client_1.expectString)(output.Type),
6779
- Vendor: (0, smithy_client_1.expectString)(output.Vendor),
6780
- };
6293
+ return (0, smithy_client_1.take)(output, {
6294
+ AWSLocation: smithy_client_1._json,
6295
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6296
+ Description: smithy_client_1.expectString,
6297
+ DeviceArn: smithy_client_1.expectString,
6298
+ DeviceId: smithy_client_1.expectString,
6299
+ GlobalNetworkId: smithy_client_1.expectString,
6300
+ Location: smithy_client_1._json,
6301
+ Model: smithy_client_1.expectString,
6302
+ SerialNumber: smithy_client_1.expectString,
6303
+ SiteId: smithy_client_1.expectString,
6304
+ State: smithy_client_1.expectString,
6305
+ Tags: smithy_client_1._json,
6306
+ Type: smithy_client_1.expectString,
6307
+ Vendor: smithy_client_1.expectString,
6308
+ });
6781
6309
  };
6782
6310
  const de_DeviceList = (output, context) => {
6783
6311
  const retVal = (output || [])
6784
6312
  .filter((e) => e != null)
6785
6313
  .map((entry) => {
6786
- if (entry === null) {
6787
- return null;
6788
- }
6789
6314
  return de_Device(entry, context);
6790
6315
  });
6791
6316
  return retVal;
6792
6317
  };
6793
- const de_ExceptionContextMap = (output, context) => {
6794
- return Object.entries(output).reduce((acc, [key, value]) => {
6795
- if (value === null) {
6796
- return acc;
6797
- }
6798
- acc[key] = (0, smithy_client_1.expectString)(value);
6799
- return acc;
6800
- }, {});
6801
- };
6802
- const de_ExternalRegionCodeList = (output, context) => {
6803
- const retVal = (output || [])
6804
- .filter((e) => e != null)
6805
- .map((entry) => {
6806
- if (entry === null) {
6807
- return null;
6808
- }
6809
- return (0, smithy_client_1.expectString)(entry);
6810
- });
6811
- return retVal;
6812
- };
6813
6318
  const de_GlobalNetwork = (output, context) => {
6814
- return {
6815
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6816
- Description: (0, smithy_client_1.expectString)(output.Description),
6817
- GlobalNetworkArn: (0, smithy_client_1.expectString)(output.GlobalNetworkArn),
6818
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6819
- State: (0, smithy_client_1.expectString)(output.State),
6820
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6821
- };
6319
+ return (0, smithy_client_1.take)(output, {
6320
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6321
+ Description: smithy_client_1.expectString,
6322
+ GlobalNetworkArn: smithy_client_1.expectString,
6323
+ GlobalNetworkId: smithy_client_1.expectString,
6324
+ State: smithy_client_1.expectString,
6325
+ Tags: smithy_client_1._json,
6326
+ });
6822
6327
  };
6823
6328
  const de_GlobalNetworkList = (output, context) => {
6824
6329
  const retVal = (output || [])
6825
6330
  .filter((e) => e != null)
6826
6331
  .map((entry) => {
6827
- if (entry === null) {
6828
- return null;
6829
- }
6830
6332
  return de_GlobalNetwork(entry, context);
6831
6333
  });
6832
6334
  return retVal;
6833
6335
  };
6834
6336
  const de_Link = (output, context) => {
6835
- return {
6836
- Bandwidth: output.Bandwidth != null ? de_Bandwidth(output.Bandwidth, context) : undefined,
6837
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
6838
- Description: (0, smithy_client_1.expectString)(output.Description),
6839
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6840
- LinkArn: (0, smithy_client_1.expectString)(output.LinkArn),
6841
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
6842
- Provider: (0, smithy_client_1.expectString)(output.Provider),
6843
- SiteId: (0, smithy_client_1.expectString)(output.SiteId),
6844
- State: (0, smithy_client_1.expectString)(output.State),
6845
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6846
- Type: (0, smithy_client_1.expectString)(output.Type),
6847
- };
6848
- };
6849
- const de_LinkAssociation = (output, context) => {
6850
- return {
6851
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
6852
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
6853
- LinkAssociationState: (0, smithy_client_1.expectString)(output.LinkAssociationState),
6854
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
6855
- };
6856
- };
6857
- const de_LinkAssociationList = (output, context) => {
6858
- const retVal = (output || [])
6859
- .filter((e) => e != null)
6860
- .map((entry) => {
6861
- if (entry === null) {
6862
- return null;
6863
- }
6864
- return de_LinkAssociation(entry, context);
6337
+ return (0, smithy_client_1.take)(output, {
6338
+ Bandwidth: smithy_client_1._json,
6339
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6340
+ Description: smithy_client_1.expectString,
6341
+ GlobalNetworkId: smithy_client_1.expectString,
6342
+ LinkArn: smithy_client_1.expectString,
6343
+ LinkId: smithy_client_1.expectString,
6344
+ Provider: smithy_client_1.expectString,
6345
+ SiteId: smithy_client_1.expectString,
6346
+ State: smithy_client_1.expectString,
6347
+ Tags: smithy_client_1._json,
6348
+ Type: smithy_client_1.expectString,
6865
6349
  });
6866
- return retVal;
6867
6350
  };
6868
6351
  const de_LinkList = (output, context) => {
6869
6352
  const retVal = (output || [])
6870
6353
  .filter((e) => e != null)
6871
6354
  .map((entry) => {
6872
- if (entry === null) {
6873
- return null;
6874
- }
6875
6355
  return de_Link(entry, context);
6876
6356
  });
6877
6357
  return retVal;
6878
6358
  };
6879
- const de_Location = (output, context) => {
6880
- return {
6881
- Address: (0, smithy_client_1.expectString)(output.Address),
6882
- Latitude: (0, smithy_client_1.expectString)(output.Latitude),
6883
- Longitude: (0, smithy_client_1.expectString)(output.Longitude),
6884
- };
6885
- };
6886
6359
  const de_NetworkResource = (output, context) => {
6887
- return {
6888
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
6889
- AwsRegion: (0, smithy_client_1.expectString)(output.AwsRegion),
6890
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6891
- Definition: (0, smithy_client_1.expectString)(output.Definition),
6892
- DefinitionTimestamp: output.DefinitionTimestamp != null
6893
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DefinitionTimestamp)))
6894
- : undefined,
6895
- Metadata: output.Metadata != null ? de_NetworkResourceMetadataMap(output.Metadata, context) : undefined,
6896
- RegisteredGatewayArn: (0, smithy_client_1.expectString)(output.RegisteredGatewayArn),
6897
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
6898
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
6899
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
6900
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
6901
- };
6902
- };
6903
- const de_NetworkResourceCount = (output, context) => {
6904
- return {
6905
- Count: (0, smithy_client_1.expectInt32)(output.Count),
6906
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
6907
- };
6908
- };
6909
- const de_NetworkResourceCountList = (output, context) => {
6910
- const retVal = (output || [])
6911
- .filter((e) => e != null)
6912
- .map((entry) => {
6913
- if (entry === null) {
6914
- return null;
6915
- }
6916
- return de_NetworkResourceCount(entry, context);
6360
+ return (0, smithy_client_1.take)(output, {
6361
+ AccountId: smithy_client_1.expectString,
6362
+ AwsRegion: smithy_client_1.expectString,
6363
+ CoreNetworkId: smithy_client_1.expectString,
6364
+ Definition: smithy_client_1.expectString,
6365
+ DefinitionTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6366
+ Metadata: smithy_client_1._json,
6367
+ RegisteredGatewayArn: smithy_client_1.expectString,
6368
+ ResourceArn: smithy_client_1.expectString,
6369
+ ResourceId: smithy_client_1.expectString,
6370
+ ResourceType: smithy_client_1.expectString,
6371
+ Tags: smithy_client_1._json,
6917
6372
  });
6918
- return retVal;
6919
6373
  };
6920
6374
  const de_NetworkResourceList = (output, context) => {
6921
6375
  const retVal = (output || [])
6922
6376
  .filter((e) => e != null)
6923
6377
  .map((entry) => {
6924
- if (entry === null) {
6925
- return null;
6926
- }
6927
6378
  return de_NetworkResource(entry, context);
6928
6379
  });
6929
6380
  return retVal;
6930
6381
  };
6931
- const de_NetworkResourceMetadataMap = (output, context) => {
6932
- return Object.entries(output).reduce((acc, [key, value]) => {
6933
- if (value === null) {
6934
- return acc;
6935
- }
6936
- acc[key] = (0, smithy_client_1.expectString)(value);
6937
- return acc;
6938
- }, {});
6939
- };
6940
- const de_NetworkResourceSummary = (output, context) => {
6941
- return {
6942
- Definition: (0, smithy_client_1.expectString)(output.Definition),
6943
- IsMiddlebox: (0, smithy_client_1.expectBoolean)(output.IsMiddlebox),
6944
- NameTag: (0, smithy_client_1.expectString)(output.NameTag),
6945
- RegisteredGatewayArn: (0, smithy_client_1.expectString)(output.RegisteredGatewayArn),
6946
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
6947
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
6948
- };
6949
- };
6950
- const de_NetworkRoute = (output, context) => {
6951
- return {
6952
- DestinationCidrBlock: (0, smithy_client_1.expectString)(output.DestinationCidrBlock),
6953
- Destinations: output.Destinations != null ? de_NetworkRouteDestinationList(output.Destinations, context) : undefined,
6954
- PrefixListId: (0, smithy_client_1.expectString)(output.PrefixListId),
6955
- State: (0, smithy_client_1.expectString)(output.State),
6956
- Type: (0, smithy_client_1.expectString)(output.Type),
6957
- };
6958
- };
6959
- const de_NetworkRouteDestination = (output, context) => {
6960
- return {
6961
- CoreNetworkAttachmentId: (0, smithy_client_1.expectString)(output.CoreNetworkAttachmentId),
6962
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
6963
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
6964
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
6965
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
6966
- TransitGatewayAttachmentId: (0, smithy_client_1.expectString)(output.TransitGatewayAttachmentId),
6967
- };
6968
- };
6969
- const de_NetworkRouteDestinationList = (output, context) => {
6970
- const retVal = (output || [])
6971
- .filter((e) => e != null)
6972
- .map((entry) => {
6973
- if (entry === null) {
6974
- return null;
6975
- }
6976
- return de_NetworkRouteDestination(entry, context);
6977
- });
6978
- return retVal;
6979
- };
6980
- const de_NetworkRouteList = (output, context) => {
6981
- const retVal = (output || [])
6982
- .filter((e) => e != null)
6983
- .map((entry) => {
6984
- if (entry === null) {
6985
- return null;
6986
- }
6987
- return de_NetworkRoute(entry, context);
6988
- });
6989
- return retVal;
6990
- };
6991
6382
  const de_NetworkTelemetry = (output, context) => {
6992
- return {
6993
- AccountId: (0, smithy_client_1.expectString)(output.AccountId),
6994
- Address: (0, smithy_client_1.expectString)(output.Address),
6995
- AwsRegion: (0, smithy_client_1.expectString)(output.AwsRegion),
6996
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
6997
- Health: output.Health != null ? de_ConnectionHealth(output.Health, context) : undefined,
6998
- RegisteredGatewayArn: (0, smithy_client_1.expectString)(output.RegisteredGatewayArn),
6999
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
7000
- ResourceId: (0, smithy_client_1.expectString)(output.ResourceId),
7001
- ResourceType: (0, smithy_client_1.expectString)(output.ResourceType),
7002
- };
6383
+ return (0, smithy_client_1.take)(output, {
6384
+ AccountId: smithy_client_1.expectString,
6385
+ Address: smithy_client_1.expectString,
6386
+ AwsRegion: smithy_client_1.expectString,
6387
+ CoreNetworkId: smithy_client_1.expectString,
6388
+ Health: (_) => de_ConnectionHealth(_, context),
6389
+ RegisteredGatewayArn: smithy_client_1.expectString,
6390
+ ResourceArn: smithy_client_1.expectString,
6391
+ ResourceId: smithy_client_1.expectString,
6392
+ ResourceType: smithy_client_1.expectString,
6393
+ });
7003
6394
  };
7004
6395
  const de_NetworkTelemetryList = (output, context) => {
7005
6396
  const retVal = (output || [])
7006
6397
  .filter((e) => e != null)
7007
6398
  .map((entry) => {
7008
- if (entry === null) {
7009
- return null;
7010
- }
7011
6399
  return de_NetworkTelemetry(entry, context);
7012
6400
  });
7013
6401
  return retVal;
7014
6402
  };
7015
- const de_OrganizationStatus = (output, context) => {
7016
- return {
7017
- AccountStatusList: output.AccountStatusList != null ? de_AccountStatusList(output.AccountStatusList, context) : undefined,
7018
- OrganizationAwsServiceAccessStatus: (0, smithy_client_1.expectString)(output.OrganizationAwsServiceAccessStatus),
7019
- OrganizationId: (0, smithy_client_1.expectString)(output.OrganizationId),
7020
- SLRDeploymentStatus: (0, smithy_client_1.expectString)(output.SLRDeploymentStatus),
7021
- };
7022
- };
7023
- const de_PathComponent = (output, context) => {
7024
- return {
7025
- DestinationCidrBlock: (0, smithy_client_1.expectString)(output.DestinationCidrBlock),
7026
- Resource: output.Resource != null ? de_NetworkResourceSummary(output.Resource, context) : undefined,
7027
- Sequence: (0, smithy_client_1.expectInt32)(output.Sequence),
7028
- };
7029
- };
7030
- const de_PathComponentList = (output, context) => {
7031
- const retVal = (output || [])
7032
- .filter((e) => e != null)
7033
- .map((entry) => {
7034
- if (entry === null) {
7035
- return null;
7036
- }
7037
- return de_PathComponent(entry, context);
7038
- });
7039
- return retVal;
7040
- };
7041
6403
  const de_Peering = (output, context) => {
7042
- return {
7043
- CoreNetworkArn: (0, smithy_client_1.expectString)(output.CoreNetworkArn),
7044
- CoreNetworkId: (0, smithy_client_1.expectString)(output.CoreNetworkId),
7045
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7046
- EdgeLocation: (0, smithy_client_1.expectString)(output.EdgeLocation),
7047
- OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
7048
- PeeringId: (0, smithy_client_1.expectString)(output.PeeringId),
7049
- PeeringType: (0, smithy_client_1.expectString)(output.PeeringType),
7050
- ResourceArn: (0, smithy_client_1.expectString)(output.ResourceArn),
7051
- State: (0, smithy_client_1.expectString)(output.State),
7052
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
7053
- };
6404
+ return (0, smithy_client_1.take)(output, {
6405
+ CoreNetworkArn: smithy_client_1.expectString,
6406
+ CoreNetworkId: smithy_client_1.expectString,
6407
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6408
+ EdgeLocation: smithy_client_1.expectString,
6409
+ OwnerAccountId: smithy_client_1.expectString,
6410
+ PeeringId: smithy_client_1.expectString,
6411
+ PeeringType: smithy_client_1.expectString,
6412
+ ResourceArn: smithy_client_1.expectString,
6413
+ State: smithy_client_1.expectString,
6414
+ Tags: smithy_client_1._json,
6415
+ });
7054
6416
  };
7055
6417
  const de_PeeringList = (output, context) => {
7056
6418
  const retVal = (output || [])
7057
6419
  .filter((e) => e != null)
7058
6420
  .map((entry) => {
7059
- if (entry === null) {
7060
- return null;
7061
- }
7062
6421
  return de_Peering(entry, context);
7063
6422
  });
7064
6423
  return retVal;
7065
6424
  };
7066
- const de_ProposedSegmentChange = (output, context) => {
7067
- return {
7068
- AttachmentPolicyRuleNumber: (0, smithy_client_1.expectInt32)(output.AttachmentPolicyRuleNumber),
7069
- SegmentName: (0, smithy_client_1.expectString)(output.SegmentName),
7070
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
7071
- };
7072
- };
7073
- const de_ReasonContextMap = (output, context) => {
7074
- return Object.entries(output).reduce((acc, [key, value]) => {
7075
- if (value === null) {
7076
- return acc;
7077
- }
7078
- acc[key] = (0, smithy_client_1.expectString)(value);
7079
- return acc;
7080
- }, {});
7081
- };
7082
- const de_Relationship = (output, context) => {
7083
- return {
7084
- From: (0, smithy_client_1.expectString)(output.From),
7085
- To: (0, smithy_client_1.expectString)(output.To),
7086
- };
7087
- };
7088
- const de_RelationshipList = (output, context) => {
7089
- const retVal = (output || [])
7090
- .filter((e) => e != null)
7091
- .map((entry) => {
7092
- if (entry === null) {
7093
- return null;
7094
- }
7095
- return de_Relationship(entry, context);
7096
- });
7097
- return retVal;
7098
- };
7099
6425
  const de_RouteAnalysis = (output, context) => {
7100
- return {
7101
- Destination: output.Destination != null ? de_RouteAnalysisEndpointOptions(output.Destination, context) : undefined,
7102
- ForwardPath: output.ForwardPath != null ? de_RouteAnalysisPath(output.ForwardPath, context) : undefined,
7103
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7104
- IncludeReturnPath: (0, smithy_client_1.expectBoolean)(output.IncludeReturnPath),
7105
- OwnerAccountId: (0, smithy_client_1.expectString)(output.OwnerAccountId),
7106
- ReturnPath: output.ReturnPath != null ? de_RouteAnalysisPath(output.ReturnPath, context) : undefined,
7107
- RouteAnalysisId: (0, smithy_client_1.expectString)(output.RouteAnalysisId),
7108
- Source: output.Source != null ? de_RouteAnalysisEndpointOptions(output.Source, context) : undefined,
7109
- StartTimestamp: output.StartTimestamp != null
7110
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.StartTimestamp)))
7111
- : undefined,
7112
- Status: (0, smithy_client_1.expectString)(output.Status),
7113
- UseMiddleboxes: (0, smithy_client_1.expectBoolean)(output.UseMiddleboxes),
7114
- };
7115
- };
7116
- const de_RouteAnalysisCompletion = (output, context) => {
7117
- return {
7118
- ReasonCode: (0, smithy_client_1.expectString)(output.ReasonCode),
7119
- ReasonContext: output.ReasonContext != null ? de_ReasonContextMap(output.ReasonContext, context) : undefined,
7120
- ResultCode: (0, smithy_client_1.expectString)(output.ResultCode),
7121
- };
7122
- };
7123
- const de_RouteAnalysisEndpointOptions = (output, context) => {
7124
- return {
7125
- IpAddress: (0, smithy_client_1.expectString)(output.IpAddress),
7126
- TransitGatewayArn: (0, smithy_client_1.expectString)(output.TransitGatewayArn),
7127
- TransitGatewayAttachmentArn: (0, smithy_client_1.expectString)(output.TransitGatewayAttachmentArn),
7128
- };
7129
- };
7130
- const de_RouteAnalysisPath = (output, context) => {
7131
- return {
7132
- CompletionStatus: output.CompletionStatus != null ? de_RouteAnalysisCompletion(output.CompletionStatus, context) : undefined,
7133
- Path: output.Path != null ? de_PathComponentList(output.Path, context) : undefined,
7134
- };
6426
+ return (0, smithy_client_1.take)(output, {
6427
+ Destination: smithy_client_1._json,
6428
+ ForwardPath: smithy_client_1._json,
6429
+ GlobalNetworkId: smithy_client_1.expectString,
6430
+ IncludeReturnPath: smithy_client_1.expectBoolean,
6431
+ OwnerAccountId: smithy_client_1.expectString,
6432
+ ReturnPath: smithy_client_1._json,
6433
+ RouteAnalysisId: smithy_client_1.expectString,
6434
+ Source: smithy_client_1._json,
6435
+ StartTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6436
+ Status: smithy_client_1.expectString,
6437
+ UseMiddleboxes: smithy_client_1.expectBoolean,
6438
+ });
7135
6439
  };
7136
6440
  const de_Site = (output, context) => {
7137
- return {
7138
- CreatedAt: output.CreatedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedAt))) : undefined,
7139
- Description: (0, smithy_client_1.expectString)(output.Description),
7140
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7141
- Location: output.Location != null ? de_Location(output.Location, context) : undefined,
7142
- SiteArn: (0, smithy_client_1.expectString)(output.SiteArn),
7143
- SiteId: (0, smithy_client_1.expectString)(output.SiteId),
7144
- State: (0, smithy_client_1.expectString)(output.State),
7145
- Tags: output.Tags != null ? de_TagList(output.Tags, context) : undefined,
7146
- };
6441
+ return (0, smithy_client_1.take)(output, {
6442
+ CreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
6443
+ Description: smithy_client_1.expectString,
6444
+ GlobalNetworkId: smithy_client_1.expectString,
6445
+ Location: smithy_client_1._json,
6446
+ SiteArn: smithy_client_1.expectString,
6447
+ SiteId: smithy_client_1.expectString,
6448
+ State: smithy_client_1.expectString,
6449
+ Tags: smithy_client_1._json,
6450
+ });
7147
6451
  };
7148
6452
  const de_SiteList = (output, context) => {
7149
6453
  const retVal = (output || [])
7150
6454
  .filter((e) => e != null)
7151
6455
  .map((entry) => {
7152
- if (entry === null) {
7153
- return null;
7154
- }
7155
6456
  return de_Site(entry, context);
7156
6457
  });
7157
6458
  return retVal;
7158
6459
  };
7159
6460
  const de_SiteToSiteVpnAttachment = (output, context) => {
7160
- return {
7161
- Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined,
7162
- VpnConnectionArn: (0, smithy_client_1.expectString)(output.VpnConnectionArn),
7163
- };
7164
- };
7165
- const de_SubnetArnList = (output, context) => {
7166
- const retVal = (output || [])
7167
- .filter((e) => e != null)
7168
- .map((entry) => {
7169
- if (entry === null) {
7170
- return null;
7171
- }
7172
- return (0, smithy_client_1.expectString)(entry);
7173
- });
7174
- return retVal;
7175
- };
7176
- const de_Tag = (output, context) => {
7177
- return {
7178
- Key: (0, smithy_client_1.expectString)(output.Key),
7179
- Value: (0, smithy_client_1.expectString)(output.Value),
7180
- };
7181
- };
7182
- const de_TagList = (output, context) => {
7183
- const retVal = (output || [])
7184
- .filter((e) => e != null)
7185
- .map((entry) => {
7186
- if (entry === null) {
7187
- return null;
7188
- }
7189
- return de_Tag(entry, context);
7190
- });
7191
- return retVal;
7192
- };
7193
- const de_TransitGatewayConnectPeerAssociation = (output, context) => {
7194
- return {
7195
- DeviceId: (0, smithy_client_1.expectString)(output.DeviceId),
7196
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7197
- LinkId: (0, smithy_client_1.expectString)(output.LinkId),
7198
- State: (0, smithy_client_1.expectString)(output.State),
7199
- TransitGatewayConnectPeerArn: (0, smithy_client_1.expectString)(output.TransitGatewayConnectPeerArn),
7200
- };
7201
- };
7202
- const de_TransitGatewayConnectPeerAssociationList = (output, context) => {
7203
- const retVal = (output || [])
7204
- .filter((e) => e != null)
7205
- .map((entry) => {
7206
- if (entry === null) {
7207
- return null;
7208
- }
7209
- return de_TransitGatewayConnectPeerAssociation(entry, context);
6461
+ return (0, smithy_client_1.take)(output, {
6462
+ Attachment: (_) => de_Attachment(_, context),
6463
+ VpnConnectionArn: smithy_client_1.expectString,
7210
6464
  });
7211
- return retVal;
7212
6465
  };
7213
6466
  const de_TransitGatewayPeering = (output, context) => {
7214
- return {
7215
- Peering: output.Peering != null ? de_Peering(output.Peering, context) : undefined,
7216
- TransitGatewayArn: (0, smithy_client_1.expectString)(output.TransitGatewayArn),
7217
- TransitGatewayPeeringAttachmentId: (0, smithy_client_1.expectString)(output.TransitGatewayPeeringAttachmentId),
7218
- };
7219
- };
7220
- const de_TransitGatewayRegistration = (output, context) => {
7221
- return {
7222
- GlobalNetworkId: (0, smithy_client_1.expectString)(output.GlobalNetworkId),
7223
- State: output.State != null ? de_TransitGatewayRegistrationStateReason(output.State, context) : undefined,
7224
- TransitGatewayArn: (0, smithy_client_1.expectString)(output.TransitGatewayArn),
7225
- };
7226
- };
7227
- const de_TransitGatewayRegistrationList = (output, context) => {
7228
- const retVal = (output || [])
7229
- .filter((e) => e != null)
7230
- .map((entry) => {
7231
- if (entry === null) {
7232
- return null;
7233
- }
7234
- return de_TransitGatewayRegistration(entry, context);
6467
+ return (0, smithy_client_1.take)(output, {
6468
+ Peering: (_) => de_Peering(_, context),
6469
+ TransitGatewayArn: smithy_client_1.expectString,
6470
+ TransitGatewayPeeringAttachmentId: smithy_client_1.expectString,
7235
6471
  });
7236
- return retVal;
7237
- };
7238
- const de_TransitGatewayRegistrationStateReason = (output, context) => {
7239
- return {
7240
- Code: (0, smithy_client_1.expectString)(output.Code),
7241
- Message: (0, smithy_client_1.expectString)(output.Message),
7242
- };
7243
6472
  };
7244
6473
  const de_TransitGatewayRouteTableAttachment = (output, context) => {
7245
- return {
7246
- Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined,
7247
- PeeringId: (0, smithy_client_1.expectString)(output.PeeringId),
7248
- TransitGatewayRouteTableArn: (0, smithy_client_1.expectString)(output.TransitGatewayRouteTableArn),
7249
- };
7250
- };
7251
- const de_ValidationExceptionField = (output, context) => {
7252
- return {
7253
- Message: (0, smithy_client_1.expectString)(output.Message),
7254
- Name: (0, smithy_client_1.expectString)(output.Name),
7255
- };
7256
- };
7257
- const de_ValidationExceptionFieldList = (output, context) => {
7258
- const retVal = (output || [])
7259
- .filter((e) => e != null)
7260
- .map((entry) => {
7261
- if (entry === null) {
7262
- return null;
7263
- }
7264
- return de_ValidationExceptionField(entry, context);
6474
+ return (0, smithy_client_1.take)(output, {
6475
+ Attachment: (_) => de_Attachment(_, context),
6476
+ PeeringId: smithy_client_1.expectString,
6477
+ TransitGatewayRouteTableArn: smithy_client_1.expectString,
7265
6478
  });
7266
- return retVal;
7267
6479
  };
7268
6480
  const de_VpcAttachment = (output, context) => {
7269
- return {
7270
- Attachment: output.Attachment != null ? de_Attachment(output.Attachment, context) : undefined,
7271
- Options: output.Options != null ? de_VpcOptions(output.Options, context) : undefined,
7272
- SubnetArns: output.SubnetArns != null ? de_SubnetArnList(output.SubnetArns, context) : undefined,
7273
- };
7274
- };
7275
- const de_VpcOptions = (output, context) => {
7276
- return {
7277
- ApplianceModeSupport: (0, smithy_client_1.expectBoolean)(output.ApplianceModeSupport),
7278
- Ipv6Support: (0, smithy_client_1.expectBoolean)(output.Ipv6Support),
7279
- };
6481
+ return (0, smithy_client_1.take)(output, {
6482
+ Attachment: (_) => de_Attachment(_, context),
6483
+ Options: smithy_client_1._json,
6484
+ SubnetArns: smithy_client_1._json,
6485
+ });
7280
6486
  };
7281
6487
  const deserializeMetadata = (output) => ({
7282
6488
  httpStatusCode: output.statusCode,