@aws-sdk/client-apigatewayv2 3.118.1 → 3.128.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.
@@ -15,27 +15,21 @@ const serializeAws_restJson1CreateApiCommand = async (input, context) => {
15
15
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/apis";
16
16
  let body;
17
17
  body = JSON.stringify({
18
- ...(input.ApiKeySelectionExpression !== undefined &&
19
- input.ApiKeySelectionExpression !== null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }),
20
- ...(input.CorsConfiguration !== undefined &&
21
- input.CorsConfiguration !== null && {
18
+ ...(input.ApiKeySelectionExpression != null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }),
19
+ ...(input.CorsConfiguration != null && {
22
20
  corsConfiguration: serializeAws_restJson1Cors(input.CorsConfiguration, context),
23
21
  }),
24
- ...(input.CredentialsArn !== undefined &&
25
- input.CredentialsArn !== null && { credentialsArn: input.CredentialsArn }),
26
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
27
- ...(input.DisableExecuteApiEndpoint !== undefined &&
28
- input.DisableExecuteApiEndpoint !== null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }),
29
- ...(input.DisableSchemaValidation !== undefined &&
30
- input.DisableSchemaValidation !== null && { disableSchemaValidation: input.DisableSchemaValidation }),
31
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
32
- ...(input.ProtocolType !== undefined && input.ProtocolType !== null && { protocolType: input.ProtocolType }),
33
- ...(input.RouteKey !== undefined && input.RouteKey !== null && { routeKey: input.RouteKey }),
34
- ...(input.RouteSelectionExpression !== undefined &&
35
- input.RouteSelectionExpression !== null && { routeSelectionExpression: input.RouteSelectionExpression }),
36
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
37
- ...(input.Target !== undefined && input.Target !== null && { target: input.Target }),
38
- ...(input.Version !== undefined && input.Version !== null && { version: input.Version }),
22
+ ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }),
23
+ ...(input.Description != null && { description: input.Description }),
24
+ ...(input.DisableExecuteApiEndpoint != null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }),
25
+ ...(input.DisableSchemaValidation != null && { disableSchemaValidation: input.DisableSchemaValidation }),
26
+ ...(input.Name != null && { name: input.Name }),
27
+ ...(input.ProtocolType != null && { protocolType: input.ProtocolType }),
28
+ ...(input.RouteKey != null && { routeKey: input.RouteKey }),
29
+ ...(input.RouteSelectionExpression != null && { routeSelectionExpression: input.RouteSelectionExpression }),
30
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
31
+ ...(input.Target != null && { target: input.Target }),
32
+ ...(input.Version != null && { version: input.Version }),
39
33
  });
40
34
  return new protocol_http_1.HttpRequest({
41
35
  protocol,
@@ -66,9 +60,9 @@ const serializeAws_restJson1CreateApiMappingCommand = async (input, context) =>
66
60
  }
67
61
  let body;
68
62
  body = JSON.stringify({
69
- ...(input.ApiId !== undefined && input.ApiId !== null && { apiId: input.ApiId }),
70
- ...(input.ApiMappingKey !== undefined && input.ApiMappingKey !== null && { apiMappingKey: input.ApiMappingKey }),
71
- ...(input.Stage !== undefined && input.Stage !== null && { stage: input.Stage }),
63
+ ...(input.ApiId != null && { apiId: input.ApiId }),
64
+ ...(input.ApiMappingKey != null && { apiMappingKey: input.ApiMappingKey }),
65
+ ...(input.Stage != null && { stage: input.Stage }),
72
66
  });
73
67
  return new protocol_http_1.HttpRequest({
74
68
  protocol,
@@ -99,34 +93,26 @@ const serializeAws_restJson1CreateAuthorizerCommand = async (input, context) =>
99
93
  }
100
94
  let body;
101
95
  body = JSON.stringify({
102
- ...(input.AuthorizerCredentialsArn !== undefined &&
103
- input.AuthorizerCredentialsArn !== null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }),
104
- ...(input.AuthorizerPayloadFormatVersion !== undefined &&
105
- input.AuthorizerPayloadFormatVersion !== null && {
96
+ ...(input.AuthorizerCredentialsArn != null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }),
97
+ ...(input.AuthorizerPayloadFormatVersion != null && {
106
98
  authorizerPayloadFormatVersion: input.AuthorizerPayloadFormatVersion,
107
99
  }),
108
- ...(input.AuthorizerResultTtlInSeconds !== undefined &&
109
- input.AuthorizerResultTtlInSeconds !== null && {
100
+ ...(input.AuthorizerResultTtlInSeconds != null && {
110
101
  authorizerResultTtlInSeconds: input.AuthorizerResultTtlInSeconds,
111
102
  }),
112
- ...(input.AuthorizerType !== undefined &&
113
- input.AuthorizerType !== null && { authorizerType: input.AuthorizerType }),
114
- ...(input.AuthorizerUri !== undefined && input.AuthorizerUri !== null && { authorizerUri: input.AuthorizerUri }),
115
- ...(input.EnableSimpleResponses !== undefined &&
116
- input.EnableSimpleResponses !== null && { enableSimpleResponses: input.EnableSimpleResponses }),
117
- ...(input.IdentitySource !== undefined &&
118
- input.IdentitySource !== null && {
103
+ ...(input.AuthorizerType != null && { authorizerType: input.AuthorizerType }),
104
+ ...(input.AuthorizerUri != null && { authorizerUri: input.AuthorizerUri }),
105
+ ...(input.EnableSimpleResponses != null && { enableSimpleResponses: input.EnableSimpleResponses }),
106
+ ...(input.IdentitySource != null && {
119
107
  identitySource: serializeAws_restJson1IdentitySourceList(input.IdentitySource, context),
120
108
  }),
121
- ...(input.IdentityValidationExpression !== undefined &&
122
- input.IdentityValidationExpression !== null && {
109
+ ...(input.IdentityValidationExpression != null && {
123
110
  identityValidationExpression: input.IdentityValidationExpression,
124
111
  }),
125
- ...(input.JwtConfiguration !== undefined &&
126
- input.JwtConfiguration !== null && {
112
+ ...(input.JwtConfiguration != null && {
127
113
  jwtConfiguration: serializeAws_restJson1JWTConfiguration(input.JwtConfiguration, context),
128
114
  }),
129
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
115
+ ...(input.Name != null && { name: input.Name }),
130
116
  });
131
117
  return new protocol_http_1.HttpRequest({
132
118
  protocol,
@@ -157,8 +143,8 @@ const serializeAws_restJson1CreateDeploymentCommand = async (input, context) =>
157
143
  }
158
144
  let body;
159
145
  body = JSON.stringify({
160
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
161
- ...(input.StageName !== undefined && input.StageName !== null && { stageName: input.StageName }),
146
+ ...(input.Description != null && { description: input.Description }),
147
+ ...(input.StageName != null && { stageName: input.StageName }),
162
148
  });
163
149
  return new protocol_http_1.HttpRequest({
164
150
  protocol,
@@ -179,16 +165,14 @@ const serializeAws_restJson1CreateDomainNameCommand = async (input, context) =>
179
165
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/domainnames";
180
166
  let body;
181
167
  body = JSON.stringify({
182
- ...(input.DomainName !== undefined && input.DomainName !== null && { domainName: input.DomainName }),
183
- ...(input.DomainNameConfigurations !== undefined &&
184
- input.DomainNameConfigurations !== null && {
168
+ ...(input.DomainName != null && { domainName: input.DomainName }),
169
+ ...(input.DomainNameConfigurations != null && {
185
170
  domainNameConfigurations: serializeAws_restJson1DomainNameConfigurations(input.DomainNameConfigurations, context),
186
171
  }),
187
- ...(input.MutualTlsAuthentication !== undefined &&
188
- input.MutualTlsAuthentication !== null && {
172
+ ...(input.MutualTlsAuthentication != null && {
189
173
  mutualTlsAuthentication: serializeAws_restJson1MutualTlsAuthenticationInput(input.MutualTlsAuthentication, context),
190
174
  }),
191
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
175
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
192
176
  });
193
177
  return new protocol_http_1.HttpRequest({
194
178
  protocol,
@@ -219,44 +203,31 @@ const serializeAws_restJson1CreateIntegrationCommand = async (input, context) =>
219
203
  }
220
204
  let body;
221
205
  body = JSON.stringify({
222
- ...(input.ConnectionId !== undefined && input.ConnectionId !== null && { connectionId: input.ConnectionId }),
223
- ...(input.ConnectionType !== undefined &&
224
- input.ConnectionType !== null && { connectionType: input.ConnectionType }),
225
- ...(input.ContentHandlingStrategy !== undefined &&
226
- input.ContentHandlingStrategy !== null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
227
- ...(input.CredentialsArn !== undefined &&
228
- input.CredentialsArn !== null && { credentialsArn: input.CredentialsArn }),
229
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
230
- ...(input.IntegrationMethod !== undefined &&
231
- input.IntegrationMethod !== null && { integrationMethod: input.IntegrationMethod }),
232
- ...(input.IntegrationSubtype !== undefined &&
233
- input.IntegrationSubtype !== null && { integrationSubtype: input.IntegrationSubtype }),
234
- ...(input.IntegrationType !== undefined &&
235
- input.IntegrationType !== null && { integrationType: input.IntegrationType }),
236
- ...(input.IntegrationUri !== undefined &&
237
- input.IntegrationUri !== null && { integrationUri: input.IntegrationUri }),
238
- ...(input.PassthroughBehavior !== undefined &&
239
- input.PassthroughBehavior !== null && { passthroughBehavior: input.PassthroughBehavior }),
240
- ...(input.PayloadFormatVersion !== undefined &&
241
- input.PayloadFormatVersion !== null && { payloadFormatVersion: input.PayloadFormatVersion }),
242
- ...(input.RequestParameters !== undefined &&
243
- input.RequestParameters !== null && {
206
+ ...(input.ConnectionId != null && { connectionId: input.ConnectionId }),
207
+ ...(input.ConnectionType != null && { connectionType: input.ConnectionType }),
208
+ ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
209
+ ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }),
210
+ ...(input.Description != null && { description: input.Description }),
211
+ ...(input.IntegrationMethod != null && { integrationMethod: input.IntegrationMethod }),
212
+ ...(input.IntegrationSubtype != null && { integrationSubtype: input.IntegrationSubtype }),
213
+ ...(input.IntegrationType != null && { integrationType: input.IntegrationType }),
214
+ ...(input.IntegrationUri != null && { integrationUri: input.IntegrationUri }),
215
+ ...(input.PassthroughBehavior != null && { passthroughBehavior: input.PassthroughBehavior }),
216
+ ...(input.PayloadFormatVersion != null && { payloadFormatVersion: input.PayloadFormatVersion }),
217
+ ...(input.RequestParameters != null && {
244
218
  requestParameters: serializeAws_restJson1IntegrationParameters(input.RequestParameters, context),
245
219
  }),
246
- ...(input.RequestTemplates !== undefined &&
247
- input.RequestTemplates !== null && {
220
+ ...(input.RequestTemplates != null && {
248
221
  requestTemplates: serializeAws_restJson1TemplateMap(input.RequestTemplates, context),
249
222
  }),
250
- ...(input.ResponseParameters !== undefined &&
251
- input.ResponseParameters !== null && {
223
+ ...(input.ResponseParameters != null && {
252
224
  responseParameters: serializeAws_restJson1ResponseParameters(input.ResponseParameters, context),
253
225
  }),
254
- ...(input.TemplateSelectionExpression !== undefined &&
255
- input.TemplateSelectionExpression !== null && { templateSelectionExpression: input.TemplateSelectionExpression }),
256
- ...(input.TimeoutInMillis !== undefined &&
257
- input.TimeoutInMillis !== null && { timeoutInMillis: input.TimeoutInMillis }),
258
- ...(input.TlsConfig !== undefined &&
259
- input.TlsConfig !== null && { tlsConfig: serializeAws_restJson1TlsConfigInput(input.TlsConfig, context) }),
226
+ ...(input.TemplateSelectionExpression != null && {
227
+ templateSelectionExpression: input.TemplateSelectionExpression,
228
+ }),
229
+ ...(input.TimeoutInMillis != null && { timeoutInMillis: input.TimeoutInMillis }),
230
+ ...(input.TlsConfig != null && { tlsConfig: serializeAws_restJson1TlsConfigInput(input.TlsConfig, context) }),
260
231
  });
261
232
  return new protocol_http_1.HttpRequest({
262
233
  protocol,
@@ -298,20 +269,17 @@ const serializeAws_restJson1CreateIntegrationResponseCommand = async (input, con
298
269
  }
299
270
  let body;
300
271
  body = JSON.stringify({
301
- ...(input.ContentHandlingStrategy !== undefined &&
302
- input.ContentHandlingStrategy !== null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
303
- ...(input.IntegrationResponseKey !== undefined &&
304
- input.IntegrationResponseKey !== null && { integrationResponseKey: input.IntegrationResponseKey }),
305
- ...(input.ResponseParameters !== undefined &&
306
- input.ResponseParameters !== null && {
272
+ ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
273
+ ...(input.IntegrationResponseKey != null && { integrationResponseKey: input.IntegrationResponseKey }),
274
+ ...(input.ResponseParameters != null && {
307
275
  responseParameters: serializeAws_restJson1IntegrationParameters(input.ResponseParameters, context),
308
276
  }),
309
- ...(input.ResponseTemplates !== undefined &&
310
- input.ResponseTemplates !== null && {
277
+ ...(input.ResponseTemplates != null && {
311
278
  responseTemplates: serializeAws_restJson1TemplateMap(input.ResponseTemplates, context),
312
279
  }),
313
- ...(input.TemplateSelectionExpression !== undefined &&
314
- input.TemplateSelectionExpression !== null && { templateSelectionExpression: input.TemplateSelectionExpression }),
280
+ ...(input.TemplateSelectionExpression != null && {
281
+ templateSelectionExpression: input.TemplateSelectionExpression,
282
+ }),
315
283
  });
316
284
  return new protocol_http_1.HttpRequest({
317
285
  protocol,
@@ -342,10 +310,10 @@ const serializeAws_restJson1CreateModelCommand = async (input, context) => {
342
310
  }
343
311
  let body;
344
312
  body = JSON.stringify({
345
- ...(input.ContentType !== undefined && input.ContentType !== null && { contentType: input.ContentType }),
346
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
347
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
348
- ...(input.Schema !== undefined && input.Schema !== null && { schema: input.Schema }),
313
+ ...(input.ContentType != null && { contentType: input.ContentType }),
314
+ ...(input.Description != null && { description: input.Description }),
315
+ ...(input.Name != null && { name: input.Name }),
316
+ ...(input.Schema != null && { schema: input.Schema }),
349
317
  });
350
318
  return new protocol_http_1.HttpRequest({
351
319
  protocol,
@@ -376,32 +344,25 @@ const serializeAws_restJson1CreateRouteCommand = async (input, context) => {
376
344
  }
377
345
  let body;
378
346
  body = JSON.stringify({
379
- ...(input.ApiKeyRequired !== undefined &&
380
- input.ApiKeyRequired !== null && { apiKeyRequired: input.ApiKeyRequired }),
381
- ...(input.AuthorizationScopes !== undefined &&
382
- input.AuthorizationScopes !== null && {
347
+ ...(input.ApiKeyRequired != null && { apiKeyRequired: input.ApiKeyRequired }),
348
+ ...(input.AuthorizationScopes != null && {
383
349
  authorizationScopes: serializeAws_restJson1AuthorizationScopes(input.AuthorizationScopes, context),
384
350
  }),
385
- ...(input.AuthorizationType !== undefined &&
386
- input.AuthorizationType !== null && { authorizationType: input.AuthorizationType }),
387
- ...(input.AuthorizerId !== undefined && input.AuthorizerId !== null && { authorizerId: input.AuthorizerId }),
388
- ...(input.ModelSelectionExpression !== undefined &&
389
- input.ModelSelectionExpression !== null && { modelSelectionExpression: input.ModelSelectionExpression }),
390
- ...(input.OperationName !== undefined && input.OperationName !== null && { operationName: input.OperationName }),
391
- ...(input.RequestModels !== undefined &&
392
- input.RequestModels !== null && {
351
+ ...(input.AuthorizationType != null && { authorizationType: input.AuthorizationType }),
352
+ ...(input.AuthorizerId != null && { authorizerId: input.AuthorizerId }),
353
+ ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }),
354
+ ...(input.OperationName != null && { operationName: input.OperationName }),
355
+ ...(input.RequestModels != null && {
393
356
  requestModels: serializeAws_restJson1RouteModels(input.RequestModels, context),
394
357
  }),
395
- ...(input.RequestParameters !== undefined &&
396
- input.RequestParameters !== null && {
358
+ ...(input.RequestParameters != null && {
397
359
  requestParameters: serializeAws_restJson1RouteParameters(input.RequestParameters, context),
398
360
  }),
399
- ...(input.RouteKey !== undefined && input.RouteKey !== null && { routeKey: input.RouteKey }),
400
- ...(input.RouteResponseSelectionExpression !== undefined &&
401
- input.RouteResponseSelectionExpression !== null && {
361
+ ...(input.RouteKey != null && { routeKey: input.RouteKey }),
362
+ ...(input.RouteResponseSelectionExpression != null && {
402
363
  routeResponseSelectionExpression: input.RouteResponseSelectionExpression,
403
364
  }),
404
- ...(input.Target !== undefined && input.Target !== null && { target: input.Target }),
365
+ ...(input.Target != null && { target: input.Target }),
405
366
  });
406
367
  return new protocol_http_1.HttpRequest({
407
368
  protocol,
@@ -443,18 +404,14 @@ const serializeAws_restJson1CreateRouteResponseCommand = async (input, context)
443
404
  }
444
405
  let body;
445
406
  body = JSON.stringify({
446
- ...(input.ModelSelectionExpression !== undefined &&
447
- input.ModelSelectionExpression !== null && { modelSelectionExpression: input.ModelSelectionExpression }),
448
- ...(input.ResponseModels !== undefined &&
449
- input.ResponseModels !== null && {
407
+ ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }),
408
+ ...(input.ResponseModels != null && {
450
409
  responseModels: serializeAws_restJson1RouteModels(input.ResponseModels, context),
451
410
  }),
452
- ...(input.ResponseParameters !== undefined &&
453
- input.ResponseParameters !== null && {
411
+ ...(input.ResponseParameters != null && {
454
412
  responseParameters: serializeAws_restJson1RouteParameters(input.ResponseParameters, context),
455
413
  }),
456
- ...(input.RouteResponseKey !== undefined &&
457
- input.RouteResponseKey !== null && { routeResponseKey: input.RouteResponseKey }),
414
+ ...(input.RouteResponseKey != null && { routeResponseKey: input.RouteResponseKey }),
458
415
  });
459
416
  return new protocol_http_1.HttpRequest({
460
417
  protocol,
@@ -485,29 +442,24 @@ const serializeAws_restJson1CreateStageCommand = async (input, context) => {
485
442
  }
486
443
  let body;
487
444
  body = JSON.stringify({
488
- ...(input.AccessLogSettings !== undefined &&
489
- input.AccessLogSettings !== null && {
445
+ ...(input.AccessLogSettings != null && {
490
446
  accessLogSettings: serializeAws_restJson1AccessLogSettings(input.AccessLogSettings, context),
491
447
  }),
492
- ...(input.AutoDeploy !== undefined && input.AutoDeploy !== null && { autoDeploy: input.AutoDeploy }),
493
- ...(input.ClientCertificateId !== undefined &&
494
- input.ClientCertificateId !== null && { clientCertificateId: input.ClientCertificateId }),
495
- ...(input.DefaultRouteSettings !== undefined &&
496
- input.DefaultRouteSettings !== null && {
448
+ ...(input.AutoDeploy != null && { autoDeploy: input.AutoDeploy }),
449
+ ...(input.ClientCertificateId != null && { clientCertificateId: input.ClientCertificateId }),
450
+ ...(input.DefaultRouteSettings != null && {
497
451
  defaultRouteSettings: serializeAws_restJson1RouteSettings(input.DefaultRouteSettings, context),
498
452
  }),
499
- ...(input.DeploymentId !== undefined && input.DeploymentId !== null && { deploymentId: input.DeploymentId }),
500
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
501
- ...(input.RouteSettings !== undefined &&
502
- input.RouteSettings !== null && {
453
+ ...(input.DeploymentId != null && { deploymentId: input.DeploymentId }),
454
+ ...(input.Description != null && { description: input.Description }),
455
+ ...(input.RouteSettings != null && {
503
456
  routeSettings: serializeAws_restJson1RouteSettingsMap(input.RouteSettings, context),
504
457
  }),
505
- ...(input.StageName !== undefined && input.StageName !== null && { stageName: input.StageName }),
506
- ...(input.StageVariables !== undefined &&
507
- input.StageVariables !== null && {
458
+ ...(input.StageName != null && { stageName: input.StageName }),
459
+ ...(input.StageVariables != null && {
508
460
  stageVariables: serializeAws_restJson1StageVariablesMap(input.StageVariables, context),
509
461
  }),
510
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
462
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
511
463
  });
512
464
  return new protocol_http_1.HttpRequest({
513
465
  protocol,
@@ -528,14 +480,12 @@ const serializeAws_restJson1CreateVpcLinkCommand = async (input, context) => {
528
480
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/v2/vpclinks";
529
481
  let body;
530
482
  body = JSON.stringify({
531
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
532
- ...(input.SecurityGroupIds !== undefined &&
533
- input.SecurityGroupIds !== null && {
483
+ ...(input.Name != null && { name: input.Name }),
484
+ ...(input.SecurityGroupIds != null && {
534
485
  securityGroupIds: serializeAws_restJson1SecurityGroupIdList(input.SecurityGroupIds, context),
535
486
  }),
536
- ...(input.SubnetIds !== undefined &&
537
- input.SubnetIds !== null && { subnetIds: serializeAws_restJson1SubnetIdList(input.SubnetIds, context) }),
538
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
487
+ ...(input.SubnetIds != null && { subnetIds: serializeAws_restJson1SubnetIdList(input.SubnetIds, context) }),
488
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
539
489
  });
540
490
  return new protocol_http_1.HttpRequest({
541
491
  protocol,
@@ -2043,7 +1993,7 @@ const serializeAws_restJson1ImportApiCommand = async (input, context) => {
2043
1993
  };
2044
1994
  let body;
2045
1995
  body = JSON.stringify({
2046
- ...(input.Body !== undefined && input.Body !== null && { body: input.Body }),
1996
+ ...(input.Body != null && { body: input.Body }),
2047
1997
  });
2048
1998
  return new protocol_http_1.HttpRequest({
2049
1999
  protocol,
@@ -2079,7 +2029,7 @@ const serializeAws_restJson1ReimportApiCommand = async (input, context) => {
2079
2029
  };
2080
2030
  let body;
2081
2031
  body = JSON.stringify({
2082
- ...(input.Body !== undefined && input.Body !== null && { body: input.Body }),
2032
+ ...(input.Body != null && { body: input.Body }),
2083
2033
  });
2084
2034
  return new protocol_http_1.HttpRequest({
2085
2035
  protocol,
@@ -2148,7 +2098,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2148
2098
  }
2149
2099
  let body;
2150
2100
  body = JSON.stringify({
2151
- ...(input.Tags !== undefined && input.Tags !== null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
2101
+ ...(input.Tags != null && { tags: serializeAws_restJson1Tags(input.Tags, context) }),
2152
2102
  });
2153
2103
  return new protocol_http_1.HttpRequest({
2154
2104
  protocol,
@@ -2209,25 +2159,19 @@ const serializeAws_restJson1UpdateApiCommand = async (input, context) => {
2209
2159
  }
2210
2160
  let body;
2211
2161
  body = JSON.stringify({
2212
- ...(input.ApiKeySelectionExpression !== undefined &&
2213
- input.ApiKeySelectionExpression !== null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }),
2214
- ...(input.CorsConfiguration !== undefined &&
2215
- input.CorsConfiguration !== null && {
2162
+ ...(input.ApiKeySelectionExpression != null && { apiKeySelectionExpression: input.ApiKeySelectionExpression }),
2163
+ ...(input.CorsConfiguration != null && {
2216
2164
  corsConfiguration: serializeAws_restJson1Cors(input.CorsConfiguration, context),
2217
2165
  }),
2218
- ...(input.CredentialsArn !== undefined &&
2219
- input.CredentialsArn !== null && { credentialsArn: input.CredentialsArn }),
2220
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
2221
- ...(input.DisableExecuteApiEndpoint !== undefined &&
2222
- input.DisableExecuteApiEndpoint !== null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }),
2223
- ...(input.DisableSchemaValidation !== undefined &&
2224
- input.DisableSchemaValidation !== null && { disableSchemaValidation: input.DisableSchemaValidation }),
2225
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
2226
- ...(input.RouteKey !== undefined && input.RouteKey !== null && { routeKey: input.RouteKey }),
2227
- ...(input.RouteSelectionExpression !== undefined &&
2228
- input.RouteSelectionExpression !== null && { routeSelectionExpression: input.RouteSelectionExpression }),
2229
- ...(input.Target !== undefined && input.Target !== null && { target: input.Target }),
2230
- ...(input.Version !== undefined && input.Version !== null && { version: input.Version }),
2166
+ ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }),
2167
+ ...(input.Description != null && { description: input.Description }),
2168
+ ...(input.DisableExecuteApiEndpoint != null && { disableExecuteApiEndpoint: input.DisableExecuteApiEndpoint }),
2169
+ ...(input.DisableSchemaValidation != null && { disableSchemaValidation: input.DisableSchemaValidation }),
2170
+ ...(input.Name != null && { name: input.Name }),
2171
+ ...(input.RouteKey != null && { routeKey: input.RouteKey }),
2172
+ ...(input.RouteSelectionExpression != null && { routeSelectionExpression: input.RouteSelectionExpression }),
2173
+ ...(input.Target != null && { target: input.Target }),
2174
+ ...(input.Version != null && { version: input.Version }),
2231
2175
  });
2232
2176
  return new protocol_http_1.HttpRequest({
2233
2177
  protocol,
@@ -2269,9 +2213,9 @@ const serializeAws_restJson1UpdateApiMappingCommand = async (input, context) =>
2269
2213
  }
2270
2214
  let body;
2271
2215
  body = JSON.stringify({
2272
- ...(input.ApiId !== undefined && input.ApiId !== null && { apiId: input.ApiId }),
2273
- ...(input.ApiMappingKey !== undefined && input.ApiMappingKey !== null && { apiMappingKey: input.ApiMappingKey }),
2274
- ...(input.Stage !== undefined && input.Stage !== null && { stage: input.Stage }),
2216
+ ...(input.ApiId != null && { apiId: input.ApiId }),
2217
+ ...(input.ApiMappingKey != null && { apiMappingKey: input.ApiMappingKey }),
2218
+ ...(input.Stage != null && { stage: input.Stage }),
2275
2219
  });
2276
2220
  return new protocol_http_1.HttpRequest({
2277
2221
  protocol,
@@ -2313,34 +2257,26 @@ const serializeAws_restJson1UpdateAuthorizerCommand = async (input, context) =>
2313
2257
  }
2314
2258
  let body;
2315
2259
  body = JSON.stringify({
2316
- ...(input.AuthorizerCredentialsArn !== undefined &&
2317
- input.AuthorizerCredentialsArn !== null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }),
2318
- ...(input.AuthorizerPayloadFormatVersion !== undefined &&
2319
- input.AuthorizerPayloadFormatVersion !== null && {
2260
+ ...(input.AuthorizerCredentialsArn != null && { authorizerCredentialsArn: input.AuthorizerCredentialsArn }),
2261
+ ...(input.AuthorizerPayloadFormatVersion != null && {
2320
2262
  authorizerPayloadFormatVersion: input.AuthorizerPayloadFormatVersion,
2321
2263
  }),
2322
- ...(input.AuthorizerResultTtlInSeconds !== undefined &&
2323
- input.AuthorizerResultTtlInSeconds !== null && {
2264
+ ...(input.AuthorizerResultTtlInSeconds != null && {
2324
2265
  authorizerResultTtlInSeconds: input.AuthorizerResultTtlInSeconds,
2325
2266
  }),
2326
- ...(input.AuthorizerType !== undefined &&
2327
- input.AuthorizerType !== null && { authorizerType: input.AuthorizerType }),
2328
- ...(input.AuthorizerUri !== undefined && input.AuthorizerUri !== null && { authorizerUri: input.AuthorizerUri }),
2329
- ...(input.EnableSimpleResponses !== undefined &&
2330
- input.EnableSimpleResponses !== null && { enableSimpleResponses: input.EnableSimpleResponses }),
2331
- ...(input.IdentitySource !== undefined &&
2332
- input.IdentitySource !== null && {
2267
+ ...(input.AuthorizerType != null && { authorizerType: input.AuthorizerType }),
2268
+ ...(input.AuthorizerUri != null && { authorizerUri: input.AuthorizerUri }),
2269
+ ...(input.EnableSimpleResponses != null && { enableSimpleResponses: input.EnableSimpleResponses }),
2270
+ ...(input.IdentitySource != null && {
2333
2271
  identitySource: serializeAws_restJson1IdentitySourceList(input.IdentitySource, context),
2334
2272
  }),
2335
- ...(input.IdentityValidationExpression !== undefined &&
2336
- input.IdentityValidationExpression !== null && {
2273
+ ...(input.IdentityValidationExpression != null && {
2337
2274
  identityValidationExpression: input.IdentityValidationExpression,
2338
2275
  }),
2339
- ...(input.JwtConfiguration !== undefined &&
2340
- input.JwtConfiguration !== null && {
2276
+ ...(input.JwtConfiguration != null && {
2341
2277
  jwtConfiguration: serializeAws_restJson1JWTConfiguration(input.JwtConfiguration, context),
2342
2278
  }),
2343
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
2279
+ ...(input.Name != null && { name: input.Name }),
2344
2280
  });
2345
2281
  return new protocol_http_1.HttpRequest({
2346
2282
  protocol,
@@ -2382,7 +2318,7 @@ const serializeAws_restJson1UpdateDeploymentCommand = async (input, context) =>
2382
2318
  }
2383
2319
  let body;
2384
2320
  body = JSON.stringify({
2385
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
2321
+ ...(input.Description != null && { description: input.Description }),
2386
2322
  });
2387
2323
  return new protocol_http_1.HttpRequest({
2388
2324
  protocol,
@@ -2413,12 +2349,10 @@ const serializeAws_restJson1UpdateDomainNameCommand = async (input, context) =>
2413
2349
  }
2414
2350
  let body;
2415
2351
  body = JSON.stringify({
2416
- ...(input.DomainNameConfigurations !== undefined &&
2417
- input.DomainNameConfigurations !== null && {
2352
+ ...(input.DomainNameConfigurations != null && {
2418
2353
  domainNameConfigurations: serializeAws_restJson1DomainNameConfigurations(input.DomainNameConfigurations, context),
2419
2354
  }),
2420
- ...(input.MutualTlsAuthentication !== undefined &&
2421
- input.MutualTlsAuthentication !== null && {
2355
+ ...(input.MutualTlsAuthentication != null && {
2422
2356
  mutualTlsAuthentication: serializeAws_restJson1MutualTlsAuthenticationInput(input.MutualTlsAuthentication, context),
2423
2357
  }),
2424
2358
  });
@@ -2462,44 +2396,31 @@ const serializeAws_restJson1UpdateIntegrationCommand = async (input, context) =>
2462
2396
  }
2463
2397
  let body;
2464
2398
  body = JSON.stringify({
2465
- ...(input.ConnectionId !== undefined && input.ConnectionId !== null && { connectionId: input.ConnectionId }),
2466
- ...(input.ConnectionType !== undefined &&
2467
- input.ConnectionType !== null && { connectionType: input.ConnectionType }),
2468
- ...(input.ContentHandlingStrategy !== undefined &&
2469
- input.ContentHandlingStrategy !== null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
2470
- ...(input.CredentialsArn !== undefined &&
2471
- input.CredentialsArn !== null && { credentialsArn: input.CredentialsArn }),
2472
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
2473
- ...(input.IntegrationMethod !== undefined &&
2474
- input.IntegrationMethod !== null && { integrationMethod: input.IntegrationMethod }),
2475
- ...(input.IntegrationSubtype !== undefined &&
2476
- input.IntegrationSubtype !== null && { integrationSubtype: input.IntegrationSubtype }),
2477
- ...(input.IntegrationType !== undefined &&
2478
- input.IntegrationType !== null && { integrationType: input.IntegrationType }),
2479
- ...(input.IntegrationUri !== undefined &&
2480
- input.IntegrationUri !== null && { integrationUri: input.IntegrationUri }),
2481
- ...(input.PassthroughBehavior !== undefined &&
2482
- input.PassthroughBehavior !== null && { passthroughBehavior: input.PassthroughBehavior }),
2483
- ...(input.PayloadFormatVersion !== undefined &&
2484
- input.PayloadFormatVersion !== null && { payloadFormatVersion: input.PayloadFormatVersion }),
2485
- ...(input.RequestParameters !== undefined &&
2486
- input.RequestParameters !== null && {
2399
+ ...(input.ConnectionId != null && { connectionId: input.ConnectionId }),
2400
+ ...(input.ConnectionType != null && { connectionType: input.ConnectionType }),
2401
+ ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
2402
+ ...(input.CredentialsArn != null && { credentialsArn: input.CredentialsArn }),
2403
+ ...(input.Description != null && { description: input.Description }),
2404
+ ...(input.IntegrationMethod != null && { integrationMethod: input.IntegrationMethod }),
2405
+ ...(input.IntegrationSubtype != null && { integrationSubtype: input.IntegrationSubtype }),
2406
+ ...(input.IntegrationType != null && { integrationType: input.IntegrationType }),
2407
+ ...(input.IntegrationUri != null && { integrationUri: input.IntegrationUri }),
2408
+ ...(input.PassthroughBehavior != null && { passthroughBehavior: input.PassthroughBehavior }),
2409
+ ...(input.PayloadFormatVersion != null && { payloadFormatVersion: input.PayloadFormatVersion }),
2410
+ ...(input.RequestParameters != null && {
2487
2411
  requestParameters: serializeAws_restJson1IntegrationParameters(input.RequestParameters, context),
2488
2412
  }),
2489
- ...(input.RequestTemplates !== undefined &&
2490
- input.RequestTemplates !== null && {
2413
+ ...(input.RequestTemplates != null && {
2491
2414
  requestTemplates: serializeAws_restJson1TemplateMap(input.RequestTemplates, context),
2492
2415
  }),
2493
- ...(input.ResponseParameters !== undefined &&
2494
- input.ResponseParameters !== null && {
2416
+ ...(input.ResponseParameters != null && {
2495
2417
  responseParameters: serializeAws_restJson1ResponseParameters(input.ResponseParameters, context),
2496
2418
  }),
2497
- ...(input.TemplateSelectionExpression !== undefined &&
2498
- input.TemplateSelectionExpression !== null && { templateSelectionExpression: input.TemplateSelectionExpression }),
2499
- ...(input.TimeoutInMillis !== undefined &&
2500
- input.TimeoutInMillis !== null && { timeoutInMillis: input.TimeoutInMillis }),
2501
- ...(input.TlsConfig !== undefined &&
2502
- input.TlsConfig !== null && { tlsConfig: serializeAws_restJson1TlsConfigInput(input.TlsConfig, context) }),
2419
+ ...(input.TemplateSelectionExpression != null && {
2420
+ templateSelectionExpression: input.TemplateSelectionExpression,
2421
+ }),
2422
+ ...(input.TimeoutInMillis != null && { timeoutInMillis: input.TimeoutInMillis }),
2423
+ ...(input.TlsConfig != null && { tlsConfig: serializeAws_restJson1TlsConfigInput(input.TlsConfig, context) }),
2503
2424
  });
2504
2425
  return new protocol_http_1.HttpRequest({
2505
2426
  protocol,
@@ -2551,20 +2472,17 @@ const serializeAws_restJson1UpdateIntegrationResponseCommand = async (input, con
2551
2472
  }
2552
2473
  let body;
2553
2474
  body = JSON.stringify({
2554
- ...(input.ContentHandlingStrategy !== undefined &&
2555
- input.ContentHandlingStrategy !== null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
2556
- ...(input.IntegrationResponseKey !== undefined &&
2557
- input.IntegrationResponseKey !== null && { integrationResponseKey: input.IntegrationResponseKey }),
2558
- ...(input.ResponseParameters !== undefined &&
2559
- input.ResponseParameters !== null && {
2475
+ ...(input.ContentHandlingStrategy != null && { contentHandlingStrategy: input.ContentHandlingStrategy }),
2476
+ ...(input.IntegrationResponseKey != null && { integrationResponseKey: input.IntegrationResponseKey }),
2477
+ ...(input.ResponseParameters != null && {
2560
2478
  responseParameters: serializeAws_restJson1IntegrationParameters(input.ResponseParameters, context),
2561
2479
  }),
2562
- ...(input.ResponseTemplates !== undefined &&
2563
- input.ResponseTemplates !== null && {
2480
+ ...(input.ResponseTemplates != null && {
2564
2481
  responseTemplates: serializeAws_restJson1TemplateMap(input.ResponseTemplates, context),
2565
2482
  }),
2566
- ...(input.TemplateSelectionExpression !== undefined &&
2567
- input.TemplateSelectionExpression !== null && { templateSelectionExpression: input.TemplateSelectionExpression }),
2483
+ ...(input.TemplateSelectionExpression != null && {
2484
+ templateSelectionExpression: input.TemplateSelectionExpression,
2485
+ }),
2568
2486
  });
2569
2487
  return new protocol_http_1.HttpRequest({
2570
2488
  protocol,
@@ -2605,10 +2523,10 @@ const serializeAws_restJson1UpdateModelCommand = async (input, context) => {
2605
2523
  }
2606
2524
  let body;
2607
2525
  body = JSON.stringify({
2608
- ...(input.ContentType !== undefined && input.ContentType !== null && { contentType: input.ContentType }),
2609
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
2610
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
2611
- ...(input.Schema !== undefined && input.Schema !== null && { schema: input.Schema }),
2526
+ ...(input.ContentType != null && { contentType: input.ContentType }),
2527
+ ...(input.Description != null && { description: input.Description }),
2528
+ ...(input.Name != null && { name: input.Name }),
2529
+ ...(input.Schema != null && { schema: input.Schema }),
2612
2530
  });
2613
2531
  return new protocol_http_1.HttpRequest({
2614
2532
  protocol,
@@ -2649,32 +2567,25 @@ const serializeAws_restJson1UpdateRouteCommand = async (input, context) => {
2649
2567
  }
2650
2568
  let body;
2651
2569
  body = JSON.stringify({
2652
- ...(input.ApiKeyRequired !== undefined &&
2653
- input.ApiKeyRequired !== null && { apiKeyRequired: input.ApiKeyRequired }),
2654
- ...(input.AuthorizationScopes !== undefined &&
2655
- input.AuthorizationScopes !== null && {
2570
+ ...(input.ApiKeyRequired != null && { apiKeyRequired: input.ApiKeyRequired }),
2571
+ ...(input.AuthorizationScopes != null && {
2656
2572
  authorizationScopes: serializeAws_restJson1AuthorizationScopes(input.AuthorizationScopes, context),
2657
2573
  }),
2658
- ...(input.AuthorizationType !== undefined &&
2659
- input.AuthorizationType !== null && { authorizationType: input.AuthorizationType }),
2660
- ...(input.AuthorizerId !== undefined && input.AuthorizerId !== null && { authorizerId: input.AuthorizerId }),
2661
- ...(input.ModelSelectionExpression !== undefined &&
2662
- input.ModelSelectionExpression !== null && { modelSelectionExpression: input.ModelSelectionExpression }),
2663
- ...(input.OperationName !== undefined && input.OperationName !== null && { operationName: input.OperationName }),
2664
- ...(input.RequestModels !== undefined &&
2665
- input.RequestModels !== null && {
2574
+ ...(input.AuthorizationType != null && { authorizationType: input.AuthorizationType }),
2575
+ ...(input.AuthorizerId != null && { authorizerId: input.AuthorizerId }),
2576
+ ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }),
2577
+ ...(input.OperationName != null && { operationName: input.OperationName }),
2578
+ ...(input.RequestModels != null && {
2666
2579
  requestModels: serializeAws_restJson1RouteModels(input.RequestModels, context),
2667
2580
  }),
2668
- ...(input.RequestParameters !== undefined &&
2669
- input.RequestParameters !== null && {
2581
+ ...(input.RequestParameters != null && {
2670
2582
  requestParameters: serializeAws_restJson1RouteParameters(input.RequestParameters, context),
2671
2583
  }),
2672
- ...(input.RouteKey !== undefined && input.RouteKey !== null && { routeKey: input.RouteKey }),
2673
- ...(input.RouteResponseSelectionExpression !== undefined &&
2674
- input.RouteResponseSelectionExpression !== null && {
2584
+ ...(input.RouteKey != null && { routeKey: input.RouteKey }),
2585
+ ...(input.RouteResponseSelectionExpression != null && {
2675
2586
  routeResponseSelectionExpression: input.RouteResponseSelectionExpression,
2676
2587
  }),
2677
- ...(input.Target !== undefined && input.Target !== null && { target: input.Target }),
2588
+ ...(input.Target != null && { target: input.Target }),
2678
2589
  });
2679
2590
  return new protocol_http_1.HttpRequest({
2680
2591
  protocol,
@@ -2726,18 +2637,14 @@ const serializeAws_restJson1UpdateRouteResponseCommand = async (input, context)
2726
2637
  }
2727
2638
  let body;
2728
2639
  body = JSON.stringify({
2729
- ...(input.ModelSelectionExpression !== undefined &&
2730
- input.ModelSelectionExpression !== null && { modelSelectionExpression: input.ModelSelectionExpression }),
2731
- ...(input.ResponseModels !== undefined &&
2732
- input.ResponseModels !== null && {
2640
+ ...(input.ModelSelectionExpression != null && { modelSelectionExpression: input.ModelSelectionExpression }),
2641
+ ...(input.ResponseModels != null && {
2733
2642
  responseModels: serializeAws_restJson1RouteModels(input.ResponseModels, context),
2734
2643
  }),
2735
- ...(input.ResponseParameters !== undefined &&
2736
- input.ResponseParameters !== null && {
2644
+ ...(input.ResponseParameters != null && {
2737
2645
  responseParameters: serializeAws_restJson1RouteParameters(input.ResponseParameters, context),
2738
2646
  }),
2739
- ...(input.RouteResponseKey !== undefined &&
2740
- input.RouteResponseKey !== null && { routeResponseKey: input.RouteResponseKey }),
2647
+ ...(input.RouteResponseKey != null && { routeResponseKey: input.RouteResponseKey }),
2741
2648
  });
2742
2649
  return new protocol_http_1.HttpRequest({
2743
2650
  protocol,
@@ -2778,25 +2685,20 @@ const serializeAws_restJson1UpdateStageCommand = async (input, context) => {
2778
2685
  }
2779
2686
  let body;
2780
2687
  body = JSON.stringify({
2781
- ...(input.AccessLogSettings !== undefined &&
2782
- input.AccessLogSettings !== null && {
2688
+ ...(input.AccessLogSettings != null && {
2783
2689
  accessLogSettings: serializeAws_restJson1AccessLogSettings(input.AccessLogSettings, context),
2784
2690
  }),
2785
- ...(input.AutoDeploy !== undefined && input.AutoDeploy !== null && { autoDeploy: input.AutoDeploy }),
2786
- ...(input.ClientCertificateId !== undefined &&
2787
- input.ClientCertificateId !== null && { clientCertificateId: input.ClientCertificateId }),
2788
- ...(input.DefaultRouteSettings !== undefined &&
2789
- input.DefaultRouteSettings !== null && {
2691
+ ...(input.AutoDeploy != null && { autoDeploy: input.AutoDeploy }),
2692
+ ...(input.ClientCertificateId != null && { clientCertificateId: input.ClientCertificateId }),
2693
+ ...(input.DefaultRouteSettings != null && {
2790
2694
  defaultRouteSettings: serializeAws_restJson1RouteSettings(input.DefaultRouteSettings, context),
2791
2695
  }),
2792
- ...(input.DeploymentId !== undefined && input.DeploymentId !== null && { deploymentId: input.DeploymentId }),
2793
- ...(input.Description !== undefined && input.Description !== null && { description: input.Description }),
2794
- ...(input.RouteSettings !== undefined &&
2795
- input.RouteSettings !== null && {
2696
+ ...(input.DeploymentId != null && { deploymentId: input.DeploymentId }),
2697
+ ...(input.Description != null && { description: input.Description }),
2698
+ ...(input.RouteSettings != null && {
2796
2699
  routeSettings: serializeAws_restJson1RouteSettingsMap(input.RouteSettings, context),
2797
2700
  }),
2798
- ...(input.StageVariables !== undefined &&
2799
- input.StageVariables !== null && {
2701
+ ...(input.StageVariables != null && {
2800
2702
  stageVariables: serializeAws_restJson1StageVariablesMap(input.StageVariables, context),
2801
2703
  }),
2802
2704
  });
@@ -2829,7 +2731,7 @@ const serializeAws_restJson1UpdateVpcLinkCommand = async (input, context) => {
2829
2731
  }
2830
2732
  let body;
2831
2733
  body = JSON.stringify({
2832
- ...(input.Name !== undefined && input.Name !== null && { name: input.Name }),
2734
+ ...(input.Name != null && { name: input.Name }),
2833
2735
  });
2834
2736
  return new protocol_http_1.HttpRequest({
2835
2737
  protocol,
@@ -2923,8 +2825,7 @@ const deserializeAws_restJson1CreateApiCommandError = async (output, context) =>
2923
2825
  body: await parseBody(output.body, context),
2924
2826
  };
2925
2827
  let response;
2926
- let errorCode = "UnknownError";
2927
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2828
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2928
2829
  switch (errorCode) {
2929
2830
  case "BadRequestException":
2930
2831
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -2940,10 +2841,12 @@ const deserializeAws_restJson1CreateApiCommandError = async (output, context) =>
2940
2841
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2941
2842
  default:
2942
2843
  const parsedBody = parsedOutput.body;
2844
+ const $metadata = deserializeMetadata(output);
2845
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
2943
2846
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
2944
- name: parsedBody.code || parsedBody.Code || errorCode,
2847
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
2945
2848
  $fault: "client",
2946
- $metadata: deserializeMetadata(output),
2849
+ $metadata,
2947
2850
  });
2948
2851
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
2949
2852
  }
@@ -2981,8 +2884,7 @@ const deserializeAws_restJson1CreateApiMappingCommandError = async (output, cont
2981
2884
  body: await parseBody(output.body, context),
2982
2885
  };
2983
2886
  let response;
2984
- let errorCode = "UnknownError";
2985
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2887
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2986
2888
  switch (errorCode) {
2987
2889
  case "BadRequestException":
2988
2890
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -2998,10 +2900,12 @@ const deserializeAws_restJson1CreateApiMappingCommandError = async (output, cont
2998
2900
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
2999
2901
  default:
3000
2902
  const parsedBody = parsedOutput.body;
2903
+ const $metadata = deserializeMetadata(output);
2904
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3001
2905
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3002
- name: parsedBody.code || parsedBody.Code || errorCode,
2906
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3003
2907
  $fault: "client",
3004
- $metadata: deserializeMetadata(output),
2908
+ $metadata,
3005
2909
  });
3006
2910
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3007
2911
  }
@@ -3067,8 +2971,7 @@ const deserializeAws_restJson1CreateAuthorizerCommandError = async (output, cont
3067
2971
  body: await parseBody(output.body, context),
3068
2972
  };
3069
2973
  let response;
3070
- let errorCode = "UnknownError";
3071
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2974
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3072
2975
  switch (errorCode) {
3073
2976
  case "BadRequestException":
3074
2977
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3084,10 +2987,12 @@ const deserializeAws_restJson1CreateAuthorizerCommandError = async (output, cont
3084
2987
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3085
2988
  default:
3086
2989
  const parsedBody = parsedOutput.body;
2990
+ const $metadata = deserializeMetadata(output);
2991
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3087
2992
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3088
- name: parsedBody.code || parsedBody.Code || errorCode,
2993
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3089
2994
  $fault: "client",
3090
- $metadata: deserializeMetadata(output),
2995
+ $metadata,
3091
2996
  });
3092
2997
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3093
2998
  }
@@ -3133,8 +3038,7 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
3133
3038
  body: await parseBody(output.body, context),
3134
3039
  };
3135
3040
  let response;
3136
- let errorCode = "UnknownError";
3137
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3041
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3138
3042
  switch (errorCode) {
3139
3043
  case "BadRequestException":
3140
3044
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3150,10 +3054,12 @@ const deserializeAws_restJson1CreateDeploymentCommandError = async (output, cont
3150
3054
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3151
3055
  default:
3152
3056
  const parsedBody = parsedOutput.body;
3057
+ const $metadata = deserializeMetadata(output);
3058
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3153
3059
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3154
- name: parsedBody.code || parsedBody.Code || errorCode,
3060
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3155
3061
  $fault: "client",
3156
- $metadata: deserializeMetadata(output),
3062
+ $metadata,
3157
3063
  });
3158
3064
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3159
3065
  }
@@ -3195,8 +3101,7 @@ const deserializeAws_restJson1CreateDomainNameCommandError = async (output, cont
3195
3101
  body: await parseBody(output.body, context),
3196
3102
  };
3197
3103
  let response;
3198
- let errorCode = "UnknownError";
3199
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3104
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3200
3105
  switch (errorCode) {
3201
3106
  case "AccessDeniedException":
3202
3107
  case "com.amazonaws.apigatewayv2#AccessDeniedException":
@@ -3215,10 +3120,12 @@ const deserializeAws_restJson1CreateDomainNameCommandError = async (output, cont
3215
3120
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3216
3121
  default:
3217
3122
  const parsedBody = parsedOutput.body;
3123
+ const $metadata = deserializeMetadata(output);
3124
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3218
3125
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3219
- name: parsedBody.code || parsedBody.Code || errorCode,
3126
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3220
3127
  $fault: "client",
3221
- $metadata: deserializeMetadata(output),
3128
+ $metadata,
3222
3129
  });
3223
3130
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3224
3131
  }
@@ -3321,8 +3228,7 @@ const deserializeAws_restJson1CreateIntegrationCommandError = async (output, con
3321
3228
  body: await parseBody(output.body, context),
3322
3229
  };
3323
3230
  let response;
3324
- let errorCode = "UnknownError";
3325
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3231
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3326
3232
  switch (errorCode) {
3327
3233
  case "BadRequestException":
3328
3234
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3338,10 +3244,12 @@ const deserializeAws_restJson1CreateIntegrationCommandError = async (output, con
3338
3244
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3339
3245
  default:
3340
3246
  const parsedBody = parsedOutput.body;
3247
+ const $metadata = deserializeMetadata(output);
3248
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3341
3249
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3342
- name: parsedBody.code || parsedBody.Code || errorCode,
3250
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3343
3251
  $fault: "client",
3344
- $metadata: deserializeMetadata(output),
3252
+ $metadata,
3345
3253
  });
3346
3254
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3347
3255
  }
@@ -3387,8 +3295,7 @@ const deserializeAws_restJson1CreateIntegrationResponseCommandError = async (out
3387
3295
  body: await parseBody(output.body, context),
3388
3296
  };
3389
3297
  let response;
3390
- let errorCode = "UnknownError";
3391
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3298
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3392
3299
  switch (errorCode) {
3393
3300
  case "BadRequestException":
3394
3301
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3404,10 +3311,12 @@ const deserializeAws_restJson1CreateIntegrationResponseCommandError = async (out
3404
3311
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3405
3312
  default:
3406
3313
  const parsedBody = parsedOutput.body;
3314
+ const $metadata = deserializeMetadata(output);
3315
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3407
3316
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3408
- name: parsedBody.code || parsedBody.Code || errorCode,
3317
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3409
3318
  $fault: "client",
3410
- $metadata: deserializeMetadata(output),
3319
+ $metadata,
3411
3320
  });
3412
3321
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3413
3322
  }
@@ -3449,8 +3358,7 @@ const deserializeAws_restJson1CreateModelCommandError = async (output, context)
3449
3358
  body: await parseBody(output.body, context),
3450
3359
  };
3451
3360
  let response;
3452
- let errorCode = "UnknownError";
3453
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3361
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3454
3362
  switch (errorCode) {
3455
3363
  case "BadRequestException":
3456
3364
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3466,10 +3374,12 @@ const deserializeAws_restJson1CreateModelCommandError = async (output, context)
3466
3374
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3467
3375
  default:
3468
3376
  const parsedBody = parsedOutput.body;
3377
+ const $metadata = deserializeMetadata(output);
3378
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3469
3379
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3470
- name: parsedBody.code || parsedBody.Code || errorCode,
3380
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3471
3381
  $fault: "client",
3472
- $metadata: deserializeMetadata(output),
3382
+ $metadata,
3473
3383
  });
3474
3384
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3475
3385
  }
@@ -3543,8 +3453,7 @@ const deserializeAws_restJson1CreateRouteCommandError = async (output, context)
3543
3453
  body: await parseBody(output.body, context),
3544
3454
  };
3545
3455
  let response;
3546
- let errorCode = "UnknownError";
3547
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3456
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3548
3457
  switch (errorCode) {
3549
3458
  case "BadRequestException":
3550
3459
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3560,10 +3469,12 @@ const deserializeAws_restJson1CreateRouteCommandError = async (output, context)
3560
3469
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3561
3470
  default:
3562
3471
  const parsedBody = parsedOutput.body;
3472
+ const $metadata = deserializeMetadata(output);
3473
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3563
3474
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3564
- name: parsedBody.code || parsedBody.Code || errorCode,
3475
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3565
3476
  $fault: "client",
3566
- $metadata: deserializeMetadata(output),
3477
+ $metadata,
3567
3478
  });
3568
3479
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3569
3480
  }
@@ -3605,8 +3516,7 @@ const deserializeAws_restJson1CreateRouteResponseCommandError = async (output, c
3605
3516
  body: await parseBody(output.body, context),
3606
3517
  };
3607
3518
  let response;
3608
- let errorCode = "UnknownError";
3609
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3519
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3610
3520
  switch (errorCode) {
3611
3521
  case "BadRequestException":
3612
3522
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3622,10 +3532,12 @@ const deserializeAws_restJson1CreateRouteResponseCommandError = async (output, c
3622
3532
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3623
3533
  default:
3624
3534
  const parsedBody = parsedOutput.body;
3535
+ const $metadata = deserializeMetadata(output);
3536
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3625
3537
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3626
- name: parsedBody.code || parsedBody.Code || errorCode,
3538
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3627
3539
  $fault: "client",
3628
- $metadata: deserializeMetadata(output),
3540
+ $metadata,
3629
3541
  });
3630
3542
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3631
3543
  }
@@ -3703,8 +3615,7 @@ const deserializeAws_restJson1CreateStageCommandError = async (output, context)
3703
3615
  body: await parseBody(output.body, context),
3704
3616
  };
3705
3617
  let response;
3706
- let errorCode = "UnknownError";
3707
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3618
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3708
3619
  switch (errorCode) {
3709
3620
  case "BadRequestException":
3710
3621
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3720,10 +3631,12 @@ const deserializeAws_restJson1CreateStageCommandError = async (output, context)
3720
3631
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3721
3632
  default:
3722
3633
  const parsedBody = parsedOutput.body;
3634
+ const $metadata = deserializeMetadata(output);
3635
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3723
3636
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3724
- name: parsedBody.code || parsedBody.Code || errorCode,
3637
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3725
3638
  $fault: "client",
3726
- $metadata: deserializeMetadata(output),
3639
+ $metadata,
3727
3640
  });
3728
3641
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3729
3642
  }
@@ -3781,8 +3694,7 @@ const deserializeAws_restJson1CreateVpcLinkCommandError = async (output, context
3781
3694
  body: await parseBody(output.body, context),
3782
3695
  };
3783
3696
  let response;
3784
- let errorCode = "UnknownError";
3785
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3697
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3786
3698
  switch (errorCode) {
3787
3699
  case "BadRequestException":
3788
3700
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3792,10 +3704,12 @@ const deserializeAws_restJson1CreateVpcLinkCommandError = async (output, context
3792
3704
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3793
3705
  default:
3794
3706
  const parsedBody = parsedOutput.body;
3707
+ const $metadata = deserializeMetadata(output);
3708
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3795
3709
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3796
- name: parsedBody.code || parsedBody.Code || errorCode,
3710
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3797
3711
  $fault: "client",
3798
- $metadata: deserializeMetadata(output),
3712
+ $metadata,
3799
3713
  });
3800
3714
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3801
3715
  }
@@ -3817,8 +3731,7 @@ const deserializeAws_restJson1DeleteAccessLogSettingsCommandError = async (outpu
3817
3731
  body: await parseBody(output.body, context),
3818
3732
  };
3819
3733
  let response;
3820
- let errorCode = "UnknownError";
3821
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3734
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3822
3735
  switch (errorCode) {
3823
3736
  case "NotFoundException":
3824
3737
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -3828,10 +3741,12 @@ const deserializeAws_restJson1DeleteAccessLogSettingsCommandError = async (outpu
3828
3741
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3829
3742
  default:
3830
3743
  const parsedBody = parsedOutput.body;
3744
+ const $metadata = deserializeMetadata(output);
3745
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3831
3746
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3832
- name: parsedBody.code || parsedBody.Code || errorCode,
3747
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3833
3748
  $fault: "client",
3834
- $metadata: deserializeMetadata(output),
3749
+ $metadata,
3835
3750
  });
3836
3751
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3837
3752
  }
@@ -3853,8 +3768,7 @@ const deserializeAws_restJson1DeleteApiCommandError = async (output, context) =>
3853
3768
  body: await parseBody(output.body, context),
3854
3769
  };
3855
3770
  let response;
3856
- let errorCode = "UnknownError";
3857
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3771
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3858
3772
  switch (errorCode) {
3859
3773
  case "NotFoundException":
3860
3774
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -3864,10 +3778,12 @@ const deserializeAws_restJson1DeleteApiCommandError = async (output, context) =>
3864
3778
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3865
3779
  default:
3866
3780
  const parsedBody = parsedOutput.body;
3781
+ const $metadata = deserializeMetadata(output);
3782
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3867
3783
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3868
- name: parsedBody.code || parsedBody.Code || errorCode,
3784
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3869
3785
  $fault: "client",
3870
- $metadata: deserializeMetadata(output),
3786
+ $metadata,
3871
3787
  });
3872
3788
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3873
3789
  }
@@ -3889,8 +3805,7 @@ const deserializeAws_restJson1DeleteApiMappingCommandError = async (output, cont
3889
3805
  body: await parseBody(output.body, context),
3890
3806
  };
3891
3807
  let response;
3892
- let errorCode = "UnknownError";
3893
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3808
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3894
3809
  switch (errorCode) {
3895
3810
  case "BadRequestException":
3896
3811
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -3903,10 +3818,12 @@ const deserializeAws_restJson1DeleteApiMappingCommandError = async (output, cont
3903
3818
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3904
3819
  default:
3905
3820
  const parsedBody = parsedOutput.body;
3821
+ const $metadata = deserializeMetadata(output);
3822
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3906
3823
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3907
- name: parsedBody.code || parsedBody.Code || errorCode,
3824
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3908
3825
  $fault: "client",
3909
- $metadata: deserializeMetadata(output),
3826
+ $metadata,
3910
3827
  });
3911
3828
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3912
3829
  }
@@ -3928,8 +3845,7 @@ const deserializeAws_restJson1DeleteAuthorizerCommandError = async (output, cont
3928
3845
  body: await parseBody(output.body, context),
3929
3846
  };
3930
3847
  let response;
3931
- let errorCode = "UnknownError";
3932
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3848
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3933
3849
  switch (errorCode) {
3934
3850
  case "NotFoundException":
3935
3851
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -3939,10 +3855,12 @@ const deserializeAws_restJson1DeleteAuthorizerCommandError = async (output, cont
3939
3855
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3940
3856
  default:
3941
3857
  const parsedBody = parsedOutput.body;
3858
+ const $metadata = deserializeMetadata(output);
3859
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3942
3860
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3943
- name: parsedBody.code || parsedBody.Code || errorCode,
3861
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3944
3862
  $fault: "client",
3945
- $metadata: deserializeMetadata(output),
3863
+ $metadata,
3946
3864
  });
3947
3865
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3948
3866
  }
@@ -3964,8 +3882,7 @@ const deserializeAws_restJson1DeleteCorsConfigurationCommandError = async (outpu
3964
3882
  body: await parseBody(output.body, context),
3965
3883
  };
3966
3884
  let response;
3967
- let errorCode = "UnknownError";
3968
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3885
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3969
3886
  switch (errorCode) {
3970
3887
  case "NotFoundException":
3971
3888
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -3975,10 +3892,12 @@ const deserializeAws_restJson1DeleteCorsConfigurationCommandError = async (outpu
3975
3892
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
3976
3893
  default:
3977
3894
  const parsedBody = parsedOutput.body;
3895
+ const $metadata = deserializeMetadata(output);
3896
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
3978
3897
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
3979
- name: parsedBody.code || parsedBody.Code || errorCode,
3898
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
3980
3899
  $fault: "client",
3981
- $metadata: deserializeMetadata(output),
3900
+ $metadata,
3982
3901
  });
3983
3902
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
3984
3903
  }
@@ -4000,8 +3919,7 @@ const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, cont
4000
3919
  body: await parseBody(output.body, context),
4001
3920
  };
4002
3921
  let response;
4003
- let errorCode = "UnknownError";
4004
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3922
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4005
3923
  switch (errorCode) {
4006
3924
  case "NotFoundException":
4007
3925
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4011,10 +3929,12 @@ const deserializeAws_restJson1DeleteDeploymentCommandError = async (output, cont
4011
3929
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4012
3930
  default:
4013
3931
  const parsedBody = parsedOutput.body;
3932
+ const $metadata = deserializeMetadata(output);
3933
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4014
3934
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4015
- name: parsedBody.code || parsedBody.Code || errorCode,
3935
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4016
3936
  $fault: "client",
4017
- $metadata: deserializeMetadata(output),
3937
+ $metadata,
4018
3938
  });
4019
3939
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4020
3940
  }
@@ -4036,8 +3956,7 @@ const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, cont
4036
3956
  body: await parseBody(output.body, context),
4037
3957
  };
4038
3958
  let response;
4039
- let errorCode = "UnknownError";
4040
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3959
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4041
3960
  switch (errorCode) {
4042
3961
  case "NotFoundException":
4043
3962
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4047,10 +3966,12 @@ const deserializeAws_restJson1DeleteDomainNameCommandError = async (output, cont
4047
3966
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4048
3967
  default:
4049
3968
  const parsedBody = parsedOutput.body;
3969
+ const $metadata = deserializeMetadata(output);
3970
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4050
3971
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4051
- name: parsedBody.code || parsedBody.Code || errorCode,
3972
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4052
3973
  $fault: "client",
4053
- $metadata: deserializeMetadata(output),
3974
+ $metadata,
4054
3975
  });
4055
3976
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4056
3977
  }
@@ -4072,8 +3993,7 @@ const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, con
4072
3993
  body: await parseBody(output.body, context),
4073
3994
  };
4074
3995
  let response;
4075
- let errorCode = "UnknownError";
4076
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3996
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4077
3997
  switch (errorCode) {
4078
3998
  case "NotFoundException":
4079
3999
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4083,10 +4003,12 @@ const deserializeAws_restJson1DeleteIntegrationCommandError = async (output, con
4083
4003
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4084
4004
  default:
4085
4005
  const parsedBody = parsedOutput.body;
4006
+ const $metadata = deserializeMetadata(output);
4007
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4086
4008
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4087
- name: parsedBody.code || parsedBody.Code || errorCode,
4009
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4088
4010
  $fault: "client",
4089
- $metadata: deserializeMetadata(output),
4011
+ $metadata,
4090
4012
  });
4091
4013
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4092
4014
  }
@@ -4108,8 +4030,7 @@ const deserializeAws_restJson1DeleteIntegrationResponseCommandError = async (out
4108
4030
  body: await parseBody(output.body, context),
4109
4031
  };
4110
4032
  let response;
4111
- let errorCode = "UnknownError";
4112
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4033
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4113
4034
  switch (errorCode) {
4114
4035
  case "NotFoundException":
4115
4036
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4119,10 +4040,12 @@ const deserializeAws_restJson1DeleteIntegrationResponseCommandError = async (out
4119
4040
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4120
4041
  default:
4121
4042
  const parsedBody = parsedOutput.body;
4043
+ const $metadata = deserializeMetadata(output);
4044
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4122
4045
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4123
- name: parsedBody.code || parsedBody.Code || errorCode,
4046
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4124
4047
  $fault: "client",
4125
- $metadata: deserializeMetadata(output),
4048
+ $metadata,
4126
4049
  });
4127
4050
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4128
4051
  }
@@ -4144,8 +4067,7 @@ const deserializeAws_restJson1DeleteModelCommandError = async (output, context)
4144
4067
  body: await parseBody(output.body, context),
4145
4068
  };
4146
4069
  let response;
4147
- let errorCode = "UnknownError";
4148
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4070
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4149
4071
  switch (errorCode) {
4150
4072
  case "NotFoundException":
4151
4073
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4155,10 +4077,12 @@ const deserializeAws_restJson1DeleteModelCommandError = async (output, context)
4155
4077
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4156
4078
  default:
4157
4079
  const parsedBody = parsedOutput.body;
4080
+ const $metadata = deserializeMetadata(output);
4081
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4158
4082
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4159
- name: parsedBody.code || parsedBody.Code || errorCode,
4083
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4160
4084
  $fault: "client",
4161
- $metadata: deserializeMetadata(output),
4085
+ $metadata,
4162
4086
  });
4163
4087
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4164
4088
  }
@@ -4180,8 +4104,7 @@ const deserializeAws_restJson1DeleteRouteCommandError = async (output, context)
4180
4104
  body: await parseBody(output.body, context),
4181
4105
  };
4182
4106
  let response;
4183
- let errorCode = "UnknownError";
4184
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4107
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4185
4108
  switch (errorCode) {
4186
4109
  case "NotFoundException":
4187
4110
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4191,10 +4114,12 @@ const deserializeAws_restJson1DeleteRouteCommandError = async (output, context)
4191
4114
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4192
4115
  default:
4193
4116
  const parsedBody = parsedOutput.body;
4117
+ const $metadata = deserializeMetadata(output);
4118
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4194
4119
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4195
- name: parsedBody.code || parsedBody.Code || errorCode,
4120
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4196
4121
  $fault: "client",
4197
- $metadata: deserializeMetadata(output),
4122
+ $metadata,
4198
4123
  });
4199
4124
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4200
4125
  }
@@ -4216,8 +4141,7 @@ const deserializeAws_restJson1DeleteRouteRequestParameterCommandError = async (o
4216
4141
  body: await parseBody(output.body, context),
4217
4142
  };
4218
4143
  let response;
4219
- let errorCode = "UnknownError";
4220
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4144
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4221
4145
  switch (errorCode) {
4222
4146
  case "NotFoundException":
4223
4147
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4227,10 +4151,12 @@ const deserializeAws_restJson1DeleteRouteRequestParameterCommandError = async (o
4227
4151
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4228
4152
  default:
4229
4153
  const parsedBody = parsedOutput.body;
4154
+ const $metadata = deserializeMetadata(output);
4155
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4230
4156
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4231
- name: parsedBody.code || parsedBody.Code || errorCode,
4157
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4232
4158
  $fault: "client",
4233
- $metadata: deserializeMetadata(output),
4159
+ $metadata,
4234
4160
  });
4235
4161
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4236
4162
  }
@@ -4252,8 +4178,7 @@ const deserializeAws_restJson1DeleteRouteResponseCommandError = async (output, c
4252
4178
  body: await parseBody(output.body, context),
4253
4179
  };
4254
4180
  let response;
4255
- let errorCode = "UnknownError";
4256
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4181
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4257
4182
  switch (errorCode) {
4258
4183
  case "NotFoundException":
4259
4184
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4263,10 +4188,12 @@ const deserializeAws_restJson1DeleteRouteResponseCommandError = async (output, c
4263
4188
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4264
4189
  default:
4265
4190
  const parsedBody = parsedOutput.body;
4191
+ const $metadata = deserializeMetadata(output);
4192
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4266
4193
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4267
- name: parsedBody.code || parsedBody.Code || errorCode,
4194
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4268
4195
  $fault: "client",
4269
- $metadata: deserializeMetadata(output),
4196
+ $metadata,
4270
4197
  });
4271
4198
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4272
4199
  }
@@ -4288,8 +4215,7 @@ const deserializeAws_restJson1DeleteRouteSettingsCommandError = async (output, c
4288
4215
  body: await parseBody(output.body, context),
4289
4216
  };
4290
4217
  let response;
4291
- let errorCode = "UnknownError";
4292
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4218
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4293
4219
  switch (errorCode) {
4294
4220
  case "NotFoundException":
4295
4221
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4299,10 +4225,12 @@ const deserializeAws_restJson1DeleteRouteSettingsCommandError = async (output, c
4299
4225
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4300
4226
  default:
4301
4227
  const parsedBody = parsedOutput.body;
4228
+ const $metadata = deserializeMetadata(output);
4229
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4302
4230
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4303
- name: parsedBody.code || parsedBody.Code || errorCode,
4231
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4304
4232
  $fault: "client",
4305
- $metadata: deserializeMetadata(output),
4233
+ $metadata,
4306
4234
  });
4307
4235
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4308
4236
  }
@@ -4324,8 +4252,7 @@ const deserializeAws_restJson1DeleteStageCommandError = async (output, context)
4324
4252
  body: await parseBody(output.body, context),
4325
4253
  };
4326
4254
  let response;
4327
- let errorCode = "UnknownError";
4328
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4255
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4329
4256
  switch (errorCode) {
4330
4257
  case "NotFoundException":
4331
4258
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4335,10 +4262,12 @@ const deserializeAws_restJson1DeleteStageCommandError = async (output, context)
4335
4262
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4336
4263
  default:
4337
4264
  const parsedBody = parsedOutput.body;
4265
+ const $metadata = deserializeMetadata(output);
4266
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4338
4267
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4339
- name: parsedBody.code || parsedBody.Code || errorCode,
4268
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4340
4269
  $fault: "client",
4341
- $metadata: deserializeMetadata(output),
4270
+ $metadata,
4342
4271
  });
4343
4272
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4344
4273
  }
@@ -4360,8 +4289,7 @@ const deserializeAws_restJson1DeleteVpcLinkCommandError = async (output, context
4360
4289
  body: await parseBody(output.body, context),
4361
4290
  };
4362
4291
  let response;
4363
- let errorCode = "UnknownError";
4364
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4292
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4365
4293
  switch (errorCode) {
4366
4294
  case "NotFoundException":
4367
4295
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4371,10 +4299,12 @@ const deserializeAws_restJson1DeleteVpcLinkCommandError = async (output, context
4371
4299
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4372
4300
  default:
4373
4301
  const parsedBody = parsedOutput.body;
4302
+ const $metadata = deserializeMetadata(output);
4303
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4374
4304
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4375
- name: parsedBody.code || parsedBody.Code || errorCode,
4305
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4376
4306
  $fault: "client",
4377
- $metadata: deserializeMetadata(output),
4307
+ $metadata,
4378
4308
  });
4379
4309
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4380
4310
  }
@@ -4398,8 +4328,7 @@ const deserializeAws_restJson1ExportApiCommandError = async (output, context) =>
4398
4328
  body: await parseBody(output.body, context),
4399
4329
  };
4400
4330
  let response;
4401
- let errorCode = "UnknownError";
4402
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4331
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4403
4332
  switch (errorCode) {
4404
4333
  case "BadRequestException":
4405
4334
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4412,10 +4341,12 @@ const deserializeAws_restJson1ExportApiCommandError = async (output, context) =>
4412
4341
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4413
4342
  default:
4414
4343
  const parsedBody = parsedOutput.body;
4344
+ const $metadata = deserializeMetadata(output);
4345
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4415
4346
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4416
- name: parsedBody.code || parsedBody.Code || errorCode,
4347
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4417
4348
  $fault: "client",
4418
- $metadata: deserializeMetadata(output),
4349
+ $metadata,
4419
4350
  });
4420
4351
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4421
4352
  }
@@ -4501,8 +4432,7 @@ const deserializeAws_restJson1GetApiCommandError = async (output, context) => {
4501
4432
  body: await parseBody(output.body, context),
4502
4433
  };
4503
4434
  let response;
4504
- let errorCode = "UnknownError";
4505
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4435
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4506
4436
  switch (errorCode) {
4507
4437
  case "NotFoundException":
4508
4438
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4512,10 +4442,12 @@ const deserializeAws_restJson1GetApiCommandError = async (output, context) => {
4512
4442
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4513
4443
  default:
4514
4444
  const parsedBody = parsedOutput.body;
4445
+ const $metadata = deserializeMetadata(output);
4446
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4515
4447
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4516
- name: parsedBody.code || parsedBody.Code || errorCode,
4448
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4517
4449
  $fault: "client",
4518
- $metadata: deserializeMetadata(output),
4450
+ $metadata,
4519
4451
  });
4520
4452
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4521
4453
  }
@@ -4553,8 +4485,7 @@ const deserializeAws_restJson1GetApiMappingCommandError = async (output, context
4553
4485
  body: await parseBody(output.body, context),
4554
4486
  };
4555
4487
  let response;
4556
- let errorCode = "UnknownError";
4557
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4488
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4558
4489
  switch (errorCode) {
4559
4490
  case "BadRequestException":
4560
4491
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4567,10 +4498,12 @@ const deserializeAws_restJson1GetApiMappingCommandError = async (output, context
4567
4498
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4568
4499
  default:
4569
4500
  const parsedBody = parsedOutput.body;
4501
+ const $metadata = deserializeMetadata(output);
4502
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4570
4503
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4571
- name: parsedBody.code || parsedBody.Code || errorCode,
4504
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4572
4505
  $fault: "client",
4573
- $metadata: deserializeMetadata(output),
4506
+ $metadata,
4574
4507
  });
4575
4508
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4576
4509
  }
@@ -4600,8 +4533,7 @@ const deserializeAws_restJson1GetApiMappingsCommandError = async (output, contex
4600
4533
  body: await parseBody(output.body, context),
4601
4534
  };
4602
4535
  let response;
4603
- let errorCode = "UnknownError";
4604
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4536
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4605
4537
  switch (errorCode) {
4606
4538
  case "BadRequestException":
4607
4539
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4614,10 +4546,12 @@ const deserializeAws_restJson1GetApiMappingsCommandError = async (output, contex
4614
4546
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4615
4547
  default:
4616
4548
  const parsedBody = parsedOutput.body;
4549
+ const $metadata = deserializeMetadata(output);
4550
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4617
4551
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4618
- name: parsedBody.code || parsedBody.Code || errorCode,
4552
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4619
4553
  $fault: "client",
4620
- $metadata: deserializeMetadata(output),
4554
+ $metadata,
4621
4555
  });
4622
4556
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4623
4557
  }
@@ -4647,8 +4581,7 @@ const deserializeAws_restJson1GetApisCommandError = async (output, context) => {
4647
4581
  body: await parseBody(output.body, context),
4648
4582
  };
4649
4583
  let response;
4650
- let errorCode = "UnknownError";
4651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4584
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4652
4585
  switch (errorCode) {
4653
4586
  case "BadRequestException":
4654
4587
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4661,10 +4594,12 @@ const deserializeAws_restJson1GetApisCommandError = async (output, context) => {
4661
4594
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4662
4595
  default:
4663
4596
  const parsedBody = parsedOutput.body;
4597
+ const $metadata = deserializeMetadata(output);
4598
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4664
4599
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4665
- name: parsedBody.code || parsedBody.Code || errorCode,
4600
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4666
4601
  $fault: "client",
4667
- $metadata: deserializeMetadata(output),
4602
+ $metadata,
4668
4603
  });
4669
4604
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4670
4605
  }
@@ -4730,8 +4665,7 @@ const deserializeAws_restJson1GetAuthorizerCommandError = async (output, context
4730
4665
  body: await parseBody(output.body, context),
4731
4666
  };
4732
4667
  let response;
4733
- let errorCode = "UnknownError";
4734
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4668
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4735
4669
  switch (errorCode) {
4736
4670
  case "NotFoundException":
4737
4671
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4741,10 +4675,12 @@ const deserializeAws_restJson1GetAuthorizerCommandError = async (output, context
4741
4675
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4742
4676
  default:
4743
4677
  const parsedBody = parsedOutput.body;
4678
+ const $metadata = deserializeMetadata(output);
4679
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4744
4680
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4745
- name: parsedBody.code || parsedBody.Code || errorCode,
4681
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4746
4682
  $fault: "client",
4747
- $metadata: deserializeMetadata(output),
4683
+ $metadata,
4748
4684
  });
4749
4685
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4750
4686
  }
@@ -4774,8 +4710,7 @@ const deserializeAws_restJson1GetAuthorizersCommandError = async (output, contex
4774
4710
  body: await parseBody(output.body, context),
4775
4711
  };
4776
4712
  let response;
4777
- let errorCode = "UnknownError";
4778
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4713
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4779
4714
  switch (errorCode) {
4780
4715
  case "BadRequestException":
4781
4716
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4788,10 +4723,12 @@ const deserializeAws_restJson1GetAuthorizersCommandError = async (output, contex
4788
4723
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4789
4724
  default:
4790
4725
  const parsedBody = parsedOutput.body;
4726
+ const $metadata = deserializeMetadata(output);
4727
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4791
4728
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4792
- name: parsedBody.code || parsedBody.Code || errorCode,
4729
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4793
4730
  $fault: "client",
4794
- $metadata: deserializeMetadata(output),
4731
+ $metadata,
4795
4732
  });
4796
4733
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4797
4734
  }
@@ -4837,8 +4774,7 @@ const deserializeAws_restJson1GetDeploymentCommandError = async (output, context
4837
4774
  body: await parseBody(output.body, context),
4838
4775
  };
4839
4776
  let response;
4840
- let errorCode = "UnknownError";
4841
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4777
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4842
4778
  switch (errorCode) {
4843
4779
  case "NotFoundException":
4844
4780
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4848,10 +4784,12 @@ const deserializeAws_restJson1GetDeploymentCommandError = async (output, context
4848
4784
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4849
4785
  default:
4850
4786
  const parsedBody = parsedOutput.body;
4787
+ const $metadata = deserializeMetadata(output);
4788
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4851
4789
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4852
- name: parsedBody.code || parsedBody.Code || errorCode,
4790
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4853
4791
  $fault: "client",
4854
- $metadata: deserializeMetadata(output),
4792
+ $metadata,
4855
4793
  });
4856
4794
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4857
4795
  }
@@ -4881,8 +4819,7 @@ const deserializeAws_restJson1GetDeploymentsCommandError = async (output, contex
4881
4819
  body: await parseBody(output.body, context),
4882
4820
  };
4883
4821
  let response;
4884
- let errorCode = "UnknownError";
4885
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4822
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4886
4823
  switch (errorCode) {
4887
4824
  case "BadRequestException":
4888
4825
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4895,10 +4832,12 @@ const deserializeAws_restJson1GetDeploymentsCommandError = async (output, contex
4895
4832
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4896
4833
  default:
4897
4834
  const parsedBody = parsedOutput.body;
4835
+ const $metadata = deserializeMetadata(output);
4836
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4898
4837
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4899
- name: parsedBody.code || parsedBody.Code || errorCode,
4838
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4900
4839
  $fault: "client",
4901
- $metadata: deserializeMetadata(output),
4840
+ $metadata,
4902
4841
  });
4903
4842
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4904
4843
  }
@@ -4940,8 +4879,7 @@ const deserializeAws_restJson1GetDomainNameCommandError = async (output, context
4940
4879
  body: await parseBody(output.body, context),
4941
4880
  };
4942
4881
  let response;
4943
- let errorCode = "UnknownError";
4944
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4882
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4945
4883
  switch (errorCode) {
4946
4884
  case "NotFoundException":
4947
4885
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -4951,10 +4889,12 @@ const deserializeAws_restJson1GetDomainNameCommandError = async (output, context
4951
4889
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4952
4890
  default:
4953
4891
  const parsedBody = parsedOutput.body;
4892
+ const $metadata = deserializeMetadata(output);
4893
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4954
4894
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
4955
- name: parsedBody.code || parsedBody.Code || errorCode,
4895
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4956
4896
  $fault: "client",
4957
- $metadata: deserializeMetadata(output),
4897
+ $metadata,
4958
4898
  });
4959
4899
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4960
4900
  }
@@ -4984,8 +4924,7 @@ const deserializeAws_restJson1GetDomainNamesCommandError = async (output, contex
4984
4924
  body: await parseBody(output.body, context),
4985
4925
  };
4986
4926
  let response;
4987
- let errorCode = "UnknownError";
4988
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4927
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
4989
4928
  switch (errorCode) {
4990
4929
  case "BadRequestException":
4991
4930
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -4998,10 +4937,12 @@ const deserializeAws_restJson1GetDomainNamesCommandError = async (output, contex
4998
4937
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
4999
4938
  default:
5000
4939
  const parsedBody = parsedOutput.body;
4940
+ const $metadata = deserializeMetadata(output);
4941
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5001
4942
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5002
- name: parsedBody.code || parsedBody.Code || errorCode,
4943
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5003
4944
  $fault: "client",
5004
- $metadata: deserializeMetadata(output),
4945
+ $metadata,
5005
4946
  });
5006
4947
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5007
4948
  }
@@ -5104,8 +5045,7 @@ const deserializeAws_restJson1GetIntegrationCommandError = async (output, contex
5104
5045
  body: await parseBody(output.body, context),
5105
5046
  };
5106
5047
  let response;
5107
- let errorCode = "UnknownError";
5108
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5048
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5109
5049
  switch (errorCode) {
5110
5050
  case "NotFoundException":
5111
5051
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5115,10 +5055,12 @@ const deserializeAws_restJson1GetIntegrationCommandError = async (output, contex
5115
5055
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5116
5056
  default:
5117
5057
  const parsedBody = parsedOutput.body;
5058
+ const $metadata = deserializeMetadata(output);
5059
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5118
5060
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5119
- name: parsedBody.code || parsedBody.Code || errorCode,
5061
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5120
5062
  $fault: "client",
5121
- $metadata: deserializeMetadata(output),
5063
+ $metadata,
5122
5064
  });
5123
5065
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5124
5066
  }
@@ -5164,8 +5106,7 @@ const deserializeAws_restJson1GetIntegrationResponseCommandError = async (output
5164
5106
  body: await parseBody(output.body, context),
5165
5107
  };
5166
5108
  let response;
5167
- let errorCode = "UnknownError";
5168
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5109
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5169
5110
  switch (errorCode) {
5170
5111
  case "NotFoundException":
5171
5112
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5175,10 +5116,12 @@ const deserializeAws_restJson1GetIntegrationResponseCommandError = async (output
5175
5116
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5176
5117
  default:
5177
5118
  const parsedBody = parsedOutput.body;
5119
+ const $metadata = deserializeMetadata(output);
5120
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5178
5121
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5179
- name: parsedBody.code || parsedBody.Code || errorCode,
5122
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5180
5123
  $fault: "client",
5181
- $metadata: deserializeMetadata(output),
5124
+ $metadata,
5182
5125
  });
5183
5126
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5184
5127
  }
@@ -5208,8 +5151,7 @@ const deserializeAws_restJson1GetIntegrationResponsesCommandError = async (outpu
5208
5151
  body: await parseBody(output.body, context),
5209
5152
  };
5210
5153
  let response;
5211
- let errorCode = "UnknownError";
5212
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5154
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5213
5155
  switch (errorCode) {
5214
5156
  case "BadRequestException":
5215
5157
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5222,10 +5164,12 @@ const deserializeAws_restJson1GetIntegrationResponsesCommandError = async (outpu
5222
5164
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5223
5165
  default:
5224
5166
  const parsedBody = parsedOutput.body;
5167
+ const $metadata = deserializeMetadata(output);
5168
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5225
5169
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5226
- name: parsedBody.code || parsedBody.Code || errorCode,
5170
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5227
5171
  $fault: "client",
5228
- $metadata: deserializeMetadata(output),
5172
+ $metadata,
5229
5173
  });
5230
5174
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5231
5175
  }
@@ -5255,8 +5199,7 @@ const deserializeAws_restJson1GetIntegrationsCommandError = async (output, conte
5255
5199
  body: await parseBody(output.body, context),
5256
5200
  };
5257
5201
  let response;
5258
- let errorCode = "UnknownError";
5259
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5202
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5260
5203
  switch (errorCode) {
5261
5204
  case "BadRequestException":
5262
5205
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5269,10 +5212,12 @@ const deserializeAws_restJson1GetIntegrationsCommandError = async (output, conte
5269
5212
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5270
5213
  default:
5271
5214
  const parsedBody = parsedOutput.body;
5215
+ const $metadata = deserializeMetadata(output);
5216
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5272
5217
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5273
- name: parsedBody.code || parsedBody.Code || errorCode,
5218
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5274
5219
  $fault: "client",
5275
- $metadata: deserializeMetadata(output),
5220
+ $metadata,
5276
5221
  });
5277
5222
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5278
5223
  }
@@ -5314,8 +5259,7 @@ const deserializeAws_restJson1GetModelCommandError = async (output, context) =>
5314
5259
  body: await parseBody(output.body, context),
5315
5260
  };
5316
5261
  let response;
5317
- let errorCode = "UnknownError";
5318
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5262
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5319
5263
  switch (errorCode) {
5320
5264
  case "NotFoundException":
5321
5265
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5325,10 +5269,12 @@ const deserializeAws_restJson1GetModelCommandError = async (output, context) =>
5325
5269
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5326
5270
  default:
5327
5271
  const parsedBody = parsedOutput.body;
5272
+ const $metadata = deserializeMetadata(output);
5273
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5328
5274
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5329
- name: parsedBody.code || parsedBody.Code || errorCode,
5275
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5330
5276
  $fault: "client",
5331
- $metadata: deserializeMetadata(output),
5277
+ $metadata,
5332
5278
  });
5333
5279
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5334
5280
  }
@@ -5358,8 +5304,7 @@ const deserializeAws_restJson1GetModelsCommandError = async (output, context) =>
5358
5304
  body: await parseBody(output.body, context),
5359
5305
  };
5360
5306
  let response;
5361
- let errorCode = "UnknownError";
5362
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5307
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5363
5308
  switch (errorCode) {
5364
5309
  case "BadRequestException":
5365
5310
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5372,10 +5317,12 @@ const deserializeAws_restJson1GetModelsCommandError = async (output, context) =>
5372
5317
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5373
5318
  default:
5374
5319
  const parsedBody = parsedOutput.body;
5320
+ const $metadata = deserializeMetadata(output);
5321
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5375
5322
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5376
- name: parsedBody.code || parsedBody.Code || errorCode,
5323
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5377
5324
  $fault: "client",
5378
- $metadata: deserializeMetadata(output),
5325
+ $metadata,
5379
5326
  });
5380
5327
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5381
5328
  }
@@ -5401,8 +5348,7 @@ const deserializeAws_restJson1GetModelTemplateCommandError = async (output, cont
5401
5348
  body: await parseBody(output.body, context),
5402
5349
  };
5403
5350
  let response;
5404
- let errorCode = "UnknownError";
5405
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5351
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5406
5352
  switch (errorCode) {
5407
5353
  case "NotFoundException":
5408
5354
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5412,10 +5358,12 @@ const deserializeAws_restJson1GetModelTemplateCommandError = async (output, cont
5412
5358
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5413
5359
  default:
5414
5360
  const parsedBody = parsedOutput.body;
5361
+ const $metadata = deserializeMetadata(output);
5362
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5415
5363
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5416
- name: parsedBody.code || parsedBody.Code || errorCode,
5364
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5417
5365
  $fault: "client",
5418
- $metadata: deserializeMetadata(output),
5366
+ $metadata,
5419
5367
  });
5420
5368
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5421
5369
  }
@@ -5489,8 +5437,7 @@ const deserializeAws_restJson1GetRouteCommandError = async (output, context) =>
5489
5437
  body: await parseBody(output.body, context),
5490
5438
  };
5491
5439
  let response;
5492
- let errorCode = "UnknownError";
5493
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5440
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5494
5441
  switch (errorCode) {
5495
5442
  case "NotFoundException":
5496
5443
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5500,10 +5447,12 @@ const deserializeAws_restJson1GetRouteCommandError = async (output, context) =>
5500
5447
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5501
5448
  default:
5502
5449
  const parsedBody = parsedOutput.body;
5450
+ const $metadata = deserializeMetadata(output);
5451
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5503
5452
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5504
- name: parsedBody.code || parsedBody.Code || errorCode,
5453
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5505
5454
  $fault: "client",
5506
- $metadata: deserializeMetadata(output),
5455
+ $metadata,
5507
5456
  });
5508
5457
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5509
5458
  }
@@ -5545,8 +5494,7 @@ const deserializeAws_restJson1GetRouteResponseCommandError = async (output, cont
5545
5494
  body: await parseBody(output.body, context),
5546
5495
  };
5547
5496
  let response;
5548
- let errorCode = "UnknownError";
5549
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5497
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5550
5498
  switch (errorCode) {
5551
5499
  case "NotFoundException":
5552
5500
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5556,10 +5504,12 @@ const deserializeAws_restJson1GetRouteResponseCommandError = async (output, cont
5556
5504
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5557
5505
  default:
5558
5506
  const parsedBody = parsedOutput.body;
5507
+ const $metadata = deserializeMetadata(output);
5508
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5559
5509
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5560
- name: parsedBody.code || parsedBody.Code || errorCode,
5510
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5561
5511
  $fault: "client",
5562
- $metadata: deserializeMetadata(output),
5512
+ $metadata,
5563
5513
  });
5564
5514
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5565
5515
  }
@@ -5589,8 +5539,7 @@ const deserializeAws_restJson1GetRouteResponsesCommandError = async (output, con
5589
5539
  body: await parseBody(output.body, context),
5590
5540
  };
5591
5541
  let response;
5592
- let errorCode = "UnknownError";
5593
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5542
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5594
5543
  switch (errorCode) {
5595
5544
  case "BadRequestException":
5596
5545
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5603,10 +5552,12 @@ const deserializeAws_restJson1GetRouteResponsesCommandError = async (output, con
5603
5552
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5604
5553
  default:
5605
5554
  const parsedBody = parsedOutput.body;
5555
+ const $metadata = deserializeMetadata(output);
5556
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5606
5557
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5607
- name: parsedBody.code || parsedBody.Code || errorCode,
5558
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5608
5559
  $fault: "client",
5609
- $metadata: deserializeMetadata(output),
5560
+ $metadata,
5610
5561
  });
5611
5562
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5612
5563
  }
@@ -5636,8 +5587,7 @@ const deserializeAws_restJson1GetRoutesCommandError = async (output, context) =>
5636
5587
  body: await parseBody(output.body, context),
5637
5588
  };
5638
5589
  let response;
5639
- let errorCode = "UnknownError";
5640
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5590
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5641
5591
  switch (errorCode) {
5642
5592
  case "BadRequestException":
5643
5593
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5650,10 +5600,12 @@ const deserializeAws_restJson1GetRoutesCommandError = async (output, context) =>
5650
5600
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5651
5601
  default:
5652
5602
  const parsedBody = parsedOutput.body;
5603
+ const $metadata = deserializeMetadata(output);
5604
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5653
5605
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5654
- name: parsedBody.code || parsedBody.Code || errorCode,
5606
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5655
5607
  $fault: "client",
5656
- $metadata: deserializeMetadata(output),
5608
+ $metadata,
5657
5609
  });
5658
5610
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5659
5611
  }
@@ -5731,8 +5683,7 @@ const deserializeAws_restJson1GetStageCommandError = async (output, context) =>
5731
5683
  body: await parseBody(output.body, context),
5732
5684
  };
5733
5685
  let response;
5734
- let errorCode = "UnknownError";
5735
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5686
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5736
5687
  switch (errorCode) {
5737
5688
  case "NotFoundException":
5738
5689
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5742,10 +5693,12 @@ const deserializeAws_restJson1GetStageCommandError = async (output, context) =>
5742
5693
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5743
5694
  default:
5744
5695
  const parsedBody = parsedOutput.body;
5696
+ const $metadata = deserializeMetadata(output);
5697
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5745
5698
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5746
- name: parsedBody.code || parsedBody.Code || errorCode,
5699
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5747
5700
  $fault: "client",
5748
- $metadata: deserializeMetadata(output),
5701
+ $metadata,
5749
5702
  });
5750
5703
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5751
5704
  }
@@ -5775,8 +5728,7 @@ const deserializeAws_restJson1GetStagesCommandError = async (output, context) =>
5775
5728
  body: await parseBody(output.body, context),
5776
5729
  };
5777
5730
  let response;
5778
- let errorCode = "UnknownError";
5779
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5731
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5780
5732
  switch (errorCode) {
5781
5733
  case "BadRequestException":
5782
5734
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5789,10 +5741,12 @@ const deserializeAws_restJson1GetStagesCommandError = async (output, context) =>
5789
5741
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5790
5742
  default:
5791
5743
  const parsedBody = parsedOutput.body;
5744
+ const $metadata = deserializeMetadata(output);
5745
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5792
5746
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5793
- name: parsedBody.code || parsedBody.Code || errorCode,
5747
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5794
5748
  $fault: "client",
5795
- $metadata: deserializeMetadata(output),
5749
+ $metadata,
5796
5750
  });
5797
5751
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5798
5752
  }
@@ -5818,8 +5772,7 @@ const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
5818
5772
  body: await parseBody(output.body, context),
5819
5773
  };
5820
5774
  let response;
5821
- let errorCode = "UnknownError";
5822
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5775
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5823
5776
  switch (errorCode) {
5824
5777
  case "BadRequestException":
5825
5778
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5835,10 +5788,12 @@ const deserializeAws_restJson1GetTagsCommandError = async (output, context) => {
5835
5788
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5836
5789
  default:
5837
5790
  const parsedBody = parsedOutput.body;
5791
+ const $metadata = deserializeMetadata(output);
5792
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5838
5793
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5839
- name: parsedBody.code || parsedBody.Code || errorCode,
5794
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5840
5795
  $fault: "client",
5841
- $metadata: deserializeMetadata(output),
5796
+ $metadata,
5842
5797
  });
5843
5798
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5844
5799
  }
@@ -5896,8 +5851,7 @@ const deserializeAws_restJson1GetVpcLinkCommandError = async (output, context) =
5896
5851
  body: await parseBody(output.body, context),
5897
5852
  };
5898
5853
  let response;
5899
- let errorCode = "UnknownError";
5900
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5854
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5901
5855
  switch (errorCode) {
5902
5856
  case "NotFoundException":
5903
5857
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -5907,10 +5861,12 @@ const deserializeAws_restJson1GetVpcLinkCommandError = async (output, context) =
5907
5861
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5908
5862
  default:
5909
5863
  const parsedBody = parsedOutput.body;
5864
+ const $metadata = deserializeMetadata(output);
5865
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5910
5866
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5911
- name: parsedBody.code || parsedBody.Code || errorCode,
5867
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5912
5868
  $fault: "client",
5913
- $metadata: deserializeMetadata(output),
5869
+ $metadata,
5914
5870
  });
5915
5871
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5916
5872
  }
@@ -5940,8 +5896,7 @@ const deserializeAws_restJson1GetVpcLinksCommandError = async (output, context)
5940
5896
  body: await parseBody(output.body, context),
5941
5897
  };
5942
5898
  let response;
5943
- let errorCode = "UnknownError";
5944
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5899
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
5945
5900
  switch (errorCode) {
5946
5901
  case "BadRequestException":
5947
5902
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -5951,10 +5906,12 @@ const deserializeAws_restJson1GetVpcLinksCommandError = async (output, context)
5951
5906
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
5952
5907
  default:
5953
5908
  const parsedBody = parsedOutput.body;
5909
+ const $metadata = deserializeMetadata(output);
5910
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5954
5911
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
5955
- name: parsedBody.code || parsedBody.Code || errorCode,
5912
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5956
5913
  $fault: "client",
5957
- $metadata: deserializeMetadata(output),
5914
+ $metadata,
5958
5915
  });
5959
5916
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5960
5917
  }
@@ -6040,8 +5997,7 @@ const deserializeAws_restJson1ImportApiCommandError = async (output, context) =>
6040
5997
  body: await parseBody(output.body, context),
6041
5998
  };
6042
5999
  let response;
6043
- let errorCode = "UnknownError";
6044
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6000
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6045
6001
  switch (errorCode) {
6046
6002
  case "BadRequestException":
6047
6003
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6057,10 +6013,12 @@ const deserializeAws_restJson1ImportApiCommandError = async (output, context) =>
6057
6013
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6058
6014
  default:
6059
6015
  const parsedBody = parsedOutput.body;
6016
+ const $metadata = deserializeMetadata(output);
6017
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6060
6018
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6061
- name: parsedBody.code || parsedBody.Code || errorCode,
6019
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6062
6020
  $fault: "client",
6063
- $metadata: deserializeMetadata(output),
6021
+ $metadata,
6064
6022
  });
6065
6023
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6066
6024
  }
@@ -6146,8 +6104,7 @@ const deserializeAws_restJson1ReimportApiCommandError = async (output, context)
6146
6104
  body: await parseBody(output.body, context),
6147
6105
  };
6148
6106
  let response;
6149
- let errorCode = "UnknownError";
6150
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6107
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6151
6108
  switch (errorCode) {
6152
6109
  case "BadRequestException":
6153
6110
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6163,10 +6120,12 @@ const deserializeAws_restJson1ReimportApiCommandError = async (output, context)
6163
6120
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6164
6121
  default:
6165
6122
  const parsedBody = parsedOutput.body;
6123
+ const $metadata = deserializeMetadata(output);
6124
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6166
6125
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6167
- name: parsedBody.code || parsedBody.Code || errorCode,
6126
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6168
6127
  $fault: "client",
6169
- $metadata: deserializeMetadata(output),
6128
+ $metadata,
6170
6129
  });
6171
6130
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6172
6131
  }
@@ -6188,8 +6147,7 @@ const deserializeAws_restJson1ResetAuthorizersCacheCommandError = async (output,
6188
6147
  body: await parseBody(output.body, context),
6189
6148
  };
6190
6149
  let response;
6191
- let errorCode = "UnknownError";
6192
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6150
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6193
6151
  switch (errorCode) {
6194
6152
  case "NotFoundException":
6195
6153
  case "com.amazonaws.apigatewayv2#NotFoundException":
@@ -6199,10 +6157,12 @@ const deserializeAws_restJson1ResetAuthorizersCacheCommandError = async (output,
6199
6157
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6200
6158
  default:
6201
6159
  const parsedBody = parsedOutput.body;
6160
+ const $metadata = deserializeMetadata(output);
6161
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6202
6162
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6203
- name: parsedBody.code || parsedBody.Code || errorCode,
6163
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6204
6164
  $fault: "client",
6205
- $metadata: deserializeMetadata(output),
6165
+ $metadata,
6206
6166
  });
6207
6167
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6208
6168
  }
@@ -6224,8 +6184,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
6224
6184
  body: await parseBody(output.body, context),
6225
6185
  };
6226
6186
  let response;
6227
- let errorCode = "UnknownError";
6228
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6187
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6229
6188
  switch (errorCode) {
6230
6189
  case "BadRequestException":
6231
6190
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6241,10 +6200,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
6241
6200
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6242
6201
  default:
6243
6202
  const parsedBody = parsedOutput.body;
6203
+ const $metadata = deserializeMetadata(output);
6204
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6244
6205
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6245
- name: parsedBody.code || parsedBody.Code || errorCode,
6206
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6246
6207
  $fault: "client",
6247
- $metadata: deserializeMetadata(output),
6208
+ $metadata,
6248
6209
  });
6249
6210
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6250
6211
  }
@@ -6266,8 +6227,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
6266
6227
  body: await parseBody(output.body, context),
6267
6228
  };
6268
6229
  let response;
6269
- let errorCode = "UnknownError";
6270
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6230
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6271
6231
  switch (errorCode) {
6272
6232
  case "BadRequestException":
6273
6233
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6283,10 +6243,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
6283
6243
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6284
6244
  default:
6285
6245
  const parsedBody = parsedOutput.body;
6246
+ const $metadata = deserializeMetadata(output);
6247
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6286
6248
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6287
- name: parsedBody.code || parsedBody.Code || errorCode,
6249
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6288
6250
  $fault: "client",
6289
- $metadata: deserializeMetadata(output),
6251
+ $metadata,
6290
6252
  });
6291
6253
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6292
6254
  }
@@ -6372,8 +6334,7 @@ const deserializeAws_restJson1UpdateApiCommandError = async (output, context) =>
6372
6334
  body: await parseBody(output.body, context),
6373
6335
  };
6374
6336
  let response;
6375
- let errorCode = "UnknownError";
6376
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6337
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6377
6338
  switch (errorCode) {
6378
6339
  case "BadRequestException":
6379
6340
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6389,10 +6350,12 @@ const deserializeAws_restJson1UpdateApiCommandError = async (output, context) =>
6389
6350
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6390
6351
  default:
6391
6352
  const parsedBody = parsedOutput.body;
6353
+ const $metadata = deserializeMetadata(output);
6354
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6392
6355
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6393
- name: parsedBody.code || parsedBody.Code || errorCode,
6356
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6394
6357
  $fault: "client",
6395
- $metadata: deserializeMetadata(output),
6358
+ $metadata,
6396
6359
  });
6397
6360
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6398
6361
  }
@@ -6430,8 +6393,7 @@ const deserializeAws_restJson1UpdateApiMappingCommandError = async (output, cont
6430
6393
  body: await parseBody(output.body, context),
6431
6394
  };
6432
6395
  let response;
6433
- let errorCode = "UnknownError";
6434
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6396
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6435
6397
  switch (errorCode) {
6436
6398
  case "BadRequestException":
6437
6399
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6447,10 +6409,12 @@ const deserializeAws_restJson1UpdateApiMappingCommandError = async (output, cont
6447
6409
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6448
6410
  default:
6449
6411
  const parsedBody = parsedOutput.body;
6412
+ const $metadata = deserializeMetadata(output);
6413
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6450
6414
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6451
- name: parsedBody.code || parsedBody.Code || errorCode,
6415
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6452
6416
  $fault: "client",
6453
- $metadata: deserializeMetadata(output),
6417
+ $metadata,
6454
6418
  });
6455
6419
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6456
6420
  }
@@ -6516,8 +6480,7 @@ const deserializeAws_restJson1UpdateAuthorizerCommandError = async (output, cont
6516
6480
  body: await parseBody(output.body, context),
6517
6481
  };
6518
6482
  let response;
6519
- let errorCode = "UnknownError";
6520
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6483
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6521
6484
  switch (errorCode) {
6522
6485
  case "BadRequestException":
6523
6486
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6533,10 +6496,12 @@ const deserializeAws_restJson1UpdateAuthorizerCommandError = async (output, cont
6533
6496
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6534
6497
  default:
6535
6498
  const parsedBody = parsedOutput.body;
6499
+ const $metadata = deserializeMetadata(output);
6500
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6536
6501
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6537
- name: parsedBody.code || parsedBody.Code || errorCode,
6502
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6538
6503
  $fault: "client",
6539
- $metadata: deserializeMetadata(output),
6504
+ $metadata,
6540
6505
  });
6541
6506
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6542
6507
  }
@@ -6582,8 +6547,7 @@ const deserializeAws_restJson1UpdateDeploymentCommandError = async (output, cont
6582
6547
  body: await parseBody(output.body, context),
6583
6548
  };
6584
6549
  let response;
6585
- let errorCode = "UnknownError";
6586
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6550
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6587
6551
  switch (errorCode) {
6588
6552
  case "BadRequestException":
6589
6553
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6599,10 +6563,12 @@ const deserializeAws_restJson1UpdateDeploymentCommandError = async (output, cont
6599
6563
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6600
6564
  default:
6601
6565
  const parsedBody = parsedOutput.body;
6566
+ const $metadata = deserializeMetadata(output);
6567
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6602
6568
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6603
- name: parsedBody.code || parsedBody.Code || errorCode,
6569
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6604
6570
  $fault: "client",
6605
- $metadata: deserializeMetadata(output),
6571
+ $metadata,
6606
6572
  });
6607
6573
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6608
6574
  }
@@ -6644,8 +6610,7 @@ const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, cont
6644
6610
  body: await parseBody(output.body, context),
6645
6611
  };
6646
6612
  let response;
6647
- let errorCode = "UnknownError";
6648
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6613
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6649
6614
  switch (errorCode) {
6650
6615
  case "BadRequestException":
6651
6616
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6661,10 +6626,12 @@ const deserializeAws_restJson1UpdateDomainNameCommandError = async (output, cont
6661
6626
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6662
6627
  default:
6663
6628
  const parsedBody = parsedOutput.body;
6629
+ const $metadata = deserializeMetadata(output);
6630
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6664
6631
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6665
- name: parsedBody.code || parsedBody.Code || errorCode,
6632
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6666
6633
  $fault: "client",
6667
- $metadata: deserializeMetadata(output),
6634
+ $metadata,
6668
6635
  });
6669
6636
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6670
6637
  }
@@ -6767,8 +6734,7 @@ const deserializeAws_restJson1UpdateIntegrationCommandError = async (output, con
6767
6734
  body: await parseBody(output.body, context),
6768
6735
  };
6769
6736
  let response;
6770
- let errorCode = "UnknownError";
6771
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6737
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6772
6738
  switch (errorCode) {
6773
6739
  case "BadRequestException":
6774
6740
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6784,10 +6750,12 @@ const deserializeAws_restJson1UpdateIntegrationCommandError = async (output, con
6784
6750
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6785
6751
  default:
6786
6752
  const parsedBody = parsedOutput.body;
6753
+ const $metadata = deserializeMetadata(output);
6754
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6787
6755
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6788
- name: parsedBody.code || parsedBody.Code || errorCode,
6756
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6789
6757
  $fault: "client",
6790
- $metadata: deserializeMetadata(output),
6758
+ $metadata,
6791
6759
  });
6792
6760
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6793
6761
  }
@@ -6833,8 +6801,7 @@ const deserializeAws_restJson1UpdateIntegrationResponseCommandError = async (out
6833
6801
  body: await parseBody(output.body, context),
6834
6802
  };
6835
6803
  let response;
6836
- let errorCode = "UnknownError";
6837
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6804
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6838
6805
  switch (errorCode) {
6839
6806
  case "BadRequestException":
6840
6807
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6850,10 +6817,12 @@ const deserializeAws_restJson1UpdateIntegrationResponseCommandError = async (out
6850
6817
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6851
6818
  default:
6852
6819
  const parsedBody = parsedOutput.body;
6820
+ const $metadata = deserializeMetadata(output);
6821
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6853
6822
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6854
- name: parsedBody.code || parsedBody.Code || errorCode,
6823
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6855
6824
  $fault: "client",
6856
- $metadata: deserializeMetadata(output),
6825
+ $metadata,
6857
6826
  });
6858
6827
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6859
6828
  }
@@ -6895,8 +6864,7 @@ const deserializeAws_restJson1UpdateModelCommandError = async (output, context)
6895
6864
  body: await parseBody(output.body, context),
6896
6865
  };
6897
6866
  let response;
6898
- let errorCode = "UnknownError";
6899
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6867
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6900
6868
  switch (errorCode) {
6901
6869
  case "BadRequestException":
6902
6870
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -6912,10 +6880,12 @@ const deserializeAws_restJson1UpdateModelCommandError = async (output, context)
6912
6880
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
6913
6881
  default:
6914
6882
  const parsedBody = parsedOutput.body;
6883
+ const $metadata = deserializeMetadata(output);
6884
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6915
6885
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
6916
- name: parsedBody.code || parsedBody.Code || errorCode,
6886
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6917
6887
  $fault: "client",
6918
- $metadata: deserializeMetadata(output),
6888
+ $metadata,
6919
6889
  });
6920
6890
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6921
6891
  }
@@ -6989,8 +6959,7 @@ const deserializeAws_restJson1UpdateRouteCommandError = async (output, context)
6989
6959
  body: await parseBody(output.body, context),
6990
6960
  };
6991
6961
  let response;
6992
- let errorCode = "UnknownError";
6993
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6962
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
6994
6963
  switch (errorCode) {
6995
6964
  case "BadRequestException":
6996
6965
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -7006,10 +6975,12 @@ const deserializeAws_restJson1UpdateRouteCommandError = async (output, context)
7006
6975
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
7007
6976
  default:
7008
6977
  const parsedBody = parsedOutput.body;
6978
+ const $metadata = deserializeMetadata(output);
6979
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7009
6980
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
7010
- name: parsedBody.code || parsedBody.Code || errorCode,
6981
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7011
6982
  $fault: "client",
7012
- $metadata: deserializeMetadata(output),
6983
+ $metadata,
7013
6984
  });
7014
6985
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7015
6986
  }
@@ -7051,8 +7022,7 @@ const deserializeAws_restJson1UpdateRouteResponseCommandError = async (output, c
7051
7022
  body: await parseBody(output.body, context),
7052
7023
  };
7053
7024
  let response;
7054
- let errorCode = "UnknownError";
7055
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7025
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7056
7026
  switch (errorCode) {
7057
7027
  case "BadRequestException":
7058
7028
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -7068,10 +7038,12 @@ const deserializeAws_restJson1UpdateRouteResponseCommandError = async (output, c
7068
7038
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
7069
7039
  default:
7070
7040
  const parsedBody = parsedOutput.body;
7041
+ const $metadata = deserializeMetadata(output);
7042
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7071
7043
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
7072
- name: parsedBody.code || parsedBody.Code || errorCode,
7044
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7073
7045
  $fault: "client",
7074
- $metadata: deserializeMetadata(output),
7046
+ $metadata,
7075
7047
  });
7076
7048
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7077
7049
  }
@@ -7149,8 +7121,7 @@ const deserializeAws_restJson1UpdateStageCommandError = async (output, context)
7149
7121
  body: await parseBody(output.body, context),
7150
7122
  };
7151
7123
  let response;
7152
- let errorCode = "UnknownError";
7153
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7124
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7154
7125
  switch (errorCode) {
7155
7126
  case "BadRequestException":
7156
7127
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -7166,10 +7137,12 @@ const deserializeAws_restJson1UpdateStageCommandError = async (output, context)
7166
7137
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
7167
7138
  default:
7168
7139
  const parsedBody = parsedOutput.body;
7140
+ const $metadata = deserializeMetadata(output);
7141
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7169
7142
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
7170
- name: parsedBody.code || parsedBody.Code || errorCode,
7143
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7171
7144
  $fault: "client",
7172
- $metadata: deserializeMetadata(output),
7145
+ $metadata,
7173
7146
  });
7174
7147
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7175
7148
  }
@@ -7227,8 +7200,7 @@ const deserializeAws_restJson1UpdateVpcLinkCommandError = async (output, context
7227
7200
  body: await parseBody(output.body, context),
7228
7201
  };
7229
7202
  let response;
7230
- let errorCode = "UnknownError";
7231
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7203
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
7232
7204
  switch (errorCode) {
7233
7205
  case "BadRequestException":
7234
7206
  case "com.amazonaws.apigatewayv2#BadRequestException":
@@ -7241,10 +7213,12 @@ const deserializeAws_restJson1UpdateVpcLinkCommandError = async (output, context
7241
7213
  throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
7242
7214
  default:
7243
7215
  const parsedBody = parsedOutput.body;
7216
+ const $metadata = deserializeMetadata(output);
7217
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7244
7218
  response = new ApiGatewayV2ServiceException_1.ApiGatewayV2ServiceException({
7245
- name: parsedBody.code || parsedBody.Code || errorCode,
7219
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7246
7220
  $fault: "client",
7247
- $metadata: deserializeMetadata(output),
7221
+ $metadata,
7248
7222
  });
7249
7223
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7250
7224
  }
@@ -7327,9 +7301,8 @@ const serializeAws_restJson1__listOf__string = (input, context) => {
7327
7301
  };
7328
7302
  const serializeAws_restJson1AccessLogSettings = (input, context) => {
7329
7303
  return {
7330
- ...(input.DestinationArn !== undefined &&
7331
- input.DestinationArn !== null && { destinationArn: input.DestinationArn }),
7332
- ...(input.Format !== undefined && input.Format !== null && { format: input.Format }),
7304
+ ...(input.DestinationArn != null && { destinationArn: input.DestinationArn }),
7305
+ ...(input.Format != null && { format: input.Format }),
7333
7306
  };
7334
7307
  };
7335
7308
  const serializeAws_restJson1AuthorizationScopes = (input, context) => {
@@ -7344,25 +7317,20 @@ const serializeAws_restJson1AuthorizationScopes = (input, context) => {
7344
7317
  };
7345
7318
  const serializeAws_restJson1Cors = (input, context) => {
7346
7319
  return {
7347
- ...(input.AllowCredentials !== undefined &&
7348
- input.AllowCredentials !== null && { allowCredentials: input.AllowCredentials }),
7349
- ...(input.AllowHeaders !== undefined &&
7350
- input.AllowHeaders !== null && {
7320
+ ...(input.AllowCredentials != null && { allowCredentials: input.AllowCredentials }),
7321
+ ...(input.AllowHeaders != null && {
7351
7322
  allowHeaders: serializeAws_restJson1CorsHeaderList(input.AllowHeaders, context),
7352
7323
  }),
7353
- ...(input.AllowMethods !== undefined &&
7354
- input.AllowMethods !== null && {
7324
+ ...(input.AllowMethods != null && {
7355
7325
  allowMethods: serializeAws_restJson1CorsMethodList(input.AllowMethods, context),
7356
7326
  }),
7357
- ...(input.AllowOrigins !== undefined &&
7358
- input.AllowOrigins !== null && {
7327
+ ...(input.AllowOrigins != null && {
7359
7328
  allowOrigins: serializeAws_restJson1CorsOriginList(input.AllowOrigins, context),
7360
7329
  }),
7361
- ...(input.ExposeHeaders !== undefined &&
7362
- input.ExposeHeaders !== null && {
7330
+ ...(input.ExposeHeaders != null && {
7363
7331
  exposeHeaders: serializeAws_restJson1CorsHeaderList(input.ExposeHeaders, context),
7364
7332
  }),
7365
- ...(input.MaxAge !== undefined && input.MaxAge !== null && { maxAge: input.MaxAge }),
7333
+ ...(input.MaxAge != null && { maxAge: input.MaxAge }),
7366
7334
  };
7367
7335
  };
7368
7336
  const serializeAws_restJson1CorsHeaderList = (input, context) => {
@@ -7397,28 +7365,20 @@ const serializeAws_restJson1CorsOriginList = (input, context) => {
7397
7365
  };
7398
7366
  const serializeAws_restJson1DomainNameConfiguration = (input, context) => {
7399
7367
  return {
7400
- ...(input.ApiGatewayDomainName !== undefined &&
7401
- input.ApiGatewayDomainName !== null && { apiGatewayDomainName: input.ApiGatewayDomainName }),
7402
- ...(input.CertificateArn !== undefined &&
7403
- input.CertificateArn !== null && { certificateArn: input.CertificateArn }),
7404
- ...(input.CertificateName !== undefined &&
7405
- input.CertificateName !== null && { certificateName: input.CertificateName }),
7406
- ...(input.CertificateUploadDate !== undefined &&
7407
- input.CertificateUploadDate !== null && {
7368
+ ...(input.ApiGatewayDomainName != null && { apiGatewayDomainName: input.ApiGatewayDomainName }),
7369
+ ...(input.CertificateArn != null && { certificateArn: input.CertificateArn }),
7370
+ ...(input.CertificateName != null && { certificateName: input.CertificateName }),
7371
+ ...(input.CertificateUploadDate != null && {
7408
7372
  certificateUploadDate: input.CertificateUploadDate.toISOString().split(".")[0] + "Z",
7409
7373
  }),
7410
- ...(input.DomainNameStatus !== undefined &&
7411
- input.DomainNameStatus !== null && { domainNameStatus: input.DomainNameStatus }),
7412
- ...(input.DomainNameStatusMessage !== undefined &&
7413
- input.DomainNameStatusMessage !== null && { domainNameStatusMessage: input.DomainNameStatusMessage }),
7414
- ...(input.EndpointType !== undefined && input.EndpointType !== null && { endpointType: input.EndpointType }),
7415
- ...(input.HostedZoneId !== undefined && input.HostedZoneId !== null && { hostedZoneId: input.HostedZoneId }),
7416
- ...(input.OwnershipVerificationCertificateArn !== undefined &&
7417
- input.OwnershipVerificationCertificateArn !== null && {
7374
+ ...(input.DomainNameStatus != null && { domainNameStatus: input.DomainNameStatus }),
7375
+ ...(input.DomainNameStatusMessage != null && { domainNameStatusMessage: input.DomainNameStatusMessage }),
7376
+ ...(input.EndpointType != null && { endpointType: input.EndpointType }),
7377
+ ...(input.HostedZoneId != null && { hostedZoneId: input.HostedZoneId }),
7378
+ ...(input.OwnershipVerificationCertificateArn != null && {
7418
7379
  ownershipVerificationCertificateArn: input.OwnershipVerificationCertificateArn,
7419
7380
  }),
7420
- ...(input.SecurityPolicy !== undefined &&
7421
- input.SecurityPolicy !== null && { securityPolicy: input.SecurityPolicy }),
7381
+ ...(input.SecurityPolicy != null && { securityPolicy: input.SecurityPolicy }),
7422
7382
  };
7423
7383
  };
7424
7384
  const serializeAws_restJson1DomainNameConfigurations = (input, context) => {
@@ -7454,21 +7414,19 @@ const serializeAws_restJson1IntegrationParameters = (input, context) => {
7454
7414
  };
7455
7415
  const serializeAws_restJson1JWTConfiguration = (input, context) => {
7456
7416
  return {
7457
- ...(input.Audience !== undefined &&
7458
- input.Audience !== null && { audience: serializeAws_restJson1__listOf__string(input.Audience, context) }),
7459
- ...(input.Issuer !== undefined && input.Issuer !== null && { issuer: input.Issuer }),
7417
+ ...(input.Audience != null && { audience: serializeAws_restJson1__listOf__string(input.Audience, context) }),
7418
+ ...(input.Issuer != null && { issuer: input.Issuer }),
7460
7419
  };
7461
7420
  };
7462
7421
  const serializeAws_restJson1MutualTlsAuthenticationInput = (input, context) => {
7463
7422
  return {
7464
- ...(input.TruststoreUri !== undefined && input.TruststoreUri !== null && { truststoreUri: input.TruststoreUri }),
7465
- ...(input.TruststoreVersion !== undefined &&
7466
- input.TruststoreVersion !== null && { truststoreVersion: input.TruststoreVersion }),
7423
+ ...(input.TruststoreUri != null && { truststoreUri: input.TruststoreUri }),
7424
+ ...(input.TruststoreVersion != null && { truststoreVersion: input.TruststoreVersion }),
7467
7425
  };
7468
7426
  };
7469
7427
  const serializeAws_restJson1ParameterConstraints = (input, context) => {
7470
7428
  return {
7471
- ...(input.Required !== undefined && input.Required !== null && { required: input.Required }),
7429
+ ...(input.Required != null && { required: input.Required }),
7472
7430
  };
7473
7431
  };
7474
7432
  const serializeAws_restJson1ResponseParameters = (input, context) => {
@@ -7506,15 +7464,11 @@ const serializeAws_restJson1RouteParameters = (input, context) => {
7506
7464
  };
7507
7465
  const serializeAws_restJson1RouteSettings = (input, context) => {
7508
7466
  return {
7509
- ...(input.DataTraceEnabled !== undefined &&
7510
- input.DataTraceEnabled !== null && { dataTraceEnabled: input.DataTraceEnabled }),
7511
- ...(input.DetailedMetricsEnabled !== undefined &&
7512
- input.DetailedMetricsEnabled !== null && { detailedMetricsEnabled: input.DetailedMetricsEnabled }),
7513
- ...(input.LoggingLevel !== undefined && input.LoggingLevel !== null && { loggingLevel: input.LoggingLevel }),
7514
- ...(input.ThrottlingBurstLimit !== undefined &&
7515
- input.ThrottlingBurstLimit !== null && { throttlingBurstLimit: input.ThrottlingBurstLimit }),
7516
- ...(input.ThrottlingRateLimit !== undefined &&
7517
- input.ThrottlingRateLimit !== null && { throttlingRateLimit: (0, smithy_client_1.serializeFloat)(input.ThrottlingRateLimit) }),
7467
+ ...(input.DataTraceEnabled != null && { dataTraceEnabled: input.DataTraceEnabled }),
7468
+ ...(input.DetailedMetricsEnabled != null && { detailedMetricsEnabled: input.DetailedMetricsEnabled }),
7469
+ ...(input.LoggingLevel != null && { loggingLevel: input.LoggingLevel }),
7470
+ ...(input.ThrottlingBurstLimit != null && { throttlingBurstLimit: input.ThrottlingBurstLimit }),
7471
+ ...(input.ThrottlingRateLimit != null && { throttlingRateLimit: (0, smithy_client_1.serializeFloat)(input.ThrottlingRateLimit) }),
7518
7472
  };
7519
7473
  };
7520
7474
  const serializeAws_restJson1RouteSettingsMap = (input, context) => {
@@ -7583,8 +7537,7 @@ const serializeAws_restJson1TemplateMap = (input, context) => {
7583
7537
  };
7584
7538
  const serializeAws_restJson1TlsConfigInput = (input, context) => {
7585
7539
  return {
7586
- ...(input.ServerNameToVerify !== undefined &&
7587
- input.ServerNameToVerify !== null && { serverNameToVerify: input.ServerNameToVerify }),
7540
+ ...(input.ServerNameToVerify != null && { serverNameToVerify: input.ServerNameToVerify }),
7588
7541
  };
7589
7542
  };
7590
7543
  const deserializeAws_restJson1__listOf__string = (output, context) => {
@@ -7742,28 +7695,18 @@ const deserializeAws_restJson1Api = (output, context) => {
7742
7695
  ApiGatewayManaged: (0, smithy_client_1.expectBoolean)(output.apiGatewayManaged),
7743
7696
  ApiId: (0, smithy_client_1.expectString)(output.apiId),
7744
7697
  ApiKeySelectionExpression: (0, smithy_client_1.expectString)(output.apiKeySelectionExpression),
7745
- CorsConfiguration: output.corsConfiguration !== undefined && output.corsConfiguration !== null
7746
- ? deserializeAws_restJson1Cors(output.corsConfiguration, context)
7747
- : undefined,
7748
- CreatedDate: output.createdDate !== undefined && output.createdDate !== null
7749
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate))
7750
- : undefined,
7698
+ CorsConfiguration: output.corsConfiguration != null ? deserializeAws_restJson1Cors(output.corsConfiguration, context) : undefined,
7699
+ CreatedDate: output.createdDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate)) : undefined,
7751
7700
  Description: (0, smithy_client_1.expectString)(output.description),
7752
7701
  DisableExecuteApiEndpoint: (0, smithy_client_1.expectBoolean)(output.disableExecuteApiEndpoint),
7753
7702
  DisableSchemaValidation: (0, smithy_client_1.expectBoolean)(output.disableSchemaValidation),
7754
- ImportInfo: output.importInfo !== undefined && output.importInfo !== null
7755
- ? deserializeAws_restJson1__listOf__string(output.importInfo, context)
7756
- : undefined,
7703
+ ImportInfo: output.importInfo != null ? deserializeAws_restJson1__listOf__string(output.importInfo, context) : undefined,
7757
7704
  Name: (0, smithy_client_1.expectString)(output.name),
7758
7705
  ProtocolType: (0, smithy_client_1.expectString)(output.protocolType),
7759
7706
  RouteSelectionExpression: (0, smithy_client_1.expectString)(output.routeSelectionExpression),
7760
- Tags: output.tags !== undefined && output.tags !== null
7761
- ? deserializeAws_restJson1Tags(output.tags, context)
7762
- : undefined,
7707
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
7763
7708
  Version: (0, smithy_client_1.expectString)(output.version),
7764
- Warnings: output.warnings !== undefined && output.warnings !== null
7765
- ? deserializeAws_restJson1__listOf__string(output.warnings, context)
7766
- : undefined,
7709
+ Warnings: output.warnings != null ? deserializeAws_restJson1__listOf__string(output.warnings, context) : undefined,
7767
7710
  };
7768
7711
  };
7769
7712
  const deserializeAws_restJson1ApiMapping = (output, context) => {
@@ -7794,11 +7737,11 @@ const deserializeAws_restJson1Authorizer = (output, context) => {
7794
7737
  AuthorizerType: (0, smithy_client_1.expectString)(output.authorizerType),
7795
7738
  AuthorizerUri: (0, smithy_client_1.expectString)(output.authorizerUri),
7796
7739
  EnableSimpleResponses: (0, smithy_client_1.expectBoolean)(output.enableSimpleResponses),
7797
- IdentitySource: output.identitySource !== undefined && output.identitySource !== null
7740
+ IdentitySource: output.identitySource != null
7798
7741
  ? deserializeAws_restJson1IdentitySourceList(output.identitySource, context)
7799
7742
  : undefined,
7800
7743
  IdentityValidationExpression: (0, smithy_client_1.expectString)(output.identityValidationExpression),
7801
- JwtConfiguration: output.jwtConfiguration !== undefined && output.jwtConfiguration !== null
7744
+ JwtConfiguration: output.jwtConfiguration != null
7802
7745
  ? deserializeAws_restJson1JWTConfiguration(output.jwtConfiguration, context)
7803
7746
  : undefined,
7804
7747
  Name: (0, smithy_client_1.expectString)(output.name),
@@ -7807,18 +7750,10 @@ const deserializeAws_restJson1Authorizer = (output, context) => {
7807
7750
  const deserializeAws_restJson1Cors = (output, context) => {
7808
7751
  return {
7809
7752
  AllowCredentials: (0, smithy_client_1.expectBoolean)(output.allowCredentials),
7810
- AllowHeaders: output.allowHeaders !== undefined && output.allowHeaders !== null
7811
- ? deserializeAws_restJson1CorsHeaderList(output.allowHeaders, context)
7812
- : undefined,
7813
- AllowMethods: output.allowMethods !== undefined && output.allowMethods !== null
7814
- ? deserializeAws_restJson1CorsMethodList(output.allowMethods, context)
7815
- : undefined,
7816
- AllowOrigins: output.allowOrigins !== undefined && output.allowOrigins !== null
7817
- ? deserializeAws_restJson1CorsOriginList(output.allowOrigins, context)
7818
- : undefined,
7819
- ExposeHeaders: output.exposeHeaders !== undefined && output.exposeHeaders !== null
7820
- ? deserializeAws_restJson1CorsHeaderList(output.exposeHeaders, context)
7821
- : undefined,
7753
+ AllowHeaders: output.allowHeaders != null ? deserializeAws_restJson1CorsHeaderList(output.allowHeaders, context) : undefined,
7754
+ AllowMethods: output.allowMethods != null ? deserializeAws_restJson1CorsMethodList(output.allowMethods, context) : undefined,
7755
+ AllowOrigins: output.allowOrigins != null ? deserializeAws_restJson1CorsOriginList(output.allowOrigins, context) : undefined,
7756
+ ExposeHeaders: output.exposeHeaders != null ? deserializeAws_restJson1CorsHeaderList(output.exposeHeaders, context) : undefined,
7822
7757
  MaxAge: (0, smithy_client_1.expectInt32)(output.maxAge),
7823
7758
  };
7824
7759
  };
@@ -7858,9 +7793,7 @@ const deserializeAws_restJson1CorsOriginList = (output, context) => {
7858
7793
  const deserializeAws_restJson1Deployment = (output, context) => {
7859
7794
  return {
7860
7795
  AutoDeployed: (0, smithy_client_1.expectBoolean)(output.autoDeployed),
7861
- CreatedDate: output.createdDate !== undefined && output.createdDate !== null
7862
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate))
7863
- : undefined,
7796
+ CreatedDate: output.createdDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate)) : undefined,
7864
7797
  DeploymentId: (0, smithy_client_1.expectString)(output.deploymentId),
7865
7798
  DeploymentStatus: (0, smithy_client_1.expectString)(output.deploymentStatus),
7866
7799
  DeploymentStatusMessage: (0, smithy_client_1.expectString)(output.deploymentStatusMessage),
@@ -7871,15 +7804,13 @@ const deserializeAws_restJson1DomainName = (output, context) => {
7871
7804
  return {
7872
7805
  ApiMappingSelectionExpression: (0, smithy_client_1.expectString)(output.apiMappingSelectionExpression),
7873
7806
  DomainName: (0, smithy_client_1.expectString)(output.domainName),
7874
- DomainNameConfigurations: output.domainNameConfigurations !== undefined && output.domainNameConfigurations !== null
7807
+ DomainNameConfigurations: output.domainNameConfigurations != null
7875
7808
  ? deserializeAws_restJson1DomainNameConfigurations(output.domainNameConfigurations, context)
7876
7809
  : undefined,
7877
- MutualTlsAuthentication: output.mutualTlsAuthentication !== undefined && output.mutualTlsAuthentication !== null
7810
+ MutualTlsAuthentication: output.mutualTlsAuthentication != null
7878
7811
  ? deserializeAws_restJson1MutualTlsAuthentication(output.mutualTlsAuthentication, context)
7879
7812
  : undefined,
7880
- Tags: output.tags !== undefined && output.tags !== null
7881
- ? deserializeAws_restJson1Tags(output.tags, context)
7882
- : undefined,
7813
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
7883
7814
  };
7884
7815
  };
7885
7816
  const deserializeAws_restJson1DomainNameConfiguration = (output, context) => {
@@ -7887,7 +7818,7 @@ const deserializeAws_restJson1DomainNameConfiguration = (output, context) => {
7887
7818
  ApiGatewayDomainName: (0, smithy_client_1.expectString)(output.apiGatewayDomainName),
7888
7819
  CertificateArn: (0, smithy_client_1.expectString)(output.certificateArn),
7889
7820
  CertificateName: (0, smithy_client_1.expectString)(output.certificateName),
7890
- CertificateUploadDate: output.certificateUploadDate !== undefined && output.certificateUploadDate !== null
7821
+ CertificateUploadDate: output.certificateUploadDate != null
7891
7822
  ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.certificateUploadDate))
7892
7823
  : undefined,
7893
7824
  DomainNameStatus: (0, smithy_client_1.expectString)(output.domainNameStatus),
@@ -7936,20 +7867,18 @@ const deserializeAws_restJson1Integration = (output, context) => {
7936
7867
  IntegrationUri: (0, smithy_client_1.expectString)(output.integrationUri),
7937
7868
  PassthroughBehavior: (0, smithy_client_1.expectString)(output.passthroughBehavior),
7938
7869
  PayloadFormatVersion: (0, smithy_client_1.expectString)(output.payloadFormatVersion),
7939
- RequestParameters: output.requestParameters !== undefined && output.requestParameters !== null
7870
+ RequestParameters: output.requestParameters != null
7940
7871
  ? deserializeAws_restJson1IntegrationParameters(output.requestParameters, context)
7941
7872
  : undefined,
7942
- RequestTemplates: output.requestTemplates !== undefined && output.requestTemplates !== null
7873
+ RequestTemplates: output.requestTemplates != null
7943
7874
  ? deserializeAws_restJson1TemplateMap(output.requestTemplates, context)
7944
7875
  : undefined,
7945
- ResponseParameters: output.responseParameters !== undefined && output.responseParameters !== null
7876
+ ResponseParameters: output.responseParameters != null
7946
7877
  ? deserializeAws_restJson1ResponseParameters(output.responseParameters, context)
7947
7878
  : undefined,
7948
7879
  TemplateSelectionExpression: (0, smithy_client_1.expectString)(output.templateSelectionExpression),
7949
7880
  TimeoutInMillis: (0, smithy_client_1.expectInt32)(output.timeoutInMillis),
7950
- TlsConfig: output.tlsConfig !== undefined && output.tlsConfig !== null
7951
- ? deserializeAws_restJson1TlsConfig(output.tlsConfig, context)
7952
- : undefined,
7881
+ TlsConfig: output.tlsConfig != null ? deserializeAws_restJson1TlsConfig(output.tlsConfig, context) : undefined,
7953
7882
  };
7954
7883
  };
7955
7884
  const deserializeAws_restJson1IntegrationParameters = (output, context) => {
@@ -7968,10 +7897,10 @@ const deserializeAws_restJson1IntegrationResponse = (output, context) => {
7968
7897
  ContentHandlingStrategy: (0, smithy_client_1.expectString)(output.contentHandlingStrategy),
7969
7898
  IntegrationResponseId: (0, smithy_client_1.expectString)(output.integrationResponseId),
7970
7899
  IntegrationResponseKey: (0, smithy_client_1.expectString)(output.integrationResponseKey),
7971
- ResponseParameters: output.responseParameters !== undefined && output.responseParameters !== null
7900
+ ResponseParameters: output.responseParameters != null
7972
7901
  ? deserializeAws_restJson1IntegrationParameters(output.responseParameters, context)
7973
7902
  : undefined,
7974
- ResponseTemplates: output.responseTemplates !== undefined && output.responseTemplates !== null
7903
+ ResponseTemplates: output.responseTemplates != null
7975
7904
  ? deserializeAws_restJson1TemplateMap(output.responseTemplates, context)
7976
7905
  : undefined,
7977
7906
  TemplateSelectionExpression: (0, smithy_client_1.expectString)(output.templateSelectionExpression),
@@ -7979,9 +7908,7 @@ const deserializeAws_restJson1IntegrationResponse = (output, context) => {
7979
7908
  };
7980
7909
  const deserializeAws_restJson1JWTConfiguration = (output, context) => {
7981
7910
  return {
7982
- Audience: output.audience !== undefined && output.audience !== null
7983
- ? deserializeAws_restJson1__listOf__string(output.audience, context)
7984
- : undefined,
7911
+ Audience: output.audience != null ? deserializeAws_restJson1__listOf__string(output.audience, context) : undefined,
7985
7912
  Issuer: (0, smithy_client_1.expectString)(output.issuer),
7986
7913
  };
7987
7914
  };
@@ -7998,7 +7925,7 @@ const deserializeAws_restJson1MutualTlsAuthentication = (output, context) => {
7998
7925
  return {
7999
7926
  TruststoreUri: (0, smithy_client_1.expectString)(output.truststoreUri),
8000
7927
  TruststoreVersion: (0, smithy_client_1.expectString)(output.truststoreVersion),
8001
- TruststoreWarnings: output.truststoreWarnings !== undefined && output.truststoreWarnings !== null
7928
+ TruststoreWarnings: output.truststoreWarnings != null
8002
7929
  ? deserializeAws_restJson1__listOf__string(output.truststoreWarnings, context)
8003
7930
  : undefined,
8004
7931
  };
@@ -8023,17 +7950,15 @@ const deserializeAws_restJson1Route = (output, context) => {
8023
7950
  return {
8024
7951
  ApiGatewayManaged: (0, smithy_client_1.expectBoolean)(output.apiGatewayManaged),
8025
7952
  ApiKeyRequired: (0, smithy_client_1.expectBoolean)(output.apiKeyRequired),
8026
- AuthorizationScopes: output.authorizationScopes !== undefined && output.authorizationScopes !== null
7953
+ AuthorizationScopes: output.authorizationScopes != null
8027
7954
  ? deserializeAws_restJson1AuthorizationScopes(output.authorizationScopes, context)
8028
7955
  : undefined,
8029
7956
  AuthorizationType: (0, smithy_client_1.expectString)(output.authorizationType),
8030
7957
  AuthorizerId: (0, smithy_client_1.expectString)(output.authorizerId),
8031
7958
  ModelSelectionExpression: (0, smithy_client_1.expectString)(output.modelSelectionExpression),
8032
7959
  OperationName: (0, smithy_client_1.expectString)(output.operationName),
8033
- RequestModels: output.requestModels !== undefined && output.requestModels !== null
8034
- ? deserializeAws_restJson1RouteModels(output.requestModels, context)
8035
- : undefined,
8036
- RequestParameters: output.requestParameters !== undefined && output.requestParameters !== null
7960
+ RequestModels: output.requestModels != null ? deserializeAws_restJson1RouteModels(output.requestModels, context) : undefined,
7961
+ RequestParameters: output.requestParameters != null
8037
7962
  ? deserializeAws_restJson1RouteParameters(output.requestParameters, context)
8038
7963
  : undefined,
8039
7964
  RouteId: (0, smithy_client_1.expectString)(output.routeId),
@@ -8067,10 +7992,8 @@ const deserializeAws_restJson1RouteParameters = (output, context) => {
8067
7992
  const deserializeAws_restJson1RouteResponse = (output, context) => {
8068
7993
  return {
8069
7994
  ModelSelectionExpression: (0, smithy_client_1.expectString)(output.modelSelectionExpression),
8070
- ResponseModels: output.responseModels !== undefined && output.responseModels !== null
8071
- ? deserializeAws_restJson1RouteModels(output.responseModels, context)
8072
- : undefined,
8073
- ResponseParameters: output.responseParameters !== undefined && output.responseParameters !== null
7995
+ ResponseModels: output.responseModels != null ? deserializeAws_restJson1RouteModels(output.responseModels, context) : undefined,
7996
+ ResponseParameters: output.responseParameters != null
8074
7997
  ? deserializeAws_restJson1RouteParameters(output.responseParameters, context)
8075
7998
  : undefined,
8076
7999
  RouteResponseId: (0, smithy_client_1.expectString)(output.routeResponseId),
@@ -8110,34 +8033,28 @@ const deserializeAws_restJson1SecurityGroupIdList = (output, context) => {
8110
8033
  };
8111
8034
  const deserializeAws_restJson1Stage = (output, context) => {
8112
8035
  return {
8113
- AccessLogSettings: output.accessLogSettings !== undefined && output.accessLogSettings !== null
8036
+ AccessLogSettings: output.accessLogSettings != null
8114
8037
  ? deserializeAws_restJson1AccessLogSettings(output.accessLogSettings, context)
8115
8038
  : undefined,
8116
8039
  ApiGatewayManaged: (0, smithy_client_1.expectBoolean)(output.apiGatewayManaged),
8117
8040
  AutoDeploy: (0, smithy_client_1.expectBoolean)(output.autoDeploy),
8118
8041
  ClientCertificateId: (0, smithy_client_1.expectString)(output.clientCertificateId),
8119
- CreatedDate: output.createdDate !== undefined && output.createdDate !== null
8120
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate))
8121
- : undefined,
8122
- DefaultRouteSettings: output.defaultRouteSettings !== undefined && output.defaultRouteSettings !== null
8042
+ CreatedDate: output.createdDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate)) : undefined,
8043
+ DefaultRouteSettings: output.defaultRouteSettings != null
8123
8044
  ? deserializeAws_restJson1RouteSettings(output.defaultRouteSettings, context)
8124
8045
  : undefined,
8125
8046
  DeploymentId: (0, smithy_client_1.expectString)(output.deploymentId),
8126
8047
  Description: (0, smithy_client_1.expectString)(output.description),
8127
8048
  LastDeploymentStatusMessage: (0, smithy_client_1.expectString)(output.lastDeploymentStatusMessage),
8128
- LastUpdatedDate: output.lastUpdatedDate !== undefined && output.lastUpdatedDate !== null
8129
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.lastUpdatedDate))
8130
- : undefined,
8131
- RouteSettings: output.routeSettings !== undefined && output.routeSettings !== null
8049
+ LastUpdatedDate: output.lastUpdatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.lastUpdatedDate)) : undefined,
8050
+ RouteSettings: output.routeSettings != null
8132
8051
  ? deserializeAws_restJson1RouteSettingsMap(output.routeSettings, context)
8133
8052
  : undefined,
8134
8053
  StageName: (0, smithy_client_1.expectString)(output.stageName),
8135
- StageVariables: output.stageVariables !== undefined && output.stageVariables !== null
8054
+ StageVariables: output.stageVariables != null
8136
8055
  ? deserializeAws_restJson1StageVariablesMap(output.stageVariables, context)
8137
8056
  : undefined,
8138
- Tags: output.tags !== undefined && output.tags !== null
8139
- ? deserializeAws_restJson1Tags(output.tags, context)
8140
- : undefined,
8057
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
8141
8058
  };
8142
8059
  };
8143
8060
  const deserializeAws_restJson1StageVariablesMap = (output, context) => {
@@ -8191,19 +8108,13 @@ const deserializeAws_restJson1TlsConfig = (output, context) => {
8191
8108
  };
8192
8109
  const deserializeAws_restJson1VpcLink = (output, context) => {
8193
8110
  return {
8194
- CreatedDate: output.createdDate !== undefined && output.createdDate !== null
8195
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate))
8196
- : undefined,
8111
+ CreatedDate: output.createdDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.createdDate)) : undefined,
8197
8112
  Name: (0, smithy_client_1.expectString)(output.name),
8198
- SecurityGroupIds: output.securityGroupIds !== undefined && output.securityGroupIds !== null
8113
+ SecurityGroupIds: output.securityGroupIds != null
8199
8114
  ? deserializeAws_restJson1SecurityGroupIdList(output.securityGroupIds, context)
8200
8115
  : undefined,
8201
- SubnetIds: output.subnetIds !== undefined && output.subnetIds !== null
8202
- ? deserializeAws_restJson1SubnetIdList(output.subnetIds, context)
8203
- : undefined,
8204
- Tags: output.tags !== undefined && output.tags !== null
8205
- ? deserializeAws_restJson1Tags(output.tags, context)
8206
- : undefined,
8116
+ SubnetIds: output.subnetIds != null ? deserializeAws_restJson1SubnetIdList(output.subnetIds, context) : undefined,
8117
+ Tags: output.tags != null ? deserializeAws_restJson1Tags(output.tags, context) : undefined,
8207
8118
  VpcLinkId: (0, smithy_client_1.expectString)(output.vpcLinkId),
8208
8119
  VpcLinkStatus: (0, smithy_client_1.expectString)(output.vpcLinkStatus),
8209
8120
  VpcLinkStatusMessage: (0, smithy_client_1.expectString)(output.vpcLinkStatusMessage),
@@ -8259,5 +8170,4 @@ const loadRestJsonErrorCode = (output, data) => {
8259
8170
  if (data["__type"] !== undefined) {
8260
8171
  return sanitizeErrorCode(data["__type"]);
8261
8172
  }
8262
- return "";
8263
8173
  };