@aws-sdk/client-networkmanager 3.28.0 → 3.32.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.
@@ -1,6 +1,6 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
- import { expectInt as __expectInt, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, strictParseInt as __strictParseInt, } from "@aws-sdk/smithy-client";
3
+ import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, parseEpochTimestamp as __parseEpochTimestamp, strictParseInt32 as __strictParseInt32, } from "@aws-sdk/smithy-client";
4
4
  export var serializeAws_restJson1AssociateCustomerGatewayCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
5
5
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
6
6
  return __generator(this, function (_c) {
@@ -1300,9 +1300,9 @@ export var serializeAws_restJson1UpdateSiteCommand = function (input, context) {
1300
1300
  });
1301
1301
  }); };
1302
1302
  export var deserializeAws_restJson1AssociateCustomerGatewayCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1303
- var contents, data;
1304
- return __generator(this, function (_a) {
1305
- switch (_a.label) {
1303
+ var contents, data, _a, _b;
1304
+ return __generator(this, function (_c) {
1305
+ switch (_c.label) {
1306
1306
  case 0:
1307
1307
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1308
1308
  return [2 /*return*/, deserializeAws_restJson1AssociateCustomerGatewayCommandError(output, context)];
@@ -1311,9 +1311,11 @@ export var deserializeAws_restJson1AssociateCustomerGatewayCommand = function (o
1311
1311
  $metadata: deserializeMetadata(output),
1312
1312
  CustomerGatewayAssociation: undefined,
1313
1313
  };
1314
+ _a = __expectNonNull;
1315
+ _b = __expectObject;
1314
1316
  return [4 /*yield*/, parseBody(output.body, context)];
1315
1317
  case 1:
1316
- data = _a.sent();
1318
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1317
1319
  if (data.CustomerGatewayAssociation !== undefined && data.CustomerGatewayAssociation !== null) {
1318
1320
  contents.CustomerGatewayAssociation = deserializeAws_restJson1CustomerGatewayAssociation(data.CustomerGatewayAssociation, context);
1319
1321
  }
@@ -1408,9 +1410,9 @@ var deserializeAws_restJson1AssociateCustomerGatewayCommandError = function (out
1408
1410
  });
1409
1411
  }); };
1410
1412
  export var deserializeAws_restJson1AssociateLinkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1411
- var contents, data;
1412
- return __generator(this, function (_a) {
1413
- switch (_a.label) {
1413
+ var contents, data, _a, _b;
1414
+ return __generator(this, function (_c) {
1415
+ switch (_c.label) {
1414
1416
  case 0:
1415
1417
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1416
1418
  return [2 /*return*/, deserializeAws_restJson1AssociateLinkCommandError(output, context)];
@@ -1419,9 +1421,11 @@ export var deserializeAws_restJson1AssociateLinkCommand = function (output, cont
1419
1421
  $metadata: deserializeMetadata(output),
1420
1422
  LinkAssociation: undefined,
1421
1423
  };
1424
+ _a = __expectNonNull;
1425
+ _b = __expectObject;
1422
1426
  return [4 /*yield*/, parseBody(output.body, context)];
1423
1427
  case 1:
1424
- data = _a.sent();
1428
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1425
1429
  if (data.LinkAssociation !== undefined && data.LinkAssociation !== null) {
1426
1430
  contents.LinkAssociation = deserializeAws_restJson1LinkAssociation(data.LinkAssociation, context);
1427
1431
  }
@@ -1516,9 +1520,9 @@ var deserializeAws_restJson1AssociateLinkCommandError = function (output, contex
1516
1520
  });
1517
1521
  }); };
1518
1522
  export var deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1519
- var contents, data;
1520
- return __generator(this, function (_a) {
1521
- switch (_a.label) {
1523
+ var contents, data, _a, _b;
1524
+ return __generator(this, function (_c) {
1525
+ switch (_c.label) {
1522
1526
  case 0:
1523
1527
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1524
1528
  return [2 /*return*/, deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommandError(output, context)];
@@ -1527,9 +1531,11 @@ export var deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = f
1527
1531
  $metadata: deserializeMetadata(output),
1528
1532
  TransitGatewayConnectPeerAssociation: undefined,
1529
1533
  };
1534
+ _a = __expectNonNull;
1535
+ _b = __expectObject;
1530
1536
  return [4 /*yield*/, parseBody(output.body, context)];
1531
1537
  case 1:
1532
- data = _a.sent();
1538
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1533
1539
  if (data.TransitGatewayConnectPeerAssociation !== undefined && data.TransitGatewayConnectPeerAssociation !== null) {
1534
1540
  contents.TransitGatewayConnectPeerAssociation = deserializeAws_restJson1TransitGatewayConnectPeerAssociation(data.TransitGatewayConnectPeerAssociation, context);
1535
1541
  }
@@ -1624,9 +1630,9 @@ var deserializeAws_restJson1AssociateTransitGatewayConnectPeerCommandError = fun
1624
1630
  });
1625
1631
  }); };
1626
1632
  export var deserializeAws_restJson1CreateConnectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1627
- var contents, data;
1628
- return __generator(this, function (_a) {
1629
- switch (_a.label) {
1633
+ var contents, data, _a, _b;
1634
+ return __generator(this, function (_c) {
1635
+ switch (_c.label) {
1630
1636
  case 0:
1631
1637
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1632
1638
  return [2 /*return*/, deserializeAws_restJson1CreateConnectionCommandError(output, context)];
@@ -1635,9 +1641,11 @@ export var deserializeAws_restJson1CreateConnectionCommand = function (output, c
1635
1641
  $metadata: deserializeMetadata(output),
1636
1642
  Connection: undefined,
1637
1643
  };
1644
+ _a = __expectNonNull;
1645
+ _b = __expectObject;
1638
1646
  return [4 /*yield*/, parseBody(output.body, context)];
1639
1647
  case 1:
1640
- data = _a.sent();
1648
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1641
1649
  if (data.Connection !== undefined && data.Connection !== null) {
1642
1650
  contents.Connection = deserializeAws_restJson1Connection(data.Connection, context);
1643
1651
  }
@@ -1724,9 +1732,9 @@ var deserializeAws_restJson1CreateConnectionCommandError = function (output, con
1724
1732
  });
1725
1733
  }); };
1726
1734
  export var deserializeAws_restJson1CreateDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1727
- var contents, data;
1728
- return __generator(this, function (_a) {
1729
- switch (_a.label) {
1735
+ var contents, data, _a, _b;
1736
+ return __generator(this, function (_c) {
1737
+ switch (_c.label) {
1730
1738
  case 0:
1731
1739
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1732
1740
  return [2 /*return*/, deserializeAws_restJson1CreateDeviceCommandError(output, context)];
@@ -1735,9 +1743,11 @@ export var deserializeAws_restJson1CreateDeviceCommand = function (output, conte
1735
1743
  $metadata: deserializeMetadata(output),
1736
1744
  Device: undefined,
1737
1745
  };
1746
+ _a = __expectNonNull;
1747
+ _b = __expectObject;
1738
1748
  return [4 /*yield*/, parseBody(output.body, context)];
1739
1749
  case 1:
1740
- data = _a.sent();
1750
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1741
1751
  if (data.Device !== undefined && data.Device !== null) {
1742
1752
  contents.Device = deserializeAws_restJson1Device(data.Device, context);
1743
1753
  }
@@ -1832,9 +1842,9 @@ var deserializeAws_restJson1CreateDeviceCommandError = function (output, context
1832
1842
  });
1833
1843
  }); };
1834
1844
  export var deserializeAws_restJson1CreateGlobalNetworkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1835
- var contents, data;
1836
- return __generator(this, function (_a) {
1837
- switch (_a.label) {
1845
+ var contents, data, _a, _b;
1846
+ return __generator(this, function (_c) {
1847
+ switch (_c.label) {
1838
1848
  case 0:
1839
1849
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1840
1850
  return [2 /*return*/, deserializeAws_restJson1CreateGlobalNetworkCommandError(output, context)];
@@ -1843,9 +1853,11 @@ export var deserializeAws_restJson1CreateGlobalNetworkCommand = function (output
1843
1853
  $metadata: deserializeMetadata(output),
1844
1854
  GlobalNetwork: undefined,
1845
1855
  };
1856
+ _a = __expectNonNull;
1857
+ _b = __expectObject;
1846
1858
  return [4 /*yield*/, parseBody(output.body, context)];
1847
1859
  case 1:
1848
- data = _a.sent();
1860
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1849
1861
  if (data.GlobalNetwork !== undefined && data.GlobalNetwork !== null) {
1850
1862
  contents.GlobalNetwork = deserializeAws_restJson1GlobalNetwork(data.GlobalNetwork, context);
1851
1863
  }
@@ -1932,9 +1944,9 @@ var deserializeAws_restJson1CreateGlobalNetworkCommandError = function (output,
1932
1944
  });
1933
1945
  }); };
1934
1946
  export var deserializeAws_restJson1CreateLinkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
1935
- var contents, data;
1936
- return __generator(this, function (_a) {
1937
- switch (_a.label) {
1947
+ var contents, data, _a, _b;
1948
+ return __generator(this, function (_c) {
1949
+ switch (_c.label) {
1938
1950
  case 0:
1939
1951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1940
1952
  return [2 /*return*/, deserializeAws_restJson1CreateLinkCommandError(output, context)];
@@ -1943,9 +1955,11 @@ export var deserializeAws_restJson1CreateLinkCommand = function (output, context
1943
1955
  $metadata: deserializeMetadata(output),
1944
1956
  Link: undefined,
1945
1957
  };
1958
+ _a = __expectNonNull;
1959
+ _b = __expectObject;
1946
1960
  return [4 /*yield*/, parseBody(output.body, context)];
1947
1961
  case 1:
1948
- data = _a.sent();
1962
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
1949
1963
  if (data.Link !== undefined && data.Link !== null) {
1950
1964
  contents.Link = deserializeAws_restJson1Link(data.Link, context);
1951
1965
  }
@@ -2040,9 +2054,9 @@ var deserializeAws_restJson1CreateLinkCommandError = function (output, context)
2040
2054
  });
2041
2055
  }); };
2042
2056
  export var deserializeAws_restJson1CreateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2043
- var contents, data;
2044
- return __generator(this, function (_a) {
2045
- switch (_a.label) {
2057
+ var contents, data, _a, _b;
2058
+ return __generator(this, function (_c) {
2059
+ switch (_c.label) {
2046
2060
  case 0:
2047
2061
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2048
2062
  return [2 /*return*/, deserializeAws_restJson1CreateSiteCommandError(output, context)];
@@ -2051,9 +2065,11 @@ export var deserializeAws_restJson1CreateSiteCommand = function (output, context
2051
2065
  $metadata: deserializeMetadata(output),
2052
2066
  Site: undefined,
2053
2067
  };
2068
+ _a = __expectNonNull;
2069
+ _b = __expectObject;
2054
2070
  return [4 /*yield*/, parseBody(output.body, context)];
2055
2071
  case 1:
2056
- data = _a.sent();
2072
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2057
2073
  if (data.Site !== undefined && data.Site !== null) {
2058
2074
  contents.Site = deserializeAws_restJson1Site(data.Site, context);
2059
2075
  }
@@ -2148,9 +2164,9 @@ var deserializeAws_restJson1CreateSiteCommandError = function (output, context)
2148
2164
  });
2149
2165
  }); };
2150
2166
  export var deserializeAws_restJson1DeleteConnectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2151
- var contents, data;
2152
- return __generator(this, function (_a) {
2153
- switch (_a.label) {
2167
+ var contents, data, _a, _b;
2168
+ return __generator(this, function (_c) {
2169
+ switch (_c.label) {
2154
2170
  case 0:
2155
2171
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2156
2172
  return [2 /*return*/, deserializeAws_restJson1DeleteConnectionCommandError(output, context)];
@@ -2159,9 +2175,11 @@ export var deserializeAws_restJson1DeleteConnectionCommand = function (output, c
2159
2175
  $metadata: deserializeMetadata(output),
2160
2176
  Connection: undefined,
2161
2177
  };
2178
+ _a = __expectNonNull;
2179
+ _b = __expectObject;
2162
2180
  return [4 /*yield*/, parseBody(output.body, context)];
2163
2181
  case 1:
2164
- data = _a.sent();
2182
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2165
2183
  if (data.Connection !== undefined && data.Connection !== null) {
2166
2184
  contents.Connection = deserializeAws_restJson1Connection(data.Connection, context);
2167
2185
  }
@@ -2248,9 +2266,9 @@ var deserializeAws_restJson1DeleteConnectionCommandError = function (output, con
2248
2266
  });
2249
2267
  }); };
2250
2268
  export var deserializeAws_restJson1DeleteDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2251
- var contents, data;
2252
- return __generator(this, function (_a) {
2253
- switch (_a.label) {
2269
+ var contents, data, _a, _b;
2270
+ return __generator(this, function (_c) {
2271
+ switch (_c.label) {
2254
2272
  case 0:
2255
2273
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2256
2274
  return [2 /*return*/, deserializeAws_restJson1DeleteDeviceCommandError(output, context)];
@@ -2259,9 +2277,11 @@ export var deserializeAws_restJson1DeleteDeviceCommand = function (output, conte
2259
2277
  $metadata: deserializeMetadata(output),
2260
2278
  Device: undefined,
2261
2279
  };
2280
+ _a = __expectNonNull;
2281
+ _b = __expectObject;
2262
2282
  return [4 /*yield*/, parseBody(output.body, context)];
2263
2283
  case 1:
2264
- data = _a.sent();
2284
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2265
2285
  if (data.Device !== undefined && data.Device !== null) {
2266
2286
  contents.Device = deserializeAws_restJson1Device(data.Device, context);
2267
2287
  }
@@ -2348,9 +2368,9 @@ var deserializeAws_restJson1DeleteDeviceCommandError = function (output, context
2348
2368
  });
2349
2369
  }); };
2350
2370
  export var deserializeAws_restJson1DeleteGlobalNetworkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2351
- var contents, data;
2352
- return __generator(this, function (_a) {
2353
- switch (_a.label) {
2371
+ var contents, data, _a, _b;
2372
+ return __generator(this, function (_c) {
2373
+ switch (_c.label) {
2354
2374
  case 0:
2355
2375
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2356
2376
  return [2 /*return*/, deserializeAws_restJson1DeleteGlobalNetworkCommandError(output, context)];
@@ -2359,9 +2379,11 @@ export var deserializeAws_restJson1DeleteGlobalNetworkCommand = function (output
2359
2379
  $metadata: deserializeMetadata(output),
2360
2380
  GlobalNetwork: undefined,
2361
2381
  };
2382
+ _a = __expectNonNull;
2383
+ _b = __expectObject;
2362
2384
  return [4 /*yield*/, parseBody(output.body, context)];
2363
2385
  case 1:
2364
- data = _a.sent();
2386
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2365
2387
  if (data.GlobalNetwork !== undefined && data.GlobalNetwork !== null) {
2366
2388
  contents.GlobalNetwork = deserializeAws_restJson1GlobalNetwork(data.GlobalNetwork, context);
2367
2389
  }
@@ -2448,9 +2470,9 @@ var deserializeAws_restJson1DeleteGlobalNetworkCommandError = function (output,
2448
2470
  });
2449
2471
  }); };
2450
2472
  export var deserializeAws_restJson1DeleteLinkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2451
- var contents, data;
2452
- return __generator(this, function (_a) {
2453
- switch (_a.label) {
2473
+ var contents, data, _a, _b;
2474
+ return __generator(this, function (_c) {
2475
+ switch (_c.label) {
2454
2476
  case 0:
2455
2477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2456
2478
  return [2 /*return*/, deserializeAws_restJson1DeleteLinkCommandError(output, context)];
@@ -2459,9 +2481,11 @@ export var deserializeAws_restJson1DeleteLinkCommand = function (output, context
2459
2481
  $metadata: deserializeMetadata(output),
2460
2482
  Link: undefined,
2461
2483
  };
2484
+ _a = __expectNonNull;
2485
+ _b = __expectObject;
2462
2486
  return [4 /*yield*/, parseBody(output.body, context)];
2463
2487
  case 1:
2464
- data = _a.sent();
2488
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2465
2489
  if (data.Link !== undefined && data.Link !== null) {
2466
2490
  contents.Link = deserializeAws_restJson1Link(data.Link, context);
2467
2491
  }
@@ -2548,9 +2572,9 @@ var deserializeAws_restJson1DeleteLinkCommandError = function (output, context)
2548
2572
  });
2549
2573
  }); };
2550
2574
  export var deserializeAws_restJson1DeleteSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2551
- var contents, data;
2552
- return __generator(this, function (_a) {
2553
- switch (_a.label) {
2575
+ var contents, data, _a, _b;
2576
+ return __generator(this, function (_c) {
2577
+ switch (_c.label) {
2554
2578
  case 0:
2555
2579
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2556
2580
  return [2 /*return*/, deserializeAws_restJson1DeleteSiteCommandError(output, context)];
@@ -2559,9 +2583,11 @@ export var deserializeAws_restJson1DeleteSiteCommand = function (output, context
2559
2583
  $metadata: deserializeMetadata(output),
2560
2584
  Site: undefined,
2561
2585
  };
2586
+ _a = __expectNonNull;
2587
+ _b = __expectObject;
2562
2588
  return [4 /*yield*/, parseBody(output.body, context)];
2563
2589
  case 1:
2564
- data = _a.sent();
2590
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2565
2591
  if (data.Site !== undefined && data.Site !== null) {
2566
2592
  contents.Site = deserializeAws_restJson1Site(data.Site, context);
2567
2593
  }
@@ -2648,9 +2674,9 @@ var deserializeAws_restJson1DeleteSiteCommandError = function (output, context)
2648
2674
  });
2649
2675
  }); };
2650
2676
  export var deserializeAws_restJson1DeregisterTransitGatewayCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2651
- var contents, data;
2652
- return __generator(this, function (_a) {
2653
- switch (_a.label) {
2677
+ var contents, data, _a, _b;
2678
+ return __generator(this, function (_c) {
2679
+ switch (_c.label) {
2654
2680
  case 0:
2655
2681
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2656
2682
  return [2 /*return*/, deserializeAws_restJson1DeregisterTransitGatewayCommandError(output, context)];
@@ -2659,9 +2685,11 @@ export var deserializeAws_restJson1DeregisterTransitGatewayCommand = function (o
2659
2685
  $metadata: deserializeMetadata(output),
2660
2686
  TransitGatewayRegistration: undefined,
2661
2687
  };
2688
+ _a = __expectNonNull;
2689
+ _b = __expectObject;
2662
2690
  return [4 /*yield*/, parseBody(output.body, context)];
2663
2691
  case 1:
2664
- data = _a.sent();
2692
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2665
2693
  if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) {
2666
2694
  contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration(data.TransitGatewayRegistration, context);
2667
2695
  }
@@ -2748,9 +2776,9 @@ var deserializeAws_restJson1DeregisterTransitGatewayCommandError = function (out
2748
2776
  });
2749
2777
  }); };
2750
2778
  export var deserializeAws_restJson1DescribeGlobalNetworksCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2751
- var contents, data;
2752
- return __generator(this, function (_a) {
2753
- switch (_a.label) {
2779
+ var contents, data, _a, _b;
2780
+ return __generator(this, function (_c) {
2781
+ switch (_c.label) {
2754
2782
  case 0:
2755
2783
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2756
2784
  return [2 /*return*/, deserializeAws_restJson1DescribeGlobalNetworksCommandError(output, context)];
@@ -2760,9 +2788,11 @@ export var deserializeAws_restJson1DescribeGlobalNetworksCommand = function (out
2760
2788
  GlobalNetworks: undefined,
2761
2789
  NextToken: undefined,
2762
2790
  };
2791
+ _a = __expectNonNull;
2792
+ _b = __expectObject;
2763
2793
  return [4 /*yield*/, parseBody(output.body, context)];
2764
2794
  case 1:
2765
- data = _a.sent();
2795
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2766
2796
  if (data.GlobalNetworks !== undefined && data.GlobalNetworks !== null) {
2767
2797
  contents.GlobalNetworks = deserializeAws_restJson1GlobalNetworkList(data.GlobalNetworks, context);
2768
2798
  }
@@ -2844,9 +2874,9 @@ var deserializeAws_restJson1DescribeGlobalNetworksCommandError = function (outpu
2844
2874
  });
2845
2875
  }); };
2846
2876
  export var deserializeAws_restJson1DisassociateCustomerGatewayCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2847
- var contents, data;
2848
- return __generator(this, function (_a) {
2849
- switch (_a.label) {
2877
+ var contents, data, _a, _b;
2878
+ return __generator(this, function (_c) {
2879
+ switch (_c.label) {
2850
2880
  case 0:
2851
2881
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2852
2882
  return [2 /*return*/, deserializeAws_restJson1DisassociateCustomerGatewayCommandError(output, context)];
@@ -2855,9 +2885,11 @@ export var deserializeAws_restJson1DisassociateCustomerGatewayCommand = function
2855
2885
  $metadata: deserializeMetadata(output),
2856
2886
  CustomerGatewayAssociation: undefined,
2857
2887
  };
2888
+ _a = __expectNonNull;
2889
+ _b = __expectObject;
2858
2890
  return [4 /*yield*/, parseBody(output.body, context)];
2859
2891
  case 1:
2860
- data = _a.sent();
2892
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2861
2893
  if (data.CustomerGatewayAssociation !== undefined && data.CustomerGatewayAssociation !== null) {
2862
2894
  contents.CustomerGatewayAssociation = deserializeAws_restJson1CustomerGatewayAssociation(data.CustomerGatewayAssociation, context);
2863
2895
  }
@@ -2944,9 +2976,9 @@ var deserializeAws_restJson1DisassociateCustomerGatewayCommandError = function (
2944
2976
  });
2945
2977
  }); };
2946
2978
  export var deserializeAws_restJson1DisassociateLinkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2947
- var contents, data;
2948
- return __generator(this, function (_a) {
2949
- switch (_a.label) {
2979
+ var contents, data, _a, _b;
2980
+ return __generator(this, function (_c) {
2981
+ switch (_c.label) {
2950
2982
  case 0:
2951
2983
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2952
2984
  return [2 /*return*/, deserializeAws_restJson1DisassociateLinkCommandError(output, context)];
@@ -2955,9 +2987,11 @@ export var deserializeAws_restJson1DisassociateLinkCommand = function (output, c
2955
2987
  $metadata: deserializeMetadata(output),
2956
2988
  LinkAssociation: undefined,
2957
2989
  };
2990
+ _a = __expectNonNull;
2991
+ _b = __expectObject;
2958
2992
  return [4 /*yield*/, parseBody(output.body, context)];
2959
2993
  case 1:
2960
- data = _a.sent();
2994
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2961
2995
  if (data.LinkAssociation !== undefined && data.LinkAssociation !== null) {
2962
2996
  contents.LinkAssociation = deserializeAws_restJson1LinkAssociation(data.LinkAssociation, context);
2963
2997
  }
@@ -3044,9 +3078,9 @@ var deserializeAws_restJson1DisassociateLinkCommandError = function (output, con
3044
3078
  });
3045
3079
  }); };
3046
3080
  export var deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3047
- var contents, data;
3048
- return __generator(this, function (_a) {
3049
- switch (_a.label) {
3081
+ var contents, data, _a, _b;
3082
+ return __generator(this, function (_c) {
3083
+ switch (_c.label) {
3050
3084
  case 0:
3051
3085
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3052
3086
  return [2 /*return*/, deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommandError(output, context)];
@@ -3055,9 +3089,11 @@ export var deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommand
3055
3089
  $metadata: deserializeMetadata(output),
3056
3090
  TransitGatewayConnectPeerAssociation: undefined,
3057
3091
  };
3092
+ _a = __expectNonNull;
3093
+ _b = __expectObject;
3058
3094
  return [4 /*yield*/, parseBody(output.body, context)];
3059
3095
  case 1:
3060
- data = _a.sent();
3096
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3061
3097
  if (data.TransitGatewayConnectPeerAssociation !== undefined && data.TransitGatewayConnectPeerAssociation !== null) {
3062
3098
  contents.TransitGatewayConnectPeerAssociation = deserializeAws_restJson1TransitGatewayConnectPeerAssociation(data.TransitGatewayConnectPeerAssociation, context);
3063
3099
  }
@@ -3144,9 +3180,9 @@ var deserializeAws_restJson1DisassociateTransitGatewayConnectPeerCommandError =
3144
3180
  });
3145
3181
  }); };
3146
3182
  export var deserializeAws_restJson1GetConnectionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3147
- var contents, data;
3148
- return __generator(this, function (_a) {
3149
- switch (_a.label) {
3183
+ var contents, data, _a, _b;
3184
+ return __generator(this, function (_c) {
3185
+ switch (_c.label) {
3150
3186
  case 0:
3151
3187
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3152
3188
  return [2 /*return*/, deserializeAws_restJson1GetConnectionsCommandError(output, context)];
@@ -3156,9 +3192,11 @@ export var deserializeAws_restJson1GetConnectionsCommand = function (output, con
3156
3192
  Connections: undefined,
3157
3193
  NextToken: undefined,
3158
3194
  };
3195
+ _a = __expectNonNull;
3196
+ _b = __expectObject;
3159
3197
  return [4 /*yield*/, parseBody(output.body, context)];
3160
3198
  case 1:
3161
- data = _a.sent();
3199
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3162
3200
  if (data.Connections !== undefined && data.Connections !== null) {
3163
3201
  contents.Connections = deserializeAws_restJson1ConnectionList(data.Connections, context);
3164
3202
  }
@@ -3240,9 +3278,9 @@ var deserializeAws_restJson1GetConnectionsCommandError = function (output, conte
3240
3278
  });
3241
3279
  }); };
3242
3280
  export var deserializeAws_restJson1GetCustomerGatewayAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3243
- var contents, data;
3244
- return __generator(this, function (_a) {
3245
- switch (_a.label) {
3281
+ var contents, data, _a, _b;
3282
+ return __generator(this, function (_c) {
3283
+ switch (_c.label) {
3246
3284
  case 0:
3247
3285
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3248
3286
  return [2 /*return*/, deserializeAws_restJson1GetCustomerGatewayAssociationsCommandError(output, context)];
@@ -3252,9 +3290,11 @@ export var deserializeAws_restJson1GetCustomerGatewayAssociationsCommand = funct
3252
3290
  CustomerGatewayAssociations: undefined,
3253
3291
  NextToken: undefined,
3254
3292
  };
3293
+ _a = __expectNonNull;
3294
+ _b = __expectObject;
3255
3295
  return [4 /*yield*/, parseBody(output.body, context)];
3256
3296
  case 1:
3257
- data = _a.sent();
3297
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3258
3298
  if (data.CustomerGatewayAssociations !== undefined && data.CustomerGatewayAssociations !== null) {
3259
3299
  contents.CustomerGatewayAssociations = deserializeAws_restJson1CustomerGatewayAssociationList(data.CustomerGatewayAssociations, context);
3260
3300
  }
@@ -3344,9 +3384,9 @@ var deserializeAws_restJson1GetCustomerGatewayAssociationsCommandError = functio
3344
3384
  });
3345
3385
  }); };
3346
3386
  export var deserializeAws_restJson1GetDevicesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3347
- var contents, data;
3348
- return __generator(this, function (_a) {
3349
- switch (_a.label) {
3387
+ var contents, data, _a, _b;
3388
+ return __generator(this, function (_c) {
3389
+ switch (_c.label) {
3350
3390
  case 0:
3351
3391
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3352
3392
  return [2 /*return*/, deserializeAws_restJson1GetDevicesCommandError(output, context)];
@@ -3356,9 +3396,11 @@ export var deserializeAws_restJson1GetDevicesCommand = function (output, context
3356
3396
  Devices: undefined,
3357
3397
  NextToken: undefined,
3358
3398
  };
3399
+ _a = __expectNonNull;
3400
+ _b = __expectObject;
3359
3401
  return [4 /*yield*/, parseBody(output.body, context)];
3360
3402
  case 1:
3361
- data = _a.sent();
3403
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3362
3404
  if (data.Devices !== undefined && data.Devices !== null) {
3363
3405
  contents.Devices = deserializeAws_restJson1DeviceList(data.Devices, context);
3364
3406
  }
@@ -3440,9 +3482,9 @@ var deserializeAws_restJson1GetDevicesCommandError = function (output, context)
3440
3482
  });
3441
3483
  }); };
3442
3484
  export var deserializeAws_restJson1GetLinkAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3443
- var contents, data;
3444
- return __generator(this, function (_a) {
3445
- switch (_a.label) {
3485
+ var contents, data, _a, _b;
3486
+ return __generator(this, function (_c) {
3487
+ switch (_c.label) {
3446
3488
  case 0:
3447
3489
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3448
3490
  return [2 /*return*/, deserializeAws_restJson1GetLinkAssociationsCommandError(output, context)];
@@ -3452,9 +3494,11 @@ export var deserializeAws_restJson1GetLinkAssociationsCommand = function (output
3452
3494
  LinkAssociations: undefined,
3453
3495
  NextToken: undefined,
3454
3496
  };
3497
+ _a = __expectNonNull;
3498
+ _b = __expectObject;
3455
3499
  return [4 /*yield*/, parseBody(output.body, context)];
3456
3500
  case 1:
3457
- data = _a.sent();
3501
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3458
3502
  if (data.LinkAssociations !== undefined && data.LinkAssociations !== null) {
3459
3503
  contents.LinkAssociations = deserializeAws_restJson1LinkAssociationList(data.LinkAssociations, context);
3460
3504
  }
@@ -3536,9 +3580,9 @@ var deserializeAws_restJson1GetLinkAssociationsCommandError = function (output,
3536
3580
  });
3537
3581
  }); };
3538
3582
  export var deserializeAws_restJson1GetLinksCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3539
- var contents, data;
3540
- return __generator(this, function (_a) {
3541
- switch (_a.label) {
3583
+ var contents, data, _a, _b;
3584
+ return __generator(this, function (_c) {
3585
+ switch (_c.label) {
3542
3586
  case 0:
3543
3587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3544
3588
  return [2 /*return*/, deserializeAws_restJson1GetLinksCommandError(output, context)];
@@ -3548,9 +3592,11 @@ export var deserializeAws_restJson1GetLinksCommand = function (output, context)
3548
3592
  Links: undefined,
3549
3593
  NextToken: undefined,
3550
3594
  };
3595
+ _a = __expectNonNull;
3596
+ _b = __expectObject;
3551
3597
  return [4 /*yield*/, parseBody(output.body, context)];
3552
3598
  case 1:
3553
- data = _a.sent();
3599
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3554
3600
  if (data.Links !== undefined && data.Links !== null) {
3555
3601
  contents.Links = deserializeAws_restJson1LinkList(data.Links, context);
3556
3602
  }
@@ -3632,9 +3678,9 @@ var deserializeAws_restJson1GetLinksCommandError = function (output, context) {
3632
3678
  });
3633
3679
  }); };
3634
3680
  export var deserializeAws_restJson1GetSitesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3635
- var contents, data;
3636
- return __generator(this, function (_a) {
3637
- switch (_a.label) {
3681
+ var contents, data, _a, _b;
3682
+ return __generator(this, function (_c) {
3683
+ switch (_c.label) {
3638
3684
  case 0:
3639
3685
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3640
3686
  return [2 /*return*/, deserializeAws_restJson1GetSitesCommandError(output, context)];
@@ -3644,9 +3690,11 @@ export var deserializeAws_restJson1GetSitesCommand = function (output, context)
3644
3690
  NextToken: undefined,
3645
3691
  Sites: undefined,
3646
3692
  };
3693
+ _a = __expectNonNull;
3694
+ _b = __expectObject;
3647
3695
  return [4 /*yield*/, parseBody(output.body, context)];
3648
3696
  case 1:
3649
- data = _a.sent();
3697
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3650
3698
  if (data.NextToken !== undefined && data.NextToken !== null) {
3651
3699
  contents.NextToken = __expectString(data.NextToken);
3652
3700
  }
@@ -3728,9 +3776,9 @@ var deserializeAws_restJson1GetSitesCommandError = function (output, context) {
3728
3776
  });
3729
3777
  }); };
3730
3778
  export var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3731
- var contents, data;
3732
- return __generator(this, function (_a) {
3733
- switch (_a.label) {
3779
+ var contents, data, _a, _b;
3780
+ return __generator(this, function (_c) {
3781
+ switch (_c.label) {
3734
3782
  case 0:
3735
3783
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3736
3784
  return [2 /*return*/, deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError(output, context)];
@@ -3740,9 +3788,11 @@ export var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsComma
3740
3788
  NextToken: undefined,
3741
3789
  TransitGatewayConnectPeerAssociations: undefined,
3742
3790
  };
3791
+ _a = __expectNonNull;
3792
+ _b = __expectObject;
3743
3793
  return [4 /*yield*/, parseBody(output.body, context)];
3744
3794
  case 1:
3745
- data = _a.sent();
3795
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3746
3796
  if (data.NextToken !== undefined && data.NextToken !== null) {
3747
3797
  contents.NextToken = __expectString(data.NextToken);
3748
3798
  }
@@ -3832,9 +3882,9 @@ var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError
3832
3882
  });
3833
3883
  }); };
3834
3884
  export var deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3835
- var contents, data;
3836
- return __generator(this, function (_a) {
3837
- switch (_a.label) {
3885
+ var contents, data, _a, _b;
3886
+ return __generator(this, function (_c) {
3887
+ switch (_c.label) {
3838
3888
  case 0:
3839
3889
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3840
3890
  return [2 /*return*/, deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError(output, context)];
@@ -3844,9 +3894,11 @@ export var deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = funct
3844
3894
  NextToken: undefined,
3845
3895
  TransitGatewayRegistrations: undefined,
3846
3896
  };
3897
+ _a = __expectNonNull;
3898
+ _b = __expectObject;
3847
3899
  return [4 /*yield*/, parseBody(output.body, context)];
3848
3900
  case 1:
3849
- data = _a.sent();
3901
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3850
3902
  if (data.NextToken !== undefined && data.NextToken !== null) {
3851
3903
  contents.NextToken = __expectString(data.NextToken);
3852
3904
  }
@@ -3928,9 +3980,9 @@ var deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = functio
3928
3980
  });
3929
3981
  }); };
3930
3982
  export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3931
- var contents, data;
3932
- return __generator(this, function (_a) {
3933
- switch (_a.label) {
3983
+ var contents, data, _a, _b;
3984
+ return __generator(this, function (_c) {
3985
+ switch (_c.label) {
3934
3986
  case 0:
3935
3987
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3936
3988
  return [2 /*return*/, deserializeAws_restJson1ListTagsForResourceCommandError(output, context)];
@@ -3939,9 +3991,11 @@ export var deserializeAws_restJson1ListTagsForResourceCommand = function (output
3939
3991
  $metadata: deserializeMetadata(output),
3940
3992
  TagList: undefined,
3941
3993
  };
3994
+ _a = __expectNonNull;
3995
+ _b = __expectObject;
3942
3996
  return [4 /*yield*/, parseBody(output.body, context)];
3943
3997
  case 1:
3944
- data = _a.sent();
3998
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3945
3999
  if (data.TagList !== undefined && data.TagList !== null) {
3946
4000
  contents.TagList = deserializeAws_restJson1TagList(data.TagList, context);
3947
4001
  }
@@ -4020,9 +4074,9 @@ var deserializeAws_restJson1ListTagsForResourceCommandError = function (output,
4020
4074
  });
4021
4075
  }); };
4022
4076
  export var deserializeAws_restJson1RegisterTransitGatewayCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4023
- var contents, data;
4024
- return __generator(this, function (_a) {
4025
- switch (_a.label) {
4077
+ var contents, data, _a, _b;
4078
+ return __generator(this, function (_c) {
4079
+ switch (_c.label) {
4026
4080
  case 0:
4027
4081
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4028
4082
  return [2 /*return*/, deserializeAws_restJson1RegisterTransitGatewayCommandError(output, context)];
@@ -4031,9 +4085,11 @@ export var deserializeAws_restJson1RegisterTransitGatewayCommand = function (out
4031
4085
  $metadata: deserializeMetadata(output),
4032
4086
  TransitGatewayRegistration: undefined,
4033
4087
  };
4088
+ _a = __expectNonNull;
4089
+ _b = __expectObject;
4034
4090
  return [4 /*yield*/, parseBody(output.body, context)];
4035
4091
  case 1:
4036
- data = _a.sent();
4092
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4037
4093
  if (data.TransitGatewayRegistration !== undefined && data.TransitGatewayRegistration !== null) {
4038
4094
  contents.TransitGatewayRegistration = deserializeAws_restJson1TransitGatewayRegistration(data.TransitGatewayRegistration, context);
4039
4095
  }
@@ -4320,9 +4376,9 @@ var deserializeAws_restJson1UntagResourceCommandError = function (output, contex
4320
4376
  });
4321
4377
  }); };
4322
4378
  export var deserializeAws_restJson1UpdateConnectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4323
- var contents, data;
4324
- return __generator(this, function (_a) {
4325
- switch (_a.label) {
4379
+ var contents, data, _a, _b;
4380
+ return __generator(this, function (_c) {
4381
+ switch (_c.label) {
4326
4382
  case 0:
4327
4383
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4328
4384
  return [2 /*return*/, deserializeAws_restJson1UpdateConnectionCommandError(output, context)];
@@ -4331,9 +4387,11 @@ export var deserializeAws_restJson1UpdateConnectionCommand = function (output, c
4331
4387
  $metadata: deserializeMetadata(output),
4332
4388
  Connection: undefined,
4333
4389
  };
4390
+ _a = __expectNonNull;
4391
+ _b = __expectObject;
4334
4392
  return [4 /*yield*/, parseBody(output.body, context)];
4335
4393
  case 1:
4336
- data = _a.sent();
4394
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4337
4395
  if (data.Connection !== undefined && data.Connection !== null) {
4338
4396
  contents.Connection = deserializeAws_restJson1Connection(data.Connection, context);
4339
4397
  }
@@ -4420,9 +4478,9 @@ var deserializeAws_restJson1UpdateConnectionCommandError = function (output, con
4420
4478
  });
4421
4479
  }); };
4422
4480
  export var deserializeAws_restJson1UpdateDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4423
- var contents, data;
4424
- return __generator(this, function (_a) {
4425
- switch (_a.label) {
4481
+ var contents, data, _a, _b;
4482
+ return __generator(this, function (_c) {
4483
+ switch (_c.label) {
4426
4484
  case 0:
4427
4485
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4428
4486
  return [2 /*return*/, deserializeAws_restJson1UpdateDeviceCommandError(output, context)];
@@ -4431,9 +4489,11 @@ export var deserializeAws_restJson1UpdateDeviceCommand = function (output, conte
4431
4489
  $metadata: deserializeMetadata(output),
4432
4490
  Device: undefined,
4433
4491
  };
4492
+ _a = __expectNonNull;
4493
+ _b = __expectObject;
4434
4494
  return [4 /*yield*/, parseBody(output.body, context)];
4435
4495
  case 1:
4436
- data = _a.sent();
4496
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4437
4497
  if (data.Device !== undefined && data.Device !== null) {
4438
4498
  contents.Device = deserializeAws_restJson1Device(data.Device, context);
4439
4499
  }
@@ -4520,9 +4580,9 @@ var deserializeAws_restJson1UpdateDeviceCommandError = function (output, context
4520
4580
  });
4521
4581
  }); };
4522
4582
  export var deserializeAws_restJson1UpdateGlobalNetworkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4523
- var contents, data;
4524
- return __generator(this, function (_a) {
4525
- switch (_a.label) {
4583
+ var contents, data, _a, _b;
4584
+ return __generator(this, function (_c) {
4585
+ switch (_c.label) {
4526
4586
  case 0:
4527
4587
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4528
4588
  return [2 /*return*/, deserializeAws_restJson1UpdateGlobalNetworkCommandError(output, context)];
@@ -4531,9 +4591,11 @@ export var deserializeAws_restJson1UpdateGlobalNetworkCommand = function (output
4531
4591
  $metadata: deserializeMetadata(output),
4532
4592
  GlobalNetwork: undefined,
4533
4593
  };
4594
+ _a = __expectNonNull;
4595
+ _b = __expectObject;
4534
4596
  return [4 /*yield*/, parseBody(output.body, context)];
4535
4597
  case 1:
4536
- data = _a.sent();
4598
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4537
4599
  if (data.GlobalNetwork !== undefined && data.GlobalNetwork !== null) {
4538
4600
  contents.GlobalNetwork = deserializeAws_restJson1GlobalNetwork(data.GlobalNetwork, context);
4539
4601
  }
@@ -4620,9 +4682,9 @@ var deserializeAws_restJson1UpdateGlobalNetworkCommandError = function (output,
4620
4682
  });
4621
4683
  }); };
4622
4684
  export var deserializeAws_restJson1UpdateLinkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4623
- var contents, data;
4624
- return __generator(this, function (_a) {
4625
- switch (_a.label) {
4685
+ var contents, data, _a, _b;
4686
+ return __generator(this, function (_c) {
4687
+ switch (_c.label) {
4626
4688
  case 0:
4627
4689
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4628
4690
  return [2 /*return*/, deserializeAws_restJson1UpdateLinkCommandError(output, context)];
@@ -4631,9 +4693,11 @@ export var deserializeAws_restJson1UpdateLinkCommand = function (output, context
4631
4693
  $metadata: deserializeMetadata(output),
4632
4694
  Link: undefined,
4633
4695
  };
4696
+ _a = __expectNonNull;
4697
+ _b = __expectObject;
4634
4698
  return [4 /*yield*/, parseBody(output.body, context)];
4635
4699
  case 1:
4636
- data = _a.sent();
4700
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4637
4701
  if (data.Link !== undefined && data.Link !== null) {
4638
4702
  contents.Link = deserializeAws_restJson1Link(data.Link, context);
4639
4703
  }
@@ -4728,9 +4792,9 @@ var deserializeAws_restJson1UpdateLinkCommandError = function (output, context)
4728
4792
  });
4729
4793
  }); };
4730
4794
  export var deserializeAws_restJson1UpdateSiteCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4731
- var contents, data;
4732
- return __generator(this, function (_a) {
4733
- switch (_a.label) {
4795
+ var contents, data, _a, _b;
4796
+ return __generator(this, function (_c) {
4797
+ switch (_c.label) {
4734
4798
  case 0:
4735
4799
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4736
4800
  return [2 /*return*/, deserializeAws_restJson1UpdateSiteCommandError(output, context)];
@@ -4739,9 +4803,11 @@ export var deserializeAws_restJson1UpdateSiteCommand = function (output, context
4739
4803
  $metadata: deserializeMetadata(output),
4740
4804
  Site: undefined,
4741
4805
  };
4806
+ _a = __expectNonNull;
4807
+ _b = __expectObject;
4742
4808
  return [4 /*yield*/, parseBody(output.body, context)];
4743
4809
  case 1:
4744
- data = _a.sent();
4810
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4745
4811
  if (data.Site !== undefined && data.Site !== null) {
4746
4812
  contents.Site = deserializeAws_restJson1Site(data.Site, context);
4747
4813
  }
@@ -4878,7 +4944,7 @@ var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOu
4878
4944
  RetryAfterSeconds: undefined,
4879
4945
  };
4880
4946
  if (parsedOutput.headers["retry-after"] !== undefined) {
4881
- contents.RetryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
4947
+ contents.RetryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
4882
4948
  }
4883
4949
  data = parsedOutput.body;
4884
4950
  if (data.Message !== undefined && data.Message !== null) {
@@ -4954,7 +5020,7 @@ var deserializeAws_restJson1ThrottlingExceptionResponse = function (parsedOutput
4954
5020
  RetryAfterSeconds: undefined,
4955
5021
  };
4956
5022
  if (parsedOutput.headers["retry-after"] !== undefined) {
4957
- contents.RetryAfterSeconds = __strictParseInt(parsedOutput.headers["retry-after"]);
5023
+ contents.RetryAfterSeconds = __strictParseInt32(parsedOutput.headers["retry-after"]);
4958
5024
  }
4959
5025
  data = parsedOutput.body;
4960
5026
  if (data.Message !== undefined && data.Message !== null) {
@@ -5017,8 +5083,8 @@ var deserializeAws_restJson1AWSLocation = function (output, context) {
5017
5083
  };
5018
5084
  var deserializeAws_restJson1Bandwidth = function (output, context) {
5019
5085
  return {
5020
- DownloadSpeed: __expectInt(output.DownloadSpeed),
5021
- UploadSpeed: __expectInt(output.UploadSpeed),
5086
+ DownloadSpeed: __expectInt32(output.DownloadSpeed),
5087
+ UploadSpeed: __expectInt32(output.UploadSpeed),
5022
5088
  };
5023
5089
  };
5024
5090
  var deserializeAws_restJson1Connection = function (output, context) {
@@ -5028,7 +5094,7 @@ var deserializeAws_restJson1Connection = function (output, context) {
5028
5094
  ConnectionArn: __expectString(output.ConnectionArn),
5029
5095
  ConnectionId: __expectString(output.ConnectionId),
5030
5096
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5031
- ? new Date(Math.round(output.CreatedAt * 1000))
5097
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
5032
5098
  : undefined,
5033
5099
  Description: __expectString(output.Description),
5034
5100
  DeviceId: __expectString(output.DeviceId),
@@ -5075,7 +5141,7 @@ var deserializeAws_restJson1Device = function (output, context) {
5075
5141
  ? deserializeAws_restJson1AWSLocation(output.AWSLocation, context)
5076
5142
  : undefined,
5077
5143
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5078
- ? new Date(Math.round(output.CreatedAt * 1000))
5144
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
5079
5145
  : undefined,
5080
5146
  Description: __expectString(output.Description),
5081
5147
  DeviceArn: __expectString(output.DeviceArn),
@@ -5108,7 +5174,7 @@ var deserializeAws_restJson1DeviceList = function (output, context) {
5108
5174
  var deserializeAws_restJson1GlobalNetwork = function (output, context) {
5109
5175
  return {
5110
5176
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5111
- ? new Date(Math.round(output.CreatedAt * 1000))
5177
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
5112
5178
  : undefined,
5113
5179
  Description: __expectString(output.Description),
5114
5180
  GlobalNetworkArn: __expectString(output.GlobalNetworkArn),
@@ -5135,7 +5201,7 @@ var deserializeAws_restJson1Link = function (output, context) {
5135
5201
  ? deserializeAws_restJson1Bandwidth(output.Bandwidth, context)
5136
5202
  : undefined,
5137
5203
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5138
- ? new Date(Math.round(output.CreatedAt * 1000))
5204
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
5139
5205
  : undefined,
5140
5206
  Description: __expectString(output.Description),
5141
5207
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
@@ -5188,7 +5254,7 @@ var deserializeAws_restJson1Location = function (output, context) {
5188
5254
  var deserializeAws_restJson1Site = function (output, context) {
5189
5255
  return {
5190
5256
  CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
5191
- ? new Date(Math.round(output.CreatedAt * 1000))
5257
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
5192
5258
  : undefined,
5193
5259
  Description: __expectString(output.Description),
5194
5260
  GlobalNetworkId: __expectString(output.GlobalNetworkId),