@aws-sdk/client-api-gateway 3.199.0 → 3.201.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.
@@ -14,7 +14,7 @@ const serializeAws_restJson1CreateApiKeyCommand = async (input, context) => {
14
14
  const headers = {
15
15
  "content-type": "application/json",
16
16
  };
17
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
17
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
18
18
  let body;
19
19
  body = JSON.stringify({
20
20
  ...(input.customerId != null && { customerId: input.customerId }),
@@ -42,7 +42,7 @@ const serializeAws_restJson1CreateAuthorizerCommand = async (input, context) =>
42
42
  const headers = {
43
43
  "content-type": "application/json",
44
44
  };
45
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/authorizers";
45
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/authorizers";
46
46
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
47
47
  let body;
48
48
  body = JSON.stringify({
@@ -76,7 +76,7 @@ const serializeAws_restJson1CreateBasePathMappingCommand = async (input, context
76
76
  const headers = {
77
77
  "content-type": "application/json",
78
78
  };
79
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
79
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
80
80
  "/domainnames/{domainName}/basepathmappings";
81
81
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
82
82
  let body;
@@ -101,7 +101,7 @@ const serializeAws_restJson1CreateDeploymentCommand = async (input, context) =>
101
101
  const headers = {
102
102
  "content-type": "application/json",
103
103
  };
104
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/deployments";
104
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/deployments";
105
105
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
106
106
  let body;
107
107
  body = JSON.stringify({
@@ -132,7 +132,7 @@ const serializeAws_restJson1CreateDocumentationPartCommand = async (input, conte
132
132
  const headers = {
133
133
  "content-type": "application/json",
134
134
  };
135
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
135
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
136
136
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
137
137
  let body;
138
138
  body = JSON.stringify({
@@ -157,7 +157,7 @@ const serializeAws_restJson1CreateDocumentationVersionCommand = async (input, co
157
157
  const headers = {
158
158
  "content-type": "application/json",
159
159
  };
160
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
160
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
161
161
  "/restapis/{restApiId}/documentation/versions";
162
162
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
163
163
  let body;
@@ -182,7 +182,7 @@ const serializeAws_restJson1CreateDomainNameCommand = async (input, context) =>
182
182
  const headers = {
183
183
  "content-type": "application/json",
184
184
  };
185
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
185
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
186
186
  let body;
187
187
  body = JSON.stringify({
188
188
  ...(input.certificateArn != null && { certificateArn: input.certificateArn }),
@@ -221,7 +221,7 @@ const serializeAws_restJson1CreateModelCommand = async (input, context) => {
221
221
  const headers = {
222
222
  "content-type": "application/json",
223
223
  };
224
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models";
224
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models";
225
225
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
226
226
  let body;
227
227
  body = JSON.stringify({
@@ -246,7 +246,7 @@ const serializeAws_restJson1CreateRequestValidatorCommand = async (input, contex
246
246
  const headers = {
247
247
  "content-type": "application/json",
248
248
  };
249
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/requestvalidators";
249
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/requestvalidators";
250
250
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
251
251
  let body;
252
252
  body = JSON.stringify({
@@ -270,7 +270,7 @@ const serializeAws_restJson1CreateResourceCommand = async (input, context) => {
270
270
  const headers = {
271
271
  "content-type": "application/json",
272
272
  };
273
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
273
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
274
274
  "/restapis/{restApiId}/resources/{parentId}";
275
275
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
276
276
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "parentId", () => input.parentId, "{parentId}", false);
@@ -294,7 +294,7 @@ const serializeAws_restJson1CreateRestApiCommand = async (input, context) => {
294
294
  const headers = {
295
295
  "content-type": "application/json",
296
296
  };
297
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
297
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
298
298
  let body;
299
299
  body = JSON.stringify({
300
300
  ...(input.apiKeySource != null && { apiKeySource: input.apiKeySource }),
@@ -329,7 +329,7 @@ const serializeAws_restJson1CreateStageCommand = async (input, context) => {
329
329
  const headers = {
330
330
  "content-type": "application/json",
331
331
  };
332
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages";
332
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages";
333
333
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
334
334
  let body;
335
335
  body = JSON.stringify({
@@ -362,7 +362,7 @@ const serializeAws_restJson1CreateUsagePlanCommand = async (input, context) => {
362
362
  const headers = {
363
363
  "content-type": "application/json",
364
364
  };
365
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans";
365
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans";
366
366
  let body;
367
367
  body = JSON.stringify({
368
368
  ...(input.apiStages != null && { apiStages: serializeAws_restJson1ListOfApiStage(input.apiStages, context) }),
@@ -388,7 +388,7 @@ const serializeAws_restJson1CreateUsagePlanKeyCommand = async (input, context) =
388
388
  const headers = {
389
389
  "content-type": "application/json",
390
390
  };
391
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys";
391
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys";
392
392
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
393
393
  let body;
394
394
  body = JSON.stringify({
@@ -411,7 +411,7 @@ const serializeAws_restJson1CreateVpcLinkCommand = async (input, context) => {
411
411
  const headers = {
412
412
  "content-type": "application/json",
413
413
  };
414
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks";
414
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks";
415
415
  let body;
416
416
  body = JSON.stringify({
417
417
  ...(input.description != null && { description: input.description }),
@@ -433,7 +433,7 @@ exports.serializeAws_restJson1CreateVpcLinkCommand = serializeAws_restJson1Creat
433
433
  const serializeAws_restJson1DeleteApiKeyCommand = async (input, context) => {
434
434
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
435
435
  const headers = {};
436
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
436
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
437
437
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "apiKey", () => input.apiKey, "{apiKey}", false);
438
438
  let body;
439
439
  return new protocol_http_1.HttpRequest({
@@ -450,7 +450,7 @@ exports.serializeAws_restJson1DeleteApiKeyCommand = serializeAws_restJson1Delete
450
450
  const serializeAws_restJson1DeleteAuthorizerCommand = async (input, context) => {
451
451
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
452
452
  const headers = {};
453
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
453
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
454
454
  "/restapis/{restApiId}/authorizers/{authorizerId}";
455
455
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
456
456
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "authorizerId", () => input.authorizerId, "{authorizerId}", false);
@@ -469,7 +469,7 @@ exports.serializeAws_restJson1DeleteAuthorizerCommand = serializeAws_restJson1De
469
469
  const serializeAws_restJson1DeleteBasePathMappingCommand = async (input, context) => {
470
470
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
471
471
  const headers = {};
472
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
472
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
473
473
  "/domainnames/{domainName}/basepathmappings/{basePath}";
474
474
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
475
475
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "basePath", () => input.basePath, "{basePath}", false);
@@ -488,7 +488,7 @@ exports.serializeAws_restJson1DeleteBasePathMappingCommand = serializeAws_restJs
488
488
  const serializeAws_restJson1DeleteClientCertificateCommand = async (input, context) => {
489
489
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
490
490
  const headers = {};
491
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
491
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
492
492
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clientCertificateId", () => input.clientCertificateId, "{clientCertificateId}", false);
493
493
  let body;
494
494
  return new protocol_http_1.HttpRequest({
@@ -505,7 +505,7 @@ exports.serializeAws_restJson1DeleteClientCertificateCommand = serializeAws_rest
505
505
  const serializeAws_restJson1DeleteDeploymentCommand = async (input, context) => {
506
506
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
507
507
  const headers = {};
508
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
508
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
509
509
  "/restapis/{restApiId}/deployments/{deploymentId}";
510
510
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
511
511
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
@@ -524,7 +524,7 @@ exports.serializeAws_restJson1DeleteDeploymentCommand = serializeAws_restJson1De
524
524
  const serializeAws_restJson1DeleteDocumentationPartCommand = async (input, context) => {
525
525
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
526
526
  const headers = {};
527
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
527
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
528
528
  "/restapis/{restApiId}/documentation/parts/{documentationPartId}";
529
529
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
530
530
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationPartId", () => input.documentationPartId, "{documentationPartId}", false);
@@ -543,7 +543,7 @@ exports.serializeAws_restJson1DeleteDocumentationPartCommand = serializeAws_rest
543
543
  const serializeAws_restJson1DeleteDocumentationVersionCommand = async (input, context) => {
544
544
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
545
545
  const headers = {};
546
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
546
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
547
547
  "/restapis/{restApiId}/documentation/versions/{documentationVersion}";
548
548
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
549
549
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationVersion", () => input.documentationVersion, "{documentationVersion}", false);
@@ -562,7 +562,7 @@ exports.serializeAws_restJson1DeleteDocumentationVersionCommand = serializeAws_r
562
562
  const serializeAws_restJson1DeleteDomainNameCommand = async (input, context) => {
563
563
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
564
564
  const headers = {};
565
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
565
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
566
566
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
567
567
  let body;
568
568
  return new protocol_http_1.HttpRequest({
@@ -579,7 +579,7 @@ exports.serializeAws_restJson1DeleteDomainNameCommand = serializeAws_restJson1De
579
579
  const serializeAws_restJson1DeleteGatewayResponseCommand = async (input, context) => {
580
580
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
581
581
  const headers = {};
582
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
582
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
583
583
  "/restapis/{restApiId}/gatewayresponses/{responseType}";
584
584
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
585
585
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "responseType", () => input.responseType, "{responseType}", false);
@@ -598,7 +598,7 @@ exports.serializeAws_restJson1DeleteGatewayResponseCommand = serializeAws_restJs
598
598
  const serializeAws_restJson1DeleteIntegrationCommand = async (input, context) => {
599
599
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
600
600
  const headers = {};
601
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
601
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
602
602
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration";
603
603
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
604
604
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -618,7 +618,7 @@ exports.serializeAws_restJson1DeleteIntegrationCommand = serializeAws_restJson1D
618
618
  const serializeAws_restJson1DeleteIntegrationResponseCommand = async (input, context) => {
619
619
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
620
620
  const headers = {};
621
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
621
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
622
622
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}";
623
623
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
624
624
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -639,7 +639,7 @@ exports.serializeAws_restJson1DeleteIntegrationResponseCommand = serializeAws_re
639
639
  const serializeAws_restJson1DeleteMethodCommand = async (input, context) => {
640
640
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
641
641
  const headers = {};
642
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
642
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
643
643
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}";
644
644
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
645
645
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -659,7 +659,7 @@ exports.serializeAws_restJson1DeleteMethodCommand = serializeAws_restJson1Delete
659
659
  const serializeAws_restJson1DeleteMethodResponseCommand = async (input, context) => {
660
660
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
661
661
  const headers = {};
662
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
662
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
663
663
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}";
664
664
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
665
665
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -680,7 +680,7 @@ exports.serializeAws_restJson1DeleteMethodResponseCommand = serializeAws_restJso
680
680
  const serializeAws_restJson1DeleteModelCommand = async (input, context) => {
681
681
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
682
682
  const headers = {};
683
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
683
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
684
684
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
685
685
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelName", () => input.modelName, "{modelName}", false);
686
686
  let body;
@@ -698,7 +698,7 @@ exports.serializeAws_restJson1DeleteModelCommand = serializeAws_restJson1DeleteM
698
698
  const serializeAws_restJson1DeleteRequestValidatorCommand = async (input, context) => {
699
699
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
700
700
  const headers = {};
701
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
701
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
702
702
  "/restapis/{restApiId}/requestvalidators/{requestValidatorId}";
703
703
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
704
704
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "requestValidatorId", () => input.requestValidatorId, "{requestValidatorId}", false);
@@ -717,7 +717,7 @@ exports.serializeAws_restJson1DeleteRequestValidatorCommand = serializeAws_restJ
717
717
  const serializeAws_restJson1DeleteResourceCommand = async (input, context) => {
718
718
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
719
719
  const headers = {};
720
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
720
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
721
721
  "/restapis/{restApiId}/resources/{resourceId}";
722
722
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
723
723
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -736,7 +736,7 @@ exports.serializeAws_restJson1DeleteResourceCommand = serializeAws_restJson1Dele
736
736
  const serializeAws_restJson1DeleteRestApiCommand = async (input, context) => {
737
737
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
738
738
  const headers = {};
739
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
739
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
740
740
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
741
741
  let body;
742
742
  return new protocol_http_1.HttpRequest({
@@ -753,7 +753,7 @@ exports.serializeAws_restJson1DeleteRestApiCommand = serializeAws_restJson1Delet
753
753
  const serializeAws_restJson1DeleteStageCommand = async (input, context) => {
754
754
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
755
755
  const headers = {};
756
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
757
757
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
758
758
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
759
759
  let body;
@@ -771,7 +771,7 @@ exports.serializeAws_restJson1DeleteStageCommand = serializeAws_restJson1DeleteS
771
771
  const serializeAws_restJson1DeleteUsagePlanCommand = async (input, context) => {
772
772
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
773
773
  const headers = {};
774
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
774
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
775
775
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
776
776
  let body;
777
777
  return new protocol_http_1.HttpRequest({
@@ -788,7 +788,7 @@ exports.serializeAws_restJson1DeleteUsagePlanCommand = serializeAws_restJson1Del
788
788
  const serializeAws_restJson1DeleteUsagePlanKeyCommand = async (input, context) => {
789
789
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
790
790
  const headers = {};
791
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys/{keyId}";
791
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys/{keyId}";
792
792
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
793
793
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "keyId", () => input.keyId, "{keyId}", false);
794
794
  let body;
@@ -806,7 +806,7 @@ exports.serializeAws_restJson1DeleteUsagePlanKeyCommand = serializeAws_restJson1
806
806
  const serializeAws_restJson1DeleteVpcLinkCommand = async (input, context) => {
807
807
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
808
808
  const headers = {};
809
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
809
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
810
810
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "vpcLinkId", () => input.vpcLinkId, "{vpcLinkId}", false);
811
811
  let body;
812
812
  return new protocol_http_1.HttpRequest({
@@ -823,7 +823,7 @@ exports.serializeAws_restJson1DeleteVpcLinkCommand = serializeAws_restJson1Delet
823
823
  const serializeAws_restJson1FlushStageAuthorizersCacheCommand = async (input, context) => {
824
824
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
825
825
  const headers = {};
826
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
826
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
827
827
  "/restapis/{restApiId}/stages/{stageName}/cache/authorizers";
828
828
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
829
829
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
@@ -842,7 +842,7 @@ exports.serializeAws_restJson1FlushStageAuthorizersCacheCommand = serializeAws_r
842
842
  const serializeAws_restJson1FlushStageCacheCommand = async (input, context) => {
843
843
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
844
844
  const headers = {};
845
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
845
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
846
846
  "/restapis/{restApiId}/stages/{stageName}/cache/data";
847
847
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
848
848
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
@@ -863,7 +863,7 @@ const serializeAws_restJson1GenerateClientCertificateCommand = async (input, con
863
863
  const headers = {
864
864
  "content-type": "application/json",
865
865
  };
866
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates";
866
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates";
867
867
  let body;
868
868
  body = JSON.stringify({
869
869
  ...(input.description != null && { description: input.description }),
@@ -885,7 +885,7 @@ const serializeAws_restJson1GetAccountCommand = async (input, context) => {
885
885
  const headers = {
886
886
  "content-type": "application/json",
887
887
  };
888
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/account";
888
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account";
889
889
  let body;
890
890
  body = "";
891
891
  return new protocol_http_1.HttpRequest({
@@ -902,7 +902,7 @@ exports.serializeAws_restJson1GetAccountCommand = serializeAws_restJson1GetAccou
902
902
  const serializeAws_restJson1GetApiKeyCommand = async (input, context) => {
903
903
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
904
904
  const headers = {};
905
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
905
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
906
906
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "apiKey", () => input.apiKey, "{apiKey}", false);
907
907
  const query = map({
908
908
  includeValue: [() => input.includeValue !== void 0, () => input.includeValue.toString()],
@@ -923,7 +923,7 @@ exports.serializeAws_restJson1GetApiKeyCommand = serializeAws_restJson1GetApiKey
923
923
  const serializeAws_restJson1GetApiKeysCommand = async (input, context) => {
924
924
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
925
925
  const headers = {};
926
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
926
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
927
927
  const query = map({
928
928
  position: [, input.position],
929
929
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -947,7 +947,7 @@ exports.serializeAws_restJson1GetApiKeysCommand = serializeAws_restJson1GetApiKe
947
947
  const serializeAws_restJson1GetAuthorizerCommand = async (input, context) => {
948
948
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
949
949
  const headers = {};
950
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
950
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
951
951
  "/restapis/{restApiId}/authorizers/{authorizerId}";
952
952
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
953
953
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "authorizerId", () => input.authorizerId, "{authorizerId}", false);
@@ -966,7 +966,7 @@ exports.serializeAws_restJson1GetAuthorizerCommand = serializeAws_restJson1GetAu
966
966
  const serializeAws_restJson1GetAuthorizersCommand = async (input, context) => {
967
967
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
968
968
  const headers = {};
969
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/authorizers";
969
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/authorizers";
970
970
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
971
971
  const query = map({
972
972
  position: [, input.position],
@@ -988,7 +988,7 @@ exports.serializeAws_restJson1GetAuthorizersCommand = serializeAws_restJson1GetA
988
988
  const serializeAws_restJson1GetBasePathMappingCommand = async (input, context) => {
989
989
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
990
990
  const headers = {};
991
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
991
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
992
992
  "/domainnames/{domainName}/basepathmappings/{basePath}";
993
993
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
994
994
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "basePath", () => input.basePath, "{basePath}", false);
@@ -1007,7 +1007,7 @@ exports.serializeAws_restJson1GetBasePathMappingCommand = serializeAws_restJson1
1007
1007
  const serializeAws_restJson1GetBasePathMappingsCommand = async (input, context) => {
1008
1008
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1009
1009
  const headers = {};
1010
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1010
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1011
1011
  "/domainnames/{domainName}/basepathmappings";
1012
1012
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
1013
1013
  const query = map({
@@ -1030,7 +1030,7 @@ exports.serializeAws_restJson1GetBasePathMappingsCommand = serializeAws_restJson
1030
1030
  const serializeAws_restJson1GetClientCertificateCommand = async (input, context) => {
1031
1031
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1032
1032
  const headers = {};
1033
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
1033
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
1034
1034
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clientCertificateId", () => input.clientCertificateId, "{clientCertificateId}", false);
1035
1035
  let body;
1036
1036
  return new protocol_http_1.HttpRequest({
@@ -1047,7 +1047,7 @@ exports.serializeAws_restJson1GetClientCertificateCommand = serializeAws_restJso
1047
1047
  const serializeAws_restJson1GetClientCertificatesCommand = async (input, context) => {
1048
1048
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1049
1049
  const headers = {};
1050
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates";
1050
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates";
1051
1051
  const query = map({
1052
1052
  position: [, input.position],
1053
1053
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -1068,7 +1068,7 @@ exports.serializeAws_restJson1GetClientCertificatesCommand = serializeAws_restJs
1068
1068
  const serializeAws_restJson1GetDeploymentCommand = async (input, context) => {
1069
1069
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1070
1070
  const headers = {};
1071
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1071
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1072
1072
  "/restapis/{restApiId}/deployments/{deploymentId}";
1073
1073
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1074
1074
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
@@ -1091,7 +1091,7 @@ exports.serializeAws_restJson1GetDeploymentCommand = serializeAws_restJson1GetDe
1091
1091
  const serializeAws_restJson1GetDeploymentsCommand = async (input, context) => {
1092
1092
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1093
1093
  const headers = {};
1094
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/deployments";
1094
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/deployments";
1095
1095
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1096
1096
  const query = map({
1097
1097
  position: [, input.position],
@@ -1113,7 +1113,7 @@ exports.serializeAws_restJson1GetDeploymentsCommand = serializeAws_restJson1GetD
1113
1113
  const serializeAws_restJson1GetDocumentationPartCommand = async (input, context) => {
1114
1114
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1115
1115
  const headers = {};
1116
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1116
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1117
1117
  "/restapis/{restApiId}/documentation/parts/{documentationPartId}";
1118
1118
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1119
1119
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationPartId", () => input.documentationPartId, "{documentationPartId}", false);
@@ -1132,7 +1132,7 @@ exports.serializeAws_restJson1GetDocumentationPartCommand = serializeAws_restJso
1132
1132
  const serializeAws_restJson1GetDocumentationPartsCommand = async (input, context) => {
1133
1133
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1134
1134
  const headers = {};
1135
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
1135
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
1136
1136
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1137
1137
  const query = map({
1138
1138
  type: [, input.type],
@@ -1158,7 +1158,7 @@ exports.serializeAws_restJson1GetDocumentationPartsCommand = serializeAws_restJs
1158
1158
  const serializeAws_restJson1GetDocumentationVersionCommand = async (input, context) => {
1159
1159
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1160
1160
  const headers = {};
1161
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1161
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1162
1162
  "/restapis/{restApiId}/documentation/versions/{documentationVersion}";
1163
1163
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1164
1164
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationVersion", () => input.documentationVersion, "{documentationVersion}", false);
@@ -1177,7 +1177,7 @@ exports.serializeAws_restJson1GetDocumentationVersionCommand = serializeAws_rest
1177
1177
  const serializeAws_restJson1GetDocumentationVersionsCommand = async (input, context) => {
1178
1178
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1179
1179
  const headers = {};
1180
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1180
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1181
1181
  "/restapis/{restApiId}/documentation/versions";
1182
1182
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1183
1183
  const query = map({
@@ -1200,7 +1200,7 @@ exports.serializeAws_restJson1GetDocumentationVersionsCommand = serializeAws_res
1200
1200
  const serializeAws_restJson1GetDomainNameCommand = async (input, context) => {
1201
1201
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1202
1202
  const headers = {};
1203
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
1203
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
1204
1204
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
1205
1205
  let body;
1206
1206
  return new protocol_http_1.HttpRequest({
@@ -1217,7 +1217,7 @@ exports.serializeAws_restJson1GetDomainNameCommand = serializeAws_restJson1GetDo
1217
1217
  const serializeAws_restJson1GetDomainNamesCommand = async (input, context) => {
1218
1218
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1219
1219
  const headers = {};
1220
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
1220
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames";
1221
1221
  const query = map({
1222
1222
  position: [, input.position],
1223
1223
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -1240,7 +1240,7 @@ const serializeAws_restJson1GetExportCommand = async (input, context) => {
1240
1240
  const headers = map({}, isSerializableHeaderValue, {
1241
1241
  accept: input.accepts,
1242
1242
  });
1243
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1243
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1244
1244
  "/restapis/{restApiId}/stages/{stageName}/exports/{exportType}";
1245
1245
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1246
1246
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
@@ -1264,7 +1264,7 @@ exports.serializeAws_restJson1GetExportCommand = serializeAws_restJson1GetExport
1264
1264
  const serializeAws_restJson1GetGatewayResponseCommand = async (input, context) => {
1265
1265
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1266
1266
  const headers = {};
1267
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1267
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1268
1268
  "/restapis/{restApiId}/gatewayresponses/{responseType}";
1269
1269
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1270
1270
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "responseType", () => input.responseType, "{responseType}", false);
@@ -1283,7 +1283,7 @@ exports.serializeAws_restJson1GetGatewayResponseCommand = serializeAws_restJson1
1283
1283
  const serializeAws_restJson1GetGatewayResponsesCommand = async (input, context) => {
1284
1284
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1285
1285
  const headers = {};
1286
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/gatewayresponses";
1286
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/gatewayresponses";
1287
1287
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1288
1288
  const query = map({
1289
1289
  position: [, input.position],
@@ -1305,7 +1305,7 @@ exports.serializeAws_restJson1GetGatewayResponsesCommand = serializeAws_restJson
1305
1305
  const serializeAws_restJson1GetIntegrationCommand = async (input, context) => {
1306
1306
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1307
1307
  const headers = {};
1308
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1308
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1309
1309
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration";
1310
1310
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1311
1311
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1325,7 +1325,7 @@ exports.serializeAws_restJson1GetIntegrationCommand = serializeAws_restJson1GetI
1325
1325
  const serializeAws_restJson1GetIntegrationResponseCommand = async (input, context) => {
1326
1326
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1327
1327
  const headers = {};
1328
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1328
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1329
1329
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}";
1330
1330
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1331
1331
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1346,7 +1346,7 @@ exports.serializeAws_restJson1GetIntegrationResponseCommand = serializeAws_restJ
1346
1346
  const serializeAws_restJson1GetMethodCommand = async (input, context) => {
1347
1347
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1348
1348
  const headers = {};
1349
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1349
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1350
1350
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}";
1351
1351
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1352
1352
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1366,7 +1366,7 @@ exports.serializeAws_restJson1GetMethodCommand = serializeAws_restJson1GetMethod
1366
1366
  const serializeAws_restJson1GetMethodResponseCommand = async (input, context) => {
1367
1367
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1368
1368
  const headers = {};
1369
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1369
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1370
1370
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}";
1371
1371
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1372
1372
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1387,7 +1387,7 @@ exports.serializeAws_restJson1GetMethodResponseCommand = serializeAws_restJson1G
1387
1387
  const serializeAws_restJson1GetModelCommand = async (input, context) => {
1388
1388
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1389
1389
  const headers = {};
1390
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
1390
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
1391
1391
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1392
1392
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelName", () => input.modelName, "{modelName}", false);
1393
1393
  const query = map({
@@ -1409,7 +1409,7 @@ exports.serializeAws_restJson1GetModelCommand = serializeAws_restJson1GetModelCo
1409
1409
  const serializeAws_restJson1GetModelsCommand = async (input, context) => {
1410
1410
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1411
1411
  const headers = {};
1412
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models";
1412
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models";
1413
1413
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1414
1414
  const query = map({
1415
1415
  position: [, input.position],
@@ -1431,7 +1431,7 @@ exports.serializeAws_restJson1GetModelsCommand = serializeAws_restJson1GetModels
1431
1431
  const serializeAws_restJson1GetModelTemplateCommand = async (input, context) => {
1432
1432
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1433
1433
  const headers = {};
1434
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1434
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1435
1435
  "/restapis/{restApiId}/models/{modelName}/default_template";
1436
1436
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1437
1437
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelName", () => input.modelName, "{modelName}", false);
@@ -1450,7 +1450,7 @@ exports.serializeAws_restJson1GetModelTemplateCommand = serializeAws_restJson1Ge
1450
1450
  const serializeAws_restJson1GetRequestValidatorCommand = async (input, context) => {
1451
1451
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1452
1452
  const headers = {};
1453
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1453
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1454
1454
  "/restapis/{restApiId}/requestvalidators/{requestValidatorId}";
1455
1455
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1456
1456
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "requestValidatorId", () => input.requestValidatorId, "{requestValidatorId}", false);
@@ -1469,7 +1469,7 @@ exports.serializeAws_restJson1GetRequestValidatorCommand = serializeAws_restJson
1469
1469
  const serializeAws_restJson1GetRequestValidatorsCommand = async (input, context) => {
1470
1470
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1471
1471
  const headers = {};
1472
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/requestvalidators";
1472
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/requestvalidators";
1473
1473
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1474
1474
  const query = map({
1475
1475
  position: [, input.position],
@@ -1491,7 +1491,7 @@ exports.serializeAws_restJson1GetRequestValidatorsCommand = serializeAws_restJso
1491
1491
  const serializeAws_restJson1GetResourceCommand = async (input, context) => {
1492
1492
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1493
1493
  const headers = {};
1494
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1494
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1495
1495
  "/restapis/{restApiId}/resources/{resourceId}";
1496
1496
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1497
1497
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1514,7 +1514,7 @@ exports.serializeAws_restJson1GetResourceCommand = serializeAws_restJson1GetReso
1514
1514
  const serializeAws_restJson1GetResourcesCommand = async (input, context) => {
1515
1515
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1516
1516
  const headers = {};
1517
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/resources";
1517
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/resources";
1518
1518
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1519
1519
  const query = map({
1520
1520
  position: [, input.position],
@@ -1537,7 +1537,7 @@ exports.serializeAws_restJson1GetResourcesCommand = serializeAws_restJson1GetRes
1537
1537
  const serializeAws_restJson1GetRestApiCommand = async (input, context) => {
1538
1538
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1539
1539
  const headers = {};
1540
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
1540
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
1541
1541
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1542
1542
  let body;
1543
1543
  return new protocol_http_1.HttpRequest({
@@ -1554,7 +1554,7 @@ exports.serializeAws_restJson1GetRestApiCommand = serializeAws_restJson1GetRestA
1554
1554
  const serializeAws_restJson1GetRestApisCommand = async (input, context) => {
1555
1555
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1556
1556
  const headers = {};
1557
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
1557
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
1558
1558
  const query = map({
1559
1559
  position: [, input.position],
1560
1560
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -1575,7 +1575,7 @@ exports.serializeAws_restJson1GetRestApisCommand = serializeAws_restJson1GetRest
1575
1575
  const serializeAws_restJson1GetSdkCommand = async (input, context) => {
1576
1576
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1577
1577
  const headers = {};
1578
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1578
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1579
1579
  "/restapis/{restApiId}/stages/{stageName}/sdks/{sdkType}";
1580
1580
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1581
1581
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
@@ -1599,7 +1599,7 @@ exports.serializeAws_restJson1GetSdkCommand = serializeAws_restJson1GetSdkComman
1599
1599
  const serializeAws_restJson1GetSdkTypeCommand = async (input, context) => {
1600
1600
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1601
1601
  const headers = {};
1602
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sdktypes/{id}";
1602
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdktypes/{id}";
1603
1603
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
1604
1604
  let body;
1605
1605
  return new protocol_http_1.HttpRequest({
@@ -1616,7 +1616,7 @@ exports.serializeAws_restJson1GetSdkTypeCommand = serializeAws_restJson1GetSdkTy
1616
1616
  const serializeAws_restJson1GetSdkTypesCommand = async (input, context) => {
1617
1617
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1618
1618
  const headers = {};
1619
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/sdktypes";
1619
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/sdktypes";
1620
1620
  const query = map({
1621
1621
  position: [, input.position],
1622
1622
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -1637,7 +1637,7 @@ exports.serializeAws_restJson1GetSdkTypesCommand = serializeAws_restJson1GetSdkT
1637
1637
  const serializeAws_restJson1GetStageCommand = async (input, context) => {
1638
1638
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1639
1639
  const headers = {};
1640
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
1640
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
1641
1641
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1642
1642
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
1643
1643
  let body;
@@ -1655,7 +1655,7 @@ exports.serializeAws_restJson1GetStageCommand = serializeAws_restJson1GetStageCo
1655
1655
  const serializeAws_restJson1GetStagesCommand = async (input, context) => {
1656
1656
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1657
1657
  const headers = {};
1658
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages";
1658
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages";
1659
1659
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1660
1660
  const query = map({
1661
1661
  deploymentId: [, input.deploymentId],
@@ -1676,7 +1676,7 @@ exports.serializeAws_restJson1GetStagesCommand = serializeAws_restJson1GetStages
1676
1676
  const serializeAws_restJson1GetTagsCommand = async (input, context) => {
1677
1677
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1678
1678
  const headers = {};
1679
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1679
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
1680
1680
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
1681
1681
  const query = map({
1682
1682
  position: [, input.position],
@@ -1698,7 +1698,7 @@ exports.serializeAws_restJson1GetTagsCommand = serializeAws_restJson1GetTagsComm
1698
1698
  const serializeAws_restJson1GetUsageCommand = async (input, context) => {
1699
1699
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1700
1700
  const headers = {};
1701
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/usage";
1701
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/usage";
1702
1702
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
1703
1703
  const query = map({
1704
1704
  keyId: [, input.keyId],
@@ -1723,7 +1723,7 @@ exports.serializeAws_restJson1GetUsageCommand = serializeAws_restJson1GetUsageCo
1723
1723
  const serializeAws_restJson1GetUsagePlanCommand = async (input, context) => {
1724
1724
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1725
1725
  const headers = {};
1726
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
1726
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
1727
1727
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
1728
1728
  let body;
1729
1729
  return new protocol_http_1.HttpRequest({
@@ -1740,7 +1740,7 @@ exports.serializeAws_restJson1GetUsagePlanCommand = serializeAws_restJson1GetUsa
1740
1740
  const serializeAws_restJson1GetUsagePlanKeyCommand = async (input, context) => {
1741
1741
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1742
1742
  const headers = {};
1743
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys/{keyId}";
1743
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys/{keyId}";
1744
1744
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
1745
1745
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "keyId", () => input.keyId, "{keyId}", false);
1746
1746
  let body;
@@ -1758,7 +1758,7 @@ exports.serializeAws_restJson1GetUsagePlanKeyCommand = serializeAws_restJson1Get
1758
1758
  const serializeAws_restJson1GetUsagePlanKeysCommand = async (input, context) => {
1759
1759
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1760
1760
  const headers = {};
1761
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys";
1761
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}/keys";
1762
1762
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
1763
1763
  const query = map({
1764
1764
  position: [, input.position],
@@ -1781,7 +1781,7 @@ exports.serializeAws_restJson1GetUsagePlanKeysCommand = serializeAws_restJson1Ge
1781
1781
  const serializeAws_restJson1GetUsagePlansCommand = async (input, context) => {
1782
1782
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1783
1783
  const headers = {};
1784
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans";
1784
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans";
1785
1785
  const query = map({
1786
1786
  position: [, input.position],
1787
1787
  keyId: [, input.keyId],
@@ -1803,7 +1803,7 @@ exports.serializeAws_restJson1GetUsagePlansCommand = serializeAws_restJson1GetUs
1803
1803
  const serializeAws_restJson1GetVpcLinkCommand = async (input, context) => {
1804
1804
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1805
1805
  const headers = {};
1806
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
1806
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
1807
1807
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "vpcLinkId", () => input.vpcLinkId, "{vpcLinkId}", false);
1808
1808
  let body;
1809
1809
  return new protocol_http_1.HttpRequest({
@@ -1820,7 +1820,7 @@ exports.serializeAws_restJson1GetVpcLinkCommand = serializeAws_restJson1GetVpcLi
1820
1820
  const serializeAws_restJson1GetVpcLinksCommand = async (input, context) => {
1821
1821
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1822
1822
  const headers = {};
1823
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks";
1823
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks";
1824
1824
  const query = map({
1825
1825
  position: [, input.position],
1826
1826
  limit: [() => input.limit !== void 0, () => input.limit.toString()],
@@ -1843,7 +1843,7 @@ const serializeAws_restJson1ImportApiKeysCommand = async (input, context) => {
1843
1843
  const headers = {
1844
1844
  "content-type": "application/octet-stream",
1845
1845
  };
1846
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
1846
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys";
1847
1847
  const query = map({
1848
1848
  mode: [, "import"],
1849
1849
  format: [, input.format],
@@ -1870,7 +1870,7 @@ const serializeAws_restJson1ImportDocumentationPartsCommand = async (input, cont
1870
1870
  const headers = {
1871
1871
  "content-type": "application/octet-stream",
1872
1872
  };
1873
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
1873
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/documentation/parts";
1874
1874
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1875
1875
  const query = map({
1876
1876
  mode: [, input.mode],
@@ -1897,7 +1897,7 @@ const serializeAws_restJson1ImportRestApiCommand = async (input, context) => {
1897
1897
  const headers = {
1898
1898
  "content-type": "application/octet-stream",
1899
1899
  };
1900
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
1900
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis";
1901
1901
  const query = map({
1902
1902
  mode: [, "import"],
1903
1903
  ...(0, smithy_client_1.convertMap)(input.parameters),
@@ -1924,7 +1924,7 @@ const serializeAws_restJson1PutGatewayResponseCommand = async (input, context) =
1924
1924
  const headers = {
1925
1925
  "content-type": "application/json",
1926
1926
  };
1927
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1927
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1928
1928
  "/restapis/{restApiId}/gatewayresponses/{responseType}";
1929
1929
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1930
1930
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "responseType", () => input.responseType, "{responseType}", false);
@@ -1954,7 +1954,7 @@ const serializeAws_restJson1PutIntegrationCommand = async (input, context) => {
1954
1954
  const headers = {
1955
1955
  "content-type": "application/json",
1956
1956
  };
1957
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1957
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1958
1958
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration";
1959
1959
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
1960
1960
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -1998,7 +1998,7 @@ const serializeAws_restJson1PutIntegrationResponseCommand = async (input, contex
1998
1998
  const headers = {
1999
1999
  "content-type": "application/json",
2000
2000
  };
2001
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2001
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2002
2002
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}";
2003
2003
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2004
2004
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2031,7 +2031,7 @@ const serializeAws_restJson1PutMethodCommand = async (input, context) => {
2031
2031
  const headers = {
2032
2032
  "content-type": "application/json",
2033
2033
  };
2034
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2034
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2035
2035
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}";
2036
2036
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2037
2037
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2069,7 +2069,7 @@ const serializeAws_restJson1PutMethodResponseCommand = async (input, context) =>
2069
2069
  const headers = {
2070
2070
  "content-type": "application/json",
2071
2071
  };
2072
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2072
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2073
2073
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}";
2074
2074
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2075
2075
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2100,7 +2100,7 @@ const serializeAws_restJson1PutRestApiCommand = async (input, context) => {
2100
2100
  const headers = {
2101
2101
  "content-type": "application/octet-stream",
2102
2102
  };
2103
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
2103
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
2104
2104
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2105
2105
  const query = map({
2106
2106
  ...(0, smithy_client_1.convertMap)(input.parameters),
@@ -2128,7 +2128,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
2128
2128
  const headers = {
2129
2129
  "content-type": "application/json",
2130
2130
  };
2131
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2131
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2132
2132
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
2133
2133
  let body;
2134
2134
  body = JSON.stringify({
@@ -2150,7 +2150,7 @@ const serializeAws_restJson1TestInvokeAuthorizerCommand = async (input, context)
2150
2150
  const headers = {
2151
2151
  "content-type": "application/json",
2152
2152
  };
2153
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2153
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2154
2154
  "/restapis/{restApiId}/authorizers/{authorizerId}";
2155
2155
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2156
2156
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "authorizerId", () => input.authorizerId, "{authorizerId}", false);
@@ -2185,7 +2185,7 @@ const serializeAws_restJson1TestInvokeMethodCommand = async (input, context) =>
2185
2185
  const headers = {
2186
2186
  "content-type": "application/json",
2187
2187
  };
2188
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2188
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2189
2189
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}";
2190
2190
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2191
2191
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2217,7 +2217,7 @@ exports.serializeAws_restJson1TestInvokeMethodCommand = serializeAws_restJson1Te
2217
2217
  const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
2218
2218
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2219
2219
  const headers = {};
2220
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2220
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
2221
2221
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
2222
2222
  const query = map({
2223
2223
  tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
@@ -2240,7 +2240,7 @@ const serializeAws_restJson1UpdateAccountCommand = async (input, context) => {
2240
2240
  const headers = {
2241
2241
  "content-type": "application/json",
2242
2242
  };
2243
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/account";
2243
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/account";
2244
2244
  let body;
2245
2245
  body = JSON.stringify({
2246
2246
  ...(input.patchOperations != null && {
@@ -2263,7 +2263,7 @@ const serializeAws_restJson1UpdateApiKeyCommand = async (input, context) => {
2263
2263
  const headers = {
2264
2264
  "content-type": "application/json",
2265
2265
  };
2266
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
2266
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/apikeys/{apiKey}";
2267
2267
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "apiKey", () => input.apiKey, "{apiKey}", false);
2268
2268
  let body;
2269
2269
  body = JSON.stringify({
@@ -2287,7 +2287,7 @@ const serializeAws_restJson1UpdateAuthorizerCommand = async (input, context) =>
2287
2287
  const headers = {
2288
2288
  "content-type": "application/json",
2289
2289
  };
2290
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2290
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2291
2291
  "/restapis/{restApiId}/authorizers/{authorizerId}";
2292
2292
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2293
2293
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "authorizerId", () => input.authorizerId, "{authorizerId}", false);
@@ -2313,7 +2313,7 @@ const serializeAws_restJson1UpdateBasePathMappingCommand = async (input, context
2313
2313
  const headers = {
2314
2314
  "content-type": "application/json",
2315
2315
  };
2316
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2316
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2317
2317
  "/domainnames/{domainName}/basepathmappings/{basePath}";
2318
2318
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
2319
2319
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "basePath", () => input.basePath, "{basePath}", false);
@@ -2339,7 +2339,7 @@ const serializeAws_restJson1UpdateClientCertificateCommand = async (input, conte
2339
2339
  const headers = {
2340
2340
  "content-type": "application/json",
2341
2341
  };
2342
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
2342
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clientcertificates/{clientCertificateId}";
2343
2343
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "clientCertificateId", () => input.clientCertificateId, "{clientCertificateId}", false);
2344
2344
  let body;
2345
2345
  body = JSON.stringify({
@@ -2363,7 +2363,7 @@ const serializeAws_restJson1UpdateDeploymentCommand = async (input, context) =>
2363
2363
  const headers = {
2364
2364
  "content-type": "application/json",
2365
2365
  };
2366
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2366
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2367
2367
  "/restapis/{restApiId}/deployments/{deploymentId}";
2368
2368
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2369
2369
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "deploymentId", () => input.deploymentId, "{deploymentId}", false);
@@ -2389,7 +2389,7 @@ const serializeAws_restJson1UpdateDocumentationPartCommand = async (input, conte
2389
2389
  const headers = {
2390
2390
  "content-type": "application/json",
2391
2391
  };
2392
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2392
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2393
2393
  "/restapis/{restApiId}/documentation/parts/{documentationPartId}";
2394
2394
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2395
2395
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationPartId", () => input.documentationPartId, "{documentationPartId}", false);
@@ -2415,7 +2415,7 @@ const serializeAws_restJson1UpdateDocumentationVersionCommand = async (input, co
2415
2415
  const headers = {
2416
2416
  "content-type": "application/json",
2417
2417
  };
2418
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2418
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2419
2419
  "/restapis/{restApiId}/documentation/versions/{documentationVersion}";
2420
2420
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2421
2421
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "documentationVersion", () => input.documentationVersion, "{documentationVersion}", false);
@@ -2441,7 +2441,7 @@ const serializeAws_restJson1UpdateDomainNameCommand = async (input, context) =>
2441
2441
  const headers = {
2442
2442
  "content-type": "application/json",
2443
2443
  };
2444
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
2444
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/domainnames/{domainName}";
2445
2445
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "domainName", () => input.domainName, "{domainName}", false);
2446
2446
  let body;
2447
2447
  body = JSON.stringify({
@@ -2465,7 +2465,7 @@ const serializeAws_restJson1UpdateGatewayResponseCommand = async (input, context
2465
2465
  const headers = {
2466
2466
  "content-type": "application/json",
2467
2467
  };
2468
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2468
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2469
2469
  "/restapis/{restApiId}/gatewayresponses/{responseType}";
2470
2470
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2471
2471
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "responseType", () => input.responseType, "{responseType}", false);
@@ -2491,7 +2491,7 @@ const serializeAws_restJson1UpdateIntegrationCommand = async (input, context) =>
2491
2491
  const headers = {
2492
2492
  "content-type": "application/json",
2493
2493
  };
2494
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2494
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2495
2495
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration";
2496
2496
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2497
2497
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2518,7 +2518,7 @@ const serializeAws_restJson1UpdateIntegrationResponseCommand = async (input, con
2518
2518
  const headers = {
2519
2519
  "content-type": "application/json",
2520
2520
  };
2521
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2521
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2522
2522
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}";
2523
2523
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2524
2524
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2546,7 +2546,7 @@ const serializeAws_restJson1UpdateMethodCommand = async (input, context) => {
2546
2546
  const headers = {
2547
2547
  "content-type": "application/json",
2548
2548
  };
2549
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2549
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2550
2550
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}";
2551
2551
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2552
2552
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2573,7 +2573,7 @@ const serializeAws_restJson1UpdateMethodResponseCommand = async (input, context)
2573
2573
  const headers = {
2574
2574
  "content-type": "application/json",
2575
2575
  };
2576
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2576
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2577
2577
  "/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}";
2578
2578
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2579
2579
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2601,7 +2601,7 @@ const serializeAws_restJson1UpdateModelCommand = async (input, context) => {
2601
2601
  const headers = {
2602
2602
  "content-type": "application/json",
2603
2603
  };
2604
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
2604
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/models/{modelName}";
2605
2605
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2606
2606
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "modelName", () => input.modelName, "{modelName}", false);
2607
2607
  let body;
@@ -2626,7 +2626,7 @@ const serializeAws_restJson1UpdateRequestValidatorCommand = async (input, contex
2626
2626
  const headers = {
2627
2627
  "content-type": "application/json",
2628
2628
  };
2629
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2629
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2630
2630
  "/restapis/{restApiId}/requestvalidators/{requestValidatorId}";
2631
2631
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2632
2632
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "requestValidatorId", () => input.requestValidatorId, "{requestValidatorId}", false);
@@ -2652,7 +2652,7 @@ const serializeAws_restJson1UpdateResourceCommand = async (input, context) => {
2652
2652
  const headers = {
2653
2653
  "content-type": "application/json",
2654
2654
  };
2655
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2655
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2656
2656
  "/restapis/{restApiId}/resources/{resourceId}";
2657
2657
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2658
2658
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceId", () => input.resourceId, "{resourceId}", false);
@@ -2678,7 +2678,7 @@ const serializeAws_restJson1UpdateRestApiCommand = async (input, context) => {
2678
2678
  const headers = {
2679
2679
  "content-type": "application/json",
2680
2680
  };
2681
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
2681
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}";
2682
2682
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2683
2683
  let body;
2684
2684
  body = JSON.stringify({
@@ -2702,7 +2702,7 @@ const serializeAws_restJson1UpdateStageCommand = async (input, context) => {
2702
2702
  const headers = {
2703
2703
  "content-type": "application/json",
2704
2704
  };
2705
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
2705
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/restapis/{restApiId}/stages/{stageName}";
2706
2706
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "restApiId", () => input.restApiId, "{restApiId}", false);
2707
2707
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "stageName", () => input.stageName, "{stageName}", false);
2708
2708
  let body;
@@ -2727,7 +2727,7 @@ const serializeAws_restJson1UpdateUsageCommand = async (input, context) => {
2727
2727
  const headers = {
2728
2728
  "content-type": "application/json",
2729
2729
  };
2730
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2730
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2731
2731
  "/usageplans/{usagePlanId}/keys/{keyId}/usage";
2732
2732
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
2733
2733
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "keyId", () => input.keyId, "{keyId}", false);
@@ -2753,7 +2753,7 @@ const serializeAws_restJson1UpdateUsagePlanCommand = async (input, context) => {
2753
2753
  const headers = {
2754
2754
  "content-type": "application/json",
2755
2755
  };
2756
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
2756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/usageplans/{usagePlanId}";
2757
2757
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "usagePlanId", () => input.usagePlanId, "{usagePlanId}", false);
2758
2758
  let body;
2759
2759
  body = JSON.stringify({
@@ -2777,7 +2777,7 @@ const serializeAws_restJson1UpdateVpcLinkCommand = async (input, context) => {
2777
2777
  const headers = {
2778
2778
  "content-type": "application/json",
2779
2779
  };
2780
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
2780
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vpclinks/{vpcLinkId}";
2781
2781
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "vpcLinkId", () => input.vpcLinkId, "{vpcLinkId}", false);
2782
2782
  let body;
2783
2783
  body = JSON.stringify({
@@ -10766,15 +10766,12 @@ const deserializeAws_restJson1VpcLink = (output, context) => {
10766
10766
  targetArns: output.targetArns != null ? deserializeAws_restJson1ListOfString(output.targetArns, context) : undefined,
10767
10767
  };
10768
10768
  };
10769
- const deserializeMetadata = (output) => {
10770
- var _a, _b;
10771
- return ({
10772
- httpStatusCode: output.statusCode,
10773
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
10774
- extendedRequestId: output.headers["x-amz-id-2"],
10775
- cfId: output.headers["x-amz-cf-id"],
10776
- });
10777
- };
10769
+ const deserializeMetadata = (output) => ({
10770
+ httpStatusCode: output.statusCode,
10771
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
10772
+ extendedRequestId: output.headers["x-amz-id-2"],
10773
+ cfId: output.headers["x-amz-cf-id"],
10774
+ });
10778
10775
  const collectBody = (streamBody = new Uint8Array(), context) => {
10779
10776
  if (streamBody instanceof Uint8Array) {
10780
10777
  return Promise.resolve(streamBody);
@@ -10794,9 +10791,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
10794
10791
  return {};
10795
10792
  });
10796
10793
  const parseErrorBody = async (errorBody, context) => {
10797
- var _a;
10798
10794
  const value = await parseBody(errorBody, context);
10799
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
10795
+ value.message = value.message ?? value.Message;
10800
10796
  return value;
10801
10797
  };
10802
10798
  const loadRestJsonErrorCode = (output, data) => {