@aws-sdk/client-cloudfront 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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * end support for Node.js 12.x ([#4123](https://github.com/aws/aws-sdk-js-v3/issues/4123)) ([83f913e](https://github.com/aws/aws-sdk-js-v3/commit/83f913ec2ac3878d8726c6964f585550dc5caf3e))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
18
+
19
+ **Note:** Version bump only for package @aws-sdk/client-cloudfront
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.199.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.198.0...v3.199.0) (2022-10-28)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/client-cloudfront
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
- var _a, _b;
6
5
  return {
7
6
  ...options,
8
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false,
9
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
10
9
  defaultSigningName: "cloudfront",
11
10
  };
12
11
  };
@@ -14,7 +14,7 @@ const models_1_1 = require("../models/models_1");
14
14
  const serializeAws_restXmlAssociateAliasCommand = async (input, context) => {
15
15
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
16
16
  const headers = {};
17
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
17
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
18
18
  "/2020-05-31/distribution/{TargetDistributionId}/associate-alias";
19
19
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "TargetDistributionId", () => input.TargetDistributionId, "{TargetDistributionId}", false);
20
20
  const query = map({
@@ -38,7 +38,7 @@ const serializeAws_restXmlCreateCachePolicyCommand = async (input, context) => {
38
38
  const headers = {
39
39
  "content-type": "application/xml",
40
40
  };
41
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy";
41
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy";
42
42
  let body;
43
43
  if (input.CachePolicyConfig !== undefined) {
44
44
  body = serializeAws_restXmlCachePolicyConfig(input.CachePolicyConfig, context);
@@ -66,7 +66,7 @@ const serializeAws_restXmlCreateCloudFrontOriginAccessIdentityCommand = async (i
66
66
  const headers = {
67
67
  "content-type": "application/xml",
68
68
  };
69
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
69
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
70
70
  "/2020-05-31/origin-access-identity/cloudfront";
71
71
  let body;
72
72
  if (input.CloudFrontOriginAccessIdentityConfig !== undefined) {
@@ -95,7 +95,7 @@ const serializeAws_restXmlCreateDistributionCommand = async (input, context) =>
95
95
  const headers = {
96
96
  "content-type": "application/xml",
97
97
  };
98
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
98
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
99
99
  let body;
100
100
  if (input.DistributionConfig !== undefined) {
101
101
  body = serializeAws_restXmlDistributionConfig(input.DistributionConfig, context);
@@ -123,7 +123,7 @@ const serializeAws_restXmlCreateDistributionWithTagsCommand = async (input, cont
123
123
  const headers = {
124
124
  "content-type": "application/xml",
125
125
  };
126
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
126
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
127
127
  const query = map({
128
128
  WithTags: [, ""],
129
129
  });
@@ -155,7 +155,7 @@ const serializeAws_restXmlCreateFieldLevelEncryptionConfigCommand = async (input
155
155
  const headers = {
156
156
  "content-type": "application/xml",
157
157
  };
158
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption";
158
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption";
159
159
  let body;
160
160
  if (input.FieldLevelEncryptionConfig !== undefined) {
161
161
  body = serializeAws_restXmlFieldLevelEncryptionConfig(input.FieldLevelEncryptionConfig, context);
@@ -183,7 +183,7 @@ const serializeAws_restXmlCreateFieldLevelEncryptionProfileCommand = async (inpu
183
183
  const headers = {
184
184
  "content-type": "application/xml",
185
185
  };
186
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
186
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
187
187
  "/2020-05-31/field-level-encryption-profile";
188
188
  let body;
189
189
  if (input.FieldLevelEncryptionProfileConfig !== undefined) {
@@ -212,7 +212,7 @@ const serializeAws_restXmlCreateFunctionCommand = async (input, context) => {
212
212
  const headers = {
213
213
  "content-type": "application/xml",
214
214
  };
215
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function";
215
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function";
216
216
  let body;
217
217
  body = '<?xml version="1.0" encoding="UTF-8"?>';
218
218
  const bodyNode = new xml_builder_1.XmlNode("CreateFunctionRequest");
@@ -246,7 +246,7 @@ const serializeAws_restXmlCreateInvalidationCommand = async (input, context) =>
246
246
  const headers = {
247
247
  "content-type": "application/xml",
248
248
  };
249
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
249
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
250
250
  "/2020-05-31/distribution/{DistributionId}/invalidation";
251
251
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
252
252
  let body;
@@ -276,7 +276,7 @@ const serializeAws_restXmlCreateKeyGroupCommand = async (input, context) => {
276
276
  const headers = {
277
277
  "content-type": "application/xml",
278
278
  };
279
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group";
279
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group";
280
280
  let body;
281
281
  if (input.KeyGroupConfig !== undefined) {
282
282
  body = serializeAws_restXmlKeyGroupConfig(input.KeyGroupConfig, context);
@@ -304,7 +304,7 @@ const serializeAws_restXmlCreateMonitoringSubscriptionCommand = async (input, co
304
304
  const headers = {
305
305
  "content-type": "application/xml",
306
306
  };
307
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
307
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
308
308
  "/2020-05-31/distributions/{DistributionId}/monitoring-subscription";
309
309
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
310
310
  let body;
@@ -334,7 +334,7 @@ const serializeAws_restXmlCreateOriginAccessControlCommand = async (input, conte
334
334
  const headers = {
335
335
  "content-type": "application/xml",
336
336
  };
337
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control";
337
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control";
338
338
  let body;
339
339
  if (input.OriginAccessControlConfig !== undefined) {
340
340
  body = serializeAws_restXmlOriginAccessControlConfig(input.OriginAccessControlConfig, context);
@@ -362,7 +362,7 @@ const serializeAws_restXmlCreateOriginRequestPolicyCommand = async (input, conte
362
362
  const headers = {
363
363
  "content-type": "application/xml",
364
364
  };
365
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy";
365
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy";
366
366
  let body;
367
367
  if (input.OriginRequestPolicyConfig !== undefined) {
368
368
  body = serializeAws_restXmlOriginRequestPolicyConfig(input.OriginRequestPolicyConfig, context);
@@ -390,7 +390,7 @@ const serializeAws_restXmlCreatePublicKeyCommand = async (input, context) => {
390
390
  const headers = {
391
391
  "content-type": "application/xml",
392
392
  };
393
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key";
393
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key";
394
394
  let body;
395
395
  if (input.PublicKeyConfig !== undefined) {
396
396
  body = serializeAws_restXmlPublicKeyConfig(input.PublicKeyConfig, context);
@@ -418,7 +418,7 @@ const serializeAws_restXmlCreateRealtimeLogConfigCommand = async (input, context
418
418
  const headers = {
419
419
  "content-type": "application/xml",
420
420
  };
421
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
421
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
422
422
  let body;
423
423
  body = '<?xml version="1.0" encoding="UTF-8"?>';
424
424
  const bodyNode = new xml_builder_1.XmlNode("CreateRealtimeLogConfigRequest");
@@ -464,7 +464,7 @@ const serializeAws_restXmlCreateResponseHeadersPolicyCommand = async (input, con
464
464
  const headers = {
465
465
  "content-type": "application/xml",
466
466
  };
467
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy";
467
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy";
468
468
  let body;
469
469
  if (input.ResponseHeadersPolicyConfig !== undefined) {
470
470
  body = serializeAws_restXmlResponseHeadersPolicyConfig(input.ResponseHeadersPolicyConfig, context);
@@ -492,7 +492,7 @@ const serializeAws_restXmlCreateStreamingDistributionCommand = async (input, con
492
492
  const headers = {
493
493
  "content-type": "application/xml",
494
494
  };
495
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
495
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
496
496
  let body;
497
497
  if (input.StreamingDistributionConfig !== undefined) {
498
498
  body = serializeAws_restXmlStreamingDistributionConfig(input.StreamingDistributionConfig, context);
@@ -520,7 +520,7 @@ const serializeAws_restXmlCreateStreamingDistributionWithTagsCommand = async (in
520
520
  const headers = {
521
521
  "content-type": "application/xml",
522
522
  };
523
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
523
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
524
524
  const query = map({
525
525
  WithTags: [, ""],
526
526
  });
@@ -552,7 +552,7 @@ const serializeAws_restXmlDeleteCachePolicyCommand = async (input, context) => {
552
552
  const headers = map({}, isSerializableHeaderValue, {
553
553
  "if-match": input.IfMatch,
554
554
  });
555
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
555
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
556
556
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
557
557
  let body;
558
558
  return new protocol_http_1.HttpRequest({
@@ -571,7 +571,7 @@ const serializeAws_restXmlDeleteCloudFrontOriginAccessIdentityCommand = async (i
571
571
  const headers = map({}, isSerializableHeaderValue, {
572
572
  "if-match": input.IfMatch,
573
573
  });
574
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
574
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
575
575
  "/2020-05-31/origin-access-identity/cloudfront/{Id}";
576
576
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
577
577
  let body;
@@ -591,7 +591,7 @@ const serializeAws_restXmlDeleteDistributionCommand = async (input, context) =>
591
591
  const headers = map({}, isSerializableHeaderValue, {
592
592
  "if-match": input.IfMatch,
593
593
  });
594
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}";
594
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}";
595
595
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
596
596
  let body;
597
597
  return new protocol_http_1.HttpRequest({
@@ -610,7 +610,7 @@ const serializeAws_restXmlDeleteFieldLevelEncryptionConfigCommand = async (input
610
610
  const headers = map({}, isSerializableHeaderValue, {
611
611
  "if-match": input.IfMatch,
612
612
  });
613
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption/{Id}";
613
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption/{Id}";
614
614
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
615
615
  let body;
616
616
  return new protocol_http_1.HttpRequest({
@@ -629,7 +629,7 @@ const serializeAws_restXmlDeleteFieldLevelEncryptionProfileCommand = async (inpu
629
629
  const headers = map({}, isSerializableHeaderValue, {
630
630
  "if-match": input.IfMatch,
631
631
  });
632
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
632
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
633
633
  "/2020-05-31/field-level-encryption-profile/{Id}";
634
634
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
635
635
  let body;
@@ -649,7 +649,7 @@ const serializeAws_restXmlDeleteFunctionCommand = async (input, context) => {
649
649
  const headers = map({}, isSerializableHeaderValue, {
650
650
  "if-match": input.IfMatch,
651
651
  });
652
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
652
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
653
653
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
654
654
  let body;
655
655
  return new protocol_http_1.HttpRequest({
@@ -668,7 +668,7 @@ const serializeAws_restXmlDeleteKeyGroupCommand = async (input, context) => {
668
668
  const headers = map({}, isSerializableHeaderValue, {
669
669
  "if-match": input.IfMatch,
670
670
  });
671
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
671
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
672
672
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
673
673
  let body;
674
674
  return new protocol_http_1.HttpRequest({
@@ -685,7 +685,7 @@ exports.serializeAws_restXmlDeleteKeyGroupCommand = serializeAws_restXmlDeleteKe
685
685
  const serializeAws_restXmlDeleteMonitoringSubscriptionCommand = async (input, context) => {
686
686
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
687
687
  const headers = {};
688
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
688
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
689
689
  "/2020-05-31/distributions/{DistributionId}/monitoring-subscription";
690
690
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
691
691
  let body;
@@ -705,7 +705,7 @@ const serializeAws_restXmlDeleteOriginAccessControlCommand = async (input, conte
705
705
  const headers = map({}, isSerializableHeaderValue, {
706
706
  "if-match": input.IfMatch,
707
707
  });
708
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control/{Id}";
708
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control/{Id}";
709
709
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
710
710
  let body;
711
711
  return new protocol_http_1.HttpRequest({
@@ -724,7 +724,7 @@ const serializeAws_restXmlDeleteOriginRequestPolicyCommand = async (input, conte
724
724
  const headers = map({}, isSerializableHeaderValue, {
725
725
  "if-match": input.IfMatch,
726
726
  });
727
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
727
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
728
728
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
729
729
  let body;
730
730
  return new protocol_http_1.HttpRequest({
@@ -743,7 +743,7 @@ const serializeAws_restXmlDeletePublicKeyCommand = async (input, context) => {
743
743
  const headers = map({}, isSerializableHeaderValue, {
744
744
  "if-match": input.IfMatch,
745
745
  });
746
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}";
746
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}";
747
747
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
748
748
  let body;
749
749
  return new protocol_http_1.HttpRequest({
@@ -762,7 +762,7 @@ const serializeAws_restXmlDeleteRealtimeLogConfigCommand = async (input, context
762
762
  const headers = {
763
763
  "content-type": "application/xml",
764
764
  };
765
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/delete-realtime-log-config";
765
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/delete-realtime-log-config";
766
766
  let body;
767
767
  body = '<?xml version="1.0" encoding="UTF-8"?>';
768
768
  const bodyNode = new xml_builder_1.XmlNode("DeleteRealtimeLogConfigRequest");
@@ -792,7 +792,7 @@ const serializeAws_restXmlDeleteResponseHeadersPolicyCommand = async (input, con
792
792
  const headers = map({}, isSerializableHeaderValue, {
793
793
  "if-match": input.IfMatch,
794
794
  });
795
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
795
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
796
796
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
797
797
  let body;
798
798
  return new protocol_http_1.HttpRequest({
@@ -811,7 +811,7 @@ const serializeAws_restXmlDeleteStreamingDistributionCommand = async (input, con
811
811
  const headers = map({}, isSerializableHeaderValue, {
812
812
  "if-match": input.IfMatch,
813
813
  });
814
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution/{Id}";
814
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution/{Id}";
815
815
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
816
816
  let body;
817
817
  return new protocol_http_1.HttpRequest({
@@ -828,7 +828,7 @@ exports.serializeAws_restXmlDeleteStreamingDistributionCommand = serializeAws_re
828
828
  const serializeAws_restXmlDescribeFunctionCommand = async (input, context) => {
829
829
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
830
830
  const headers = {};
831
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/describe";
831
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/describe";
832
832
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
833
833
  const query = map({
834
834
  Stage: [, input.Stage],
@@ -849,7 +849,7 @@ exports.serializeAws_restXmlDescribeFunctionCommand = serializeAws_restXmlDescri
849
849
  const serializeAws_restXmlGetCachePolicyCommand = async (input, context) => {
850
850
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
851
851
  const headers = {};
852
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
852
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
853
853
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
854
854
  let body;
855
855
  return new protocol_http_1.HttpRequest({
@@ -866,7 +866,7 @@ exports.serializeAws_restXmlGetCachePolicyCommand = serializeAws_restXmlGetCache
866
866
  const serializeAws_restXmlGetCachePolicyConfigCommand = async (input, context) => {
867
867
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
868
868
  const headers = {};
869
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}/config";
869
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}/config";
870
870
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
871
871
  let body;
872
872
  return new protocol_http_1.HttpRequest({
@@ -883,7 +883,7 @@ exports.serializeAws_restXmlGetCachePolicyConfigCommand = serializeAws_restXmlGe
883
883
  const serializeAws_restXmlGetCloudFrontOriginAccessIdentityCommand = async (input, context) => {
884
884
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
885
885
  const headers = {};
886
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
886
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
887
887
  "/2020-05-31/origin-access-identity/cloudfront/{Id}";
888
888
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
889
889
  let body;
@@ -901,7 +901,7 @@ exports.serializeAws_restXmlGetCloudFrontOriginAccessIdentityCommand = serialize
901
901
  const serializeAws_restXmlGetCloudFrontOriginAccessIdentityConfigCommand = async (input, context) => {
902
902
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
903
903
  const headers = {};
904
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
904
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
905
905
  "/2020-05-31/origin-access-identity/cloudfront/{Id}/config";
906
906
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
907
907
  let body;
@@ -919,7 +919,7 @@ exports.serializeAws_restXmlGetCloudFrontOriginAccessIdentityConfigCommand = ser
919
919
  const serializeAws_restXmlGetDistributionCommand = async (input, context) => {
920
920
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
921
921
  const headers = {};
922
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}";
922
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}";
923
923
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
924
924
  let body;
925
925
  return new protocol_http_1.HttpRequest({
@@ -936,7 +936,7 @@ exports.serializeAws_restXmlGetDistributionCommand = serializeAws_restXmlGetDist
936
936
  const serializeAws_restXmlGetDistributionConfigCommand = async (input, context) => {
937
937
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
938
938
  const headers = {};
939
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}/config";
939
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}/config";
940
940
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
941
941
  let body;
942
942
  return new protocol_http_1.HttpRequest({
@@ -953,7 +953,7 @@ exports.serializeAws_restXmlGetDistributionConfigCommand = serializeAws_restXmlG
953
953
  const serializeAws_restXmlGetFieldLevelEncryptionCommand = async (input, context) => {
954
954
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
955
955
  const headers = {};
956
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption/{Id}";
956
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption/{Id}";
957
957
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
958
958
  let body;
959
959
  return new protocol_http_1.HttpRequest({
@@ -970,7 +970,7 @@ exports.serializeAws_restXmlGetFieldLevelEncryptionCommand = serializeAws_restXm
970
970
  const serializeAws_restXmlGetFieldLevelEncryptionConfigCommand = async (input, context) => {
971
971
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
972
972
  const headers = {};
973
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
973
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
974
974
  "/2020-05-31/field-level-encryption/{Id}/config";
975
975
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
976
976
  let body;
@@ -988,7 +988,7 @@ exports.serializeAws_restXmlGetFieldLevelEncryptionConfigCommand = serializeAws_
988
988
  const serializeAws_restXmlGetFieldLevelEncryptionProfileCommand = 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
  "/2020-05-31/field-level-encryption-profile/{Id}";
993
993
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
994
994
  let body;
@@ -1006,7 +1006,7 @@ exports.serializeAws_restXmlGetFieldLevelEncryptionProfileCommand = serializeAws
1006
1006
  const serializeAws_restXmlGetFieldLevelEncryptionProfileConfigCommand = async (input, context) => {
1007
1007
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1008
1008
  const headers = {};
1009
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1009
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1010
1010
  "/2020-05-31/field-level-encryption-profile/{Id}/config";
1011
1011
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1012
1012
  let body;
@@ -1024,7 +1024,7 @@ exports.serializeAws_restXmlGetFieldLevelEncryptionProfileConfigCommand = serial
1024
1024
  const serializeAws_restXmlGetFunctionCommand = async (input, context) => {
1025
1025
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1026
1026
  const headers = {};
1027
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
1027
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
1028
1028
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
1029
1029
  const query = map({
1030
1030
  Stage: [, input.Stage],
@@ -1045,7 +1045,7 @@ exports.serializeAws_restXmlGetFunctionCommand = serializeAws_restXmlGetFunction
1045
1045
  const serializeAws_restXmlGetInvalidationCommand = async (input, context) => {
1046
1046
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1047
1047
  const headers = {};
1048
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1048
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1049
1049
  "/2020-05-31/distribution/{DistributionId}/invalidation/{Id}";
1050
1050
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
1051
1051
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
@@ -1064,7 +1064,7 @@ exports.serializeAws_restXmlGetInvalidationCommand = serializeAws_restXmlGetInva
1064
1064
  const serializeAws_restXmlGetKeyGroupCommand = async (input, context) => {
1065
1065
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1066
1066
  const headers = {};
1067
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
1067
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
1068
1068
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1069
1069
  let body;
1070
1070
  return new protocol_http_1.HttpRequest({
@@ -1081,7 +1081,7 @@ exports.serializeAws_restXmlGetKeyGroupCommand = serializeAws_restXmlGetKeyGroup
1081
1081
  const serializeAws_restXmlGetKeyGroupConfigCommand = async (input, context) => {
1082
1082
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1083
1083
  const headers = {};
1084
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}/config";
1084
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}/config";
1085
1085
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1086
1086
  let body;
1087
1087
  return new protocol_http_1.HttpRequest({
@@ -1098,7 +1098,7 @@ exports.serializeAws_restXmlGetKeyGroupConfigCommand = serializeAws_restXmlGetKe
1098
1098
  const serializeAws_restXmlGetMonitoringSubscriptionCommand = async (input, context) => {
1099
1099
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1100
1100
  const headers = {};
1101
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1101
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1102
1102
  "/2020-05-31/distributions/{DistributionId}/monitoring-subscription";
1103
1103
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
1104
1104
  let body;
@@ -1116,7 +1116,7 @@ exports.serializeAws_restXmlGetMonitoringSubscriptionCommand = serializeAws_rest
1116
1116
  const serializeAws_restXmlGetOriginAccessControlCommand = async (input, context) => {
1117
1117
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1118
1118
  const headers = {};
1119
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control/{Id}";
1119
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control/{Id}";
1120
1120
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1121
1121
  let body;
1122
1122
  return new protocol_http_1.HttpRequest({
@@ -1133,7 +1133,7 @@ exports.serializeAws_restXmlGetOriginAccessControlCommand = serializeAws_restXml
1133
1133
  const serializeAws_restXmlGetOriginAccessControlConfigCommand = async (input, context) => {
1134
1134
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1135
1135
  const headers = {};
1136
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1136
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1137
1137
  "/2020-05-31/origin-access-control/{Id}/config";
1138
1138
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1139
1139
  let body;
@@ -1151,7 +1151,7 @@ exports.serializeAws_restXmlGetOriginAccessControlConfigCommand = serializeAws_r
1151
1151
  const serializeAws_restXmlGetOriginRequestPolicyCommand = async (input, context) => {
1152
1152
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1153
1153
  const headers = {};
1154
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
1154
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
1155
1155
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1156
1156
  let body;
1157
1157
  return new protocol_http_1.HttpRequest({
@@ -1168,7 +1168,7 @@ exports.serializeAws_restXmlGetOriginRequestPolicyCommand = serializeAws_restXml
1168
1168
  const serializeAws_restXmlGetOriginRequestPolicyConfigCommand = async (input, context) => {
1169
1169
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1170
1170
  const headers = {};
1171
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1171
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1172
1172
  "/2020-05-31/origin-request-policy/{Id}/config";
1173
1173
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1174
1174
  let body;
@@ -1186,7 +1186,7 @@ exports.serializeAws_restXmlGetOriginRequestPolicyConfigCommand = serializeAws_r
1186
1186
  const serializeAws_restXmlGetPublicKeyCommand = async (input, context) => {
1187
1187
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1188
1188
  const headers = {};
1189
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}";
1189
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}";
1190
1190
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1191
1191
  let body;
1192
1192
  return new protocol_http_1.HttpRequest({
@@ -1203,7 +1203,7 @@ exports.serializeAws_restXmlGetPublicKeyCommand = serializeAws_restXmlGetPublicK
1203
1203
  const serializeAws_restXmlGetPublicKeyConfigCommand = async (input, context) => {
1204
1204
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1205
1205
  const headers = {};
1206
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}/config";
1206
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}/config";
1207
1207
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1208
1208
  let body;
1209
1209
  return new protocol_http_1.HttpRequest({
@@ -1222,7 +1222,7 @@ const serializeAws_restXmlGetRealtimeLogConfigCommand = async (input, context) =
1222
1222
  const headers = {
1223
1223
  "content-type": "application/xml",
1224
1224
  };
1225
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/get-realtime-log-config";
1225
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/get-realtime-log-config";
1226
1226
  let body;
1227
1227
  body = '<?xml version="1.0" encoding="UTF-8"?>';
1228
1228
  const bodyNode = new xml_builder_1.XmlNode("GetRealtimeLogConfigRequest");
@@ -1250,7 +1250,7 @@ exports.serializeAws_restXmlGetRealtimeLogConfigCommand = serializeAws_restXmlGe
1250
1250
  const serializeAws_restXmlGetResponseHeadersPolicyCommand = async (input, context) => {
1251
1251
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1252
1252
  const headers = {};
1253
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
1253
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
1254
1254
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1255
1255
  let body;
1256
1256
  return new protocol_http_1.HttpRequest({
@@ -1267,7 +1267,7 @@ exports.serializeAws_restXmlGetResponseHeadersPolicyCommand = serializeAws_restX
1267
1267
  const serializeAws_restXmlGetResponseHeadersPolicyConfigCommand = async (input, context) => {
1268
1268
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1269
1269
  const headers = {};
1270
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1270
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1271
1271
  "/2020-05-31/response-headers-policy/{Id}/config";
1272
1272
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1273
1273
  let body;
@@ -1285,7 +1285,7 @@ exports.serializeAws_restXmlGetResponseHeadersPolicyConfigCommand = serializeAws
1285
1285
  const serializeAws_restXmlGetStreamingDistributionCommand = async (input, context) => {
1286
1286
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1287
1287
  const headers = {};
1288
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution/{Id}";
1288
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution/{Id}";
1289
1289
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1290
1290
  let body;
1291
1291
  return new protocol_http_1.HttpRequest({
@@ -1302,7 +1302,7 @@ exports.serializeAws_restXmlGetStreamingDistributionCommand = serializeAws_restX
1302
1302
  const serializeAws_restXmlGetStreamingDistributionConfigCommand = async (input, context) => {
1303
1303
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1304
1304
  const headers = {};
1305
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1305
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1306
1306
  "/2020-05-31/streaming-distribution/{Id}/config";
1307
1307
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1308
1308
  let body;
@@ -1320,7 +1320,7 @@ exports.serializeAws_restXmlGetStreamingDistributionConfigCommand = serializeAws
1320
1320
  const serializeAws_restXmlListCachePoliciesCommand = async (input, context) => {
1321
1321
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1322
1322
  const headers = {};
1323
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy";
1323
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy";
1324
1324
  const query = map({
1325
1325
  Type: [, input.Type],
1326
1326
  Marker: [, input.Marker],
@@ -1342,7 +1342,7 @@ exports.serializeAws_restXmlListCachePoliciesCommand = serializeAws_restXmlListC
1342
1342
  const serializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommand = async (input, context) => {
1343
1343
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1344
1344
  const headers = {};
1345
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1345
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1346
1346
  "/2020-05-31/origin-access-identity/cloudfront";
1347
1347
  const query = map({
1348
1348
  Marker: [, input.Marker],
@@ -1364,7 +1364,7 @@ exports.serializeAws_restXmlListCloudFrontOriginAccessIdentitiesCommand = serial
1364
1364
  const serializeAws_restXmlListConflictingAliasesCommand = async (input, context) => {
1365
1365
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1366
1366
  const headers = {};
1367
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/conflicting-alias";
1367
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/conflicting-alias";
1368
1368
  const query = map({
1369
1369
  DistributionId: [, input.DistributionId],
1370
1370
  Alias: [, input.Alias],
@@ -1387,7 +1387,7 @@ exports.serializeAws_restXmlListConflictingAliasesCommand = serializeAws_restXml
1387
1387
  const serializeAws_restXmlListDistributionsCommand = async (input, context) => {
1388
1388
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1389
1389
  const headers = {};
1390
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
1390
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution";
1391
1391
  const query = map({
1392
1392
  Marker: [, input.Marker],
1393
1393
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1408,7 +1408,7 @@ exports.serializeAws_restXmlListDistributionsCommand = serializeAws_restXmlListD
1408
1408
  const serializeAws_restXmlListDistributionsByCachePolicyIdCommand = async (input, context) => {
1409
1409
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1410
1410
  const headers = {};
1411
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1411
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1412
1412
  "/2020-05-31/distributionsByCachePolicyId/{CachePolicyId}";
1413
1413
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "CachePolicyId", () => input.CachePolicyId, "{CachePolicyId}", false);
1414
1414
  const query = map({
@@ -1431,7 +1431,7 @@ exports.serializeAws_restXmlListDistributionsByCachePolicyIdCommand = serializeA
1431
1431
  const serializeAws_restXmlListDistributionsByKeyGroupCommand = 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
  "/2020-05-31/distributionsByKeyGroupId/{KeyGroupId}";
1436
1436
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "KeyGroupId", () => input.KeyGroupId, "{KeyGroupId}", false);
1437
1437
  const query = map({
@@ -1454,7 +1454,7 @@ exports.serializeAws_restXmlListDistributionsByKeyGroupCommand = serializeAws_re
1454
1454
  const serializeAws_restXmlListDistributionsByOriginRequestPolicyIdCommand = async (input, context) => {
1455
1455
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1456
1456
  const headers = {};
1457
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1457
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1458
1458
  "/2020-05-31/distributionsByOriginRequestPolicyId/{OriginRequestPolicyId}";
1459
1459
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "OriginRequestPolicyId", () => input.OriginRequestPolicyId, "{OriginRequestPolicyId}", false);
1460
1460
  const query = map({
@@ -1479,7 +1479,7 @@ const serializeAws_restXmlListDistributionsByRealtimeLogConfigCommand = async (i
1479
1479
  const headers = {
1480
1480
  "content-type": "application/xml",
1481
1481
  };
1482
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1482
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1483
1483
  "/2020-05-31/distributionsByRealtimeLogConfig";
1484
1484
  let body;
1485
1485
  body = '<?xml version="1.0" encoding="UTF-8"?>';
@@ -1516,7 +1516,7 @@ exports.serializeAws_restXmlListDistributionsByRealtimeLogConfigCommand = serial
1516
1516
  const serializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand = async (input, context) => {
1517
1517
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1518
1518
  const headers = {};
1519
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1519
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1520
1520
  "/2020-05-31/distributionsByResponseHeadersPolicyId/{ResponseHeadersPolicyId}";
1521
1521
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ResponseHeadersPolicyId", () => input.ResponseHeadersPolicyId, "{ResponseHeadersPolicyId}", false);
1522
1522
  const query = map({
@@ -1539,7 +1539,7 @@ exports.serializeAws_restXmlListDistributionsByResponseHeadersPolicyIdCommand =
1539
1539
  const serializeAws_restXmlListDistributionsByWebACLIdCommand = async (input, context) => {
1540
1540
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1541
1541
  const headers = {};
1542
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1542
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1543
1543
  "/2020-05-31/distributionsByWebACLId/{WebACLId}";
1544
1544
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WebACLId", () => input.WebACLId, "{WebACLId}", false);
1545
1545
  const query = map({
@@ -1562,7 +1562,7 @@ exports.serializeAws_restXmlListDistributionsByWebACLIdCommand = serializeAws_re
1562
1562
  const serializeAws_restXmlListFieldLevelEncryptionConfigsCommand = async (input, context) => {
1563
1563
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1564
1564
  const headers = {};
1565
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption";
1565
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/field-level-encryption";
1566
1566
  const query = map({
1567
1567
  Marker: [, input.Marker],
1568
1568
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1583,7 +1583,7 @@ exports.serializeAws_restXmlListFieldLevelEncryptionConfigsCommand = serializeAw
1583
1583
  const serializeAws_restXmlListFieldLevelEncryptionProfilesCommand = async (input, context) => {
1584
1584
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1585
1585
  const headers = {};
1586
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1586
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1587
1587
  "/2020-05-31/field-level-encryption-profile";
1588
1588
  const query = map({
1589
1589
  Marker: [, input.Marker],
@@ -1605,7 +1605,7 @@ exports.serializeAws_restXmlListFieldLevelEncryptionProfilesCommand = serializeA
1605
1605
  const serializeAws_restXmlListFunctionsCommand = async (input, context) => {
1606
1606
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1607
1607
  const headers = {};
1608
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function";
1608
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function";
1609
1609
  const query = map({
1610
1610
  Marker: [, input.Marker],
1611
1611
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1627,7 +1627,7 @@ exports.serializeAws_restXmlListFunctionsCommand = serializeAws_restXmlListFunct
1627
1627
  const serializeAws_restXmlListInvalidationsCommand = async (input, context) => {
1628
1628
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1629
1629
  const headers = {};
1630
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1630
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1631
1631
  "/2020-05-31/distribution/{DistributionId}/invalidation";
1632
1632
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DistributionId", () => input.DistributionId, "{DistributionId}", false);
1633
1633
  const query = map({
@@ -1650,7 +1650,7 @@ exports.serializeAws_restXmlListInvalidationsCommand = serializeAws_restXmlListI
1650
1650
  const serializeAws_restXmlListKeyGroupsCommand = async (input, context) => {
1651
1651
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1652
1652
  const headers = {};
1653
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group";
1653
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group";
1654
1654
  const query = map({
1655
1655
  Marker: [, input.Marker],
1656
1656
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1671,7 +1671,7 @@ exports.serializeAws_restXmlListKeyGroupsCommand = serializeAws_restXmlListKeyGr
1671
1671
  const serializeAws_restXmlListOriginAccessControlsCommand = async (input, context) => {
1672
1672
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1673
1673
  const headers = {};
1674
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control";
1674
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-access-control";
1675
1675
  const query = map({
1676
1676
  Marker: [, input.Marker],
1677
1677
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1692,7 +1692,7 @@ exports.serializeAws_restXmlListOriginAccessControlsCommand = serializeAws_restX
1692
1692
  const serializeAws_restXmlListOriginRequestPoliciesCommand = async (input, context) => {
1693
1693
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1694
1694
  const headers = {};
1695
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy";
1695
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy";
1696
1696
  const query = map({
1697
1697
  Type: [, input.Type],
1698
1698
  Marker: [, input.Marker],
@@ -1714,7 +1714,7 @@ exports.serializeAws_restXmlListOriginRequestPoliciesCommand = serializeAws_rest
1714
1714
  const serializeAws_restXmlListPublicKeysCommand = async (input, context) => {
1715
1715
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1716
1716
  const headers = {};
1717
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key";
1717
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key";
1718
1718
  const query = map({
1719
1719
  Marker: [, input.Marker],
1720
1720
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1735,7 +1735,7 @@ exports.serializeAws_restXmlListPublicKeysCommand = serializeAws_restXmlListPubl
1735
1735
  const serializeAws_restXmlListRealtimeLogConfigsCommand = async (input, context) => {
1736
1736
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1737
1737
  const headers = {};
1738
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
1738
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
1739
1739
  const query = map({
1740
1740
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
1741
1741
  Marker: [, input.Marker],
@@ -1756,7 +1756,7 @@ exports.serializeAws_restXmlListRealtimeLogConfigsCommand = serializeAws_restXml
1756
1756
  const serializeAws_restXmlListResponseHeadersPoliciesCommand = async (input, context) => {
1757
1757
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1758
1758
  const headers = {};
1759
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy";
1759
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy";
1760
1760
  const query = map({
1761
1761
  Type: [, input.Type],
1762
1762
  Marker: [, input.Marker],
@@ -1778,7 +1778,7 @@ exports.serializeAws_restXmlListResponseHeadersPoliciesCommand = serializeAws_re
1778
1778
  const serializeAws_restXmlListStreamingDistributionsCommand = async (input, context) => {
1779
1779
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1780
1780
  const headers = {};
1781
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
1781
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/streaming-distribution";
1782
1782
  const query = map({
1783
1783
  Marker: [, input.Marker],
1784
1784
  MaxItems: [() => input.MaxItems !== void 0, () => input.MaxItems.toString()],
@@ -1799,7 +1799,7 @@ exports.serializeAws_restXmlListStreamingDistributionsCommand = serializeAws_res
1799
1799
  const serializeAws_restXmlListTagsForResourceCommand = async (input, context) => {
1800
1800
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1801
1801
  const headers = {};
1802
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1802
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1803
1803
  const query = map({
1804
1804
  Resource: [, input.Resource],
1805
1805
  });
@@ -1821,7 +1821,7 @@ const serializeAws_restXmlPublishFunctionCommand = async (input, context) => {
1821
1821
  const headers = map({}, isSerializableHeaderValue, {
1822
1822
  "if-match": input.IfMatch,
1823
1823
  });
1824
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/publish";
1824
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/publish";
1825
1825
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
1826
1826
  let body;
1827
1827
  return new protocol_http_1.HttpRequest({
@@ -1840,7 +1840,7 @@ const serializeAws_restXmlTagResourceCommand = async (input, context) => {
1840
1840
  const headers = {
1841
1841
  "content-type": "application/xml",
1842
1842
  };
1843
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1843
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1844
1844
  const query = map({
1845
1845
  Operation: [, "Tag"],
1846
1846
  Resource: [, input.Resource],
@@ -1874,7 +1874,7 @@ const serializeAws_restXmlTestFunctionCommand = async (input, context) => {
1874
1874
  "content-type": "application/xml",
1875
1875
  "if-match": input.IfMatch,
1876
1876
  });
1877
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/test";
1877
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}/test";
1878
1878
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
1879
1879
  let body;
1880
1880
  body = '<?xml version="1.0" encoding="UTF-8"?>';
@@ -1905,7 +1905,7 @@ const serializeAws_restXmlUntagResourceCommand = async (input, context) => {
1905
1905
  const headers = {
1906
1906
  "content-type": "application/xml",
1907
1907
  };
1908
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1908
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/tagging";
1909
1909
  const query = map({
1910
1910
  Operation: [, "Untag"],
1911
1911
  Resource: [, input.Resource],
@@ -1939,7 +1939,7 @@ const serializeAws_restXmlUpdateCachePolicyCommand = async (input, context) => {
1939
1939
  "content-type": "application/xml",
1940
1940
  "if-match": input.IfMatch,
1941
1941
  });
1942
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
1942
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/cache-policy/{Id}";
1943
1943
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1944
1944
  let body;
1945
1945
  if (input.CachePolicyConfig !== undefined) {
@@ -1969,7 +1969,7 @@ const serializeAws_restXmlUpdateCloudFrontOriginAccessIdentityCommand = async (i
1969
1969
  "content-type": "application/xml",
1970
1970
  "if-match": input.IfMatch,
1971
1971
  });
1972
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1972
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1973
1973
  "/2020-05-31/origin-access-identity/cloudfront/{Id}/config";
1974
1974
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
1975
1975
  let body;
@@ -2000,7 +2000,7 @@ const serializeAws_restXmlUpdateDistributionCommand = async (input, context) =>
2000
2000
  "content-type": "application/xml",
2001
2001
  "if-match": input.IfMatch,
2002
2002
  });
2003
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}/config";
2003
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/distribution/{Id}/config";
2004
2004
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2005
2005
  let body;
2006
2006
  if (input.DistributionConfig !== undefined) {
@@ -2030,7 +2030,7 @@ const serializeAws_restXmlUpdateFieldLevelEncryptionConfigCommand = async (input
2030
2030
  "content-type": "application/xml",
2031
2031
  "if-match": input.IfMatch,
2032
2032
  });
2033
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2033
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2034
2034
  "/2020-05-31/field-level-encryption/{Id}/config";
2035
2035
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2036
2036
  let body;
@@ -2061,7 +2061,7 @@ const serializeAws_restXmlUpdateFieldLevelEncryptionProfileCommand = async (inpu
2061
2061
  "content-type": "application/xml",
2062
2062
  "if-match": input.IfMatch,
2063
2063
  });
2064
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2064
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2065
2065
  "/2020-05-31/field-level-encryption-profile/{Id}/config";
2066
2066
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2067
2067
  let body;
@@ -2092,7 +2092,7 @@ const serializeAws_restXmlUpdateFunctionCommand = async (input, context) => {
2092
2092
  "content-type": "application/xml",
2093
2093
  "if-match": input.IfMatch,
2094
2094
  });
2095
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
2095
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/function/{Name}";
2096
2096
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
2097
2097
  let body;
2098
2098
  body = '<?xml version="1.0" encoding="UTF-8"?>';
@@ -2124,7 +2124,7 @@ const serializeAws_restXmlUpdateKeyGroupCommand = async (input, context) => {
2124
2124
  "content-type": "application/xml",
2125
2125
  "if-match": input.IfMatch,
2126
2126
  });
2127
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
2127
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/key-group/{Id}";
2128
2128
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2129
2129
  let body;
2130
2130
  if (input.KeyGroupConfig !== undefined) {
@@ -2154,7 +2154,7 @@ const serializeAws_restXmlUpdateOriginAccessControlCommand = async (input, conte
2154
2154
  "content-type": "application/xml",
2155
2155
  "if-match": input.IfMatch,
2156
2156
  });
2157
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2157
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2158
2158
  "/2020-05-31/origin-access-control/{Id}/config";
2159
2159
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2160
2160
  let body;
@@ -2185,7 +2185,7 @@ const serializeAws_restXmlUpdateOriginRequestPolicyCommand = async (input, conte
2185
2185
  "content-type": "application/xml",
2186
2186
  "if-match": input.IfMatch,
2187
2187
  });
2188
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
2188
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/origin-request-policy/{Id}";
2189
2189
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2190
2190
  let body;
2191
2191
  if (input.OriginRequestPolicyConfig !== undefined) {
@@ -2215,7 +2215,7 @@ const serializeAws_restXmlUpdatePublicKeyCommand = async (input, context) => {
2215
2215
  "content-type": "application/xml",
2216
2216
  "if-match": input.IfMatch,
2217
2217
  });
2218
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}/config";
2218
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/public-key/{Id}/config";
2219
2219
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2220
2220
  let body;
2221
2221
  if (input.PublicKeyConfig !== undefined) {
@@ -2244,7 +2244,7 @@ const serializeAws_restXmlUpdateRealtimeLogConfigCommand = async (input, context
2244
2244
  const headers = {
2245
2245
  "content-type": "application/xml",
2246
2246
  };
2247
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
2247
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/realtime-log-config";
2248
2248
  let body;
2249
2249
  body = '<?xml version="1.0" encoding="UTF-8"?>';
2250
2250
  const bodyNode = new xml_builder_1.XmlNode("UpdateRealtimeLogConfigRequest");
@@ -2295,7 +2295,7 @@ const serializeAws_restXmlUpdateResponseHeadersPolicyCommand = async (input, con
2295
2295
  "content-type": "application/xml",
2296
2296
  "if-match": input.IfMatch,
2297
2297
  });
2298
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
2298
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/2020-05-31/response-headers-policy/{Id}";
2299
2299
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2300
2300
  let body;
2301
2301
  if (input.ResponseHeadersPolicyConfig !== undefined) {
@@ -2325,7 +2325,7 @@ const serializeAws_restXmlUpdateStreamingDistributionCommand = async (input, con
2325
2325
  "content-type": "application/xml",
2326
2326
  "if-match": input.IfMatch,
2327
2327
  });
2328
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
2328
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
2329
2329
  "/2020-05-31/streaming-distribution/{Id}/config";
2330
2330
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Id", () => input.Id, "{Id}", false);
2331
2331
  let body;
@@ -14026,15 +14026,12 @@ const deserializeAws_restXmlViewerCertificate = (output, context) => {
14026
14026
  }
14027
14027
  return contents;
14028
14028
  };
14029
- const deserializeMetadata = (output) => {
14030
- var _a, _b;
14031
- return ({
14032
- httpStatusCode: output.statusCode,
14033
- 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"],
14034
- extendedRequestId: output.headers["x-amz-id-2"],
14035
- cfId: output.headers["x-amz-cf-id"],
14036
- });
14037
- };
14029
+ const deserializeMetadata = (output) => ({
14030
+ httpStatusCode: output.statusCode,
14031
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
14032
+ extendedRequestId: output.headers["x-amz-id-2"],
14033
+ cfId: output.headers["x-amz-cf-id"],
14034
+ });
14038
14035
  const collectBody = (streamBody = new Uint8Array(), context) => {
14039
14036
  if (streamBody instanceof Uint8Array) {
14040
14037
  return Promise.resolve(streamBody);
@@ -14073,10 +14070,9 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
14073
14070
  return {};
14074
14071
  });
14075
14072
  const parseErrorBody = async (errorBody, context) => {
14076
- var _a;
14077
14073
  const value = await parseBody(errorBody, context);
14078
14074
  if (value.Error) {
14079
- value.Error.message = (_a = value.Error.message) !== null && _a !== void 0 ? _a : value.Error.Message;
14075
+ value.Error.message = value.Error.message ?? value.Error.Message;
14080
14076
  }
14081
14077
  return value;
14082
14078
  };
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
16
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
17
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
18
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
19
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
20
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
21
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
25
24
  ...config,
26
25
  runtime: "browser",
27
26
  defaultsMode,
28
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
29
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
30
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
31
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
32
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
38
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
39
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
42
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
27
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
38
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
42
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
43
43
  };
44
44
  };
45
45
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -19,7 +19,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
20
20
  const smithy_client_2 = require("@aws-sdk/smithy-client");
21
21
  const getRuntimeConfig = (config) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
22
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
24
23
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
25
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -29,24 +28,26 @@ const getRuntimeConfig = (config) => {
29
28
  ...config,
30
29
  runtime: "node",
31
30
  defaultsMode,
32
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
33
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
34
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
35
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
36
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)({
41
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
- default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
43
- }),
44
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
45
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
46
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
49
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
31
+ base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
32
+ base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
33
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
34
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
35
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
36
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
+ retryMode: config?.retryMode ??
41
+ (0, node_config_provider_1.loadConfig)({
42
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
43
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
44
+ }),
45
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
46
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
47
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
48
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
49
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
50
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
50
51
  };
51
52
  };
52
53
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -4,13 +4,12 @@ exports.getRuntimeConfig = void 0;
4
4
  const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
6
  const getRuntimeConfig = (config) => {
7
- var _a;
8
7
  const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
9
8
  return {
10
9
  ...browserDefaults,
11
10
  ...config,
12
11
  runtime: "react-native",
13
- sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
14
13
  };
15
14
  };
16
15
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
5
  const endpointResolver_1 = require("./endpoint/endpointResolver");
6
- const getRuntimeConfig = (config) => {
7
- var _a, _b, _c, _d, _e;
8
- return ({
9
- apiVersion: "2020-05-31",
10
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
11
- endpointProvider: (_b = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _b !== void 0 ? _b : endpointResolver_1.defaultEndpointResolver,
12
- logger: (_c = config === null || config === void 0 ? void 0 : config.logger) !== null && _c !== void 0 ? _c : {},
13
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "CloudFront",
14
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
15
- });
16
- };
6
+ const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2020-05-31",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "CloudFront",
12
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
13
+ });
17
14
  exports.getRuntimeConfig = getRuntimeConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudfront",
3
3
  "description": "AWS SDK for JavaScript Cloudfront Client for Node.js, Browser and React Native",
4
- "version": "3.199.0",
4
+ "version": "3.201.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,47 +19,47 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.199.0",
23
- "@aws-sdk/config-resolver": "3.198.0",
24
- "@aws-sdk/credential-provider-node": "3.199.0",
25
- "@aws-sdk/fetch-http-handler": "3.199.0",
26
- "@aws-sdk/hash-node": "3.198.0",
27
- "@aws-sdk/invalid-dependency": "3.198.0",
28
- "@aws-sdk/middleware-content-length": "3.199.0",
29
- "@aws-sdk/middleware-endpoint": "3.198.0",
30
- "@aws-sdk/middleware-host-header": "3.198.0",
31
- "@aws-sdk/middleware-logger": "3.198.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.198.0",
33
- "@aws-sdk/middleware-retry": "3.198.0",
34
- "@aws-sdk/middleware-serde": "3.198.0",
35
- "@aws-sdk/middleware-signing": "3.198.0",
36
- "@aws-sdk/middleware-stack": "3.198.0",
37
- "@aws-sdk/middleware-user-agent": "3.198.0",
38
- "@aws-sdk/node-config-provider": "3.198.0",
39
- "@aws-sdk/node-http-handler": "3.199.0",
40
- "@aws-sdk/protocol-http": "3.198.0",
41
- "@aws-sdk/smithy-client": "3.198.0",
42
- "@aws-sdk/types": "3.198.0",
43
- "@aws-sdk/url-parser": "3.198.0",
22
+ "@aws-sdk/client-sts": "3.201.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.201.0",
25
+ "@aws-sdk/fetch-http-handler": "3.201.0",
26
+ "@aws-sdk/hash-node": "3.201.0",
27
+ "@aws-sdk/invalid-dependency": "3.201.0",
28
+ "@aws-sdk/middleware-content-length": "3.201.0",
29
+ "@aws-sdk/middleware-endpoint": "3.201.0",
30
+ "@aws-sdk/middleware-host-header": "3.201.0",
31
+ "@aws-sdk/middleware-logger": "3.201.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
33
+ "@aws-sdk/middleware-retry": "3.201.0",
34
+ "@aws-sdk/middleware-serde": "3.201.0",
35
+ "@aws-sdk/middleware-signing": "3.201.0",
36
+ "@aws-sdk/middleware-stack": "3.201.0",
37
+ "@aws-sdk/middleware-user-agent": "3.201.0",
38
+ "@aws-sdk/node-config-provider": "3.201.0",
39
+ "@aws-sdk/node-http-handler": "3.201.0",
40
+ "@aws-sdk/protocol-http": "3.201.0",
41
+ "@aws-sdk/smithy-client": "3.201.0",
42
+ "@aws-sdk/types": "3.201.0",
43
+ "@aws-sdk/url-parser": "3.201.0",
44
44
  "@aws-sdk/util-base64-browser": "3.188.0",
45
- "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-base64-node": "3.201.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
- "@aws-sdk/util-body-length-node": "3.188.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.198.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.198.0",
50
- "@aws-sdk/util-endpoints": "3.198.0",
51
- "@aws-sdk/util-user-agent-browser": "3.198.0",
52
- "@aws-sdk/util-user-agent-node": "3.198.0",
47
+ "@aws-sdk/util-body-length-node": "3.201.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
50
+ "@aws-sdk/util-endpoints": "3.201.0",
51
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
52
+ "@aws-sdk/util-user-agent-node": "3.201.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.188.0",
54
- "@aws-sdk/util-utf8-node": "3.199.0",
55
- "@aws-sdk/util-waiter": "3.198.0",
56
- "@aws-sdk/xml-builder": "3.188.0",
54
+ "@aws-sdk/util-utf8-node": "3.201.0",
55
+ "@aws-sdk/util-waiter": "3.201.0",
56
+ "@aws-sdk/xml-builder": "3.201.0",
57
57
  "fast-xml-parser": "4.0.11",
58
58
  "tslib": "^2.3.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
62
- "@tsconfig/recommended": "1.0.1",
62
+ "@tsconfig/node14": "1.0.3",
63
63
  "@types/node": "^12.7.5",
64
64
  "concurrently": "7.0.0",
65
65
  "downlevel-dts": "0.10.1",
@@ -73,7 +73,7 @@
73
73
  }
74
74
  },
75
75
  "engines": {
76
- "node": ">=12.0.0"
76
+ "node": ">=14.0.0"
77
77
  },
78
78
  "typesVersions": {
79
79
  "<4.0": {