@aws-sdk/client-app-mesh 3.118.0 → 3.127.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.
@@ -41,12 +41,9 @@ const serializeAws_restJson1CreateGatewayRouteCommand = async (input, context) =
41
41
  let body;
42
42
  body = JSON.stringify({
43
43
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
44
- ...(input.gatewayRouteName !== undefined &&
45
- input.gatewayRouteName !== null && { gatewayRouteName: input.gatewayRouteName }),
46
- ...(input.spec !== undefined &&
47
- input.spec !== null && { spec: serializeAws_restJson1GatewayRouteSpec(input.spec, context) }),
48
- ...(input.tags !== undefined &&
49
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
44
+ ...(input.gatewayRouteName != null && { gatewayRouteName: input.gatewayRouteName }),
45
+ ...(input.spec != null && { spec: serializeAws_restJson1GatewayRouteSpec(input.spec, context) }),
46
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
50
47
  });
51
48
  return new protocol_http_1.HttpRequest({
52
49
  protocol,
@@ -70,11 +67,9 @@ const serializeAws_restJson1CreateMeshCommand = async (input, context) => {
70
67
  let body;
71
68
  body = JSON.stringify({
72
69
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
73
- ...(input.meshName !== undefined && input.meshName !== null && { meshName: input.meshName }),
74
- ...(input.spec !== undefined &&
75
- input.spec !== null && { spec: serializeAws_restJson1MeshSpec(input.spec, context) }),
76
- ...(input.tags !== undefined &&
77
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
70
+ ...(input.meshName != null && { meshName: input.meshName }),
71
+ ...(input.spec != null && { spec: serializeAws_restJson1MeshSpec(input.spec, context) }),
72
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
78
73
  });
79
74
  return new protocol_http_1.HttpRequest({
80
75
  protocol,
@@ -121,11 +116,9 @@ const serializeAws_restJson1CreateRouteCommand = async (input, context) => {
121
116
  let body;
122
117
  body = JSON.stringify({
123
118
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
124
- ...(input.routeName !== undefined && input.routeName !== null && { routeName: input.routeName }),
125
- ...(input.spec !== undefined &&
126
- input.spec !== null && { spec: serializeAws_restJson1RouteSpec(input.spec, context) }),
127
- ...(input.tags !== undefined &&
128
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
119
+ ...(input.routeName != null && { routeName: input.routeName }),
120
+ ...(input.spec != null && { spec: serializeAws_restJson1RouteSpec(input.spec, context) }),
121
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
129
122
  });
130
123
  return new protocol_http_1.HttpRequest({
131
124
  protocol,
@@ -163,12 +156,9 @@ const serializeAws_restJson1CreateVirtualGatewayCommand = async (input, context)
163
156
  let body;
164
157
  body = JSON.stringify({
165
158
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
166
- ...(input.spec !== undefined &&
167
- input.spec !== null && { spec: serializeAws_restJson1VirtualGatewaySpec(input.spec, context) }),
168
- ...(input.tags !== undefined &&
169
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
170
- ...(input.virtualGatewayName !== undefined &&
171
- input.virtualGatewayName !== null && { virtualGatewayName: input.virtualGatewayName }),
159
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualGatewaySpec(input.spec, context) }),
160
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
161
+ ...(input.virtualGatewayName != null && { virtualGatewayName: input.virtualGatewayName }),
172
162
  });
173
163
  return new protocol_http_1.HttpRequest({
174
164
  protocol,
@@ -205,12 +195,9 @@ const serializeAws_restJson1CreateVirtualNodeCommand = async (input, context) =>
205
195
  let body;
206
196
  body = JSON.stringify({
207
197
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
208
- ...(input.spec !== undefined &&
209
- input.spec !== null && { spec: serializeAws_restJson1VirtualNodeSpec(input.spec, context) }),
210
- ...(input.tags !== undefined &&
211
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
212
- ...(input.virtualNodeName !== undefined &&
213
- input.virtualNodeName !== null && { virtualNodeName: input.virtualNodeName }),
198
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualNodeSpec(input.spec, context) }),
199
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
200
+ ...(input.virtualNodeName != null && { virtualNodeName: input.virtualNodeName }),
214
201
  });
215
202
  return new protocol_http_1.HttpRequest({
216
203
  protocol,
@@ -248,12 +235,9 @@ const serializeAws_restJson1CreateVirtualRouterCommand = async (input, context)
248
235
  let body;
249
236
  body = JSON.stringify({
250
237
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
251
- ...(input.spec !== undefined &&
252
- input.spec !== null && { spec: serializeAws_restJson1VirtualRouterSpec(input.spec, context) }),
253
- ...(input.tags !== undefined &&
254
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
255
- ...(input.virtualRouterName !== undefined &&
256
- input.virtualRouterName !== null && { virtualRouterName: input.virtualRouterName }),
238
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualRouterSpec(input.spec, context) }),
239
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
240
+ ...(input.virtualRouterName != null && { virtualRouterName: input.virtualRouterName }),
257
241
  });
258
242
  return new protocol_http_1.HttpRequest({
259
243
  protocol,
@@ -291,12 +275,9 @@ const serializeAws_restJson1CreateVirtualServiceCommand = async (input, context)
291
275
  let body;
292
276
  body = JSON.stringify({
293
277
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
294
- ...(input.spec !== undefined &&
295
- input.spec !== null && { spec: serializeAws_restJson1VirtualServiceSpec(input.spec, context) }),
296
- ...(input.tags !== undefined &&
297
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
298
- ...(input.virtualServiceName !== undefined &&
299
- input.virtualServiceName !== null && { virtualServiceName: input.virtualServiceName }),
278
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualServiceSpec(input.spec, context) }),
279
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
280
+ ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }),
300
281
  });
301
282
  return new protocol_http_1.HttpRequest({
302
283
  protocol,
@@ -1169,8 +1150,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1169
1150
  };
1170
1151
  let body;
1171
1152
  body = JSON.stringify({
1172
- ...(input.tags !== undefined &&
1173
- input.tags !== null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
1153
+ ...(input.tags != null && { tags: serializeAws_restJson1TagList(input.tags, context) }),
1174
1154
  });
1175
1155
  return new protocol_http_1.HttpRequest({
1176
1156
  protocol,
@@ -1195,8 +1175,7 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1195
1175
  };
1196
1176
  let body;
1197
1177
  body = JSON.stringify({
1198
- ...(input.tagKeys !== undefined &&
1199
- input.tagKeys !== null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
1178
+ ...(input.tagKeys != null && { tagKeys: serializeAws_restJson1TagKeyList(input.tagKeys, context) }),
1200
1179
  });
1201
1180
  return new protocol_http_1.HttpRequest({
1202
1181
  protocol,
@@ -1254,8 +1233,7 @@ const serializeAws_restJson1UpdateGatewayRouteCommand = async (input, context) =
1254
1233
  let body;
1255
1234
  body = JSON.stringify({
1256
1235
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1257
- ...(input.spec !== undefined &&
1258
- input.spec !== null && { spec: serializeAws_restJson1GatewayRouteSpec(input.spec, context) }),
1236
+ ...(input.spec != null && { spec: serializeAws_restJson1GatewayRouteSpec(input.spec, context) }),
1259
1237
  });
1260
1238
  return new protocol_http_1.HttpRequest({
1261
1239
  protocol,
@@ -1289,8 +1267,7 @@ const serializeAws_restJson1UpdateMeshCommand = async (input, context) => {
1289
1267
  let body;
1290
1268
  body = JSON.stringify({
1291
1269
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1292
- ...(input.spec !== undefined &&
1293
- input.spec !== null && { spec: serializeAws_restJson1MeshSpec(input.spec, context) }),
1270
+ ...(input.spec != null && { spec: serializeAws_restJson1MeshSpec(input.spec, context) }),
1294
1271
  });
1295
1272
  return new protocol_http_1.HttpRequest({
1296
1273
  protocol,
@@ -1347,8 +1324,7 @@ const serializeAws_restJson1UpdateRouteCommand = async (input, context) => {
1347
1324
  let body;
1348
1325
  body = JSON.stringify({
1349
1326
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1350
- ...(input.spec !== undefined &&
1351
- input.spec !== null && { spec: serializeAws_restJson1RouteSpec(input.spec, context) }),
1327
+ ...(input.spec != null && { spec: serializeAws_restJson1RouteSpec(input.spec, context) }),
1352
1328
  });
1353
1329
  return new protocol_http_1.HttpRequest({
1354
1330
  protocol,
@@ -1396,8 +1372,7 @@ const serializeAws_restJson1UpdateVirtualGatewayCommand = async (input, context)
1396
1372
  let body;
1397
1373
  body = JSON.stringify({
1398
1374
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1399
- ...(input.spec !== undefined &&
1400
- input.spec !== null && { spec: serializeAws_restJson1VirtualGatewaySpec(input.spec, context) }),
1375
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualGatewaySpec(input.spec, context) }),
1401
1376
  });
1402
1377
  return new protocol_http_1.HttpRequest({
1403
1378
  protocol,
@@ -1445,8 +1420,7 @@ const serializeAws_restJson1UpdateVirtualNodeCommand = async (input, context) =>
1445
1420
  let body;
1446
1421
  body = JSON.stringify({
1447
1422
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1448
- ...(input.spec !== undefined &&
1449
- input.spec !== null && { spec: serializeAws_restJson1VirtualNodeSpec(input.spec, context) }),
1423
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualNodeSpec(input.spec, context) }),
1450
1424
  });
1451
1425
  return new protocol_http_1.HttpRequest({
1452
1426
  protocol,
@@ -1494,8 +1468,7 @@ const serializeAws_restJson1UpdateVirtualRouterCommand = async (input, context)
1494
1468
  let body;
1495
1469
  body = JSON.stringify({
1496
1470
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1497
- ...(input.spec !== undefined &&
1498
- input.spec !== null && { spec: serializeAws_restJson1VirtualRouterSpec(input.spec, context) }),
1471
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualRouterSpec(input.spec, context) }),
1499
1472
  });
1500
1473
  return new protocol_http_1.HttpRequest({
1501
1474
  protocol,
@@ -1543,8 +1516,7 @@ const serializeAws_restJson1UpdateVirtualServiceCommand = async (input, context)
1543
1516
  let body;
1544
1517
  body = JSON.stringify({
1545
1518
  clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
1546
- ...(input.spec !== undefined &&
1547
- input.spec !== null && { spec: serializeAws_restJson1VirtualServiceSpec(input.spec, context) }),
1519
+ ...(input.spec != null && { spec: serializeAws_restJson1VirtualServiceSpec(input.spec, context) }),
1548
1520
  });
1549
1521
  return new protocol_http_1.HttpRequest({
1550
1522
  protocol,
@@ -1577,8 +1549,7 @@ const deserializeAws_restJson1CreateGatewayRouteCommandError = async (output, co
1577
1549
  body: await parseBody(output.body, context),
1578
1550
  };
1579
1551
  let response;
1580
- let errorCode = "UnknownError";
1581
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1552
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1582
1553
  switch (errorCode) {
1583
1554
  case "BadRequestException":
1584
1555
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1606,10 +1577,12 @@ const deserializeAws_restJson1CreateGatewayRouteCommandError = async (output, co
1606
1577
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1607
1578
  default:
1608
1579
  const parsedBody = parsedOutput.body;
1580
+ const $metadata = deserializeMetadata(output);
1581
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1609
1582
  response = new AppMeshServiceException_1.AppMeshServiceException({
1610
- name: parsedBody.code || parsedBody.Code || errorCode,
1583
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1611
1584
  $fault: "client",
1612
- $metadata: deserializeMetadata(output),
1585
+ $metadata,
1613
1586
  });
1614
1587
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1615
1588
  }
@@ -1633,8 +1606,7 @@ const deserializeAws_restJson1CreateMeshCommandError = async (output, context) =
1633
1606
  body: await parseBody(output.body, context),
1634
1607
  };
1635
1608
  let response;
1636
- let errorCode = "UnknownError";
1637
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1609
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1638
1610
  switch (errorCode) {
1639
1611
  case "BadRequestException":
1640
1612
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1662,10 +1634,12 @@ const deserializeAws_restJson1CreateMeshCommandError = async (output, context) =
1662
1634
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1663
1635
  default:
1664
1636
  const parsedBody = parsedOutput.body;
1637
+ const $metadata = deserializeMetadata(output);
1638
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1665
1639
  response = new AppMeshServiceException_1.AppMeshServiceException({
1666
- name: parsedBody.code || parsedBody.Code || errorCode,
1640
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1667
1641
  $fault: "client",
1668
- $metadata: deserializeMetadata(output),
1642
+ $metadata,
1669
1643
  });
1670
1644
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1671
1645
  }
@@ -1689,8 +1663,7 @@ const deserializeAws_restJson1CreateRouteCommandError = async (output, context)
1689
1663
  body: await parseBody(output.body, context),
1690
1664
  };
1691
1665
  let response;
1692
- let errorCode = "UnknownError";
1693
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1666
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1694
1667
  switch (errorCode) {
1695
1668
  case "BadRequestException":
1696
1669
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1718,10 +1691,12 @@ const deserializeAws_restJson1CreateRouteCommandError = async (output, context)
1718
1691
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1719
1692
  default:
1720
1693
  const parsedBody = parsedOutput.body;
1694
+ const $metadata = deserializeMetadata(output);
1695
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1721
1696
  response = new AppMeshServiceException_1.AppMeshServiceException({
1722
- name: parsedBody.code || parsedBody.Code || errorCode,
1697
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1723
1698
  $fault: "client",
1724
- $metadata: deserializeMetadata(output),
1699
+ $metadata,
1725
1700
  });
1726
1701
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1727
1702
  }
@@ -1745,8 +1720,7 @@ const deserializeAws_restJson1CreateVirtualGatewayCommandError = async (output,
1745
1720
  body: await parseBody(output.body, context),
1746
1721
  };
1747
1722
  let response;
1748
- let errorCode = "UnknownError";
1749
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1723
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1750
1724
  switch (errorCode) {
1751
1725
  case "BadRequestException":
1752
1726
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1774,10 +1748,12 @@ const deserializeAws_restJson1CreateVirtualGatewayCommandError = async (output,
1774
1748
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1775
1749
  default:
1776
1750
  const parsedBody = parsedOutput.body;
1751
+ const $metadata = deserializeMetadata(output);
1752
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1777
1753
  response = new AppMeshServiceException_1.AppMeshServiceException({
1778
- name: parsedBody.code || parsedBody.Code || errorCode,
1754
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1779
1755
  $fault: "client",
1780
- $metadata: deserializeMetadata(output),
1756
+ $metadata,
1781
1757
  });
1782
1758
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1783
1759
  }
@@ -1801,8 +1777,7 @@ const deserializeAws_restJson1CreateVirtualNodeCommandError = async (output, con
1801
1777
  body: await parseBody(output.body, context),
1802
1778
  };
1803
1779
  let response;
1804
- let errorCode = "UnknownError";
1805
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1780
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1806
1781
  switch (errorCode) {
1807
1782
  case "BadRequestException":
1808
1783
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1830,10 +1805,12 @@ const deserializeAws_restJson1CreateVirtualNodeCommandError = async (output, con
1830
1805
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1831
1806
  default:
1832
1807
  const parsedBody = parsedOutput.body;
1808
+ const $metadata = deserializeMetadata(output);
1809
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1833
1810
  response = new AppMeshServiceException_1.AppMeshServiceException({
1834
- name: parsedBody.code || parsedBody.Code || errorCode,
1811
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1835
1812
  $fault: "client",
1836
- $metadata: deserializeMetadata(output),
1813
+ $metadata,
1837
1814
  });
1838
1815
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1839
1816
  }
@@ -1857,8 +1834,7 @@ const deserializeAws_restJson1CreateVirtualRouterCommandError = async (output, c
1857
1834
  body: await parseBody(output.body, context),
1858
1835
  };
1859
1836
  let response;
1860
- let errorCode = "UnknownError";
1861
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1837
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1862
1838
  switch (errorCode) {
1863
1839
  case "BadRequestException":
1864
1840
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1886,10 +1862,12 @@ const deserializeAws_restJson1CreateVirtualRouterCommandError = async (output, c
1886
1862
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1887
1863
  default:
1888
1864
  const parsedBody = parsedOutput.body;
1865
+ const $metadata = deserializeMetadata(output);
1866
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1889
1867
  response = new AppMeshServiceException_1.AppMeshServiceException({
1890
- name: parsedBody.code || parsedBody.Code || errorCode,
1868
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1891
1869
  $fault: "client",
1892
- $metadata: deserializeMetadata(output),
1870
+ $metadata,
1893
1871
  });
1894
1872
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1895
1873
  }
@@ -1913,8 +1891,7 @@ const deserializeAws_restJson1CreateVirtualServiceCommandError = async (output,
1913
1891
  body: await parseBody(output.body, context),
1914
1892
  };
1915
1893
  let response;
1916
- let errorCode = "UnknownError";
1917
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1894
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1918
1895
  switch (errorCode) {
1919
1896
  case "BadRequestException":
1920
1897
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1942,10 +1919,12 @@ const deserializeAws_restJson1CreateVirtualServiceCommandError = async (output,
1942
1919
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1943
1920
  default:
1944
1921
  const parsedBody = parsedOutput.body;
1922
+ const $metadata = deserializeMetadata(output);
1923
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1945
1924
  response = new AppMeshServiceException_1.AppMeshServiceException({
1946
- name: parsedBody.code || parsedBody.Code || errorCode,
1925
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1947
1926
  $fault: "client",
1948
- $metadata: deserializeMetadata(output),
1927
+ $metadata,
1949
1928
  });
1950
1929
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1951
1930
  }
@@ -1969,8 +1948,7 @@ const deserializeAws_restJson1DeleteGatewayRouteCommandError = async (output, co
1969
1948
  body: await parseBody(output.body, context),
1970
1949
  };
1971
1950
  let response;
1972
- let errorCode = "UnknownError";
1973
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1951
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1974
1952
  switch (errorCode) {
1975
1953
  case "BadRequestException":
1976
1954
  case "com.amazonaws.appmesh#BadRequestException":
@@ -1995,10 +1973,12 @@ const deserializeAws_restJson1DeleteGatewayRouteCommandError = async (output, co
1995
1973
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
1996
1974
  default:
1997
1975
  const parsedBody = parsedOutput.body;
1976
+ const $metadata = deserializeMetadata(output);
1977
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1998
1978
  response = new AppMeshServiceException_1.AppMeshServiceException({
1999
- name: parsedBody.code || parsedBody.Code || errorCode,
1979
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2000
1980
  $fault: "client",
2001
- $metadata: deserializeMetadata(output),
1981
+ $metadata,
2002
1982
  });
2003
1983
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2004
1984
  }
@@ -2022,8 +2002,7 @@ const deserializeAws_restJson1DeleteMeshCommandError = async (output, context) =
2022
2002
  body: await parseBody(output.body, context),
2023
2003
  };
2024
2004
  let response;
2025
- let errorCode = "UnknownError";
2026
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2005
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2027
2006
  switch (errorCode) {
2028
2007
  case "BadRequestException":
2029
2008
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2048,10 +2027,12 @@ const deserializeAws_restJson1DeleteMeshCommandError = async (output, context) =
2048
2027
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2049
2028
  default:
2050
2029
  const parsedBody = parsedOutput.body;
2030
+ const $metadata = deserializeMetadata(output);
2031
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2051
2032
  response = new AppMeshServiceException_1.AppMeshServiceException({
2052
- name: parsedBody.code || parsedBody.Code || errorCode,
2033
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2053
2034
  $fault: "client",
2054
- $metadata: deserializeMetadata(output),
2035
+ $metadata,
2055
2036
  });
2056
2037
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2057
2038
  }
@@ -2075,8 +2056,7 @@ const deserializeAws_restJson1DeleteRouteCommandError = async (output, context)
2075
2056
  body: await parseBody(output.body, context),
2076
2057
  };
2077
2058
  let response;
2078
- let errorCode = "UnknownError";
2079
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2059
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2080
2060
  switch (errorCode) {
2081
2061
  case "BadRequestException":
2082
2062
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2101,10 +2081,12 @@ const deserializeAws_restJson1DeleteRouteCommandError = async (output, context)
2101
2081
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2102
2082
  default:
2103
2083
  const parsedBody = parsedOutput.body;
2084
+ const $metadata = deserializeMetadata(output);
2085
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2104
2086
  response = new AppMeshServiceException_1.AppMeshServiceException({
2105
- name: parsedBody.code || parsedBody.Code || errorCode,
2087
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2106
2088
  $fault: "client",
2107
- $metadata: deserializeMetadata(output),
2089
+ $metadata,
2108
2090
  });
2109
2091
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2110
2092
  }
@@ -2128,8 +2110,7 @@ const deserializeAws_restJson1DeleteVirtualGatewayCommandError = async (output,
2128
2110
  body: await parseBody(output.body, context),
2129
2111
  };
2130
2112
  let response;
2131
- let errorCode = "UnknownError";
2132
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2113
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2133
2114
  switch (errorCode) {
2134
2115
  case "BadRequestException":
2135
2116
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2154,10 +2135,12 @@ const deserializeAws_restJson1DeleteVirtualGatewayCommandError = async (output,
2154
2135
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2155
2136
  default:
2156
2137
  const parsedBody = parsedOutput.body;
2138
+ const $metadata = deserializeMetadata(output);
2139
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2157
2140
  response = new AppMeshServiceException_1.AppMeshServiceException({
2158
- name: parsedBody.code || parsedBody.Code || errorCode,
2141
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2159
2142
  $fault: "client",
2160
- $metadata: deserializeMetadata(output),
2143
+ $metadata,
2161
2144
  });
2162
2145
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2163
2146
  }
@@ -2181,8 +2164,7 @@ const deserializeAws_restJson1DeleteVirtualNodeCommandError = async (output, con
2181
2164
  body: await parseBody(output.body, context),
2182
2165
  };
2183
2166
  let response;
2184
- let errorCode = "UnknownError";
2185
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2167
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2186
2168
  switch (errorCode) {
2187
2169
  case "BadRequestException":
2188
2170
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2207,10 +2189,12 @@ const deserializeAws_restJson1DeleteVirtualNodeCommandError = async (output, con
2207
2189
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2208
2190
  default:
2209
2191
  const parsedBody = parsedOutput.body;
2192
+ const $metadata = deserializeMetadata(output);
2193
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2210
2194
  response = new AppMeshServiceException_1.AppMeshServiceException({
2211
- name: parsedBody.code || parsedBody.Code || errorCode,
2195
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2212
2196
  $fault: "client",
2213
- $metadata: deserializeMetadata(output),
2197
+ $metadata,
2214
2198
  });
2215
2199
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2216
2200
  }
@@ -2234,8 +2218,7 @@ const deserializeAws_restJson1DeleteVirtualRouterCommandError = async (output, c
2234
2218
  body: await parseBody(output.body, context),
2235
2219
  };
2236
2220
  let response;
2237
- let errorCode = "UnknownError";
2238
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2221
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2239
2222
  switch (errorCode) {
2240
2223
  case "BadRequestException":
2241
2224
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2260,10 +2243,12 @@ const deserializeAws_restJson1DeleteVirtualRouterCommandError = async (output, c
2260
2243
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2261
2244
  default:
2262
2245
  const parsedBody = parsedOutput.body;
2246
+ const $metadata = deserializeMetadata(output);
2247
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2263
2248
  response = new AppMeshServiceException_1.AppMeshServiceException({
2264
- name: parsedBody.code || parsedBody.Code || errorCode,
2249
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2265
2250
  $fault: "client",
2266
- $metadata: deserializeMetadata(output),
2251
+ $metadata,
2267
2252
  });
2268
2253
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2269
2254
  }
@@ -2287,8 +2272,7 @@ const deserializeAws_restJson1DeleteVirtualServiceCommandError = async (output,
2287
2272
  body: await parseBody(output.body, context),
2288
2273
  };
2289
2274
  let response;
2290
- let errorCode = "UnknownError";
2291
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2275
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2292
2276
  switch (errorCode) {
2293
2277
  case "BadRequestException":
2294
2278
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2313,10 +2297,12 @@ const deserializeAws_restJson1DeleteVirtualServiceCommandError = async (output,
2313
2297
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2314
2298
  default:
2315
2299
  const parsedBody = parsedOutput.body;
2300
+ const $metadata = deserializeMetadata(output);
2301
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2316
2302
  response = new AppMeshServiceException_1.AppMeshServiceException({
2317
- name: parsedBody.code || parsedBody.Code || errorCode,
2303
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2318
2304
  $fault: "client",
2319
- $metadata: deserializeMetadata(output),
2305
+ $metadata,
2320
2306
  });
2321
2307
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2322
2308
  }
@@ -2340,8 +2326,7 @@ const deserializeAws_restJson1DescribeGatewayRouteCommandError = async (output,
2340
2326
  body: await parseBody(output.body, context),
2341
2327
  };
2342
2328
  let response;
2343
- let errorCode = "UnknownError";
2344
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2329
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2345
2330
  switch (errorCode) {
2346
2331
  case "BadRequestException":
2347
2332
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2363,10 +2348,12 @@ const deserializeAws_restJson1DescribeGatewayRouteCommandError = async (output,
2363
2348
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2364
2349
  default:
2365
2350
  const parsedBody = parsedOutput.body;
2351
+ const $metadata = deserializeMetadata(output);
2352
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2366
2353
  response = new AppMeshServiceException_1.AppMeshServiceException({
2367
- name: parsedBody.code || parsedBody.Code || errorCode,
2354
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2368
2355
  $fault: "client",
2369
- $metadata: deserializeMetadata(output),
2356
+ $metadata,
2370
2357
  });
2371
2358
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2372
2359
  }
@@ -2390,8 +2377,7 @@ const deserializeAws_restJson1DescribeMeshCommandError = async (output, context)
2390
2377
  body: await parseBody(output.body, context),
2391
2378
  };
2392
2379
  let response;
2393
- let errorCode = "UnknownError";
2394
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2380
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2395
2381
  switch (errorCode) {
2396
2382
  case "BadRequestException":
2397
2383
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2413,10 +2399,12 @@ const deserializeAws_restJson1DescribeMeshCommandError = async (output, context)
2413
2399
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2414
2400
  default:
2415
2401
  const parsedBody = parsedOutput.body;
2402
+ const $metadata = deserializeMetadata(output);
2403
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2416
2404
  response = new AppMeshServiceException_1.AppMeshServiceException({
2417
- name: parsedBody.code || parsedBody.Code || errorCode,
2405
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2418
2406
  $fault: "client",
2419
- $metadata: deserializeMetadata(output),
2407
+ $metadata,
2420
2408
  });
2421
2409
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2422
2410
  }
@@ -2440,8 +2428,7 @@ const deserializeAws_restJson1DescribeRouteCommandError = async (output, context
2440
2428
  body: await parseBody(output.body, context),
2441
2429
  };
2442
2430
  let response;
2443
- let errorCode = "UnknownError";
2444
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2431
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2445
2432
  switch (errorCode) {
2446
2433
  case "BadRequestException":
2447
2434
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2463,10 +2450,12 @@ const deserializeAws_restJson1DescribeRouteCommandError = async (output, context
2463
2450
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2464
2451
  default:
2465
2452
  const parsedBody = parsedOutput.body;
2453
+ const $metadata = deserializeMetadata(output);
2454
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2466
2455
  response = new AppMeshServiceException_1.AppMeshServiceException({
2467
- name: parsedBody.code || parsedBody.Code || errorCode,
2456
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2468
2457
  $fault: "client",
2469
- $metadata: deserializeMetadata(output),
2458
+ $metadata,
2470
2459
  });
2471
2460
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2472
2461
  }
@@ -2490,8 +2479,7 @@ const deserializeAws_restJson1DescribeVirtualGatewayCommandError = async (output
2490
2479
  body: await parseBody(output.body, context),
2491
2480
  };
2492
2481
  let response;
2493
- let errorCode = "UnknownError";
2494
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2482
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2495
2483
  switch (errorCode) {
2496
2484
  case "BadRequestException":
2497
2485
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2513,10 +2501,12 @@ const deserializeAws_restJson1DescribeVirtualGatewayCommandError = async (output
2513
2501
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2514
2502
  default:
2515
2503
  const parsedBody = parsedOutput.body;
2504
+ const $metadata = deserializeMetadata(output);
2505
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2516
2506
  response = new AppMeshServiceException_1.AppMeshServiceException({
2517
- name: parsedBody.code || parsedBody.Code || errorCode,
2507
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2518
2508
  $fault: "client",
2519
- $metadata: deserializeMetadata(output),
2509
+ $metadata,
2520
2510
  });
2521
2511
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2522
2512
  }
@@ -2540,8 +2530,7 @@ const deserializeAws_restJson1DescribeVirtualNodeCommandError = async (output, c
2540
2530
  body: await parseBody(output.body, context),
2541
2531
  };
2542
2532
  let response;
2543
- let errorCode = "UnknownError";
2544
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2533
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2545
2534
  switch (errorCode) {
2546
2535
  case "BadRequestException":
2547
2536
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2563,10 +2552,12 @@ const deserializeAws_restJson1DescribeVirtualNodeCommandError = async (output, c
2563
2552
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2564
2553
  default:
2565
2554
  const parsedBody = parsedOutput.body;
2555
+ const $metadata = deserializeMetadata(output);
2556
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2566
2557
  response = new AppMeshServiceException_1.AppMeshServiceException({
2567
- name: parsedBody.code || parsedBody.Code || errorCode,
2558
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2568
2559
  $fault: "client",
2569
- $metadata: deserializeMetadata(output),
2560
+ $metadata,
2570
2561
  });
2571
2562
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2572
2563
  }
@@ -2590,8 +2581,7 @@ const deserializeAws_restJson1DescribeVirtualRouterCommandError = async (output,
2590
2581
  body: await parseBody(output.body, context),
2591
2582
  };
2592
2583
  let response;
2593
- let errorCode = "UnknownError";
2594
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2584
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2595
2585
  switch (errorCode) {
2596
2586
  case "BadRequestException":
2597
2587
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2613,10 +2603,12 @@ const deserializeAws_restJson1DescribeVirtualRouterCommandError = async (output,
2613
2603
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2614
2604
  default:
2615
2605
  const parsedBody = parsedOutput.body;
2606
+ const $metadata = deserializeMetadata(output);
2607
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2616
2608
  response = new AppMeshServiceException_1.AppMeshServiceException({
2617
- name: parsedBody.code || parsedBody.Code || errorCode,
2609
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2618
2610
  $fault: "client",
2619
- $metadata: deserializeMetadata(output),
2611
+ $metadata,
2620
2612
  });
2621
2613
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2622
2614
  }
@@ -2640,8 +2632,7 @@ const deserializeAws_restJson1DescribeVirtualServiceCommandError = async (output
2640
2632
  body: await parseBody(output.body, context),
2641
2633
  };
2642
2634
  let response;
2643
- let errorCode = "UnknownError";
2644
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2635
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2645
2636
  switch (errorCode) {
2646
2637
  case "BadRequestException":
2647
2638
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2663,10 +2654,12 @@ const deserializeAws_restJson1DescribeVirtualServiceCommandError = async (output
2663
2654
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2664
2655
  default:
2665
2656
  const parsedBody = parsedOutput.body;
2657
+ const $metadata = deserializeMetadata(output);
2658
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2666
2659
  response = new AppMeshServiceException_1.AppMeshServiceException({
2667
- name: parsedBody.code || parsedBody.Code || errorCode,
2660
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2668
2661
  $fault: "client",
2669
- $metadata: deserializeMetadata(output),
2662
+ $metadata,
2670
2663
  });
2671
2664
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2672
2665
  }
@@ -2696,8 +2689,7 @@ const deserializeAws_restJson1ListGatewayRoutesCommandError = async (output, con
2696
2689
  body: await parseBody(output.body, context),
2697
2690
  };
2698
2691
  let response;
2699
- let errorCode = "UnknownError";
2700
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2692
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2701
2693
  switch (errorCode) {
2702
2694
  case "BadRequestException":
2703
2695
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2719,10 +2711,12 @@ const deserializeAws_restJson1ListGatewayRoutesCommandError = async (output, con
2719
2711
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2720
2712
  default:
2721
2713
  const parsedBody = parsedOutput.body;
2714
+ const $metadata = deserializeMetadata(output);
2715
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2722
2716
  response = new AppMeshServiceException_1.AppMeshServiceException({
2723
- name: parsedBody.code || parsedBody.Code || errorCode,
2717
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2724
2718
  $fault: "client",
2725
- $metadata: deserializeMetadata(output),
2719
+ $metadata,
2726
2720
  });
2727
2721
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2728
2722
  }
@@ -2752,8 +2746,7 @@ const deserializeAws_restJson1ListMeshesCommandError = async (output, context) =
2752
2746
  body: await parseBody(output.body, context),
2753
2747
  };
2754
2748
  let response;
2755
- let errorCode = "UnknownError";
2756
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2749
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2757
2750
  switch (errorCode) {
2758
2751
  case "BadRequestException":
2759
2752
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2775,10 +2768,12 @@ const deserializeAws_restJson1ListMeshesCommandError = async (output, context) =
2775
2768
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2776
2769
  default:
2777
2770
  const parsedBody = parsedOutput.body;
2771
+ const $metadata = deserializeMetadata(output);
2772
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2778
2773
  response = new AppMeshServiceException_1.AppMeshServiceException({
2779
- name: parsedBody.code || parsedBody.Code || errorCode,
2774
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2780
2775
  $fault: "client",
2781
- $metadata: deserializeMetadata(output),
2776
+ $metadata,
2782
2777
  });
2783
2778
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2784
2779
  }
@@ -2808,8 +2803,7 @@ const deserializeAws_restJson1ListRoutesCommandError = async (output, context) =
2808
2803
  body: await parseBody(output.body, context),
2809
2804
  };
2810
2805
  let response;
2811
- let errorCode = "UnknownError";
2812
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2806
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2813
2807
  switch (errorCode) {
2814
2808
  case "BadRequestException":
2815
2809
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2831,10 +2825,12 @@ const deserializeAws_restJson1ListRoutesCommandError = async (output, context) =
2831
2825
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2832
2826
  default:
2833
2827
  const parsedBody = parsedOutput.body;
2828
+ const $metadata = deserializeMetadata(output);
2829
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2834
2830
  response = new AppMeshServiceException_1.AppMeshServiceException({
2835
- name: parsedBody.code || parsedBody.Code || errorCode,
2831
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2836
2832
  $fault: "client",
2837
- $metadata: deserializeMetadata(output),
2833
+ $metadata,
2838
2834
  });
2839
2835
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2840
2836
  }
@@ -2864,8 +2860,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2864
2860
  body: await parseBody(output.body, context),
2865
2861
  };
2866
2862
  let response;
2867
- let errorCode = "UnknownError";
2868
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2863
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2869
2864
  switch (errorCode) {
2870
2865
  case "BadRequestException":
2871
2866
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2887,10 +2882,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
2887
2882
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2888
2883
  default:
2889
2884
  const parsedBody = parsedOutput.body;
2885
+ const $metadata = deserializeMetadata(output);
2886
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2890
2887
  response = new AppMeshServiceException_1.AppMeshServiceException({
2891
- name: parsedBody.code || parsedBody.Code || errorCode,
2888
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2892
2889
  $fault: "client",
2893
- $metadata: deserializeMetadata(output),
2890
+ $metadata,
2894
2891
  });
2895
2892
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2896
2893
  }
@@ -2920,8 +2917,7 @@ const deserializeAws_restJson1ListVirtualGatewaysCommandError = async (output, c
2920
2917
  body: await parseBody(output.body, context),
2921
2918
  };
2922
2919
  let response;
2923
- let errorCode = "UnknownError";
2924
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2920
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2925
2921
  switch (errorCode) {
2926
2922
  case "BadRequestException":
2927
2923
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2943,10 +2939,12 @@ const deserializeAws_restJson1ListVirtualGatewaysCommandError = async (output, c
2943
2939
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2944
2940
  default:
2945
2941
  const parsedBody = parsedOutput.body;
2942
+ const $metadata = deserializeMetadata(output);
2943
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2946
2944
  response = new AppMeshServiceException_1.AppMeshServiceException({
2947
- name: parsedBody.code || parsedBody.Code || errorCode,
2945
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2948
2946
  $fault: "client",
2949
- $metadata: deserializeMetadata(output),
2947
+ $metadata,
2950
2948
  });
2951
2949
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2952
2950
  }
@@ -2976,8 +2974,7 @@ const deserializeAws_restJson1ListVirtualNodesCommandError = async (output, cont
2976
2974
  body: await parseBody(output.body, context),
2977
2975
  };
2978
2976
  let response;
2979
- let errorCode = "UnknownError";
2980
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2977
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2981
2978
  switch (errorCode) {
2982
2979
  case "BadRequestException":
2983
2980
  case "com.amazonaws.appmesh#BadRequestException":
@@ -2999,10 +2996,12 @@ const deserializeAws_restJson1ListVirtualNodesCommandError = async (output, cont
2999
2996
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3000
2997
  default:
3001
2998
  const parsedBody = parsedOutput.body;
2999
+ const $metadata = deserializeMetadata(output);
3000
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3002
3001
  response = new AppMeshServiceException_1.AppMeshServiceException({
3003
- name: parsedBody.code || parsedBody.Code || errorCode,
3002
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3004
3003
  $fault: "client",
3005
- $metadata: deserializeMetadata(output),
3004
+ $metadata,
3006
3005
  });
3007
3006
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3008
3007
  }
@@ -3032,8 +3031,7 @@ const deserializeAws_restJson1ListVirtualRoutersCommandError = async (output, co
3032
3031
  body: await parseBody(output.body, context),
3033
3032
  };
3034
3033
  let response;
3035
- let errorCode = "UnknownError";
3036
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3034
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3037
3035
  switch (errorCode) {
3038
3036
  case "BadRequestException":
3039
3037
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3055,10 +3053,12 @@ const deserializeAws_restJson1ListVirtualRoutersCommandError = async (output, co
3055
3053
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3056
3054
  default:
3057
3055
  const parsedBody = parsedOutput.body;
3056
+ const $metadata = deserializeMetadata(output);
3057
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3058
3058
  response = new AppMeshServiceException_1.AppMeshServiceException({
3059
- name: parsedBody.code || parsedBody.Code || errorCode,
3059
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3060
3060
  $fault: "client",
3061
- $metadata: deserializeMetadata(output),
3061
+ $metadata,
3062
3062
  });
3063
3063
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3064
3064
  }
@@ -3088,8 +3088,7 @@ const deserializeAws_restJson1ListVirtualServicesCommandError = async (output, c
3088
3088
  body: await parseBody(output.body, context),
3089
3089
  };
3090
3090
  let response;
3091
- let errorCode = "UnknownError";
3092
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3091
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3093
3092
  switch (errorCode) {
3094
3093
  case "BadRequestException":
3095
3094
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3111,10 +3110,12 @@ const deserializeAws_restJson1ListVirtualServicesCommandError = async (output, c
3111
3110
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3112
3111
  default:
3113
3112
  const parsedBody = parsedOutput.body;
3113
+ const $metadata = deserializeMetadata(output);
3114
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3114
3115
  response = new AppMeshServiceException_1.AppMeshServiceException({
3115
- name: parsedBody.code || parsedBody.Code || errorCode,
3116
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3116
3117
  $fault: "client",
3117
- $metadata: deserializeMetadata(output),
3118
+ $metadata,
3118
3119
  });
3119
3120
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3120
3121
  }
@@ -3136,8 +3137,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
3136
3137
  body: await parseBody(output.body, context),
3137
3138
  };
3138
3139
  let response;
3139
- let errorCode = "UnknownError";
3140
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3140
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3141
3141
  switch (errorCode) {
3142
3142
  case "BadRequestException":
3143
3143
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3162,10 +3162,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
3162
3162
  throw await deserializeAws_restJson1TooManyTagsExceptionResponse(parsedOutput, context);
3163
3163
  default:
3164
3164
  const parsedBody = parsedOutput.body;
3165
+ const $metadata = deserializeMetadata(output);
3166
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3165
3167
  response = new AppMeshServiceException_1.AppMeshServiceException({
3166
- name: parsedBody.code || parsedBody.Code || errorCode,
3168
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3167
3169
  $fault: "client",
3168
- $metadata: deserializeMetadata(output),
3170
+ $metadata,
3169
3171
  });
3170
3172
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3171
3173
  }
@@ -3187,8 +3189,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3187
3189
  body: await parseBody(output.body, context),
3188
3190
  };
3189
3191
  let response;
3190
- let errorCode = "UnknownError";
3191
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3192
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3192
3193
  switch (errorCode) {
3193
3194
  case "BadRequestException":
3194
3195
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3210,10 +3211,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
3210
3211
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3211
3212
  default:
3212
3213
  const parsedBody = parsedOutput.body;
3214
+ const $metadata = deserializeMetadata(output);
3215
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3213
3216
  response = new AppMeshServiceException_1.AppMeshServiceException({
3214
- name: parsedBody.code || parsedBody.Code || errorCode,
3217
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3215
3218
  $fault: "client",
3216
- $metadata: deserializeMetadata(output),
3219
+ $metadata,
3217
3220
  });
3218
3221
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3219
3222
  }
@@ -3237,8 +3240,7 @@ const deserializeAws_restJson1UpdateGatewayRouteCommandError = async (output, co
3237
3240
  body: await parseBody(output.body, context),
3238
3241
  };
3239
3242
  let response;
3240
- let errorCode = "UnknownError";
3241
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3243
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3242
3244
  switch (errorCode) {
3243
3245
  case "BadRequestException":
3244
3246
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3266,10 +3268,12 @@ const deserializeAws_restJson1UpdateGatewayRouteCommandError = async (output, co
3266
3268
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3267
3269
  default:
3268
3270
  const parsedBody = parsedOutput.body;
3271
+ const $metadata = deserializeMetadata(output);
3272
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3269
3273
  response = new AppMeshServiceException_1.AppMeshServiceException({
3270
- name: parsedBody.code || parsedBody.Code || errorCode,
3274
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3271
3275
  $fault: "client",
3272
- $metadata: deserializeMetadata(output),
3276
+ $metadata,
3273
3277
  });
3274
3278
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3275
3279
  }
@@ -3293,8 +3297,7 @@ const deserializeAws_restJson1UpdateMeshCommandError = async (output, context) =
3293
3297
  body: await parseBody(output.body, context),
3294
3298
  };
3295
3299
  let response;
3296
- let errorCode = "UnknownError";
3297
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3300
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3298
3301
  switch (errorCode) {
3299
3302
  case "BadRequestException":
3300
3303
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3319,10 +3322,12 @@ const deserializeAws_restJson1UpdateMeshCommandError = async (output, context) =
3319
3322
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3320
3323
  default:
3321
3324
  const parsedBody = parsedOutput.body;
3325
+ const $metadata = deserializeMetadata(output);
3326
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3322
3327
  response = new AppMeshServiceException_1.AppMeshServiceException({
3323
- name: parsedBody.code || parsedBody.Code || errorCode,
3328
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3324
3329
  $fault: "client",
3325
- $metadata: deserializeMetadata(output),
3330
+ $metadata,
3326
3331
  });
3327
3332
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3328
3333
  }
@@ -3346,8 +3351,7 @@ const deserializeAws_restJson1UpdateRouteCommandError = async (output, context)
3346
3351
  body: await parseBody(output.body, context),
3347
3352
  };
3348
3353
  let response;
3349
- let errorCode = "UnknownError";
3350
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3354
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3351
3355
  switch (errorCode) {
3352
3356
  case "BadRequestException":
3353
3357
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3375,10 +3379,12 @@ const deserializeAws_restJson1UpdateRouteCommandError = async (output, context)
3375
3379
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3376
3380
  default:
3377
3381
  const parsedBody = parsedOutput.body;
3382
+ const $metadata = deserializeMetadata(output);
3383
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3378
3384
  response = new AppMeshServiceException_1.AppMeshServiceException({
3379
- name: parsedBody.code || parsedBody.Code || errorCode,
3385
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3380
3386
  $fault: "client",
3381
- $metadata: deserializeMetadata(output),
3387
+ $metadata,
3382
3388
  });
3383
3389
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3384
3390
  }
@@ -3402,8 +3408,7 @@ const deserializeAws_restJson1UpdateVirtualGatewayCommandError = async (output,
3402
3408
  body: await parseBody(output.body, context),
3403
3409
  };
3404
3410
  let response;
3405
- let errorCode = "UnknownError";
3406
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3411
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3407
3412
  switch (errorCode) {
3408
3413
  case "BadRequestException":
3409
3414
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3431,10 +3436,12 @@ const deserializeAws_restJson1UpdateVirtualGatewayCommandError = async (output,
3431
3436
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3432
3437
  default:
3433
3438
  const parsedBody = parsedOutput.body;
3439
+ const $metadata = deserializeMetadata(output);
3440
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3434
3441
  response = new AppMeshServiceException_1.AppMeshServiceException({
3435
- name: parsedBody.code || parsedBody.Code || errorCode,
3442
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3436
3443
  $fault: "client",
3437
- $metadata: deserializeMetadata(output),
3444
+ $metadata,
3438
3445
  });
3439
3446
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3440
3447
  }
@@ -3458,8 +3465,7 @@ const deserializeAws_restJson1UpdateVirtualNodeCommandError = async (output, con
3458
3465
  body: await parseBody(output.body, context),
3459
3466
  };
3460
3467
  let response;
3461
- let errorCode = "UnknownError";
3462
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3468
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3463
3469
  switch (errorCode) {
3464
3470
  case "BadRequestException":
3465
3471
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3487,10 +3493,12 @@ const deserializeAws_restJson1UpdateVirtualNodeCommandError = async (output, con
3487
3493
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3488
3494
  default:
3489
3495
  const parsedBody = parsedOutput.body;
3496
+ const $metadata = deserializeMetadata(output);
3497
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3490
3498
  response = new AppMeshServiceException_1.AppMeshServiceException({
3491
- name: parsedBody.code || parsedBody.Code || errorCode,
3499
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3492
3500
  $fault: "client",
3493
- $metadata: deserializeMetadata(output),
3501
+ $metadata,
3494
3502
  });
3495
3503
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3496
3504
  }
@@ -3514,8 +3522,7 @@ const deserializeAws_restJson1UpdateVirtualRouterCommandError = async (output, c
3514
3522
  body: await parseBody(output.body, context),
3515
3523
  };
3516
3524
  let response;
3517
- let errorCode = "UnknownError";
3518
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3525
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3519
3526
  switch (errorCode) {
3520
3527
  case "BadRequestException":
3521
3528
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3543,10 +3550,12 @@ const deserializeAws_restJson1UpdateVirtualRouterCommandError = async (output, c
3543
3550
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3544
3551
  default:
3545
3552
  const parsedBody = parsedOutput.body;
3553
+ const $metadata = deserializeMetadata(output);
3554
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3546
3555
  response = new AppMeshServiceException_1.AppMeshServiceException({
3547
- name: parsedBody.code || parsedBody.Code || errorCode,
3556
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3548
3557
  $fault: "client",
3549
- $metadata: deserializeMetadata(output),
3558
+ $metadata,
3550
3559
  });
3551
3560
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3552
3561
  }
@@ -3570,8 +3579,7 @@ const deserializeAws_restJson1UpdateVirtualServiceCommandError = async (output,
3570
3579
  body: await parseBody(output.body, context),
3571
3580
  };
3572
3581
  let response;
3573
- let errorCode = "UnknownError";
3574
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3582
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3575
3583
  switch (errorCode) {
3576
3584
  case "BadRequestException":
3577
3585
  case "com.amazonaws.appmesh#BadRequestException":
@@ -3599,10 +3607,12 @@ const deserializeAws_restJson1UpdateVirtualServiceCommandError = async (output,
3599
3607
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3600
3608
  default:
3601
3609
  const parsedBody = parsedOutput.body;
3610
+ const $metadata = deserializeMetadata(output);
3611
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3602
3612
  response = new AppMeshServiceException_1.AppMeshServiceException({
3603
- name: parsedBody.code || parsedBody.Code || errorCode,
3613
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3604
3614
  $fault: "client",
3605
- $metadata: deserializeMetadata(output),
3615
+ $metadata,
3606
3616
  });
3607
3617
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3608
3618
  }
@@ -3735,8 +3745,8 @@ const serializeAws_restJson1AccessLog = (input, context) => {
3735
3745
  };
3736
3746
  const serializeAws_restJson1AwsCloudMapInstanceAttribute = (input, context) => {
3737
3747
  return {
3738
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
3739
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
3748
+ ...(input.key != null && { key: input.key }),
3749
+ ...(input.value != null && { value: input.value }),
3740
3750
  };
3741
3751
  };
3742
3752
  const serializeAws_restJson1AwsCloudMapInstanceAttributes = (input, context) => {
@@ -3751,13 +3761,12 @@ const serializeAws_restJson1AwsCloudMapInstanceAttributes = (input, context) =>
3751
3761
  };
3752
3762
  const serializeAws_restJson1AwsCloudMapServiceDiscovery = (input, context) => {
3753
3763
  return {
3754
- ...(input.attributes !== undefined &&
3755
- input.attributes !== null && {
3764
+ ...(input.attributes != null && {
3756
3765
  attributes: serializeAws_restJson1AwsCloudMapInstanceAttributes(input.attributes, context),
3757
3766
  }),
3758
- ...(input.ipPreference !== undefined && input.ipPreference !== null && { ipPreference: input.ipPreference }),
3759
- ...(input.namespaceName !== undefined && input.namespaceName !== null && { namespaceName: input.namespaceName }),
3760
- ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }),
3767
+ ...(input.ipPreference != null && { ipPreference: input.ipPreference }),
3768
+ ...(input.namespaceName != null && { namespaceName: input.namespaceName }),
3769
+ ...(input.serviceName != null && { serviceName: input.serviceName }),
3761
3770
  };
3762
3771
  };
3763
3772
  const serializeAws_restJson1Backend = (input, context) => {
@@ -3768,8 +3777,9 @@ const serializeAws_restJson1Backend = (input, context) => {
3768
3777
  };
3769
3778
  const serializeAws_restJson1BackendDefaults = (input, context) => {
3770
3779
  return {
3771
- ...(input.clientPolicy !== undefined &&
3772
- input.clientPolicy !== null && { clientPolicy: serializeAws_restJson1ClientPolicy(input.clientPolicy, context) }),
3780
+ ...(input.clientPolicy != null && {
3781
+ clientPolicy: serializeAws_restJson1ClientPolicy(input.clientPolicy, context),
3782
+ }),
3773
3783
  };
3774
3784
  };
3775
3785
  const serializeAws_restJson1Backends = (input, context) => {
@@ -3794,21 +3804,17 @@ const serializeAws_restJson1CertificateAuthorityArns = (input, context) => {
3794
3804
  };
3795
3805
  const serializeAws_restJson1ClientPolicy = (input, context) => {
3796
3806
  return {
3797
- ...(input.tls !== undefined &&
3798
- input.tls !== null && { tls: serializeAws_restJson1ClientPolicyTls(input.tls, context) }),
3807
+ ...(input.tls != null && { tls: serializeAws_restJson1ClientPolicyTls(input.tls, context) }),
3799
3808
  };
3800
3809
  };
3801
3810
  const serializeAws_restJson1ClientPolicyTls = (input, context) => {
3802
3811
  return {
3803
- ...(input.certificate !== undefined &&
3804
- input.certificate !== null && {
3812
+ ...(input.certificate != null && {
3805
3813
  certificate: serializeAws_restJson1ClientTlsCertificate(input.certificate, context),
3806
3814
  }),
3807
- ...(input.enforce !== undefined && input.enforce !== null && { enforce: input.enforce }),
3808
- ...(input.ports !== undefined &&
3809
- input.ports !== null && { ports: serializeAws_restJson1PortSet(input.ports, context) }),
3810
- ...(input.validation !== undefined &&
3811
- input.validation !== null && {
3815
+ ...(input.enforce != null && { enforce: input.enforce }),
3816
+ ...(input.ports != null && { ports: serializeAws_restJson1PortSet(input.ports, context) }),
3817
+ ...(input.validation != null && {
3812
3818
  validation: serializeAws_restJson1TlsValidationContext(input.validation, context),
3813
3819
  }),
3814
3820
  };
@@ -3822,99 +3828,86 @@ const serializeAws_restJson1ClientTlsCertificate = (input, context) => {
3822
3828
  };
3823
3829
  const serializeAws_restJson1DnsServiceDiscovery = (input, context) => {
3824
3830
  return {
3825
- ...(input.hostname !== undefined && input.hostname !== null && { hostname: input.hostname }),
3826
- ...(input.ipPreference !== undefined && input.ipPreference !== null && { ipPreference: input.ipPreference }),
3827
- ...(input.responseType !== undefined && input.responseType !== null && { responseType: input.responseType }),
3831
+ ...(input.hostname != null && { hostname: input.hostname }),
3832
+ ...(input.ipPreference != null && { ipPreference: input.ipPreference }),
3833
+ ...(input.responseType != null && { responseType: input.responseType }),
3828
3834
  };
3829
3835
  };
3830
3836
  const serializeAws_restJson1Duration = (input, context) => {
3831
3837
  return {
3832
- ...(input.unit !== undefined && input.unit !== null && { unit: input.unit }),
3833
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
3838
+ ...(input.unit != null && { unit: input.unit }),
3839
+ ...(input.value != null && { value: input.value }),
3834
3840
  };
3835
3841
  };
3836
3842
  const serializeAws_restJson1EgressFilter = (input, context) => {
3837
3843
  return {
3838
- ...(input.type !== undefined && input.type !== null && { type: input.type }),
3844
+ ...(input.type != null && { type: input.type }),
3839
3845
  };
3840
3846
  };
3841
3847
  const serializeAws_restJson1FileAccessLog = (input, context) => {
3842
3848
  return {
3843
- ...(input.path !== undefined && input.path !== null && { path: input.path }),
3849
+ ...(input.path != null && { path: input.path }),
3844
3850
  };
3845
3851
  };
3846
3852
  const serializeAws_restJson1GatewayRouteHostnameMatch = (input, context) => {
3847
3853
  return {
3848
- ...(input.exact !== undefined && input.exact !== null && { exact: input.exact }),
3849
- ...(input.suffix !== undefined && input.suffix !== null && { suffix: input.suffix }),
3854
+ ...(input.exact != null && { exact: input.exact }),
3855
+ ...(input.suffix != null && { suffix: input.suffix }),
3850
3856
  };
3851
3857
  };
3852
3858
  const serializeAws_restJson1GatewayRouteHostnameRewrite = (input, context) => {
3853
3859
  return {
3854
- ...(input.defaultTargetHostname !== undefined &&
3855
- input.defaultTargetHostname !== null && { defaultTargetHostname: input.defaultTargetHostname }),
3860
+ ...(input.defaultTargetHostname != null && { defaultTargetHostname: input.defaultTargetHostname }),
3856
3861
  };
3857
3862
  };
3858
3863
  const serializeAws_restJson1GatewayRouteSpec = (input, context) => {
3859
3864
  return {
3860
- ...(input.grpcRoute !== undefined &&
3861
- input.grpcRoute !== null && { grpcRoute: serializeAws_restJson1GrpcGatewayRoute(input.grpcRoute, context) }),
3862
- ...(input.http2Route !== undefined &&
3863
- input.http2Route !== null && { http2Route: serializeAws_restJson1HttpGatewayRoute(input.http2Route, context) }),
3864
- ...(input.httpRoute !== undefined &&
3865
- input.httpRoute !== null && { httpRoute: serializeAws_restJson1HttpGatewayRoute(input.httpRoute, context) }),
3866
- ...(input.priority !== undefined && input.priority !== null && { priority: input.priority }),
3865
+ ...(input.grpcRoute != null && { grpcRoute: serializeAws_restJson1GrpcGatewayRoute(input.grpcRoute, context) }),
3866
+ ...(input.http2Route != null && { http2Route: serializeAws_restJson1HttpGatewayRoute(input.http2Route, context) }),
3867
+ ...(input.httpRoute != null && { httpRoute: serializeAws_restJson1HttpGatewayRoute(input.httpRoute, context) }),
3868
+ ...(input.priority != null && { priority: input.priority }),
3867
3869
  };
3868
3870
  };
3869
3871
  const serializeAws_restJson1GatewayRouteTarget = (input, context) => {
3870
3872
  return {
3871
- ...(input.virtualService !== undefined &&
3872
- input.virtualService !== null && {
3873
+ ...(input.virtualService != null && {
3873
3874
  virtualService: serializeAws_restJson1GatewayRouteVirtualService(input.virtualService, context),
3874
3875
  }),
3875
3876
  };
3876
3877
  };
3877
3878
  const serializeAws_restJson1GatewayRouteVirtualService = (input, context) => {
3878
3879
  return {
3879
- ...(input.virtualServiceName !== undefined &&
3880
- input.virtualServiceName !== null && { virtualServiceName: input.virtualServiceName }),
3880
+ ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }),
3881
3881
  };
3882
3882
  };
3883
3883
  const serializeAws_restJson1GrpcGatewayRoute = (input, context) => {
3884
3884
  return {
3885
- ...(input.action !== undefined &&
3886
- input.action !== null && { action: serializeAws_restJson1GrpcGatewayRouteAction(input.action, context) }),
3887
- ...(input.match !== undefined &&
3888
- input.match !== null && { match: serializeAws_restJson1GrpcGatewayRouteMatch(input.match, context) }),
3885
+ ...(input.action != null && { action: serializeAws_restJson1GrpcGatewayRouteAction(input.action, context) }),
3886
+ ...(input.match != null && { match: serializeAws_restJson1GrpcGatewayRouteMatch(input.match, context) }),
3889
3887
  };
3890
3888
  };
3891
3889
  const serializeAws_restJson1GrpcGatewayRouteAction = (input, context) => {
3892
3890
  return {
3893
- ...(input.rewrite !== undefined &&
3894
- input.rewrite !== null && { rewrite: serializeAws_restJson1GrpcGatewayRouteRewrite(input.rewrite, context) }),
3895
- ...(input.target !== undefined &&
3896
- input.target !== null && { target: serializeAws_restJson1GatewayRouteTarget(input.target, context) }),
3891
+ ...(input.rewrite != null && { rewrite: serializeAws_restJson1GrpcGatewayRouteRewrite(input.rewrite, context) }),
3892
+ ...(input.target != null && { target: serializeAws_restJson1GatewayRouteTarget(input.target, context) }),
3897
3893
  };
3898
3894
  };
3899
3895
  const serializeAws_restJson1GrpcGatewayRouteMatch = (input, context) => {
3900
3896
  return {
3901
- ...(input.hostname !== undefined &&
3902
- input.hostname !== null && {
3897
+ ...(input.hostname != null && {
3903
3898
  hostname: serializeAws_restJson1GatewayRouteHostnameMatch(input.hostname, context),
3904
3899
  }),
3905
- ...(input.metadata !== undefined &&
3906
- input.metadata !== null && {
3900
+ ...(input.metadata != null && {
3907
3901
  metadata: serializeAws_restJson1GrpcGatewayRouteMetadataList(input.metadata, context),
3908
3902
  }),
3909
- ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }),
3903
+ ...(input.serviceName != null && { serviceName: input.serviceName }),
3910
3904
  };
3911
3905
  };
3912
3906
  const serializeAws_restJson1GrpcGatewayRouteMetadata = (input, context) => {
3913
3907
  return {
3914
- ...(input.invert !== undefined && input.invert !== null && { invert: input.invert }),
3915
- ...(input.match !== undefined &&
3916
- input.match !== null && { match: serializeAws_restJson1GrpcMetadataMatchMethod(input.match, context) }),
3917
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3908
+ ...(input.invert != null && { invert: input.invert }),
3909
+ ...(input.match != null && { match: serializeAws_restJson1GrpcMetadataMatchMethod(input.match, context) }),
3910
+ ...(input.name != null && { name: input.name }),
3918
3911
  };
3919
3912
  };
3920
3913
  const serializeAws_restJson1GrpcGatewayRouteMetadataList = (input, context) => {
@@ -3929,8 +3922,7 @@ const serializeAws_restJson1GrpcGatewayRouteMetadataList = (input, context) => {
3929
3922
  };
3930
3923
  const serializeAws_restJson1GrpcGatewayRouteRewrite = (input, context) => {
3931
3924
  return {
3932
- ...(input.hostname !== undefined &&
3933
- input.hostname !== null && {
3925
+ ...(input.hostname != null && {
3934
3926
  hostname: serializeAws_restJson1GatewayRouteHostnameRewrite(input.hostname, context),
3935
3927
  }),
3936
3928
  };
@@ -3947,21 +3939,17 @@ const serializeAws_restJson1GrpcMetadataMatchMethod = (input, context) => {
3947
3939
  };
3948
3940
  const serializeAws_restJson1GrpcRetryPolicy = (input, context) => {
3949
3941
  return {
3950
- ...(input.grpcRetryEvents !== undefined &&
3951
- input.grpcRetryEvents !== null && {
3942
+ ...(input.grpcRetryEvents != null && {
3952
3943
  grpcRetryEvents: serializeAws_restJson1GrpcRetryPolicyEvents(input.grpcRetryEvents, context),
3953
3944
  }),
3954
- ...(input.httpRetryEvents !== undefined &&
3955
- input.httpRetryEvents !== null && {
3945
+ ...(input.httpRetryEvents != null && {
3956
3946
  httpRetryEvents: serializeAws_restJson1HttpRetryPolicyEvents(input.httpRetryEvents, context),
3957
3947
  }),
3958
- ...(input.maxRetries !== undefined && input.maxRetries !== null && { maxRetries: input.maxRetries }),
3959
- ...(input.perRetryTimeout !== undefined &&
3960
- input.perRetryTimeout !== null && {
3948
+ ...(input.maxRetries != null && { maxRetries: input.maxRetries }),
3949
+ ...(input.perRetryTimeout != null && {
3961
3950
  perRetryTimeout: serializeAws_restJson1Duration(input.perRetryTimeout, context),
3962
3951
  }),
3963
- ...(input.tcpRetryEvents !== undefined &&
3964
- input.tcpRetryEvents !== null && {
3952
+ ...(input.tcpRetryEvents != null && {
3965
3953
  tcpRetryEvents: serializeAws_restJson1TcpRetryPolicyEvents(input.tcpRetryEvents, context),
3966
3954
  }),
3967
3955
  };
@@ -3978,38 +3966,33 @@ const serializeAws_restJson1GrpcRetryPolicyEvents = (input, context) => {
3978
3966
  };
3979
3967
  const serializeAws_restJson1GrpcRoute = (input, context) => {
3980
3968
  return {
3981
- ...(input.action !== undefined &&
3982
- input.action !== null && { action: serializeAws_restJson1GrpcRouteAction(input.action, context) }),
3983
- ...(input.match !== undefined &&
3984
- input.match !== null && { match: serializeAws_restJson1GrpcRouteMatch(input.match, context) }),
3985
- ...(input.retryPolicy !== undefined &&
3986
- input.retryPolicy !== null && { retryPolicy: serializeAws_restJson1GrpcRetryPolicy(input.retryPolicy, context) }),
3987
- ...(input.timeout !== undefined &&
3988
- input.timeout !== null && { timeout: serializeAws_restJson1GrpcTimeout(input.timeout, context) }),
3969
+ ...(input.action != null && { action: serializeAws_restJson1GrpcRouteAction(input.action, context) }),
3970
+ ...(input.match != null && { match: serializeAws_restJson1GrpcRouteMatch(input.match, context) }),
3971
+ ...(input.retryPolicy != null && {
3972
+ retryPolicy: serializeAws_restJson1GrpcRetryPolicy(input.retryPolicy, context),
3973
+ }),
3974
+ ...(input.timeout != null && { timeout: serializeAws_restJson1GrpcTimeout(input.timeout, context) }),
3989
3975
  };
3990
3976
  };
3991
3977
  const serializeAws_restJson1GrpcRouteAction = (input, context) => {
3992
3978
  return {
3993
- ...(input.weightedTargets !== undefined &&
3994
- input.weightedTargets !== null && {
3979
+ ...(input.weightedTargets != null && {
3995
3980
  weightedTargets: serializeAws_restJson1WeightedTargets(input.weightedTargets, context),
3996
3981
  }),
3997
3982
  };
3998
3983
  };
3999
3984
  const serializeAws_restJson1GrpcRouteMatch = (input, context) => {
4000
3985
  return {
4001
- ...(input.metadata !== undefined &&
4002
- input.metadata !== null && { metadata: serializeAws_restJson1GrpcRouteMetadataList(input.metadata, context) }),
4003
- ...(input.methodName !== undefined && input.methodName !== null && { methodName: input.methodName }),
4004
- ...(input.serviceName !== undefined && input.serviceName !== null && { serviceName: input.serviceName }),
3986
+ ...(input.metadata != null && { metadata: serializeAws_restJson1GrpcRouteMetadataList(input.metadata, context) }),
3987
+ ...(input.methodName != null && { methodName: input.methodName }),
3988
+ ...(input.serviceName != null && { serviceName: input.serviceName }),
4005
3989
  };
4006
3990
  };
4007
3991
  const serializeAws_restJson1GrpcRouteMetadata = (input, context) => {
4008
3992
  return {
4009
- ...(input.invert !== undefined && input.invert !== null && { invert: input.invert }),
4010
- ...(input.match !== undefined &&
4011
- input.match !== null && { match: serializeAws_restJson1GrpcRouteMetadataMatchMethod(input.match, context) }),
4012
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
3993
+ ...(input.invert != null && { invert: input.invert }),
3994
+ ...(input.match != null && { match: serializeAws_restJson1GrpcRouteMetadataMatchMethod(input.match, context) }),
3995
+ ...(input.name != null && { name: input.name }),
4013
3996
  };
4014
3997
  };
4015
3998
  const serializeAws_restJson1GrpcRouteMetadataList = (input, context) => {
@@ -4034,10 +4017,8 @@ const serializeAws_restJson1GrpcRouteMetadataMatchMethod = (input, context) => {
4034
4017
  };
4035
4018
  const serializeAws_restJson1GrpcTimeout = (input, context) => {
4036
4019
  return {
4037
- ...(input.idle !== undefined &&
4038
- input.idle !== null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4039
- ...(input.perRequest !== undefined &&
4040
- input.perRequest !== null && { perRequest: serializeAws_restJson1Duration(input.perRequest, context) }),
4020
+ ...(input.idle != null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4021
+ ...(input.perRequest != null && { perRequest: serializeAws_restJson1Duration(input.perRequest, context) }),
4041
4022
  };
4042
4023
  };
4043
4024
  const serializeAws_restJson1HeaderMatchMethod = (input, context) => {
@@ -4052,40 +4033,32 @@ const serializeAws_restJson1HeaderMatchMethod = (input, context) => {
4052
4033
  };
4053
4034
  const serializeAws_restJson1HealthCheckPolicy = (input, context) => {
4054
4035
  return {
4055
- ...(input.healthyThreshold !== undefined &&
4056
- input.healthyThreshold !== null && { healthyThreshold: input.healthyThreshold }),
4057
- ...(input.intervalMillis !== undefined &&
4058
- input.intervalMillis !== null && { intervalMillis: input.intervalMillis }),
4059
- ...(input.path !== undefined && input.path !== null && { path: input.path }),
4060
- ...(input.port !== undefined && input.port !== null && { port: input.port }),
4061
- ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),
4062
- ...(input.timeoutMillis !== undefined && input.timeoutMillis !== null && { timeoutMillis: input.timeoutMillis }),
4063
- ...(input.unhealthyThreshold !== undefined &&
4064
- input.unhealthyThreshold !== null && { unhealthyThreshold: input.unhealthyThreshold }),
4036
+ ...(input.healthyThreshold != null && { healthyThreshold: input.healthyThreshold }),
4037
+ ...(input.intervalMillis != null && { intervalMillis: input.intervalMillis }),
4038
+ ...(input.path != null && { path: input.path }),
4039
+ ...(input.port != null && { port: input.port }),
4040
+ ...(input.protocol != null && { protocol: input.protocol }),
4041
+ ...(input.timeoutMillis != null && { timeoutMillis: input.timeoutMillis }),
4042
+ ...(input.unhealthyThreshold != null && { unhealthyThreshold: input.unhealthyThreshold }),
4065
4043
  };
4066
4044
  };
4067
4045
  const serializeAws_restJson1HttpGatewayRoute = (input, context) => {
4068
4046
  return {
4069
- ...(input.action !== undefined &&
4070
- input.action !== null && { action: serializeAws_restJson1HttpGatewayRouteAction(input.action, context) }),
4071
- ...(input.match !== undefined &&
4072
- input.match !== null && { match: serializeAws_restJson1HttpGatewayRouteMatch(input.match, context) }),
4047
+ ...(input.action != null && { action: serializeAws_restJson1HttpGatewayRouteAction(input.action, context) }),
4048
+ ...(input.match != null && { match: serializeAws_restJson1HttpGatewayRouteMatch(input.match, context) }),
4073
4049
  };
4074
4050
  };
4075
4051
  const serializeAws_restJson1HttpGatewayRouteAction = (input, context) => {
4076
4052
  return {
4077
- ...(input.rewrite !== undefined &&
4078
- input.rewrite !== null && { rewrite: serializeAws_restJson1HttpGatewayRouteRewrite(input.rewrite, context) }),
4079
- ...(input.target !== undefined &&
4080
- input.target !== null && { target: serializeAws_restJson1GatewayRouteTarget(input.target, context) }),
4053
+ ...(input.rewrite != null && { rewrite: serializeAws_restJson1HttpGatewayRouteRewrite(input.rewrite, context) }),
4054
+ ...(input.target != null && { target: serializeAws_restJson1GatewayRouteTarget(input.target, context) }),
4081
4055
  };
4082
4056
  };
4083
4057
  const serializeAws_restJson1HttpGatewayRouteHeader = (input, context) => {
4084
4058
  return {
4085
- ...(input.invert !== undefined && input.invert !== null && { invert: input.invert }),
4086
- ...(input.match !== undefined &&
4087
- input.match !== null && { match: serializeAws_restJson1HeaderMatchMethod(input.match, context) }),
4088
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4059
+ ...(input.invert != null && { invert: input.invert }),
4060
+ ...(input.match != null && { match: serializeAws_restJson1HeaderMatchMethod(input.match, context) }),
4061
+ ...(input.name != null && { name: input.name }),
4089
4062
  };
4090
4063
  };
4091
4064
  const serializeAws_restJson1HttpGatewayRouteHeaders = (input, context) => {
@@ -4100,56 +4073,48 @@ const serializeAws_restJson1HttpGatewayRouteHeaders = (input, context) => {
4100
4073
  };
4101
4074
  const serializeAws_restJson1HttpGatewayRouteMatch = (input, context) => {
4102
4075
  return {
4103
- ...(input.headers !== undefined &&
4104
- input.headers !== null && { headers: serializeAws_restJson1HttpGatewayRouteHeaders(input.headers, context) }),
4105
- ...(input.hostname !== undefined &&
4106
- input.hostname !== null && {
4076
+ ...(input.headers != null && { headers: serializeAws_restJson1HttpGatewayRouteHeaders(input.headers, context) }),
4077
+ ...(input.hostname != null && {
4107
4078
  hostname: serializeAws_restJson1GatewayRouteHostnameMatch(input.hostname, context),
4108
4079
  }),
4109
- ...(input.method !== undefined && input.method !== null && { method: input.method }),
4110
- ...(input.path !== undefined &&
4111
- input.path !== null && { path: serializeAws_restJson1HttpPathMatch(input.path, context) }),
4112
- ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
4113
- ...(input.queryParameters !== undefined &&
4114
- input.queryParameters !== null && {
4080
+ ...(input.method != null && { method: input.method }),
4081
+ ...(input.path != null && { path: serializeAws_restJson1HttpPathMatch(input.path, context) }),
4082
+ ...(input.prefix != null && { prefix: input.prefix }),
4083
+ ...(input.queryParameters != null && {
4115
4084
  queryParameters: serializeAws_restJson1HttpQueryParameters(input.queryParameters, context),
4116
4085
  }),
4117
4086
  };
4118
4087
  };
4119
4088
  const serializeAws_restJson1HttpGatewayRoutePathRewrite = (input, context) => {
4120
4089
  return {
4121
- ...(input.exact !== undefined && input.exact !== null && { exact: input.exact }),
4090
+ ...(input.exact != null && { exact: input.exact }),
4122
4091
  };
4123
4092
  };
4124
4093
  const serializeAws_restJson1HttpGatewayRoutePrefixRewrite = (input, context) => {
4125
4094
  return {
4126
- ...(input.defaultPrefix !== undefined && input.defaultPrefix !== null && { defaultPrefix: input.defaultPrefix }),
4127
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
4095
+ ...(input.defaultPrefix != null && { defaultPrefix: input.defaultPrefix }),
4096
+ ...(input.value != null && { value: input.value }),
4128
4097
  };
4129
4098
  };
4130
4099
  const serializeAws_restJson1HttpGatewayRouteRewrite = (input, context) => {
4131
4100
  return {
4132
- ...(input.hostname !== undefined &&
4133
- input.hostname !== null && {
4101
+ ...(input.hostname != null && {
4134
4102
  hostname: serializeAws_restJson1GatewayRouteHostnameRewrite(input.hostname, context),
4135
4103
  }),
4136
- ...(input.path !== undefined &&
4137
- input.path !== null && { path: serializeAws_restJson1HttpGatewayRoutePathRewrite(input.path, context) }),
4138
- ...(input.prefix !== undefined &&
4139
- input.prefix !== null && { prefix: serializeAws_restJson1HttpGatewayRoutePrefixRewrite(input.prefix, context) }),
4104
+ ...(input.path != null && { path: serializeAws_restJson1HttpGatewayRoutePathRewrite(input.path, context) }),
4105
+ ...(input.prefix != null && { prefix: serializeAws_restJson1HttpGatewayRoutePrefixRewrite(input.prefix, context) }),
4140
4106
  };
4141
4107
  };
4142
4108
  const serializeAws_restJson1HttpPathMatch = (input, context) => {
4143
4109
  return {
4144
- ...(input.exact !== undefined && input.exact !== null && { exact: input.exact }),
4145
- ...(input.regex !== undefined && input.regex !== null && { regex: input.regex }),
4110
+ ...(input.exact != null && { exact: input.exact }),
4111
+ ...(input.regex != null && { regex: input.regex }),
4146
4112
  };
4147
4113
  };
4148
4114
  const serializeAws_restJson1HttpQueryParameter = (input, context) => {
4149
4115
  return {
4150
- ...(input.match !== undefined &&
4151
- input.match !== null && { match: serializeAws_restJson1QueryParameterMatch(input.match, context) }),
4152
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4116
+ ...(input.match != null && { match: serializeAws_restJson1QueryParameterMatch(input.match, context) }),
4117
+ ...(input.name != null && { name: input.name }),
4153
4118
  };
4154
4119
  };
4155
4120
  const serializeAws_restJson1HttpQueryParameters = (input, context) => {
@@ -4164,17 +4129,14 @@ const serializeAws_restJson1HttpQueryParameters = (input, context) => {
4164
4129
  };
4165
4130
  const serializeAws_restJson1HttpRetryPolicy = (input, context) => {
4166
4131
  return {
4167
- ...(input.httpRetryEvents !== undefined &&
4168
- input.httpRetryEvents !== null && {
4132
+ ...(input.httpRetryEvents != null && {
4169
4133
  httpRetryEvents: serializeAws_restJson1HttpRetryPolicyEvents(input.httpRetryEvents, context),
4170
4134
  }),
4171
- ...(input.maxRetries !== undefined && input.maxRetries !== null && { maxRetries: input.maxRetries }),
4172
- ...(input.perRetryTimeout !== undefined &&
4173
- input.perRetryTimeout !== null && {
4135
+ ...(input.maxRetries != null && { maxRetries: input.maxRetries }),
4136
+ ...(input.perRetryTimeout != null && {
4174
4137
  perRetryTimeout: serializeAws_restJson1Duration(input.perRetryTimeout, context),
4175
4138
  }),
4176
- ...(input.tcpRetryEvents !== undefined &&
4177
- input.tcpRetryEvents !== null && {
4139
+ ...(input.tcpRetryEvents != null && {
4178
4140
  tcpRetryEvents: serializeAws_restJson1TcpRetryPolicyEvents(input.tcpRetryEvents, context),
4179
4141
  }),
4180
4142
  };
@@ -4191,30 +4153,26 @@ const serializeAws_restJson1HttpRetryPolicyEvents = (input, context) => {
4191
4153
  };
4192
4154
  const serializeAws_restJson1HttpRoute = (input, context) => {
4193
4155
  return {
4194
- ...(input.action !== undefined &&
4195
- input.action !== null && { action: serializeAws_restJson1HttpRouteAction(input.action, context) }),
4196
- ...(input.match !== undefined &&
4197
- input.match !== null && { match: serializeAws_restJson1HttpRouteMatch(input.match, context) }),
4198
- ...(input.retryPolicy !== undefined &&
4199
- input.retryPolicy !== null && { retryPolicy: serializeAws_restJson1HttpRetryPolicy(input.retryPolicy, context) }),
4200
- ...(input.timeout !== undefined &&
4201
- input.timeout !== null && { timeout: serializeAws_restJson1HttpTimeout(input.timeout, context) }),
4156
+ ...(input.action != null && { action: serializeAws_restJson1HttpRouteAction(input.action, context) }),
4157
+ ...(input.match != null && { match: serializeAws_restJson1HttpRouteMatch(input.match, context) }),
4158
+ ...(input.retryPolicy != null && {
4159
+ retryPolicy: serializeAws_restJson1HttpRetryPolicy(input.retryPolicy, context),
4160
+ }),
4161
+ ...(input.timeout != null && { timeout: serializeAws_restJson1HttpTimeout(input.timeout, context) }),
4202
4162
  };
4203
4163
  };
4204
4164
  const serializeAws_restJson1HttpRouteAction = (input, context) => {
4205
4165
  return {
4206
- ...(input.weightedTargets !== undefined &&
4207
- input.weightedTargets !== null && {
4166
+ ...(input.weightedTargets != null && {
4208
4167
  weightedTargets: serializeAws_restJson1WeightedTargets(input.weightedTargets, context),
4209
4168
  }),
4210
4169
  };
4211
4170
  };
4212
4171
  const serializeAws_restJson1HttpRouteHeader = (input, context) => {
4213
4172
  return {
4214
- ...(input.invert !== undefined && input.invert !== null && { invert: input.invert }),
4215
- ...(input.match !== undefined &&
4216
- input.match !== null && { match: serializeAws_restJson1HeaderMatchMethod(input.match, context) }),
4217
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
4173
+ ...(input.invert != null && { invert: input.invert }),
4174
+ ...(input.match != null && { match: serializeAws_restJson1HeaderMatchMethod(input.match, context) }),
4175
+ ...(input.name != null && { name: input.name }),
4218
4176
  };
4219
4177
  };
4220
4178
  const serializeAws_restJson1HttpRouteHeaders = (input, context) => {
@@ -4229,47 +4187,36 @@ const serializeAws_restJson1HttpRouteHeaders = (input, context) => {
4229
4187
  };
4230
4188
  const serializeAws_restJson1HttpRouteMatch = (input, context) => {
4231
4189
  return {
4232
- ...(input.headers !== undefined &&
4233
- input.headers !== null && { headers: serializeAws_restJson1HttpRouteHeaders(input.headers, context) }),
4234
- ...(input.method !== undefined && input.method !== null && { method: input.method }),
4235
- ...(input.path !== undefined &&
4236
- input.path !== null && { path: serializeAws_restJson1HttpPathMatch(input.path, context) }),
4237
- ...(input.prefix !== undefined && input.prefix !== null && { prefix: input.prefix }),
4238
- ...(input.queryParameters !== undefined &&
4239
- input.queryParameters !== null && {
4190
+ ...(input.headers != null && { headers: serializeAws_restJson1HttpRouteHeaders(input.headers, context) }),
4191
+ ...(input.method != null && { method: input.method }),
4192
+ ...(input.path != null && { path: serializeAws_restJson1HttpPathMatch(input.path, context) }),
4193
+ ...(input.prefix != null && { prefix: input.prefix }),
4194
+ ...(input.queryParameters != null && {
4240
4195
  queryParameters: serializeAws_restJson1HttpQueryParameters(input.queryParameters, context),
4241
4196
  }),
4242
- ...(input.scheme !== undefined && input.scheme !== null && { scheme: input.scheme }),
4197
+ ...(input.scheme != null && { scheme: input.scheme }),
4243
4198
  };
4244
4199
  };
4245
4200
  const serializeAws_restJson1HttpTimeout = (input, context) => {
4246
4201
  return {
4247
- ...(input.idle !== undefined &&
4248
- input.idle !== null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4249
- ...(input.perRequest !== undefined &&
4250
- input.perRequest !== null && { perRequest: serializeAws_restJson1Duration(input.perRequest, context) }),
4202
+ ...(input.idle != null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4203
+ ...(input.perRequest != null && { perRequest: serializeAws_restJson1Duration(input.perRequest, context) }),
4251
4204
  };
4252
4205
  };
4253
4206
  const serializeAws_restJson1Listener = (input, context) => {
4254
4207
  return {
4255
- ...(input.connectionPool !== undefined &&
4256
- input.connectionPool !== null && {
4208
+ ...(input.connectionPool != null && {
4257
4209
  connectionPool: serializeAws_restJson1VirtualNodeConnectionPool(input.connectionPool, context),
4258
4210
  }),
4259
- ...(input.healthCheck !== undefined &&
4260
- input.healthCheck !== null && {
4211
+ ...(input.healthCheck != null && {
4261
4212
  healthCheck: serializeAws_restJson1HealthCheckPolicy(input.healthCheck, context),
4262
4213
  }),
4263
- ...(input.outlierDetection !== undefined &&
4264
- input.outlierDetection !== null && {
4214
+ ...(input.outlierDetection != null && {
4265
4215
  outlierDetection: serializeAws_restJson1OutlierDetection(input.outlierDetection, context),
4266
4216
  }),
4267
- ...(input.portMapping !== undefined &&
4268
- input.portMapping !== null && { portMapping: serializeAws_restJson1PortMapping(input.portMapping, context) }),
4269
- ...(input.timeout !== undefined &&
4270
- input.timeout !== null && { timeout: serializeAws_restJson1ListenerTimeout(input.timeout, context) }),
4271
- ...(input.tls !== undefined &&
4272
- input.tls !== null && { tls: serializeAws_restJson1ListenerTls(input.tls, context) }),
4217
+ ...(input.portMapping != null && { portMapping: serializeAws_restJson1PortMapping(input.portMapping, context) }),
4218
+ ...(input.timeout != null && { timeout: serializeAws_restJson1ListenerTimeout(input.timeout, context) }),
4219
+ ...(input.tls != null && { tls: serializeAws_restJson1ListenerTls(input.tls, context) }),
4273
4220
  };
4274
4221
  };
4275
4222
  const serializeAws_restJson1Listeners = (input, context) => {
@@ -4293,21 +4240,18 @@ const serializeAws_restJson1ListenerTimeout = (input, context) => {
4293
4240
  };
4294
4241
  const serializeAws_restJson1ListenerTls = (input, context) => {
4295
4242
  return {
4296
- ...(input.certificate !== undefined &&
4297
- input.certificate !== null && {
4243
+ ...(input.certificate != null && {
4298
4244
  certificate: serializeAws_restJson1ListenerTlsCertificate(input.certificate, context),
4299
4245
  }),
4300
- ...(input.mode !== undefined && input.mode !== null && { mode: input.mode }),
4301
- ...(input.validation !== undefined &&
4302
- input.validation !== null && {
4246
+ ...(input.mode != null && { mode: input.mode }),
4247
+ ...(input.validation != null && {
4303
4248
  validation: serializeAws_restJson1ListenerTlsValidationContext(input.validation, context),
4304
4249
  }),
4305
4250
  };
4306
4251
  };
4307
4252
  const serializeAws_restJson1ListenerTlsAcmCertificate = (input, context) => {
4308
4253
  return {
4309
- ...(input.certificateArn !== undefined &&
4310
- input.certificateArn !== null && { certificateArn: input.certificateArn }),
4254
+ ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
4311
4255
  };
4312
4256
  };
4313
4257
  const serializeAws_restJson1ListenerTlsCertificate = (input, context) => {
@@ -4320,24 +4264,23 @@ const serializeAws_restJson1ListenerTlsCertificate = (input, context) => {
4320
4264
  };
4321
4265
  const serializeAws_restJson1ListenerTlsFileCertificate = (input, context) => {
4322
4266
  return {
4323
- ...(input.certificateChain !== undefined &&
4324
- input.certificateChain !== null && { certificateChain: input.certificateChain }),
4325
- ...(input.privateKey !== undefined && input.privateKey !== null && { privateKey: input.privateKey }),
4267
+ ...(input.certificateChain != null && { certificateChain: input.certificateChain }),
4268
+ ...(input.privateKey != null && { privateKey: input.privateKey }),
4326
4269
  };
4327
4270
  };
4328
4271
  const serializeAws_restJson1ListenerTlsSdsCertificate = (input, context) => {
4329
4272
  return {
4330
- ...(input.secretName !== undefined && input.secretName !== null && { secretName: input.secretName }),
4273
+ ...(input.secretName != null && { secretName: input.secretName }),
4331
4274
  };
4332
4275
  };
4333
4276
  const serializeAws_restJson1ListenerTlsValidationContext = (input, context) => {
4334
4277
  return {
4335
- ...(input.subjectAlternativeNames !== undefined &&
4336
- input.subjectAlternativeNames !== null && {
4278
+ ...(input.subjectAlternativeNames != null && {
4337
4279
  subjectAlternativeNames: serializeAws_restJson1SubjectAlternativeNames(input.subjectAlternativeNames, context),
4338
4280
  }),
4339
- ...(input.trust !== undefined &&
4340
- input.trust !== null && { trust: serializeAws_restJson1ListenerTlsValidationContextTrust(input.trust, context) }),
4281
+ ...(input.trust != null && {
4282
+ trust: serializeAws_restJson1ListenerTlsValidationContextTrust(input.trust, context),
4283
+ }),
4341
4284
  };
4342
4285
  };
4343
4286
  const serializeAws_restJson1ListenerTlsValidationContextTrust = (input, context) => {
@@ -4349,49 +4292,44 @@ const serializeAws_restJson1ListenerTlsValidationContextTrust = (input, context)
4349
4292
  };
4350
4293
  const serializeAws_restJson1Logging = (input, context) => {
4351
4294
  return {
4352
- ...(input.accessLog !== undefined &&
4353
- input.accessLog !== null && { accessLog: serializeAws_restJson1AccessLog(input.accessLog, context) }),
4295
+ ...(input.accessLog != null && { accessLog: serializeAws_restJson1AccessLog(input.accessLog, context) }),
4354
4296
  };
4355
4297
  };
4356
4298
  const serializeAws_restJson1MatchRange = (input, context) => {
4357
4299
  return {
4358
- ...(input.end !== undefined && input.end !== null && { end: input.end }),
4359
- ...(input.start !== undefined && input.start !== null && { start: input.start }),
4300
+ ...(input.end != null && { end: input.end }),
4301
+ ...(input.start != null && { start: input.start }),
4360
4302
  };
4361
4303
  };
4362
4304
  const serializeAws_restJson1MeshServiceDiscovery = (input, context) => {
4363
4305
  return {
4364
- ...(input.ipPreference !== undefined && input.ipPreference !== null && { ipPreference: input.ipPreference }),
4306
+ ...(input.ipPreference != null && { ipPreference: input.ipPreference }),
4365
4307
  };
4366
4308
  };
4367
4309
  const serializeAws_restJson1MeshSpec = (input, context) => {
4368
4310
  return {
4369
- ...(input.egressFilter !== undefined &&
4370
- input.egressFilter !== null && { egressFilter: serializeAws_restJson1EgressFilter(input.egressFilter, context) }),
4371
- ...(input.serviceDiscovery !== undefined &&
4372
- input.serviceDiscovery !== null && {
4311
+ ...(input.egressFilter != null && {
4312
+ egressFilter: serializeAws_restJson1EgressFilter(input.egressFilter, context),
4313
+ }),
4314
+ ...(input.serviceDiscovery != null && {
4373
4315
  serviceDiscovery: serializeAws_restJson1MeshServiceDiscovery(input.serviceDiscovery, context),
4374
4316
  }),
4375
4317
  };
4376
4318
  };
4377
4319
  const serializeAws_restJson1OutlierDetection = (input, context) => {
4378
4320
  return {
4379
- ...(input.baseEjectionDuration !== undefined &&
4380
- input.baseEjectionDuration !== null && {
4321
+ ...(input.baseEjectionDuration != null && {
4381
4322
  baseEjectionDuration: serializeAws_restJson1Duration(input.baseEjectionDuration, context),
4382
4323
  }),
4383
- ...(input.interval !== undefined &&
4384
- input.interval !== null && { interval: serializeAws_restJson1Duration(input.interval, context) }),
4385
- ...(input.maxEjectionPercent !== undefined &&
4386
- input.maxEjectionPercent !== null && { maxEjectionPercent: input.maxEjectionPercent }),
4387
- ...(input.maxServerErrors !== undefined &&
4388
- input.maxServerErrors !== null && { maxServerErrors: input.maxServerErrors }),
4324
+ ...(input.interval != null && { interval: serializeAws_restJson1Duration(input.interval, context) }),
4325
+ ...(input.maxEjectionPercent != null && { maxEjectionPercent: input.maxEjectionPercent }),
4326
+ ...(input.maxServerErrors != null && { maxServerErrors: input.maxServerErrors }),
4389
4327
  };
4390
4328
  };
4391
4329
  const serializeAws_restJson1PortMapping = (input, context) => {
4392
4330
  return {
4393
- ...(input.port !== undefined && input.port !== null && { port: input.port }),
4394
- ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),
4331
+ ...(input.port != null && { port: input.port }),
4332
+ ...(input.protocol != null && { protocol: input.protocol }),
4395
4333
  };
4396
4334
  };
4397
4335
  const serializeAws_restJson1PortSet = (input, context) => {
@@ -4406,20 +4344,16 @@ const serializeAws_restJson1PortSet = (input, context) => {
4406
4344
  };
4407
4345
  const serializeAws_restJson1QueryParameterMatch = (input, context) => {
4408
4346
  return {
4409
- ...(input.exact !== undefined && input.exact !== null && { exact: input.exact }),
4347
+ ...(input.exact != null && { exact: input.exact }),
4410
4348
  };
4411
4349
  };
4412
4350
  const serializeAws_restJson1RouteSpec = (input, context) => {
4413
4351
  return {
4414
- ...(input.grpcRoute !== undefined &&
4415
- input.grpcRoute !== null && { grpcRoute: serializeAws_restJson1GrpcRoute(input.grpcRoute, context) }),
4416
- ...(input.http2Route !== undefined &&
4417
- input.http2Route !== null && { http2Route: serializeAws_restJson1HttpRoute(input.http2Route, context) }),
4418
- ...(input.httpRoute !== undefined &&
4419
- input.httpRoute !== null && { httpRoute: serializeAws_restJson1HttpRoute(input.httpRoute, context) }),
4420
- ...(input.priority !== undefined && input.priority !== null && { priority: input.priority }),
4421
- ...(input.tcpRoute !== undefined &&
4422
- input.tcpRoute !== null && { tcpRoute: serializeAws_restJson1TcpRoute(input.tcpRoute, context) }),
4352
+ ...(input.grpcRoute != null && { grpcRoute: serializeAws_restJson1GrpcRoute(input.grpcRoute, context) }),
4353
+ ...(input.http2Route != null && { http2Route: serializeAws_restJson1HttpRoute(input.http2Route, context) }),
4354
+ ...(input.httpRoute != null && { httpRoute: serializeAws_restJson1HttpRoute(input.httpRoute, context) }),
4355
+ ...(input.priority != null && { priority: input.priority }),
4356
+ ...(input.tcpRoute != null && { tcpRoute: serializeAws_restJson1TcpRoute(input.tcpRoute, context) }),
4423
4357
  };
4424
4358
  };
4425
4359
  const serializeAws_restJson1ServiceDiscovery = (input, context) => {
@@ -4441,14 +4375,12 @@ const serializeAws_restJson1SubjectAlternativeNameList = (input, context) => {
4441
4375
  };
4442
4376
  const serializeAws_restJson1SubjectAlternativeNameMatchers = (input, context) => {
4443
4377
  return {
4444
- ...(input.exact !== undefined &&
4445
- input.exact !== null && { exact: serializeAws_restJson1SubjectAlternativeNameList(input.exact, context) }),
4378
+ ...(input.exact != null && { exact: serializeAws_restJson1SubjectAlternativeNameList(input.exact, context) }),
4446
4379
  };
4447
4380
  };
4448
4381
  const serializeAws_restJson1SubjectAlternativeNames = (input, context) => {
4449
4382
  return {
4450
- ...(input.match !== undefined &&
4451
- input.match !== null && { match: serializeAws_restJson1SubjectAlternativeNameMatchers(input.match, context) }),
4383
+ ...(input.match != null && { match: serializeAws_restJson1SubjectAlternativeNameMatchers(input.match, context) }),
4452
4384
  };
4453
4385
  };
4454
4386
  const serializeAws_restJson1TagKeyList = (input, context) => {
@@ -4473,8 +4405,8 @@ const serializeAws_restJson1TagList = (input, context) => {
4473
4405
  };
4474
4406
  const serializeAws_restJson1TagRef = (input, context) => {
4475
4407
  return {
4476
- ...(input.key !== undefined && input.key !== null && { key: input.key }),
4477
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
4408
+ ...(input.key != null && { key: input.key }),
4409
+ ...(input.value != null && { value: input.value }),
4478
4410
  };
4479
4411
  };
4480
4412
  const serializeAws_restJson1TcpRetryPolicyEvents = (input, context) => {
@@ -4489,53 +4421,45 @@ const serializeAws_restJson1TcpRetryPolicyEvents = (input, context) => {
4489
4421
  };
4490
4422
  const serializeAws_restJson1TcpRoute = (input, context) => {
4491
4423
  return {
4492
- ...(input.action !== undefined &&
4493
- input.action !== null && { action: serializeAws_restJson1TcpRouteAction(input.action, context) }),
4494
- ...(input.timeout !== undefined &&
4495
- input.timeout !== null && { timeout: serializeAws_restJson1TcpTimeout(input.timeout, context) }),
4424
+ ...(input.action != null && { action: serializeAws_restJson1TcpRouteAction(input.action, context) }),
4425
+ ...(input.timeout != null && { timeout: serializeAws_restJson1TcpTimeout(input.timeout, context) }),
4496
4426
  };
4497
4427
  };
4498
4428
  const serializeAws_restJson1TcpRouteAction = (input, context) => {
4499
4429
  return {
4500
- ...(input.weightedTargets !== undefined &&
4501
- input.weightedTargets !== null && {
4430
+ ...(input.weightedTargets != null && {
4502
4431
  weightedTargets: serializeAws_restJson1WeightedTargets(input.weightedTargets, context),
4503
4432
  }),
4504
4433
  };
4505
4434
  };
4506
4435
  const serializeAws_restJson1TcpTimeout = (input, context) => {
4507
4436
  return {
4508
- ...(input.idle !== undefined &&
4509
- input.idle !== null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4437
+ ...(input.idle != null && { idle: serializeAws_restJson1Duration(input.idle, context) }),
4510
4438
  };
4511
4439
  };
4512
4440
  const serializeAws_restJson1TlsValidationContext = (input, context) => {
4513
4441
  return {
4514
- ...(input.subjectAlternativeNames !== undefined &&
4515
- input.subjectAlternativeNames !== null && {
4442
+ ...(input.subjectAlternativeNames != null && {
4516
4443
  subjectAlternativeNames: serializeAws_restJson1SubjectAlternativeNames(input.subjectAlternativeNames, context),
4517
4444
  }),
4518
- ...(input.trust !== undefined &&
4519
- input.trust !== null && { trust: serializeAws_restJson1TlsValidationContextTrust(input.trust, context) }),
4445
+ ...(input.trust != null && { trust: serializeAws_restJson1TlsValidationContextTrust(input.trust, context) }),
4520
4446
  };
4521
4447
  };
4522
4448
  const serializeAws_restJson1TlsValidationContextAcmTrust = (input, context) => {
4523
4449
  return {
4524
- ...(input.certificateAuthorityArns !== undefined &&
4525
- input.certificateAuthorityArns !== null && {
4450
+ ...(input.certificateAuthorityArns != null && {
4526
4451
  certificateAuthorityArns: serializeAws_restJson1CertificateAuthorityArns(input.certificateAuthorityArns, context),
4527
4452
  }),
4528
4453
  };
4529
4454
  };
4530
4455
  const serializeAws_restJson1TlsValidationContextFileTrust = (input, context) => {
4531
4456
  return {
4532
- ...(input.certificateChain !== undefined &&
4533
- input.certificateChain !== null && { certificateChain: input.certificateChain }),
4457
+ ...(input.certificateChain != null && { certificateChain: input.certificateChain }),
4534
4458
  };
4535
4459
  };
4536
4460
  const serializeAws_restJson1TlsValidationContextSdsTrust = (input, context) => {
4537
4461
  return {
4538
- ...(input.secretName !== undefined && input.secretName !== null && { secretName: input.secretName }),
4462
+ ...(input.secretName != null && { secretName: input.secretName }),
4539
4463
  };
4540
4464
  };
4541
4465
  const serializeAws_restJson1TlsValidationContextTrust = (input, context) => {
@@ -4554,8 +4478,7 @@ const serializeAws_restJson1VirtualGatewayAccessLog = (input, context) => {
4554
4478
  };
4555
4479
  const serializeAws_restJson1VirtualGatewayBackendDefaults = (input, context) => {
4556
4480
  return {
4557
- ...(input.clientPolicy !== undefined &&
4558
- input.clientPolicy !== null && {
4481
+ ...(input.clientPolicy != null && {
4559
4482
  clientPolicy: serializeAws_restJson1VirtualGatewayClientPolicy(input.clientPolicy, context),
4560
4483
  }),
4561
4484
  };
@@ -4572,21 +4495,17 @@ const serializeAws_restJson1VirtualGatewayCertificateAuthorityArns = (input, con
4572
4495
  };
4573
4496
  const serializeAws_restJson1VirtualGatewayClientPolicy = (input, context) => {
4574
4497
  return {
4575
- ...(input.tls !== undefined &&
4576
- input.tls !== null && { tls: serializeAws_restJson1VirtualGatewayClientPolicyTls(input.tls, context) }),
4498
+ ...(input.tls != null && { tls: serializeAws_restJson1VirtualGatewayClientPolicyTls(input.tls, context) }),
4577
4499
  };
4578
4500
  };
4579
4501
  const serializeAws_restJson1VirtualGatewayClientPolicyTls = (input, context) => {
4580
4502
  return {
4581
- ...(input.certificate !== undefined &&
4582
- input.certificate !== null && {
4503
+ ...(input.certificate != null && {
4583
4504
  certificate: serializeAws_restJson1VirtualGatewayClientTlsCertificate(input.certificate, context),
4584
4505
  }),
4585
- ...(input.enforce !== undefined && input.enforce !== null && { enforce: input.enforce }),
4586
- ...(input.ports !== undefined &&
4587
- input.ports !== null && { ports: serializeAws_restJson1PortSet(input.ports, context) }),
4588
- ...(input.validation !== undefined &&
4589
- input.validation !== null && {
4506
+ ...(input.enforce != null && { enforce: input.enforce }),
4507
+ ...(input.ports != null && { ports: serializeAws_restJson1PortSet(input.ports, context) }),
4508
+ ...(input.validation != null && {
4590
4509
  validation: serializeAws_restJson1VirtualGatewayTlsValidationContext(input.validation, context),
4591
4510
  }),
4592
4511
  };
@@ -4608,57 +4527,48 @@ const serializeAws_restJson1VirtualGatewayConnectionPool = (input, context) => {
4608
4527
  };
4609
4528
  const serializeAws_restJson1VirtualGatewayFileAccessLog = (input, context) => {
4610
4529
  return {
4611
- ...(input.path !== undefined && input.path !== null && { path: input.path }),
4530
+ ...(input.path != null && { path: input.path }),
4612
4531
  };
4613
4532
  };
4614
4533
  const serializeAws_restJson1VirtualGatewayGrpcConnectionPool = (input, context) => {
4615
4534
  return {
4616
- ...(input.maxRequests !== undefined && input.maxRequests !== null && { maxRequests: input.maxRequests }),
4535
+ ...(input.maxRequests != null && { maxRequests: input.maxRequests }),
4617
4536
  };
4618
4537
  };
4619
4538
  const serializeAws_restJson1VirtualGatewayHealthCheckPolicy = (input, context) => {
4620
4539
  return {
4621
- ...(input.healthyThreshold !== undefined &&
4622
- input.healthyThreshold !== null && { healthyThreshold: input.healthyThreshold }),
4623
- ...(input.intervalMillis !== undefined &&
4624
- input.intervalMillis !== null && { intervalMillis: input.intervalMillis }),
4625
- ...(input.path !== undefined && input.path !== null && { path: input.path }),
4626
- ...(input.port !== undefined && input.port !== null && { port: input.port }),
4627
- ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),
4628
- ...(input.timeoutMillis !== undefined && input.timeoutMillis !== null && { timeoutMillis: input.timeoutMillis }),
4629
- ...(input.unhealthyThreshold !== undefined &&
4630
- input.unhealthyThreshold !== null && { unhealthyThreshold: input.unhealthyThreshold }),
4540
+ ...(input.healthyThreshold != null && { healthyThreshold: input.healthyThreshold }),
4541
+ ...(input.intervalMillis != null && { intervalMillis: input.intervalMillis }),
4542
+ ...(input.path != null && { path: input.path }),
4543
+ ...(input.port != null && { port: input.port }),
4544
+ ...(input.protocol != null && { protocol: input.protocol }),
4545
+ ...(input.timeoutMillis != null && { timeoutMillis: input.timeoutMillis }),
4546
+ ...(input.unhealthyThreshold != null && { unhealthyThreshold: input.unhealthyThreshold }),
4631
4547
  };
4632
4548
  };
4633
4549
  const serializeAws_restJson1VirtualGatewayHttp2ConnectionPool = (input, context) => {
4634
4550
  return {
4635
- ...(input.maxRequests !== undefined && input.maxRequests !== null && { maxRequests: input.maxRequests }),
4551
+ ...(input.maxRequests != null && { maxRequests: input.maxRequests }),
4636
4552
  };
4637
4553
  };
4638
4554
  const serializeAws_restJson1VirtualGatewayHttpConnectionPool = (input, context) => {
4639
4555
  return {
4640
- ...(input.maxConnections !== undefined &&
4641
- input.maxConnections !== null && { maxConnections: input.maxConnections }),
4642
- ...(input.maxPendingRequests !== undefined &&
4643
- input.maxPendingRequests !== null && { maxPendingRequests: input.maxPendingRequests }),
4556
+ ...(input.maxConnections != null && { maxConnections: input.maxConnections }),
4557
+ ...(input.maxPendingRequests != null && { maxPendingRequests: input.maxPendingRequests }),
4644
4558
  };
4645
4559
  };
4646
4560
  const serializeAws_restJson1VirtualGatewayListener = (input, context) => {
4647
4561
  return {
4648
- ...(input.connectionPool !== undefined &&
4649
- input.connectionPool !== null && {
4562
+ ...(input.connectionPool != null && {
4650
4563
  connectionPool: serializeAws_restJson1VirtualGatewayConnectionPool(input.connectionPool, context),
4651
4564
  }),
4652
- ...(input.healthCheck !== undefined &&
4653
- input.healthCheck !== null && {
4565
+ ...(input.healthCheck != null && {
4654
4566
  healthCheck: serializeAws_restJson1VirtualGatewayHealthCheckPolicy(input.healthCheck, context),
4655
4567
  }),
4656
- ...(input.portMapping !== undefined &&
4657
- input.portMapping !== null && {
4568
+ ...(input.portMapping != null && {
4658
4569
  portMapping: serializeAws_restJson1VirtualGatewayPortMapping(input.portMapping, context),
4659
4570
  }),
4660
- ...(input.tls !== undefined &&
4661
- input.tls !== null && { tls: serializeAws_restJson1VirtualGatewayListenerTls(input.tls, context) }),
4571
+ ...(input.tls != null && { tls: serializeAws_restJson1VirtualGatewayListenerTls(input.tls, context) }),
4662
4572
  };
4663
4573
  };
4664
4574
  const serializeAws_restJson1VirtualGatewayListeners = (input, context) => {
@@ -4673,21 +4583,18 @@ const serializeAws_restJson1VirtualGatewayListeners = (input, context) => {
4673
4583
  };
4674
4584
  const serializeAws_restJson1VirtualGatewayListenerTls = (input, context) => {
4675
4585
  return {
4676
- ...(input.certificate !== undefined &&
4677
- input.certificate !== null && {
4586
+ ...(input.certificate != null && {
4678
4587
  certificate: serializeAws_restJson1VirtualGatewayListenerTlsCertificate(input.certificate, context),
4679
4588
  }),
4680
- ...(input.mode !== undefined && input.mode !== null && { mode: input.mode }),
4681
- ...(input.validation !== undefined &&
4682
- input.validation !== null && {
4589
+ ...(input.mode != null && { mode: input.mode }),
4590
+ ...(input.validation != null && {
4683
4591
  validation: serializeAws_restJson1VirtualGatewayListenerTlsValidationContext(input.validation, context),
4684
4592
  }),
4685
4593
  };
4686
4594
  };
4687
4595
  const serializeAws_restJson1VirtualGatewayListenerTlsAcmCertificate = (input, context) => {
4688
4596
  return {
4689
- ...(input.certificateArn !== undefined &&
4690
- input.certificateArn !== null && { certificateArn: input.certificateArn }),
4597
+ ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
4691
4598
  };
4692
4599
  };
4693
4600
  const serializeAws_restJson1VirtualGatewayListenerTlsCertificate = (input, context) => {
@@ -4700,24 +4607,21 @@ const serializeAws_restJson1VirtualGatewayListenerTlsCertificate = (input, conte
4700
4607
  };
4701
4608
  const serializeAws_restJson1VirtualGatewayListenerTlsFileCertificate = (input, context) => {
4702
4609
  return {
4703
- ...(input.certificateChain !== undefined &&
4704
- input.certificateChain !== null && { certificateChain: input.certificateChain }),
4705
- ...(input.privateKey !== undefined && input.privateKey !== null && { privateKey: input.privateKey }),
4610
+ ...(input.certificateChain != null && { certificateChain: input.certificateChain }),
4611
+ ...(input.privateKey != null && { privateKey: input.privateKey }),
4706
4612
  };
4707
4613
  };
4708
4614
  const serializeAws_restJson1VirtualGatewayListenerTlsSdsCertificate = (input, context) => {
4709
4615
  return {
4710
- ...(input.secretName !== undefined && input.secretName !== null && { secretName: input.secretName }),
4616
+ ...(input.secretName != null && { secretName: input.secretName }),
4711
4617
  };
4712
4618
  };
4713
4619
  const serializeAws_restJson1VirtualGatewayListenerTlsValidationContext = (input, context) => {
4714
4620
  return {
4715
- ...(input.subjectAlternativeNames !== undefined &&
4716
- input.subjectAlternativeNames !== null && {
4621
+ ...(input.subjectAlternativeNames != null && {
4717
4622
  subjectAlternativeNames: serializeAws_restJson1SubjectAlternativeNames(input.subjectAlternativeNames, context),
4718
4623
  }),
4719
- ...(input.trust !== undefined &&
4720
- input.trust !== null && {
4624
+ ...(input.trust != null && {
4721
4625
  trust: serializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust(input.trust, context),
4722
4626
  }),
4723
4627
  };
@@ -4731,61 +4635,53 @@ const serializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust = (i
4731
4635
  };
4732
4636
  const serializeAws_restJson1VirtualGatewayLogging = (input, context) => {
4733
4637
  return {
4734
- ...(input.accessLog !== undefined &&
4735
- input.accessLog !== null && {
4638
+ ...(input.accessLog != null && {
4736
4639
  accessLog: serializeAws_restJson1VirtualGatewayAccessLog(input.accessLog, context),
4737
4640
  }),
4738
4641
  };
4739
4642
  };
4740
4643
  const serializeAws_restJson1VirtualGatewayPortMapping = (input, context) => {
4741
4644
  return {
4742
- ...(input.port !== undefined && input.port !== null && { port: input.port }),
4743
- ...(input.protocol !== undefined && input.protocol !== null && { protocol: input.protocol }),
4645
+ ...(input.port != null && { port: input.port }),
4646
+ ...(input.protocol != null && { protocol: input.protocol }),
4744
4647
  };
4745
4648
  };
4746
4649
  const serializeAws_restJson1VirtualGatewaySpec = (input, context) => {
4747
4650
  return {
4748
- ...(input.backendDefaults !== undefined &&
4749
- input.backendDefaults !== null && {
4651
+ ...(input.backendDefaults != null && {
4750
4652
  backendDefaults: serializeAws_restJson1VirtualGatewayBackendDefaults(input.backendDefaults, context),
4751
4653
  }),
4752
- ...(input.listeners !== undefined &&
4753
- input.listeners !== null && {
4654
+ ...(input.listeners != null && {
4754
4655
  listeners: serializeAws_restJson1VirtualGatewayListeners(input.listeners, context),
4755
4656
  }),
4756
- ...(input.logging !== undefined &&
4757
- input.logging !== null && { logging: serializeAws_restJson1VirtualGatewayLogging(input.logging, context) }),
4657
+ ...(input.logging != null && { logging: serializeAws_restJson1VirtualGatewayLogging(input.logging, context) }),
4758
4658
  };
4759
4659
  };
4760
4660
  const serializeAws_restJson1VirtualGatewayTlsValidationContext = (input, context) => {
4761
4661
  return {
4762
- ...(input.subjectAlternativeNames !== undefined &&
4763
- input.subjectAlternativeNames !== null && {
4662
+ ...(input.subjectAlternativeNames != null && {
4764
4663
  subjectAlternativeNames: serializeAws_restJson1SubjectAlternativeNames(input.subjectAlternativeNames, context),
4765
4664
  }),
4766
- ...(input.trust !== undefined &&
4767
- input.trust !== null && {
4665
+ ...(input.trust != null && {
4768
4666
  trust: serializeAws_restJson1VirtualGatewayTlsValidationContextTrust(input.trust, context),
4769
4667
  }),
4770
4668
  };
4771
4669
  };
4772
4670
  const serializeAws_restJson1VirtualGatewayTlsValidationContextAcmTrust = (input, context) => {
4773
4671
  return {
4774
- ...(input.certificateAuthorityArns !== undefined &&
4775
- input.certificateAuthorityArns !== null && {
4672
+ ...(input.certificateAuthorityArns != null && {
4776
4673
  certificateAuthorityArns: serializeAws_restJson1VirtualGatewayCertificateAuthorityArns(input.certificateAuthorityArns, context),
4777
4674
  }),
4778
4675
  };
4779
4676
  };
4780
4677
  const serializeAws_restJson1VirtualGatewayTlsValidationContextFileTrust = (input, context) => {
4781
4678
  return {
4782
- ...(input.certificateChain !== undefined &&
4783
- input.certificateChain !== null && { certificateChain: input.certificateChain }),
4679
+ ...(input.certificateChain != null && { certificateChain: input.certificateChain }),
4784
4680
  };
4785
4681
  };
4786
4682
  const serializeAws_restJson1VirtualGatewayTlsValidationContextSdsTrust = (input, context) => {
4787
4683
  return {
4788
- ...(input.secretName !== undefined && input.secretName !== null && { secretName: input.secretName }),
4684
+ ...(input.secretName != null && { secretName: input.secretName }),
4789
4685
  };
4790
4686
  };
4791
4687
  const serializeAws_restJson1VirtualGatewayTlsValidationContextTrust = (input, context) => {
@@ -4807,56 +4703,46 @@ const serializeAws_restJson1VirtualNodeConnectionPool = (input, context) => {
4807
4703
  };
4808
4704
  const serializeAws_restJson1VirtualNodeGrpcConnectionPool = (input, context) => {
4809
4705
  return {
4810
- ...(input.maxRequests !== undefined && input.maxRequests !== null && { maxRequests: input.maxRequests }),
4706
+ ...(input.maxRequests != null && { maxRequests: input.maxRequests }),
4811
4707
  };
4812
4708
  };
4813
4709
  const serializeAws_restJson1VirtualNodeHttp2ConnectionPool = (input, context) => {
4814
4710
  return {
4815
- ...(input.maxRequests !== undefined && input.maxRequests !== null && { maxRequests: input.maxRequests }),
4711
+ ...(input.maxRequests != null && { maxRequests: input.maxRequests }),
4816
4712
  };
4817
4713
  };
4818
4714
  const serializeAws_restJson1VirtualNodeHttpConnectionPool = (input, context) => {
4819
4715
  return {
4820
- ...(input.maxConnections !== undefined &&
4821
- input.maxConnections !== null && { maxConnections: input.maxConnections }),
4822
- ...(input.maxPendingRequests !== undefined &&
4823
- input.maxPendingRequests !== null && { maxPendingRequests: input.maxPendingRequests }),
4716
+ ...(input.maxConnections != null && { maxConnections: input.maxConnections }),
4717
+ ...(input.maxPendingRequests != null && { maxPendingRequests: input.maxPendingRequests }),
4824
4718
  };
4825
4719
  };
4826
4720
  const serializeAws_restJson1VirtualNodeServiceProvider = (input, context) => {
4827
4721
  return {
4828
- ...(input.virtualNodeName !== undefined &&
4829
- input.virtualNodeName !== null && { virtualNodeName: input.virtualNodeName }),
4722
+ ...(input.virtualNodeName != null && { virtualNodeName: input.virtualNodeName }),
4830
4723
  };
4831
4724
  };
4832
4725
  const serializeAws_restJson1VirtualNodeSpec = (input, context) => {
4833
4726
  return {
4834
- ...(input.backendDefaults !== undefined &&
4835
- input.backendDefaults !== null && {
4727
+ ...(input.backendDefaults != null && {
4836
4728
  backendDefaults: serializeAws_restJson1BackendDefaults(input.backendDefaults, context),
4837
4729
  }),
4838
- ...(input.backends !== undefined &&
4839
- input.backends !== null && { backends: serializeAws_restJson1Backends(input.backends, context) }),
4840
- ...(input.listeners !== undefined &&
4841
- input.listeners !== null && { listeners: serializeAws_restJson1Listeners(input.listeners, context) }),
4842
- ...(input.logging !== undefined &&
4843
- input.logging !== null && { logging: serializeAws_restJson1Logging(input.logging, context) }),
4844
- ...(input.serviceDiscovery !== undefined &&
4845
- input.serviceDiscovery !== null && {
4730
+ ...(input.backends != null && { backends: serializeAws_restJson1Backends(input.backends, context) }),
4731
+ ...(input.listeners != null && { listeners: serializeAws_restJson1Listeners(input.listeners, context) }),
4732
+ ...(input.logging != null && { logging: serializeAws_restJson1Logging(input.logging, context) }),
4733
+ ...(input.serviceDiscovery != null && {
4846
4734
  serviceDiscovery: serializeAws_restJson1ServiceDiscovery(input.serviceDiscovery, context),
4847
4735
  }),
4848
4736
  };
4849
4737
  };
4850
4738
  const serializeAws_restJson1VirtualNodeTcpConnectionPool = (input, context) => {
4851
4739
  return {
4852
- ...(input.maxConnections !== undefined &&
4853
- input.maxConnections !== null && { maxConnections: input.maxConnections }),
4740
+ ...(input.maxConnections != null && { maxConnections: input.maxConnections }),
4854
4741
  };
4855
4742
  };
4856
4743
  const serializeAws_restJson1VirtualRouterListener = (input, context) => {
4857
4744
  return {
4858
- ...(input.portMapping !== undefined &&
4859
- input.portMapping !== null && { portMapping: serializeAws_restJson1PortMapping(input.portMapping, context) }),
4745
+ ...(input.portMapping != null && { portMapping: serializeAws_restJson1PortMapping(input.portMapping, context) }),
4860
4746
  };
4861
4747
  };
4862
4748
  const serializeAws_restJson1VirtualRouterListeners = (input, context) => {
@@ -4871,24 +4757,22 @@ const serializeAws_restJson1VirtualRouterListeners = (input, context) => {
4871
4757
  };
4872
4758
  const serializeAws_restJson1VirtualRouterServiceProvider = (input, context) => {
4873
4759
  return {
4874
- ...(input.virtualRouterName !== undefined &&
4875
- input.virtualRouterName !== null && { virtualRouterName: input.virtualRouterName }),
4760
+ ...(input.virtualRouterName != null && { virtualRouterName: input.virtualRouterName }),
4876
4761
  };
4877
4762
  };
4878
4763
  const serializeAws_restJson1VirtualRouterSpec = (input, context) => {
4879
4764
  return {
4880
- ...(input.listeners !== undefined &&
4881
- input.listeners !== null && {
4765
+ ...(input.listeners != null && {
4882
4766
  listeners: serializeAws_restJson1VirtualRouterListeners(input.listeners, context),
4883
4767
  }),
4884
4768
  };
4885
4769
  };
4886
4770
  const serializeAws_restJson1VirtualServiceBackend = (input, context) => {
4887
4771
  return {
4888
- ...(input.clientPolicy !== undefined &&
4889
- input.clientPolicy !== null && { clientPolicy: serializeAws_restJson1ClientPolicy(input.clientPolicy, context) }),
4890
- ...(input.virtualServiceName !== undefined &&
4891
- input.virtualServiceName !== null && { virtualServiceName: input.virtualServiceName }),
4772
+ ...(input.clientPolicy != null && {
4773
+ clientPolicy: serializeAws_restJson1ClientPolicy(input.clientPolicy, context),
4774
+ }),
4775
+ ...(input.virtualServiceName != null && { virtualServiceName: input.virtualServiceName }),
4892
4776
  };
4893
4777
  };
4894
4778
  const serializeAws_restJson1VirtualServiceProvider = (input, context) => {
@@ -4900,14 +4784,13 @@ const serializeAws_restJson1VirtualServiceProvider = (input, context) => {
4900
4784
  };
4901
4785
  const serializeAws_restJson1VirtualServiceSpec = (input, context) => {
4902
4786
  return {
4903
- ...(input.provider !== undefined &&
4904
- input.provider !== null && { provider: serializeAws_restJson1VirtualServiceProvider(input.provider, context) }),
4787
+ ...(input.provider != null && { provider: serializeAws_restJson1VirtualServiceProvider(input.provider, context) }),
4905
4788
  };
4906
4789
  };
4907
4790
  const serializeAws_restJson1WeightedTarget = (input, context) => {
4908
4791
  return {
4909
- ...(input.virtualNode !== undefined && input.virtualNode !== null && { virtualNode: input.virtualNode }),
4910
- ...(input.weight !== undefined && input.weight !== null && { weight: input.weight }),
4792
+ ...(input.virtualNode != null && { virtualNode: input.virtualNode }),
4793
+ ...(input.weight != null && { weight: input.weight }),
4911
4794
  };
4912
4795
  };
4913
4796
  const serializeAws_restJson1WeightedTargets = (input, context) => {
@@ -4947,7 +4830,7 @@ const deserializeAws_restJson1AwsCloudMapInstanceAttributes = (output, context)
4947
4830
  };
4948
4831
  const deserializeAws_restJson1AwsCloudMapServiceDiscovery = (output, context) => {
4949
4832
  return {
4950
- attributes: output.attributes !== undefined && output.attributes !== null
4833
+ attributes: output.attributes != null
4951
4834
  ? deserializeAws_restJson1AwsCloudMapInstanceAttributes(output.attributes, context)
4952
4835
  : undefined,
4953
4836
  ipPreference: (0, smithy_client_1.expectString)(output.ipPreference),
@@ -4965,9 +4848,7 @@ const deserializeAws_restJson1Backend = (output, context) => {
4965
4848
  };
4966
4849
  const deserializeAws_restJson1BackendDefaults = (output, context) => {
4967
4850
  return {
4968
- clientPolicy: output.clientPolicy !== undefined && output.clientPolicy !== null
4969
- ? deserializeAws_restJson1ClientPolicy(output.clientPolicy, context)
4970
- : undefined,
4851
+ clientPolicy: output.clientPolicy != null ? deserializeAws_restJson1ClientPolicy(output.clientPolicy, context) : undefined,
4971
4852
  };
4972
4853
  };
4973
4854
  const deserializeAws_restJson1Backends = (output, context) => {
@@ -4994,23 +4875,17 @@ const deserializeAws_restJson1CertificateAuthorityArns = (output, context) => {
4994
4875
  };
4995
4876
  const deserializeAws_restJson1ClientPolicy = (output, context) => {
4996
4877
  return {
4997
- tls: output.tls !== undefined && output.tls !== null
4998
- ? deserializeAws_restJson1ClientPolicyTls(output.tls, context)
4999
- : undefined,
4878
+ tls: output.tls != null ? deserializeAws_restJson1ClientPolicyTls(output.tls, context) : undefined,
5000
4879
  };
5001
4880
  };
5002
4881
  const deserializeAws_restJson1ClientPolicyTls = (output, context) => {
5003
4882
  return {
5004
- certificate: output.certificate !== undefined && output.certificate !== null
4883
+ certificate: output.certificate != null
5005
4884
  ? deserializeAws_restJson1ClientTlsCertificate((0, smithy_client_1.expectUnion)(output.certificate), context)
5006
4885
  : undefined,
5007
4886
  enforce: (0, smithy_client_1.expectBoolean)(output.enforce),
5008
- ports: output.ports !== undefined && output.ports !== null
5009
- ? deserializeAws_restJson1PortSet(output.ports, context)
5010
- : undefined,
5011
- validation: output.validation !== undefined && output.validation !== null
5012
- ? deserializeAws_restJson1TlsValidationContext(output.validation, context)
5013
- : undefined,
4887
+ ports: output.ports != null ? deserializeAws_restJson1PortSet(output.ports, context) : undefined,
4888
+ validation: output.validation != null ? deserializeAws_restJson1TlsValidationContext(output.validation, context) : undefined,
5014
4889
  };
5015
4890
  };
5016
4891
  const deserializeAws_restJson1ClientTlsCertificate = (output, context) => {
@@ -5053,15 +4928,9 @@ const deserializeAws_restJson1GatewayRouteData = (output, context) => {
5053
4928
  return {
5054
4929
  gatewayRouteName: (0, smithy_client_1.expectString)(output.gatewayRouteName),
5055
4930
  meshName: (0, smithy_client_1.expectString)(output.meshName),
5056
- metadata: output.metadata !== undefined && output.metadata !== null
5057
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
5058
- : undefined,
5059
- spec: output.spec !== undefined && output.spec !== null
5060
- ? deserializeAws_restJson1GatewayRouteSpec(output.spec, context)
5061
- : undefined,
5062
- status: output.status !== undefined && output.status !== null
5063
- ? deserializeAws_restJson1GatewayRouteStatus(output.status, context)
5064
- : undefined,
4931
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
4932
+ spec: output.spec != null ? deserializeAws_restJson1GatewayRouteSpec(output.spec, context) : undefined,
4933
+ status: output.status != null ? deserializeAws_restJson1GatewayRouteStatus(output.status, context) : undefined,
5065
4934
  virtualGatewayName: (0, smithy_client_1.expectString)(output.virtualGatewayName),
5066
4935
  };
5067
4936
  };
@@ -5090,11 +4959,9 @@ const deserializeAws_restJson1GatewayRouteList = (output, context) => {
5090
4959
  const deserializeAws_restJson1GatewayRouteRef = (output, context) => {
5091
4960
  return {
5092
4961
  arn: (0, smithy_client_1.expectString)(output.arn),
5093
- createdAt: output.createdAt !== undefined && output.createdAt !== null
5094
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
5095
- : undefined,
4962
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
5096
4963
  gatewayRouteName: (0, smithy_client_1.expectString)(output.gatewayRouteName),
5097
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
4964
+ lastUpdatedAt: output.lastUpdatedAt != null
5098
4965
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
5099
4966
  : undefined,
5100
4967
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -5106,15 +4973,9 @@ const deserializeAws_restJson1GatewayRouteRef = (output, context) => {
5106
4973
  };
5107
4974
  const deserializeAws_restJson1GatewayRouteSpec = (output, context) => {
5108
4975
  return {
5109
- grpcRoute: output.grpcRoute !== undefined && output.grpcRoute !== null
5110
- ? deserializeAws_restJson1GrpcGatewayRoute(output.grpcRoute, context)
5111
- : undefined,
5112
- http2Route: output.http2Route !== undefined && output.http2Route !== null
5113
- ? deserializeAws_restJson1HttpGatewayRoute(output.http2Route, context)
5114
- : undefined,
5115
- httpRoute: output.httpRoute !== undefined && output.httpRoute !== null
5116
- ? deserializeAws_restJson1HttpGatewayRoute(output.httpRoute, context)
5117
- : undefined,
4976
+ grpcRoute: output.grpcRoute != null ? deserializeAws_restJson1GrpcGatewayRoute(output.grpcRoute, context) : undefined,
4977
+ http2Route: output.http2Route != null ? deserializeAws_restJson1HttpGatewayRoute(output.http2Route, context) : undefined,
4978
+ httpRoute: output.httpRoute != null ? deserializeAws_restJson1HttpGatewayRoute(output.httpRoute, context) : undefined,
5118
4979
  priority: (0, smithy_client_1.expectInt32)(output.priority),
5119
4980
  };
5120
4981
  };
@@ -5125,7 +4986,7 @@ const deserializeAws_restJson1GatewayRouteStatus = (output, context) => {
5125
4986
  };
5126
4987
  const deserializeAws_restJson1GatewayRouteTarget = (output, context) => {
5127
4988
  return {
5128
- virtualService: output.virtualService !== undefined && output.virtualService !== null
4989
+ virtualService: output.virtualService != null
5129
4990
  ? deserializeAws_restJson1GatewayRouteVirtualService(output.virtualService, context)
5130
4991
  : undefined,
5131
4992
  };
@@ -5137,30 +4998,20 @@ const deserializeAws_restJson1GatewayRouteVirtualService = (output, context) =>
5137
4998
  };
5138
4999
  const deserializeAws_restJson1GrpcGatewayRoute = (output, context) => {
5139
5000
  return {
5140
- action: output.action !== undefined && output.action !== null
5141
- ? deserializeAws_restJson1GrpcGatewayRouteAction(output.action, context)
5142
- : undefined,
5143
- match: output.match !== undefined && output.match !== null
5144
- ? deserializeAws_restJson1GrpcGatewayRouteMatch(output.match, context)
5145
- : undefined,
5001
+ action: output.action != null ? deserializeAws_restJson1GrpcGatewayRouteAction(output.action, context) : undefined,
5002
+ match: output.match != null ? deserializeAws_restJson1GrpcGatewayRouteMatch(output.match, context) : undefined,
5146
5003
  };
5147
5004
  };
5148
5005
  const deserializeAws_restJson1GrpcGatewayRouteAction = (output, context) => {
5149
5006
  return {
5150
- rewrite: output.rewrite !== undefined && output.rewrite !== null
5151
- ? deserializeAws_restJson1GrpcGatewayRouteRewrite(output.rewrite, context)
5152
- : undefined,
5153
- target: output.target !== undefined && output.target !== null
5154
- ? deserializeAws_restJson1GatewayRouteTarget(output.target, context)
5155
- : undefined,
5007
+ rewrite: output.rewrite != null ? deserializeAws_restJson1GrpcGatewayRouteRewrite(output.rewrite, context) : undefined,
5008
+ target: output.target != null ? deserializeAws_restJson1GatewayRouteTarget(output.target, context) : undefined,
5156
5009
  };
5157
5010
  };
5158
5011
  const deserializeAws_restJson1GrpcGatewayRouteMatch = (output, context) => {
5159
5012
  return {
5160
- hostname: output.hostname !== undefined && output.hostname !== null
5161
- ? deserializeAws_restJson1GatewayRouteHostnameMatch(output.hostname, context)
5162
- : undefined,
5163
- metadata: output.metadata !== undefined && output.metadata !== null
5013
+ hostname: output.hostname != null ? deserializeAws_restJson1GatewayRouteHostnameMatch(output.hostname, context) : undefined,
5014
+ metadata: output.metadata != null
5164
5015
  ? deserializeAws_restJson1GrpcGatewayRouteMetadataList(output.metadata, context)
5165
5016
  : undefined,
5166
5017
  serviceName: (0, smithy_client_1.expectString)(output.serviceName),
@@ -5169,7 +5020,7 @@ const deserializeAws_restJson1GrpcGatewayRouteMatch = (output, context) => {
5169
5020
  const deserializeAws_restJson1GrpcGatewayRouteMetadata = (output, context) => {
5170
5021
  return {
5171
5022
  invert: (0, smithy_client_1.expectBoolean)(output.invert),
5172
- match: output.match !== undefined && output.match !== null
5023
+ match: output.match != null
5173
5024
  ? deserializeAws_restJson1GrpcMetadataMatchMethod((0, smithy_client_1.expectUnion)(output.match), context)
5174
5025
  : undefined,
5175
5026
  name: (0, smithy_client_1.expectString)(output.name),
@@ -5188,7 +5039,7 @@ const deserializeAws_restJson1GrpcGatewayRouteMetadataList = (output, context) =
5188
5039
  };
5189
5040
  const deserializeAws_restJson1GrpcGatewayRouteRewrite = (output, context) => {
5190
5041
  return {
5191
- hostname: output.hostname !== undefined && output.hostname !== null
5042
+ hostname: output.hostname != null
5192
5043
  ? deserializeAws_restJson1GatewayRouteHostnameRewrite(output.hostname, context)
5193
5044
  : undefined,
5194
5045
  };
@@ -5215,17 +5066,15 @@ const deserializeAws_restJson1GrpcMetadataMatchMethod = (output, context) => {
5215
5066
  };
5216
5067
  const deserializeAws_restJson1GrpcRetryPolicy = (output, context) => {
5217
5068
  return {
5218
- grpcRetryEvents: output.grpcRetryEvents !== undefined && output.grpcRetryEvents !== null
5069
+ grpcRetryEvents: output.grpcRetryEvents != null
5219
5070
  ? deserializeAws_restJson1GrpcRetryPolicyEvents(output.grpcRetryEvents, context)
5220
5071
  : undefined,
5221
- httpRetryEvents: output.httpRetryEvents !== undefined && output.httpRetryEvents !== null
5072
+ httpRetryEvents: output.httpRetryEvents != null
5222
5073
  ? deserializeAws_restJson1HttpRetryPolicyEvents(output.httpRetryEvents, context)
5223
5074
  : undefined,
5224
5075
  maxRetries: (0, smithy_client_1.expectLong)(output.maxRetries),
5225
- perRetryTimeout: output.perRetryTimeout !== undefined && output.perRetryTimeout !== null
5226
- ? deserializeAws_restJson1Duration(output.perRetryTimeout, context)
5227
- : undefined,
5228
- tcpRetryEvents: output.tcpRetryEvents !== undefined && output.tcpRetryEvents !== null
5076
+ perRetryTimeout: output.perRetryTimeout != null ? deserializeAws_restJson1Duration(output.perRetryTimeout, context) : undefined,
5077
+ tcpRetryEvents: output.tcpRetryEvents != null
5229
5078
  ? deserializeAws_restJson1TcpRetryPolicyEvents(output.tcpRetryEvents, context)
5230
5079
  : undefined,
5231
5080
  };
@@ -5243,32 +5092,22 @@ const deserializeAws_restJson1GrpcRetryPolicyEvents = (output, context) => {
5243
5092
  };
5244
5093
  const deserializeAws_restJson1GrpcRoute = (output, context) => {
5245
5094
  return {
5246
- action: output.action !== undefined && output.action !== null
5247
- ? deserializeAws_restJson1GrpcRouteAction(output.action, context)
5248
- : undefined,
5249
- match: output.match !== undefined && output.match !== null
5250
- ? deserializeAws_restJson1GrpcRouteMatch(output.match, context)
5251
- : undefined,
5252
- retryPolicy: output.retryPolicy !== undefined && output.retryPolicy !== null
5253
- ? deserializeAws_restJson1GrpcRetryPolicy(output.retryPolicy, context)
5254
- : undefined,
5255
- timeout: output.timeout !== undefined && output.timeout !== null
5256
- ? deserializeAws_restJson1GrpcTimeout(output.timeout, context)
5257
- : undefined,
5095
+ action: output.action != null ? deserializeAws_restJson1GrpcRouteAction(output.action, context) : undefined,
5096
+ match: output.match != null ? deserializeAws_restJson1GrpcRouteMatch(output.match, context) : undefined,
5097
+ retryPolicy: output.retryPolicy != null ? deserializeAws_restJson1GrpcRetryPolicy(output.retryPolicy, context) : undefined,
5098
+ timeout: output.timeout != null ? deserializeAws_restJson1GrpcTimeout(output.timeout, context) : undefined,
5258
5099
  };
5259
5100
  };
5260
5101
  const deserializeAws_restJson1GrpcRouteAction = (output, context) => {
5261
5102
  return {
5262
- weightedTargets: output.weightedTargets !== undefined && output.weightedTargets !== null
5103
+ weightedTargets: output.weightedTargets != null
5263
5104
  ? deserializeAws_restJson1WeightedTargets(output.weightedTargets, context)
5264
5105
  : undefined,
5265
5106
  };
5266
5107
  };
5267
5108
  const deserializeAws_restJson1GrpcRouteMatch = (output, context) => {
5268
5109
  return {
5269
- metadata: output.metadata !== undefined && output.metadata !== null
5270
- ? deserializeAws_restJson1GrpcRouteMetadataList(output.metadata, context)
5271
- : undefined,
5110
+ metadata: output.metadata != null ? deserializeAws_restJson1GrpcRouteMetadataList(output.metadata, context) : undefined,
5272
5111
  methodName: (0, smithy_client_1.expectString)(output.methodName),
5273
5112
  serviceName: (0, smithy_client_1.expectString)(output.serviceName),
5274
5113
  };
@@ -5276,7 +5115,7 @@ const deserializeAws_restJson1GrpcRouteMatch = (output, context) => {
5276
5115
  const deserializeAws_restJson1GrpcRouteMetadata = (output, context) => {
5277
5116
  return {
5278
5117
  invert: (0, smithy_client_1.expectBoolean)(output.invert),
5279
- match: output.match !== undefined && output.match !== null
5118
+ match: output.match != null
5280
5119
  ? deserializeAws_restJson1GrpcRouteMetadataMatchMethod((0, smithy_client_1.expectUnion)(output.match), context)
5281
5120
  : undefined,
5282
5121
  name: (0, smithy_client_1.expectString)(output.name),
@@ -5315,12 +5154,8 @@ const deserializeAws_restJson1GrpcRouteMetadataMatchMethod = (output, context) =
5315
5154
  };
5316
5155
  const deserializeAws_restJson1GrpcTimeout = (output, context) => {
5317
5156
  return {
5318
- idle: output.idle !== undefined && output.idle !== null
5319
- ? deserializeAws_restJson1Duration(output.idle, context)
5320
- : undefined,
5321
- perRequest: output.perRequest !== undefined && output.perRequest !== null
5322
- ? deserializeAws_restJson1Duration(output.perRequest, context)
5323
- : undefined,
5157
+ idle: output.idle != null ? deserializeAws_restJson1Duration(output.idle, context) : undefined,
5158
+ perRequest: output.perRequest != null ? deserializeAws_restJson1Duration(output.perRequest, context) : undefined,
5324
5159
  };
5325
5160
  };
5326
5161
  const deserializeAws_restJson1HeaderMatchMethod = (output, context) => {
@@ -5356,28 +5191,20 @@ const deserializeAws_restJson1HealthCheckPolicy = (output, context) => {
5356
5191
  };
5357
5192
  const deserializeAws_restJson1HttpGatewayRoute = (output, context) => {
5358
5193
  return {
5359
- action: output.action !== undefined && output.action !== null
5360
- ? deserializeAws_restJson1HttpGatewayRouteAction(output.action, context)
5361
- : undefined,
5362
- match: output.match !== undefined && output.match !== null
5363
- ? deserializeAws_restJson1HttpGatewayRouteMatch(output.match, context)
5364
- : undefined,
5194
+ action: output.action != null ? deserializeAws_restJson1HttpGatewayRouteAction(output.action, context) : undefined,
5195
+ match: output.match != null ? deserializeAws_restJson1HttpGatewayRouteMatch(output.match, context) : undefined,
5365
5196
  };
5366
5197
  };
5367
5198
  const deserializeAws_restJson1HttpGatewayRouteAction = (output, context) => {
5368
5199
  return {
5369
- rewrite: output.rewrite !== undefined && output.rewrite !== null
5370
- ? deserializeAws_restJson1HttpGatewayRouteRewrite(output.rewrite, context)
5371
- : undefined,
5372
- target: output.target !== undefined && output.target !== null
5373
- ? deserializeAws_restJson1GatewayRouteTarget(output.target, context)
5374
- : undefined,
5200
+ rewrite: output.rewrite != null ? deserializeAws_restJson1HttpGatewayRouteRewrite(output.rewrite, context) : undefined,
5201
+ target: output.target != null ? deserializeAws_restJson1GatewayRouteTarget(output.target, context) : undefined,
5375
5202
  };
5376
5203
  };
5377
5204
  const deserializeAws_restJson1HttpGatewayRouteHeader = (output, context) => {
5378
5205
  return {
5379
5206
  invert: (0, smithy_client_1.expectBoolean)(output.invert),
5380
- match: output.match !== undefined && output.match !== null
5207
+ match: output.match != null
5381
5208
  ? deserializeAws_restJson1HeaderMatchMethod((0, smithy_client_1.expectUnion)(output.match), context)
5382
5209
  : undefined,
5383
5210
  name: (0, smithy_client_1.expectString)(output.name),
@@ -5396,18 +5223,12 @@ const deserializeAws_restJson1HttpGatewayRouteHeaders = (output, context) => {
5396
5223
  };
5397
5224
  const deserializeAws_restJson1HttpGatewayRouteMatch = (output, context) => {
5398
5225
  return {
5399
- headers: output.headers !== undefined && output.headers !== null
5400
- ? deserializeAws_restJson1HttpGatewayRouteHeaders(output.headers, context)
5401
- : undefined,
5402
- hostname: output.hostname !== undefined && output.hostname !== null
5403
- ? deserializeAws_restJson1GatewayRouteHostnameMatch(output.hostname, context)
5404
- : undefined,
5226
+ headers: output.headers != null ? deserializeAws_restJson1HttpGatewayRouteHeaders(output.headers, context) : undefined,
5227
+ hostname: output.hostname != null ? deserializeAws_restJson1GatewayRouteHostnameMatch(output.hostname, context) : undefined,
5405
5228
  method: (0, smithy_client_1.expectString)(output.method),
5406
- path: output.path !== undefined && output.path !== null
5407
- ? deserializeAws_restJson1HttpPathMatch(output.path, context)
5408
- : undefined,
5229
+ path: output.path != null ? deserializeAws_restJson1HttpPathMatch(output.path, context) : undefined,
5409
5230
  prefix: (0, smithy_client_1.expectString)(output.prefix),
5410
- queryParameters: output.queryParameters !== undefined && output.queryParameters !== null
5231
+ queryParameters: output.queryParameters != null
5411
5232
  ? deserializeAws_restJson1HttpQueryParameters(output.queryParameters, context)
5412
5233
  : undefined,
5413
5234
  };
@@ -5425,15 +5246,11 @@ const deserializeAws_restJson1HttpGatewayRoutePrefixRewrite = (output, context)
5425
5246
  };
5426
5247
  const deserializeAws_restJson1HttpGatewayRouteRewrite = (output, context) => {
5427
5248
  return {
5428
- hostname: output.hostname !== undefined && output.hostname !== null
5249
+ hostname: output.hostname != null
5429
5250
  ? deserializeAws_restJson1GatewayRouteHostnameRewrite(output.hostname, context)
5430
5251
  : undefined,
5431
- path: output.path !== undefined && output.path !== null
5432
- ? deserializeAws_restJson1HttpGatewayRoutePathRewrite(output.path, context)
5433
- : undefined,
5434
- prefix: output.prefix !== undefined && output.prefix !== null
5435
- ? deserializeAws_restJson1HttpGatewayRoutePrefixRewrite(output.prefix, context)
5436
- : undefined,
5252
+ path: output.path != null ? deserializeAws_restJson1HttpGatewayRoutePathRewrite(output.path, context) : undefined,
5253
+ prefix: output.prefix != null ? deserializeAws_restJson1HttpGatewayRoutePrefixRewrite(output.prefix, context) : undefined,
5437
5254
  };
5438
5255
  };
5439
5256
  const deserializeAws_restJson1HttpPathMatch = (output, context) => {
@@ -5444,9 +5261,7 @@ const deserializeAws_restJson1HttpPathMatch = (output, context) => {
5444
5261
  };
5445
5262
  const deserializeAws_restJson1HttpQueryParameter = (output, context) => {
5446
5263
  return {
5447
- match: output.match !== undefined && output.match !== null
5448
- ? deserializeAws_restJson1QueryParameterMatch(output.match, context)
5449
- : undefined,
5264
+ match: output.match != null ? deserializeAws_restJson1QueryParameterMatch(output.match, context) : undefined,
5450
5265
  name: (0, smithy_client_1.expectString)(output.name),
5451
5266
  };
5452
5267
  };
@@ -5463,14 +5278,12 @@ const deserializeAws_restJson1HttpQueryParameters = (output, context) => {
5463
5278
  };
5464
5279
  const deserializeAws_restJson1HttpRetryPolicy = (output, context) => {
5465
5280
  return {
5466
- httpRetryEvents: output.httpRetryEvents !== undefined && output.httpRetryEvents !== null
5281
+ httpRetryEvents: output.httpRetryEvents != null
5467
5282
  ? deserializeAws_restJson1HttpRetryPolicyEvents(output.httpRetryEvents, context)
5468
5283
  : undefined,
5469
5284
  maxRetries: (0, smithy_client_1.expectLong)(output.maxRetries),
5470
- perRetryTimeout: output.perRetryTimeout !== undefined && output.perRetryTimeout !== null
5471
- ? deserializeAws_restJson1Duration(output.perRetryTimeout, context)
5472
- : undefined,
5473
- tcpRetryEvents: output.tcpRetryEvents !== undefined && output.tcpRetryEvents !== null
5285
+ perRetryTimeout: output.perRetryTimeout != null ? deserializeAws_restJson1Duration(output.perRetryTimeout, context) : undefined,
5286
+ tcpRetryEvents: output.tcpRetryEvents != null
5474
5287
  ? deserializeAws_restJson1TcpRetryPolicyEvents(output.tcpRetryEvents, context)
5475
5288
  : undefined,
5476
5289
  };
@@ -5488,23 +5301,15 @@ const deserializeAws_restJson1HttpRetryPolicyEvents = (output, context) => {
5488
5301
  };
5489
5302
  const deserializeAws_restJson1HttpRoute = (output, context) => {
5490
5303
  return {
5491
- action: output.action !== undefined && output.action !== null
5492
- ? deserializeAws_restJson1HttpRouteAction(output.action, context)
5493
- : undefined,
5494
- match: output.match !== undefined && output.match !== null
5495
- ? deserializeAws_restJson1HttpRouteMatch(output.match, context)
5496
- : undefined,
5497
- retryPolicy: output.retryPolicy !== undefined && output.retryPolicy !== null
5498
- ? deserializeAws_restJson1HttpRetryPolicy(output.retryPolicy, context)
5499
- : undefined,
5500
- timeout: output.timeout !== undefined && output.timeout !== null
5501
- ? deserializeAws_restJson1HttpTimeout(output.timeout, context)
5502
- : undefined,
5304
+ action: output.action != null ? deserializeAws_restJson1HttpRouteAction(output.action, context) : undefined,
5305
+ match: output.match != null ? deserializeAws_restJson1HttpRouteMatch(output.match, context) : undefined,
5306
+ retryPolicy: output.retryPolicy != null ? deserializeAws_restJson1HttpRetryPolicy(output.retryPolicy, context) : undefined,
5307
+ timeout: output.timeout != null ? deserializeAws_restJson1HttpTimeout(output.timeout, context) : undefined,
5503
5308
  };
5504
5309
  };
5505
5310
  const deserializeAws_restJson1HttpRouteAction = (output, context) => {
5506
5311
  return {
5507
- weightedTargets: output.weightedTargets !== undefined && output.weightedTargets !== null
5312
+ weightedTargets: output.weightedTargets != null
5508
5313
  ? deserializeAws_restJson1WeightedTargets(output.weightedTargets, context)
5509
5314
  : undefined,
5510
5315
  };
@@ -5512,7 +5317,7 @@ const deserializeAws_restJson1HttpRouteAction = (output, context) => {
5512
5317
  const deserializeAws_restJson1HttpRouteHeader = (output, context) => {
5513
5318
  return {
5514
5319
  invert: (0, smithy_client_1.expectBoolean)(output.invert),
5515
- match: output.match !== undefined && output.match !== null
5320
+ match: output.match != null
5516
5321
  ? deserializeAws_restJson1HeaderMatchMethod((0, smithy_client_1.expectUnion)(output.match), context)
5517
5322
  : undefined,
5518
5323
  name: (0, smithy_client_1.expectString)(output.name),
@@ -5531,15 +5336,11 @@ const deserializeAws_restJson1HttpRouteHeaders = (output, context) => {
5531
5336
  };
5532
5337
  const deserializeAws_restJson1HttpRouteMatch = (output, context) => {
5533
5338
  return {
5534
- headers: output.headers !== undefined && output.headers !== null
5535
- ? deserializeAws_restJson1HttpRouteHeaders(output.headers, context)
5536
- : undefined,
5339
+ headers: output.headers != null ? deserializeAws_restJson1HttpRouteHeaders(output.headers, context) : undefined,
5537
5340
  method: (0, smithy_client_1.expectString)(output.method),
5538
- path: output.path !== undefined && output.path !== null
5539
- ? deserializeAws_restJson1HttpPathMatch(output.path, context)
5540
- : undefined,
5341
+ path: output.path != null ? deserializeAws_restJson1HttpPathMatch(output.path, context) : undefined,
5541
5342
  prefix: (0, smithy_client_1.expectString)(output.prefix),
5542
- queryParameters: output.queryParameters !== undefined && output.queryParameters !== null
5343
+ queryParameters: output.queryParameters != null
5543
5344
  ? deserializeAws_restJson1HttpQueryParameters(output.queryParameters, context)
5544
5345
  : undefined,
5545
5346
  scheme: (0, smithy_client_1.expectString)(output.scheme),
@@ -5547,34 +5348,24 @@ const deserializeAws_restJson1HttpRouteMatch = (output, context) => {
5547
5348
  };
5548
5349
  const deserializeAws_restJson1HttpTimeout = (output, context) => {
5549
5350
  return {
5550
- idle: output.idle !== undefined && output.idle !== null
5551
- ? deserializeAws_restJson1Duration(output.idle, context)
5552
- : undefined,
5553
- perRequest: output.perRequest !== undefined && output.perRequest !== null
5554
- ? deserializeAws_restJson1Duration(output.perRequest, context)
5555
- : undefined,
5351
+ idle: output.idle != null ? deserializeAws_restJson1Duration(output.idle, context) : undefined,
5352
+ perRequest: output.perRequest != null ? deserializeAws_restJson1Duration(output.perRequest, context) : undefined,
5556
5353
  };
5557
5354
  };
5558
5355
  const deserializeAws_restJson1Listener = (output, context) => {
5559
5356
  return {
5560
- connectionPool: output.connectionPool !== undefined && output.connectionPool !== null
5357
+ connectionPool: output.connectionPool != null
5561
5358
  ? deserializeAws_restJson1VirtualNodeConnectionPool((0, smithy_client_1.expectUnion)(output.connectionPool), context)
5562
5359
  : undefined,
5563
- healthCheck: output.healthCheck !== undefined && output.healthCheck !== null
5564
- ? deserializeAws_restJson1HealthCheckPolicy(output.healthCheck, context)
5565
- : undefined,
5566
- outlierDetection: output.outlierDetection !== undefined && output.outlierDetection !== null
5360
+ healthCheck: output.healthCheck != null ? deserializeAws_restJson1HealthCheckPolicy(output.healthCheck, context) : undefined,
5361
+ outlierDetection: output.outlierDetection != null
5567
5362
  ? deserializeAws_restJson1OutlierDetection(output.outlierDetection, context)
5568
5363
  : undefined,
5569
- portMapping: output.portMapping !== undefined && output.portMapping !== null
5570
- ? deserializeAws_restJson1PortMapping(output.portMapping, context)
5571
- : undefined,
5572
- timeout: output.timeout !== undefined && output.timeout !== null
5364
+ portMapping: output.portMapping != null ? deserializeAws_restJson1PortMapping(output.portMapping, context) : undefined,
5365
+ timeout: output.timeout != null
5573
5366
  ? deserializeAws_restJson1ListenerTimeout((0, smithy_client_1.expectUnion)(output.timeout), context)
5574
5367
  : undefined,
5575
- tls: output.tls !== undefined && output.tls !== null
5576
- ? deserializeAws_restJson1ListenerTls(output.tls, context)
5577
- : undefined,
5368
+ tls: output.tls != null ? deserializeAws_restJson1ListenerTls(output.tls, context) : undefined,
5578
5369
  };
5579
5370
  };
5580
5371
  const deserializeAws_restJson1Listeners = (output, context) => {
@@ -5613,11 +5404,11 @@ const deserializeAws_restJson1ListenerTimeout = (output, context) => {
5613
5404
  };
5614
5405
  const deserializeAws_restJson1ListenerTls = (output, context) => {
5615
5406
  return {
5616
- certificate: output.certificate !== undefined && output.certificate !== null
5407
+ certificate: output.certificate != null
5617
5408
  ? deserializeAws_restJson1ListenerTlsCertificate((0, smithy_client_1.expectUnion)(output.certificate), context)
5618
5409
  : undefined,
5619
5410
  mode: (0, smithy_client_1.expectString)(output.mode),
5620
- validation: output.validation !== undefined && output.validation !== null
5411
+ validation: output.validation != null
5621
5412
  ? deserializeAws_restJson1ListenerTlsValidationContext(output.validation, context)
5622
5413
  : undefined,
5623
5414
  };
@@ -5658,10 +5449,10 @@ const deserializeAws_restJson1ListenerTlsSdsCertificate = (output, context) => {
5658
5449
  };
5659
5450
  const deserializeAws_restJson1ListenerTlsValidationContext = (output, context) => {
5660
5451
  return {
5661
- subjectAlternativeNames: output.subjectAlternativeNames !== undefined && output.subjectAlternativeNames !== null
5452
+ subjectAlternativeNames: output.subjectAlternativeNames != null
5662
5453
  ? deserializeAws_restJson1SubjectAlternativeNames(output.subjectAlternativeNames, context)
5663
5454
  : undefined,
5664
- trust: output.trust !== undefined && output.trust !== null
5455
+ trust: output.trust != null
5665
5456
  ? deserializeAws_restJson1ListenerTlsValidationContextTrust((0, smithy_client_1.expectUnion)(output.trust), context)
5666
5457
  : undefined,
5667
5458
  };
@@ -5681,7 +5472,7 @@ const deserializeAws_restJson1ListenerTlsValidationContextTrust = (output, conte
5681
5472
  };
5682
5473
  const deserializeAws_restJson1Logging = (output, context) => {
5683
5474
  return {
5684
- accessLog: output.accessLog !== undefined && output.accessLog !== null
5475
+ accessLog: output.accessLog != null
5685
5476
  ? deserializeAws_restJson1AccessLog((0, smithy_client_1.expectUnion)(output.accessLog), context)
5686
5477
  : undefined,
5687
5478
  };
@@ -5695,15 +5486,9 @@ const deserializeAws_restJson1MatchRange = (output, context) => {
5695
5486
  const deserializeAws_restJson1MeshData = (output, context) => {
5696
5487
  return {
5697
5488
  meshName: (0, smithy_client_1.expectString)(output.meshName),
5698
- metadata: output.metadata !== undefined && output.metadata !== null
5699
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
5700
- : undefined,
5701
- spec: output.spec !== undefined && output.spec !== null
5702
- ? deserializeAws_restJson1MeshSpec(output.spec, context)
5703
- : undefined,
5704
- status: output.status !== undefined && output.status !== null
5705
- ? deserializeAws_restJson1MeshStatus(output.status, context)
5706
- : undefined,
5489
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
5490
+ spec: output.spec != null ? deserializeAws_restJson1MeshSpec(output.spec, context) : undefined,
5491
+ status: output.status != null ? deserializeAws_restJson1MeshStatus(output.status, context) : undefined,
5707
5492
  };
5708
5493
  };
5709
5494
  const deserializeAws_restJson1MeshList = (output, context) => {
@@ -5720,10 +5505,8 @@ const deserializeAws_restJson1MeshList = (output, context) => {
5720
5505
  const deserializeAws_restJson1MeshRef = (output, context) => {
5721
5506
  return {
5722
5507
  arn: (0, smithy_client_1.expectString)(output.arn),
5723
- createdAt: output.createdAt !== undefined && output.createdAt !== null
5724
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
5725
- : undefined,
5726
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
5508
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
5509
+ lastUpdatedAt: output.lastUpdatedAt != null
5727
5510
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
5728
5511
  : undefined,
5729
5512
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -5739,10 +5522,8 @@ const deserializeAws_restJson1MeshServiceDiscovery = (output, context) => {
5739
5522
  };
5740
5523
  const deserializeAws_restJson1MeshSpec = (output, context) => {
5741
5524
  return {
5742
- egressFilter: output.egressFilter !== undefined && output.egressFilter !== null
5743
- ? deserializeAws_restJson1EgressFilter(output.egressFilter, context)
5744
- : undefined,
5745
- serviceDiscovery: output.serviceDiscovery !== undefined && output.serviceDiscovery !== null
5525
+ egressFilter: output.egressFilter != null ? deserializeAws_restJson1EgressFilter(output.egressFilter, context) : undefined,
5526
+ serviceDiscovery: output.serviceDiscovery != null
5746
5527
  ? deserializeAws_restJson1MeshServiceDiscovery(output.serviceDiscovery, context)
5747
5528
  : undefined,
5748
5529
  };
@@ -5754,12 +5535,10 @@ const deserializeAws_restJson1MeshStatus = (output, context) => {
5754
5535
  };
5755
5536
  const deserializeAws_restJson1OutlierDetection = (output, context) => {
5756
5537
  return {
5757
- baseEjectionDuration: output.baseEjectionDuration !== undefined && output.baseEjectionDuration !== null
5538
+ baseEjectionDuration: output.baseEjectionDuration != null
5758
5539
  ? deserializeAws_restJson1Duration(output.baseEjectionDuration, context)
5759
5540
  : undefined,
5760
- interval: output.interval !== undefined && output.interval !== null
5761
- ? deserializeAws_restJson1Duration(output.interval, context)
5762
- : undefined,
5541
+ interval: output.interval != null ? deserializeAws_restJson1Duration(output.interval, context) : undefined,
5763
5542
  maxEjectionPercent: (0, smithy_client_1.expectInt32)(output.maxEjectionPercent),
5764
5543
  maxServerErrors: (0, smithy_client_1.expectLong)(output.maxServerErrors),
5765
5544
  };
@@ -5789,10 +5568,8 @@ const deserializeAws_restJson1QueryParameterMatch = (output, context) => {
5789
5568
  const deserializeAws_restJson1ResourceMetadata = (output, context) => {
5790
5569
  return {
5791
5570
  arn: (0, smithy_client_1.expectString)(output.arn),
5792
- createdAt: output.createdAt !== undefined && output.createdAt !== null
5793
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
5794
- : undefined,
5795
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
5571
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
5572
+ lastUpdatedAt: output.lastUpdatedAt != null
5796
5573
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
5797
5574
  : undefined,
5798
5575
  meshOwner: (0, smithy_client_1.expectString)(output.meshOwner),
@@ -5804,16 +5581,10 @@ const deserializeAws_restJson1ResourceMetadata = (output, context) => {
5804
5581
  const deserializeAws_restJson1RouteData = (output, context) => {
5805
5582
  return {
5806
5583
  meshName: (0, smithy_client_1.expectString)(output.meshName),
5807
- metadata: output.metadata !== undefined && output.metadata !== null
5808
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
5809
- : undefined,
5584
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
5810
5585
  routeName: (0, smithy_client_1.expectString)(output.routeName),
5811
- spec: output.spec !== undefined && output.spec !== null
5812
- ? deserializeAws_restJson1RouteSpec(output.spec, context)
5813
- : undefined,
5814
- status: output.status !== undefined && output.status !== null
5815
- ? deserializeAws_restJson1RouteStatus(output.status, context)
5816
- : undefined,
5586
+ spec: output.spec != null ? deserializeAws_restJson1RouteSpec(output.spec, context) : undefined,
5587
+ status: output.status != null ? deserializeAws_restJson1RouteStatus(output.status, context) : undefined,
5817
5588
  virtualRouterName: (0, smithy_client_1.expectString)(output.virtualRouterName),
5818
5589
  };
5819
5590
  };
@@ -5831,10 +5602,8 @@ const deserializeAws_restJson1RouteList = (output, context) => {
5831
5602
  const deserializeAws_restJson1RouteRef = (output, context) => {
5832
5603
  return {
5833
5604
  arn: (0, smithy_client_1.expectString)(output.arn),
5834
- createdAt: output.createdAt !== undefined && output.createdAt !== null
5835
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
5836
- : undefined,
5837
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
5605
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
5606
+ lastUpdatedAt: output.lastUpdatedAt != null
5838
5607
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
5839
5608
  : undefined,
5840
5609
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -5847,19 +5616,11 @@ const deserializeAws_restJson1RouteRef = (output, context) => {
5847
5616
  };
5848
5617
  const deserializeAws_restJson1RouteSpec = (output, context) => {
5849
5618
  return {
5850
- grpcRoute: output.grpcRoute !== undefined && output.grpcRoute !== null
5851
- ? deserializeAws_restJson1GrpcRoute(output.grpcRoute, context)
5852
- : undefined,
5853
- http2Route: output.http2Route !== undefined && output.http2Route !== null
5854
- ? deserializeAws_restJson1HttpRoute(output.http2Route, context)
5855
- : undefined,
5856
- httpRoute: output.httpRoute !== undefined && output.httpRoute !== null
5857
- ? deserializeAws_restJson1HttpRoute(output.httpRoute, context)
5858
- : undefined,
5619
+ grpcRoute: output.grpcRoute != null ? deserializeAws_restJson1GrpcRoute(output.grpcRoute, context) : undefined,
5620
+ http2Route: output.http2Route != null ? deserializeAws_restJson1HttpRoute(output.http2Route, context) : undefined,
5621
+ httpRoute: output.httpRoute != null ? deserializeAws_restJson1HttpRoute(output.httpRoute, context) : undefined,
5859
5622
  priority: (0, smithy_client_1.expectInt32)(output.priority),
5860
- tcpRoute: output.tcpRoute !== undefined && output.tcpRoute !== null
5861
- ? deserializeAws_restJson1TcpRoute(output.tcpRoute, context)
5862
- : undefined,
5623
+ tcpRoute: output.tcpRoute != null ? deserializeAws_restJson1TcpRoute(output.tcpRoute, context) : undefined,
5863
5624
  };
5864
5625
  };
5865
5626
  const deserializeAws_restJson1RouteStatus = (output, context) => {
@@ -5893,16 +5654,12 @@ const deserializeAws_restJson1SubjectAlternativeNameList = (output, context) =>
5893
5654
  };
5894
5655
  const deserializeAws_restJson1SubjectAlternativeNameMatchers = (output, context) => {
5895
5656
  return {
5896
- exact: output.exact !== undefined && output.exact !== null
5897
- ? deserializeAws_restJson1SubjectAlternativeNameList(output.exact, context)
5898
- : undefined,
5657
+ exact: output.exact != null ? deserializeAws_restJson1SubjectAlternativeNameList(output.exact, context) : undefined,
5899
5658
  };
5900
5659
  };
5901
5660
  const deserializeAws_restJson1SubjectAlternativeNames = (output, context) => {
5902
5661
  return {
5903
- match: output.match !== undefined && output.match !== null
5904
- ? deserializeAws_restJson1SubjectAlternativeNameMatchers(output.match, context)
5905
- : undefined,
5662
+ match: output.match != null ? deserializeAws_restJson1SubjectAlternativeNameMatchers(output.match, context) : undefined,
5906
5663
  };
5907
5664
  };
5908
5665
  const deserializeAws_restJson1TagList = (output, context) => {
@@ -5935,41 +5692,35 @@ const deserializeAws_restJson1TcpRetryPolicyEvents = (output, context) => {
5935
5692
  };
5936
5693
  const deserializeAws_restJson1TcpRoute = (output, context) => {
5937
5694
  return {
5938
- action: output.action !== undefined && output.action !== null
5939
- ? deserializeAws_restJson1TcpRouteAction(output.action, context)
5940
- : undefined,
5941
- timeout: output.timeout !== undefined && output.timeout !== null
5942
- ? deserializeAws_restJson1TcpTimeout(output.timeout, context)
5943
- : undefined,
5695
+ action: output.action != null ? deserializeAws_restJson1TcpRouteAction(output.action, context) : undefined,
5696
+ timeout: output.timeout != null ? deserializeAws_restJson1TcpTimeout(output.timeout, context) : undefined,
5944
5697
  };
5945
5698
  };
5946
5699
  const deserializeAws_restJson1TcpRouteAction = (output, context) => {
5947
5700
  return {
5948
- weightedTargets: output.weightedTargets !== undefined && output.weightedTargets !== null
5701
+ weightedTargets: output.weightedTargets != null
5949
5702
  ? deserializeAws_restJson1WeightedTargets(output.weightedTargets, context)
5950
5703
  : undefined,
5951
5704
  };
5952
5705
  };
5953
5706
  const deserializeAws_restJson1TcpTimeout = (output, context) => {
5954
5707
  return {
5955
- idle: output.idle !== undefined && output.idle !== null
5956
- ? deserializeAws_restJson1Duration(output.idle, context)
5957
- : undefined,
5708
+ idle: output.idle != null ? deserializeAws_restJson1Duration(output.idle, context) : undefined,
5958
5709
  };
5959
5710
  };
5960
5711
  const deserializeAws_restJson1TlsValidationContext = (output, context) => {
5961
5712
  return {
5962
- subjectAlternativeNames: output.subjectAlternativeNames !== undefined && output.subjectAlternativeNames !== null
5713
+ subjectAlternativeNames: output.subjectAlternativeNames != null
5963
5714
  ? deserializeAws_restJson1SubjectAlternativeNames(output.subjectAlternativeNames, context)
5964
5715
  : undefined,
5965
- trust: output.trust !== undefined && output.trust !== null
5716
+ trust: output.trust != null
5966
5717
  ? deserializeAws_restJson1TlsValidationContextTrust((0, smithy_client_1.expectUnion)(output.trust), context)
5967
5718
  : undefined,
5968
5719
  };
5969
5720
  };
5970
5721
  const deserializeAws_restJson1TlsValidationContextAcmTrust = (output, context) => {
5971
5722
  return {
5972
- certificateAuthorityArns: output.certificateAuthorityArns !== undefined && output.certificateAuthorityArns !== null
5723
+ certificateAuthorityArns: output.certificateAuthorityArns != null
5973
5724
  ? deserializeAws_restJson1CertificateAuthorityArns(output.certificateAuthorityArns, context)
5974
5725
  : undefined,
5975
5726
  };
@@ -6012,7 +5763,7 @@ const deserializeAws_restJson1VirtualGatewayAccessLog = (output, context) => {
6012
5763
  };
6013
5764
  const deserializeAws_restJson1VirtualGatewayBackendDefaults = (output, context) => {
6014
5765
  return {
6015
- clientPolicy: output.clientPolicy !== undefined && output.clientPolicy !== null
5766
+ clientPolicy: output.clientPolicy != null
6016
5767
  ? deserializeAws_restJson1VirtualGatewayClientPolicy(output.clientPolicy, context)
6017
5768
  : undefined,
6018
5769
  };
@@ -6030,21 +5781,17 @@ const deserializeAws_restJson1VirtualGatewayCertificateAuthorityArns = (output,
6030
5781
  };
6031
5782
  const deserializeAws_restJson1VirtualGatewayClientPolicy = (output, context) => {
6032
5783
  return {
6033
- tls: output.tls !== undefined && output.tls !== null
6034
- ? deserializeAws_restJson1VirtualGatewayClientPolicyTls(output.tls, context)
6035
- : undefined,
5784
+ tls: output.tls != null ? deserializeAws_restJson1VirtualGatewayClientPolicyTls(output.tls, context) : undefined,
6036
5785
  };
6037
5786
  };
6038
5787
  const deserializeAws_restJson1VirtualGatewayClientPolicyTls = (output, context) => {
6039
5788
  return {
6040
- certificate: output.certificate !== undefined && output.certificate !== null
5789
+ certificate: output.certificate != null
6041
5790
  ? deserializeAws_restJson1VirtualGatewayClientTlsCertificate((0, smithy_client_1.expectUnion)(output.certificate), context)
6042
5791
  : undefined,
6043
5792
  enforce: (0, smithy_client_1.expectBoolean)(output.enforce),
6044
- ports: output.ports !== undefined && output.ports !== null
6045
- ? deserializeAws_restJson1PortSet(output.ports, context)
6046
- : undefined,
6047
- validation: output.validation !== undefined && output.validation !== null
5793
+ ports: output.ports != null ? deserializeAws_restJson1PortSet(output.ports, context) : undefined,
5794
+ validation: output.validation != null
6048
5795
  ? deserializeAws_restJson1VirtualGatewayTlsValidationContext(output.validation, context)
6049
5796
  : undefined,
6050
5797
  };
@@ -6083,15 +5830,9 @@ const deserializeAws_restJson1VirtualGatewayConnectionPool = (output, context) =
6083
5830
  const deserializeAws_restJson1VirtualGatewayData = (output, context) => {
6084
5831
  return {
6085
5832
  meshName: (0, smithy_client_1.expectString)(output.meshName),
6086
- metadata: output.metadata !== undefined && output.metadata !== null
6087
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
6088
- : undefined,
6089
- spec: output.spec !== undefined && output.spec !== null
6090
- ? deserializeAws_restJson1VirtualGatewaySpec(output.spec, context)
6091
- : undefined,
6092
- status: output.status !== undefined && output.status !== null
6093
- ? deserializeAws_restJson1VirtualGatewayStatus(output.status, context)
6094
- : undefined,
5833
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
5834
+ spec: output.spec != null ? deserializeAws_restJson1VirtualGatewaySpec(output.spec, context) : undefined,
5835
+ status: output.status != null ? deserializeAws_restJson1VirtualGatewayStatus(output.status, context) : undefined,
6095
5836
  virtualGatewayName: (0, smithy_client_1.expectString)(output.virtualGatewayName),
6096
5837
  };
6097
5838
  };
@@ -6140,18 +5881,16 @@ const deserializeAws_restJson1VirtualGatewayList = (output, context) => {
6140
5881
  };
6141
5882
  const deserializeAws_restJson1VirtualGatewayListener = (output, context) => {
6142
5883
  return {
6143
- connectionPool: output.connectionPool !== undefined && output.connectionPool !== null
5884
+ connectionPool: output.connectionPool != null
6144
5885
  ? deserializeAws_restJson1VirtualGatewayConnectionPool((0, smithy_client_1.expectUnion)(output.connectionPool), context)
6145
5886
  : undefined,
6146
- healthCheck: output.healthCheck !== undefined && output.healthCheck !== null
5887
+ healthCheck: output.healthCheck != null
6147
5888
  ? deserializeAws_restJson1VirtualGatewayHealthCheckPolicy(output.healthCheck, context)
6148
5889
  : undefined,
6149
- portMapping: output.portMapping !== undefined && output.portMapping !== null
5890
+ portMapping: output.portMapping != null
6150
5891
  ? deserializeAws_restJson1VirtualGatewayPortMapping(output.portMapping, context)
6151
5892
  : undefined,
6152
- tls: output.tls !== undefined && output.tls !== null
6153
- ? deserializeAws_restJson1VirtualGatewayListenerTls(output.tls, context)
6154
- : undefined,
5893
+ tls: output.tls != null ? deserializeAws_restJson1VirtualGatewayListenerTls(output.tls, context) : undefined,
6155
5894
  };
6156
5895
  };
6157
5896
  const deserializeAws_restJson1VirtualGatewayListeners = (output, context) => {
@@ -6167,11 +5906,11 @@ const deserializeAws_restJson1VirtualGatewayListeners = (output, context) => {
6167
5906
  };
6168
5907
  const deserializeAws_restJson1VirtualGatewayListenerTls = (output, context) => {
6169
5908
  return {
6170
- certificate: output.certificate !== undefined && output.certificate !== null
5909
+ certificate: output.certificate != null
6171
5910
  ? deserializeAws_restJson1VirtualGatewayListenerTlsCertificate((0, smithy_client_1.expectUnion)(output.certificate), context)
6172
5911
  : undefined,
6173
5912
  mode: (0, smithy_client_1.expectString)(output.mode),
6174
- validation: output.validation !== undefined && output.validation !== null
5913
+ validation: output.validation != null
6175
5914
  ? deserializeAws_restJson1VirtualGatewayListenerTlsValidationContext(output.validation, context)
6176
5915
  : undefined,
6177
5916
  };
@@ -6212,10 +5951,10 @@ const deserializeAws_restJson1VirtualGatewayListenerTlsSdsCertificate = (output,
6212
5951
  };
6213
5952
  const deserializeAws_restJson1VirtualGatewayListenerTlsValidationContext = (output, context) => {
6214
5953
  return {
6215
- subjectAlternativeNames: output.subjectAlternativeNames !== undefined && output.subjectAlternativeNames !== null
5954
+ subjectAlternativeNames: output.subjectAlternativeNames != null
6216
5955
  ? deserializeAws_restJson1SubjectAlternativeNames(output.subjectAlternativeNames, context)
6217
5956
  : undefined,
6218
- trust: output.trust !== undefined && output.trust !== null
5957
+ trust: output.trust != null
6219
5958
  ? deserializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust((0, smithy_client_1.expectUnion)(output.trust), context)
6220
5959
  : undefined,
6221
5960
  };
@@ -6235,7 +5974,7 @@ const deserializeAws_restJson1VirtualGatewayListenerTlsValidationContextTrust =
6235
5974
  };
6236
5975
  const deserializeAws_restJson1VirtualGatewayLogging = (output, context) => {
6237
5976
  return {
6238
- accessLog: output.accessLog !== undefined && output.accessLog !== null
5977
+ accessLog: output.accessLog != null
6239
5978
  ? deserializeAws_restJson1VirtualGatewayAccessLog((0, smithy_client_1.expectUnion)(output.accessLog), context)
6240
5979
  : undefined,
6241
5980
  };
@@ -6249,10 +5988,8 @@ const deserializeAws_restJson1VirtualGatewayPortMapping = (output, context) => {
6249
5988
  const deserializeAws_restJson1VirtualGatewayRef = (output, context) => {
6250
5989
  return {
6251
5990
  arn: (0, smithy_client_1.expectString)(output.arn),
6252
- createdAt: output.createdAt !== undefined && output.createdAt !== null
6253
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
6254
- : undefined,
6255
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
5991
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
5992
+ lastUpdatedAt: output.lastUpdatedAt != null
6256
5993
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
6257
5994
  : undefined,
6258
5995
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -6264,15 +6001,11 @@ const deserializeAws_restJson1VirtualGatewayRef = (output, context) => {
6264
6001
  };
6265
6002
  const deserializeAws_restJson1VirtualGatewaySpec = (output, context) => {
6266
6003
  return {
6267
- backendDefaults: output.backendDefaults !== undefined && output.backendDefaults !== null
6004
+ backendDefaults: output.backendDefaults != null
6268
6005
  ? deserializeAws_restJson1VirtualGatewayBackendDefaults(output.backendDefaults, context)
6269
6006
  : undefined,
6270
- listeners: output.listeners !== undefined && output.listeners !== null
6271
- ? deserializeAws_restJson1VirtualGatewayListeners(output.listeners, context)
6272
- : undefined,
6273
- logging: output.logging !== undefined && output.logging !== null
6274
- ? deserializeAws_restJson1VirtualGatewayLogging(output.logging, context)
6275
- : undefined,
6007
+ listeners: output.listeners != null ? deserializeAws_restJson1VirtualGatewayListeners(output.listeners, context) : undefined,
6008
+ logging: output.logging != null ? deserializeAws_restJson1VirtualGatewayLogging(output.logging, context) : undefined,
6276
6009
  };
6277
6010
  };
6278
6011
  const deserializeAws_restJson1VirtualGatewayStatus = (output, context) => {
@@ -6282,17 +6015,17 @@ const deserializeAws_restJson1VirtualGatewayStatus = (output, context) => {
6282
6015
  };
6283
6016
  const deserializeAws_restJson1VirtualGatewayTlsValidationContext = (output, context) => {
6284
6017
  return {
6285
- subjectAlternativeNames: output.subjectAlternativeNames !== undefined && output.subjectAlternativeNames !== null
6018
+ subjectAlternativeNames: output.subjectAlternativeNames != null
6286
6019
  ? deserializeAws_restJson1SubjectAlternativeNames(output.subjectAlternativeNames, context)
6287
6020
  : undefined,
6288
- trust: output.trust !== undefined && output.trust !== null
6021
+ trust: output.trust != null
6289
6022
  ? deserializeAws_restJson1VirtualGatewayTlsValidationContextTrust((0, smithy_client_1.expectUnion)(output.trust), context)
6290
6023
  : undefined,
6291
6024
  };
6292
6025
  };
6293
6026
  const deserializeAws_restJson1VirtualGatewayTlsValidationContextAcmTrust = (output, context) => {
6294
6027
  return {
6295
- certificateAuthorityArns: output.certificateAuthorityArns !== undefined && output.certificateAuthorityArns !== null
6028
+ certificateAuthorityArns: output.certificateAuthorityArns != null
6296
6029
  ? deserializeAws_restJson1VirtualGatewayCertificateAuthorityArns(output.certificateAuthorityArns, context)
6297
6030
  : undefined,
6298
6031
  };
@@ -6351,15 +6084,9 @@ const deserializeAws_restJson1VirtualNodeConnectionPool = (output, context) => {
6351
6084
  const deserializeAws_restJson1VirtualNodeData = (output, context) => {
6352
6085
  return {
6353
6086
  meshName: (0, smithy_client_1.expectString)(output.meshName),
6354
- metadata: output.metadata !== undefined && output.metadata !== null
6355
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
6356
- : undefined,
6357
- spec: output.spec !== undefined && output.spec !== null
6358
- ? deserializeAws_restJson1VirtualNodeSpec(output.spec, context)
6359
- : undefined,
6360
- status: output.status !== undefined && output.status !== null
6361
- ? deserializeAws_restJson1VirtualNodeStatus(output.status, context)
6362
- : undefined,
6087
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
6088
+ spec: output.spec != null ? deserializeAws_restJson1VirtualNodeSpec(output.spec, context) : undefined,
6089
+ status: output.status != null ? deserializeAws_restJson1VirtualNodeStatus(output.status, context) : undefined,
6363
6090
  virtualNodeName: (0, smithy_client_1.expectString)(output.virtualNodeName),
6364
6091
  };
6365
6092
  };
@@ -6393,10 +6120,8 @@ const deserializeAws_restJson1VirtualNodeList = (output, context) => {
6393
6120
  const deserializeAws_restJson1VirtualNodeRef = (output, context) => {
6394
6121
  return {
6395
6122
  arn: (0, smithy_client_1.expectString)(output.arn),
6396
- createdAt: output.createdAt !== undefined && output.createdAt !== null
6397
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
6398
- : undefined,
6399
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
6123
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
6124
+ lastUpdatedAt: output.lastUpdatedAt != null
6400
6125
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
6401
6126
  : undefined,
6402
6127
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -6413,19 +6138,13 @@ const deserializeAws_restJson1VirtualNodeServiceProvider = (output, context) =>
6413
6138
  };
6414
6139
  const deserializeAws_restJson1VirtualNodeSpec = (output, context) => {
6415
6140
  return {
6416
- backendDefaults: output.backendDefaults !== undefined && output.backendDefaults !== null
6141
+ backendDefaults: output.backendDefaults != null
6417
6142
  ? deserializeAws_restJson1BackendDefaults(output.backendDefaults, context)
6418
6143
  : undefined,
6419
- backends: output.backends !== undefined && output.backends !== null
6420
- ? deserializeAws_restJson1Backends(output.backends, context)
6421
- : undefined,
6422
- listeners: output.listeners !== undefined && output.listeners !== null
6423
- ? deserializeAws_restJson1Listeners(output.listeners, context)
6424
- : undefined,
6425
- logging: output.logging !== undefined && output.logging !== null
6426
- ? deserializeAws_restJson1Logging(output.logging, context)
6427
- : undefined,
6428
- serviceDiscovery: output.serviceDiscovery !== undefined && output.serviceDiscovery !== null
6144
+ backends: output.backends != null ? deserializeAws_restJson1Backends(output.backends, context) : undefined,
6145
+ listeners: output.listeners != null ? deserializeAws_restJson1Listeners(output.listeners, context) : undefined,
6146
+ logging: output.logging != null ? deserializeAws_restJson1Logging(output.logging, context) : undefined,
6147
+ serviceDiscovery: output.serviceDiscovery != null
6429
6148
  ? deserializeAws_restJson1ServiceDiscovery((0, smithy_client_1.expectUnion)(output.serviceDiscovery), context)
6430
6149
  : undefined,
6431
6150
  };
@@ -6443,15 +6162,9 @@ const deserializeAws_restJson1VirtualNodeTcpConnectionPool = (output, context) =
6443
6162
  const deserializeAws_restJson1VirtualRouterData = (output, context) => {
6444
6163
  return {
6445
6164
  meshName: (0, smithy_client_1.expectString)(output.meshName),
6446
- metadata: output.metadata !== undefined && output.metadata !== null
6447
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
6448
- : undefined,
6449
- spec: output.spec !== undefined && output.spec !== null
6450
- ? deserializeAws_restJson1VirtualRouterSpec(output.spec, context)
6451
- : undefined,
6452
- status: output.status !== undefined && output.status !== null
6453
- ? deserializeAws_restJson1VirtualRouterStatus(output.status, context)
6454
- : undefined,
6165
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
6166
+ spec: output.spec != null ? deserializeAws_restJson1VirtualRouterSpec(output.spec, context) : undefined,
6167
+ status: output.status != null ? deserializeAws_restJson1VirtualRouterStatus(output.status, context) : undefined,
6455
6168
  virtualRouterName: (0, smithy_client_1.expectString)(output.virtualRouterName),
6456
6169
  };
6457
6170
  };
@@ -6468,9 +6181,7 @@ const deserializeAws_restJson1VirtualRouterList = (output, context) => {
6468
6181
  };
6469
6182
  const deserializeAws_restJson1VirtualRouterListener = (output, context) => {
6470
6183
  return {
6471
- portMapping: output.portMapping !== undefined && output.portMapping !== null
6472
- ? deserializeAws_restJson1PortMapping(output.portMapping, context)
6473
- : undefined,
6184
+ portMapping: output.portMapping != null ? deserializeAws_restJson1PortMapping(output.portMapping, context) : undefined,
6474
6185
  };
6475
6186
  };
6476
6187
  const deserializeAws_restJson1VirtualRouterListeners = (output, context) => {
@@ -6487,10 +6198,8 @@ const deserializeAws_restJson1VirtualRouterListeners = (output, context) => {
6487
6198
  const deserializeAws_restJson1VirtualRouterRef = (output, context) => {
6488
6199
  return {
6489
6200
  arn: (0, smithy_client_1.expectString)(output.arn),
6490
- createdAt: output.createdAt !== undefined && output.createdAt !== null
6491
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
6492
- : undefined,
6493
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
6201
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
6202
+ lastUpdatedAt: output.lastUpdatedAt != null
6494
6203
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
6495
6204
  : undefined,
6496
6205
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -6507,9 +6216,7 @@ const deserializeAws_restJson1VirtualRouterServiceProvider = (output, context) =
6507
6216
  };
6508
6217
  const deserializeAws_restJson1VirtualRouterSpec = (output, context) => {
6509
6218
  return {
6510
- listeners: output.listeners !== undefined && output.listeners !== null
6511
- ? deserializeAws_restJson1VirtualRouterListeners(output.listeners, context)
6512
- : undefined,
6219
+ listeners: output.listeners != null ? deserializeAws_restJson1VirtualRouterListeners(output.listeners, context) : undefined,
6513
6220
  };
6514
6221
  };
6515
6222
  const deserializeAws_restJson1VirtualRouterStatus = (output, context) => {
@@ -6519,24 +6226,16 @@ const deserializeAws_restJson1VirtualRouterStatus = (output, context) => {
6519
6226
  };
6520
6227
  const deserializeAws_restJson1VirtualServiceBackend = (output, context) => {
6521
6228
  return {
6522
- clientPolicy: output.clientPolicy !== undefined && output.clientPolicy !== null
6523
- ? deserializeAws_restJson1ClientPolicy(output.clientPolicy, context)
6524
- : undefined,
6229
+ clientPolicy: output.clientPolicy != null ? deserializeAws_restJson1ClientPolicy(output.clientPolicy, context) : undefined,
6525
6230
  virtualServiceName: (0, smithy_client_1.expectString)(output.virtualServiceName),
6526
6231
  };
6527
6232
  };
6528
6233
  const deserializeAws_restJson1VirtualServiceData = (output, context) => {
6529
6234
  return {
6530
6235
  meshName: (0, smithy_client_1.expectString)(output.meshName),
6531
- metadata: output.metadata !== undefined && output.metadata !== null
6532
- ? deserializeAws_restJson1ResourceMetadata(output.metadata, context)
6533
- : undefined,
6534
- spec: output.spec !== undefined && output.spec !== null
6535
- ? deserializeAws_restJson1VirtualServiceSpec(output.spec, context)
6536
- : undefined,
6537
- status: output.status !== undefined && output.status !== null
6538
- ? deserializeAws_restJson1VirtualServiceStatus(output.status, context)
6539
- : undefined,
6236
+ metadata: output.metadata != null ? deserializeAws_restJson1ResourceMetadata(output.metadata, context) : undefined,
6237
+ spec: output.spec != null ? deserializeAws_restJson1VirtualServiceSpec(output.spec, context) : undefined,
6238
+ status: output.status != null ? deserializeAws_restJson1VirtualServiceStatus(output.status, context) : undefined,
6540
6239
  virtualServiceName: (0, smithy_client_1.expectString)(output.virtualServiceName),
6541
6240
  };
6542
6241
  };
@@ -6567,10 +6266,8 @@ const deserializeAws_restJson1VirtualServiceProvider = (output, context) => {
6567
6266
  const deserializeAws_restJson1VirtualServiceRef = (output, context) => {
6568
6267
  return {
6569
6268
  arn: (0, smithy_client_1.expectString)(output.arn),
6570
- createdAt: output.createdAt !== undefined && output.createdAt !== null
6571
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
6572
- : undefined,
6573
- lastUpdatedAt: output.lastUpdatedAt !== undefined && output.lastUpdatedAt !== null
6269
+ createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
6270
+ lastUpdatedAt: output.lastUpdatedAt != null
6574
6271
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.lastUpdatedAt)))
6575
6272
  : undefined,
6576
6273
  meshName: (0, smithy_client_1.expectString)(output.meshName),
@@ -6582,7 +6279,7 @@ const deserializeAws_restJson1VirtualServiceRef = (output, context) => {
6582
6279
  };
6583
6280
  const deserializeAws_restJson1VirtualServiceSpec = (output, context) => {
6584
6281
  return {
6585
- provider: output.provider !== undefined && output.provider !== null
6282
+ provider: output.provider != null
6586
6283
  ? deserializeAws_restJson1VirtualServiceProvider((0, smithy_client_1.expectUnion)(output.provider), context)
6587
6284
  : undefined,
6588
6285
  };
@@ -6658,5 +6355,4 @@ const loadRestJsonErrorCode = (output, data) => {
6658
6355
  if (data["__type"] !== undefined) {
6659
6356
  return sanitizeErrorCode(data["__type"]);
6660
6357
  }
6661
- return "";
6662
6358
  };