@aws-sdk/client-s3 3.100.0 → 3.109.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,39 @@
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.109.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.108.1...v3.109.0) (2022-06-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **s3:** update endpoints for writeGetObjectResponse for object lambda ([#3662](https://github.com/aws/aws-sdk-js-v3/issues/3662)) ([bb9f18e](https://github.com/aws/aws-sdk-js-v3/commit/bb9f18edb6226b65b146d81be3b91cb3581bc3b3))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.107.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.106.0...v3.107.0) (2022-06-08)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **clients:** handle empty xml tags ([#3623](https://github.com/aws/aws-sdk-js-v3/issues/3623)) ([543a0ce](https://github.com/aws/aws-sdk-js-v3/commit/543a0ce13bebc6e8a5f4cc8e1bd4de67692d4034))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.105.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.104.0...v3.105.0) (2022-06-06)
29
+
30
+
31
+ ### Features
32
+
33
+ * **clients:** support recursion detection in Lambda ([#3654](https://github.com/aws/aws-sdk-js-v3/issues/3654)) ([ecfe46e](https://github.com/aws/aws-sdk-js-v3/commit/ecfe46ea1fd8b6e3812b75b3dc6c03554fb4b3fa))
34
+
35
+
36
+
37
+
38
+
6
39
  # [3.100.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.99.0...v3.100.0) (2022-05-26)
7
40
 
8
41
  **Note:** Version bump only for package @aws-sdk/client-s3
@@ -8,6 +8,7 @@ const middleware_content_length_1 = require("@aws-sdk/middleware-content-length"
8
8
  const middleware_expect_continue_1 = require("@aws-sdk/middleware-expect-continue");
9
9
  const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
10
10
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
11
+ const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
11
12
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
12
13
  const middleware_sdk_s3_1 = require("@aws-sdk/middleware-sdk-s3");
13
14
  const middleware_signing_1 = require("@aws-sdk/middleware-signing");
@@ -31,9 +32,9 @@ class S3Client extends smithy_client_1.Client {
31
32
  this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
32
33
  this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
33
34
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
35
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
34
36
  this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
35
37
  this.middlewareStack.use((0, middleware_sdk_s3_1.getValidateBucketNamePlugin)(this.config));
36
- this.middlewareStack.use((0, middleware_sdk_s3_1.getUseRegionalEndpointPlugin)(this.config));
37
38
  this.middlewareStack.use((0, middleware_expect_continue_1.getAddExpectContinuePlugin)(this.config));
38
39
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
39
40
  }
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WriteGetObjectResponseCommand = void 0;
4
+ const middleware_sdk_s3_1 = require("@aws-sdk/middleware-sdk-s3");
4
5
  const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
7
  const models_1_1 = require("../models/models_1");
@@ -12,6 +13,7 @@ class WriteGetObjectResponseCommand extends smithy_client_1.Command {
12
13
  }
13
14
  resolveMiddleware(clientStack, configuration, options) {
14
15
  this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
16
+ this.middlewareStack.use((0, middleware_sdk_s3_1.getWriteGetObjectResponseEndpointPlugin)(configuration));
15
17
  const stack = clientStack.concat(this.middlewareStack);
16
18
  const { logger } = configuration;
17
19
  const clientName = "S3Client";
@@ -5220,13 +5220,13 @@ const deserializeAws_restXmlDeleteObjectsCommand = async (output, context) => {
5220
5220
  if (data.Deleted === "") {
5221
5221
  contents.Deleted = [];
5222
5222
  }
5223
- if (data["Deleted"] !== undefined) {
5223
+ else if (data["Deleted"] !== undefined) {
5224
5224
  contents.Deleted = deserializeAws_restXmlDeletedObjects((0, smithy_client_1.getArrayIfSingleItem)(data["Deleted"]), context);
5225
5225
  }
5226
5226
  if (data.Error === "") {
5227
5227
  contents.Errors = [];
5228
5228
  }
5229
- if (data["Error"] !== undefined) {
5229
+ else if (data["Error"] !== undefined) {
5230
5230
  contents.Errors = deserializeAws_restXmlErrors((0, smithy_client_1.getArrayIfSingleItem)(data["Error"]), context);
5231
5231
  }
5232
5232
  return Promise.resolve(contents);
@@ -5362,7 +5362,7 @@ const deserializeAws_restXmlGetBucketAclCommand = async (output, context) => {
5362
5362
  if (data.AccessControlList === "") {
5363
5363
  contents.Grants = [];
5364
5364
  }
5365
- if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) {
5365
+ else if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) {
5366
5366
  contents.Grants = deserializeAws_restXmlGrants((0, smithy_client_1.getArrayIfSingleItem)(data["AccessControlList"]["Grant"]), context);
5367
5367
  }
5368
5368
  if (data["Owner"] !== undefined) {
@@ -5434,7 +5434,7 @@ const deserializeAws_restXmlGetBucketCorsCommand = async (output, context) => {
5434
5434
  if (data.CORSRule === "") {
5435
5435
  contents.CORSRules = [];
5436
5436
  }
5437
- if (data["CORSRule"] !== undefined) {
5437
+ else if (data["CORSRule"] !== undefined) {
5438
5438
  contents.CORSRules = deserializeAws_restXmlCORSRules((0, smithy_client_1.getArrayIfSingleItem)(data["CORSRule"]), context);
5439
5439
  }
5440
5440
  return Promise.resolve(contents);
@@ -5567,7 +5567,7 @@ const deserializeAws_restXmlGetBucketLifecycleConfigurationCommand = async (outp
5567
5567
  if (data.Rule === "") {
5568
5568
  contents.Rules = [];
5569
5569
  }
5570
- if (data["Rule"] !== undefined) {
5570
+ else if (data["Rule"] !== undefined) {
5571
5571
  contents.Rules = deserializeAws_restXmlLifecycleRules((0, smithy_client_1.getArrayIfSingleItem)(data["Rule"]), context);
5572
5572
  }
5573
5573
  return Promise.resolve(contents);
@@ -5710,19 +5710,19 @@ const deserializeAws_restXmlGetBucketNotificationConfigurationCommand = async (o
5710
5710
  if (data.CloudFunctionConfiguration === "") {
5711
5711
  contents.LambdaFunctionConfigurations = [];
5712
5712
  }
5713
- if (data["CloudFunctionConfiguration"] !== undefined) {
5713
+ else if (data["CloudFunctionConfiguration"] !== undefined) {
5714
5714
  contents.LambdaFunctionConfigurations = deserializeAws_restXmlLambdaFunctionConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["CloudFunctionConfiguration"]), context);
5715
5715
  }
5716
5716
  if (data.QueueConfiguration === "") {
5717
5717
  contents.QueueConfigurations = [];
5718
5718
  }
5719
- if (data["QueueConfiguration"] !== undefined) {
5719
+ else if (data["QueueConfiguration"] !== undefined) {
5720
5720
  contents.QueueConfigurations = deserializeAws_restXmlQueueConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["QueueConfiguration"]), context);
5721
5721
  }
5722
5722
  if (data.TopicConfiguration === "") {
5723
5723
  contents.TopicConfigurations = [];
5724
5724
  }
5725
- if (data["TopicConfiguration"] !== undefined) {
5725
+ else if (data["TopicConfiguration"] !== undefined) {
5726
5726
  contents.TopicConfigurations = deserializeAws_restXmlTopicConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["TopicConfiguration"]), context);
5727
5727
  }
5728
5728
  return Promise.resolve(contents);
@@ -5921,7 +5921,7 @@ const deserializeAws_restXmlGetBucketTaggingCommand = async (output, context) =>
5921
5921
  if (data.TagSet === "") {
5922
5922
  contents.TagSet = [];
5923
5923
  }
5924
- if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) {
5924
+ else if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) {
5925
5925
  contents.TagSet = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(data["TagSet"]["Tag"]), context);
5926
5926
  }
5927
5927
  return Promise.resolve(contents);
@@ -6008,7 +6008,7 @@ const deserializeAws_restXmlGetBucketWebsiteCommand = async (output, context) =>
6008
6008
  if (data.RoutingRules === "") {
6009
6009
  contents.RoutingRules = [];
6010
6010
  }
6011
- if (data["RoutingRules"] !== undefined && data["RoutingRules"]["RoutingRule"] !== undefined) {
6011
+ else if (data["RoutingRules"] !== undefined && data["RoutingRules"]["RoutingRule"] !== undefined) {
6012
6012
  contents.RoutingRules = deserializeAws_restXmlRoutingRules((0, smithy_client_1.getArrayIfSingleItem)(data["RoutingRules"]["RoutingRule"]), context);
6013
6013
  }
6014
6014
  return Promise.resolve(contents);
@@ -6233,7 +6233,7 @@ const deserializeAws_restXmlGetObjectAclCommand = async (output, context) => {
6233
6233
  if (data.AccessControlList === "") {
6234
6234
  contents.Grants = [];
6235
6235
  }
6236
- if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) {
6236
+ else if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) {
6237
6237
  contents.Grants = deserializeAws_restXmlGrants((0, smithy_client_1.getArrayIfSingleItem)(data["AccessControlList"]["Grant"]), context);
6238
6238
  }
6239
6239
  if (data["Owner"] !== undefined) {
@@ -6445,7 +6445,7 @@ const deserializeAws_restXmlGetObjectTaggingCommand = async (output, context) =>
6445
6445
  if (data.TagSet === "") {
6446
6446
  contents.TagSet = [];
6447
6447
  }
6448
- if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) {
6448
+ else if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) {
6449
6449
  contents.TagSet = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(data["TagSet"]["Tag"]), context);
6450
6450
  }
6451
6451
  return Promise.resolve(contents);
@@ -6760,7 +6760,7 @@ const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = async (ou
6760
6760
  if (data.AnalyticsConfiguration === "") {
6761
6761
  contents.AnalyticsConfigurationList = [];
6762
6762
  }
6763
- if (data["AnalyticsConfiguration"] !== undefined) {
6763
+ else if (data["AnalyticsConfiguration"] !== undefined) {
6764
6764
  contents.AnalyticsConfigurationList = deserializeAws_restXmlAnalyticsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["AnalyticsConfiguration"]), context);
6765
6765
  }
6766
6766
  if (data["ContinuationToken"] !== undefined) {
@@ -6812,7 +6812,7 @@ const deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand =
6812
6812
  if (data.IntelligentTieringConfiguration === "") {
6813
6813
  contents.IntelligentTieringConfigurationList = [];
6814
6814
  }
6815
- if (data["IntelligentTieringConfiguration"] !== undefined) {
6815
+ else if (data["IntelligentTieringConfiguration"] !== undefined) {
6816
6816
  contents.IntelligentTieringConfigurationList = deserializeAws_restXmlIntelligentTieringConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["IntelligentTieringConfiguration"]), context);
6817
6817
  }
6818
6818
  if (data["IsTruncated"] !== undefined) {
@@ -6861,7 +6861,7 @@ const deserializeAws_restXmlListBucketInventoryConfigurationsCommand = async (ou
6861
6861
  if (data.InventoryConfiguration === "") {
6862
6862
  contents.InventoryConfigurationList = [];
6863
6863
  }
6864
- if (data["InventoryConfiguration"] !== undefined) {
6864
+ else if (data["InventoryConfiguration"] !== undefined) {
6865
6865
  contents.InventoryConfigurationList = deserializeAws_restXmlInventoryConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["InventoryConfiguration"]), context);
6866
6866
  }
6867
6867
  if (data["IsTruncated"] !== undefined) {
@@ -6913,7 +6913,7 @@ const deserializeAws_restXmlListBucketMetricsConfigurationsCommand = async (outp
6913
6913
  if (data.MetricsConfiguration === "") {
6914
6914
  contents.MetricsConfigurationList = [];
6915
6915
  }
6916
- if (data["MetricsConfiguration"] !== undefined) {
6916
+ else if (data["MetricsConfiguration"] !== undefined) {
6917
6917
  contents.MetricsConfigurationList = deserializeAws_restXmlMetricsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["MetricsConfiguration"]), context);
6918
6918
  }
6919
6919
  if (data["NextContinuationToken"] !== undefined) {
@@ -6954,7 +6954,7 @@ const deserializeAws_restXmlListBucketsCommand = async (output, context) => {
6954
6954
  if (data.Buckets === "") {
6955
6955
  contents.Buckets = [];
6956
6956
  }
6957
- if (data["Buckets"] !== undefined && data["Buckets"]["Bucket"] !== undefined) {
6957
+ else if (data["Buckets"] !== undefined && data["Buckets"]["Bucket"] !== undefined) {
6958
6958
  contents.Buckets = deserializeAws_restXmlBuckets((0, smithy_client_1.getArrayIfSingleItem)(data["Buckets"]["Bucket"]), context);
6959
6959
  }
6960
6960
  if (data["Owner"] !== undefined) {
@@ -7008,7 +7008,7 @@ const deserializeAws_restXmlListMultipartUploadsCommand = async (output, context
7008
7008
  if (data.CommonPrefixes === "") {
7009
7009
  contents.CommonPrefixes = [];
7010
7010
  }
7011
- if (data["CommonPrefixes"] !== undefined) {
7011
+ else if (data["CommonPrefixes"] !== undefined) {
7012
7012
  contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context);
7013
7013
  }
7014
7014
  if (data["Delimiter"] !== undefined) {
@@ -7041,7 +7041,7 @@ const deserializeAws_restXmlListMultipartUploadsCommand = async (output, context
7041
7041
  if (data.Upload === "") {
7042
7042
  contents.Uploads = [];
7043
7043
  }
7044
- if (data["Upload"] !== undefined) {
7044
+ else if (data["Upload"] !== undefined) {
7045
7045
  contents.Uploads = deserializeAws_restXmlMultipartUploadList((0, smithy_client_1.getArrayIfSingleItem)(data["Upload"]), context);
7046
7046
  }
7047
7047
  return Promise.resolve(contents);
@@ -7087,13 +7087,13 @@ const deserializeAws_restXmlListObjectsCommand = async (output, context) => {
7087
7087
  if (data.CommonPrefixes === "") {
7088
7088
  contents.CommonPrefixes = [];
7089
7089
  }
7090
- if (data["CommonPrefixes"] !== undefined) {
7090
+ else if (data["CommonPrefixes"] !== undefined) {
7091
7091
  contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context);
7092
7092
  }
7093
7093
  if (data.Contents === "") {
7094
7094
  contents.Contents = [];
7095
7095
  }
7096
- if (data["Contents"] !== undefined) {
7096
+ else if (data["Contents"] !== undefined) {
7097
7097
  contents.Contents = deserializeAws_restXmlObjectList((0, smithy_client_1.getArrayIfSingleItem)(data["Contents"]), context);
7098
7098
  }
7099
7099
  if (data["Delimiter"] !== undefined) {
@@ -7168,13 +7168,13 @@ const deserializeAws_restXmlListObjectsV2Command = async (output, context) => {
7168
7168
  if (data.CommonPrefixes === "") {
7169
7169
  contents.CommonPrefixes = [];
7170
7170
  }
7171
- if (data["CommonPrefixes"] !== undefined) {
7171
+ else if (data["CommonPrefixes"] !== undefined) {
7172
7172
  contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context);
7173
7173
  }
7174
7174
  if (data.Contents === "") {
7175
7175
  contents.Contents = [];
7176
7176
  }
7177
- if (data["Contents"] !== undefined) {
7177
+ else if (data["Contents"] !== undefined) {
7178
7178
  contents.Contents = deserializeAws_restXmlObjectList((0, smithy_client_1.getArrayIfSingleItem)(data["Contents"]), context);
7179
7179
  }
7180
7180
  if (data["ContinuationToken"] !== undefined) {
@@ -7256,13 +7256,13 @@ const deserializeAws_restXmlListObjectVersionsCommand = async (output, context)
7256
7256
  if (data.CommonPrefixes === "") {
7257
7257
  contents.CommonPrefixes = [];
7258
7258
  }
7259
- if (data["CommonPrefixes"] !== undefined) {
7259
+ else if (data["CommonPrefixes"] !== undefined) {
7260
7260
  contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context);
7261
7261
  }
7262
7262
  if (data.DeleteMarker === "") {
7263
7263
  contents.DeleteMarkers = [];
7264
7264
  }
7265
- if (data["DeleteMarker"] !== undefined) {
7265
+ else if (data["DeleteMarker"] !== undefined) {
7266
7266
  contents.DeleteMarkers = deserializeAws_restXmlDeleteMarkers((0, smithy_client_1.getArrayIfSingleItem)(data["DeleteMarker"]), context);
7267
7267
  }
7268
7268
  if (data["Delimiter"] !== undefined) {
@@ -7298,7 +7298,7 @@ const deserializeAws_restXmlListObjectVersionsCommand = async (output, context)
7298
7298
  if (data.Version === "") {
7299
7299
  contents.Versions = [];
7300
7300
  }
7301
- if (data["Version"] !== undefined) {
7301
+ else if (data["Version"] !== undefined) {
7302
7302
  contents.Versions = deserializeAws_restXmlObjectVersionList((0, smithy_client_1.getArrayIfSingleItem)(data["Version"]), context);
7303
7303
  }
7304
7304
  return Promise.resolve(contents);
@@ -7385,7 +7385,7 @@ const deserializeAws_restXmlListPartsCommand = async (output, context) => {
7385
7385
  if (data.Part === "") {
7386
7386
  contents.Parts = [];
7387
7387
  }
7388
- if (data["Part"] !== undefined) {
7388
+ else if (data["Part"] !== undefined) {
7389
7389
  contents.Parts = deserializeAws_restXmlParts((0, smithy_client_1.getArrayIfSingleItem)(data["Part"]), context);
7390
7390
  }
7391
7391
  if (data["StorageClass"] !== undefined) {
@@ -10745,7 +10745,7 @@ const deserializeAws_restXmlAnalyticsAndOperator = (output, context) => {
10745
10745
  if (output.Tag === "") {
10746
10746
  contents.Tags = [];
10747
10747
  }
10748
- if (output["Tag"] !== undefined) {
10748
+ else if (output["Tag"] !== undefined) {
10749
10749
  contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context);
10750
10750
  }
10751
10751
  return contents;
@@ -10759,7 +10759,9 @@ const deserializeAws_restXmlAnalyticsConfiguration = (output, context) => {
10759
10759
  if (output["Id"] !== undefined) {
10760
10760
  contents.Id = (0, smithy_client_1.expectString)(output["Id"]);
10761
10761
  }
10762
- if (output["Filter"] !== undefined) {
10762
+ if (output.Filter === "") {
10763
+ }
10764
+ else if (output["Filter"] !== undefined) {
10763
10765
  contents.Filter = deserializeAws_restXmlAnalyticsFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context);
10764
10766
  }
10765
10767
  if (output["StorageClassAnalysis"] !== undefined) {
@@ -10988,25 +10990,25 @@ const deserializeAws_restXmlCORSRule = (output, context) => {
10988
10990
  if (output.AllowedHeader === "") {
10989
10991
  contents.AllowedHeaders = [];
10990
10992
  }
10991
- if (output["AllowedHeader"] !== undefined) {
10993
+ else if (output["AllowedHeader"] !== undefined) {
10992
10994
  contents.AllowedHeaders = deserializeAws_restXmlAllowedHeaders((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedHeader"]), context);
10993
10995
  }
10994
10996
  if (output.AllowedMethod === "") {
10995
10997
  contents.AllowedMethods = [];
10996
10998
  }
10997
- if (output["AllowedMethod"] !== undefined) {
10999
+ else if (output["AllowedMethod"] !== undefined) {
10998
11000
  contents.AllowedMethods = deserializeAws_restXmlAllowedMethods((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedMethod"]), context);
10999
11001
  }
11000
11002
  if (output.AllowedOrigin === "") {
11001
11003
  contents.AllowedOrigins = [];
11002
11004
  }
11003
- if (output["AllowedOrigin"] !== undefined) {
11005
+ else if (output["AllowedOrigin"] !== undefined) {
11004
11006
  contents.AllowedOrigins = deserializeAws_restXmlAllowedOrigins((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedOrigin"]), context);
11005
11007
  }
11006
11008
  if (output.ExposeHeader === "") {
11007
11009
  contents.ExposeHeaders = [];
11008
11010
  }
11009
- if (output["ExposeHeader"] !== undefined) {
11011
+ else if (output["ExposeHeader"] !== undefined) {
11010
11012
  contents.ExposeHeaders = deserializeAws_restXmlExposeHeaders((0, smithy_client_1.getArrayIfSingleItem)(output["ExposeHeader"]), context);
11011
11013
  }
11012
11014
  if (output["MaxAgeSeconds"] !== undefined) {
@@ -11285,7 +11287,7 @@ const deserializeAws_restXmlGetObjectAttributesParts = (output, context) => {
11285
11287
  if (output.Part === "") {
11286
11288
  contents.Parts = [];
11287
11289
  }
11288
- if (output["Part"] !== undefined) {
11290
+ else if (output["Part"] !== undefined) {
11289
11291
  contents.Parts = deserializeAws_restXmlPartsList((0, smithy_client_1.getArrayIfSingleItem)(output["Part"]), context);
11290
11292
  }
11291
11293
  return contents;
@@ -11371,7 +11373,7 @@ const deserializeAws_restXmlIntelligentTieringAndOperator = (output, context) =>
11371
11373
  if (output.Tag === "") {
11372
11374
  contents.Tags = [];
11373
11375
  }
11374
- if (output["Tag"] !== undefined) {
11376
+ else if (output["Tag"] !== undefined) {
11375
11377
  contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context);
11376
11378
  }
11377
11379
  return contents;
@@ -11395,7 +11397,7 @@ const deserializeAws_restXmlIntelligentTieringConfiguration = (output, context)
11395
11397
  if (output.Tiering === "") {
11396
11398
  contents.Tierings = [];
11397
11399
  }
11398
- if (output["Tiering"] !== undefined) {
11400
+ else if (output["Tiering"] !== undefined) {
11399
11401
  contents.Tierings = deserializeAws_restXmlTieringList((0, smithy_client_1.getArrayIfSingleItem)(output["Tiering"]), context);
11400
11402
  }
11401
11403
  return contents;
@@ -11455,7 +11457,7 @@ const deserializeAws_restXmlInventoryConfiguration = (output, context) => {
11455
11457
  if (output.OptionalFields === "") {
11456
11458
  contents.OptionalFields = [];
11457
11459
  }
11458
- if (output["OptionalFields"] !== undefined && output["OptionalFields"]["Field"] !== undefined) {
11460
+ else if (output["OptionalFields"] !== undefined && output["OptionalFields"]["Field"] !== undefined) {
11459
11461
  contents.OptionalFields = deserializeAws_restXmlInventoryOptionalFields((0, smithy_client_1.getArrayIfSingleItem)(output["OptionalFields"]["Field"]), context);
11460
11462
  }
11461
11463
  if (output["Schedule"] !== undefined) {
@@ -11564,7 +11566,7 @@ const deserializeAws_restXmlLambdaFunctionConfiguration = (output, context) => {
11564
11566
  if (output.Event === "") {
11565
11567
  contents.Events = [];
11566
11568
  }
11567
- if (output["Event"] !== undefined) {
11569
+ else if (output["Event"] !== undefined) {
11568
11570
  contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context);
11569
11571
  }
11570
11572
  if (output["Filter"] !== undefined) {
@@ -11620,7 +11622,9 @@ const deserializeAws_restXmlLifecycleRule = (output, context) => {
11620
11622
  if (output["Prefix"] !== undefined) {
11621
11623
  contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]);
11622
11624
  }
11623
- if (output["Filter"] !== undefined) {
11625
+ if (output.Filter === "") {
11626
+ }
11627
+ else if (output["Filter"] !== undefined) {
11624
11628
  contents.Filter = deserializeAws_restXmlLifecycleRuleFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context);
11625
11629
  }
11626
11630
  if (output["Status"] !== undefined) {
@@ -11629,13 +11633,13 @@ const deserializeAws_restXmlLifecycleRule = (output, context) => {
11629
11633
  if (output.Transition === "") {
11630
11634
  contents.Transitions = [];
11631
11635
  }
11632
- if (output["Transition"] !== undefined) {
11636
+ else if (output["Transition"] !== undefined) {
11633
11637
  contents.Transitions = deserializeAws_restXmlTransitionList((0, smithy_client_1.getArrayIfSingleItem)(output["Transition"]), context);
11634
11638
  }
11635
11639
  if (output.NoncurrentVersionTransition === "") {
11636
11640
  contents.NoncurrentVersionTransitions = [];
11637
11641
  }
11638
- if (output["NoncurrentVersionTransition"] !== undefined) {
11642
+ else if (output["NoncurrentVersionTransition"] !== undefined) {
11639
11643
  contents.NoncurrentVersionTransitions = deserializeAws_restXmlNoncurrentVersionTransitionList((0, smithy_client_1.getArrayIfSingleItem)(output["NoncurrentVersionTransition"]), context);
11640
11644
  }
11641
11645
  if (output["NoncurrentVersionExpiration"] !== undefined) {
@@ -11659,7 +11663,7 @@ const deserializeAws_restXmlLifecycleRuleAndOperator = (output, context) => {
11659
11663
  if (output.Tag === "") {
11660
11664
  contents.Tags = [];
11661
11665
  }
11662
- if (output["Tag"] !== undefined) {
11666
+ else if (output["Tag"] !== undefined) {
11663
11667
  contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context);
11664
11668
  }
11665
11669
  if (output["ObjectSizeGreaterThan"] !== undefined) {
@@ -11720,7 +11724,7 @@ const deserializeAws_restXmlLoggingEnabled = (output, context) => {
11720
11724
  if (output.TargetGrants === "") {
11721
11725
  contents.TargetGrants = [];
11722
11726
  }
11723
- if (output["TargetGrants"] !== undefined && output["TargetGrants"]["Grant"] !== undefined) {
11727
+ else if (output["TargetGrants"] !== undefined && output["TargetGrants"]["Grant"] !== undefined) {
11724
11728
  contents.TargetGrants = deserializeAws_restXmlTargetGrants((0, smithy_client_1.getArrayIfSingleItem)(output["TargetGrants"]["Grant"]), context);
11725
11729
  }
11726
11730
  if (output["TargetPrefix"] !== undefined) {
@@ -11753,7 +11757,7 @@ const deserializeAws_restXmlMetricsAndOperator = (output, context) => {
11753
11757
  if (output.Tag === "") {
11754
11758
  contents.Tags = [];
11755
11759
  }
11756
- if (output["Tag"] !== undefined) {
11760
+ else if (output["Tag"] !== undefined) {
11757
11761
  contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context);
11758
11762
  }
11759
11763
  if (output["AccessPointArn"] !== undefined) {
@@ -11769,7 +11773,9 @@ const deserializeAws_restXmlMetricsConfiguration = (output, context) => {
11769
11773
  if (output["Id"] !== undefined) {
11770
11774
  contents.Id = (0, smithy_client_1.expectString)(output["Id"]);
11771
11775
  }
11772
- if (output["Filter"] !== undefined) {
11776
+ if (output.Filter === "") {
11777
+ }
11778
+ else if (output["Filter"] !== undefined) {
11773
11779
  contents.Filter = deserializeAws_restXmlMetricsFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context);
11774
11780
  }
11775
11781
  return contents;
@@ -11921,7 +11927,7 @@ const deserializeAws_restXml_Object = (output, context) => {
11921
11927
  if (output.ChecksumAlgorithm === "") {
11922
11928
  contents.ChecksumAlgorithm = [];
11923
11929
  }
11924
- if (output["ChecksumAlgorithm"] !== undefined) {
11930
+ else if (output["ChecksumAlgorithm"] !== undefined) {
11925
11931
  contents.ChecksumAlgorithm = deserializeAws_restXmlChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output["ChecksumAlgorithm"]), context);
11926
11932
  }
11927
11933
  if (output["Size"] !== undefined) {
@@ -12036,7 +12042,7 @@ const deserializeAws_restXmlObjectVersion = (output, context) => {
12036
12042
  if (output.ChecksumAlgorithm === "") {
12037
12043
  contents.ChecksumAlgorithm = [];
12038
12044
  }
12039
- if (output["ChecksumAlgorithm"] !== undefined) {
12045
+ else if (output["ChecksumAlgorithm"] !== undefined) {
12040
12046
  contents.ChecksumAlgorithm = deserializeAws_restXmlChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output["ChecksumAlgorithm"]), context);
12041
12047
  }
12042
12048
  if (output["Size"] !== undefined) {
@@ -12092,7 +12098,7 @@ const deserializeAws_restXmlOwnershipControls = (output, context) => {
12092
12098
  if (output.Rule === "") {
12093
12099
  contents.Rules = [];
12094
12100
  }
12095
- if (output["Rule"] !== undefined) {
12101
+ else if (output["Rule"] !== undefined) {
12096
12102
  contents.Rules = deserializeAws_restXmlOwnershipControlsRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context);
12097
12103
  }
12098
12104
  return contents;
@@ -12245,7 +12251,7 @@ const deserializeAws_restXmlQueueConfiguration = (output, context) => {
12245
12251
  if (output.Event === "") {
12246
12252
  contents.Events = [];
12247
12253
  }
12248
- if (output["Event"] !== undefined) {
12254
+ else if (output["Event"] !== undefined) {
12249
12255
  contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context);
12250
12256
  }
12251
12257
  if (output["Filter"] !== undefined) {
@@ -12330,7 +12336,7 @@ const deserializeAws_restXmlReplicationConfiguration = (output, context) => {
12330
12336
  if (output.Rule === "") {
12331
12337
  contents.Rules = [];
12332
12338
  }
12333
- if (output["Rule"] !== undefined) {
12339
+ else if (output["Rule"] !== undefined) {
12334
12340
  contents.Rules = deserializeAws_restXmlReplicationRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context);
12335
12341
  }
12336
12342
  return contents;
@@ -12356,7 +12362,9 @@ const deserializeAws_restXmlReplicationRule = (output, context) => {
12356
12362
  if (output["Prefix"] !== undefined) {
12357
12363
  contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]);
12358
12364
  }
12359
- if (output["Filter"] !== undefined) {
12365
+ if (output.Filter === "") {
12366
+ }
12367
+ else if (output["Filter"] !== undefined) {
12360
12368
  contents.Filter = deserializeAws_restXmlReplicationRuleFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context);
12361
12369
  }
12362
12370
  if (output["Status"] !== undefined) {
@@ -12387,7 +12395,7 @@ const deserializeAws_restXmlReplicationRuleAndOperator = (output, context) => {
12387
12395
  if (output.Tag === "") {
12388
12396
  contents.Tags = [];
12389
12397
  }
12390
- if (output["Tag"] !== undefined) {
12398
+ else if (output["Tag"] !== undefined) {
12391
12399
  contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context);
12392
12400
  }
12393
12401
  return contents;
@@ -12472,7 +12480,7 @@ const deserializeAws_restXmlS3KeyFilter = (output, context) => {
12472
12480
  if (output.FilterRule === "") {
12473
12481
  contents.FilterRules = [];
12474
12482
  }
12475
- if (output["FilterRule"] !== undefined) {
12483
+ else if (output["FilterRule"] !== undefined) {
12476
12484
  contents.FilterRules = deserializeAws_restXmlFilterRuleList((0, smithy_client_1.getArrayIfSingleItem)(output["FilterRule"]), context);
12477
12485
  }
12478
12486
  return contents;
@@ -12525,7 +12533,7 @@ const deserializeAws_restXmlServerSideEncryptionConfiguration = (output, context
12525
12533
  if (output.Rule === "") {
12526
12534
  contents.Rules = [];
12527
12535
  }
12528
- if (output["Rule"] !== undefined) {
12536
+ else if (output["Rule"] !== undefined) {
12529
12537
  contents.Rules = deserializeAws_restXmlServerSideEncryptionRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context);
12530
12538
  }
12531
12539
  return contents;
@@ -12721,7 +12729,7 @@ const deserializeAws_restXmlTopicConfiguration = (output, context) => {
12721
12729
  if (output.Event === "") {
12722
12730
  contents.Events = [];
12723
12731
  }
12724
- if (output["Event"] !== undefined) {
12732
+ else if (output["Event"] !== undefined) {
12725
12733
  contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context);
12726
12734
  }
12727
12735
  if (output["Filter"] !== undefined) {
@@ -6,8 +6,9 @@ import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
6
6
  import { getAddExpectContinuePlugin } from "@aws-sdk/middleware-expect-continue";
7
7
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
8
8
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
9
+ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
9
10
  import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
10
- import { getUseRegionalEndpointPlugin, getValidateBucketNamePlugin } from "@aws-sdk/middleware-sdk-s3";
11
+ import { getValidateBucketNamePlugin } from "@aws-sdk/middleware-sdk-s3";
11
12
  import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
12
13
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
13
14
  import { Client as __Client, } from "@aws-sdk/smithy-client";
@@ -31,9 +32,9 @@ var S3Client = (function (_super) {
31
32
  _this.middlewareStack.use(getContentLengthPlugin(_this.config));
32
33
  _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
33
34
  _this.middlewareStack.use(getLoggerPlugin(_this.config));
35
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
34
36
  _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
35
37
  _this.middlewareStack.use(getValidateBucketNamePlugin(_this.config));
36
- _this.middlewareStack.use(getUseRegionalEndpointPlugin(_this.config));
37
38
  _this.middlewareStack.use(getAddExpectContinuePlugin(_this.config));
38
39
  _this.middlewareStack.use(getUserAgentPlugin(_this.config));
39
40
  return _this;
@@ -1,4 +1,5 @@
1
1
  import { __extends } from "tslib";
2
+ import { getWriteGetObjectResponseEndpointPlugin } from "@aws-sdk/middleware-sdk-s3";
2
3
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
4
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
5
  import { WriteGetObjectResponseRequest } from "../models/models_1";
@@ -12,6 +13,7 @@ var WriteGetObjectResponseCommand = (function (_super) {
12
13
  }
13
14
  WriteGetObjectResponseCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
15
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
16
+ this.middlewareStack.use(getWriteGetObjectResponseEndpointPlugin(configuration));
15
17
  var stack = clientStack.concat(this.middlewareStack);
16
18
  var logger = configuration.logger;
17
19
  var clientName = "S3Client";