@aws-sdk/client-networkmanager 3.121.0 → 3.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/NetworkManager.js +105 -0
  3. package/dist-cjs/commands/CreateTransitGatewayPeeringCommand.js +36 -0
  4. package/dist-cjs/commands/CreateTransitGatewayRouteTableAttachmentCommand.js +36 -0
  5. package/dist-cjs/commands/DeletePeeringCommand.js +36 -0
  6. package/dist-cjs/commands/GetCoreNetworkChangeEventsCommand.js +36 -0
  7. package/dist-cjs/commands/GetTransitGatewayPeeringCommand.js +36 -0
  8. package/dist-cjs/commands/GetTransitGatewayRouteTableAttachmentCommand.js +36 -0
  9. package/dist-cjs/commands/ListPeeringsCommand.js +36 -0
  10. package/dist-cjs/commands/index.js +7 -0
  11. package/dist-cjs/models/models_0.js +143 -5
  12. package/dist-cjs/pagination/GetCoreNetworkChangeEventsPaginator.js +36 -0
  13. package/dist-cjs/pagination/ListPeeringsPaginator.js +36 -0
  14. package/dist-cjs/pagination/index.js +3 -1
  15. package/dist-cjs/protocols/Aws_restJson1.js +849 -361
  16. package/dist-es/NetworkManager.js +105 -0
  17. package/dist-es/commands/CreateTransitGatewayPeeringCommand.js +39 -0
  18. package/dist-es/commands/CreateTransitGatewayRouteTableAttachmentCommand.js +39 -0
  19. package/dist-es/commands/DeletePeeringCommand.js +39 -0
  20. package/dist-es/commands/GetCoreNetworkChangeEventsCommand.js +39 -0
  21. package/dist-es/commands/GetTransitGatewayPeeringCommand.js +39 -0
  22. package/dist-es/commands/GetTransitGatewayRouteTableAttachmentCommand.js +39 -0
  23. package/dist-es/commands/ListPeeringsCommand.js +39 -0
  24. package/dist-es/commands/index.js +7 -0
  25. package/dist-es/models/models_0.js +99 -0
  26. package/dist-es/pagination/GetCoreNetworkChangeEventsPaginator.js +75 -0
  27. package/dist-es/pagination/ListPeeringsPaginator.js +75 -0
  28. package/dist-es/pagination/index.js +3 -1
  29. package/dist-es/protocols/Aws_restJson1.js +1029 -363
  30. package/dist-types/NetworkManager.d.ts +56 -1
  31. package/dist-types/NetworkManagerClient.d.ts +9 -2
  32. package/dist-types/commands/CreateTransitGatewayPeeringCommand.d.ts +35 -0
  33. package/dist-types/commands/CreateTransitGatewayRouteTableAttachmentCommand.d.ts +35 -0
  34. package/dist-types/commands/DeletePeeringCommand.d.ts +35 -0
  35. package/dist-types/commands/GetCoreNetworkChangeEventsCommand.d.ts +35 -0
  36. package/dist-types/commands/GetCoreNetworkPolicyCommand.d.ts +1 -1
  37. package/dist-types/commands/GetTransitGatewayPeeringCommand.d.ts +35 -0
  38. package/dist-types/commands/GetTransitGatewayRouteTableAttachmentCommand.d.ts +35 -0
  39. package/dist-types/commands/ListOrganizationServiceAccessStatusCommand.d.ts +17 -0
  40. package/dist-types/commands/ListPeeringsCommand.d.ts +35 -0
  41. package/dist-types/commands/StartOrganizationServiceAccessUpdateCommand.d.ts +17 -0
  42. package/dist-types/commands/index.d.ts +7 -0
  43. package/dist-types/models/models_0.d.ts +460 -7
  44. package/dist-types/pagination/GetCoreNetworkChangeEventsPaginator.d.ts +4 -0
  45. package/dist-types/pagination/ListPeeringsPaginator.d.ts +4 -0
  46. package/dist-types/pagination/index.d.ts +3 -1
  47. package/dist-types/protocols/Aws_restJson1.d.ts +21 -0
  48. package/dist-types/ts3.4/NetworkManager.d.ts +37 -0
  49. package/dist-types/ts3.4/NetworkManagerClient.d.ts +9 -2
  50. package/dist-types/ts3.4/commands/CreateTransitGatewayPeeringCommand.d.ts +17 -0
  51. package/dist-types/ts3.4/commands/CreateTransitGatewayRouteTableAttachmentCommand.d.ts +17 -0
  52. package/dist-types/ts3.4/commands/DeletePeeringCommand.d.ts +17 -0
  53. package/dist-types/ts3.4/commands/GetCoreNetworkChangeEventsCommand.d.ts +17 -0
  54. package/dist-types/ts3.4/commands/GetTransitGatewayPeeringCommand.d.ts +17 -0
  55. package/dist-types/ts3.4/commands/GetTransitGatewayRouteTableAttachmentCommand.d.ts +17 -0
  56. package/dist-types/ts3.4/commands/ListOrganizationServiceAccessStatusCommand.d.ts +1 -0
  57. package/dist-types/ts3.4/commands/ListPeeringsCommand.d.ts +17 -0
  58. package/dist-types/ts3.4/commands/StartOrganizationServiceAccessUpdateCommand.d.ts +1 -0
  59. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  60. package/dist-types/ts3.4/models/models_0.d.ts +266 -1
  61. package/dist-types/ts3.4/pagination/GetCoreNetworkChangeEventsPaginator.d.ts +4 -0
  62. package/dist-types/ts3.4/pagination/ListPeeringsPaginator.d.ts +4 -0
  63. package/dist-types/ts3.4/pagination/index.d.ts +3 -1
  64. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +21 -0
  65. package/package.json +26 -26
@@ -57,7 +57,7 @@ export var serializeAws_restJson1AssociateConnectPeerCommand = function (input,
57
57
  else {
58
58
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
59
59
  }
60
- body = JSON.stringify(__assign(__assign(__assign({}, (input.ConnectPeerId !== undefined && input.ConnectPeerId !== null && { ConnectPeerId: input.ConnectPeerId })), (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })));
60
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.ConnectPeerId != null && { ConnectPeerId: input.ConnectPeerId })), (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.LinkId != null && { LinkId: input.LinkId })));
61
61
  return [2, new __HttpRequest({
62
62
  protocol: protocol,
63
63
  hostname: hostname,
@@ -92,8 +92,7 @@ export var serializeAws_restJson1AssociateCustomerGatewayCommand = function (inp
92
92
  else {
93
93
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
94
94
  }
95
- body = JSON.stringify(__assign(__assign(__assign({}, (input.CustomerGatewayArn !== undefined &&
96
- input.CustomerGatewayArn !== null && { CustomerGatewayArn: input.CustomerGatewayArn })), (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })));
95
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.CustomerGatewayArn != null && { CustomerGatewayArn: input.CustomerGatewayArn })), (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.LinkId != null && { LinkId: input.LinkId })));
97
96
  return [2, new __HttpRequest({
98
97
  protocol: protocol,
99
98
  hostname: hostname,
@@ -128,7 +127,7 @@ export var serializeAws_restJson1AssociateLinkCommand = function (input, context
128
127
  else {
129
128
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
130
129
  }
131
- body = JSON.stringify(__assign(__assign({}, (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })));
130
+ body = JSON.stringify(__assign(__assign({}, (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.LinkId != null && { LinkId: input.LinkId })));
132
131
  return [2, new __HttpRequest({
133
132
  protocol: protocol,
134
133
  hostname: hostname,
@@ -163,8 +162,7 @@ export var serializeAws_restJson1AssociateTransitGatewayConnectPeerCommand = fun
163
162
  else {
164
163
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
165
164
  }
166
- body = JSON.stringify(__assign(__assign(__assign({}, (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })), (input.TransitGatewayConnectPeerArn !== undefined &&
167
- input.TransitGatewayConnectPeerArn !== null && {
165
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.LinkId != null && { LinkId: input.LinkId })), (input.TransitGatewayConnectPeerArn != null && {
168
166
  TransitGatewayConnectPeerArn: input.TransitGatewayConnectPeerArn,
169
167
  })));
170
168
  return [2, new __HttpRequest({
@@ -191,10 +189,7 @@ export var serializeAws_restJson1CreateConnectAttachmentCommand = function (inpu
191
189
  "content-type": "application/json",
192
190
  };
193
191
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/connect-attachments";
194
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId })), (input.EdgeLocation !== undefined && input.EdgeLocation !== null && { EdgeLocation: input.EdgeLocation })), (input.Options !== undefined &&
195
- input.Options !== null && { Options: serializeAws_restJson1ConnectAttachmentOptions(input.Options, context) })), (input.Tags !== undefined &&
196
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.TransportAttachmentId !== undefined &&
197
- input.TransportAttachmentId !== null && { TransportAttachmentId: input.TransportAttachmentId })));
192
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId })), (input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation })), (input.Options != null && { Options: serializeAws_restJson1ConnectAttachmentOptions(input.Options, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.TransportAttachmentId != null && { TransportAttachmentId: input.TransportAttachmentId })));
198
193
  return [2, new __HttpRequest({
199
194
  protocol: protocol,
200
195
  hostname: hostname,
@@ -229,10 +224,7 @@ export var serializeAws_restJson1CreateConnectionCommand = function (input, cont
229
224
  else {
230
225
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
231
226
  }
232
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ConnectedDeviceId !== undefined &&
233
- input.ConnectedDeviceId !== null && { ConnectedDeviceId: input.ConnectedDeviceId })), (input.ConnectedLinkId !== undefined &&
234
- input.ConnectedLinkId !== null && { ConnectedLinkId: input.ConnectedLinkId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.DeviceId !== undefined && input.DeviceId !== null && { DeviceId: input.DeviceId })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })), (input.Tags !== undefined &&
235
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
227
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.ConnectedDeviceId != null && { ConnectedDeviceId: input.ConnectedDeviceId })), (input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId })), (input.Description != null && { Description: input.Description })), (input.DeviceId != null && { DeviceId: input.DeviceId })), (input.LinkId != null && { LinkId: input.LinkId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
236
228
  return [2, new __HttpRequest({
237
229
  protocol: protocol,
238
230
  hostname: hostname,
@@ -257,14 +249,9 @@ export var serializeAws_restJson1CreateConnectPeerCommand = function (input, con
257
249
  "content-type": "application/json",
258
250
  };
259
251
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/connect-peers";
260
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.BgpOptions !== undefined &&
261
- input.BgpOptions !== null && { BgpOptions: serializeAws_restJson1BgpOptions(input.BgpOptions, context) })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ConnectAttachmentId !== undefined &&
262
- input.ConnectAttachmentId !== null && { ConnectAttachmentId: input.ConnectAttachmentId })), (input.CoreNetworkAddress !== undefined &&
263
- input.CoreNetworkAddress !== null && { CoreNetworkAddress: input.CoreNetworkAddress })), (input.InsideCidrBlocks !== undefined &&
264
- input.InsideCidrBlocks !== null && {
252
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.BgpOptions != null && { BgpOptions: serializeAws_restJson1BgpOptions(input.BgpOptions, context) })), { ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.ConnectAttachmentId != null && { ConnectAttachmentId: input.ConnectAttachmentId })), (input.CoreNetworkAddress != null && { CoreNetworkAddress: input.CoreNetworkAddress })), (input.InsideCidrBlocks != null && {
265
253
  InsideCidrBlocks: serializeAws_restJson1ConstrainedStringList(input.InsideCidrBlocks, context),
266
- })), (input.PeerAddress !== undefined && input.PeerAddress !== null && { PeerAddress: input.PeerAddress })), (input.Tags !== undefined &&
267
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
254
+ })), (input.PeerAddress != null && { PeerAddress: input.PeerAddress })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
268
255
  return [2, new __HttpRequest({
269
256
  protocol: protocol,
270
257
  hostname: hostname,
@@ -289,10 +276,7 @@ export var serializeAws_restJson1CreateCoreNetworkCommand = function (input, con
289
276
  "content-type": "application/json",
290
277
  };
291
278
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/core-networks";
292
- body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.GlobalNetworkId !== undefined &&
293
- input.GlobalNetworkId !== null && { GlobalNetworkId: input.GlobalNetworkId })), (input.PolicyDocument !== undefined &&
294
- input.PolicyDocument !== null && { PolicyDocument: input.PolicyDocument })), (input.Tags !== undefined &&
295
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
279
+ body = JSON.stringify(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.GlobalNetworkId != null && { GlobalNetworkId: input.GlobalNetworkId })), (input.PolicyDocument != null && { PolicyDocument: input.PolicyDocument })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
296
280
  return [2, new __HttpRequest({
297
281
  protocol: protocol,
298
282
  hostname: hostname,
@@ -327,10 +311,7 @@ export var serializeAws_restJson1CreateDeviceCommand = function (input, context)
327
311
  else {
328
312
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
329
313
  }
330
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AWSLocation !== undefined &&
331
- input.AWSLocation !== null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Location !== undefined &&
332
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Model !== undefined && input.Model !== null && { Model: input.Model })), (input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.Tags !== undefined &&
333
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.Type !== undefined && input.Type !== null && { Type: input.Type })), (input.Vendor !== undefined && input.Vendor !== null && { Vendor: input.Vendor })));
314
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AWSLocation != null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) })), (input.Description != null && { Description: input.Description })), (input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Model != null && { Model: input.Model })), (input.SerialNumber != null && { SerialNumber: input.SerialNumber })), (input.SiteId != null && { SiteId: input.SiteId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.Type != null && { Type: input.Type })), (input.Vendor != null && { Vendor: input.Vendor })));
334
315
  return [2, new __HttpRequest({
335
316
  protocol: protocol,
336
317
  hostname: hostname,
@@ -354,8 +335,7 @@ export var serializeAws_restJson1CreateGlobalNetworkCommand = function (input, c
354
335
  "content-type": "application/json",
355
336
  };
356
337
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/global-networks";
357
- body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Tags !== undefined &&
358
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
338
+ body = JSON.stringify(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
359
339
  return [2, new __HttpRequest({
360
340
  protocol: protocol,
361
341
  hostname: hostname,
@@ -389,9 +369,7 @@ export var serializeAws_restJson1CreateLinkCommand = function (input, context) {
389
369
  else {
390
370
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
391
371
  }
392
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Bandwidth !== undefined &&
393
- input.Bandwidth !== null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Provider !== undefined && input.Provider !== null && { Provider: input.Provider })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.Tags !== undefined &&
394
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.Type !== undefined && input.Type !== null && { Type: input.Type })));
372
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.Bandwidth != null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) })), (input.Description != null && { Description: input.Description })), (input.Provider != null && { Provider: input.Provider })), (input.SiteId != null && { SiteId: input.SiteId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.Type != null && { Type: input.Type })));
395
373
  return [2, new __HttpRequest({
396
374
  protocol: protocol,
397
375
  hostname: hostname,
@@ -425,9 +403,7 @@ export var serializeAws_restJson1CreateSiteCommand = function (input, context) {
425
403
  else {
426
404
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
427
405
  }
428
- body = JSON.stringify(__assign(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Location !== undefined &&
429
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Tags !== undefined &&
430
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
406
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
431
407
  return [2, new __HttpRequest({
432
408
  protocol: protocol,
433
409
  hostname: hostname,
@@ -452,9 +428,59 @@ export var serializeAws_restJson1CreateSiteToSiteVpnAttachmentCommand = function
452
428
  "content-type": "application/json",
453
429
  };
454
430
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/site-to-site-vpn-attachments";
455
- body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId })), (input.Tags !== undefined &&
456
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.VpnConnectionArn !== undefined &&
457
- input.VpnConnectionArn !== null && { VpnConnectionArn: input.VpnConnectionArn })));
431
+ body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.VpnConnectionArn != null && { VpnConnectionArn: input.VpnConnectionArn })));
432
+ return [2, new __HttpRequest({
433
+ protocol: protocol,
434
+ hostname: hostname,
435
+ port: port,
436
+ method: "POST",
437
+ headers: headers,
438
+ path: resolvedPath,
439
+ body: body,
440
+ })];
441
+ }
442
+ });
443
+ }); };
444
+ export var serializeAws_restJson1CreateTransitGatewayPeeringCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
445
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
446
+ var _c;
447
+ return __generator(this, function (_d) {
448
+ switch (_d.label) {
449
+ case 0: return [4, context.endpoint()];
450
+ case 1:
451
+ _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
452
+ headers = {
453
+ "content-type": "application/json",
454
+ };
455
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/transit-gateway-peerings";
456
+ body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn })));
457
+ return [2, new __HttpRequest({
458
+ protocol: protocol,
459
+ hostname: hostname,
460
+ port: port,
461
+ method: "POST",
462
+ headers: headers,
463
+ path: resolvedPath,
464
+ body: body,
465
+ })];
466
+ }
467
+ });
468
+ }); };
469
+ export var serializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
470
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
471
+ var _c;
472
+ return __generator(this, function (_d) {
473
+ switch (_d.label) {
474
+ case 0: return [4, context.endpoint()];
475
+ case 1:
476
+ _a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
477
+ headers = {
478
+ "content-type": "application/json",
479
+ };
480
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/transit-gateway-route-table-attachments";
481
+ body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.PeeringId != null && { PeeringId: input.PeeringId })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.TransitGatewayRouteTableArn != null && {
482
+ TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
483
+ })));
458
484
  return [2, new __HttpRequest({
459
485
  protocol: protocol,
460
486
  hostname: hostname,
@@ -479,10 +505,7 @@ export var serializeAws_restJson1CreateVpcAttachmentCommand = function (input, c
479
505
  "content-type": "application/json",
480
506
  };
481
507
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/vpc-attachments";
482
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId })), (input.Options !== undefined &&
483
- input.Options !== null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) })), (input.SubnetArns !== undefined &&
484
- input.SubnetArns !== null && { SubnetArns: serializeAws_restJson1SubnetArnList(input.SubnetArns, context) })), (input.Tags !== undefined &&
485
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.VpcArn !== undefined && input.VpcArn !== null && { VpcArn: input.VpcArn })));
508
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId })), (input.Options != null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) })), (input.SubnetArns != null && { SubnetArns: serializeAws_restJson1SubnetArnList(input.SubnetArns, context) })), (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })), (input.VpcArn != null && { VpcArn: input.VpcArn })));
486
509
  return [2, new __HttpRequest({
487
510
  protocol: protocol,
488
511
  hostname: hostname,
@@ -787,6 +810,37 @@ export var serializeAws_restJson1DeleteLinkCommand = function (input, context) {
787
810
  }
788
811
  });
789
812
  }); };
813
+ export var serializeAws_restJson1DeletePeeringCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
814
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
815
+ return __generator(this, function (_c) {
816
+ switch (_c.label) {
817
+ case 0: return [4, context.endpoint()];
818
+ case 1:
819
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
820
+ headers = {};
821
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/peerings/{PeeringId}";
822
+ if (input.PeeringId !== undefined) {
823
+ labelValue = input.PeeringId;
824
+ if (labelValue.length <= 0) {
825
+ throw new Error("Empty value provided for input HTTP label: PeeringId.");
826
+ }
827
+ resolvedPath = resolvedPath.replace("{PeeringId}", __extendedEncodeURIComponent(labelValue));
828
+ }
829
+ else {
830
+ throw new Error("No value provided for input HTTP label: PeeringId.");
831
+ }
832
+ return [2, new __HttpRequest({
833
+ protocol: protocol,
834
+ hostname: hostname,
835
+ port: port,
836
+ method: "DELETE",
837
+ headers: headers,
838
+ path: resolvedPath,
839
+ body: body,
840
+ })];
841
+ }
842
+ });
843
+ }); };
790
844
  export var serializeAws_restJson1DeleteResourcePolicyCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
791
845
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
792
846
  return __generator(this, function (_c) {
@@ -1294,6 +1348,50 @@ export var serializeAws_restJson1GetCoreNetworkCommand = function (input, contex
1294
1348
  }
1295
1349
  });
1296
1350
  }); };
1351
+ export var serializeAws_restJson1GetCoreNetworkChangeEventsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1352
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
1353
+ return __generator(this, function (_c) {
1354
+ switch (_c.label) {
1355
+ case 0: return [4, context.endpoint()];
1356
+ case 1:
1357
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1358
+ headers = {};
1359
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
1360
+ "/core-networks/{CoreNetworkId}/core-network-change-events/{PolicyVersionId}";
1361
+ if (input.CoreNetworkId !== undefined) {
1362
+ labelValue = input.CoreNetworkId;
1363
+ if (labelValue.length <= 0) {
1364
+ throw new Error("Empty value provided for input HTTP label: CoreNetworkId.");
1365
+ }
1366
+ resolvedPath = resolvedPath.replace("{CoreNetworkId}", __extendedEncodeURIComponent(labelValue));
1367
+ }
1368
+ else {
1369
+ throw new Error("No value provided for input HTTP label: CoreNetworkId.");
1370
+ }
1371
+ if (input.PolicyVersionId !== undefined) {
1372
+ labelValue = input.PolicyVersionId.toString();
1373
+ if (labelValue.length <= 0) {
1374
+ throw new Error("Empty value provided for input HTTP label: PolicyVersionId.");
1375
+ }
1376
+ resolvedPath = resolvedPath.replace("{PolicyVersionId}", __extendedEncodeURIComponent(labelValue));
1377
+ }
1378
+ else {
1379
+ throw new Error("No value provided for input HTTP label: PolicyVersionId.");
1380
+ }
1381
+ query = __assign(__assign({}, (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
1382
+ return [2, new __HttpRequest({
1383
+ protocol: protocol,
1384
+ hostname: hostname,
1385
+ port: port,
1386
+ method: "GET",
1387
+ headers: headers,
1388
+ path: resolvedPath,
1389
+ query: query,
1390
+ body: body,
1391
+ })];
1392
+ }
1393
+ });
1394
+ }); };
1297
1395
  export var serializeAws_restJson1GetCoreNetworkChangeSetCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1298
1396
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, labelValue, query, body;
1299
1397
  return __generator(this, function (_c) {
@@ -1633,30 +1731,21 @@ export var serializeAws_restJson1GetNetworkRoutesCommand = function (input, cont
1633
1731
  else {
1634
1732
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
1635
1733
  }
1636
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DestinationFilters !== undefined &&
1637
- input.DestinationFilters !== null && {
1734
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DestinationFilters != null && {
1638
1735
  DestinationFilters: serializeAws_restJson1FilterMap(input.DestinationFilters, context),
1639
- })), (input.ExactCidrMatches !== undefined &&
1640
- input.ExactCidrMatches !== null && {
1736
+ })), (input.ExactCidrMatches != null && {
1641
1737
  ExactCidrMatches: serializeAws_restJson1ConstrainedStringList(input.ExactCidrMatches, context),
1642
- })), (input.LongestPrefixMatches !== undefined &&
1643
- input.LongestPrefixMatches !== null && {
1738
+ })), (input.LongestPrefixMatches != null && {
1644
1739
  LongestPrefixMatches: serializeAws_restJson1ConstrainedStringList(input.LongestPrefixMatches, context),
1645
- })), (input.PrefixListIds !== undefined &&
1646
- input.PrefixListIds !== null && {
1740
+ })), (input.PrefixListIds != null && {
1647
1741
  PrefixListIds: serializeAws_restJson1ConstrainedStringList(input.PrefixListIds, context),
1648
- })), (input.RouteTableIdentifier !== undefined &&
1649
- input.RouteTableIdentifier !== null && {
1742
+ })), (input.RouteTableIdentifier != null && {
1650
1743
  RouteTableIdentifier: serializeAws_restJson1RouteTableIdentifier(input.RouteTableIdentifier, context),
1651
- })), (input.States !== undefined &&
1652
- input.States !== null && { States: serializeAws_restJson1RouteStateList(input.States, context) })), (input.SubnetOfMatches !== undefined &&
1653
- input.SubnetOfMatches !== null && {
1744
+ })), (input.States != null && { States: serializeAws_restJson1RouteStateList(input.States, context) })), (input.SubnetOfMatches != null && {
1654
1745
  SubnetOfMatches: serializeAws_restJson1ConstrainedStringList(input.SubnetOfMatches, context),
1655
- })), (input.SupernetOfMatches !== undefined &&
1656
- input.SupernetOfMatches !== null && {
1746
+ })), (input.SupernetOfMatches != null && {
1657
1747
  SupernetOfMatches: serializeAws_restJson1ConstrainedStringList(input.SupernetOfMatches, context),
1658
- })), (input.Types !== undefined &&
1659
- input.Types !== null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) })));
1748
+ })), (input.Types != null && { Types: serializeAws_restJson1RouteTypeList(input.Types, context) })));
1660
1749
  return [2, new __HttpRequest({
1661
1750
  protocol: protocol,
1662
1751
  hostname: hostname,
@@ -1877,6 +1966,37 @@ export var serializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand
1877
1966
  }
1878
1967
  });
1879
1968
  }); };
1969
+ export var serializeAws_restJson1GetTransitGatewayPeeringCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1970
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1971
+ return __generator(this, function (_c) {
1972
+ switch (_c.label) {
1973
+ case 0: return [4, context.endpoint()];
1974
+ case 1:
1975
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
1976
+ headers = {};
1977
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/transit-gateway-peerings/{PeeringId}";
1978
+ if (input.PeeringId !== undefined) {
1979
+ labelValue = input.PeeringId;
1980
+ if (labelValue.length <= 0) {
1981
+ throw new Error("Empty value provided for input HTTP label: PeeringId.");
1982
+ }
1983
+ resolvedPath = resolvedPath.replace("{PeeringId}", __extendedEncodeURIComponent(labelValue));
1984
+ }
1985
+ else {
1986
+ throw new Error("No value provided for input HTTP label: PeeringId.");
1987
+ }
1988
+ return [2, new __HttpRequest({
1989
+ protocol: protocol,
1990
+ hostname: hostname,
1991
+ port: port,
1992
+ method: "GET",
1993
+ headers: headers,
1994
+ path: resolvedPath,
1995
+ body: body,
1996
+ })];
1997
+ }
1998
+ });
1999
+ }); };
1880
2000
  export var serializeAws_restJson1GetTransitGatewayRegistrationsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1881
2001
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, query, body;
1882
2002
  return __generator(this, function (_c) {
@@ -1913,6 +2033,38 @@ export var serializeAws_restJson1GetTransitGatewayRegistrationsCommand = functio
1913
2033
  }
1914
2034
  });
1915
2035
  }); };
2036
+ export var serializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2037
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
2038
+ return __generator(this, function (_c) {
2039
+ switch (_c.label) {
2040
+ case 0: return [4, context.endpoint()];
2041
+ case 1:
2042
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2043
+ headers = {};
2044
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
2045
+ "/transit-gateway-route-table-attachments/{AttachmentId}";
2046
+ if (input.AttachmentId !== undefined) {
2047
+ labelValue = input.AttachmentId;
2048
+ if (labelValue.length <= 0) {
2049
+ throw new Error("Empty value provided for input HTTP label: AttachmentId.");
2050
+ }
2051
+ resolvedPath = resolvedPath.replace("{AttachmentId}", __extendedEncodeURIComponent(labelValue));
2052
+ }
2053
+ else {
2054
+ throw new Error("No value provided for input HTTP label: AttachmentId.");
2055
+ }
2056
+ return [2, new __HttpRequest({
2057
+ protocol: protocol,
2058
+ hostname: hostname,
2059
+ port: port,
2060
+ method: "GET",
2061
+ headers: headers,
2062
+ path: resolvedPath,
2063
+ body: body,
2064
+ })];
2065
+ }
2066
+ });
2067
+ }); };
1916
2068
  export var serializeAws_restJson1GetVpcAttachmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
1917
2069
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
1918
2070
  return __generator(this, function (_c) {
@@ -2070,6 +2222,29 @@ export var serializeAws_restJson1ListOrganizationServiceAccessStatusCommand = fu
2070
2222
  }
2071
2223
  });
2072
2224
  }); };
2225
+ export var serializeAws_restJson1ListPeeringsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2226
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
2227
+ return __generator(this, function (_c) {
2228
+ switch (_c.label) {
2229
+ case 0: return [4, context.endpoint()];
2230
+ case 1:
2231
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
2232
+ headers = {};
2233
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/peerings";
2234
+ query = __assign(__assign(__assign(__assign(__assign(__assign({}, (input.CoreNetworkId !== undefined && { coreNetworkId: input.CoreNetworkId })), (input.PeeringType !== undefined && { peeringType: input.PeeringType })), (input.EdgeLocation !== undefined && { edgeLocation: input.EdgeLocation })), (input.State !== undefined && { state: input.State })), (input.MaxResults !== undefined && { maxResults: input.MaxResults.toString() })), (input.NextToken !== undefined && { nextToken: input.NextToken }));
2235
+ return [2, new __HttpRequest({
2236
+ protocol: protocol,
2237
+ hostname: hostname,
2238
+ port: port,
2239
+ method: "GET",
2240
+ headers: headers,
2241
+ path: resolvedPath,
2242
+ query: query,
2243
+ body: body,
2244
+ })];
2245
+ }
2246
+ });
2247
+ }); };
2073
2248
  export var serializeAws_restJson1ListTagsForResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
2074
2249
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, labelValue, body;
2075
2250
  return __generator(this, function (_c) {
@@ -2124,9 +2299,7 @@ export var serializeAws_restJson1PutCoreNetworkPolicyCommand = function (input,
2124
2299
  else {
2125
2300
  throw new Error("No value provided for input HTTP label: CoreNetworkId.");
2126
2301
  }
2127
- body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.LatestVersionId !== undefined &&
2128
- input.LatestVersionId !== null && { LatestVersionId: input.LatestVersionId })), (input.PolicyDocument !== undefined &&
2129
- input.PolicyDocument !== null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) })));
2302
+ body = JSON.stringify(__assign(__assign(__assign({ ClientToken: (_c = input.ClientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }, (input.Description != null && { Description: input.Description })), (input.LatestVersionId != null && { LatestVersionId: input.LatestVersionId })), (input.PolicyDocument != null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) })));
2130
2303
  return [2, new __HttpRequest({
2131
2304
  protocol: protocol,
2132
2305
  hostname: hostname,
@@ -2160,8 +2333,7 @@ export var serializeAws_restJson1PutResourcePolicyCommand = function (input, con
2160
2333
  else {
2161
2334
  throw new Error("No value provided for input HTTP label: ResourceArn.");
2162
2335
  }
2163
- body = JSON.stringify(__assign({}, (input.PolicyDocument !== undefined &&
2164
- input.PolicyDocument !== null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) })));
2336
+ body = JSON.stringify(__assign({}, (input.PolicyDocument != null && { PolicyDocument: __LazyJsonString.fromObject(input.PolicyDocument) })));
2165
2337
  return [2, new __HttpRequest({
2166
2338
  protocol: protocol,
2167
2339
  hostname: hostname,
@@ -2196,8 +2368,7 @@ export var serializeAws_restJson1RegisterTransitGatewayCommand = function (input
2196
2368
  else {
2197
2369
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
2198
2370
  }
2199
- body = JSON.stringify(__assign({}, (input.TransitGatewayArn !== undefined &&
2200
- input.TransitGatewayArn !== null && { TransitGatewayArn: input.TransitGatewayArn })));
2371
+ body = JSON.stringify(__assign({}, (input.TransitGatewayArn != null && { TransitGatewayArn: input.TransitGatewayArn })));
2201
2372
  return [2, new __HttpRequest({
2202
2373
  protocol: protocol,
2203
2374
  hostname: hostname,
@@ -2294,7 +2465,7 @@ export var serializeAws_restJson1StartOrganizationServiceAccessUpdateCommand = f
2294
2465
  "content-type": "application/json",
2295
2466
  };
2296
2467
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/organizations/service-access";
2297
- body = JSON.stringify(__assign({}, (input.Action !== undefined && input.Action !== null && { Action: input.Action })));
2468
+ body = JSON.stringify(__assign({}, (input.Action != null && { Action: input.Action })));
2298
2469
  return [2, new __HttpRequest({
2299
2470
  protocol: protocol,
2300
2471
  hostname: hostname,
@@ -2329,15 +2500,11 @@ export var serializeAws_restJson1StartRouteAnalysisCommand = function (input, co
2329
2500
  else {
2330
2501
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
2331
2502
  }
2332
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Destination !== undefined &&
2333
- input.Destination !== null && {
2503
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Destination != null && {
2334
2504
  Destination: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Destination, context),
2335
- })), (input.IncludeReturnPath !== undefined &&
2336
- input.IncludeReturnPath !== null && { IncludeReturnPath: input.IncludeReturnPath })), (input.Source !== undefined &&
2337
- input.Source !== null && {
2505
+ })), (input.IncludeReturnPath != null && { IncludeReturnPath: input.IncludeReturnPath })), (input.Source != null && {
2338
2506
  Source: serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification(input.Source, context),
2339
- })), (input.UseMiddleboxes !== undefined &&
2340
- input.UseMiddleboxes !== null && { UseMiddleboxes: input.UseMiddleboxes })));
2507
+ })), (input.UseMiddleboxes != null && { UseMiddleboxes: input.UseMiddleboxes })));
2341
2508
  return [2, new __HttpRequest({
2342
2509
  protocol: protocol,
2343
2510
  hostname: hostname,
@@ -2371,8 +2538,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
2371
2538
  else {
2372
2539
  throw new Error("No value provided for input HTTP label: ResourceArn.");
2373
2540
  }
2374
- body = JSON.stringify(__assign({}, (input.Tags !== undefined &&
2375
- input.Tags !== null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
2541
+ body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagList(input.Tags, context) })));
2376
2542
  return [2, new __HttpRequest({
2377
2543
  protocol: protocol,
2378
2544
  hostname: hostname,
@@ -2450,8 +2616,7 @@ export var serializeAws_restJson1UpdateConnectionCommand = function (input, cont
2450
2616
  else {
2451
2617
  throw new Error("No value provided for input HTTP label: ConnectionId.");
2452
2618
  }
2453
- body = JSON.stringify(__assign(__assign(__assign({}, (input.ConnectedLinkId !== undefined &&
2454
- input.ConnectedLinkId !== null && { ConnectedLinkId: input.ConnectedLinkId })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.LinkId !== undefined && input.LinkId !== null && { LinkId: input.LinkId })));
2619
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.ConnectedLinkId != null && { ConnectedLinkId: input.ConnectedLinkId })), (input.Description != null && { Description: input.Description })), (input.LinkId != null && { LinkId: input.LinkId })));
2455
2620
  return [2, new __HttpRequest({
2456
2621
  protocol: protocol,
2457
2622
  hostname: hostname,
@@ -2485,7 +2650,7 @@ export var serializeAws_restJson1UpdateCoreNetworkCommand = function (input, con
2485
2650
  else {
2486
2651
  throw new Error("No value provided for input HTTP label: CoreNetworkId.");
2487
2652
  }
2488
- body = JSON.stringify(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })));
2653
+ body = JSON.stringify(__assign({}, (input.Description != null && { Description: input.Description })));
2489
2654
  return [2, new __HttpRequest({
2490
2655
  protocol: protocol,
2491
2656
  hostname: hostname,
@@ -2530,9 +2695,7 @@ export var serializeAws_restJson1UpdateDeviceCommand = function (input, context)
2530
2695
  else {
2531
2696
  throw new Error("No value provided for input HTTP label: DeviceId.");
2532
2697
  }
2533
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AWSLocation !== undefined &&
2534
- input.AWSLocation !== null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Location !== undefined &&
2535
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Model !== undefined && input.Model !== null && { Model: input.Model })), (input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber })), (input.SiteId !== undefined && input.SiteId !== null && { SiteId: input.SiteId })), (input.Type !== undefined && input.Type !== null && { Type: input.Type })), (input.Vendor !== undefined && input.Vendor !== null && { Vendor: input.Vendor })));
2698
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AWSLocation != null && { AWSLocation: serializeAws_restJson1AWSLocation(input.AWSLocation, context) })), (input.Description != null && { Description: input.Description })), (input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) })), (input.Model != null && { Model: input.Model })), (input.SerialNumber != null && { SerialNumber: input.SerialNumber })), (input.SiteId != null && { SiteId: input.SiteId })), (input.Type != null && { Type: input.Type })), (input.Vendor != null && { Vendor: input.Vendor })));
2536
2699
  return [2, new __HttpRequest({
2537
2700
  protocol: protocol,
2538
2701
  hostname: hostname,
@@ -2566,7 +2729,7 @@ export var serializeAws_restJson1UpdateGlobalNetworkCommand = function (input, c
2566
2729
  else {
2567
2730
  throw new Error("No value provided for input HTTP label: GlobalNetworkId.");
2568
2731
  }
2569
- body = JSON.stringify(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })));
2732
+ body = JSON.stringify(__assign({}, (input.Description != null && { Description: input.Description })));
2570
2733
  return [2, new __HttpRequest({
2571
2734
  protocol: protocol,
2572
2735
  hostname: hostname,
@@ -2611,8 +2774,7 @@ export var serializeAws_restJson1UpdateLinkCommand = function (input, context) {
2611
2774
  else {
2612
2775
  throw new Error("No value provided for input HTTP label: LinkId.");
2613
2776
  }
2614
- body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Bandwidth !== undefined &&
2615
- input.Bandwidth !== null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) })), (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Provider !== undefined && input.Provider !== null && { Provider: input.Provider })), (input.Type !== undefined && input.Type !== null && { Type: input.Type })));
2777
+ body = JSON.stringify(__assign(__assign(__assign(__assign({}, (input.Bandwidth != null && { Bandwidth: serializeAws_restJson1Bandwidth(input.Bandwidth, context) })), (input.Description != null && { Description: input.Description })), (input.Provider != null && { Provider: input.Provider })), (input.Type != null && { Type: input.Type })));
2616
2778
  return [2, new __HttpRequest({
2617
2779
  protocol: protocol,
2618
2780
  hostname: hostname,
@@ -2657,8 +2819,7 @@ export var serializeAws_restJson1UpdateNetworkResourceMetadataCommand = function
2657
2819
  else {
2658
2820
  throw new Error("No value provided for input HTTP label: ResourceArn.");
2659
2821
  }
2660
- body = JSON.stringify(__assign({}, (input.Metadata !== undefined &&
2661
- input.Metadata !== null && {
2822
+ body = JSON.stringify(__assign({}, (input.Metadata != null && {
2662
2823
  Metadata: serializeAws_restJson1NetworkResourceMetadataMap(input.Metadata, context),
2663
2824
  })));
2664
2825
  return [2, new __HttpRequest({
@@ -2705,8 +2866,7 @@ export var serializeAws_restJson1UpdateSiteCommand = function (input, context) {
2705
2866
  else {
2706
2867
  throw new Error("No value provided for input HTTP label: SiteId.");
2707
2868
  }
2708
- body = JSON.stringify(__assign(__assign({}, (input.Description !== undefined && input.Description !== null && { Description: input.Description })), (input.Location !== undefined &&
2709
- input.Location !== null && { Location: serializeAws_restJson1Location(input.Location, context) })));
2869
+ body = JSON.stringify(__assign(__assign({}, (input.Description != null && { Description: input.Description })), (input.Location != null && { Location: serializeAws_restJson1Location(input.Location, context) })));
2710
2870
  return [2, new __HttpRequest({
2711
2871
  protocol: protocol,
2712
2872
  hostname: hostname,
@@ -2740,12 +2900,9 @@ export var serializeAws_restJson1UpdateVpcAttachmentCommand = function (input, c
2740
2900
  else {
2741
2901
  throw new Error("No value provided for input HTTP label: AttachmentId.");
2742
2902
  }
2743
- body = JSON.stringify(__assign(__assign(__assign({}, (input.AddSubnetArns !== undefined &&
2744
- input.AddSubnetArns !== null && {
2903
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.AddSubnetArns != null && {
2745
2904
  AddSubnetArns: serializeAws_restJson1SubnetArnList(input.AddSubnetArns, context),
2746
- })), (input.Options !== undefined &&
2747
- input.Options !== null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) })), (input.RemoveSubnetArns !== undefined &&
2748
- input.RemoveSubnetArns !== null && {
2905
+ })), (input.Options != null && { Options: serializeAws_restJson1VpcOptions(input.Options, context) })), (input.RemoveSubnetArns != null && {
2749
2906
  RemoveSubnetArns: serializeAws_restJson1SubnetArnList(input.RemoveSubnetArns, context),
2750
2907
  })));
2751
2908
  return [2, new __HttpRequest({
@@ -3870,31 +4027,31 @@ var deserializeAws_restJson1CreateSiteToSiteVpnAttachmentCommandError = function
3870
4027
  }
3871
4028
  });
3872
4029
  }); };
3873
- export var deserializeAws_restJson1CreateVpcAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4030
+ export var deserializeAws_restJson1CreateTransitGatewayPeeringCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3874
4031
  var contents, data, _a, _b;
3875
4032
  return __generator(this, function (_c) {
3876
4033
  switch (_c.label) {
3877
4034
  case 0:
3878
4035
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3879
- return [2, deserializeAws_restJson1CreateVpcAttachmentCommandError(output, context)];
4036
+ return [2, deserializeAws_restJson1CreateTransitGatewayPeeringCommandError(output, context)];
3880
4037
  }
3881
4038
  contents = {
3882
4039
  $metadata: deserializeMetadata(output),
3883
- VpcAttachment: undefined,
4040
+ TransitGatewayPeering: undefined,
3884
4041
  };
3885
4042
  _a = __expectNonNull;
3886
4043
  _b = __expectObject;
3887
4044
  return [4, parseBody(output.body, context)];
3888
4045
  case 1:
3889
4046
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3890
- if (data.VpcAttachment !== undefined && data.VpcAttachment !== null) {
3891
- contents.VpcAttachment = deserializeAws_restJson1VpcAttachment(data.VpcAttachment, context);
4047
+ if (data.TransitGatewayPeering !== undefined && data.TransitGatewayPeering !== null) {
4048
+ contents.TransitGatewayPeering = deserializeAws_restJson1TransitGatewayPeering(data.TransitGatewayPeering, context);
3892
4049
  }
3893
4050
  return [2, Promise.resolve(contents)];
3894
4051
  }
3895
4052
  });
3896
4053
  }); };
3897
- var deserializeAws_restJson1CreateVpcAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4054
+ var deserializeAws_restJson1CreateTransitGatewayPeeringCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3898
4055
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3899
4056
  var _c;
3900
4057
  return __generator(this, function (_d) {
@@ -3947,31 +4104,31 @@ var deserializeAws_restJson1CreateVpcAttachmentCommandError = function (output,
3947
4104
  }
3948
4105
  });
3949
4106
  }); };
3950
- export var deserializeAws_restJson1DeleteAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4107
+ export var deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3951
4108
  var contents, data, _a, _b;
3952
4109
  return __generator(this, function (_c) {
3953
4110
  switch (_c.label) {
3954
4111
  case 0:
3955
4112
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3956
- return [2, deserializeAws_restJson1DeleteAttachmentCommandError(output, context)];
4113
+ return [2, deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommandError(output, context)];
3957
4114
  }
3958
4115
  contents = {
3959
4116
  $metadata: deserializeMetadata(output),
3960
- Attachment: undefined,
4117
+ TransitGatewayRouteTableAttachment: undefined,
3961
4118
  };
3962
4119
  _a = __expectNonNull;
3963
4120
  _b = __expectObject;
3964
4121
  return [4, parseBody(output.body, context)];
3965
4122
  case 1:
3966
4123
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
3967
- if (data.Attachment !== undefined && data.Attachment !== null) {
3968
- contents.Attachment = deserializeAws_restJson1Attachment(data.Attachment, context);
4124
+ if (data.TransitGatewayRouteTableAttachment !== undefined && data.TransitGatewayRouteTableAttachment !== null) {
4125
+ contents.TransitGatewayRouteTableAttachment = deserializeAws_restJson1TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
3969
4126
  }
3970
4127
  return [2, Promise.resolve(contents)];
3971
4128
  }
3972
4129
  });
3973
4130
  }); };
3974
- var deserializeAws_restJson1DeleteAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4131
+ var deserializeAws_restJson1CreateTransitGatewayRouteTableAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
3975
4132
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
3976
4133
  var _c;
3977
4134
  return __generator(this, function (_d) {
@@ -4024,31 +4181,31 @@ var deserializeAws_restJson1DeleteAttachmentCommandError = function (output, con
4024
4181
  }
4025
4182
  });
4026
4183
  }); };
4027
- export var deserializeAws_restJson1DeleteConnectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4184
+ export var deserializeAws_restJson1CreateVpcAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4028
4185
  var contents, data, _a, _b;
4029
4186
  return __generator(this, function (_c) {
4030
4187
  switch (_c.label) {
4031
4188
  case 0:
4032
4189
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4033
- return [2, deserializeAws_restJson1DeleteConnectionCommandError(output, context)];
4190
+ return [2, deserializeAws_restJson1CreateVpcAttachmentCommandError(output, context)];
4034
4191
  }
4035
4192
  contents = {
4036
4193
  $metadata: deserializeMetadata(output),
4037
- Connection: undefined,
4194
+ VpcAttachment: undefined,
4038
4195
  };
4039
4196
  _a = __expectNonNull;
4040
4197
  _b = __expectObject;
4041
4198
  return [4, parseBody(output.body, context)];
4042
4199
  case 1:
4043
4200
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4044
- if (data.Connection !== undefined && data.Connection !== null) {
4045
- contents.Connection = deserializeAws_restJson1Connection(data.Connection, context);
4201
+ if (data.VpcAttachment !== undefined && data.VpcAttachment !== null) {
4202
+ contents.VpcAttachment = deserializeAws_restJson1VpcAttachment(data.VpcAttachment, context);
4046
4203
  }
4047
4204
  return [2, Promise.resolve(contents)];
4048
4205
  }
4049
4206
  });
4050
4207
  }); };
4051
- var deserializeAws_restJson1DeleteConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4208
+ var deserializeAws_restJson1CreateVpcAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4052
4209
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4053
4210
  var _c;
4054
4211
  return __generator(this, function (_d) {
@@ -4101,31 +4258,31 @@ var deserializeAws_restJson1DeleteConnectionCommandError = function (output, con
4101
4258
  }
4102
4259
  });
4103
4260
  }); };
4104
- export var deserializeAws_restJson1DeleteConnectPeerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4261
+ export var deserializeAws_restJson1DeleteAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4105
4262
  var contents, data, _a, _b;
4106
4263
  return __generator(this, function (_c) {
4107
4264
  switch (_c.label) {
4108
4265
  case 0:
4109
4266
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4110
- return [2, deserializeAws_restJson1DeleteConnectPeerCommandError(output, context)];
4267
+ return [2, deserializeAws_restJson1DeleteAttachmentCommandError(output, context)];
4111
4268
  }
4112
4269
  contents = {
4113
4270
  $metadata: deserializeMetadata(output),
4114
- ConnectPeer: undefined,
4271
+ Attachment: undefined,
4115
4272
  };
4116
4273
  _a = __expectNonNull;
4117
4274
  _b = __expectObject;
4118
4275
  return [4, parseBody(output.body, context)];
4119
4276
  case 1:
4120
4277
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4121
- if (data.ConnectPeer !== undefined && data.ConnectPeer !== null) {
4122
- contents.ConnectPeer = deserializeAws_restJson1ConnectPeer(data.ConnectPeer, context);
4278
+ if (data.Attachment !== undefined && data.Attachment !== null) {
4279
+ contents.Attachment = deserializeAws_restJson1Attachment(data.Attachment, context);
4123
4280
  }
4124
4281
  return [2, Promise.resolve(contents)];
4125
4282
  }
4126
4283
  });
4127
4284
  }); };
4128
- var deserializeAws_restJson1DeleteConnectPeerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4285
+ var deserializeAws_restJson1DeleteAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4129
4286
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4130
4287
  var _c;
4131
4288
  return __generator(this, function (_d) {
@@ -4178,31 +4335,31 @@ var deserializeAws_restJson1DeleteConnectPeerCommandError = function (output, co
4178
4335
  }
4179
4336
  });
4180
4337
  }); };
4181
- export var deserializeAws_restJson1DeleteCoreNetworkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4338
+ export var deserializeAws_restJson1DeleteConnectionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4182
4339
  var contents, data, _a, _b;
4183
4340
  return __generator(this, function (_c) {
4184
4341
  switch (_c.label) {
4185
4342
  case 0:
4186
4343
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4187
- return [2, deserializeAws_restJson1DeleteCoreNetworkCommandError(output, context)];
4344
+ return [2, deserializeAws_restJson1DeleteConnectionCommandError(output, context)];
4188
4345
  }
4189
4346
  contents = {
4190
4347
  $metadata: deserializeMetadata(output),
4191
- CoreNetwork: undefined,
4348
+ Connection: undefined,
4192
4349
  };
4193
4350
  _a = __expectNonNull;
4194
4351
  _b = __expectObject;
4195
4352
  return [4, parseBody(output.body, context)];
4196
4353
  case 1:
4197
4354
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4198
- if (data.CoreNetwork !== undefined && data.CoreNetwork !== null) {
4199
- contents.CoreNetwork = deserializeAws_restJson1CoreNetwork(data.CoreNetwork, context);
4355
+ if (data.Connection !== undefined && data.Connection !== null) {
4356
+ contents.Connection = deserializeAws_restJson1Connection(data.Connection, context);
4200
4357
  }
4201
4358
  return [2, Promise.resolve(contents)];
4202
4359
  }
4203
4360
  });
4204
4361
  }); };
4205
- var deserializeAws_restJson1DeleteCoreNetworkCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4362
+ var deserializeAws_restJson1DeleteConnectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4206
4363
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4207
4364
  var _c;
4208
4365
  return __generator(this, function (_d) {
@@ -4255,31 +4412,31 @@ var deserializeAws_restJson1DeleteCoreNetworkCommandError = function (output, co
4255
4412
  }
4256
4413
  });
4257
4414
  }); };
4258
- export var deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4415
+ export var deserializeAws_restJson1DeleteConnectPeerCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4259
4416
  var contents, data, _a, _b;
4260
4417
  return __generator(this, function (_c) {
4261
4418
  switch (_c.label) {
4262
4419
  case 0:
4263
4420
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4264
- return [2, deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError(output, context)];
4421
+ return [2, deserializeAws_restJson1DeleteConnectPeerCommandError(output, context)];
4265
4422
  }
4266
4423
  contents = {
4267
4424
  $metadata: deserializeMetadata(output),
4268
- CoreNetworkPolicy: undefined,
4425
+ ConnectPeer: undefined,
4269
4426
  };
4270
4427
  _a = __expectNonNull;
4271
4428
  _b = __expectObject;
4272
4429
  return [4, parseBody(output.body, context)];
4273
4430
  case 1:
4274
4431
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4275
- if (data.CoreNetworkPolicy !== undefined && data.CoreNetworkPolicy !== null) {
4276
- contents.CoreNetworkPolicy = deserializeAws_restJson1CoreNetworkPolicy(data.CoreNetworkPolicy, context);
4432
+ if (data.ConnectPeer !== undefined && data.ConnectPeer !== null) {
4433
+ contents.ConnectPeer = deserializeAws_restJson1ConnectPeer(data.ConnectPeer, context);
4277
4434
  }
4278
4435
  return [2, Promise.resolve(contents)];
4279
4436
  }
4280
4437
  });
4281
4438
  }); };
4282
- var deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4439
+ var deserializeAws_restJson1DeleteConnectPeerCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4283
4440
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4284
4441
  var _c;
4285
4442
  return __generator(this, function (_d) {
@@ -4332,31 +4489,185 @@ var deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError = functio
4332
4489
  }
4333
4490
  });
4334
4491
  }); };
4335
- export var deserializeAws_restJson1DeleteDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4492
+ export var deserializeAws_restJson1DeleteCoreNetworkCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4336
4493
  var contents, data, _a, _b;
4337
4494
  return __generator(this, function (_c) {
4338
4495
  switch (_c.label) {
4339
4496
  case 0:
4340
4497
  if (output.statusCode !== 200 && output.statusCode >= 300) {
4341
- return [2, deserializeAws_restJson1DeleteDeviceCommandError(output, context)];
4498
+ return [2, deserializeAws_restJson1DeleteCoreNetworkCommandError(output, context)];
4342
4499
  }
4343
4500
  contents = {
4344
4501
  $metadata: deserializeMetadata(output),
4345
- Device: undefined,
4502
+ CoreNetwork: undefined,
4346
4503
  };
4347
4504
  _a = __expectNonNull;
4348
4505
  _b = __expectObject;
4349
4506
  return [4, parseBody(output.body, context)];
4350
4507
  case 1:
4351
4508
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4352
- if (data.Device !== undefined && data.Device !== null) {
4353
- contents.Device = deserializeAws_restJson1Device(data.Device, context);
4509
+ if (data.CoreNetwork !== undefined && data.CoreNetwork !== null) {
4510
+ contents.CoreNetwork = deserializeAws_restJson1CoreNetwork(data.CoreNetwork, context);
4354
4511
  }
4355
4512
  return [2, Promise.resolve(contents)];
4356
4513
  }
4357
4514
  });
4358
4515
  }); };
4359
- var deserializeAws_restJson1DeleteDeviceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4516
+ var deserializeAws_restJson1DeleteCoreNetworkCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4517
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4518
+ var _c;
4519
+ return __generator(this, function (_d) {
4520
+ switch (_d.label) {
4521
+ case 0:
4522
+ _a = [__assign({}, output)];
4523
+ _c = {};
4524
+ return [4, parseBody(output.body, context)];
4525
+ case 1:
4526
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4527
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4528
+ _b = errorCode;
4529
+ switch (_b) {
4530
+ case "AccessDeniedException": return [3, 2];
4531
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
4532
+ case "ConflictException": return [3, 4];
4533
+ case "com.amazonaws.networkmanager#ConflictException": return [3, 4];
4534
+ case "InternalServerException": return [3, 6];
4535
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 6];
4536
+ case "ResourceNotFoundException": return [3, 8];
4537
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 8];
4538
+ case "ThrottlingException": return [3, 10];
4539
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 10];
4540
+ case "ValidationException": return [3, 12];
4541
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 12];
4542
+ }
4543
+ return [3, 14];
4544
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
4545
+ case 3: throw _d.sent();
4546
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
4547
+ case 5: throw _d.sent();
4548
+ case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
4549
+ case 7: throw _d.sent();
4550
+ case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
4551
+ case 9: throw _d.sent();
4552
+ case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
4553
+ case 11: throw _d.sent();
4554
+ case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
4555
+ case 13: throw _d.sent();
4556
+ case 14:
4557
+ parsedBody = parsedOutput.body;
4558
+ $metadata = deserializeMetadata(output);
4559
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4560
+ response = new __BaseException({
4561
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4562
+ $fault: "client",
4563
+ $metadata: $metadata,
4564
+ });
4565
+ throw __decorateServiceException(response, parsedBody);
4566
+ }
4567
+ });
4568
+ }); };
4569
+ export var deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4570
+ var contents, data, _a, _b;
4571
+ return __generator(this, function (_c) {
4572
+ switch (_c.label) {
4573
+ case 0:
4574
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4575
+ return [2, deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError(output, context)];
4576
+ }
4577
+ contents = {
4578
+ $metadata: deserializeMetadata(output),
4579
+ CoreNetworkPolicy: undefined,
4580
+ };
4581
+ _a = __expectNonNull;
4582
+ _b = __expectObject;
4583
+ return [4, parseBody(output.body, context)];
4584
+ case 1:
4585
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4586
+ if (data.CoreNetworkPolicy !== undefined && data.CoreNetworkPolicy !== null) {
4587
+ contents.CoreNetworkPolicy = deserializeAws_restJson1CoreNetworkPolicy(data.CoreNetworkPolicy, context);
4588
+ }
4589
+ return [2, Promise.resolve(contents)];
4590
+ }
4591
+ });
4592
+ }); };
4593
+ var deserializeAws_restJson1DeleteCoreNetworkPolicyVersionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4594
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4595
+ var _c;
4596
+ return __generator(this, function (_d) {
4597
+ switch (_d.label) {
4598
+ case 0:
4599
+ _a = [__assign({}, output)];
4600
+ _c = {};
4601
+ return [4, parseBody(output.body, context)];
4602
+ case 1:
4603
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4604
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4605
+ _b = errorCode;
4606
+ switch (_b) {
4607
+ case "AccessDeniedException": return [3, 2];
4608
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
4609
+ case "ConflictException": return [3, 4];
4610
+ case "com.amazonaws.networkmanager#ConflictException": return [3, 4];
4611
+ case "InternalServerException": return [3, 6];
4612
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 6];
4613
+ case "ResourceNotFoundException": return [3, 8];
4614
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 8];
4615
+ case "ThrottlingException": return [3, 10];
4616
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 10];
4617
+ case "ValidationException": return [3, 12];
4618
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 12];
4619
+ }
4620
+ return [3, 14];
4621
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
4622
+ case 3: throw _d.sent();
4623
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
4624
+ case 5: throw _d.sent();
4625
+ case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
4626
+ case 7: throw _d.sent();
4627
+ case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
4628
+ case 9: throw _d.sent();
4629
+ case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
4630
+ case 11: throw _d.sent();
4631
+ case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
4632
+ case 13: throw _d.sent();
4633
+ case 14:
4634
+ parsedBody = parsedOutput.body;
4635
+ $metadata = deserializeMetadata(output);
4636
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4637
+ response = new __BaseException({
4638
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4639
+ $fault: "client",
4640
+ $metadata: $metadata,
4641
+ });
4642
+ throw __decorateServiceException(response, parsedBody);
4643
+ }
4644
+ });
4645
+ }); };
4646
+ export var deserializeAws_restJson1DeleteDeviceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4647
+ var contents, data, _a, _b;
4648
+ return __generator(this, function (_c) {
4649
+ switch (_c.label) {
4650
+ case 0:
4651
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4652
+ return [2, deserializeAws_restJson1DeleteDeviceCommandError(output, context)];
4653
+ }
4654
+ contents = {
4655
+ $metadata: deserializeMetadata(output),
4656
+ Device: undefined,
4657
+ };
4658
+ _a = __expectNonNull;
4659
+ _b = __expectObject;
4660
+ return [4, parseBody(output.body, context)];
4661
+ case 1:
4662
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4663
+ if (data.Device !== undefined && data.Device !== null) {
4664
+ contents.Device = deserializeAws_restJson1Device(data.Device, context);
4665
+ }
4666
+ return [2, Promise.resolve(contents)];
4667
+ }
4668
+ });
4669
+ }); };
4670
+ var deserializeAws_restJson1DeleteDeviceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4360
4671
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4361
4672
  var _c;
4362
4673
  return __generator(this, function (_d) {
@@ -4563,6 +4874,83 @@ var deserializeAws_restJson1DeleteLinkCommandError = function (output, context)
4563
4874
  }
4564
4875
  });
4565
4876
  }); };
4877
+ export var deserializeAws_restJson1DeletePeeringCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4878
+ var contents, data, _a, _b;
4879
+ return __generator(this, function (_c) {
4880
+ switch (_c.label) {
4881
+ case 0:
4882
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
4883
+ return [2, deserializeAws_restJson1DeletePeeringCommandError(output, context)];
4884
+ }
4885
+ contents = {
4886
+ $metadata: deserializeMetadata(output),
4887
+ Peering: undefined,
4888
+ };
4889
+ _a = __expectNonNull;
4890
+ _b = __expectObject;
4891
+ return [4, parseBody(output.body, context)];
4892
+ case 1:
4893
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
4894
+ if (data.Peering !== undefined && data.Peering !== null) {
4895
+ contents.Peering = deserializeAws_restJson1Peering(data.Peering, context);
4896
+ }
4897
+ return [2, Promise.resolve(contents)];
4898
+ }
4899
+ });
4900
+ }); };
4901
+ var deserializeAws_restJson1DeletePeeringCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4902
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
4903
+ var _c;
4904
+ return __generator(this, function (_d) {
4905
+ switch (_d.label) {
4906
+ case 0:
4907
+ _a = [__assign({}, output)];
4908
+ _c = {};
4909
+ return [4, parseBody(output.body, context)];
4910
+ case 1:
4911
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
4912
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4913
+ _b = errorCode;
4914
+ switch (_b) {
4915
+ case "AccessDeniedException": return [3, 2];
4916
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
4917
+ case "ConflictException": return [3, 4];
4918
+ case "com.amazonaws.networkmanager#ConflictException": return [3, 4];
4919
+ case "InternalServerException": return [3, 6];
4920
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 6];
4921
+ case "ResourceNotFoundException": return [3, 8];
4922
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 8];
4923
+ case "ThrottlingException": return [3, 10];
4924
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 10];
4925
+ case "ValidationException": return [3, 12];
4926
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 12];
4927
+ }
4928
+ return [3, 14];
4929
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
4930
+ case 3: throw _d.sent();
4931
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
4932
+ case 5: throw _d.sent();
4933
+ case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
4934
+ case 7: throw _d.sent();
4935
+ case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
4936
+ case 9: throw _d.sent();
4937
+ case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
4938
+ case 11: throw _d.sent();
4939
+ case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
4940
+ case 13: throw _d.sent();
4941
+ case 14:
4942
+ parsedBody = parsedOutput.body;
4943
+ $metadata = deserializeMetadata(output);
4944
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4945
+ response = new __BaseException({
4946
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4947
+ $fault: "client",
4948
+ $metadata: $metadata,
4949
+ });
4950
+ throw __decorateServiceException(response, parsedBody);
4951
+ }
4952
+ });
4953
+ }); };
4566
4954
  export var deserializeAws_restJson1DeleteResourcePolicyCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
4567
4955
  var contents;
4568
4956
  return __generator(this, function (_a) {
@@ -5617,6 +6005,83 @@ var deserializeAws_restJson1GetCoreNetworkCommandError = function (output, conte
5617
6005
  }
5618
6006
  });
5619
6007
  }); };
6008
+ export var deserializeAws_restJson1GetCoreNetworkChangeEventsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6009
+ var contents, data, _a, _b;
6010
+ return __generator(this, function (_c) {
6011
+ switch (_c.label) {
6012
+ case 0:
6013
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
6014
+ return [2, deserializeAws_restJson1GetCoreNetworkChangeEventsCommandError(output, context)];
6015
+ }
6016
+ contents = {
6017
+ $metadata: deserializeMetadata(output),
6018
+ CoreNetworkChangeEvents: undefined,
6019
+ NextToken: undefined,
6020
+ };
6021
+ _a = __expectNonNull;
6022
+ _b = __expectObject;
6023
+ return [4, parseBody(output.body, context)];
6024
+ case 1:
6025
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6026
+ if (data.CoreNetworkChangeEvents !== undefined && data.CoreNetworkChangeEvents !== null) {
6027
+ contents.CoreNetworkChangeEvents = deserializeAws_restJson1CoreNetworkChangeEventList(data.CoreNetworkChangeEvents, context);
6028
+ }
6029
+ if (data.NextToken !== undefined && data.NextToken !== null) {
6030
+ contents.NextToken = __expectString(data.NextToken);
6031
+ }
6032
+ return [2, Promise.resolve(contents)];
6033
+ }
6034
+ });
6035
+ }); };
6036
+ var deserializeAws_restJson1GetCoreNetworkChangeEventsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6037
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6038
+ var _c;
6039
+ return __generator(this, function (_d) {
6040
+ switch (_d.label) {
6041
+ case 0:
6042
+ _a = [__assign({}, output)];
6043
+ _c = {};
6044
+ return [4, parseBody(output.body, context)];
6045
+ case 1:
6046
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
6047
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6048
+ _b = errorCode;
6049
+ switch (_b) {
6050
+ case "AccessDeniedException": return [3, 2];
6051
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
6052
+ case "InternalServerException": return [3, 4];
6053
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
6054
+ case "ResourceNotFoundException": return [3, 6];
6055
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 6];
6056
+ case "ThrottlingException": return [3, 8];
6057
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 8];
6058
+ case "ValidationException": return [3, 10];
6059
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 10];
6060
+ }
6061
+ return [3, 12];
6062
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
6063
+ case 3: throw _d.sent();
6064
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
6065
+ case 5: throw _d.sent();
6066
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6067
+ case 7: throw _d.sent();
6068
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6069
+ case 9: throw _d.sent();
6070
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
6071
+ case 11: throw _d.sent();
6072
+ case 12:
6073
+ parsedBody = parsedOutput.body;
6074
+ $metadata = deserializeMetadata(output);
6075
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6076
+ response = new __BaseException({
6077
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6078
+ $fault: "client",
6079
+ $metadata: $metadata,
6080
+ });
6081
+ throw __decorateServiceException(response, parsedBody);
6082
+ }
6083
+ });
6084
+ }); };
5620
6085
  export var deserializeAws_restJson1GetCoreNetworkChangeSetCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
5621
6086
  var contents, data, _a, _b;
5622
6087
  return __generator(this, function (_c) {
@@ -6642,7 +7107,157 @@ export var deserializeAws_restJson1GetSitesCommand = function (output, context)
6642
7107
  }
6643
7108
  });
6644
7109
  }); };
6645
- var deserializeAws_restJson1GetSitesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7110
+ var deserializeAws_restJson1GetSitesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7111
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7112
+ var _c;
7113
+ return __generator(this, function (_d) {
7114
+ switch (_d.label) {
7115
+ case 0:
7116
+ _a = [__assign({}, output)];
7117
+ _c = {};
7118
+ return [4, parseBody(output.body, context)];
7119
+ case 1:
7120
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7121
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7122
+ _b = errorCode;
7123
+ switch (_b) {
7124
+ case "AccessDeniedException": return [3, 2];
7125
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
7126
+ case "InternalServerException": return [3, 4];
7127
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
7128
+ case "ResourceNotFoundException": return [3, 6];
7129
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 6];
7130
+ case "ThrottlingException": return [3, 8];
7131
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 8];
7132
+ case "ValidationException": return [3, 10];
7133
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 10];
7134
+ }
7135
+ return [3, 12];
7136
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
7137
+ case 3: throw _d.sent();
7138
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
7139
+ case 5: throw _d.sent();
7140
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7141
+ case 7: throw _d.sent();
7142
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7143
+ case 9: throw _d.sent();
7144
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
7145
+ case 11: throw _d.sent();
7146
+ case 12:
7147
+ parsedBody = parsedOutput.body;
7148
+ $metadata = deserializeMetadata(output);
7149
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7150
+ response = new __BaseException({
7151
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7152
+ $fault: "client",
7153
+ $metadata: $metadata,
7154
+ });
7155
+ throw __decorateServiceException(response, parsedBody);
7156
+ }
7157
+ });
7158
+ }); };
7159
+ export var deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7160
+ var contents, data, _a, _b;
7161
+ return __generator(this, function (_c) {
7162
+ switch (_c.label) {
7163
+ case 0:
7164
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7165
+ return [2, deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError(output, context)];
7166
+ }
7167
+ contents = {
7168
+ $metadata: deserializeMetadata(output),
7169
+ SiteToSiteVpnAttachment: undefined,
7170
+ };
7171
+ _a = __expectNonNull;
7172
+ _b = __expectObject;
7173
+ return [4, parseBody(output.body, context)];
7174
+ case 1:
7175
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
7176
+ if (data.SiteToSiteVpnAttachment !== undefined && data.SiteToSiteVpnAttachment !== null) {
7177
+ contents.SiteToSiteVpnAttachment = deserializeAws_restJson1SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context);
7178
+ }
7179
+ return [2, Promise.resolve(contents)];
7180
+ }
7181
+ });
7182
+ }); };
7183
+ var deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7184
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7185
+ var _c;
7186
+ return __generator(this, function (_d) {
7187
+ switch (_d.label) {
7188
+ case 0:
7189
+ _a = [__assign({}, output)];
7190
+ _c = {};
7191
+ return [4, parseBody(output.body, context)];
7192
+ case 1:
7193
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
7194
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7195
+ _b = errorCode;
7196
+ switch (_b) {
7197
+ case "AccessDeniedException": return [3, 2];
7198
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
7199
+ case "InternalServerException": return [3, 4];
7200
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
7201
+ case "ResourceNotFoundException": return [3, 6];
7202
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 6];
7203
+ case "ThrottlingException": return [3, 8];
7204
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 8];
7205
+ case "ValidationException": return [3, 10];
7206
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 10];
7207
+ }
7208
+ return [3, 12];
7209
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
7210
+ case 3: throw _d.sent();
7211
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
7212
+ case 5: throw _d.sent();
7213
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7214
+ case 7: throw _d.sent();
7215
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7216
+ case 9: throw _d.sent();
7217
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
7218
+ case 11: throw _d.sent();
7219
+ case 12:
7220
+ parsedBody = parsedOutput.body;
7221
+ $metadata = deserializeMetadata(output);
7222
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7223
+ response = new __BaseException({
7224
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7225
+ $fault: "client",
7226
+ $metadata: $metadata,
7227
+ });
7228
+ throw __decorateServiceException(response, parsedBody);
7229
+ }
7230
+ });
7231
+ }); };
7232
+ export var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7233
+ var contents, data, _a, _b;
7234
+ return __generator(this, function (_c) {
7235
+ switch (_c.label) {
7236
+ case 0:
7237
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7238
+ return [2, deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError(output, context)];
7239
+ }
7240
+ contents = {
7241
+ $metadata: deserializeMetadata(output),
7242
+ NextToken: undefined,
7243
+ TransitGatewayConnectPeerAssociations: undefined,
7244
+ };
7245
+ _a = __expectNonNull;
7246
+ _b = __expectObject;
7247
+ return [4, parseBody(output.body, context)];
7248
+ case 1:
7249
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
7250
+ if (data.NextToken !== undefined && data.NextToken !== null) {
7251
+ contents.NextToken = __expectString(data.NextToken);
7252
+ }
7253
+ if (data.TransitGatewayConnectPeerAssociations !== undefined && data.TransitGatewayConnectPeerAssociations !== null) {
7254
+ contents.TransitGatewayConnectPeerAssociations = deserializeAws_restJson1TransitGatewayConnectPeerAssociationList(data.TransitGatewayConnectPeerAssociations, context);
7255
+ }
7256
+ return [2, Promise.resolve(contents)];
7257
+ }
7258
+ });
7259
+ }); };
7260
+ var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6646
7261
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6647
7262
  var _c;
6648
7263
  return __generator(this, function (_d) {
@@ -6658,27 +7273,31 @@ var deserializeAws_restJson1GetSitesCommandError = function (output, context) {
6658
7273
  switch (_b) {
6659
7274
  case "AccessDeniedException": return [3, 2];
6660
7275
  case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
6661
- case "InternalServerException": return [3, 4];
6662
- case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
6663
- case "ResourceNotFoundException": return [3, 6];
6664
- case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 6];
6665
- case "ThrottlingException": return [3, 8];
6666
- case "com.amazonaws.networkmanager#ThrottlingException": return [3, 8];
6667
- case "ValidationException": return [3, 10];
6668
- case "com.amazonaws.networkmanager#ValidationException": return [3, 10];
7276
+ case "ConflictException": return [3, 4];
7277
+ case "com.amazonaws.networkmanager#ConflictException": return [3, 4];
7278
+ case "InternalServerException": return [3, 6];
7279
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 6];
7280
+ case "ResourceNotFoundException": return [3, 8];
7281
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 8];
7282
+ case "ThrottlingException": return [3, 10];
7283
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 10];
7284
+ case "ValidationException": return [3, 12];
7285
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 12];
6669
7286
  }
6670
- return [3, 12];
7287
+ return [3, 14];
6671
7288
  case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
6672
7289
  case 3: throw _d.sent();
6673
- case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
7290
+ case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
6674
7291
  case 5: throw _d.sent();
6675
- case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7292
+ case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
6676
7293
  case 7: throw _d.sent();
6677
- case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7294
+ case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6678
7295
  case 9: throw _d.sent();
6679
- case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
7296
+ case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6680
7297
  case 11: throw _d.sent();
6681
- case 12:
7298
+ case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
7299
+ case 13: throw _d.sent();
7300
+ case 14:
6682
7301
  parsedBody = parsedOutput.body;
6683
7302
  $metadata = deserializeMetadata(output);
6684
7303
  statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
@@ -6691,31 +7310,31 @@ var deserializeAws_restJson1GetSitesCommandError = function (output, context) {
6691
7310
  }
6692
7311
  });
6693
7312
  }); };
6694
- export var deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7313
+ export var deserializeAws_restJson1GetTransitGatewayPeeringCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6695
7314
  var contents, data, _a, _b;
6696
7315
  return __generator(this, function (_c) {
6697
7316
  switch (_c.label) {
6698
7317
  case 0:
6699
7318
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6700
- return [2, deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError(output, context)];
7319
+ return [2, deserializeAws_restJson1GetTransitGatewayPeeringCommandError(output, context)];
6701
7320
  }
6702
7321
  contents = {
6703
7322
  $metadata: deserializeMetadata(output),
6704
- SiteToSiteVpnAttachment: undefined,
7323
+ TransitGatewayPeering: undefined,
6705
7324
  };
6706
7325
  _a = __expectNonNull;
6707
7326
  _b = __expectObject;
6708
7327
  return [4, parseBody(output.body, context)];
6709
7328
  case 1:
6710
7329
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6711
- if (data.SiteToSiteVpnAttachment !== undefined && data.SiteToSiteVpnAttachment !== null) {
6712
- contents.SiteToSiteVpnAttachment = deserializeAws_restJson1SiteToSiteVpnAttachment(data.SiteToSiteVpnAttachment, context);
7330
+ if (data.TransitGatewayPeering !== undefined && data.TransitGatewayPeering !== null) {
7331
+ contents.TransitGatewayPeering = deserializeAws_restJson1TransitGatewayPeering(data.TransitGatewayPeering, context);
6713
7332
  }
6714
7333
  return [2, Promise.resolve(contents)];
6715
7334
  }
6716
7335
  });
6717
7336
  }); };
6718
- var deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7337
+ var deserializeAws_restJson1GetTransitGatewayPeeringCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6719
7338
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6720
7339
  var _c;
6721
7340
  return __generator(this, function (_d) {
@@ -6764,18 +7383,18 @@ var deserializeAws_restJson1GetSiteToSiteVpnAttachmentCommandError = function (o
6764
7383
  }
6765
7384
  });
6766
7385
  }); };
6767
- export var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7386
+ export var deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6768
7387
  var contents, data, _a, _b;
6769
7388
  return __generator(this, function (_c) {
6770
7389
  switch (_c.label) {
6771
7390
  case 0:
6772
7391
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6773
- return [2, deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError(output, context)];
7392
+ return [2, deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError(output, context)];
6774
7393
  }
6775
7394
  contents = {
6776
7395
  $metadata: deserializeMetadata(output),
6777
7396
  NextToken: undefined,
6778
- TransitGatewayConnectPeerAssociations: undefined,
7397
+ TransitGatewayRegistrations: undefined,
6779
7398
  };
6780
7399
  _a = __expectNonNull;
6781
7400
  _b = __expectObject;
@@ -6785,14 +7404,14 @@ export var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsComma
6785
7404
  if (data.NextToken !== undefined && data.NextToken !== null) {
6786
7405
  contents.NextToken = __expectString(data.NextToken);
6787
7406
  }
6788
- if (data.TransitGatewayConnectPeerAssociations !== undefined && data.TransitGatewayConnectPeerAssociations !== null) {
6789
- contents.TransitGatewayConnectPeerAssociations = deserializeAws_restJson1TransitGatewayConnectPeerAssociationList(data.TransitGatewayConnectPeerAssociations, context);
7407
+ if (data.TransitGatewayRegistrations !== undefined && data.TransitGatewayRegistrations !== null) {
7408
+ contents.TransitGatewayRegistrations = deserializeAws_restJson1TransitGatewayRegistrationList(data.TransitGatewayRegistrations, context);
6790
7409
  }
6791
7410
  return [2, Promise.resolve(contents)];
6792
7411
  }
6793
7412
  });
6794
7413
  }); };
6795
- var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7414
+ var deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6796
7415
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6797
7416
  var _c;
6798
7417
  return __generator(this, function (_d) {
@@ -6808,31 +7427,27 @@ var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError
6808
7427
  switch (_b) {
6809
7428
  case "AccessDeniedException": return [3, 2];
6810
7429
  case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
6811
- case "ConflictException": return [3, 4];
6812
- case "com.amazonaws.networkmanager#ConflictException": return [3, 4];
6813
- case "InternalServerException": return [3, 6];
6814
- case "com.amazonaws.networkmanager#InternalServerException": return [3, 6];
6815
- case "ResourceNotFoundException": return [3, 8];
6816
- case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 8];
6817
- case "ThrottlingException": return [3, 10];
6818
- case "com.amazonaws.networkmanager#ThrottlingException": return [3, 10];
6819
- case "ValidationException": return [3, 12];
6820
- case "com.amazonaws.networkmanager#ValidationException": return [3, 12];
7430
+ case "InternalServerException": return [3, 4];
7431
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
7432
+ case "ResourceNotFoundException": return [3, 6];
7433
+ case "com.amazonaws.networkmanager#ResourceNotFoundException": return [3, 6];
7434
+ case "ThrottlingException": return [3, 8];
7435
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 8];
7436
+ case "ValidationException": return [3, 10];
7437
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 10];
6821
7438
  }
6822
- return [3, 14];
7439
+ return [3, 12];
6823
7440
  case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
6824
7441
  case 3: throw _d.sent();
6825
- case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
7442
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
6826
7443
  case 5: throw _d.sent();
6827
- case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
7444
+ case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
6828
7445
  case 7: throw _d.sent();
6829
- case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
7446
+ case 8: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
6830
7447
  case 9: throw _d.sent();
6831
- case 10: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
7448
+ case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
6832
7449
  case 11: throw _d.sent();
6833
- case 12: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
6834
- case 13: throw _d.sent();
6835
- case 14:
7450
+ case 12:
6836
7451
  parsedBody = parsedOutput.body;
6837
7452
  $metadata = deserializeMetadata(output);
6838
7453
  statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
@@ -6845,35 +7460,31 @@ var deserializeAws_restJson1GetTransitGatewayConnectPeerAssociationsCommandError
6845
7460
  }
6846
7461
  });
6847
7462
  }); };
6848
- export var deserializeAws_restJson1GetTransitGatewayRegistrationsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7463
+ export var deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6849
7464
  var contents, data, _a, _b;
6850
7465
  return __generator(this, function (_c) {
6851
7466
  switch (_c.label) {
6852
7467
  case 0:
6853
7468
  if (output.statusCode !== 200 && output.statusCode >= 300) {
6854
- return [2, deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError(output, context)];
7469
+ return [2, deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommandError(output, context)];
6855
7470
  }
6856
7471
  contents = {
6857
7472
  $metadata: deserializeMetadata(output),
6858
- NextToken: undefined,
6859
- TransitGatewayRegistrations: undefined,
7473
+ TransitGatewayRouteTableAttachment: undefined,
6860
7474
  };
6861
7475
  _a = __expectNonNull;
6862
7476
  _b = __expectObject;
6863
7477
  return [4, parseBody(output.body, context)];
6864
7478
  case 1:
6865
7479
  data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
6866
- if (data.NextToken !== undefined && data.NextToken !== null) {
6867
- contents.NextToken = __expectString(data.NextToken);
6868
- }
6869
- if (data.TransitGatewayRegistrations !== undefined && data.TransitGatewayRegistrations !== null) {
6870
- contents.TransitGatewayRegistrations = deserializeAws_restJson1TransitGatewayRegistrationList(data.TransitGatewayRegistrations, context);
7480
+ if (data.TransitGatewayRouteTableAttachment !== undefined && data.TransitGatewayRouteTableAttachment !== null) {
7481
+ contents.TransitGatewayRouteTableAttachment = deserializeAws_restJson1TransitGatewayRouteTableAttachment(data.TransitGatewayRouteTableAttachment, context);
6871
7482
  }
6872
7483
  return [2, Promise.resolve(contents)];
6873
7484
  }
6874
7485
  });
6875
7486
  }); };
6876
- var deserializeAws_restJson1GetTransitGatewayRegistrationsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7487
+ var deserializeAws_restJson1GetTransitGatewayRouteTableAttachmentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
6877
7488
  var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
6878
7489
  var _c;
6879
7490
  return __generator(this, function (_d) {
@@ -7347,6 +7958,79 @@ var deserializeAws_restJson1ListOrganizationServiceAccessStatusCommandError = fu
7347
7958
  }
7348
7959
  });
7349
7960
  }); };
7961
+ export var deserializeAws_restJson1ListPeeringsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7962
+ var contents, data, _a, _b;
7963
+ return __generator(this, function (_c) {
7964
+ switch (_c.label) {
7965
+ case 0:
7966
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
7967
+ return [2, deserializeAws_restJson1ListPeeringsCommandError(output, context)];
7968
+ }
7969
+ contents = {
7970
+ $metadata: deserializeMetadata(output),
7971
+ NextToken: undefined,
7972
+ Peerings: undefined,
7973
+ };
7974
+ _a = __expectNonNull;
7975
+ _b = __expectObject;
7976
+ return [4, parseBody(output.body, context)];
7977
+ case 1:
7978
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
7979
+ if (data.NextToken !== undefined && data.NextToken !== null) {
7980
+ contents.NextToken = __expectString(data.NextToken);
7981
+ }
7982
+ if (data.Peerings !== undefined && data.Peerings !== null) {
7983
+ contents.Peerings = deserializeAws_restJson1PeeringList(data.Peerings, context);
7984
+ }
7985
+ return [2, Promise.resolve(contents)];
7986
+ }
7987
+ });
7988
+ }); };
7989
+ var deserializeAws_restJson1ListPeeringsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7990
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
7991
+ var _c;
7992
+ return __generator(this, function (_d) {
7993
+ switch (_d.label) {
7994
+ case 0:
7995
+ _a = [__assign({}, output)];
7996
+ _c = {};
7997
+ return [4, parseBody(output.body, context)];
7998
+ case 1:
7999
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
8000
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
8001
+ _b = errorCode;
8002
+ switch (_b) {
8003
+ case "AccessDeniedException": return [3, 2];
8004
+ case "com.amazonaws.networkmanager#AccessDeniedException": return [3, 2];
8005
+ case "InternalServerException": return [3, 4];
8006
+ case "com.amazonaws.networkmanager#InternalServerException": return [3, 4];
8007
+ case "ThrottlingException": return [3, 6];
8008
+ case "com.amazonaws.networkmanager#ThrottlingException": return [3, 6];
8009
+ case "ValidationException": return [3, 8];
8010
+ case "com.amazonaws.networkmanager#ValidationException": return [3, 8];
8011
+ }
8012
+ return [3, 10];
8013
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
8014
+ case 3: throw _d.sent();
8015
+ case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
8016
+ case 5: throw _d.sent();
8017
+ case 6: return [4, deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)];
8018
+ case 7: throw _d.sent();
8019
+ case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
8020
+ case 9: throw _d.sent();
8021
+ case 10:
8022
+ parsedBody = parsedOutput.body;
8023
+ $metadata = deserializeMetadata(output);
8024
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8025
+ response = new __BaseException({
8026
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8027
+ $fault: "client",
8028
+ $metadata: $metadata,
8029
+ });
8030
+ throw __decorateServiceException(response, parsedBody);
8031
+ }
8032
+ });
8033
+ }); };
7350
8034
  export var deserializeAws_restJson1ListTagsForResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
7351
8035
  var contents, data, _a, _b;
7352
8036
  return __generator(this, function (_c) {
@@ -8866,16 +9550,16 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
8866
9550
  });
8867
9551
  }); };
8868
9552
  var serializeAws_restJson1AWSLocation = function (input, context) {
8869
- return __assign(__assign({}, (input.SubnetArn !== undefined && input.SubnetArn !== null && { SubnetArn: input.SubnetArn })), (input.Zone !== undefined && input.Zone !== null && { Zone: input.Zone }));
9553
+ return __assign(__assign({}, (input.SubnetArn != null && { SubnetArn: input.SubnetArn })), (input.Zone != null && { Zone: input.Zone }));
8870
9554
  };
8871
9555
  var serializeAws_restJson1Bandwidth = function (input, context) {
8872
- return __assign(__assign({}, (input.DownloadSpeed !== undefined && input.DownloadSpeed !== null && { DownloadSpeed: input.DownloadSpeed })), (input.UploadSpeed !== undefined && input.UploadSpeed !== null && { UploadSpeed: input.UploadSpeed }));
9556
+ return __assign(__assign({}, (input.DownloadSpeed != null && { DownloadSpeed: input.DownloadSpeed })), (input.UploadSpeed != null && { UploadSpeed: input.UploadSpeed }));
8873
9557
  };
8874
9558
  var serializeAws_restJson1BgpOptions = function (input, context) {
8875
- return __assign({}, (input.PeerAsn !== undefined && input.PeerAsn !== null && { PeerAsn: input.PeerAsn }));
9559
+ return __assign({}, (input.PeerAsn != null && { PeerAsn: input.PeerAsn }));
8876
9560
  };
8877
9561
  var serializeAws_restJson1ConnectAttachmentOptions = function (input, context) {
8878
- return __assign({}, (input.Protocol !== undefined && input.Protocol !== null && { Protocol: input.Protocol }));
9562
+ return __assign({}, (input.Protocol != null && { Protocol: input.Protocol }));
8879
9563
  };
8880
9564
  var serializeAws_restJson1ConstrainedStringList = function (input, context) {
8881
9565
  return input
@@ -8888,7 +9572,7 @@ var serializeAws_restJson1ConstrainedStringList = function (input, context) {
8888
9572
  });
8889
9573
  };
8890
9574
  var serializeAws_restJson1CoreNetworkSegmentEdgeIdentifier = function (input, context) {
8891
- return __assign(__assign(__assign({}, (input.CoreNetworkId !== undefined && input.CoreNetworkId !== null && { CoreNetworkId: input.CoreNetworkId })), (input.EdgeLocation !== undefined && input.EdgeLocation !== null && { EdgeLocation: input.EdgeLocation })), (input.SegmentName !== undefined && input.SegmentName !== null && { SegmentName: input.SegmentName }));
9575
+ return __assign(__assign(__assign({}, (input.CoreNetworkId != null && { CoreNetworkId: input.CoreNetworkId })), (input.EdgeLocation != null && { EdgeLocation: input.EdgeLocation })), (input.SegmentName != null && { SegmentName: input.SegmentName }));
8892
9576
  };
8893
9577
  var serializeAws_restJson1FilterMap = function (input, context) {
8894
9578
  return Object.entries(input).reduce(function (acc, _a) {
@@ -8911,7 +9595,7 @@ var serializeAws_restJson1FilterValues = function (input, context) {
8911
9595
  });
8912
9596
  };
8913
9597
  var serializeAws_restJson1Location = function (input, context) {
8914
- return __assign(__assign(__assign({}, (input.Address !== undefined && input.Address !== null && { Address: input.Address })), (input.Latitude !== undefined && input.Latitude !== null && { Latitude: input.Latitude })), (input.Longitude !== undefined && input.Longitude !== null && { Longitude: input.Longitude }));
9598
+ return __assign(__assign(__assign({}, (input.Address != null && { Address: input.Address })), (input.Latitude != null && { Latitude: input.Latitude })), (input.Longitude != null && { Longitude: input.Longitude }));
8915
9599
  };
8916
9600
  var serializeAws_restJson1NetworkResourceMetadataMap = function (input, context) {
8917
9601
  return Object.entries(input).reduce(function (acc, _a) {
@@ -8924,8 +9608,9 @@ var serializeAws_restJson1NetworkResourceMetadataMap = function (input, context)
8924
9608
  }, {});
8925
9609
  };
8926
9610
  var serializeAws_restJson1RouteAnalysisEndpointOptionsSpecification = function (input, context) {
8927
- return __assign(__assign({}, (input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress })), (input.TransitGatewayAttachmentArn !== undefined &&
8928
- input.TransitGatewayAttachmentArn !== null && { TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn }));
9611
+ return __assign(__assign({}, (input.IpAddress != null && { IpAddress: input.IpAddress })), (input.TransitGatewayAttachmentArn != null && {
9612
+ TransitGatewayAttachmentArn: input.TransitGatewayAttachmentArn,
9613
+ }));
8929
9614
  };
8930
9615
  var serializeAws_restJson1RouteStateList = function (input, context) {
8931
9616
  return input
@@ -8938,11 +9623,11 @@ var serializeAws_restJson1RouteStateList = function (input, context) {
8938
9623
  });
8939
9624
  };
8940
9625
  var serializeAws_restJson1RouteTableIdentifier = function (input, context) {
8941
- return __assign(__assign({}, (input.CoreNetworkSegmentEdge !== undefined &&
8942
- input.CoreNetworkSegmentEdge !== null && {
9626
+ return __assign(__assign({}, (input.CoreNetworkSegmentEdge != null && {
8943
9627
  CoreNetworkSegmentEdge: serializeAws_restJson1CoreNetworkSegmentEdgeIdentifier(input.CoreNetworkSegmentEdge, context),
8944
- })), (input.TransitGatewayRouteTableArn !== undefined &&
8945
- input.TransitGatewayRouteTableArn !== null && { TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn }));
9628
+ })), (input.TransitGatewayRouteTableArn != null && {
9629
+ TransitGatewayRouteTableArn: input.TransitGatewayRouteTableArn,
9630
+ }));
8946
9631
  };
8947
9632
  var serializeAws_restJson1RouteTypeList = function (input, context) {
8948
9633
  return input
@@ -8965,7 +9650,7 @@ var serializeAws_restJson1SubnetArnList = function (input, context) {
8965
9650
  });
8966
9651
  };
8967
9652
  var serializeAws_restJson1Tag = function (input, context) {
8968
- return __assign(__assign({}, (input.Key !== undefined && input.Key !== null && { Key: input.Key })), (input.Value !== undefined && input.Value !== null && { Value: input.Value }));
9653
+ return __assign(__assign({}, (input.Key != null && { Key: input.Key })), (input.Value != null && { Value: input.Value }));
8969
9654
  };
8970
9655
  var serializeAws_restJson1TagList = function (input, context) {
8971
9656
  return input
@@ -8978,7 +9663,7 @@ var serializeAws_restJson1TagList = function (input, context) {
8978
9663
  });
8979
9664
  };
8980
9665
  var serializeAws_restJson1VpcOptions = function (input, context) {
8981
- return __assign({}, (input.Ipv6Support !== undefined && input.Ipv6Support !== null && { Ipv6Support: input.Ipv6Support }));
9666
+ return __assign({}, (input.Ipv6Support != null && { Ipv6Support: input.Ipv6Support }));
8982
9667
  };
8983
9668
  var deserializeAws_restJson1AccountStatus = function (output, context) {
8984
9669
  return {
@@ -9004,23 +9689,17 @@ var deserializeAws_restJson1Attachment = function (output, context) {
9004
9689
  AttachmentType: __expectString(output.AttachmentType),
9005
9690
  CoreNetworkArn: __expectString(output.CoreNetworkArn),
9006
9691
  CoreNetworkId: __expectString(output.CoreNetworkId),
9007
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9008
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9009
- : undefined,
9692
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9010
9693
  EdgeLocation: __expectString(output.EdgeLocation),
9011
9694
  OwnerAccountId: __expectString(output.OwnerAccountId),
9012
- ProposedSegmentChange: output.ProposedSegmentChange !== undefined && output.ProposedSegmentChange !== null
9695
+ ProposedSegmentChange: output.ProposedSegmentChange != null
9013
9696
  ? deserializeAws_restJson1ProposedSegmentChange(output.ProposedSegmentChange, context)
9014
9697
  : undefined,
9015
9698
  ResourceArn: __expectString(output.ResourceArn),
9016
9699
  SegmentName: __expectString(output.SegmentName),
9017
9700
  State: __expectString(output.State),
9018
- Tags: output.Tags !== undefined && output.Tags !== null
9019
- ? deserializeAws_restJson1TagList(output.Tags, context)
9020
- : undefined,
9021
- UpdatedAt: output.UpdatedAt !== undefined && output.UpdatedAt !== null
9022
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt)))
9023
- : undefined,
9701
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9702
+ UpdatedAt: output.UpdatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.UpdatedAt))) : undefined,
9024
9703
  };
9025
9704
  };
9026
9705
  var deserializeAws_restJson1AttachmentList = function (output, context) {
@@ -9048,12 +9727,8 @@ var deserializeAws_restJson1Bandwidth = function (output, context) {
9048
9727
  };
9049
9728
  var deserializeAws_restJson1ConnectAttachment = function (output, context) {
9050
9729
  return {
9051
- Attachment: output.Attachment !== undefined && output.Attachment !== null
9052
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
9053
- : undefined,
9054
- Options: output.Options !== undefined && output.Options !== null
9055
- ? deserializeAws_restJson1ConnectAttachmentOptions(output.Options, context)
9056
- : undefined,
9730
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
9731
+ Options: output.Options != null ? deserializeAws_restJson1ConnectAttachmentOptions(output.Options, context) : undefined,
9057
9732
  TransportAttachmentId: __expectString(output.TransportAttachmentId),
9058
9733
  };
9059
9734
  };
@@ -9068,25 +9743,19 @@ var deserializeAws_restJson1Connection = function (output, context) {
9068
9743
  ConnectedLinkId: __expectString(output.ConnectedLinkId),
9069
9744
  ConnectionArn: __expectString(output.ConnectionArn),
9070
9745
  ConnectionId: __expectString(output.ConnectionId),
9071
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9072
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9073
- : undefined,
9746
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9074
9747
  Description: __expectString(output.Description),
9075
9748
  DeviceId: __expectString(output.DeviceId),
9076
9749
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9077
9750
  LinkId: __expectString(output.LinkId),
9078
9751
  State: __expectString(output.State),
9079
- Tags: output.Tags !== undefined && output.Tags !== null
9080
- ? deserializeAws_restJson1TagList(output.Tags, context)
9081
- : undefined,
9752
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9082
9753
  };
9083
9754
  };
9084
9755
  var deserializeAws_restJson1ConnectionHealth = function (output, context) {
9085
9756
  return {
9086
9757
  Status: __expectString(output.Status),
9087
- Timestamp: output.Timestamp !== undefined && output.Timestamp !== null
9088
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp)))
9089
- : undefined,
9758
+ Timestamp: output.Timestamp != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.Timestamp))) : undefined,
9090
9759
  Type: __expectString(output.Type),
9091
9760
  };
9092
9761
  };
@@ -9103,20 +9772,16 @@ var deserializeAws_restJson1ConnectionList = function (output, context) {
9103
9772
  };
9104
9773
  var deserializeAws_restJson1ConnectPeer = function (output, context) {
9105
9774
  return {
9106
- Configuration: output.Configuration !== undefined && output.Configuration !== null
9775
+ Configuration: output.Configuration != null
9107
9776
  ? deserializeAws_restJson1ConnectPeerConfiguration(output.Configuration, context)
9108
9777
  : undefined,
9109
9778
  ConnectAttachmentId: __expectString(output.ConnectAttachmentId),
9110
9779
  ConnectPeerId: __expectString(output.ConnectPeerId),
9111
9780
  CoreNetworkId: __expectString(output.CoreNetworkId),
9112
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9113
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9114
- : undefined,
9781
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9115
9782
  EdgeLocation: __expectString(output.EdgeLocation),
9116
9783
  State: __expectString(output.State),
9117
- Tags: output.Tags !== undefined && output.Tags !== null
9118
- ? deserializeAws_restJson1TagList(output.Tags, context)
9119
- : undefined,
9784
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9120
9785
  };
9121
9786
  };
9122
9787
  var deserializeAws_restJson1ConnectPeerAssociation = function (output, context) {
@@ -9160,11 +9825,11 @@ var deserializeAws_restJson1ConnectPeerBgpConfigurationList = function (output,
9160
9825
  };
9161
9826
  var deserializeAws_restJson1ConnectPeerConfiguration = function (output, context) {
9162
9827
  return {
9163
- BgpConfigurations: output.BgpConfigurations !== undefined && output.BgpConfigurations !== null
9828
+ BgpConfigurations: output.BgpConfigurations != null
9164
9829
  ? deserializeAws_restJson1ConnectPeerBgpConfigurationList(output.BgpConfigurations, context)
9165
9830
  : undefined,
9166
9831
  CoreNetworkAddress: __expectString(output.CoreNetworkAddress),
9167
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
9832
+ InsideCidrBlocks: output.InsideCidrBlocks != null
9168
9833
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
9169
9834
  : undefined,
9170
9835
  PeerAddress: __expectString(output.PeerAddress),
@@ -9177,13 +9842,9 @@ var deserializeAws_restJson1ConnectPeerSummary = function (output, context) {
9177
9842
  ConnectPeerId: __expectString(output.ConnectPeerId),
9178
9843
  ConnectPeerState: __expectString(output.ConnectPeerState),
9179
9844
  CoreNetworkId: __expectString(output.CoreNetworkId),
9180
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9181
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9182
- : undefined,
9845
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9183
9846
  EdgeLocation: __expectString(output.EdgeLocation),
9184
- Tags: output.Tags !== undefined && output.Tags !== null
9185
- ? deserializeAws_restJson1TagList(output.Tags, context)
9186
- : undefined,
9847
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9187
9848
  };
9188
9849
  };
9189
9850
  var deserializeAws_restJson1ConnectPeerSummaryList = function (output, context) {
@@ -9212,36 +9873,56 @@ var deserializeAws_restJson1CoreNetwork = function (output, context) {
9212
9873
  return {
9213
9874
  CoreNetworkArn: __expectString(output.CoreNetworkArn),
9214
9875
  CoreNetworkId: __expectString(output.CoreNetworkId),
9215
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9216
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9217
- : undefined,
9876
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9218
9877
  Description: __expectString(output.Description),
9219
- Edges: output.Edges !== undefined && output.Edges !== null
9220
- ? deserializeAws_restJson1CoreNetworkEdgeList(output.Edges, context)
9221
- : undefined,
9878
+ Edges: output.Edges != null ? deserializeAws_restJson1CoreNetworkEdgeList(output.Edges, context) : undefined,
9222
9879
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9223
- Segments: output.Segments !== undefined && output.Segments !== null
9224
- ? deserializeAws_restJson1CoreNetworkSegmentList(output.Segments, context)
9225
- : undefined,
9880
+ Segments: output.Segments != null ? deserializeAws_restJson1CoreNetworkSegmentList(output.Segments, context) : undefined,
9226
9881
  State: __expectString(output.State),
9227
- Tags: output.Tags !== undefined && output.Tags !== null
9228
- ? deserializeAws_restJson1TagList(output.Tags, context)
9229
- : undefined,
9882
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9230
9883
  };
9231
9884
  };
9232
9885
  var deserializeAws_restJson1CoreNetworkChange = function (output, context) {
9233
9886
  return {
9234
9887
  Action: __expectString(output.Action),
9235
9888
  Identifier: __expectString(output.Identifier),
9236
- NewValues: output.NewValues !== undefined && output.NewValues !== null
9237
- ? deserializeAws_restJson1CoreNetworkChangeValues(output.NewValues, context)
9238
- : undefined,
9239
- PreviousValues: output.PreviousValues !== undefined && output.PreviousValues !== null
9889
+ IdentifierPath: __expectString(output.IdentifierPath),
9890
+ NewValues: output.NewValues != null ? deserializeAws_restJson1CoreNetworkChangeValues(output.NewValues, context) : undefined,
9891
+ PreviousValues: output.PreviousValues != null
9240
9892
  ? deserializeAws_restJson1CoreNetworkChangeValues(output.PreviousValues, context)
9241
9893
  : undefined,
9242
9894
  Type: __expectString(output.Type),
9243
9895
  };
9244
9896
  };
9897
+ var deserializeAws_restJson1CoreNetworkChangeEvent = function (output, context) {
9898
+ return {
9899
+ Action: __expectString(output.Action),
9900
+ EventTime: output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined,
9901
+ IdentifierPath: __expectString(output.IdentifierPath),
9902
+ Status: __expectString(output.Status),
9903
+ Type: __expectString(output.Type),
9904
+ Values: output.Values != null ? deserializeAws_restJson1CoreNetworkChangeEventValues(output.Values, context) : undefined,
9905
+ };
9906
+ };
9907
+ var deserializeAws_restJson1CoreNetworkChangeEventList = function (output, context) {
9908
+ var retVal = (output || [])
9909
+ .filter(function (e) { return e != null; })
9910
+ .map(function (entry) {
9911
+ if (entry === null) {
9912
+ return null;
9913
+ }
9914
+ return deserializeAws_restJson1CoreNetworkChangeEvent(entry, context);
9915
+ });
9916
+ return retVal;
9917
+ };
9918
+ var deserializeAws_restJson1CoreNetworkChangeEventValues = function (output, context) {
9919
+ return {
9920
+ AttachmentId: __expectString(output.AttachmentId),
9921
+ Cidr: __expectString(output.Cidr),
9922
+ EdgeLocation: __expectString(output.EdgeLocation),
9923
+ SegmentName: __expectString(output.SegmentName),
9924
+ };
9925
+ };
9245
9926
  var deserializeAws_restJson1CoreNetworkChangeList = function (output, context) {
9246
9927
  var retVal = (output || [])
9247
9928
  .filter(function (e) { return e != null; })
@@ -9258,14 +9939,14 @@ var deserializeAws_restJson1CoreNetworkChangeValues = function (output, context)
9258
9939
  Asn: __expectLong(output.Asn),
9259
9940
  Cidr: __expectString(output.Cidr),
9260
9941
  DestinationIdentifier: __expectString(output.DestinationIdentifier),
9261
- EdgeLocations: output.EdgeLocations !== undefined && output.EdgeLocations !== null
9942
+ EdgeLocations: output.EdgeLocations != null
9262
9943
  ? deserializeAws_restJson1ExternalRegionCodeList(output.EdgeLocations, context)
9263
9944
  : undefined,
9264
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
9945
+ InsideCidrBlocks: output.InsideCidrBlocks != null
9265
9946
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
9266
9947
  : undefined,
9267
9948
  SegmentName: __expectString(output.SegmentName),
9268
- SharedSegments: output.SharedSegments !== undefined && output.SharedSegments !== null
9949
+ SharedSegments: output.SharedSegments != null
9269
9950
  ? deserializeAws_restJson1ConstrainedStringList(output.SharedSegments, context)
9270
9951
  : undefined,
9271
9952
  };
@@ -9274,7 +9955,7 @@ var deserializeAws_restJson1CoreNetworkEdge = function (output, context) {
9274
9955
  return {
9275
9956
  Asn: __expectLong(output.Asn),
9276
9957
  EdgeLocation: __expectString(output.EdgeLocation),
9277
- InsideCidrBlocks: output.InsideCidrBlocks !== undefined && output.InsideCidrBlocks !== null
9958
+ InsideCidrBlocks: output.InsideCidrBlocks != null
9278
9959
  ? deserializeAws_restJson1ConstrainedStringList(output.InsideCidrBlocks, context)
9279
9960
  : undefined,
9280
9961
  };
@@ -9295,14 +9976,10 @@ var deserializeAws_restJson1CoreNetworkPolicy = function (output, context) {
9295
9976
  Alias: __expectString(output.Alias),
9296
9977
  ChangeSetState: __expectString(output.ChangeSetState),
9297
9978
  CoreNetworkId: __expectString(output.CoreNetworkId),
9298
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9299
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9300
- : undefined,
9979
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9301
9980
  Description: __expectString(output.Description),
9302
- PolicyDocument: output.PolicyDocument !== undefined && output.PolicyDocument !== null
9303
- ? new __LazyJsonString(output.PolicyDocument)
9304
- : undefined,
9305
- PolicyErrors: output.PolicyErrors !== undefined && output.PolicyErrors !== null
9981
+ PolicyDocument: output.PolicyDocument != null ? new __LazyJsonString(output.PolicyDocument) : undefined,
9982
+ PolicyErrors: output.PolicyErrors != null
9306
9983
  ? deserializeAws_restJson1CoreNetworkPolicyErrorList(output.PolicyErrors, context)
9307
9984
  : undefined,
9308
9985
  PolicyVersionId: __expectInt32(output.PolicyVersionId),
@@ -9331,9 +10008,7 @@ var deserializeAws_restJson1CoreNetworkPolicyVersion = function (output, context
9331
10008
  Alias: __expectString(output.Alias),
9332
10009
  ChangeSetState: __expectString(output.ChangeSetState),
9333
10010
  CoreNetworkId: __expectString(output.CoreNetworkId),
9334
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9335
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9336
- : undefined,
10011
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9337
10012
  Description: __expectString(output.Description),
9338
10013
  PolicyVersionId: __expectInt32(output.PolicyVersionId),
9339
10014
  };
@@ -9351,11 +10026,11 @@ var deserializeAws_restJson1CoreNetworkPolicyVersionList = function (output, con
9351
10026
  };
9352
10027
  var deserializeAws_restJson1CoreNetworkSegment = function (output, context) {
9353
10028
  return {
9354
- EdgeLocations: output.EdgeLocations !== undefined && output.EdgeLocations !== null
10029
+ EdgeLocations: output.EdgeLocations != null
9355
10030
  ? deserializeAws_restJson1ExternalRegionCodeList(output.EdgeLocations, context)
9356
10031
  : undefined,
9357
10032
  Name: __expectString(output.Name),
9358
- SharedSegments: output.SharedSegments !== undefined && output.SharedSegments !== null
10033
+ SharedSegments: output.SharedSegments != null
9359
10034
  ? deserializeAws_restJson1ConstrainedStringList(output.SharedSegments, context)
9360
10035
  : undefined,
9361
10036
  };
@@ -9386,9 +10061,7 @@ var deserializeAws_restJson1CoreNetworkSummary = function (output, context) {
9386
10061
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9387
10062
  OwnerAccountId: __expectString(output.OwnerAccountId),
9388
10063
  State: __expectString(output.State),
9389
- Tags: output.Tags !== undefined && output.Tags !== null
9390
- ? deserializeAws_restJson1TagList(output.Tags, context)
9391
- : undefined,
10064
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9392
10065
  };
9393
10066
  };
9394
10067
  var deserializeAws_restJson1CoreNetworkSummaryList = function (output, context) {
@@ -9424,26 +10097,18 @@ var deserializeAws_restJson1CustomerGatewayAssociationList = function (output, c
9424
10097
  };
9425
10098
  var deserializeAws_restJson1Device = function (output, context) {
9426
10099
  return {
9427
- AWSLocation: output.AWSLocation !== undefined && output.AWSLocation !== null
9428
- ? deserializeAws_restJson1AWSLocation(output.AWSLocation, context)
9429
- : undefined,
9430
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9431
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9432
- : undefined,
10100
+ AWSLocation: output.AWSLocation != null ? deserializeAws_restJson1AWSLocation(output.AWSLocation, context) : undefined,
10101
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9433
10102
  Description: __expectString(output.Description),
9434
10103
  DeviceArn: __expectString(output.DeviceArn),
9435
10104
  DeviceId: __expectString(output.DeviceId),
9436
10105
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9437
- Location: output.Location !== undefined && output.Location !== null
9438
- ? deserializeAws_restJson1Location(output.Location, context)
9439
- : undefined,
10106
+ Location: output.Location != null ? deserializeAws_restJson1Location(output.Location, context) : undefined,
9440
10107
  Model: __expectString(output.Model),
9441
10108
  SerialNumber: __expectString(output.SerialNumber),
9442
10109
  SiteId: __expectString(output.SiteId),
9443
10110
  State: __expectString(output.State),
9444
- Tags: output.Tags !== undefined && output.Tags !== null
9445
- ? deserializeAws_restJson1TagList(output.Tags, context)
9446
- : undefined,
10111
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9447
10112
  Type: __expectString(output.Type),
9448
10113
  Vendor: __expectString(output.Vendor),
9449
10114
  };
@@ -9482,16 +10147,12 @@ var deserializeAws_restJson1ExternalRegionCodeList = function (output, context)
9482
10147
  };
9483
10148
  var deserializeAws_restJson1GlobalNetwork = function (output, context) {
9484
10149
  return {
9485
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9486
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9487
- : undefined,
10150
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9488
10151
  Description: __expectString(output.Description),
9489
10152
  GlobalNetworkArn: __expectString(output.GlobalNetworkArn),
9490
10153
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9491
10154
  State: __expectString(output.State),
9492
- Tags: output.Tags !== undefined && output.Tags !== null
9493
- ? deserializeAws_restJson1TagList(output.Tags, context)
9494
- : undefined,
10155
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9495
10156
  };
9496
10157
  };
9497
10158
  var deserializeAws_restJson1GlobalNetworkList = function (output, context) {
@@ -9507,12 +10168,8 @@ var deserializeAws_restJson1GlobalNetworkList = function (output, context) {
9507
10168
  };
9508
10169
  var deserializeAws_restJson1Link = function (output, context) {
9509
10170
  return {
9510
- Bandwidth: output.Bandwidth !== undefined && output.Bandwidth !== null
9511
- ? deserializeAws_restJson1Bandwidth(output.Bandwidth, context)
9512
- : undefined,
9513
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9514
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9515
- : undefined,
10171
+ Bandwidth: output.Bandwidth != null ? deserializeAws_restJson1Bandwidth(output.Bandwidth, context) : undefined,
10172
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9516
10173
  Description: __expectString(output.Description),
9517
10174
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9518
10175
  LinkArn: __expectString(output.LinkArn),
@@ -9520,9 +10177,7 @@ var deserializeAws_restJson1Link = function (output, context) {
9520
10177
  Provider: __expectString(output.Provider),
9521
10178
  SiteId: __expectString(output.SiteId),
9522
10179
  State: __expectString(output.State),
9523
- Tags: output.Tags !== undefined && output.Tags !== null
9524
- ? deserializeAws_restJson1TagList(output.Tags, context)
9525
- : undefined,
10180
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9526
10181
  Type: __expectString(output.Type),
9527
10182
  };
9528
10183
  };
@@ -9569,19 +10224,17 @@ var deserializeAws_restJson1NetworkResource = function (output, context) {
9569
10224
  AwsRegion: __expectString(output.AwsRegion),
9570
10225
  CoreNetworkId: __expectString(output.CoreNetworkId),
9571
10226
  Definition: __expectString(output.Definition),
9572
- DefinitionTimestamp: output.DefinitionTimestamp !== undefined && output.DefinitionTimestamp !== null
10227
+ DefinitionTimestamp: output.DefinitionTimestamp != null
9573
10228
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.DefinitionTimestamp)))
9574
10229
  : undefined,
9575
- Metadata: output.Metadata !== undefined && output.Metadata !== null
10230
+ Metadata: output.Metadata != null
9576
10231
  ? deserializeAws_restJson1NetworkResourceMetadataMap(output.Metadata, context)
9577
10232
  : undefined,
9578
10233
  RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn),
9579
10234
  ResourceArn: __expectString(output.ResourceArn),
9580
10235
  ResourceId: __expectString(output.ResourceId),
9581
10236
  ResourceType: __expectString(output.ResourceType),
9582
- Tags: output.Tags !== undefined && output.Tags !== null
9583
- ? deserializeAws_restJson1TagList(output.Tags, context)
9584
- : undefined,
10237
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9585
10238
  };
9586
10239
  };
9587
10240
  var deserializeAws_restJson1NetworkResourceCount = function (output, context) {
@@ -9635,7 +10288,7 @@ var deserializeAws_restJson1NetworkResourceSummary = function (output, context)
9635
10288
  var deserializeAws_restJson1NetworkRoute = function (output, context) {
9636
10289
  return {
9637
10290
  DestinationCidrBlock: __expectString(output.DestinationCidrBlock),
9638
- Destinations: output.Destinations !== undefined && output.Destinations !== null
10291
+ Destinations: output.Destinations != null
9639
10292
  ? deserializeAws_restJson1NetworkRouteDestinationList(output.Destinations, context)
9640
10293
  : undefined,
9641
10294
  PrefixListId: __expectString(output.PrefixListId),
@@ -9681,9 +10334,7 @@ var deserializeAws_restJson1NetworkTelemetry = function (output, context) {
9681
10334
  Address: __expectString(output.Address),
9682
10335
  AwsRegion: __expectString(output.AwsRegion),
9683
10336
  CoreNetworkId: __expectString(output.CoreNetworkId),
9684
- Health: output.Health !== undefined && output.Health !== null
9685
- ? deserializeAws_restJson1ConnectionHealth(output.Health, context)
9686
- : undefined,
10337
+ Health: output.Health != null ? deserializeAws_restJson1ConnectionHealth(output.Health, context) : undefined,
9687
10338
  RegisteredGatewayArn: __expectString(output.RegisteredGatewayArn),
9688
10339
  ResourceArn: __expectString(output.ResourceArn),
9689
10340
  ResourceId: __expectString(output.ResourceId),
@@ -9703,7 +10354,7 @@ var deserializeAws_restJson1NetworkTelemetryList = function (output, context) {
9703
10354
  };
9704
10355
  var deserializeAws_restJson1OrganizationStatus = function (output, context) {
9705
10356
  return {
9706
- AccountStatusList: output.AccountStatusList !== undefined && output.AccountStatusList !== null
10357
+ AccountStatusList: output.AccountStatusList != null
9707
10358
  ? deserializeAws_restJson1AccountStatusList(output.AccountStatusList, context)
9708
10359
  : undefined,
9709
10360
  OrganizationAwsServiceAccessStatus: __expectString(output.OrganizationAwsServiceAccessStatus),
@@ -9714,9 +10365,7 @@ var deserializeAws_restJson1OrganizationStatus = function (output, context) {
9714
10365
  var deserializeAws_restJson1PathComponent = function (output, context) {
9715
10366
  return {
9716
10367
  DestinationCidrBlock: __expectString(output.DestinationCidrBlock),
9717
- Resource: output.Resource !== undefined && output.Resource !== null
9718
- ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context)
9719
- : undefined,
10368
+ Resource: output.Resource != null ? deserializeAws_restJson1NetworkResourceSummary(output.Resource, context) : undefined,
9720
10369
  Sequence: __expectInt32(output.Sequence),
9721
10370
  };
9722
10371
  };
@@ -9731,13 +10380,36 @@ var deserializeAws_restJson1PathComponentList = function (output, context) {
9731
10380
  });
9732
10381
  return retVal;
9733
10382
  };
10383
+ var deserializeAws_restJson1Peering = function (output, context) {
10384
+ return {
10385
+ CoreNetworkArn: __expectString(output.CoreNetworkArn),
10386
+ CoreNetworkId: __expectString(output.CoreNetworkId),
10387
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
10388
+ EdgeLocation: __expectString(output.EdgeLocation),
10389
+ OwnerAccountId: __expectString(output.OwnerAccountId),
10390
+ PeeringId: __expectString(output.PeeringId),
10391
+ PeeringType: __expectString(output.PeeringType),
10392
+ ResourceArn: __expectString(output.ResourceArn),
10393
+ State: __expectString(output.State),
10394
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
10395
+ };
10396
+ };
10397
+ var deserializeAws_restJson1PeeringList = function (output, context) {
10398
+ var retVal = (output || [])
10399
+ .filter(function (e) { return e != null; })
10400
+ .map(function (entry) {
10401
+ if (entry === null) {
10402
+ return null;
10403
+ }
10404
+ return deserializeAws_restJson1Peering(entry, context);
10405
+ });
10406
+ return retVal;
10407
+ };
9734
10408
  var deserializeAws_restJson1ProposedSegmentChange = function (output, context) {
9735
10409
  return {
9736
10410
  AttachmentPolicyRuleNumber: __expectInt32(output.AttachmentPolicyRuleNumber),
9737
10411
  SegmentName: __expectString(output.SegmentName),
9738
- Tags: output.Tags !== undefined && output.Tags !== null
9739
- ? deserializeAws_restJson1TagList(output.Tags, context)
9740
- : undefined,
10412
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9741
10413
  };
9742
10414
  };
9743
10415
  var deserializeAws_restJson1ReasonContextMap = function (output, context) {
@@ -9769,23 +10441,17 @@ var deserializeAws_restJson1RelationshipList = function (output, context) {
9769
10441
  };
9770
10442
  var deserializeAws_restJson1RouteAnalysis = function (output, context) {
9771
10443
  return {
9772
- Destination: output.Destination !== undefined && output.Destination !== null
10444
+ Destination: output.Destination != null
9773
10445
  ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Destination, context)
9774
10446
  : undefined,
9775
- ForwardPath: output.ForwardPath !== undefined && output.ForwardPath !== null
9776
- ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context)
9777
- : undefined,
10447
+ ForwardPath: output.ForwardPath != null ? deserializeAws_restJson1RouteAnalysisPath(output.ForwardPath, context) : undefined,
9778
10448
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9779
10449
  IncludeReturnPath: __expectBoolean(output.IncludeReturnPath),
9780
10450
  OwnerAccountId: __expectString(output.OwnerAccountId),
9781
- ReturnPath: output.ReturnPath !== undefined && output.ReturnPath !== null
9782
- ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context)
9783
- : undefined,
10451
+ ReturnPath: output.ReturnPath != null ? deserializeAws_restJson1RouteAnalysisPath(output.ReturnPath, context) : undefined,
9784
10452
  RouteAnalysisId: __expectString(output.RouteAnalysisId),
9785
- Source: output.Source !== undefined && output.Source !== null
9786
- ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context)
9787
- : undefined,
9788
- StartTimestamp: output.StartTimestamp !== undefined && output.StartTimestamp !== null
10453
+ Source: output.Source != null ? deserializeAws_restJson1RouteAnalysisEndpointOptions(output.Source, context) : undefined,
10454
+ StartTimestamp: output.StartTimestamp != null
9789
10455
  ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.StartTimestamp)))
9790
10456
  : undefined,
9791
10457
  Status: __expectString(output.Status),
@@ -9795,7 +10461,7 @@ var deserializeAws_restJson1RouteAnalysis = function (output, context) {
9795
10461
  var deserializeAws_restJson1RouteAnalysisCompletion = function (output, context) {
9796
10462
  return {
9797
10463
  ReasonCode: __expectString(output.ReasonCode),
9798
- ReasonContext: output.ReasonContext !== undefined && output.ReasonContext !== null
10464
+ ReasonContext: output.ReasonContext != null
9799
10465
  ? deserializeAws_restJson1ReasonContextMap(output.ReasonContext, context)
9800
10466
  : undefined,
9801
10467
  ResultCode: __expectString(output.ResultCode),
@@ -9810,30 +10476,22 @@ var deserializeAws_restJson1RouteAnalysisEndpointOptions = function (output, con
9810
10476
  };
9811
10477
  var deserializeAws_restJson1RouteAnalysisPath = function (output, context) {
9812
10478
  return {
9813
- CompletionStatus: output.CompletionStatus !== undefined && output.CompletionStatus !== null
10479
+ CompletionStatus: output.CompletionStatus != null
9814
10480
  ? deserializeAws_restJson1RouteAnalysisCompletion(output.CompletionStatus, context)
9815
10481
  : undefined,
9816
- Path: output.Path !== undefined && output.Path !== null
9817
- ? deserializeAws_restJson1PathComponentList(output.Path, context)
9818
- : undefined,
10482
+ Path: output.Path != null ? deserializeAws_restJson1PathComponentList(output.Path, context) : undefined,
9819
10483
  };
9820
10484
  };
9821
10485
  var deserializeAws_restJson1Site = function (output, context) {
9822
10486
  return {
9823
- CreatedAt: output.CreatedAt !== undefined && output.CreatedAt !== null
9824
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
9825
- : undefined,
10487
+ CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
9826
10488
  Description: __expectString(output.Description),
9827
10489
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9828
- Location: output.Location !== undefined && output.Location !== null
9829
- ? deserializeAws_restJson1Location(output.Location, context)
9830
- : undefined,
10490
+ Location: output.Location != null ? deserializeAws_restJson1Location(output.Location, context) : undefined,
9831
10491
  SiteArn: __expectString(output.SiteArn),
9832
10492
  SiteId: __expectString(output.SiteId),
9833
10493
  State: __expectString(output.State),
9834
- Tags: output.Tags !== undefined && output.Tags !== null
9835
- ? deserializeAws_restJson1TagList(output.Tags, context)
9836
- : undefined,
10494
+ Tags: output.Tags != null ? deserializeAws_restJson1TagList(output.Tags, context) : undefined,
9837
10495
  };
9838
10496
  };
9839
10497
  var deserializeAws_restJson1SiteList = function (output, context) {
@@ -9849,9 +10507,7 @@ var deserializeAws_restJson1SiteList = function (output, context) {
9849
10507
  };
9850
10508
  var deserializeAws_restJson1SiteToSiteVpnAttachment = function (output, context) {
9851
10509
  return {
9852
- Attachment: output.Attachment !== undefined && output.Attachment !== null
9853
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
9854
- : undefined,
10510
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
9855
10511
  VpnConnectionArn: __expectString(output.VpnConnectionArn),
9856
10512
  };
9857
10513
  };
@@ -9903,10 +10559,16 @@ var deserializeAws_restJson1TransitGatewayConnectPeerAssociationList = function
9903
10559
  });
9904
10560
  return retVal;
9905
10561
  };
10562
+ var deserializeAws_restJson1TransitGatewayPeering = function (output, context) {
10563
+ return {
10564
+ Peering: output.Peering != null ? deserializeAws_restJson1Peering(output.Peering, context) : undefined,
10565
+ TransitGatewayArn: __expectString(output.TransitGatewayArn),
10566
+ };
10567
+ };
9906
10568
  var deserializeAws_restJson1TransitGatewayRegistration = function (output, context) {
9907
10569
  return {
9908
10570
  GlobalNetworkId: __expectString(output.GlobalNetworkId),
9909
- State: output.State !== undefined && output.State !== null
10571
+ State: output.State != null
9910
10572
  ? deserializeAws_restJson1TransitGatewayRegistrationStateReason(output.State, context)
9911
10573
  : undefined,
9912
10574
  TransitGatewayArn: __expectString(output.TransitGatewayArn),
@@ -9929,6 +10591,13 @@ var deserializeAws_restJson1TransitGatewayRegistrationStateReason = function (ou
9929
10591
  Message: __expectString(output.Message),
9930
10592
  };
9931
10593
  };
10594
+ var deserializeAws_restJson1TransitGatewayRouteTableAttachment = function (output, context) {
10595
+ return {
10596
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
10597
+ PeeringId: __expectString(output.PeeringId),
10598
+ TransitGatewayRouteTableArn: __expectString(output.TransitGatewayRouteTableArn),
10599
+ };
10600
+ };
9932
10601
  var deserializeAws_restJson1ValidationExceptionField = function (output, context) {
9933
10602
  return {
9934
10603
  Message: __expectString(output.Message),
@@ -9948,15 +10617,9 @@ var deserializeAws_restJson1ValidationExceptionFieldList = function (output, con
9948
10617
  };
9949
10618
  var deserializeAws_restJson1VpcAttachment = function (output, context) {
9950
10619
  return {
9951
- Attachment: output.Attachment !== undefined && output.Attachment !== null
9952
- ? deserializeAws_restJson1Attachment(output.Attachment, context)
9953
- : undefined,
9954
- Options: output.Options !== undefined && output.Options !== null
9955
- ? deserializeAws_restJson1VpcOptions(output.Options, context)
9956
- : undefined,
9957
- SubnetArns: output.SubnetArns !== undefined && output.SubnetArns !== null
9958
- ? deserializeAws_restJson1SubnetArnList(output.SubnetArns, context)
9959
- : undefined,
10620
+ Attachment: output.Attachment != null ? deserializeAws_restJson1Attachment(output.Attachment, context) : undefined,
10621
+ Options: output.Options != null ? deserializeAws_restJson1VpcOptions(output.Options, context) : undefined,
10622
+ SubnetArns: output.SubnetArns != null ? deserializeAws_restJson1SubnetArnList(output.SubnetArns, context) : undefined,
9960
10623
  };
9961
10624
  };
9962
10625
  var deserializeAws_restJson1VpcOptions = function (output, context) {
@@ -10002,6 +10665,9 @@ var loadRestJsonErrorCode = function (output, data) {
10002
10665
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
10003
10666
  var sanitizeErrorCode = function (rawValue) {
10004
10667
  var cleanValue = rawValue;
10668
+ if (typeof cleanValue === "number") {
10669
+ cleanValue = cleanValue.toString();
10670
+ }
10005
10671
  if (cleanValue.indexOf(":") >= 0) {
10006
10672
  cleanValue = cleanValue.split(":")[0];
10007
10673
  }