@aws-sdk/client-s3 3.118.1 → 3.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4472,18 +4472,19 @@ const deserializeAws_restXmlAbortMultipartUploadCommandError = async (output, co
4472
4472
  body: await parseBody(output.body, context),
4473
4473
  };
4474
4474
  let response;
4475
- let errorCode = "UnknownError";
4476
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4475
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4477
4476
  switch (errorCode) {
4478
4477
  case "NoSuchUpload":
4479
4478
  case "com.amazonaws.s3#NoSuchUpload":
4480
4479
  throw await deserializeAws_restXmlNoSuchUploadResponse(parsedOutput, context);
4481
4480
  default:
4482
4481
  const parsedBody = parsedOutput.body;
4482
+ const $metadata = deserializeMetadata(output);
4483
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4483
4484
  response = new S3ServiceException_1.S3ServiceException({
4484
- name: parsedBody.code || parsedBody.Code || errorCode,
4485
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4485
4486
  $fault: "client",
4486
- $metadata: deserializeMetadata(output),
4487
+ $metadata,
4487
4488
  });
4488
4489
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4489
4490
  }
@@ -4561,15 +4562,16 @@ const deserializeAws_restXmlCompleteMultipartUploadCommandError = async (output,
4561
4562
  body: await parseBody(output.body, context),
4562
4563
  };
4563
4564
  let response;
4564
- let errorCode = "UnknownError";
4565
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4565
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4566
4566
  switch (errorCode) {
4567
4567
  default:
4568
4568
  const parsedBody = parsedOutput.body;
4569
+ const $metadata = deserializeMetadata(output);
4570
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4569
4571
  response = new S3ServiceException_1.S3ServiceException({
4570
- name: parsedBody.code || parsedBody.Code || errorCode,
4572
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4571
4573
  $fault: "client",
4572
- $metadata: deserializeMetadata(output),
4574
+ $metadata,
4573
4575
  });
4574
4576
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4575
4577
  }
@@ -4633,18 +4635,19 @@ const deserializeAws_restXmlCopyObjectCommandError = async (output, context) =>
4633
4635
  body: await parseBody(output.body, context),
4634
4636
  };
4635
4637
  let response;
4636
- let errorCode = "UnknownError";
4637
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4638
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4638
4639
  switch (errorCode) {
4639
4640
  case "ObjectNotInActiveTierError":
4640
4641
  case "com.amazonaws.s3#ObjectNotInActiveTierError":
4641
4642
  throw await deserializeAws_restXmlObjectNotInActiveTierErrorResponse(parsedOutput, context);
4642
4643
  default:
4643
4644
  const parsedBody = parsedOutput.body;
4645
+ const $metadata = deserializeMetadata(output);
4646
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4644
4647
  response = new S3ServiceException_1.S3ServiceException({
4645
- name: parsedBody.code || parsedBody.Code || errorCode,
4648
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4646
4649
  $fault: "client",
4647
- $metadata: deserializeMetadata(output),
4650
+ $metadata,
4648
4651
  });
4649
4652
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4650
4653
  }
@@ -4670,8 +4673,7 @@ const deserializeAws_restXmlCreateBucketCommandError = async (output, context) =
4670
4673
  body: await parseBody(output.body, context),
4671
4674
  };
4672
4675
  let response;
4673
- let errorCode = "UnknownError";
4674
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4676
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4675
4677
  switch (errorCode) {
4676
4678
  case "BucketAlreadyExists":
4677
4679
  case "com.amazonaws.s3#BucketAlreadyExists":
@@ -4681,10 +4683,12 @@ const deserializeAws_restXmlCreateBucketCommandError = async (output, context) =
4681
4683
  throw await deserializeAws_restXmlBucketAlreadyOwnedByYouResponse(parsedOutput, context);
4682
4684
  default:
4683
4685
  const parsedBody = parsedOutput.body;
4686
+ const $metadata = deserializeMetadata(output);
4687
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4684
4688
  response = new S3ServiceException_1.S3ServiceException({
4685
- name: parsedBody.code || parsedBody.Code || errorCode,
4689
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4686
4690
  $fault: "client",
4687
- $metadata: deserializeMetadata(output),
4691
+ $metadata,
4688
4692
  });
4689
4693
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4690
4694
  }
@@ -4758,15 +4762,16 @@ const deserializeAws_restXmlCreateMultipartUploadCommandError = async (output, c
4758
4762
  body: await parseBody(output.body, context),
4759
4763
  };
4760
4764
  let response;
4761
- let errorCode = "UnknownError";
4762
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4765
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4763
4766
  switch (errorCode) {
4764
4767
  default:
4765
4768
  const parsedBody = parsedOutput.body;
4769
+ const $metadata = deserializeMetadata(output);
4770
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4766
4771
  response = new S3ServiceException_1.S3ServiceException({
4767
- name: parsedBody.code || parsedBody.Code || errorCode,
4772
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4768
4773
  $fault: "client",
4769
- $metadata: deserializeMetadata(output),
4774
+ $metadata,
4770
4775
  });
4771
4776
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4772
4777
  }
@@ -4788,15 +4793,16 @@ const deserializeAws_restXmlDeleteBucketCommandError = async (output, context) =
4788
4793
  body: await parseBody(output.body, context),
4789
4794
  };
4790
4795
  let response;
4791
- let errorCode = "UnknownError";
4792
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4796
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4793
4797
  switch (errorCode) {
4794
4798
  default:
4795
4799
  const parsedBody = parsedOutput.body;
4800
+ const $metadata = deserializeMetadata(output);
4801
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4796
4802
  response = new S3ServiceException_1.S3ServiceException({
4797
- name: parsedBody.code || parsedBody.Code || errorCode,
4803
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4798
4804
  $fault: "client",
4799
- $metadata: deserializeMetadata(output),
4805
+ $metadata,
4800
4806
  });
4801
4807
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4802
4808
  }
@@ -4818,15 +4824,16 @@ const deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommandError = asy
4818
4824
  body: await parseBody(output.body, context),
4819
4825
  };
4820
4826
  let response;
4821
- let errorCode = "UnknownError";
4822
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4827
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4823
4828
  switch (errorCode) {
4824
4829
  default:
4825
4830
  const parsedBody = parsedOutput.body;
4831
+ const $metadata = deserializeMetadata(output);
4832
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4826
4833
  response = new S3ServiceException_1.S3ServiceException({
4827
- name: parsedBody.code || parsedBody.Code || errorCode,
4834
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4828
4835
  $fault: "client",
4829
- $metadata: deserializeMetadata(output),
4836
+ $metadata,
4830
4837
  });
4831
4838
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4832
4839
  }
@@ -4848,15 +4855,16 @@ const deserializeAws_restXmlDeleteBucketCorsCommandError = async (output, contex
4848
4855
  body: await parseBody(output.body, context),
4849
4856
  };
4850
4857
  let response;
4851
- let errorCode = "UnknownError";
4852
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4858
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4853
4859
  switch (errorCode) {
4854
4860
  default:
4855
4861
  const parsedBody = parsedOutput.body;
4862
+ const $metadata = deserializeMetadata(output);
4863
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4856
4864
  response = new S3ServiceException_1.S3ServiceException({
4857
- name: parsedBody.code || parsedBody.Code || errorCode,
4865
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4858
4866
  $fault: "client",
4859
- $metadata: deserializeMetadata(output),
4867
+ $metadata,
4860
4868
  });
4861
4869
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4862
4870
  }
@@ -4878,15 +4886,16 @@ const deserializeAws_restXmlDeleteBucketEncryptionCommandError = async (output,
4878
4886
  body: await parseBody(output.body, context),
4879
4887
  };
4880
4888
  let response;
4881
- let errorCode = "UnknownError";
4882
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4889
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4883
4890
  switch (errorCode) {
4884
4891
  default:
4885
4892
  const parsedBody = parsedOutput.body;
4893
+ const $metadata = deserializeMetadata(output);
4894
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4886
4895
  response = new S3ServiceException_1.S3ServiceException({
4887
- name: parsedBody.code || parsedBody.Code || errorCode,
4896
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4888
4897
  $fault: "client",
4889
- $metadata: deserializeMetadata(output),
4898
+ $metadata,
4890
4899
  });
4891
4900
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4892
4901
  }
@@ -4908,15 +4917,16 @@ const deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommandEr
4908
4917
  body: await parseBody(output.body, context),
4909
4918
  };
4910
4919
  let response;
4911
- let errorCode = "UnknownError";
4912
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4920
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4913
4921
  switch (errorCode) {
4914
4922
  default:
4915
4923
  const parsedBody = parsedOutput.body;
4924
+ const $metadata = deserializeMetadata(output);
4925
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4916
4926
  response = new S3ServiceException_1.S3ServiceException({
4917
- name: parsedBody.code || parsedBody.Code || errorCode,
4927
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4918
4928
  $fault: "client",
4919
- $metadata: deserializeMetadata(output),
4929
+ $metadata,
4920
4930
  });
4921
4931
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4922
4932
  }
@@ -4938,15 +4948,16 @@ const deserializeAws_restXmlDeleteBucketInventoryConfigurationCommandError = asy
4938
4948
  body: await parseBody(output.body, context),
4939
4949
  };
4940
4950
  let response;
4941
- let errorCode = "UnknownError";
4942
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4951
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4943
4952
  switch (errorCode) {
4944
4953
  default:
4945
4954
  const parsedBody = parsedOutput.body;
4955
+ const $metadata = deserializeMetadata(output);
4956
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4946
4957
  response = new S3ServiceException_1.S3ServiceException({
4947
- name: parsedBody.code || parsedBody.Code || errorCode,
4958
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4948
4959
  $fault: "client",
4949
- $metadata: deserializeMetadata(output),
4960
+ $metadata,
4950
4961
  });
4951
4962
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4952
4963
  }
@@ -4968,15 +4979,16 @@ const deserializeAws_restXmlDeleteBucketLifecycleCommandError = async (output, c
4968
4979
  body: await parseBody(output.body, context),
4969
4980
  };
4970
4981
  let response;
4971
- let errorCode = "UnknownError";
4972
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4982
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
4973
4983
  switch (errorCode) {
4974
4984
  default:
4975
4985
  const parsedBody = parsedOutput.body;
4986
+ const $metadata = deserializeMetadata(output);
4987
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
4976
4988
  response = new S3ServiceException_1.S3ServiceException({
4977
- name: parsedBody.code || parsedBody.Code || errorCode,
4989
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
4978
4990
  $fault: "client",
4979
- $metadata: deserializeMetadata(output),
4991
+ $metadata,
4980
4992
  });
4981
4993
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
4982
4994
  }
@@ -4998,15 +5010,16 @@ const deserializeAws_restXmlDeleteBucketMetricsConfigurationCommandError = async
4998
5010
  body: await parseBody(output.body, context),
4999
5011
  };
5000
5012
  let response;
5001
- let errorCode = "UnknownError";
5002
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5013
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5003
5014
  switch (errorCode) {
5004
5015
  default:
5005
5016
  const parsedBody = parsedOutput.body;
5017
+ const $metadata = deserializeMetadata(output);
5018
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5006
5019
  response = new S3ServiceException_1.S3ServiceException({
5007
- name: parsedBody.code || parsedBody.Code || errorCode,
5020
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5008
5021
  $fault: "client",
5009
- $metadata: deserializeMetadata(output),
5022
+ $metadata,
5010
5023
  });
5011
5024
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5012
5025
  }
@@ -5028,15 +5041,16 @@ const deserializeAws_restXmlDeleteBucketOwnershipControlsCommandError = async (o
5028
5041
  body: await parseBody(output.body, context),
5029
5042
  };
5030
5043
  let response;
5031
- let errorCode = "UnknownError";
5032
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5044
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5033
5045
  switch (errorCode) {
5034
5046
  default:
5035
5047
  const parsedBody = parsedOutput.body;
5048
+ const $metadata = deserializeMetadata(output);
5049
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5036
5050
  response = new S3ServiceException_1.S3ServiceException({
5037
- name: parsedBody.code || parsedBody.Code || errorCode,
5051
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5038
5052
  $fault: "client",
5039
- $metadata: deserializeMetadata(output),
5053
+ $metadata,
5040
5054
  });
5041
5055
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5042
5056
  }
@@ -5058,15 +5072,16 @@ const deserializeAws_restXmlDeleteBucketPolicyCommandError = async (output, cont
5058
5072
  body: await parseBody(output.body, context),
5059
5073
  };
5060
5074
  let response;
5061
- let errorCode = "UnknownError";
5062
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5075
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5063
5076
  switch (errorCode) {
5064
5077
  default:
5065
5078
  const parsedBody = parsedOutput.body;
5079
+ const $metadata = deserializeMetadata(output);
5080
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5066
5081
  response = new S3ServiceException_1.S3ServiceException({
5067
- name: parsedBody.code || parsedBody.Code || errorCode,
5082
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5068
5083
  $fault: "client",
5069
- $metadata: deserializeMetadata(output),
5084
+ $metadata,
5070
5085
  });
5071
5086
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5072
5087
  }
@@ -5088,15 +5103,16 @@ const deserializeAws_restXmlDeleteBucketReplicationCommandError = async (output,
5088
5103
  body: await parseBody(output.body, context),
5089
5104
  };
5090
5105
  let response;
5091
- let errorCode = "UnknownError";
5092
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5106
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5093
5107
  switch (errorCode) {
5094
5108
  default:
5095
5109
  const parsedBody = parsedOutput.body;
5110
+ const $metadata = deserializeMetadata(output);
5111
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5096
5112
  response = new S3ServiceException_1.S3ServiceException({
5097
- name: parsedBody.code || parsedBody.Code || errorCode,
5113
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5098
5114
  $fault: "client",
5099
- $metadata: deserializeMetadata(output),
5115
+ $metadata,
5100
5116
  });
5101
5117
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5102
5118
  }
@@ -5118,15 +5134,16 @@ const deserializeAws_restXmlDeleteBucketTaggingCommandError = async (output, con
5118
5134
  body: await parseBody(output.body, context),
5119
5135
  };
5120
5136
  let response;
5121
- let errorCode = "UnknownError";
5122
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5137
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5123
5138
  switch (errorCode) {
5124
5139
  default:
5125
5140
  const parsedBody = parsedOutput.body;
5141
+ const $metadata = deserializeMetadata(output);
5142
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5126
5143
  response = new S3ServiceException_1.S3ServiceException({
5127
- name: parsedBody.code || parsedBody.Code || errorCode,
5144
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5128
5145
  $fault: "client",
5129
- $metadata: deserializeMetadata(output),
5146
+ $metadata,
5130
5147
  });
5131
5148
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5132
5149
  }
@@ -5148,15 +5165,16 @@ const deserializeAws_restXmlDeleteBucketWebsiteCommandError = async (output, con
5148
5165
  body: await parseBody(output.body, context),
5149
5166
  };
5150
5167
  let response;
5151
- let errorCode = "UnknownError";
5152
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5168
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5153
5169
  switch (errorCode) {
5154
5170
  default:
5155
5171
  const parsedBody = parsedOutput.body;
5172
+ const $metadata = deserializeMetadata(output);
5173
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5156
5174
  response = new S3ServiceException_1.S3ServiceException({
5157
- name: parsedBody.code || parsedBody.Code || errorCode,
5175
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5158
5176
  $fault: "client",
5159
- $metadata: deserializeMetadata(output),
5177
+ $metadata,
5160
5178
  });
5161
5179
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5162
5180
  }
@@ -5190,15 +5208,16 @@ const deserializeAws_restXmlDeleteObjectCommandError = async (output, context) =
5190
5208
  body: await parseBody(output.body, context),
5191
5209
  };
5192
5210
  let response;
5193
- let errorCode = "UnknownError";
5194
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5211
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5195
5212
  switch (errorCode) {
5196
5213
  default:
5197
5214
  const parsedBody = parsedOutput.body;
5215
+ const $metadata = deserializeMetadata(output);
5216
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5198
5217
  response = new S3ServiceException_1.S3ServiceException({
5199
- name: parsedBody.code || parsedBody.Code || errorCode,
5218
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5200
5219
  $fault: "client",
5201
- $metadata: deserializeMetadata(output),
5220
+ $metadata,
5202
5221
  });
5203
5222
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5204
5223
  }
@@ -5238,15 +5257,16 @@ const deserializeAws_restXmlDeleteObjectsCommandError = async (output, context)
5238
5257
  body: await parseBody(output.body, context),
5239
5258
  };
5240
5259
  let response;
5241
- let errorCode = "UnknownError";
5242
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5260
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5243
5261
  switch (errorCode) {
5244
5262
  default:
5245
5263
  const parsedBody = parsedOutput.body;
5264
+ const $metadata = deserializeMetadata(output);
5265
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5246
5266
  response = new S3ServiceException_1.S3ServiceException({
5247
- name: parsedBody.code || parsedBody.Code || errorCode,
5267
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5248
5268
  $fault: "client",
5249
- $metadata: deserializeMetadata(output),
5269
+ $metadata,
5250
5270
  });
5251
5271
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5252
5272
  }
@@ -5272,15 +5292,16 @@ const deserializeAws_restXmlDeleteObjectTaggingCommandError = async (output, con
5272
5292
  body: await parseBody(output.body, context),
5273
5293
  };
5274
5294
  let response;
5275
- let errorCode = "UnknownError";
5276
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5295
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5277
5296
  switch (errorCode) {
5278
5297
  default:
5279
5298
  const parsedBody = parsedOutput.body;
5299
+ const $metadata = deserializeMetadata(output);
5300
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5280
5301
  response = new S3ServiceException_1.S3ServiceException({
5281
- name: parsedBody.code || parsedBody.Code || errorCode,
5302
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5282
5303
  $fault: "client",
5283
- $metadata: deserializeMetadata(output),
5304
+ $metadata,
5284
5305
  });
5285
5306
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5286
5307
  }
@@ -5302,15 +5323,16 @@ const deserializeAws_restXmlDeletePublicAccessBlockCommandError = async (output,
5302
5323
  body: await parseBody(output.body, context),
5303
5324
  };
5304
5325
  let response;
5305
- let errorCode = "UnknownError";
5306
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5326
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5307
5327
  switch (errorCode) {
5308
5328
  default:
5309
5329
  const parsedBody = parsedOutput.body;
5330
+ const $metadata = deserializeMetadata(output);
5331
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5310
5332
  response = new S3ServiceException_1.S3ServiceException({
5311
- name: parsedBody.code || parsedBody.Code || errorCode,
5333
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5312
5334
  $fault: "client",
5313
- $metadata: deserializeMetadata(output),
5335
+ $metadata,
5314
5336
  });
5315
5337
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5316
5338
  }
@@ -5336,15 +5358,16 @@ const deserializeAws_restXmlGetBucketAccelerateConfigurationCommandError = async
5336
5358
  body: await parseBody(output.body, context),
5337
5359
  };
5338
5360
  let response;
5339
- let errorCode = "UnknownError";
5340
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5361
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5341
5362
  switch (errorCode) {
5342
5363
  default:
5343
5364
  const parsedBody = parsedOutput.body;
5365
+ const $metadata = deserializeMetadata(output);
5366
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5344
5367
  response = new S3ServiceException_1.S3ServiceException({
5345
- name: parsedBody.code || parsedBody.Code || errorCode,
5368
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5346
5369
  $fault: "client",
5347
- $metadata: deserializeMetadata(output),
5370
+ $metadata,
5348
5371
  });
5349
5372
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5350
5373
  }
@@ -5377,15 +5400,16 @@ const deserializeAws_restXmlGetBucketAclCommandError = async (output, context) =
5377
5400
  body: await parseBody(output.body, context),
5378
5401
  };
5379
5402
  let response;
5380
- let errorCode = "UnknownError";
5381
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5403
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5382
5404
  switch (errorCode) {
5383
5405
  default:
5384
5406
  const parsedBody = parsedOutput.body;
5407
+ const $metadata = deserializeMetadata(output);
5408
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5385
5409
  response = new S3ServiceException_1.S3ServiceException({
5386
- name: parsedBody.code || parsedBody.Code || errorCode,
5410
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5387
5411
  $fault: "client",
5388
- $metadata: deserializeMetadata(output),
5412
+ $metadata,
5389
5413
  });
5390
5414
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5391
5415
  }
@@ -5409,15 +5433,16 @@ const deserializeAws_restXmlGetBucketAnalyticsConfigurationCommandError = async
5409
5433
  body: await parseBody(output.body, context),
5410
5434
  };
5411
5435
  let response;
5412
- let errorCode = "UnknownError";
5413
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5436
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5414
5437
  switch (errorCode) {
5415
5438
  default:
5416
5439
  const parsedBody = parsedOutput.body;
5440
+ const $metadata = deserializeMetadata(output);
5441
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5417
5442
  response = new S3ServiceException_1.S3ServiceException({
5418
- name: parsedBody.code || parsedBody.Code || errorCode,
5443
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5419
5444
  $fault: "client",
5420
- $metadata: deserializeMetadata(output),
5445
+ $metadata,
5421
5446
  });
5422
5447
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5423
5448
  }
@@ -5446,15 +5471,16 @@ const deserializeAws_restXmlGetBucketCorsCommandError = async (output, context)
5446
5471
  body: await parseBody(output.body, context),
5447
5472
  };
5448
5473
  let response;
5449
- let errorCode = "UnknownError";
5450
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5474
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5451
5475
  switch (errorCode) {
5452
5476
  default:
5453
5477
  const parsedBody = parsedOutput.body;
5478
+ const $metadata = deserializeMetadata(output);
5479
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5454
5480
  response = new S3ServiceException_1.S3ServiceException({
5455
- name: parsedBody.code || parsedBody.Code || errorCode,
5481
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5456
5482
  $fault: "client",
5457
- $metadata: deserializeMetadata(output),
5483
+ $metadata,
5458
5484
  });
5459
5485
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5460
5486
  }
@@ -5478,15 +5504,16 @@ const deserializeAws_restXmlGetBucketEncryptionCommandError = async (output, con
5478
5504
  body: await parseBody(output.body, context),
5479
5505
  };
5480
5506
  let response;
5481
- let errorCode = "UnknownError";
5482
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5507
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5483
5508
  switch (errorCode) {
5484
5509
  default:
5485
5510
  const parsedBody = parsedOutput.body;
5511
+ const $metadata = deserializeMetadata(output);
5512
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5486
5513
  response = new S3ServiceException_1.S3ServiceException({
5487
- name: parsedBody.code || parsedBody.Code || errorCode,
5514
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5488
5515
  $fault: "client",
5489
- $metadata: deserializeMetadata(output),
5516
+ $metadata,
5490
5517
  });
5491
5518
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5492
5519
  }
@@ -5510,15 +5537,16 @@ const deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommandError
5510
5537
  body: await parseBody(output.body, context),
5511
5538
  };
5512
5539
  let response;
5513
- let errorCode = "UnknownError";
5514
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5540
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5515
5541
  switch (errorCode) {
5516
5542
  default:
5517
5543
  const parsedBody = parsedOutput.body;
5544
+ const $metadata = deserializeMetadata(output);
5545
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5518
5546
  response = new S3ServiceException_1.S3ServiceException({
5519
- name: parsedBody.code || parsedBody.Code || errorCode,
5547
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5520
5548
  $fault: "client",
5521
- $metadata: deserializeMetadata(output),
5549
+ $metadata,
5522
5550
  });
5523
5551
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5524
5552
  }
@@ -5542,15 +5570,16 @@ const deserializeAws_restXmlGetBucketInventoryConfigurationCommandError = async
5542
5570
  body: await parseBody(output.body, context),
5543
5571
  };
5544
5572
  let response;
5545
- let errorCode = "UnknownError";
5546
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5573
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5547
5574
  switch (errorCode) {
5548
5575
  default:
5549
5576
  const parsedBody = parsedOutput.body;
5577
+ const $metadata = deserializeMetadata(output);
5578
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5550
5579
  response = new S3ServiceException_1.S3ServiceException({
5551
- name: parsedBody.code || parsedBody.Code || errorCode,
5580
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5552
5581
  $fault: "client",
5553
- $metadata: deserializeMetadata(output),
5582
+ $metadata,
5554
5583
  });
5555
5584
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5556
5585
  }
@@ -5579,15 +5608,16 @@ const deserializeAws_restXmlGetBucketLifecycleConfigurationCommandError = async
5579
5608
  body: await parseBody(output.body, context),
5580
5609
  };
5581
5610
  let response;
5582
- let errorCode = "UnknownError";
5583
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5611
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5584
5612
  switch (errorCode) {
5585
5613
  default:
5586
5614
  const parsedBody = parsedOutput.body;
5615
+ const $metadata = deserializeMetadata(output);
5616
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5587
5617
  response = new S3ServiceException_1.S3ServiceException({
5588
- name: parsedBody.code || parsedBody.Code || errorCode,
5618
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5589
5619
  $fault: "client",
5590
- $metadata: deserializeMetadata(output),
5620
+ $metadata,
5591
5621
  });
5592
5622
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5593
5623
  }
@@ -5613,15 +5643,16 @@ const deserializeAws_restXmlGetBucketLocationCommandError = async (output, conte
5613
5643
  body: await parseBody(output.body, context),
5614
5644
  };
5615
5645
  let response;
5616
- let errorCode = "UnknownError";
5617
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5646
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5618
5647
  switch (errorCode) {
5619
5648
  default:
5620
5649
  const parsedBody = parsedOutput.body;
5650
+ const $metadata = deserializeMetadata(output);
5651
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5621
5652
  response = new S3ServiceException_1.S3ServiceException({
5622
- name: parsedBody.code || parsedBody.Code || errorCode,
5653
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5623
5654
  $fault: "client",
5624
- $metadata: deserializeMetadata(output),
5655
+ $metadata,
5625
5656
  });
5626
5657
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5627
5658
  }
@@ -5647,15 +5678,16 @@ const deserializeAws_restXmlGetBucketLoggingCommandError = async (output, contex
5647
5678
  body: await parseBody(output.body, context),
5648
5679
  };
5649
5680
  let response;
5650
- let errorCode = "UnknownError";
5651
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5681
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5652
5682
  switch (errorCode) {
5653
5683
  default:
5654
5684
  const parsedBody = parsedOutput.body;
5685
+ const $metadata = deserializeMetadata(output);
5686
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5655
5687
  response = new S3ServiceException_1.S3ServiceException({
5656
- name: parsedBody.code || parsedBody.Code || errorCode,
5688
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5657
5689
  $fault: "client",
5658
- $metadata: deserializeMetadata(output),
5690
+ $metadata,
5659
5691
  });
5660
5692
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5661
5693
  }
@@ -5679,15 +5711,16 @@ const deserializeAws_restXmlGetBucketMetricsConfigurationCommandError = async (o
5679
5711
  body: await parseBody(output.body, context),
5680
5712
  };
5681
5713
  let response;
5682
- let errorCode = "UnknownError";
5683
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5714
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5684
5715
  switch (errorCode) {
5685
5716
  default:
5686
5717
  const parsedBody = parsedOutput.body;
5718
+ const $metadata = deserializeMetadata(output);
5719
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5687
5720
  response = new S3ServiceException_1.S3ServiceException({
5688
- name: parsedBody.code || parsedBody.Code || errorCode,
5721
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5689
5722
  $fault: "client",
5690
- $metadata: deserializeMetadata(output),
5723
+ $metadata,
5691
5724
  });
5692
5725
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5693
5726
  }
@@ -5734,15 +5767,16 @@ const deserializeAws_restXmlGetBucketNotificationConfigurationCommandError = asy
5734
5767
  body: await parseBody(output.body, context),
5735
5768
  };
5736
5769
  let response;
5737
- let errorCode = "UnknownError";
5738
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5770
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5739
5771
  switch (errorCode) {
5740
5772
  default:
5741
5773
  const parsedBody = parsedOutput.body;
5774
+ const $metadata = deserializeMetadata(output);
5775
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5742
5776
  response = new S3ServiceException_1.S3ServiceException({
5743
- name: parsedBody.code || parsedBody.Code || errorCode,
5777
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5744
5778
  $fault: "client",
5745
- $metadata: deserializeMetadata(output),
5779
+ $metadata,
5746
5780
  });
5747
5781
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5748
5782
  }
@@ -5766,15 +5800,16 @@ const deserializeAws_restXmlGetBucketOwnershipControlsCommandError = async (outp
5766
5800
  body: await parseBody(output.body, context),
5767
5801
  };
5768
5802
  let response;
5769
- let errorCode = "UnknownError";
5770
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5803
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5771
5804
  switch (errorCode) {
5772
5805
  default:
5773
5806
  const parsedBody = parsedOutput.body;
5807
+ const $metadata = deserializeMetadata(output);
5808
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5774
5809
  response = new S3ServiceException_1.S3ServiceException({
5775
- name: parsedBody.code || parsedBody.Code || errorCode,
5810
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5776
5811
  $fault: "client",
5777
- $metadata: deserializeMetadata(output),
5812
+ $metadata,
5778
5813
  });
5779
5814
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5780
5815
  }
@@ -5798,15 +5833,16 @@ const deserializeAws_restXmlGetBucketPolicyCommandError = async (output, context
5798
5833
  body: await parseBody(output.body, context),
5799
5834
  };
5800
5835
  let response;
5801
- let errorCode = "UnknownError";
5802
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5836
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5803
5837
  switch (errorCode) {
5804
5838
  default:
5805
5839
  const parsedBody = parsedOutput.body;
5840
+ const $metadata = deserializeMetadata(output);
5841
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5806
5842
  response = new S3ServiceException_1.S3ServiceException({
5807
- name: parsedBody.code || parsedBody.Code || errorCode,
5843
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5808
5844
  $fault: "client",
5809
- $metadata: deserializeMetadata(output),
5845
+ $metadata,
5810
5846
  });
5811
5847
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5812
5848
  }
@@ -5830,15 +5866,16 @@ const deserializeAws_restXmlGetBucketPolicyStatusCommandError = async (output, c
5830
5866
  body: await parseBody(output.body, context),
5831
5867
  };
5832
5868
  let response;
5833
- let errorCode = "UnknownError";
5834
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5869
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5835
5870
  switch (errorCode) {
5836
5871
  default:
5837
5872
  const parsedBody = parsedOutput.body;
5873
+ const $metadata = deserializeMetadata(output);
5874
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5838
5875
  response = new S3ServiceException_1.S3ServiceException({
5839
- name: parsedBody.code || parsedBody.Code || errorCode,
5876
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5840
5877
  $fault: "client",
5841
- $metadata: deserializeMetadata(output),
5878
+ $metadata,
5842
5879
  });
5843
5880
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5844
5881
  }
@@ -5862,15 +5899,16 @@ const deserializeAws_restXmlGetBucketReplicationCommandError = async (output, co
5862
5899
  body: await parseBody(output.body, context),
5863
5900
  };
5864
5901
  let response;
5865
- let errorCode = "UnknownError";
5866
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5902
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5867
5903
  switch (errorCode) {
5868
5904
  default:
5869
5905
  const parsedBody = parsedOutput.body;
5906
+ const $metadata = deserializeMetadata(output);
5907
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5870
5908
  response = new S3ServiceException_1.S3ServiceException({
5871
- name: parsedBody.code || parsedBody.Code || errorCode,
5909
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5872
5910
  $fault: "client",
5873
- $metadata: deserializeMetadata(output),
5911
+ $metadata,
5874
5912
  });
5875
5913
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5876
5914
  }
@@ -5896,15 +5934,16 @@ const deserializeAws_restXmlGetBucketRequestPaymentCommandError = async (output,
5896
5934
  body: await parseBody(output.body, context),
5897
5935
  };
5898
5936
  let response;
5899
- let errorCode = "UnknownError";
5900
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5937
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5901
5938
  switch (errorCode) {
5902
5939
  default:
5903
5940
  const parsedBody = parsedOutput.body;
5941
+ const $metadata = deserializeMetadata(output);
5942
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5904
5943
  response = new S3ServiceException_1.S3ServiceException({
5905
- name: parsedBody.code || parsedBody.Code || errorCode,
5944
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5906
5945
  $fault: "client",
5907
- $metadata: deserializeMetadata(output),
5946
+ $metadata,
5908
5947
  });
5909
5948
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5910
5949
  }
@@ -5933,15 +5972,16 @@ const deserializeAws_restXmlGetBucketTaggingCommandError = async (output, contex
5933
5972
  body: await parseBody(output.body, context),
5934
5973
  };
5935
5974
  let response;
5936
- let errorCode = "UnknownError";
5937
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5975
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5938
5976
  switch (errorCode) {
5939
5977
  default:
5940
5978
  const parsedBody = parsedOutput.body;
5979
+ const $metadata = deserializeMetadata(output);
5980
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5941
5981
  response = new S3ServiceException_1.S3ServiceException({
5942
- name: parsedBody.code || parsedBody.Code || errorCode,
5982
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5943
5983
  $fault: "client",
5944
- $metadata: deserializeMetadata(output),
5984
+ $metadata,
5945
5985
  });
5946
5986
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5947
5987
  }
@@ -5971,15 +6011,16 @@ const deserializeAws_restXmlGetBucketVersioningCommandError = async (output, con
5971
6011
  body: await parseBody(output.body, context),
5972
6012
  };
5973
6013
  let response;
5974
- let errorCode = "UnknownError";
5975
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6014
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
5976
6015
  switch (errorCode) {
5977
6016
  default:
5978
6017
  const parsedBody = parsedOutput.body;
6018
+ const $metadata = deserializeMetadata(output);
6019
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
5979
6020
  response = new S3ServiceException_1.S3ServiceException({
5980
- name: parsedBody.code || parsedBody.Code || errorCode,
6021
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
5981
6022
  $fault: "client",
5982
- $metadata: deserializeMetadata(output),
6023
+ $metadata,
5983
6024
  });
5984
6025
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
5985
6026
  }
@@ -6020,15 +6061,16 @@ const deserializeAws_restXmlGetBucketWebsiteCommandError = async (output, contex
6020
6061
  body: await parseBody(output.body, context),
6021
6062
  };
6022
6063
  let response;
6023
- let errorCode = "UnknownError";
6024
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6064
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6025
6065
  switch (errorCode) {
6026
6066
  default:
6027
6067
  const parsedBody = parsedOutput.body;
6068
+ const $metadata = deserializeMetadata(output);
6069
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6028
6070
  response = new S3ServiceException_1.S3ServiceException({
6029
- name: parsedBody.code || parsedBody.Code || errorCode,
6071
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6030
6072
  $fault: "client",
6031
- $metadata: deserializeMetadata(output),
6073
+ $metadata,
6032
6074
  });
6033
6075
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6034
6076
  }
@@ -6197,8 +6239,7 @@ const deserializeAws_restXmlGetObjectCommandError = async (output, context) => {
6197
6239
  body: await parseBody(output.body, context),
6198
6240
  };
6199
6241
  let response;
6200
- let errorCode = "UnknownError";
6201
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6242
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6202
6243
  switch (errorCode) {
6203
6244
  case "InvalidObjectState":
6204
6245
  case "com.amazonaws.s3#InvalidObjectState":
@@ -6208,10 +6249,12 @@ const deserializeAws_restXmlGetObjectCommandError = async (output, context) => {
6208
6249
  throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context);
6209
6250
  default:
6210
6251
  const parsedBody = parsedOutput.body;
6252
+ const $metadata = deserializeMetadata(output);
6253
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6211
6254
  response = new S3ServiceException_1.S3ServiceException({
6212
- name: parsedBody.code || parsedBody.Code || errorCode,
6255
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6213
6256
  $fault: "client",
6214
- $metadata: deserializeMetadata(output),
6257
+ $metadata,
6215
6258
  });
6216
6259
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6217
6260
  }
@@ -6248,18 +6291,19 @@ const deserializeAws_restXmlGetObjectAclCommandError = async (output, context) =
6248
6291
  body: await parseBody(output.body, context),
6249
6292
  };
6250
6293
  let response;
6251
- let errorCode = "UnknownError";
6252
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6294
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6253
6295
  switch (errorCode) {
6254
6296
  case "NoSuchKey":
6255
6297
  case "com.amazonaws.s3#NoSuchKey":
6256
6298
  throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context);
6257
6299
  default:
6258
6300
  const parsedBody = parsedOutput.body;
6301
+ const $metadata = deserializeMetadata(output);
6302
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6259
6303
  response = new S3ServiceException_1.S3ServiceException({
6260
- name: parsedBody.code || parsedBody.Code || errorCode,
6304
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6261
6305
  $fault: "client",
6262
- $metadata: deserializeMetadata(output),
6306
+ $metadata,
6263
6307
  });
6264
6308
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6265
6309
  }
@@ -6317,18 +6361,19 @@ const deserializeAws_restXmlGetObjectAttributesCommandError = async (output, con
6317
6361
  body: await parseBody(output.body, context),
6318
6362
  };
6319
6363
  let response;
6320
- let errorCode = "UnknownError";
6321
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6364
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6322
6365
  switch (errorCode) {
6323
6366
  case "NoSuchKey":
6324
6367
  case "com.amazonaws.s3#NoSuchKey":
6325
6368
  throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context);
6326
6369
  default:
6327
6370
  const parsedBody = parsedOutput.body;
6371
+ const $metadata = deserializeMetadata(output);
6372
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6328
6373
  response = new S3ServiceException_1.S3ServiceException({
6329
- name: parsedBody.code || parsedBody.Code || errorCode,
6374
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6330
6375
  $fault: "client",
6331
- $metadata: deserializeMetadata(output),
6376
+ $metadata,
6332
6377
  });
6333
6378
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6334
6379
  }
@@ -6352,15 +6397,16 @@ const deserializeAws_restXmlGetObjectLegalHoldCommandError = async (output, cont
6352
6397
  body: await parseBody(output.body, context),
6353
6398
  };
6354
6399
  let response;
6355
- let errorCode = "UnknownError";
6356
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6400
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6357
6401
  switch (errorCode) {
6358
6402
  default:
6359
6403
  const parsedBody = parsedOutput.body;
6404
+ const $metadata = deserializeMetadata(output);
6405
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6360
6406
  response = new S3ServiceException_1.S3ServiceException({
6361
- name: parsedBody.code || parsedBody.Code || errorCode,
6407
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6362
6408
  $fault: "client",
6363
- $metadata: deserializeMetadata(output),
6409
+ $metadata,
6364
6410
  });
6365
6411
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6366
6412
  }
@@ -6384,15 +6430,16 @@ const deserializeAws_restXmlGetObjectLockConfigurationCommandError = async (outp
6384
6430
  body: await parseBody(output.body, context),
6385
6431
  };
6386
6432
  let response;
6387
- let errorCode = "UnknownError";
6388
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6433
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6389
6434
  switch (errorCode) {
6390
6435
  default:
6391
6436
  const parsedBody = parsedOutput.body;
6437
+ const $metadata = deserializeMetadata(output);
6438
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6392
6439
  response = new S3ServiceException_1.S3ServiceException({
6393
- name: parsedBody.code || parsedBody.Code || errorCode,
6440
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6394
6441
  $fault: "client",
6395
- $metadata: deserializeMetadata(output),
6442
+ $metadata,
6396
6443
  });
6397
6444
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6398
6445
  }
@@ -6416,15 +6463,16 @@ const deserializeAws_restXmlGetObjectRetentionCommandError = async (output, cont
6416
6463
  body: await parseBody(output.body, context),
6417
6464
  };
6418
6465
  let response;
6419
- let errorCode = "UnknownError";
6420
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6466
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6421
6467
  switch (errorCode) {
6422
6468
  default:
6423
6469
  const parsedBody = parsedOutput.body;
6470
+ const $metadata = deserializeMetadata(output);
6471
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6424
6472
  response = new S3ServiceException_1.S3ServiceException({
6425
- name: parsedBody.code || parsedBody.Code || errorCode,
6473
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6426
6474
  $fault: "client",
6427
- $metadata: deserializeMetadata(output),
6475
+ $metadata,
6428
6476
  });
6429
6477
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6430
6478
  }
@@ -6457,15 +6505,16 @@ const deserializeAws_restXmlGetObjectTaggingCommandError = async (output, contex
6457
6505
  body: await parseBody(output.body, context),
6458
6506
  };
6459
6507
  let response;
6460
- let errorCode = "UnknownError";
6461
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6508
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6462
6509
  switch (errorCode) {
6463
6510
  default:
6464
6511
  const parsedBody = parsedOutput.body;
6512
+ const $metadata = deserializeMetadata(output);
6513
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6465
6514
  response = new S3ServiceException_1.S3ServiceException({
6466
- name: parsedBody.code || parsedBody.Code || errorCode,
6515
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6467
6516
  $fault: "client",
6468
- $metadata: deserializeMetadata(output),
6517
+ $metadata,
6469
6518
  });
6470
6519
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6471
6520
  }
@@ -6493,15 +6542,16 @@ const deserializeAws_restXmlGetObjectTorrentCommandError = async (output, contex
6493
6542
  body: await parseBody(output.body, context),
6494
6543
  };
6495
6544
  let response;
6496
- let errorCode = "UnknownError";
6497
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6545
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6498
6546
  switch (errorCode) {
6499
6547
  default:
6500
6548
  const parsedBody = parsedOutput.body;
6549
+ const $metadata = deserializeMetadata(output);
6550
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6501
6551
  response = new S3ServiceException_1.S3ServiceException({
6502
- name: parsedBody.code || parsedBody.Code || errorCode,
6552
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6503
6553
  $fault: "client",
6504
- $metadata: deserializeMetadata(output),
6554
+ $metadata,
6505
6555
  });
6506
6556
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6507
6557
  }
@@ -6525,15 +6575,16 @@ const deserializeAws_restXmlGetPublicAccessBlockCommandError = async (output, co
6525
6575
  body: await parseBody(output.body, context),
6526
6576
  };
6527
6577
  let response;
6528
- let errorCode = "UnknownError";
6529
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6578
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6530
6579
  switch (errorCode) {
6531
6580
  default:
6532
6581
  const parsedBody = parsedOutput.body;
6582
+ const $metadata = deserializeMetadata(output);
6583
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6533
6584
  response = new S3ServiceException_1.S3ServiceException({
6534
- name: parsedBody.code || parsedBody.Code || errorCode,
6585
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6535
6586
  $fault: "client",
6536
- $metadata: deserializeMetadata(output),
6587
+ $metadata,
6537
6588
  });
6538
6589
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6539
6590
  }
@@ -6555,18 +6606,19 @@ const deserializeAws_restXmlHeadBucketCommandError = async (output, context) =>
6555
6606
  body: await parseBody(output.body, context),
6556
6607
  };
6557
6608
  let response;
6558
- let errorCode = "UnknownError";
6559
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6609
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6560
6610
  switch (errorCode) {
6561
6611
  case "NotFound":
6562
6612
  case "com.amazonaws.s3#NotFound":
6563
6613
  throw await deserializeAws_restXmlNotFoundResponse(parsedOutput, context);
6564
6614
  default:
6565
6615
  const parsedBody = parsedOutput.body;
6616
+ const $metadata = deserializeMetadata(output);
6617
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6566
6618
  response = new S3ServiceException_1.S3ServiceException({
6567
- name: parsedBody.code || parsedBody.Code || errorCode,
6619
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6568
6620
  $fault: "client",
6569
- $metadata: deserializeMetadata(output),
6621
+ $metadata,
6570
6622
  });
6571
6623
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6572
6624
  }
@@ -6729,18 +6781,19 @@ const deserializeAws_restXmlHeadObjectCommandError = async (output, context) =>
6729
6781
  body: await parseBody(output.body, context),
6730
6782
  };
6731
6783
  let response;
6732
- let errorCode = "UnknownError";
6733
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6784
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6734
6785
  switch (errorCode) {
6735
6786
  case "NotFound":
6736
6787
  case "com.amazonaws.s3#NotFound":
6737
6788
  throw await deserializeAws_restXmlNotFoundResponse(parsedOutput, context);
6738
6789
  default:
6739
6790
  const parsedBody = parsedOutput.body;
6791
+ const $metadata = deserializeMetadata(output);
6792
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6740
6793
  response = new S3ServiceException_1.S3ServiceException({
6741
- name: parsedBody.code || parsedBody.Code || errorCode,
6794
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6742
6795
  $fault: "client",
6743
- $metadata: deserializeMetadata(output),
6796
+ $metadata,
6744
6797
  });
6745
6798
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6746
6799
  }
@@ -6781,15 +6834,16 @@ const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommandError = asyn
6781
6834
  body: await parseBody(output.body, context),
6782
6835
  };
6783
6836
  let response;
6784
- let errorCode = "UnknownError";
6785
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6837
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6786
6838
  switch (errorCode) {
6787
6839
  default:
6788
6840
  const parsedBody = parsedOutput.body;
6841
+ const $metadata = deserializeMetadata(output);
6842
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6789
6843
  response = new S3ServiceException_1.S3ServiceException({
6790
- name: parsedBody.code || parsedBody.Code || errorCode,
6844
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6791
6845
  $fault: "client",
6792
- $metadata: deserializeMetadata(output),
6846
+ $metadata,
6793
6847
  });
6794
6848
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6795
6849
  }
@@ -6830,15 +6884,16 @@ const deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommandErr
6830
6884
  body: await parseBody(output.body, context),
6831
6885
  };
6832
6886
  let response;
6833
- let errorCode = "UnknownError";
6834
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6887
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6835
6888
  switch (errorCode) {
6836
6889
  default:
6837
6890
  const parsedBody = parsedOutput.body;
6891
+ const $metadata = deserializeMetadata(output);
6892
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6838
6893
  response = new S3ServiceException_1.S3ServiceException({
6839
- name: parsedBody.code || parsedBody.Code || errorCode,
6894
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6840
6895
  $fault: "client",
6841
- $metadata: deserializeMetadata(output),
6896
+ $metadata,
6842
6897
  });
6843
6898
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6844
6899
  }
@@ -6879,15 +6934,16 @@ const deserializeAws_restXmlListBucketInventoryConfigurationsCommandError = asyn
6879
6934
  body: await parseBody(output.body, context),
6880
6935
  };
6881
6936
  let response;
6882
- let errorCode = "UnknownError";
6883
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6937
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6884
6938
  switch (errorCode) {
6885
6939
  default:
6886
6940
  const parsedBody = parsedOutput.body;
6941
+ const $metadata = deserializeMetadata(output);
6942
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6887
6943
  response = new S3ServiceException_1.S3ServiceException({
6888
- name: parsedBody.code || parsedBody.Code || errorCode,
6944
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6889
6945
  $fault: "client",
6890
- $metadata: deserializeMetadata(output),
6946
+ $metadata,
6891
6947
  });
6892
6948
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6893
6949
  }
@@ -6928,15 +6984,16 @@ const deserializeAws_restXmlListBucketMetricsConfigurationsCommandError = async
6928
6984
  body: await parseBody(output.body, context),
6929
6985
  };
6930
6986
  let response;
6931
- let errorCode = "UnknownError";
6932
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6987
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6933
6988
  switch (errorCode) {
6934
6989
  default:
6935
6990
  const parsedBody = parsedOutput.body;
6991
+ const $metadata = deserializeMetadata(output);
6992
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6936
6993
  response = new S3ServiceException_1.S3ServiceException({
6937
- name: parsedBody.code || parsedBody.Code || errorCode,
6994
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6938
6995
  $fault: "client",
6939
- $metadata: deserializeMetadata(output),
6996
+ $metadata,
6940
6997
  });
6941
6998
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6942
6999
  }
@@ -6969,15 +7026,16 @@ const deserializeAws_restXmlListBucketsCommandError = async (output, context) =>
6969
7026
  body: await parseBody(output.body, context),
6970
7027
  };
6971
7028
  let response;
6972
- let errorCode = "UnknownError";
6973
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7029
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
6974
7030
  switch (errorCode) {
6975
7031
  default:
6976
7032
  const parsedBody = parsedOutput.body;
7033
+ const $metadata = deserializeMetadata(output);
7034
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
6977
7035
  response = new S3ServiceException_1.S3ServiceException({
6978
- name: parsedBody.code || parsedBody.Code || errorCode,
7036
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
6979
7037
  $fault: "client",
6980
- $metadata: deserializeMetadata(output),
7038
+ $metadata,
6981
7039
  });
6982
7040
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
6983
7041
  }
@@ -7053,15 +7111,16 @@ const deserializeAws_restXmlListMultipartUploadsCommandError = async (output, co
7053
7111
  body: await parseBody(output.body, context),
7054
7112
  };
7055
7113
  let response;
7056
- let errorCode = "UnknownError";
7057
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7114
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7058
7115
  switch (errorCode) {
7059
7116
  default:
7060
7117
  const parsedBody = parsedOutput.body;
7118
+ const $metadata = deserializeMetadata(output);
7119
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7061
7120
  response = new S3ServiceException_1.S3ServiceException({
7062
- name: parsedBody.code || parsedBody.Code || errorCode,
7121
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7063
7122
  $fault: "client",
7064
- $metadata: deserializeMetadata(output),
7123
+ $metadata,
7065
7124
  });
7066
7125
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7067
7126
  }
@@ -7129,18 +7188,19 @@ const deserializeAws_restXmlListObjectsCommandError = async (output, context) =>
7129
7188
  body: await parseBody(output.body, context),
7130
7189
  };
7131
7190
  let response;
7132
- let errorCode = "UnknownError";
7133
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7191
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7134
7192
  switch (errorCode) {
7135
7193
  case "NoSuchBucket":
7136
7194
  case "com.amazonaws.s3#NoSuchBucket":
7137
7195
  throw await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context);
7138
7196
  default:
7139
7197
  const parsedBody = parsedOutput.body;
7198
+ const $metadata = deserializeMetadata(output);
7199
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7140
7200
  response = new S3ServiceException_1.S3ServiceException({
7141
- name: parsedBody.code || parsedBody.Code || errorCode,
7201
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7142
7202
  $fault: "client",
7143
- $metadata: deserializeMetadata(output),
7203
+ $metadata,
7144
7204
  });
7145
7205
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7146
7206
  }
@@ -7216,18 +7276,19 @@ const deserializeAws_restXmlListObjectsV2CommandError = async (output, context)
7216
7276
  body: await parseBody(output.body, context),
7217
7277
  };
7218
7278
  let response;
7219
- let errorCode = "UnknownError";
7220
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7279
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7221
7280
  switch (errorCode) {
7222
7281
  case "NoSuchBucket":
7223
7282
  case "com.amazonaws.s3#NoSuchBucket":
7224
7283
  throw await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context);
7225
7284
  default:
7226
7285
  const parsedBody = parsedOutput.body;
7286
+ const $metadata = deserializeMetadata(output);
7287
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7227
7288
  response = new S3ServiceException_1.S3ServiceException({
7228
- name: parsedBody.code || parsedBody.Code || errorCode,
7289
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7229
7290
  $fault: "client",
7230
- $metadata: deserializeMetadata(output),
7291
+ $metadata,
7231
7292
  });
7232
7293
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7233
7294
  }
@@ -7310,15 +7371,16 @@ const deserializeAws_restXmlListObjectVersionsCommandError = async (output, cont
7310
7371
  body: await parseBody(output.body, context),
7311
7372
  };
7312
7373
  let response;
7313
- let errorCode = "UnknownError";
7314
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7374
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7315
7375
  switch (errorCode) {
7316
7376
  default:
7317
7377
  const parsedBody = parsedOutput.body;
7378
+ const $metadata = deserializeMetadata(output);
7379
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7318
7380
  response = new S3ServiceException_1.S3ServiceException({
7319
- name: parsedBody.code || parsedBody.Code || errorCode,
7381
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7320
7382
  $fault: "client",
7321
- $metadata: deserializeMetadata(output),
7383
+ $metadata,
7322
7384
  });
7323
7385
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7324
7386
  }
@@ -7403,15 +7465,16 @@ const deserializeAws_restXmlListPartsCommandError = async (output, context) => {
7403
7465
  body: await parseBody(output.body, context),
7404
7466
  };
7405
7467
  let response;
7406
- let errorCode = "UnknownError";
7407
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7468
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7408
7469
  switch (errorCode) {
7409
7470
  default:
7410
7471
  const parsedBody = parsedOutput.body;
7472
+ const $metadata = deserializeMetadata(output);
7473
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7411
7474
  response = new S3ServiceException_1.S3ServiceException({
7412
- name: parsedBody.code || parsedBody.Code || errorCode,
7475
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7413
7476
  $fault: "client",
7414
- $metadata: deserializeMetadata(output),
7477
+ $metadata,
7415
7478
  });
7416
7479
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7417
7480
  }
@@ -7433,15 +7496,16 @@ const deserializeAws_restXmlPutBucketAccelerateConfigurationCommandError = async
7433
7496
  body: await parseBody(output.body, context),
7434
7497
  };
7435
7498
  let response;
7436
- let errorCode = "UnknownError";
7437
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7499
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7438
7500
  switch (errorCode) {
7439
7501
  default:
7440
7502
  const parsedBody = parsedOutput.body;
7503
+ const $metadata = deserializeMetadata(output);
7504
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7441
7505
  response = new S3ServiceException_1.S3ServiceException({
7442
- name: parsedBody.code || parsedBody.Code || errorCode,
7506
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7443
7507
  $fault: "client",
7444
- $metadata: deserializeMetadata(output),
7508
+ $metadata,
7445
7509
  });
7446
7510
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7447
7511
  }
@@ -7463,15 +7527,16 @@ const deserializeAws_restXmlPutBucketAclCommandError = async (output, context) =
7463
7527
  body: await parseBody(output.body, context),
7464
7528
  };
7465
7529
  let response;
7466
- let errorCode = "UnknownError";
7467
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7530
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7468
7531
  switch (errorCode) {
7469
7532
  default:
7470
7533
  const parsedBody = parsedOutput.body;
7534
+ const $metadata = deserializeMetadata(output);
7535
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7471
7536
  response = new S3ServiceException_1.S3ServiceException({
7472
- name: parsedBody.code || parsedBody.Code || errorCode,
7537
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7473
7538
  $fault: "client",
7474
- $metadata: deserializeMetadata(output),
7539
+ $metadata,
7475
7540
  });
7476
7541
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7477
7542
  }
@@ -7493,15 +7558,16 @@ const deserializeAws_restXmlPutBucketAnalyticsConfigurationCommandError = async
7493
7558
  body: await parseBody(output.body, context),
7494
7559
  };
7495
7560
  let response;
7496
- let errorCode = "UnknownError";
7497
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7561
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7498
7562
  switch (errorCode) {
7499
7563
  default:
7500
7564
  const parsedBody = parsedOutput.body;
7565
+ const $metadata = deserializeMetadata(output);
7566
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7501
7567
  response = new S3ServiceException_1.S3ServiceException({
7502
- name: parsedBody.code || parsedBody.Code || errorCode,
7568
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7503
7569
  $fault: "client",
7504
- $metadata: deserializeMetadata(output),
7570
+ $metadata,
7505
7571
  });
7506
7572
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7507
7573
  }
@@ -7523,15 +7589,16 @@ const deserializeAws_restXmlPutBucketCorsCommandError = async (output, context)
7523
7589
  body: await parseBody(output.body, context),
7524
7590
  };
7525
7591
  let response;
7526
- let errorCode = "UnknownError";
7527
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7592
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7528
7593
  switch (errorCode) {
7529
7594
  default:
7530
7595
  const parsedBody = parsedOutput.body;
7596
+ const $metadata = deserializeMetadata(output);
7597
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7531
7598
  response = new S3ServiceException_1.S3ServiceException({
7532
- name: parsedBody.code || parsedBody.Code || errorCode,
7599
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7533
7600
  $fault: "client",
7534
- $metadata: deserializeMetadata(output),
7601
+ $metadata,
7535
7602
  });
7536
7603
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7537
7604
  }
@@ -7553,15 +7620,16 @@ const deserializeAws_restXmlPutBucketEncryptionCommandError = async (output, con
7553
7620
  body: await parseBody(output.body, context),
7554
7621
  };
7555
7622
  let response;
7556
- let errorCode = "UnknownError";
7557
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7623
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7558
7624
  switch (errorCode) {
7559
7625
  default:
7560
7626
  const parsedBody = parsedOutput.body;
7627
+ const $metadata = deserializeMetadata(output);
7628
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7561
7629
  response = new S3ServiceException_1.S3ServiceException({
7562
- name: parsedBody.code || parsedBody.Code || errorCode,
7630
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7563
7631
  $fault: "client",
7564
- $metadata: deserializeMetadata(output),
7632
+ $metadata,
7565
7633
  });
7566
7634
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7567
7635
  }
@@ -7583,15 +7651,16 @@ const deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommandError
7583
7651
  body: await parseBody(output.body, context),
7584
7652
  };
7585
7653
  let response;
7586
- let errorCode = "UnknownError";
7587
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7654
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7588
7655
  switch (errorCode) {
7589
7656
  default:
7590
7657
  const parsedBody = parsedOutput.body;
7658
+ const $metadata = deserializeMetadata(output);
7659
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7591
7660
  response = new S3ServiceException_1.S3ServiceException({
7592
- name: parsedBody.code || parsedBody.Code || errorCode,
7661
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7593
7662
  $fault: "client",
7594
- $metadata: deserializeMetadata(output),
7663
+ $metadata,
7595
7664
  });
7596
7665
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7597
7666
  }
@@ -7613,15 +7682,16 @@ const deserializeAws_restXmlPutBucketInventoryConfigurationCommandError = async
7613
7682
  body: await parseBody(output.body, context),
7614
7683
  };
7615
7684
  let response;
7616
- let errorCode = "UnknownError";
7617
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7685
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7618
7686
  switch (errorCode) {
7619
7687
  default:
7620
7688
  const parsedBody = parsedOutput.body;
7689
+ const $metadata = deserializeMetadata(output);
7690
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7621
7691
  response = new S3ServiceException_1.S3ServiceException({
7622
- name: parsedBody.code || parsedBody.Code || errorCode,
7692
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7623
7693
  $fault: "client",
7624
- $metadata: deserializeMetadata(output),
7694
+ $metadata,
7625
7695
  });
7626
7696
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7627
7697
  }
@@ -7643,15 +7713,16 @@ const deserializeAws_restXmlPutBucketLifecycleConfigurationCommandError = async
7643
7713
  body: await parseBody(output.body, context),
7644
7714
  };
7645
7715
  let response;
7646
- let errorCode = "UnknownError";
7647
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7716
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7648
7717
  switch (errorCode) {
7649
7718
  default:
7650
7719
  const parsedBody = parsedOutput.body;
7720
+ const $metadata = deserializeMetadata(output);
7721
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7651
7722
  response = new S3ServiceException_1.S3ServiceException({
7652
- name: parsedBody.code || parsedBody.Code || errorCode,
7723
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7653
7724
  $fault: "client",
7654
- $metadata: deserializeMetadata(output),
7725
+ $metadata,
7655
7726
  });
7656
7727
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7657
7728
  }
@@ -7673,15 +7744,16 @@ const deserializeAws_restXmlPutBucketLoggingCommandError = async (output, contex
7673
7744
  body: await parseBody(output.body, context),
7674
7745
  };
7675
7746
  let response;
7676
- let errorCode = "UnknownError";
7677
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7747
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7678
7748
  switch (errorCode) {
7679
7749
  default:
7680
7750
  const parsedBody = parsedOutput.body;
7751
+ const $metadata = deserializeMetadata(output);
7752
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7681
7753
  response = new S3ServiceException_1.S3ServiceException({
7682
- name: parsedBody.code || parsedBody.Code || errorCode,
7754
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7683
7755
  $fault: "client",
7684
- $metadata: deserializeMetadata(output),
7756
+ $metadata,
7685
7757
  });
7686
7758
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7687
7759
  }
@@ -7703,15 +7775,16 @@ const deserializeAws_restXmlPutBucketMetricsConfigurationCommandError = async (o
7703
7775
  body: await parseBody(output.body, context),
7704
7776
  };
7705
7777
  let response;
7706
- let errorCode = "UnknownError";
7707
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7778
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7708
7779
  switch (errorCode) {
7709
7780
  default:
7710
7781
  const parsedBody = parsedOutput.body;
7782
+ const $metadata = deserializeMetadata(output);
7783
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7711
7784
  response = new S3ServiceException_1.S3ServiceException({
7712
- name: parsedBody.code || parsedBody.Code || errorCode,
7785
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7713
7786
  $fault: "client",
7714
- $metadata: deserializeMetadata(output),
7787
+ $metadata,
7715
7788
  });
7716
7789
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7717
7790
  }
@@ -7733,15 +7806,16 @@ const deserializeAws_restXmlPutBucketNotificationConfigurationCommandError = asy
7733
7806
  body: await parseBody(output.body, context),
7734
7807
  };
7735
7808
  let response;
7736
- let errorCode = "UnknownError";
7737
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7809
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7738
7810
  switch (errorCode) {
7739
7811
  default:
7740
7812
  const parsedBody = parsedOutput.body;
7813
+ const $metadata = deserializeMetadata(output);
7814
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7741
7815
  response = new S3ServiceException_1.S3ServiceException({
7742
- name: parsedBody.code || parsedBody.Code || errorCode,
7816
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7743
7817
  $fault: "client",
7744
- $metadata: deserializeMetadata(output),
7818
+ $metadata,
7745
7819
  });
7746
7820
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7747
7821
  }
@@ -7763,15 +7837,16 @@ const deserializeAws_restXmlPutBucketOwnershipControlsCommandError = async (outp
7763
7837
  body: await parseBody(output.body, context),
7764
7838
  };
7765
7839
  let response;
7766
- let errorCode = "UnknownError";
7767
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7840
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7768
7841
  switch (errorCode) {
7769
7842
  default:
7770
7843
  const parsedBody = parsedOutput.body;
7844
+ const $metadata = deserializeMetadata(output);
7845
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7771
7846
  response = new S3ServiceException_1.S3ServiceException({
7772
- name: parsedBody.code || parsedBody.Code || errorCode,
7847
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7773
7848
  $fault: "client",
7774
- $metadata: deserializeMetadata(output),
7849
+ $metadata,
7775
7850
  });
7776
7851
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7777
7852
  }
@@ -7793,15 +7868,16 @@ const deserializeAws_restXmlPutBucketPolicyCommandError = async (output, context
7793
7868
  body: await parseBody(output.body, context),
7794
7869
  };
7795
7870
  let response;
7796
- let errorCode = "UnknownError";
7797
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7871
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7798
7872
  switch (errorCode) {
7799
7873
  default:
7800
7874
  const parsedBody = parsedOutput.body;
7875
+ const $metadata = deserializeMetadata(output);
7876
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7801
7877
  response = new S3ServiceException_1.S3ServiceException({
7802
- name: parsedBody.code || parsedBody.Code || errorCode,
7878
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7803
7879
  $fault: "client",
7804
- $metadata: deserializeMetadata(output),
7880
+ $metadata,
7805
7881
  });
7806
7882
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7807
7883
  }
@@ -7823,15 +7899,16 @@ const deserializeAws_restXmlPutBucketReplicationCommandError = async (output, co
7823
7899
  body: await parseBody(output.body, context),
7824
7900
  };
7825
7901
  let response;
7826
- let errorCode = "UnknownError";
7827
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7902
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7828
7903
  switch (errorCode) {
7829
7904
  default:
7830
7905
  const parsedBody = parsedOutput.body;
7906
+ const $metadata = deserializeMetadata(output);
7907
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7831
7908
  response = new S3ServiceException_1.S3ServiceException({
7832
- name: parsedBody.code || parsedBody.Code || errorCode,
7909
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7833
7910
  $fault: "client",
7834
- $metadata: deserializeMetadata(output),
7911
+ $metadata,
7835
7912
  });
7836
7913
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7837
7914
  }
@@ -7853,15 +7930,16 @@ const deserializeAws_restXmlPutBucketRequestPaymentCommandError = async (output,
7853
7930
  body: await parseBody(output.body, context),
7854
7931
  };
7855
7932
  let response;
7856
- let errorCode = "UnknownError";
7857
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7933
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7858
7934
  switch (errorCode) {
7859
7935
  default:
7860
7936
  const parsedBody = parsedOutput.body;
7937
+ const $metadata = deserializeMetadata(output);
7938
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7861
7939
  response = new S3ServiceException_1.S3ServiceException({
7862
- name: parsedBody.code || parsedBody.Code || errorCode,
7940
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7863
7941
  $fault: "client",
7864
- $metadata: deserializeMetadata(output),
7942
+ $metadata,
7865
7943
  });
7866
7944
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7867
7945
  }
@@ -7883,15 +7961,16 @@ const deserializeAws_restXmlPutBucketTaggingCommandError = async (output, contex
7883
7961
  body: await parseBody(output.body, context),
7884
7962
  };
7885
7963
  let response;
7886
- let errorCode = "UnknownError";
7887
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7964
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7888
7965
  switch (errorCode) {
7889
7966
  default:
7890
7967
  const parsedBody = parsedOutput.body;
7968
+ const $metadata = deserializeMetadata(output);
7969
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7891
7970
  response = new S3ServiceException_1.S3ServiceException({
7892
- name: parsedBody.code || parsedBody.Code || errorCode,
7971
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7893
7972
  $fault: "client",
7894
- $metadata: deserializeMetadata(output),
7973
+ $metadata,
7895
7974
  });
7896
7975
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7897
7976
  }
@@ -7913,15 +7992,16 @@ const deserializeAws_restXmlPutBucketVersioningCommandError = async (output, con
7913
7992
  body: await parseBody(output.body, context),
7914
7993
  };
7915
7994
  let response;
7916
- let errorCode = "UnknownError";
7917
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7995
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7918
7996
  switch (errorCode) {
7919
7997
  default:
7920
7998
  const parsedBody = parsedOutput.body;
7999
+ const $metadata = deserializeMetadata(output);
8000
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7921
8001
  response = new S3ServiceException_1.S3ServiceException({
7922
- name: parsedBody.code || parsedBody.Code || errorCode,
8002
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7923
8003
  $fault: "client",
7924
- $metadata: deserializeMetadata(output),
8004
+ $metadata,
7925
8005
  });
7926
8006
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7927
8007
  }
@@ -7943,15 +8023,16 @@ const deserializeAws_restXmlPutBucketWebsiteCommandError = async (output, contex
7943
8023
  body: await parseBody(output.body, context),
7944
8024
  };
7945
8025
  let response;
7946
- let errorCode = "UnknownError";
7947
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8026
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
7948
8027
  switch (errorCode) {
7949
8028
  default:
7950
8029
  const parsedBody = parsedOutput.body;
8030
+ const $metadata = deserializeMetadata(output);
8031
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
7951
8032
  response = new S3ServiceException_1.S3ServiceException({
7952
- name: parsedBody.code || parsedBody.Code || errorCode,
8033
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
7953
8034
  $fault: "client",
7954
- $metadata: deserializeMetadata(output),
8035
+ $metadata,
7955
8036
  });
7956
8037
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
7957
8038
  }
@@ -8029,15 +8110,16 @@ const deserializeAws_restXmlPutObjectCommandError = async (output, context) => {
8029
8110
  body: await parseBody(output.body, context),
8030
8111
  };
8031
8112
  let response;
8032
- let errorCode = "UnknownError";
8033
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8113
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8034
8114
  switch (errorCode) {
8035
8115
  default:
8036
8116
  const parsedBody = parsedOutput.body;
8117
+ const $metadata = deserializeMetadata(output);
8118
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8037
8119
  response = new S3ServiceException_1.S3ServiceException({
8038
- name: parsedBody.code || parsedBody.Code || errorCode,
8120
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8039
8121
  $fault: "client",
8040
- $metadata: deserializeMetadata(output),
8122
+ $metadata,
8041
8123
  });
8042
8124
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8043
8125
  }
@@ -8063,18 +8145,19 @@ const deserializeAws_restXmlPutObjectAclCommandError = async (output, context) =
8063
8145
  body: await parseBody(output.body, context),
8064
8146
  };
8065
8147
  let response;
8066
- let errorCode = "UnknownError";
8067
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8148
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8068
8149
  switch (errorCode) {
8069
8150
  case "NoSuchKey":
8070
8151
  case "com.amazonaws.s3#NoSuchKey":
8071
8152
  throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context);
8072
8153
  default:
8073
8154
  const parsedBody = parsedOutput.body;
8155
+ const $metadata = deserializeMetadata(output);
8156
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8074
8157
  response = new S3ServiceException_1.S3ServiceException({
8075
- name: parsedBody.code || parsedBody.Code || errorCode,
8158
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8076
8159
  $fault: "client",
8077
- $metadata: deserializeMetadata(output),
8160
+ $metadata,
8078
8161
  });
8079
8162
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8080
8163
  }
@@ -8100,15 +8183,16 @@ const deserializeAws_restXmlPutObjectLegalHoldCommandError = async (output, cont
8100
8183
  body: await parseBody(output.body, context),
8101
8184
  };
8102
8185
  let response;
8103
- let errorCode = "UnknownError";
8104
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8186
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8105
8187
  switch (errorCode) {
8106
8188
  default:
8107
8189
  const parsedBody = parsedOutput.body;
8190
+ const $metadata = deserializeMetadata(output);
8191
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8108
8192
  response = new S3ServiceException_1.S3ServiceException({
8109
- name: parsedBody.code || parsedBody.Code || errorCode,
8193
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8110
8194
  $fault: "client",
8111
- $metadata: deserializeMetadata(output),
8195
+ $metadata,
8112
8196
  });
8113
8197
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8114
8198
  }
@@ -8134,15 +8218,16 @@ const deserializeAws_restXmlPutObjectLockConfigurationCommandError = async (outp
8134
8218
  body: await parseBody(output.body, context),
8135
8219
  };
8136
8220
  let response;
8137
- let errorCode = "UnknownError";
8138
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8221
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8139
8222
  switch (errorCode) {
8140
8223
  default:
8141
8224
  const parsedBody = parsedOutput.body;
8225
+ const $metadata = deserializeMetadata(output);
8226
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8142
8227
  response = new S3ServiceException_1.S3ServiceException({
8143
- name: parsedBody.code || parsedBody.Code || errorCode,
8228
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8144
8229
  $fault: "client",
8145
- $metadata: deserializeMetadata(output),
8230
+ $metadata,
8146
8231
  });
8147
8232
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8148
8233
  }
@@ -8168,15 +8253,16 @@ const deserializeAws_restXmlPutObjectRetentionCommandError = async (output, cont
8168
8253
  body: await parseBody(output.body, context),
8169
8254
  };
8170
8255
  let response;
8171
- let errorCode = "UnknownError";
8172
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8256
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8173
8257
  switch (errorCode) {
8174
8258
  default:
8175
8259
  const parsedBody = parsedOutput.body;
8260
+ const $metadata = deserializeMetadata(output);
8261
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8176
8262
  response = new S3ServiceException_1.S3ServiceException({
8177
- name: parsedBody.code || parsedBody.Code || errorCode,
8263
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8178
8264
  $fault: "client",
8179
- $metadata: deserializeMetadata(output),
8265
+ $metadata,
8180
8266
  });
8181
8267
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8182
8268
  }
@@ -8202,15 +8288,16 @@ const deserializeAws_restXmlPutObjectTaggingCommandError = async (output, contex
8202
8288
  body: await parseBody(output.body, context),
8203
8289
  };
8204
8290
  let response;
8205
- let errorCode = "UnknownError";
8206
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8291
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8207
8292
  switch (errorCode) {
8208
8293
  default:
8209
8294
  const parsedBody = parsedOutput.body;
8295
+ const $metadata = deserializeMetadata(output);
8296
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8210
8297
  response = new S3ServiceException_1.S3ServiceException({
8211
- name: parsedBody.code || parsedBody.Code || errorCode,
8298
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8212
8299
  $fault: "client",
8213
- $metadata: deserializeMetadata(output),
8300
+ $metadata,
8214
8301
  });
8215
8302
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8216
8303
  }
@@ -8232,15 +8319,16 @@ const deserializeAws_restXmlPutPublicAccessBlockCommandError = async (output, co
8232
8319
  body: await parseBody(output.body, context),
8233
8320
  };
8234
8321
  let response;
8235
- let errorCode = "UnknownError";
8236
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8322
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8237
8323
  switch (errorCode) {
8238
8324
  default:
8239
8325
  const parsedBody = parsedOutput.body;
8326
+ const $metadata = deserializeMetadata(output);
8327
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8240
8328
  response = new S3ServiceException_1.S3ServiceException({
8241
- name: parsedBody.code || parsedBody.Code || errorCode,
8329
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8242
8330
  $fault: "client",
8243
- $metadata: deserializeMetadata(output),
8331
+ $metadata,
8244
8332
  });
8245
8333
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8246
8334
  }
@@ -8270,18 +8358,19 @@ const deserializeAws_restXmlRestoreObjectCommandError = async (output, context)
8270
8358
  body: await parseBody(output.body, context),
8271
8359
  };
8272
8360
  let response;
8273
- let errorCode = "UnknownError";
8274
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8361
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8275
8362
  switch (errorCode) {
8276
8363
  case "ObjectAlreadyInActiveTierError":
8277
8364
  case "com.amazonaws.s3#ObjectAlreadyInActiveTierError":
8278
8365
  throw await deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse(parsedOutput, context);
8279
8366
  default:
8280
8367
  const parsedBody = parsedOutput.body;
8368
+ const $metadata = deserializeMetadata(output);
8369
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8281
8370
  response = new S3ServiceException_1.S3ServiceException({
8282
- name: parsedBody.code || parsedBody.Code || errorCode,
8371
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8283
8372
  $fault: "client",
8284
- $metadata: deserializeMetadata(output),
8373
+ $metadata,
8285
8374
  });
8286
8375
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8287
8376
  }
@@ -8319,15 +8408,16 @@ const deserializeAws_restXmlSelectObjectContentCommandError = async (output, con
8319
8408
  body: await parseBody(output.body, context),
8320
8409
  };
8321
8410
  let response;
8322
- let errorCode = "UnknownError";
8323
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8411
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8324
8412
  switch (errorCode) {
8325
8413
  default:
8326
8414
  const parsedBody = parsedOutput.body;
8415
+ const $metadata = deserializeMetadata(output);
8416
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8327
8417
  response = new S3ServiceException_1.S3ServiceException({
8328
- name: parsedBody.code || parsedBody.Code || errorCode,
8418
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8329
8419
  $fault: "client",
8330
- $metadata: deserializeMetadata(output),
8420
+ $metadata,
8331
8421
  });
8332
8422
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8333
8423
  }
@@ -8393,15 +8483,16 @@ const deserializeAws_restXmlUploadPartCommandError = async (output, context) =>
8393
8483
  body: await parseBody(output.body, context),
8394
8484
  };
8395
8485
  let response;
8396
- let errorCode = "UnknownError";
8397
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8486
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8398
8487
  switch (errorCode) {
8399
8488
  default:
8400
8489
  const parsedBody = parsedOutput.body;
8490
+ const $metadata = deserializeMetadata(output);
8491
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8401
8492
  response = new S3ServiceException_1.S3ServiceException({
8402
- name: parsedBody.code || parsedBody.Code || errorCode,
8493
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8403
8494
  $fault: "client",
8404
- $metadata: deserializeMetadata(output),
8495
+ $metadata,
8405
8496
  });
8406
8497
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8407
8498
  }
@@ -8453,15 +8544,16 @@ const deserializeAws_restXmlUploadPartCopyCommandError = async (output, context)
8453
8544
  body: await parseBody(output.body, context),
8454
8545
  };
8455
8546
  let response;
8456
- let errorCode = "UnknownError";
8457
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8547
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8458
8548
  switch (errorCode) {
8459
8549
  default:
8460
8550
  const parsedBody = parsedOutput.body;
8551
+ const $metadata = deserializeMetadata(output);
8552
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8461
8553
  response = new S3ServiceException_1.S3ServiceException({
8462
- name: parsedBody.code || parsedBody.Code || errorCode,
8554
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8463
8555
  $fault: "client",
8464
- $metadata: deserializeMetadata(output),
8556
+ $metadata,
8465
8557
  });
8466
8558
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8467
8559
  }
@@ -8483,15 +8575,16 @@ const deserializeAws_restXmlWriteGetObjectResponseCommandError = async (output,
8483
8575
  body: await parseBody(output.body, context),
8484
8576
  };
8485
8577
  let response;
8486
- let errorCode = "UnknownError";
8487
- errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8578
+ const errorCode = loadRestXmlErrorCode(output, parsedOutput.body);
8488
8579
  switch (errorCode) {
8489
8580
  default:
8490
8581
  const parsedBody = parsedOutput.body;
8582
+ const $metadata = deserializeMetadata(output);
8583
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
8491
8584
  response = new S3ServiceException_1.S3ServiceException({
8492
- name: parsedBody.code || parsedBody.Code || errorCode,
8585
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
8493
8586
  $fault: "client",
8494
- $metadata: deserializeMetadata(output),
8587
+ $metadata,
8495
8588
  });
8496
8589
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
8497
8590
  }
@@ -8636,7 +8729,7 @@ const deserializeAws_restXmlObjectNotInActiveTierErrorResponse = async (parsedOu
8636
8729
  };
8637
8730
  const serializeAws_restXmlAbortIncompleteMultipartUpload = (input, context) => {
8638
8731
  const bodyNode = new xml_builder_1.XmlNode("AbortIncompleteMultipartUpload");
8639
- if (input.DaysAfterInitiation !== undefined && input.DaysAfterInitiation !== null) {
8732
+ if (input.DaysAfterInitiation != null) {
8640
8733
  const node = new xml_builder_1.XmlNode("DaysAfterInitiation")
8641
8734
  .addChildNode(new xml_builder_1.XmlText(String(input.DaysAfterInitiation)))
8642
8735
  .withName("DaysAfterInitiation");
@@ -8646,7 +8739,7 @@ const serializeAws_restXmlAbortIncompleteMultipartUpload = (input, context) => {
8646
8739
  };
8647
8740
  const serializeAws_restXmlAccelerateConfiguration = (input, context) => {
8648
8741
  const bodyNode = new xml_builder_1.XmlNode("AccelerateConfiguration");
8649
- if (input.Status !== undefined && input.Status !== null) {
8742
+ if (input.Status != null) {
8650
8743
  const node = new xml_builder_1.XmlNode("BucketAccelerateStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
8651
8744
  bodyNode.addChildNode(node);
8652
8745
  }
@@ -8654,7 +8747,7 @@ const serializeAws_restXmlAccelerateConfiguration = (input, context) => {
8654
8747
  };
8655
8748
  const serializeAws_restXmlAccessControlPolicy = (input, context) => {
8656
8749
  const bodyNode = new xml_builder_1.XmlNode("AccessControlPolicy");
8657
- if (input.Grants !== undefined && input.Grants !== null) {
8750
+ if (input.Grants != null) {
8658
8751
  const nodes = serializeAws_restXmlGrants(input.Grants, context);
8659
8752
  const containerNode = new xml_builder_1.XmlNode("AccessControlList");
8660
8753
  nodes.map((node) => {
@@ -8662,7 +8755,7 @@ const serializeAws_restXmlAccessControlPolicy = (input, context) => {
8662
8755
  });
8663
8756
  bodyNode.addChildNode(containerNode);
8664
8757
  }
8665
- if (input.Owner !== undefined && input.Owner !== null) {
8758
+ if (input.Owner != null) {
8666
8759
  const node = serializeAws_restXmlOwner(input.Owner, context).withName("Owner");
8667
8760
  bodyNode.addChildNode(node);
8668
8761
  }
@@ -8670,7 +8763,7 @@ const serializeAws_restXmlAccessControlPolicy = (input, context) => {
8670
8763
  };
8671
8764
  const serializeAws_restXmlAccessControlTranslation = (input, context) => {
8672
8765
  const bodyNode = new xml_builder_1.XmlNode("AccessControlTranslation");
8673
- if (input.Owner !== undefined && input.Owner !== null) {
8766
+ if (input.Owner != null) {
8674
8767
  const node = new xml_builder_1.XmlNode("OwnerOverride").addChildNode(new xml_builder_1.XmlText(input.Owner)).withName("Owner");
8675
8768
  bodyNode.addChildNode(node);
8676
8769
  }
@@ -8711,11 +8804,11 @@ const serializeAws_restXmlAllowedOrigins = (input, context) => {
8711
8804
  };
8712
8805
  const serializeAws_restXmlAnalyticsAndOperator = (input, context) => {
8713
8806
  const bodyNode = new xml_builder_1.XmlNode("AnalyticsAndOperator");
8714
- if (input.Prefix !== undefined && input.Prefix !== null) {
8807
+ if (input.Prefix != null) {
8715
8808
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
8716
8809
  bodyNode.addChildNode(node);
8717
8810
  }
8718
- if (input.Tags !== undefined && input.Tags !== null) {
8811
+ if (input.Tags != null) {
8719
8812
  const nodes = serializeAws_restXmlTagSet(input.Tags, context);
8720
8813
  nodes.map((node) => {
8721
8814
  node = node.withName("Tag");
@@ -8726,15 +8819,15 @@ const serializeAws_restXmlAnalyticsAndOperator = (input, context) => {
8726
8819
  };
8727
8820
  const serializeAws_restXmlAnalyticsConfiguration = (input, context) => {
8728
8821
  const bodyNode = new xml_builder_1.XmlNode("AnalyticsConfiguration");
8729
- if (input.Id !== undefined && input.Id !== null) {
8822
+ if (input.Id != null) {
8730
8823
  const node = new xml_builder_1.XmlNode("AnalyticsId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
8731
8824
  bodyNode.addChildNode(node);
8732
8825
  }
8733
- if (input.Filter !== undefined && input.Filter !== null) {
8826
+ if (input.Filter != null) {
8734
8827
  const node = serializeAws_restXmlAnalyticsFilter(input.Filter, context).withName("Filter");
8735
8828
  bodyNode.addChildNode(node);
8736
8829
  }
8737
- if (input.StorageClassAnalysis !== undefined && input.StorageClassAnalysis !== null) {
8830
+ if (input.StorageClassAnalysis != null) {
8738
8831
  const node = serializeAws_restXmlStorageClassAnalysis(input.StorageClassAnalysis, context).withName("StorageClassAnalysis");
8739
8832
  bodyNode.addChildNode(node);
8740
8833
  }
@@ -8742,7 +8835,7 @@ const serializeAws_restXmlAnalyticsConfiguration = (input, context) => {
8742
8835
  };
8743
8836
  const serializeAws_restXmlAnalyticsExportDestination = (input, context) => {
8744
8837
  const bodyNode = new xml_builder_1.XmlNode("AnalyticsExportDestination");
8745
- if (input.S3BucketDestination !== undefined && input.S3BucketDestination !== null) {
8838
+ if (input.S3BucketDestination != null) {
8746
8839
  const node = serializeAws_restXmlAnalyticsS3BucketDestination(input.S3BucketDestination, context).withName("S3BucketDestination");
8747
8840
  bodyNode.addChildNode(node);
8748
8841
  }
@@ -8774,23 +8867,23 @@ const serializeAws_restXmlAnalyticsFilter = (input, context) => {
8774
8867
  };
8775
8868
  const serializeAws_restXmlAnalyticsS3BucketDestination = (input, context) => {
8776
8869
  const bodyNode = new xml_builder_1.XmlNode("AnalyticsS3BucketDestination");
8777
- if (input.Format !== undefined && input.Format !== null) {
8870
+ if (input.Format != null) {
8778
8871
  const node = new xml_builder_1.XmlNode("AnalyticsS3ExportFileFormat")
8779
8872
  .addChildNode(new xml_builder_1.XmlText(input.Format))
8780
8873
  .withName("Format");
8781
8874
  bodyNode.addChildNode(node);
8782
8875
  }
8783
- if (input.BucketAccountId !== undefined && input.BucketAccountId !== null) {
8876
+ if (input.BucketAccountId != null) {
8784
8877
  const node = new xml_builder_1.XmlNode("AccountId")
8785
8878
  .addChildNode(new xml_builder_1.XmlText(input.BucketAccountId))
8786
8879
  .withName("BucketAccountId");
8787
8880
  bodyNode.addChildNode(node);
8788
8881
  }
8789
- if (input.Bucket !== undefined && input.Bucket !== null) {
8882
+ if (input.Bucket != null) {
8790
8883
  const node = new xml_builder_1.XmlNode("BucketName").addChildNode(new xml_builder_1.XmlText(input.Bucket)).withName("Bucket");
8791
8884
  bodyNode.addChildNode(node);
8792
8885
  }
8793
- if (input.Prefix !== undefined && input.Prefix !== null) {
8886
+ if (input.Prefix != null) {
8794
8887
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
8795
8888
  bodyNode.addChildNode(node);
8796
8889
  }
@@ -8798,7 +8891,7 @@ const serializeAws_restXmlAnalyticsS3BucketDestination = (input, context) => {
8798
8891
  };
8799
8892
  const serializeAws_restXmlBucketLifecycleConfiguration = (input, context) => {
8800
8893
  const bodyNode = new xml_builder_1.XmlNode("BucketLifecycleConfiguration");
8801
- if (input.Rules !== undefined && input.Rules !== null) {
8894
+ if (input.Rules != null) {
8802
8895
  const nodes = serializeAws_restXmlLifecycleRules(input.Rules, context);
8803
8896
  nodes.map((node) => {
8804
8897
  node = node.withName("Rule");
@@ -8809,7 +8902,7 @@ const serializeAws_restXmlBucketLifecycleConfiguration = (input, context) => {
8809
8902
  };
8810
8903
  const serializeAws_restXmlBucketLoggingStatus = (input, context) => {
8811
8904
  const bodyNode = new xml_builder_1.XmlNode("BucketLoggingStatus");
8812
- if (input.LoggingEnabled !== undefined && input.LoggingEnabled !== null) {
8905
+ if (input.LoggingEnabled != null) {
8813
8906
  const node = serializeAws_restXmlLoggingEnabled(input.LoggingEnabled, context).withName("LoggingEnabled");
8814
8907
  bodyNode.addChildNode(node);
8815
8908
  }
@@ -8817,7 +8910,7 @@ const serializeAws_restXmlBucketLoggingStatus = (input, context) => {
8817
8910
  };
8818
8911
  const serializeAws_restXmlCompletedMultipartUpload = (input, context) => {
8819
8912
  const bodyNode = new xml_builder_1.XmlNode("CompletedMultipartUpload");
8820
- if (input.Parts !== undefined && input.Parts !== null) {
8913
+ if (input.Parts != null) {
8821
8914
  const nodes = serializeAws_restXmlCompletedPartList(input.Parts, context);
8822
8915
  nodes.map((node) => {
8823
8916
  node = node.withName("Part");
@@ -8828,33 +8921,33 @@ const serializeAws_restXmlCompletedMultipartUpload = (input, context) => {
8828
8921
  };
8829
8922
  const serializeAws_restXmlCompletedPart = (input, context) => {
8830
8923
  const bodyNode = new xml_builder_1.XmlNode("CompletedPart");
8831
- if (input.ETag !== undefined && input.ETag !== null) {
8924
+ if (input.ETag != null) {
8832
8925
  const node = new xml_builder_1.XmlNode("ETag").addChildNode(new xml_builder_1.XmlText(input.ETag)).withName("ETag");
8833
8926
  bodyNode.addChildNode(node);
8834
8927
  }
8835
- if (input.ChecksumCRC32 !== undefined && input.ChecksumCRC32 !== null) {
8928
+ if (input.ChecksumCRC32 != null) {
8836
8929
  const node = new xml_builder_1.XmlNode("ChecksumCRC32")
8837
8930
  .addChildNode(new xml_builder_1.XmlText(input.ChecksumCRC32))
8838
8931
  .withName("ChecksumCRC32");
8839
8932
  bodyNode.addChildNode(node);
8840
8933
  }
8841
- if (input.ChecksumCRC32C !== undefined && input.ChecksumCRC32C !== null) {
8934
+ if (input.ChecksumCRC32C != null) {
8842
8935
  const node = new xml_builder_1.XmlNode("ChecksumCRC32C")
8843
8936
  .addChildNode(new xml_builder_1.XmlText(input.ChecksumCRC32C))
8844
8937
  .withName("ChecksumCRC32C");
8845
8938
  bodyNode.addChildNode(node);
8846
8939
  }
8847
- if (input.ChecksumSHA1 !== undefined && input.ChecksumSHA1 !== null) {
8940
+ if (input.ChecksumSHA1 != null) {
8848
8941
  const node = new xml_builder_1.XmlNode("ChecksumSHA1").addChildNode(new xml_builder_1.XmlText(input.ChecksumSHA1)).withName("ChecksumSHA1");
8849
8942
  bodyNode.addChildNode(node);
8850
8943
  }
8851
- if (input.ChecksumSHA256 !== undefined && input.ChecksumSHA256 !== null) {
8944
+ if (input.ChecksumSHA256 != null) {
8852
8945
  const node = new xml_builder_1.XmlNode("ChecksumSHA256")
8853
8946
  .addChildNode(new xml_builder_1.XmlText(input.ChecksumSHA256))
8854
8947
  .withName("ChecksumSHA256");
8855
8948
  bodyNode.addChildNode(node);
8856
8949
  }
8857
- if (input.PartNumber !== undefined && input.PartNumber !== null) {
8950
+ if (input.PartNumber != null) {
8858
8951
  const node = new xml_builder_1.XmlNode("PartNumber")
8859
8952
  .addChildNode(new xml_builder_1.XmlText(String(input.PartNumber)))
8860
8953
  .withName("PartNumber");
@@ -8875,13 +8968,13 @@ const serializeAws_restXmlCompletedPartList = (input, context) => {
8875
8968
  };
8876
8969
  const serializeAws_restXmlCondition = (input, context) => {
8877
8970
  const bodyNode = new xml_builder_1.XmlNode("Condition");
8878
- if (input.HttpErrorCodeReturnedEquals !== undefined && input.HttpErrorCodeReturnedEquals !== null) {
8971
+ if (input.HttpErrorCodeReturnedEquals != null) {
8879
8972
  const node = new xml_builder_1.XmlNode("HttpErrorCodeReturnedEquals")
8880
8973
  .addChildNode(new xml_builder_1.XmlText(input.HttpErrorCodeReturnedEquals))
8881
8974
  .withName("HttpErrorCodeReturnedEquals");
8882
8975
  bodyNode.addChildNode(node);
8883
8976
  }
8884
- if (input.KeyPrefixEquals !== undefined && input.KeyPrefixEquals !== null) {
8977
+ if (input.KeyPrefixEquals != null) {
8885
8978
  const node = new xml_builder_1.XmlNode("KeyPrefixEquals")
8886
8979
  .addChildNode(new xml_builder_1.XmlText(input.KeyPrefixEquals))
8887
8980
  .withName("KeyPrefixEquals");
@@ -8891,7 +8984,7 @@ const serializeAws_restXmlCondition = (input, context) => {
8891
8984
  };
8892
8985
  const serializeAws_restXmlCORSConfiguration = (input, context) => {
8893
8986
  const bodyNode = new xml_builder_1.XmlNode("CORSConfiguration");
8894
- if (input.CORSRules !== undefined && input.CORSRules !== null) {
8987
+ if (input.CORSRules != null) {
8895
8988
  const nodes = serializeAws_restXmlCORSRules(input.CORSRules, context);
8896
8989
  nodes.map((node) => {
8897
8990
  node = node.withName("CORSRule");
@@ -8902,39 +8995,39 @@ const serializeAws_restXmlCORSConfiguration = (input, context) => {
8902
8995
  };
8903
8996
  const serializeAws_restXmlCORSRule = (input, context) => {
8904
8997
  const bodyNode = new xml_builder_1.XmlNode("CORSRule");
8905
- if (input.ID !== undefined && input.ID !== null) {
8998
+ if (input.ID != null) {
8906
8999
  const node = new xml_builder_1.XmlNode("ID").addChildNode(new xml_builder_1.XmlText(input.ID)).withName("ID");
8907
9000
  bodyNode.addChildNode(node);
8908
9001
  }
8909
- if (input.AllowedHeaders !== undefined && input.AllowedHeaders !== null) {
9002
+ if (input.AllowedHeaders != null) {
8910
9003
  const nodes = serializeAws_restXmlAllowedHeaders(input.AllowedHeaders, context);
8911
9004
  nodes.map((node) => {
8912
9005
  node = node.withName("AllowedHeader");
8913
9006
  bodyNode.addChildNode(node);
8914
9007
  });
8915
9008
  }
8916
- if (input.AllowedMethods !== undefined && input.AllowedMethods !== null) {
9009
+ if (input.AllowedMethods != null) {
8917
9010
  const nodes = serializeAws_restXmlAllowedMethods(input.AllowedMethods, context);
8918
9011
  nodes.map((node) => {
8919
9012
  node = node.withName("AllowedMethod");
8920
9013
  bodyNode.addChildNode(node);
8921
9014
  });
8922
9015
  }
8923
- if (input.AllowedOrigins !== undefined && input.AllowedOrigins !== null) {
9016
+ if (input.AllowedOrigins != null) {
8924
9017
  const nodes = serializeAws_restXmlAllowedOrigins(input.AllowedOrigins, context);
8925
9018
  nodes.map((node) => {
8926
9019
  node = node.withName("AllowedOrigin");
8927
9020
  bodyNode.addChildNode(node);
8928
9021
  });
8929
9022
  }
8930
- if (input.ExposeHeaders !== undefined && input.ExposeHeaders !== null) {
9023
+ if (input.ExposeHeaders != null) {
8931
9024
  const nodes = serializeAws_restXmlExposeHeaders(input.ExposeHeaders, context);
8932
9025
  nodes.map((node) => {
8933
9026
  node = node.withName("ExposeHeader");
8934
9027
  bodyNode.addChildNode(node);
8935
9028
  });
8936
9029
  }
8937
- if (input.MaxAgeSeconds !== undefined && input.MaxAgeSeconds !== null) {
9030
+ if (input.MaxAgeSeconds != null) {
8938
9031
  const node = new xml_builder_1.XmlNode("MaxAgeSeconds")
8939
9032
  .addChildNode(new xml_builder_1.XmlText(String(input.MaxAgeSeconds)))
8940
9033
  .withName("MaxAgeSeconds");
@@ -8955,7 +9048,7 @@ const serializeAws_restXmlCORSRules = (input, context) => {
8955
9048
  };
8956
9049
  const serializeAws_restXmlCreateBucketConfiguration = (input, context) => {
8957
9050
  const bodyNode = new xml_builder_1.XmlNode("CreateBucketConfiguration");
8958
- if (input.LocationConstraint !== undefined && input.LocationConstraint !== null) {
9051
+ if (input.LocationConstraint != null) {
8959
9052
  const node = new xml_builder_1.XmlNode("BucketLocationConstraint")
8960
9053
  .addChildNode(new xml_builder_1.XmlText(input.LocationConstraint))
8961
9054
  .withName("LocationConstraint");
@@ -8965,41 +9058,41 @@ const serializeAws_restXmlCreateBucketConfiguration = (input, context) => {
8965
9058
  };
8966
9059
  const serializeAws_restXmlCSVInput = (input, context) => {
8967
9060
  const bodyNode = new xml_builder_1.XmlNode("CSVInput");
8968
- if (input.FileHeaderInfo !== undefined && input.FileHeaderInfo !== null) {
9061
+ if (input.FileHeaderInfo != null) {
8969
9062
  const node = new xml_builder_1.XmlNode("FileHeaderInfo")
8970
9063
  .addChildNode(new xml_builder_1.XmlText(input.FileHeaderInfo))
8971
9064
  .withName("FileHeaderInfo");
8972
9065
  bodyNode.addChildNode(node);
8973
9066
  }
8974
- if (input.Comments !== undefined && input.Comments !== null) {
9067
+ if (input.Comments != null) {
8975
9068
  const node = new xml_builder_1.XmlNode("Comments").addChildNode(new xml_builder_1.XmlText(input.Comments)).withName("Comments");
8976
9069
  bodyNode.addChildNode(node);
8977
9070
  }
8978
- if (input.QuoteEscapeCharacter !== undefined && input.QuoteEscapeCharacter !== null) {
9071
+ if (input.QuoteEscapeCharacter != null) {
8979
9072
  const node = new xml_builder_1.XmlNode("QuoteEscapeCharacter")
8980
9073
  .addChildNode(new xml_builder_1.XmlText(input.QuoteEscapeCharacter))
8981
9074
  .withName("QuoteEscapeCharacter");
8982
9075
  bodyNode.addChildNode(node);
8983
9076
  }
8984
- if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {
9077
+ if (input.RecordDelimiter != null) {
8985
9078
  const node = new xml_builder_1.XmlNode("RecordDelimiter")
8986
9079
  .addChildNode(new xml_builder_1.XmlText(input.RecordDelimiter))
8987
9080
  .withName("RecordDelimiter");
8988
9081
  bodyNode.addChildNode(node);
8989
9082
  }
8990
- if (input.FieldDelimiter !== undefined && input.FieldDelimiter !== null) {
9083
+ if (input.FieldDelimiter != null) {
8991
9084
  const node = new xml_builder_1.XmlNode("FieldDelimiter")
8992
9085
  .addChildNode(new xml_builder_1.XmlText(input.FieldDelimiter))
8993
9086
  .withName("FieldDelimiter");
8994
9087
  bodyNode.addChildNode(node);
8995
9088
  }
8996
- if (input.QuoteCharacter !== undefined && input.QuoteCharacter !== null) {
9089
+ if (input.QuoteCharacter != null) {
8997
9090
  const node = new xml_builder_1.XmlNode("QuoteCharacter")
8998
9091
  .addChildNode(new xml_builder_1.XmlText(input.QuoteCharacter))
8999
9092
  .withName("QuoteCharacter");
9000
9093
  bodyNode.addChildNode(node);
9001
9094
  }
9002
- if (input.AllowQuotedRecordDelimiter !== undefined && input.AllowQuotedRecordDelimiter !== null) {
9095
+ if (input.AllowQuotedRecordDelimiter != null) {
9003
9096
  const node = new xml_builder_1.XmlNode("AllowQuotedRecordDelimiter")
9004
9097
  .addChildNode(new xml_builder_1.XmlText(String(input.AllowQuotedRecordDelimiter)))
9005
9098
  .withName("AllowQuotedRecordDelimiter");
@@ -9009,29 +9102,29 @@ const serializeAws_restXmlCSVInput = (input, context) => {
9009
9102
  };
9010
9103
  const serializeAws_restXmlCSVOutput = (input, context) => {
9011
9104
  const bodyNode = new xml_builder_1.XmlNode("CSVOutput");
9012
- if (input.QuoteFields !== undefined && input.QuoteFields !== null) {
9105
+ if (input.QuoteFields != null) {
9013
9106
  const node = new xml_builder_1.XmlNode("QuoteFields").addChildNode(new xml_builder_1.XmlText(input.QuoteFields)).withName("QuoteFields");
9014
9107
  bodyNode.addChildNode(node);
9015
9108
  }
9016
- if (input.QuoteEscapeCharacter !== undefined && input.QuoteEscapeCharacter !== null) {
9109
+ if (input.QuoteEscapeCharacter != null) {
9017
9110
  const node = new xml_builder_1.XmlNode("QuoteEscapeCharacter")
9018
9111
  .addChildNode(new xml_builder_1.XmlText(input.QuoteEscapeCharacter))
9019
9112
  .withName("QuoteEscapeCharacter");
9020
9113
  bodyNode.addChildNode(node);
9021
9114
  }
9022
- if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {
9115
+ if (input.RecordDelimiter != null) {
9023
9116
  const node = new xml_builder_1.XmlNode("RecordDelimiter")
9024
9117
  .addChildNode(new xml_builder_1.XmlText(input.RecordDelimiter))
9025
9118
  .withName("RecordDelimiter");
9026
9119
  bodyNode.addChildNode(node);
9027
9120
  }
9028
- if (input.FieldDelimiter !== undefined && input.FieldDelimiter !== null) {
9121
+ if (input.FieldDelimiter != null) {
9029
9122
  const node = new xml_builder_1.XmlNode("FieldDelimiter")
9030
9123
  .addChildNode(new xml_builder_1.XmlText(input.FieldDelimiter))
9031
9124
  .withName("FieldDelimiter");
9032
9125
  bodyNode.addChildNode(node);
9033
9126
  }
9034
- if (input.QuoteCharacter !== undefined && input.QuoteCharacter !== null) {
9127
+ if (input.QuoteCharacter != null) {
9035
9128
  const node = new xml_builder_1.XmlNode("QuoteCharacter")
9036
9129
  .addChildNode(new xml_builder_1.XmlText(input.QuoteCharacter))
9037
9130
  .withName("QuoteCharacter");
@@ -9041,15 +9134,15 @@ const serializeAws_restXmlCSVOutput = (input, context) => {
9041
9134
  };
9042
9135
  const serializeAws_restXmlDefaultRetention = (input, context) => {
9043
9136
  const bodyNode = new xml_builder_1.XmlNode("DefaultRetention");
9044
- if (input.Mode !== undefined && input.Mode !== null) {
9137
+ if (input.Mode != null) {
9045
9138
  const node = new xml_builder_1.XmlNode("ObjectLockRetentionMode").addChildNode(new xml_builder_1.XmlText(input.Mode)).withName("Mode");
9046
9139
  bodyNode.addChildNode(node);
9047
9140
  }
9048
- if (input.Days !== undefined && input.Days !== null) {
9141
+ if (input.Days != null) {
9049
9142
  const node = new xml_builder_1.XmlNode("Days").addChildNode(new xml_builder_1.XmlText(String(input.Days))).withName("Days");
9050
9143
  bodyNode.addChildNode(node);
9051
9144
  }
9052
- if (input.Years !== undefined && input.Years !== null) {
9145
+ if (input.Years != null) {
9053
9146
  const node = new xml_builder_1.XmlNode("Years").addChildNode(new xml_builder_1.XmlText(String(input.Years))).withName("Years");
9054
9147
  bodyNode.addChildNode(node);
9055
9148
  }
@@ -9057,14 +9150,14 @@ const serializeAws_restXmlDefaultRetention = (input, context) => {
9057
9150
  };
9058
9151
  const serializeAws_restXmlDelete = (input, context) => {
9059
9152
  const bodyNode = new xml_builder_1.XmlNode("Delete");
9060
- if (input.Objects !== undefined && input.Objects !== null) {
9153
+ if (input.Objects != null) {
9061
9154
  const nodes = serializeAws_restXmlObjectIdentifierList(input.Objects, context);
9062
9155
  nodes.map((node) => {
9063
9156
  node = node.withName("Object");
9064
9157
  bodyNode.addChildNode(node);
9065
9158
  });
9066
9159
  }
9067
- if (input.Quiet !== undefined && input.Quiet !== null) {
9160
+ if (input.Quiet != null) {
9068
9161
  const node = new xml_builder_1.XmlNode("Quiet").addChildNode(new xml_builder_1.XmlText(String(input.Quiet))).withName("Quiet");
9069
9162
  bodyNode.addChildNode(node);
9070
9163
  }
@@ -9072,7 +9165,7 @@ const serializeAws_restXmlDelete = (input, context) => {
9072
9165
  };
9073
9166
  const serializeAws_restXmlDeleteMarkerReplication = (input, context) => {
9074
9167
  const bodyNode = new xml_builder_1.XmlNode("DeleteMarkerReplication");
9075
- if (input.Status !== undefined && input.Status !== null) {
9168
+ if (input.Status != null) {
9076
9169
  const node = new xml_builder_1.XmlNode("DeleteMarkerReplicationStatus")
9077
9170
  .addChildNode(new xml_builder_1.XmlText(input.Status))
9078
9171
  .withName("Status");
@@ -9082,31 +9175,31 @@ const serializeAws_restXmlDeleteMarkerReplication = (input, context) => {
9082
9175
  };
9083
9176
  const serializeAws_restXmlDestination = (input, context) => {
9084
9177
  const bodyNode = new xml_builder_1.XmlNode("Destination");
9085
- if (input.Bucket !== undefined && input.Bucket !== null) {
9178
+ if (input.Bucket != null) {
9086
9179
  const node = new xml_builder_1.XmlNode("BucketName").addChildNode(new xml_builder_1.XmlText(input.Bucket)).withName("Bucket");
9087
9180
  bodyNode.addChildNode(node);
9088
9181
  }
9089
- if (input.Account !== undefined && input.Account !== null) {
9182
+ if (input.Account != null) {
9090
9183
  const node = new xml_builder_1.XmlNode("AccountId").addChildNode(new xml_builder_1.XmlText(input.Account)).withName("Account");
9091
9184
  bodyNode.addChildNode(node);
9092
9185
  }
9093
- if (input.StorageClass !== undefined && input.StorageClass !== null) {
9186
+ if (input.StorageClass != null) {
9094
9187
  const node = new xml_builder_1.XmlNode("StorageClass").addChildNode(new xml_builder_1.XmlText(input.StorageClass)).withName("StorageClass");
9095
9188
  bodyNode.addChildNode(node);
9096
9189
  }
9097
- if (input.AccessControlTranslation !== undefined && input.AccessControlTranslation !== null) {
9190
+ if (input.AccessControlTranslation != null) {
9098
9191
  const node = serializeAws_restXmlAccessControlTranslation(input.AccessControlTranslation, context).withName("AccessControlTranslation");
9099
9192
  bodyNode.addChildNode(node);
9100
9193
  }
9101
- if (input.EncryptionConfiguration !== undefined && input.EncryptionConfiguration !== null) {
9194
+ if (input.EncryptionConfiguration != null) {
9102
9195
  const node = serializeAws_restXmlEncryptionConfiguration(input.EncryptionConfiguration, context).withName("EncryptionConfiguration");
9103
9196
  bodyNode.addChildNode(node);
9104
9197
  }
9105
- if (input.ReplicationTime !== undefined && input.ReplicationTime !== null) {
9198
+ if (input.ReplicationTime != null) {
9106
9199
  const node = serializeAws_restXmlReplicationTime(input.ReplicationTime, context).withName("ReplicationTime");
9107
9200
  bodyNode.addChildNode(node);
9108
9201
  }
9109
- if (input.Metrics !== undefined && input.Metrics !== null) {
9202
+ if (input.Metrics != null) {
9110
9203
  const node = serializeAws_restXmlMetrics(input.Metrics, context).withName("Metrics");
9111
9204
  bodyNode.addChildNode(node);
9112
9205
  }
@@ -9114,17 +9207,17 @@ const serializeAws_restXmlDestination = (input, context) => {
9114
9207
  };
9115
9208
  const serializeAws_restXmlEncryption = (input, context) => {
9116
9209
  const bodyNode = new xml_builder_1.XmlNode("Encryption");
9117
- if (input.EncryptionType !== undefined && input.EncryptionType !== null) {
9210
+ if (input.EncryptionType != null) {
9118
9211
  const node = new xml_builder_1.XmlNode("ServerSideEncryption")
9119
9212
  .addChildNode(new xml_builder_1.XmlText(input.EncryptionType))
9120
9213
  .withName("EncryptionType");
9121
9214
  bodyNode.addChildNode(node);
9122
9215
  }
9123
- if (input.KMSKeyId !== undefined && input.KMSKeyId !== null) {
9216
+ if (input.KMSKeyId != null) {
9124
9217
  const node = new xml_builder_1.XmlNode("SSEKMSKeyId").addChildNode(new xml_builder_1.XmlText(input.KMSKeyId)).withName("KMSKeyId");
9125
9218
  bodyNode.addChildNode(node);
9126
9219
  }
9127
- if (input.KMSContext !== undefined && input.KMSContext !== null) {
9220
+ if (input.KMSContext != null) {
9128
9221
  const node = new xml_builder_1.XmlNode("KMSContext").addChildNode(new xml_builder_1.XmlText(input.KMSContext)).withName("KMSContext");
9129
9222
  bodyNode.addChildNode(node);
9130
9223
  }
@@ -9132,7 +9225,7 @@ const serializeAws_restXmlEncryption = (input, context) => {
9132
9225
  };
9133
9226
  const serializeAws_restXmlEncryptionConfiguration = (input, context) => {
9134
9227
  const bodyNode = new xml_builder_1.XmlNode("EncryptionConfiguration");
9135
- if (input.ReplicaKmsKeyID !== undefined && input.ReplicaKmsKeyID !== null) {
9228
+ if (input.ReplicaKmsKeyID != null) {
9136
9229
  const node = new xml_builder_1.XmlNode("ReplicaKmsKeyID")
9137
9230
  .addChildNode(new xml_builder_1.XmlText(input.ReplicaKmsKeyID))
9138
9231
  .withName("ReplicaKmsKeyID");
@@ -9142,7 +9235,7 @@ const serializeAws_restXmlEncryptionConfiguration = (input, context) => {
9142
9235
  };
9143
9236
  const serializeAws_restXmlErrorDocument = (input, context) => {
9144
9237
  const bodyNode = new xml_builder_1.XmlNode("ErrorDocument");
9145
- if (input.Key !== undefined && input.Key !== null) {
9238
+ if (input.Key != null) {
9146
9239
  const node = new xml_builder_1.XmlNode("ObjectKey").addChildNode(new xml_builder_1.XmlText(input.Key)).withName("Key");
9147
9240
  bodyNode.addChildNode(node);
9148
9241
  }
@@ -9165,7 +9258,7 @@ const serializeAws_restXmlEventList = (input, context) => {
9165
9258
  };
9166
9259
  const serializeAws_restXmlExistingObjectReplication = (input, context) => {
9167
9260
  const bodyNode = new xml_builder_1.XmlNode("ExistingObjectReplication");
9168
- if (input.Status !== undefined && input.Status !== null) {
9261
+ if (input.Status != null) {
9169
9262
  const node = new xml_builder_1.XmlNode("ExistingObjectReplicationStatus")
9170
9263
  .addChildNode(new xml_builder_1.XmlText(input.Status))
9171
9264
  .withName("Status");
@@ -9186,11 +9279,11 @@ const serializeAws_restXmlExposeHeaders = (input, context) => {
9186
9279
  };
9187
9280
  const serializeAws_restXmlFilterRule = (input, context) => {
9188
9281
  const bodyNode = new xml_builder_1.XmlNode("FilterRule");
9189
- if (input.Name !== undefined && input.Name !== null) {
9282
+ if (input.Name != null) {
9190
9283
  const node = new xml_builder_1.XmlNode("FilterRuleName").addChildNode(new xml_builder_1.XmlText(input.Name)).withName("Name");
9191
9284
  bodyNode.addChildNode(node);
9192
9285
  }
9193
- if (input.Value !== undefined && input.Value !== null) {
9286
+ if (input.Value != null) {
9194
9287
  const node = new xml_builder_1.XmlNode("FilterRuleValue").addChildNode(new xml_builder_1.XmlText(input.Value)).withName("Value");
9195
9288
  bodyNode.addChildNode(node);
9196
9289
  }
@@ -9209,7 +9302,7 @@ const serializeAws_restXmlFilterRuleList = (input, context) => {
9209
9302
  };
9210
9303
  const serializeAws_restXmlGlacierJobParameters = (input, context) => {
9211
9304
  const bodyNode = new xml_builder_1.XmlNode("GlacierJobParameters");
9212
- if (input.Tier !== undefined && input.Tier !== null) {
9305
+ if (input.Tier != null) {
9213
9306
  const node = new xml_builder_1.XmlNode("Tier").addChildNode(new xml_builder_1.XmlText(input.Tier)).withName("Tier");
9214
9307
  bodyNode.addChildNode(node);
9215
9308
  }
@@ -9217,12 +9310,12 @@ const serializeAws_restXmlGlacierJobParameters = (input, context) => {
9217
9310
  };
9218
9311
  const serializeAws_restXmlGrant = (input, context) => {
9219
9312
  const bodyNode = new xml_builder_1.XmlNode("Grant");
9220
- if (input.Grantee !== undefined && input.Grantee !== null) {
9313
+ if (input.Grantee != null) {
9221
9314
  const node = serializeAws_restXmlGrantee(input.Grantee, context).withName("Grantee");
9222
9315
  node.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
9223
9316
  bodyNode.addChildNode(node);
9224
9317
  }
9225
- if (input.Permission !== undefined && input.Permission !== null) {
9318
+ if (input.Permission != null) {
9226
9319
  const node = new xml_builder_1.XmlNode("Permission").addChildNode(new xml_builder_1.XmlText(input.Permission)).withName("Permission");
9227
9320
  bodyNode.addChildNode(node);
9228
9321
  }
@@ -9230,23 +9323,23 @@ const serializeAws_restXmlGrant = (input, context) => {
9230
9323
  };
9231
9324
  const serializeAws_restXmlGrantee = (input, context) => {
9232
9325
  const bodyNode = new xml_builder_1.XmlNode("Grantee");
9233
- if (input.DisplayName !== undefined && input.DisplayName !== null) {
9326
+ if (input.DisplayName != null) {
9234
9327
  const node = new xml_builder_1.XmlNode("DisplayName").addChildNode(new xml_builder_1.XmlText(input.DisplayName)).withName("DisplayName");
9235
9328
  bodyNode.addChildNode(node);
9236
9329
  }
9237
- if (input.EmailAddress !== undefined && input.EmailAddress !== null) {
9330
+ if (input.EmailAddress != null) {
9238
9331
  const node = new xml_builder_1.XmlNode("EmailAddress").addChildNode(new xml_builder_1.XmlText(input.EmailAddress)).withName("EmailAddress");
9239
9332
  bodyNode.addChildNode(node);
9240
9333
  }
9241
- if (input.ID !== undefined && input.ID !== null) {
9334
+ if (input.ID != null) {
9242
9335
  const node = new xml_builder_1.XmlNode("ID").addChildNode(new xml_builder_1.XmlText(input.ID)).withName("ID");
9243
9336
  bodyNode.addChildNode(node);
9244
9337
  }
9245
- if (input.URI !== undefined && input.URI !== null) {
9338
+ if (input.URI != null) {
9246
9339
  const node = new xml_builder_1.XmlNode("URI").addChildNode(new xml_builder_1.XmlText(input.URI)).withName("URI");
9247
9340
  bodyNode.addChildNode(node);
9248
9341
  }
9249
- if (input.Type !== undefined && input.Type !== null) {
9342
+ if (input.Type != null) {
9250
9343
  bodyNode.addAttribute("xsi:type", input.Type);
9251
9344
  }
9252
9345
  return bodyNode;
@@ -9264,7 +9357,7 @@ const serializeAws_restXmlGrants = (input, context) => {
9264
9357
  };
9265
9358
  const serializeAws_restXmlIndexDocument = (input, context) => {
9266
9359
  const bodyNode = new xml_builder_1.XmlNode("IndexDocument");
9267
- if (input.Suffix !== undefined && input.Suffix !== null) {
9360
+ if (input.Suffix != null) {
9268
9361
  const node = new xml_builder_1.XmlNode("Suffix").addChildNode(new xml_builder_1.XmlText(input.Suffix)).withName("Suffix");
9269
9362
  bodyNode.addChildNode(node);
9270
9363
  }
@@ -9272,21 +9365,21 @@ const serializeAws_restXmlIndexDocument = (input, context) => {
9272
9365
  };
9273
9366
  const serializeAws_restXmlInputSerialization = (input, context) => {
9274
9367
  const bodyNode = new xml_builder_1.XmlNode("InputSerialization");
9275
- if (input.CSV !== undefined && input.CSV !== null) {
9368
+ if (input.CSV != null) {
9276
9369
  const node = serializeAws_restXmlCSVInput(input.CSV, context).withName("CSV");
9277
9370
  bodyNode.addChildNode(node);
9278
9371
  }
9279
- if (input.CompressionType !== undefined && input.CompressionType !== null) {
9372
+ if (input.CompressionType != null) {
9280
9373
  const node = new xml_builder_1.XmlNode("CompressionType")
9281
9374
  .addChildNode(new xml_builder_1.XmlText(input.CompressionType))
9282
9375
  .withName("CompressionType");
9283
9376
  bodyNode.addChildNode(node);
9284
9377
  }
9285
- if (input.JSON !== undefined && input.JSON !== null) {
9378
+ if (input.JSON != null) {
9286
9379
  const node = serializeAws_restXmlJSONInput(input.JSON, context).withName("JSON");
9287
9380
  bodyNode.addChildNode(node);
9288
9381
  }
9289
- if (input.Parquet !== undefined && input.Parquet !== null) {
9382
+ if (input.Parquet != null) {
9290
9383
  const node = serializeAws_restXmlParquetInput(input.Parquet, context).withName("Parquet");
9291
9384
  bodyNode.addChildNode(node);
9292
9385
  }
@@ -9294,11 +9387,11 @@ const serializeAws_restXmlInputSerialization = (input, context) => {
9294
9387
  };
9295
9388
  const serializeAws_restXmlIntelligentTieringAndOperator = (input, context) => {
9296
9389
  const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringAndOperator");
9297
- if (input.Prefix !== undefined && input.Prefix !== null) {
9390
+ if (input.Prefix != null) {
9298
9391
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9299
9392
  bodyNode.addChildNode(node);
9300
9393
  }
9301
- if (input.Tags !== undefined && input.Tags !== null) {
9394
+ if (input.Tags != null) {
9302
9395
  const nodes = serializeAws_restXmlTagSet(input.Tags, context);
9303
9396
  nodes.map((node) => {
9304
9397
  node = node.withName("Tag");
@@ -9309,19 +9402,19 @@ const serializeAws_restXmlIntelligentTieringAndOperator = (input, context) => {
9309
9402
  };
9310
9403
  const serializeAws_restXmlIntelligentTieringConfiguration = (input, context) => {
9311
9404
  const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringConfiguration");
9312
- if (input.Id !== undefined && input.Id !== null) {
9405
+ if (input.Id != null) {
9313
9406
  const node = new xml_builder_1.XmlNode("IntelligentTieringId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
9314
9407
  bodyNode.addChildNode(node);
9315
9408
  }
9316
- if (input.Filter !== undefined && input.Filter !== null) {
9409
+ if (input.Filter != null) {
9317
9410
  const node = serializeAws_restXmlIntelligentTieringFilter(input.Filter, context).withName("Filter");
9318
9411
  bodyNode.addChildNode(node);
9319
9412
  }
9320
- if (input.Status !== undefined && input.Status !== null) {
9413
+ if (input.Status != null) {
9321
9414
  const node = new xml_builder_1.XmlNode("IntelligentTieringStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
9322
9415
  bodyNode.addChildNode(node);
9323
9416
  }
9324
- if (input.Tierings !== undefined && input.Tierings !== null) {
9417
+ if (input.Tierings != null) {
9325
9418
  const nodes = serializeAws_restXmlTieringList(input.Tierings, context);
9326
9419
  nodes.map((node) => {
9327
9420
  node = node.withName("Tiering");
@@ -9332,15 +9425,15 @@ const serializeAws_restXmlIntelligentTieringConfiguration = (input, context) =>
9332
9425
  };
9333
9426
  const serializeAws_restXmlIntelligentTieringFilter = (input, context) => {
9334
9427
  const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringFilter");
9335
- if (input.Prefix !== undefined && input.Prefix !== null) {
9428
+ if (input.Prefix != null) {
9336
9429
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9337
9430
  bodyNode.addChildNode(node);
9338
9431
  }
9339
- if (input.Tag !== undefined && input.Tag !== null) {
9432
+ if (input.Tag != null) {
9340
9433
  const node = serializeAws_restXmlTag(input.Tag, context).withName("Tag");
9341
9434
  bodyNode.addChildNode(node);
9342
9435
  }
9343
- if (input.And !== undefined && input.And !== null) {
9436
+ if (input.And != null) {
9344
9437
  const node = serializeAws_restXmlIntelligentTieringAndOperator(input.And, context).withName("And");
9345
9438
  bodyNode.addChildNode(node);
9346
9439
  }
@@ -9348,29 +9441,29 @@ const serializeAws_restXmlIntelligentTieringFilter = (input, context) => {
9348
9441
  };
9349
9442
  const serializeAws_restXmlInventoryConfiguration = (input, context) => {
9350
9443
  const bodyNode = new xml_builder_1.XmlNode("InventoryConfiguration");
9351
- if (input.Destination !== undefined && input.Destination !== null) {
9444
+ if (input.Destination != null) {
9352
9445
  const node = serializeAws_restXmlInventoryDestination(input.Destination, context).withName("Destination");
9353
9446
  bodyNode.addChildNode(node);
9354
9447
  }
9355
- if (input.IsEnabled !== undefined && input.IsEnabled !== null) {
9448
+ if (input.IsEnabled != null) {
9356
9449
  const node = new xml_builder_1.XmlNode("IsEnabled").addChildNode(new xml_builder_1.XmlText(String(input.IsEnabled))).withName("IsEnabled");
9357
9450
  bodyNode.addChildNode(node);
9358
9451
  }
9359
- if (input.Filter !== undefined && input.Filter !== null) {
9452
+ if (input.Filter != null) {
9360
9453
  const node = serializeAws_restXmlInventoryFilter(input.Filter, context).withName("Filter");
9361
9454
  bodyNode.addChildNode(node);
9362
9455
  }
9363
- if (input.Id !== undefined && input.Id !== null) {
9456
+ if (input.Id != null) {
9364
9457
  const node = new xml_builder_1.XmlNode("InventoryId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
9365
9458
  bodyNode.addChildNode(node);
9366
9459
  }
9367
- if (input.IncludedObjectVersions !== undefined && input.IncludedObjectVersions !== null) {
9460
+ if (input.IncludedObjectVersions != null) {
9368
9461
  const node = new xml_builder_1.XmlNode("InventoryIncludedObjectVersions")
9369
9462
  .addChildNode(new xml_builder_1.XmlText(input.IncludedObjectVersions))
9370
9463
  .withName("IncludedObjectVersions");
9371
9464
  bodyNode.addChildNode(node);
9372
9465
  }
9373
- if (input.OptionalFields !== undefined && input.OptionalFields !== null) {
9466
+ if (input.OptionalFields != null) {
9374
9467
  const nodes = serializeAws_restXmlInventoryOptionalFields(input.OptionalFields, context);
9375
9468
  const containerNode = new xml_builder_1.XmlNode("OptionalFields");
9376
9469
  nodes.map((node) => {
@@ -9378,7 +9471,7 @@ const serializeAws_restXmlInventoryConfiguration = (input, context) => {
9378
9471
  });
9379
9472
  bodyNode.addChildNode(containerNode);
9380
9473
  }
9381
- if (input.Schedule !== undefined && input.Schedule !== null) {
9474
+ if (input.Schedule != null) {
9382
9475
  const node = serializeAws_restXmlInventorySchedule(input.Schedule, context).withName("Schedule");
9383
9476
  bodyNode.addChildNode(node);
9384
9477
  }
@@ -9386,7 +9479,7 @@ const serializeAws_restXmlInventoryConfiguration = (input, context) => {
9386
9479
  };
9387
9480
  const serializeAws_restXmlInventoryDestination = (input, context) => {
9388
9481
  const bodyNode = new xml_builder_1.XmlNode("InventoryDestination");
9389
- if (input.S3BucketDestination !== undefined && input.S3BucketDestination !== null) {
9482
+ if (input.S3BucketDestination != null) {
9390
9483
  const node = serializeAws_restXmlInventoryS3BucketDestination(input.S3BucketDestination, context).withName("S3BucketDestination");
9391
9484
  bodyNode.addChildNode(node);
9392
9485
  }
@@ -9394,11 +9487,11 @@ const serializeAws_restXmlInventoryDestination = (input, context) => {
9394
9487
  };
9395
9488
  const serializeAws_restXmlInventoryEncryption = (input, context) => {
9396
9489
  const bodyNode = new xml_builder_1.XmlNode("InventoryEncryption");
9397
- if (input.SSES3 !== undefined && input.SSES3 !== null) {
9490
+ if (input.SSES3 != null) {
9398
9491
  const node = serializeAws_restXmlSSES3(input.SSES3, context).withName("SSE-S3");
9399
9492
  bodyNode.addChildNode(node);
9400
9493
  }
9401
- if (input.SSEKMS !== undefined && input.SSEKMS !== null) {
9494
+ if (input.SSEKMS != null) {
9402
9495
  const node = serializeAws_restXmlSSEKMS(input.SSEKMS, context).withName("SSE-KMS");
9403
9496
  bodyNode.addChildNode(node);
9404
9497
  }
@@ -9406,7 +9499,7 @@ const serializeAws_restXmlInventoryEncryption = (input, context) => {
9406
9499
  };
9407
9500
  const serializeAws_restXmlInventoryFilter = (input, context) => {
9408
9501
  const bodyNode = new xml_builder_1.XmlNode("InventoryFilter");
9409
- if (input.Prefix !== undefined && input.Prefix !== null) {
9502
+ if (input.Prefix != null) {
9410
9503
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9411
9504
  bodyNode.addChildNode(node);
9412
9505
  }
@@ -9425,23 +9518,23 @@ const serializeAws_restXmlInventoryOptionalFields = (input, context) => {
9425
9518
  };
9426
9519
  const serializeAws_restXmlInventoryS3BucketDestination = (input, context) => {
9427
9520
  const bodyNode = new xml_builder_1.XmlNode("InventoryS3BucketDestination");
9428
- if (input.AccountId !== undefined && input.AccountId !== null) {
9521
+ if (input.AccountId != null) {
9429
9522
  const node = new xml_builder_1.XmlNode("AccountId").addChildNode(new xml_builder_1.XmlText(input.AccountId)).withName("AccountId");
9430
9523
  bodyNode.addChildNode(node);
9431
9524
  }
9432
- if (input.Bucket !== undefined && input.Bucket !== null) {
9525
+ if (input.Bucket != null) {
9433
9526
  const node = new xml_builder_1.XmlNode("BucketName").addChildNode(new xml_builder_1.XmlText(input.Bucket)).withName("Bucket");
9434
9527
  bodyNode.addChildNode(node);
9435
9528
  }
9436
- if (input.Format !== undefined && input.Format !== null) {
9529
+ if (input.Format != null) {
9437
9530
  const node = new xml_builder_1.XmlNode("InventoryFormat").addChildNode(new xml_builder_1.XmlText(input.Format)).withName("Format");
9438
9531
  bodyNode.addChildNode(node);
9439
9532
  }
9440
- if (input.Prefix !== undefined && input.Prefix !== null) {
9533
+ if (input.Prefix != null) {
9441
9534
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9442
9535
  bodyNode.addChildNode(node);
9443
9536
  }
9444
- if (input.Encryption !== undefined && input.Encryption !== null) {
9537
+ if (input.Encryption != null) {
9445
9538
  const node = serializeAws_restXmlInventoryEncryption(input.Encryption, context).withName("Encryption");
9446
9539
  bodyNode.addChildNode(node);
9447
9540
  }
@@ -9449,7 +9542,7 @@ const serializeAws_restXmlInventoryS3BucketDestination = (input, context) => {
9449
9542
  };
9450
9543
  const serializeAws_restXmlInventorySchedule = (input, context) => {
9451
9544
  const bodyNode = new xml_builder_1.XmlNode("InventorySchedule");
9452
- if (input.Frequency !== undefined && input.Frequency !== null) {
9545
+ if (input.Frequency != null) {
9453
9546
  const node = new xml_builder_1.XmlNode("InventoryFrequency").addChildNode(new xml_builder_1.XmlText(input.Frequency)).withName("Frequency");
9454
9547
  bodyNode.addChildNode(node);
9455
9548
  }
@@ -9457,7 +9550,7 @@ const serializeAws_restXmlInventorySchedule = (input, context) => {
9457
9550
  };
9458
9551
  const serializeAws_restXmlJSONInput = (input, context) => {
9459
9552
  const bodyNode = new xml_builder_1.XmlNode("JSONInput");
9460
- if (input.Type !== undefined && input.Type !== null) {
9553
+ if (input.Type != null) {
9461
9554
  const node = new xml_builder_1.XmlNode("JSONType").addChildNode(new xml_builder_1.XmlText(input.Type)).withName("Type");
9462
9555
  bodyNode.addChildNode(node);
9463
9556
  }
@@ -9465,7 +9558,7 @@ const serializeAws_restXmlJSONInput = (input, context) => {
9465
9558
  };
9466
9559
  const serializeAws_restXmlJSONOutput = (input, context) => {
9467
9560
  const bodyNode = new xml_builder_1.XmlNode("JSONOutput");
9468
- if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {
9561
+ if (input.RecordDelimiter != null) {
9469
9562
  const node = new xml_builder_1.XmlNode("RecordDelimiter")
9470
9563
  .addChildNode(new xml_builder_1.XmlText(input.RecordDelimiter))
9471
9564
  .withName("RecordDelimiter");
@@ -9475,24 +9568,24 @@ const serializeAws_restXmlJSONOutput = (input, context) => {
9475
9568
  };
9476
9569
  const serializeAws_restXmlLambdaFunctionConfiguration = (input, context) => {
9477
9570
  const bodyNode = new xml_builder_1.XmlNode("LambdaFunctionConfiguration");
9478
- if (input.Id !== undefined && input.Id !== null) {
9571
+ if (input.Id != null) {
9479
9572
  const node = new xml_builder_1.XmlNode("NotificationId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
9480
9573
  bodyNode.addChildNode(node);
9481
9574
  }
9482
- if (input.LambdaFunctionArn !== undefined && input.LambdaFunctionArn !== null) {
9575
+ if (input.LambdaFunctionArn != null) {
9483
9576
  const node = new xml_builder_1.XmlNode("LambdaFunctionArn")
9484
9577
  .addChildNode(new xml_builder_1.XmlText(input.LambdaFunctionArn))
9485
9578
  .withName("CloudFunction");
9486
9579
  bodyNode.addChildNode(node);
9487
9580
  }
9488
- if (input.Events !== undefined && input.Events !== null) {
9581
+ if (input.Events != null) {
9489
9582
  const nodes = serializeAws_restXmlEventList(input.Events, context);
9490
9583
  nodes.map((node) => {
9491
9584
  node = node.withName("Event");
9492
9585
  bodyNode.addChildNode(node);
9493
9586
  });
9494
9587
  }
9495
- if (input.Filter !== undefined && input.Filter !== null) {
9588
+ if (input.Filter != null) {
9496
9589
  const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter");
9497
9590
  bodyNode.addChildNode(node);
9498
9591
  }
@@ -9511,17 +9604,17 @@ const serializeAws_restXmlLambdaFunctionConfigurationList = (input, context) =>
9511
9604
  };
9512
9605
  const serializeAws_restXmlLifecycleExpiration = (input, context) => {
9513
9606
  const bodyNode = new xml_builder_1.XmlNode("LifecycleExpiration");
9514
- if (input.Date !== undefined && input.Date !== null) {
9607
+ if (input.Date != null) {
9515
9608
  const node = new xml_builder_1.XmlNode("Date")
9516
9609
  .addChildNode(new xml_builder_1.XmlText(input.Date.toISOString().split(".")[0] + "Z"))
9517
9610
  .withName("Date");
9518
9611
  bodyNode.addChildNode(node);
9519
9612
  }
9520
- if (input.Days !== undefined && input.Days !== null) {
9613
+ if (input.Days != null) {
9521
9614
  const node = new xml_builder_1.XmlNode("Days").addChildNode(new xml_builder_1.XmlText(String(input.Days))).withName("Days");
9522
9615
  bodyNode.addChildNode(node);
9523
9616
  }
9524
- if (input.ExpiredObjectDeleteMarker !== undefined && input.ExpiredObjectDeleteMarker !== null) {
9617
+ if (input.ExpiredObjectDeleteMarker != null) {
9525
9618
  const node = new xml_builder_1.XmlNode("ExpiredObjectDeleteMarker")
9526
9619
  .addChildNode(new xml_builder_1.XmlText(String(input.ExpiredObjectDeleteMarker)))
9527
9620
  .withName("ExpiredObjectDeleteMarker");
@@ -9531,45 +9624,45 @@ const serializeAws_restXmlLifecycleExpiration = (input, context) => {
9531
9624
  };
9532
9625
  const serializeAws_restXmlLifecycleRule = (input, context) => {
9533
9626
  const bodyNode = new xml_builder_1.XmlNode("LifecycleRule");
9534
- if (input.Expiration !== undefined && input.Expiration !== null) {
9627
+ if (input.Expiration != null) {
9535
9628
  const node = serializeAws_restXmlLifecycleExpiration(input.Expiration, context).withName("Expiration");
9536
9629
  bodyNode.addChildNode(node);
9537
9630
  }
9538
- if (input.ID !== undefined && input.ID !== null) {
9631
+ if (input.ID != null) {
9539
9632
  const node = new xml_builder_1.XmlNode("ID").addChildNode(new xml_builder_1.XmlText(input.ID)).withName("ID");
9540
9633
  bodyNode.addChildNode(node);
9541
9634
  }
9542
- if (input.Prefix !== undefined && input.Prefix !== null) {
9635
+ if (input.Prefix != null) {
9543
9636
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9544
9637
  bodyNode.addChildNode(node);
9545
9638
  }
9546
- if (input.Filter !== undefined && input.Filter !== null) {
9639
+ if (input.Filter != null) {
9547
9640
  const node = serializeAws_restXmlLifecycleRuleFilter(input.Filter, context).withName("Filter");
9548
9641
  bodyNode.addChildNode(node);
9549
9642
  }
9550
- if (input.Status !== undefined && input.Status !== null) {
9643
+ if (input.Status != null) {
9551
9644
  const node = new xml_builder_1.XmlNode("ExpirationStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
9552
9645
  bodyNode.addChildNode(node);
9553
9646
  }
9554
- if (input.Transitions !== undefined && input.Transitions !== null) {
9647
+ if (input.Transitions != null) {
9555
9648
  const nodes = serializeAws_restXmlTransitionList(input.Transitions, context);
9556
9649
  nodes.map((node) => {
9557
9650
  node = node.withName("Transition");
9558
9651
  bodyNode.addChildNode(node);
9559
9652
  });
9560
9653
  }
9561
- if (input.NoncurrentVersionTransitions !== undefined && input.NoncurrentVersionTransitions !== null) {
9654
+ if (input.NoncurrentVersionTransitions != null) {
9562
9655
  const nodes = serializeAws_restXmlNoncurrentVersionTransitionList(input.NoncurrentVersionTransitions, context);
9563
9656
  nodes.map((node) => {
9564
9657
  node = node.withName("NoncurrentVersionTransition");
9565
9658
  bodyNode.addChildNode(node);
9566
9659
  });
9567
9660
  }
9568
- if (input.NoncurrentVersionExpiration !== undefined && input.NoncurrentVersionExpiration !== null) {
9661
+ if (input.NoncurrentVersionExpiration != null) {
9569
9662
  const node = serializeAws_restXmlNoncurrentVersionExpiration(input.NoncurrentVersionExpiration, context).withName("NoncurrentVersionExpiration");
9570
9663
  bodyNode.addChildNode(node);
9571
9664
  }
9572
- if (input.AbortIncompleteMultipartUpload !== undefined && input.AbortIncompleteMultipartUpload !== null) {
9665
+ if (input.AbortIncompleteMultipartUpload != null) {
9573
9666
  const node = serializeAws_restXmlAbortIncompleteMultipartUpload(input.AbortIncompleteMultipartUpload, context).withName("AbortIncompleteMultipartUpload");
9574
9667
  bodyNode.addChildNode(node);
9575
9668
  }
@@ -9577,24 +9670,24 @@ const serializeAws_restXmlLifecycleRule = (input, context) => {
9577
9670
  };
9578
9671
  const serializeAws_restXmlLifecycleRuleAndOperator = (input, context) => {
9579
9672
  const bodyNode = new xml_builder_1.XmlNode("LifecycleRuleAndOperator");
9580
- if (input.Prefix !== undefined && input.Prefix !== null) {
9673
+ if (input.Prefix != null) {
9581
9674
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9582
9675
  bodyNode.addChildNode(node);
9583
9676
  }
9584
- if (input.Tags !== undefined && input.Tags !== null) {
9677
+ if (input.Tags != null) {
9585
9678
  const nodes = serializeAws_restXmlTagSet(input.Tags, context);
9586
9679
  nodes.map((node) => {
9587
9680
  node = node.withName("Tag");
9588
9681
  bodyNode.addChildNode(node);
9589
9682
  });
9590
9683
  }
9591
- if (input.ObjectSizeGreaterThan !== undefined && input.ObjectSizeGreaterThan !== null) {
9684
+ if (input.ObjectSizeGreaterThan != null) {
9592
9685
  const node = new xml_builder_1.XmlNode("ObjectSizeGreaterThanBytes")
9593
9686
  .addChildNode(new xml_builder_1.XmlText(String(input.ObjectSizeGreaterThan)))
9594
9687
  .withName("ObjectSizeGreaterThan");
9595
9688
  bodyNode.addChildNode(node);
9596
9689
  }
9597
- if (input.ObjectSizeLessThan !== undefined && input.ObjectSizeLessThan !== null) {
9690
+ if (input.ObjectSizeLessThan != null) {
9598
9691
  const node = new xml_builder_1.XmlNode("ObjectSizeLessThanBytes")
9599
9692
  .addChildNode(new xml_builder_1.XmlText(String(input.ObjectSizeLessThan)))
9600
9693
  .withName("ObjectSizeLessThan");
@@ -9651,11 +9744,11 @@ const serializeAws_restXmlLifecycleRules = (input, context) => {
9651
9744
  };
9652
9745
  const serializeAws_restXmlLoggingEnabled = (input, context) => {
9653
9746
  const bodyNode = new xml_builder_1.XmlNode("LoggingEnabled");
9654
- if (input.TargetBucket !== undefined && input.TargetBucket !== null) {
9747
+ if (input.TargetBucket != null) {
9655
9748
  const node = new xml_builder_1.XmlNode("TargetBucket").addChildNode(new xml_builder_1.XmlText(input.TargetBucket)).withName("TargetBucket");
9656
9749
  bodyNode.addChildNode(node);
9657
9750
  }
9658
- if (input.TargetGrants !== undefined && input.TargetGrants !== null) {
9751
+ if (input.TargetGrants != null) {
9659
9752
  const nodes = serializeAws_restXmlTargetGrants(input.TargetGrants, context);
9660
9753
  const containerNode = new xml_builder_1.XmlNode("TargetGrants");
9661
9754
  nodes.map((node) => {
@@ -9663,7 +9756,7 @@ const serializeAws_restXmlLoggingEnabled = (input, context) => {
9663
9756
  });
9664
9757
  bodyNode.addChildNode(containerNode);
9665
9758
  }
9666
- if (input.TargetPrefix !== undefined && input.TargetPrefix !== null) {
9759
+ if (input.TargetPrefix != null) {
9667
9760
  const node = new xml_builder_1.XmlNode("TargetPrefix").addChildNode(new xml_builder_1.XmlText(input.TargetPrefix)).withName("TargetPrefix");
9668
9761
  bodyNode.addChildNode(node);
9669
9762
  }
@@ -9671,11 +9764,11 @@ const serializeAws_restXmlLoggingEnabled = (input, context) => {
9671
9764
  };
9672
9765
  const serializeAws_restXmlMetadataEntry = (input, context) => {
9673
9766
  const bodyNode = new xml_builder_1.XmlNode("MetadataEntry");
9674
- if (input.Name !== undefined && input.Name !== null) {
9767
+ if (input.Name != null) {
9675
9768
  const node = new xml_builder_1.XmlNode("MetadataKey").addChildNode(new xml_builder_1.XmlText(input.Name)).withName("Name");
9676
9769
  bodyNode.addChildNode(node);
9677
9770
  }
9678
- if (input.Value !== undefined && input.Value !== null) {
9771
+ if (input.Value != null) {
9679
9772
  const node = new xml_builder_1.XmlNode("MetadataValue").addChildNode(new xml_builder_1.XmlText(input.Value)).withName("Value");
9680
9773
  bodyNode.addChildNode(node);
9681
9774
  }
@@ -9683,11 +9776,11 @@ const serializeAws_restXmlMetadataEntry = (input, context) => {
9683
9776
  };
9684
9777
  const serializeAws_restXmlMetrics = (input, context) => {
9685
9778
  const bodyNode = new xml_builder_1.XmlNode("Metrics");
9686
- if (input.Status !== undefined && input.Status !== null) {
9779
+ if (input.Status != null) {
9687
9780
  const node = new xml_builder_1.XmlNode("MetricsStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
9688
9781
  bodyNode.addChildNode(node);
9689
9782
  }
9690
- if (input.EventThreshold !== undefined && input.EventThreshold !== null) {
9783
+ if (input.EventThreshold != null) {
9691
9784
  const node = serializeAws_restXmlReplicationTimeValue(input.EventThreshold, context).withName("EventThreshold");
9692
9785
  bodyNode.addChildNode(node);
9693
9786
  }
@@ -9695,18 +9788,18 @@ const serializeAws_restXmlMetrics = (input, context) => {
9695
9788
  };
9696
9789
  const serializeAws_restXmlMetricsAndOperator = (input, context) => {
9697
9790
  const bodyNode = new xml_builder_1.XmlNode("MetricsAndOperator");
9698
- if (input.Prefix !== undefined && input.Prefix !== null) {
9791
+ if (input.Prefix != null) {
9699
9792
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
9700
9793
  bodyNode.addChildNode(node);
9701
9794
  }
9702
- if (input.Tags !== undefined && input.Tags !== null) {
9795
+ if (input.Tags != null) {
9703
9796
  const nodes = serializeAws_restXmlTagSet(input.Tags, context);
9704
9797
  nodes.map((node) => {
9705
9798
  node = node.withName("Tag");
9706
9799
  bodyNode.addChildNode(node);
9707
9800
  });
9708
9801
  }
9709
- if (input.AccessPointArn !== undefined && input.AccessPointArn !== null) {
9802
+ if (input.AccessPointArn != null) {
9710
9803
  const node = new xml_builder_1.XmlNode("AccessPointArn")
9711
9804
  .addChildNode(new xml_builder_1.XmlText(input.AccessPointArn))
9712
9805
  .withName("AccessPointArn");
@@ -9716,11 +9809,11 @@ const serializeAws_restXmlMetricsAndOperator = (input, context) => {
9716
9809
  };
9717
9810
  const serializeAws_restXmlMetricsConfiguration = (input, context) => {
9718
9811
  const bodyNode = new xml_builder_1.XmlNode("MetricsConfiguration");
9719
- if (input.Id !== undefined && input.Id !== null) {
9812
+ if (input.Id != null) {
9720
9813
  const node = new xml_builder_1.XmlNode("MetricsId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
9721
9814
  bodyNode.addChildNode(node);
9722
9815
  }
9723
- if (input.Filter !== undefined && input.Filter !== null) {
9816
+ if (input.Filter != null) {
9724
9817
  const node = serializeAws_restXmlMetricsFilter(input.Filter, context).withName("Filter");
9725
9818
  bodyNode.addChildNode(node);
9726
9819
  }
@@ -9756,13 +9849,13 @@ const serializeAws_restXmlMetricsFilter = (input, context) => {
9756
9849
  };
9757
9850
  const serializeAws_restXmlNoncurrentVersionExpiration = (input, context) => {
9758
9851
  const bodyNode = new xml_builder_1.XmlNode("NoncurrentVersionExpiration");
9759
- if (input.NoncurrentDays !== undefined && input.NoncurrentDays !== null) {
9852
+ if (input.NoncurrentDays != null) {
9760
9853
  const node = new xml_builder_1.XmlNode("Days")
9761
9854
  .addChildNode(new xml_builder_1.XmlText(String(input.NoncurrentDays)))
9762
9855
  .withName("NoncurrentDays");
9763
9856
  bodyNode.addChildNode(node);
9764
9857
  }
9765
- if (input.NewerNoncurrentVersions !== undefined && input.NewerNoncurrentVersions !== null) {
9858
+ if (input.NewerNoncurrentVersions != null) {
9766
9859
  const node = new xml_builder_1.XmlNode("VersionCount")
9767
9860
  .addChildNode(new xml_builder_1.XmlText(String(input.NewerNoncurrentVersions)))
9768
9861
  .withName("NewerNoncurrentVersions");
@@ -9772,19 +9865,19 @@ const serializeAws_restXmlNoncurrentVersionExpiration = (input, context) => {
9772
9865
  };
9773
9866
  const serializeAws_restXmlNoncurrentVersionTransition = (input, context) => {
9774
9867
  const bodyNode = new xml_builder_1.XmlNode("NoncurrentVersionTransition");
9775
- if (input.NoncurrentDays !== undefined && input.NoncurrentDays !== null) {
9868
+ if (input.NoncurrentDays != null) {
9776
9869
  const node = new xml_builder_1.XmlNode("Days")
9777
9870
  .addChildNode(new xml_builder_1.XmlText(String(input.NoncurrentDays)))
9778
9871
  .withName("NoncurrentDays");
9779
9872
  bodyNode.addChildNode(node);
9780
9873
  }
9781
- if (input.StorageClass !== undefined && input.StorageClass !== null) {
9874
+ if (input.StorageClass != null) {
9782
9875
  const node = new xml_builder_1.XmlNode("TransitionStorageClass")
9783
9876
  .addChildNode(new xml_builder_1.XmlText(input.StorageClass))
9784
9877
  .withName("StorageClass");
9785
9878
  bodyNode.addChildNode(node);
9786
9879
  }
9787
- if (input.NewerNoncurrentVersions !== undefined && input.NewerNoncurrentVersions !== null) {
9880
+ if (input.NewerNoncurrentVersions != null) {
9788
9881
  const node = new xml_builder_1.XmlNode("VersionCount")
9789
9882
  .addChildNode(new xml_builder_1.XmlText(String(input.NewerNoncurrentVersions)))
9790
9883
  .withName("NewerNoncurrentVersions");
@@ -9805,28 +9898,28 @@ const serializeAws_restXmlNoncurrentVersionTransitionList = (input, context) =>
9805
9898
  };
9806
9899
  const serializeAws_restXmlNotificationConfiguration = (input, context) => {
9807
9900
  const bodyNode = new xml_builder_1.XmlNode("NotificationConfiguration");
9808
- if (input.TopicConfigurations !== undefined && input.TopicConfigurations !== null) {
9901
+ if (input.TopicConfigurations != null) {
9809
9902
  const nodes = serializeAws_restXmlTopicConfigurationList(input.TopicConfigurations, context);
9810
9903
  nodes.map((node) => {
9811
9904
  node = node.withName("TopicConfiguration");
9812
9905
  bodyNode.addChildNode(node);
9813
9906
  });
9814
9907
  }
9815
- if (input.QueueConfigurations !== undefined && input.QueueConfigurations !== null) {
9908
+ if (input.QueueConfigurations != null) {
9816
9909
  const nodes = serializeAws_restXmlQueueConfigurationList(input.QueueConfigurations, context);
9817
9910
  nodes.map((node) => {
9818
9911
  node = node.withName("QueueConfiguration");
9819
9912
  bodyNode.addChildNode(node);
9820
9913
  });
9821
9914
  }
9822
- if (input.LambdaFunctionConfigurations !== undefined && input.LambdaFunctionConfigurations !== null) {
9915
+ if (input.LambdaFunctionConfigurations != null) {
9823
9916
  const nodes = serializeAws_restXmlLambdaFunctionConfigurationList(input.LambdaFunctionConfigurations, context);
9824
9917
  nodes.map((node) => {
9825
9918
  node = node.withName("CloudFunctionConfiguration");
9826
9919
  bodyNode.addChildNode(node);
9827
9920
  });
9828
9921
  }
9829
- if (input.EventBridgeConfiguration !== undefined && input.EventBridgeConfiguration !== null) {
9922
+ if (input.EventBridgeConfiguration != null) {
9830
9923
  const node = serializeAws_restXmlEventBridgeConfiguration(input.EventBridgeConfiguration, context).withName("EventBridgeConfiguration");
9831
9924
  bodyNode.addChildNode(node);
9832
9925
  }
@@ -9834,7 +9927,7 @@ const serializeAws_restXmlNotificationConfiguration = (input, context) => {
9834
9927
  };
9835
9928
  const serializeAws_restXmlNotificationConfigurationFilter = (input, context) => {
9836
9929
  const bodyNode = new xml_builder_1.XmlNode("NotificationConfigurationFilter");
9837
- if (input.Key !== undefined && input.Key !== null) {
9930
+ if (input.Key != null) {
9838
9931
  const node = serializeAws_restXmlS3KeyFilter(input.Key, context).withName("S3Key");
9839
9932
  bodyNode.addChildNode(node);
9840
9933
  }
@@ -9842,11 +9935,11 @@ const serializeAws_restXmlNotificationConfigurationFilter = (input, context) =>
9842
9935
  };
9843
9936
  const serializeAws_restXmlObjectIdentifier = (input, context) => {
9844
9937
  const bodyNode = new xml_builder_1.XmlNode("ObjectIdentifier");
9845
- if (input.Key !== undefined && input.Key !== null) {
9938
+ if (input.Key != null) {
9846
9939
  const node = new xml_builder_1.XmlNode("ObjectKey").addChildNode(new xml_builder_1.XmlText(input.Key)).withName("Key");
9847
9940
  bodyNode.addChildNode(node);
9848
9941
  }
9849
- if (input.VersionId !== undefined && input.VersionId !== null) {
9942
+ if (input.VersionId != null) {
9850
9943
  const node = new xml_builder_1.XmlNode("ObjectVersionId").addChildNode(new xml_builder_1.XmlText(input.VersionId)).withName("VersionId");
9851
9944
  bodyNode.addChildNode(node);
9852
9945
  }
@@ -9865,13 +9958,13 @@ const serializeAws_restXmlObjectIdentifierList = (input, context) => {
9865
9958
  };
9866
9959
  const serializeAws_restXmlObjectLockConfiguration = (input, context) => {
9867
9960
  const bodyNode = new xml_builder_1.XmlNode("ObjectLockConfiguration");
9868
- if (input.ObjectLockEnabled !== undefined && input.ObjectLockEnabled !== null) {
9961
+ if (input.ObjectLockEnabled != null) {
9869
9962
  const node = new xml_builder_1.XmlNode("ObjectLockEnabled")
9870
9963
  .addChildNode(new xml_builder_1.XmlText(input.ObjectLockEnabled))
9871
9964
  .withName("ObjectLockEnabled");
9872
9965
  bodyNode.addChildNode(node);
9873
9966
  }
9874
- if (input.Rule !== undefined && input.Rule !== null) {
9967
+ if (input.Rule != null) {
9875
9968
  const node = serializeAws_restXmlObjectLockRule(input.Rule, context).withName("Rule");
9876
9969
  bodyNode.addChildNode(node);
9877
9970
  }
@@ -9879,7 +9972,7 @@ const serializeAws_restXmlObjectLockConfiguration = (input, context) => {
9879
9972
  };
9880
9973
  const serializeAws_restXmlObjectLockLegalHold = (input, context) => {
9881
9974
  const bodyNode = new xml_builder_1.XmlNode("ObjectLockLegalHold");
9882
- if (input.Status !== undefined && input.Status !== null) {
9975
+ if (input.Status != null) {
9883
9976
  const node = new xml_builder_1.XmlNode("ObjectLockLegalHoldStatus")
9884
9977
  .addChildNode(new xml_builder_1.XmlText(input.Status))
9885
9978
  .withName("Status");
@@ -9889,11 +9982,11 @@ const serializeAws_restXmlObjectLockLegalHold = (input, context) => {
9889
9982
  };
9890
9983
  const serializeAws_restXmlObjectLockRetention = (input, context) => {
9891
9984
  const bodyNode = new xml_builder_1.XmlNode("ObjectLockRetention");
9892
- if (input.Mode !== undefined && input.Mode !== null) {
9985
+ if (input.Mode != null) {
9893
9986
  const node = new xml_builder_1.XmlNode("ObjectLockRetentionMode").addChildNode(new xml_builder_1.XmlText(input.Mode)).withName("Mode");
9894
9987
  bodyNode.addChildNode(node);
9895
9988
  }
9896
- if (input.RetainUntilDate !== undefined && input.RetainUntilDate !== null) {
9989
+ if (input.RetainUntilDate != null) {
9897
9990
  const node = new xml_builder_1.XmlNode("Date")
9898
9991
  .addChildNode(new xml_builder_1.XmlText(input.RetainUntilDate.toISOString().split(".")[0] + "Z"))
9899
9992
  .withName("RetainUntilDate");
@@ -9903,7 +9996,7 @@ const serializeAws_restXmlObjectLockRetention = (input, context) => {
9903
9996
  };
9904
9997
  const serializeAws_restXmlObjectLockRule = (input, context) => {
9905
9998
  const bodyNode = new xml_builder_1.XmlNode("ObjectLockRule");
9906
- if (input.DefaultRetention !== undefined && input.DefaultRetention !== null) {
9999
+ if (input.DefaultRetention != null) {
9907
10000
  const node = serializeAws_restXmlDefaultRetention(input.DefaultRetention, context).withName("DefaultRetention");
9908
10001
  bodyNode.addChildNode(node);
9909
10002
  }
@@ -9911,7 +10004,7 @@ const serializeAws_restXmlObjectLockRule = (input, context) => {
9911
10004
  };
9912
10005
  const serializeAws_restXmlOutputLocation = (input, context) => {
9913
10006
  const bodyNode = new xml_builder_1.XmlNode("OutputLocation");
9914
- if (input.S3 !== undefined && input.S3 !== null) {
10007
+ if (input.S3 != null) {
9915
10008
  const node = serializeAws_restXmlS3Location(input.S3, context).withName("S3");
9916
10009
  bodyNode.addChildNode(node);
9917
10010
  }
@@ -9919,11 +10012,11 @@ const serializeAws_restXmlOutputLocation = (input, context) => {
9919
10012
  };
9920
10013
  const serializeAws_restXmlOutputSerialization = (input, context) => {
9921
10014
  const bodyNode = new xml_builder_1.XmlNode("OutputSerialization");
9922
- if (input.CSV !== undefined && input.CSV !== null) {
10015
+ if (input.CSV != null) {
9923
10016
  const node = serializeAws_restXmlCSVOutput(input.CSV, context).withName("CSV");
9924
10017
  bodyNode.addChildNode(node);
9925
10018
  }
9926
- if (input.JSON !== undefined && input.JSON !== null) {
10019
+ if (input.JSON != null) {
9927
10020
  const node = serializeAws_restXmlJSONOutput(input.JSON, context).withName("JSON");
9928
10021
  bodyNode.addChildNode(node);
9929
10022
  }
@@ -9931,11 +10024,11 @@ const serializeAws_restXmlOutputSerialization = (input, context) => {
9931
10024
  };
9932
10025
  const serializeAws_restXmlOwner = (input, context) => {
9933
10026
  const bodyNode = new xml_builder_1.XmlNode("Owner");
9934
- if (input.DisplayName !== undefined && input.DisplayName !== null) {
10027
+ if (input.DisplayName != null) {
9935
10028
  const node = new xml_builder_1.XmlNode("DisplayName").addChildNode(new xml_builder_1.XmlText(input.DisplayName)).withName("DisplayName");
9936
10029
  bodyNode.addChildNode(node);
9937
10030
  }
9938
- if (input.ID !== undefined && input.ID !== null) {
10031
+ if (input.ID != null) {
9939
10032
  const node = new xml_builder_1.XmlNode("ID").addChildNode(new xml_builder_1.XmlText(input.ID)).withName("ID");
9940
10033
  bodyNode.addChildNode(node);
9941
10034
  }
@@ -9943,7 +10036,7 @@ const serializeAws_restXmlOwner = (input, context) => {
9943
10036
  };
9944
10037
  const serializeAws_restXmlOwnershipControls = (input, context) => {
9945
10038
  const bodyNode = new xml_builder_1.XmlNode("OwnershipControls");
9946
- if (input.Rules !== undefined && input.Rules !== null) {
10039
+ if (input.Rules != null) {
9947
10040
  const nodes = serializeAws_restXmlOwnershipControlsRules(input.Rules, context);
9948
10041
  nodes.map((node) => {
9949
10042
  node = node.withName("Rule");
@@ -9954,7 +10047,7 @@ const serializeAws_restXmlOwnershipControls = (input, context) => {
9954
10047
  };
9955
10048
  const serializeAws_restXmlOwnershipControlsRule = (input, context) => {
9956
10049
  const bodyNode = new xml_builder_1.XmlNode("OwnershipControlsRule");
9957
- if (input.ObjectOwnership !== undefined && input.ObjectOwnership !== null) {
10050
+ if (input.ObjectOwnership != null) {
9958
10051
  const node = new xml_builder_1.XmlNode("ObjectOwnership")
9959
10052
  .addChildNode(new xml_builder_1.XmlText(input.ObjectOwnership))
9960
10053
  .withName("ObjectOwnership");
@@ -9979,25 +10072,25 @@ const serializeAws_restXmlParquetInput = (input, context) => {
9979
10072
  };
9980
10073
  const serializeAws_restXmlPublicAccessBlockConfiguration = (input, context) => {
9981
10074
  const bodyNode = new xml_builder_1.XmlNode("PublicAccessBlockConfiguration");
9982
- if (input.BlockPublicAcls !== undefined && input.BlockPublicAcls !== null) {
10075
+ if (input.BlockPublicAcls != null) {
9983
10076
  const node = new xml_builder_1.XmlNode("Setting")
9984
10077
  .addChildNode(new xml_builder_1.XmlText(String(input.BlockPublicAcls)))
9985
10078
  .withName("BlockPublicAcls");
9986
10079
  bodyNode.addChildNode(node);
9987
10080
  }
9988
- if (input.IgnorePublicAcls !== undefined && input.IgnorePublicAcls !== null) {
10081
+ if (input.IgnorePublicAcls != null) {
9989
10082
  const node = new xml_builder_1.XmlNode("Setting")
9990
10083
  .addChildNode(new xml_builder_1.XmlText(String(input.IgnorePublicAcls)))
9991
10084
  .withName("IgnorePublicAcls");
9992
10085
  bodyNode.addChildNode(node);
9993
10086
  }
9994
- if (input.BlockPublicPolicy !== undefined && input.BlockPublicPolicy !== null) {
10087
+ if (input.BlockPublicPolicy != null) {
9995
10088
  const node = new xml_builder_1.XmlNode("Setting")
9996
10089
  .addChildNode(new xml_builder_1.XmlText(String(input.BlockPublicPolicy)))
9997
10090
  .withName("BlockPublicPolicy");
9998
10091
  bodyNode.addChildNode(node);
9999
10092
  }
10000
- if (input.RestrictPublicBuckets !== undefined && input.RestrictPublicBuckets !== null) {
10093
+ if (input.RestrictPublicBuckets != null) {
10001
10094
  const node = new xml_builder_1.XmlNode("Setting")
10002
10095
  .addChildNode(new xml_builder_1.XmlText(String(input.RestrictPublicBuckets)))
10003
10096
  .withName("RestrictPublicBuckets");
@@ -10007,22 +10100,22 @@ const serializeAws_restXmlPublicAccessBlockConfiguration = (input, context) => {
10007
10100
  };
10008
10101
  const serializeAws_restXmlQueueConfiguration = (input, context) => {
10009
10102
  const bodyNode = new xml_builder_1.XmlNode("QueueConfiguration");
10010
- if (input.Id !== undefined && input.Id !== null) {
10103
+ if (input.Id != null) {
10011
10104
  const node = new xml_builder_1.XmlNode("NotificationId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
10012
10105
  bodyNode.addChildNode(node);
10013
10106
  }
10014
- if (input.QueueArn !== undefined && input.QueueArn !== null) {
10107
+ if (input.QueueArn != null) {
10015
10108
  const node = new xml_builder_1.XmlNode("QueueArn").addChildNode(new xml_builder_1.XmlText(input.QueueArn)).withName("Queue");
10016
10109
  bodyNode.addChildNode(node);
10017
10110
  }
10018
- if (input.Events !== undefined && input.Events !== null) {
10111
+ if (input.Events != null) {
10019
10112
  const nodes = serializeAws_restXmlEventList(input.Events, context);
10020
10113
  nodes.map((node) => {
10021
10114
  node = node.withName("Event");
10022
10115
  bodyNode.addChildNode(node);
10023
10116
  });
10024
10117
  }
10025
- if (input.Filter !== undefined && input.Filter !== null) {
10118
+ if (input.Filter != null) {
10026
10119
  const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter");
10027
10120
  bodyNode.addChildNode(node);
10028
10121
  }
@@ -10041,27 +10134,27 @@ const serializeAws_restXmlQueueConfigurationList = (input, context) => {
10041
10134
  };
10042
10135
  const serializeAws_restXmlRedirect = (input, context) => {
10043
10136
  const bodyNode = new xml_builder_1.XmlNode("Redirect");
10044
- if (input.HostName !== undefined && input.HostName !== null) {
10137
+ if (input.HostName != null) {
10045
10138
  const node = new xml_builder_1.XmlNode("HostName").addChildNode(new xml_builder_1.XmlText(input.HostName)).withName("HostName");
10046
10139
  bodyNode.addChildNode(node);
10047
10140
  }
10048
- if (input.HttpRedirectCode !== undefined && input.HttpRedirectCode !== null) {
10141
+ if (input.HttpRedirectCode != null) {
10049
10142
  const node = new xml_builder_1.XmlNode("HttpRedirectCode")
10050
10143
  .addChildNode(new xml_builder_1.XmlText(input.HttpRedirectCode))
10051
10144
  .withName("HttpRedirectCode");
10052
10145
  bodyNode.addChildNode(node);
10053
10146
  }
10054
- if (input.Protocol !== undefined && input.Protocol !== null) {
10147
+ if (input.Protocol != null) {
10055
10148
  const node = new xml_builder_1.XmlNode("Protocol").addChildNode(new xml_builder_1.XmlText(input.Protocol)).withName("Protocol");
10056
10149
  bodyNode.addChildNode(node);
10057
10150
  }
10058
- if (input.ReplaceKeyPrefixWith !== undefined && input.ReplaceKeyPrefixWith !== null) {
10151
+ if (input.ReplaceKeyPrefixWith != null) {
10059
10152
  const node = new xml_builder_1.XmlNode("ReplaceKeyPrefixWith")
10060
10153
  .addChildNode(new xml_builder_1.XmlText(input.ReplaceKeyPrefixWith))
10061
10154
  .withName("ReplaceKeyPrefixWith");
10062
10155
  bodyNode.addChildNode(node);
10063
10156
  }
10064
- if (input.ReplaceKeyWith !== undefined && input.ReplaceKeyWith !== null) {
10157
+ if (input.ReplaceKeyWith != null) {
10065
10158
  const node = new xml_builder_1.XmlNode("ReplaceKeyWith")
10066
10159
  .addChildNode(new xml_builder_1.XmlText(input.ReplaceKeyWith))
10067
10160
  .withName("ReplaceKeyWith");
@@ -10071,11 +10164,11 @@ const serializeAws_restXmlRedirect = (input, context) => {
10071
10164
  };
10072
10165
  const serializeAws_restXmlRedirectAllRequestsTo = (input, context) => {
10073
10166
  const bodyNode = new xml_builder_1.XmlNode("RedirectAllRequestsTo");
10074
- if (input.HostName !== undefined && input.HostName !== null) {
10167
+ if (input.HostName != null) {
10075
10168
  const node = new xml_builder_1.XmlNode("HostName").addChildNode(new xml_builder_1.XmlText(input.HostName)).withName("HostName");
10076
10169
  bodyNode.addChildNode(node);
10077
10170
  }
10078
- if (input.Protocol !== undefined && input.Protocol !== null) {
10171
+ if (input.Protocol != null) {
10079
10172
  const node = new xml_builder_1.XmlNode("Protocol").addChildNode(new xml_builder_1.XmlText(input.Protocol)).withName("Protocol");
10080
10173
  bodyNode.addChildNode(node);
10081
10174
  }
@@ -10083,7 +10176,7 @@ const serializeAws_restXmlRedirectAllRequestsTo = (input, context) => {
10083
10176
  };
10084
10177
  const serializeAws_restXmlReplicaModifications = (input, context) => {
10085
10178
  const bodyNode = new xml_builder_1.XmlNode("ReplicaModifications");
10086
- if (input.Status !== undefined && input.Status !== null) {
10179
+ if (input.Status != null) {
10087
10180
  const node = new xml_builder_1.XmlNode("ReplicaModificationsStatus")
10088
10181
  .addChildNode(new xml_builder_1.XmlText(input.Status))
10089
10182
  .withName("Status");
@@ -10093,11 +10186,11 @@ const serializeAws_restXmlReplicaModifications = (input, context) => {
10093
10186
  };
10094
10187
  const serializeAws_restXmlReplicationConfiguration = (input, context) => {
10095
10188
  const bodyNode = new xml_builder_1.XmlNode("ReplicationConfiguration");
10096
- if (input.Role !== undefined && input.Role !== null) {
10189
+ if (input.Role != null) {
10097
10190
  const node = new xml_builder_1.XmlNode("Role").addChildNode(new xml_builder_1.XmlText(input.Role)).withName("Role");
10098
10191
  bodyNode.addChildNode(node);
10099
10192
  }
10100
- if (input.Rules !== undefined && input.Rules !== null) {
10193
+ if (input.Rules != null) {
10101
10194
  const nodes = serializeAws_restXmlReplicationRules(input.Rules, context);
10102
10195
  nodes.map((node) => {
10103
10196
  node = node.withName("Rule");
@@ -10108,39 +10201,39 @@ const serializeAws_restXmlReplicationConfiguration = (input, context) => {
10108
10201
  };
10109
10202
  const serializeAws_restXmlReplicationRule = (input, context) => {
10110
10203
  const bodyNode = new xml_builder_1.XmlNode("ReplicationRule");
10111
- if (input.ID !== undefined && input.ID !== null) {
10204
+ if (input.ID != null) {
10112
10205
  const node = new xml_builder_1.XmlNode("ID").addChildNode(new xml_builder_1.XmlText(input.ID)).withName("ID");
10113
10206
  bodyNode.addChildNode(node);
10114
10207
  }
10115
- if (input.Priority !== undefined && input.Priority !== null) {
10208
+ if (input.Priority != null) {
10116
10209
  const node = new xml_builder_1.XmlNode("Priority").addChildNode(new xml_builder_1.XmlText(String(input.Priority))).withName("Priority");
10117
10210
  bodyNode.addChildNode(node);
10118
10211
  }
10119
- if (input.Prefix !== undefined && input.Prefix !== null) {
10212
+ if (input.Prefix != null) {
10120
10213
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
10121
10214
  bodyNode.addChildNode(node);
10122
10215
  }
10123
- if (input.Filter !== undefined && input.Filter !== null) {
10216
+ if (input.Filter != null) {
10124
10217
  const node = serializeAws_restXmlReplicationRuleFilter(input.Filter, context).withName("Filter");
10125
10218
  bodyNode.addChildNode(node);
10126
10219
  }
10127
- if (input.Status !== undefined && input.Status !== null) {
10220
+ if (input.Status != null) {
10128
10221
  const node = new xml_builder_1.XmlNode("ReplicationRuleStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
10129
10222
  bodyNode.addChildNode(node);
10130
10223
  }
10131
- if (input.SourceSelectionCriteria !== undefined && input.SourceSelectionCriteria !== null) {
10224
+ if (input.SourceSelectionCriteria != null) {
10132
10225
  const node = serializeAws_restXmlSourceSelectionCriteria(input.SourceSelectionCriteria, context).withName("SourceSelectionCriteria");
10133
10226
  bodyNode.addChildNode(node);
10134
10227
  }
10135
- if (input.ExistingObjectReplication !== undefined && input.ExistingObjectReplication !== null) {
10228
+ if (input.ExistingObjectReplication != null) {
10136
10229
  const node = serializeAws_restXmlExistingObjectReplication(input.ExistingObjectReplication, context).withName("ExistingObjectReplication");
10137
10230
  bodyNode.addChildNode(node);
10138
10231
  }
10139
- if (input.Destination !== undefined && input.Destination !== null) {
10232
+ if (input.Destination != null) {
10140
10233
  const node = serializeAws_restXmlDestination(input.Destination, context).withName("Destination");
10141
10234
  bodyNode.addChildNode(node);
10142
10235
  }
10143
- if (input.DeleteMarkerReplication !== undefined && input.DeleteMarkerReplication !== null) {
10236
+ if (input.DeleteMarkerReplication != null) {
10144
10237
  const node = serializeAws_restXmlDeleteMarkerReplication(input.DeleteMarkerReplication, context).withName("DeleteMarkerReplication");
10145
10238
  bodyNode.addChildNode(node);
10146
10239
  }
@@ -10148,11 +10241,11 @@ const serializeAws_restXmlReplicationRule = (input, context) => {
10148
10241
  };
10149
10242
  const serializeAws_restXmlReplicationRuleAndOperator = (input, context) => {
10150
10243
  const bodyNode = new xml_builder_1.XmlNode("ReplicationRuleAndOperator");
10151
- if (input.Prefix !== undefined && input.Prefix !== null) {
10244
+ if (input.Prefix != null) {
10152
10245
  const node = new xml_builder_1.XmlNode("Prefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
10153
10246
  bodyNode.addChildNode(node);
10154
10247
  }
10155
- if (input.Tags !== undefined && input.Tags !== null) {
10248
+ if (input.Tags != null) {
10156
10249
  const nodes = serializeAws_restXmlTagSet(input.Tags, context);
10157
10250
  nodes.map((node) => {
10158
10251
  node = node.withName("Tag");
@@ -10198,11 +10291,11 @@ const serializeAws_restXmlReplicationRules = (input, context) => {
10198
10291
  };
10199
10292
  const serializeAws_restXmlReplicationTime = (input, context) => {
10200
10293
  const bodyNode = new xml_builder_1.XmlNode("ReplicationTime");
10201
- if (input.Status !== undefined && input.Status !== null) {
10294
+ if (input.Status != null) {
10202
10295
  const node = new xml_builder_1.XmlNode("ReplicationTimeStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
10203
10296
  bodyNode.addChildNode(node);
10204
10297
  }
10205
- if (input.Time !== undefined && input.Time !== null) {
10298
+ if (input.Time != null) {
10206
10299
  const node = serializeAws_restXmlReplicationTimeValue(input.Time, context).withName("Time");
10207
10300
  bodyNode.addChildNode(node);
10208
10301
  }
@@ -10210,7 +10303,7 @@ const serializeAws_restXmlReplicationTime = (input, context) => {
10210
10303
  };
10211
10304
  const serializeAws_restXmlReplicationTimeValue = (input, context) => {
10212
10305
  const bodyNode = new xml_builder_1.XmlNode("ReplicationTimeValue");
10213
- if (input.Minutes !== undefined && input.Minutes !== null) {
10306
+ if (input.Minutes != null) {
10214
10307
  const node = new xml_builder_1.XmlNode("Minutes").addChildNode(new xml_builder_1.XmlText(String(input.Minutes))).withName("Minutes");
10215
10308
  bodyNode.addChildNode(node);
10216
10309
  }
@@ -10218,7 +10311,7 @@ const serializeAws_restXmlReplicationTimeValue = (input, context) => {
10218
10311
  };
10219
10312
  const serializeAws_restXmlRequestPaymentConfiguration = (input, context) => {
10220
10313
  const bodyNode = new xml_builder_1.XmlNode("RequestPaymentConfiguration");
10221
- if (input.Payer !== undefined && input.Payer !== null) {
10314
+ if (input.Payer != null) {
10222
10315
  const node = new xml_builder_1.XmlNode("Payer").addChildNode(new xml_builder_1.XmlText(input.Payer)).withName("Payer");
10223
10316
  bodyNode.addChildNode(node);
10224
10317
  }
@@ -10226,7 +10319,7 @@ const serializeAws_restXmlRequestPaymentConfiguration = (input, context) => {
10226
10319
  };
10227
10320
  const serializeAws_restXmlRequestProgress = (input, context) => {
10228
10321
  const bodyNode = new xml_builder_1.XmlNode("RequestProgress");
10229
- if (input.Enabled !== undefined && input.Enabled !== null) {
10322
+ if (input.Enabled != null) {
10230
10323
  const node = new xml_builder_1.XmlNode("EnableRequestProgress")
10231
10324
  .addChildNode(new xml_builder_1.XmlText(String(input.Enabled)))
10232
10325
  .withName("Enabled");
@@ -10236,31 +10329,31 @@ const serializeAws_restXmlRequestProgress = (input, context) => {
10236
10329
  };
10237
10330
  const serializeAws_restXmlRestoreRequest = (input, context) => {
10238
10331
  const bodyNode = new xml_builder_1.XmlNode("RestoreRequest");
10239
- if (input.Days !== undefined && input.Days !== null) {
10332
+ if (input.Days != null) {
10240
10333
  const node = new xml_builder_1.XmlNode("Days").addChildNode(new xml_builder_1.XmlText(String(input.Days))).withName("Days");
10241
10334
  bodyNode.addChildNode(node);
10242
10335
  }
10243
- if (input.GlacierJobParameters !== undefined && input.GlacierJobParameters !== null) {
10336
+ if (input.GlacierJobParameters != null) {
10244
10337
  const node = serializeAws_restXmlGlacierJobParameters(input.GlacierJobParameters, context).withName("GlacierJobParameters");
10245
10338
  bodyNode.addChildNode(node);
10246
10339
  }
10247
- if (input.Type !== undefined && input.Type !== null) {
10340
+ if (input.Type != null) {
10248
10341
  const node = new xml_builder_1.XmlNode("RestoreRequestType").addChildNode(new xml_builder_1.XmlText(input.Type)).withName("Type");
10249
10342
  bodyNode.addChildNode(node);
10250
10343
  }
10251
- if (input.Tier !== undefined && input.Tier !== null) {
10344
+ if (input.Tier != null) {
10252
10345
  const node = new xml_builder_1.XmlNode("Tier").addChildNode(new xml_builder_1.XmlText(input.Tier)).withName("Tier");
10253
10346
  bodyNode.addChildNode(node);
10254
10347
  }
10255
- if (input.Description !== undefined && input.Description !== null) {
10348
+ if (input.Description != null) {
10256
10349
  const node = new xml_builder_1.XmlNode("Description").addChildNode(new xml_builder_1.XmlText(input.Description)).withName("Description");
10257
10350
  bodyNode.addChildNode(node);
10258
10351
  }
10259
- if (input.SelectParameters !== undefined && input.SelectParameters !== null) {
10352
+ if (input.SelectParameters != null) {
10260
10353
  const node = serializeAws_restXmlSelectParameters(input.SelectParameters, context).withName("SelectParameters");
10261
10354
  bodyNode.addChildNode(node);
10262
10355
  }
10263
- if (input.OutputLocation !== undefined && input.OutputLocation !== null) {
10356
+ if (input.OutputLocation != null) {
10264
10357
  const node = serializeAws_restXmlOutputLocation(input.OutputLocation, context).withName("OutputLocation");
10265
10358
  bodyNode.addChildNode(node);
10266
10359
  }
@@ -10268,11 +10361,11 @@ const serializeAws_restXmlRestoreRequest = (input, context) => {
10268
10361
  };
10269
10362
  const serializeAws_restXmlRoutingRule = (input, context) => {
10270
10363
  const bodyNode = new xml_builder_1.XmlNode("RoutingRule");
10271
- if (input.Condition !== undefined && input.Condition !== null) {
10364
+ if (input.Condition != null) {
10272
10365
  const node = serializeAws_restXmlCondition(input.Condition, context).withName("Condition");
10273
10366
  bodyNode.addChildNode(node);
10274
10367
  }
10275
- if (input.Redirect !== undefined && input.Redirect !== null) {
10368
+ if (input.Redirect != null) {
10276
10369
  const node = serializeAws_restXmlRedirect(input.Redirect, context).withName("Redirect");
10277
10370
  bodyNode.addChildNode(node);
10278
10371
  }
@@ -10291,7 +10384,7 @@ const serializeAws_restXmlRoutingRules = (input, context) => {
10291
10384
  };
10292
10385
  const serializeAws_restXmlS3KeyFilter = (input, context) => {
10293
10386
  const bodyNode = new xml_builder_1.XmlNode("S3KeyFilter");
10294
- if (input.FilterRules !== undefined && input.FilterRules !== null) {
10387
+ if (input.FilterRules != null) {
10295
10388
  const nodes = serializeAws_restXmlFilterRuleList(input.FilterRules, context);
10296
10389
  nodes.map((node) => {
10297
10390
  node = node.withName("FilterRule");
@@ -10302,23 +10395,23 @@ const serializeAws_restXmlS3KeyFilter = (input, context) => {
10302
10395
  };
10303
10396
  const serializeAws_restXmlS3Location = (input, context) => {
10304
10397
  const bodyNode = new xml_builder_1.XmlNode("S3Location");
10305
- if (input.BucketName !== undefined && input.BucketName !== null) {
10398
+ if (input.BucketName != null) {
10306
10399
  const node = new xml_builder_1.XmlNode("BucketName").addChildNode(new xml_builder_1.XmlText(input.BucketName)).withName("BucketName");
10307
10400
  bodyNode.addChildNode(node);
10308
10401
  }
10309
- if (input.Prefix !== undefined && input.Prefix !== null) {
10402
+ if (input.Prefix != null) {
10310
10403
  const node = new xml_builder_1.XmlNode("LocationPrefix").addChildNode(new xml_builder_1.XmlText(input.Prefix)).withName("Prefix");
10311
10404
  bodyNode.addChildNode(node);
10312
10405
  }
10313
- if (input.Encryption !== undefined && input.Encryption !== null) {
10406
+ if (input.Encryption != null) {
10314
10407
  const node = serializeAws_restXmlEncryption(input.Encryption, context).withName("Encryption");
10315
10408
  bodyNode.addChildNode(node);
10316
10409
  }
10317
- if (input.CannedACL !== undefined && input.CannedACL !== null) {
10410
+ if (input.CannedACL != null) {
10318
10411
  const node = new xml_builder_1.XmlNode("ObjectCannedACL").addChildNode(new xml_builder_1.XmlText(input.CannedACL)).withName("CannedACL");
10319
10412
  bodyNode.addChildNode(node);
10320
10413
  }
10321
- if (input.AccessControlList !== undefined && input.AccessControlList !== null) {
10414
+ if (input.AccessControlList != null) {
10322
10415
  const nodes = serializeAws_restXmlGrants(input.AccessControlList, context);
10323
10416
  const containerNode = new xml_builder_1.XmlNode("AccessControlList");
10324
10417
  nodes.map((node) => {
@@ -10326,11 +10419,11 @@ const serializeAws_restXmlS3Location = (input, context) => {
10326
10419
  });
10327
10420
  bodyNode.addChildNode(containerNode);
10328
10421
  }
10329
- if (input.Tagging !== undefined && input.Tagging !== null) {
10422
+ if (input.Tagging != null) {
10330
10423
  const node = serializeAws_restXmlTagging(input.Tagging, context).withName("Tagging");
10331
10424
  bodyNode.addChildNode(node);
10332
10425
  }
10333
- if (input.UserMetadata !== undefined && input.UserMetadata !== null) {
10426
+ if (input.UserMetadata != null) {
10334
10427
  const nodes = serializeAws_restXmlUserMetadata(input.UserMetadata, context);
10335
10428
  const containerNode = new xml_builder_1.XmlNode("UserMetadata");
10336
10429
  nodes.map((node) => {
@@ -10338,7 +10431,7 @@ const serializeAws_restXmlS3Location = (input, context) => {
10338
10431
  });
10339
10432
  bodyNode.addChildNode(containerNode);
10340
10433
  }
10341
- if (input.StorageClass !== undefined && input.StorageClass !== null) {
10434
+ if (input.StorageClass != null) {
10342
10435
  const node = new xml_builder_1.XmlNode("StorageClass").addChildNode(new xml_builder_1.XmlText(input.StorageClass)).withName("StorageClass");
10343
10436
  bodyNode.addChildNode(node);
10344
10437
  }
@@ -10346,11 +10439,11 @@ const serializeAws_restXmlS3Location = (input, context) => {
10346
10439
  };
10347
10440
  const serializeAws_restXmlScanRange = (input, context) => {
10348
10441
  const bodyNode = new xml_builder_1.XmlNode("ScanRange");
10349
- if (input.Start !== undefined && input.Start !== null) {
10442
+ if (input.Start != null) {
10350
10443
  const node = new xml_builder_1.XmlNode("Start").addChildNode(new xml_builder_1.XmlText(String(input.Start))).withName("Start");
10351
10444
  bodyNode.addChildNode(node);
10352
10445
  }
10353
- if (input.End !== undefined && input.End !== null) {
10446
+ if (input.End != null) {
10354
10447
  const node = new xml_builder_1.XmlNode("End").addChildNode(new xml_builder_1.XmlText(String(input.End))).withName("End");
10355
10448
  bodyNode.addChildNode(node);
10356
10449
  }
@@ -10358,21 +10451,21 @@ const serializeAws_restXmlScanRange = (input, context) => {
10358
10451
  };
10359
10452
  const serializeAws_restXmlSelectParameters = (input, context) => {
10360
10453
  const bodyNode = new xml_builder_1.XmlNode("SelectParameters");
10361
- if (input.InputSerialization !== undefined && input.InputSerialization !== null) {
10454
+ if (input.InputSerialization != null) {
10362
10455
  const node = serializeAws_restXmlInputSerialization(input.InputSerialization, context).withName("InputSerialization");
10363
10456
  bodyNode.addChildNode(node);
10364
10457
  }
10365
- if (input.ExpressionType !== undefined && input.ExpressionType !== null) {
10458
+ if (input.ExpressionType != null) {
10366
10459
  const node = new xml_builder_1.XmlNode("ExpressionType")
10367
10460
  .addChildNode(new xml_builder_1.XmlText(input.ExpressionType))
10368
10461
  .withName("ExpressionType");
10369
10462
  bodyNode.addChildNode(node);
10370
10463
  }
10371
- if (input.Expression !== undefined && input.Expression !== null) {
10464
+ if (input.Expression != null) {
10372
10465
  const node = new xml_builder_1.XmlNode("Expression").addChildNode(new xml_builder_1.XmlText(input.Expression)).withName("Expression");
10373
10466
  bodyNode.addChildNode(node);
10374
10467
  }
10375
- if (input.OutputSerialization !== undefined && input.OutputSerialization !== null) {
10468
+ if (input.OutputSerialization != null) {
10376
10469
  const node = serializeAws_restXmlOutputSerialization(input.OutputSerialization, context).withName("OutputSerialization");
10377
10470
  bodyNode.addChildNode(node);
10378
10471
  }
@@ -10380,13 +10473,13 @@ const serializeAws_restXmlSelectParameters = (input, context) => {
10380
10473
  };
10381
10474
  const serializeAws_restXmlServerSideEncryptionByDefault = (input, context) => {
10382
10475
  const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionByDefault");
10383
- if (input.SSEAlgorithm !== undefined && input.SSEAlgorithm !== null) {
10476
+ if (input.SSEAlgorithm != null) {
10384
10477
  const node = new xml_builder_1.XmlNode("ServerSideEncryption")
10385
10478
  .addChildNode(new xml_builder_1.XmlText(input.SSEAlgorithm))
10386
10479
  .withName("SSEAlgorithm");
10387
10480
  bodyNode.addChildNode(node);
10388
10481
  }
10389
- if (input.KMSMasterKeyID !== undefined && input.KMSMasterKeyID !== null) {
10482
+ if (input.KMSMasterKeyID != null) {
10390
10483
  const node = new xml_builder_1.XmlNode("SSEKMSKeyId")
10391
10484
  .addChildNode(new xml_builder_1.XmlText(input.KMSMasterKeyID))
10392
10485
  .withName("KMSMasterKeyID");
@@ -10396,7 +10489,7 @@ const serializeAws_restXmlServerSideEncryptionByDefault = (input, context) => {
10396
10489
  };
10397
10490
  const serializeAws_restXmlServerSideEncryptionConfiguration = (input, context) => {
10398
10491
  const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionConfiguration");
10399
- if (input.Rules !== undefined && input.Rules !== null) {
10492
+ if (input.Rules != null) {
10400
10493
  const nodes = serializeAws_restXmlServerSideEncryptionRules(input.Rules, context);
10401
10494
  nodes.map((node) => {
10402
10495
  node = node.withName("Rule");
@@ -10407,11 +10500,11 @@ const serializeAws_restXmlServerSideEncryptionConfiguration = (input, context) =
10407
10500
  };
10408
10501
  const serializeAws_restXmlServerSideEncryptionRule = (input, context) => {
10409
10502
  const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionRule");
10410
- if (input.ApplyServerSideEncryptionByDefault !== undefined && input.ApplyServerSideEncryptionByDefault !== null) {
10503
+ if (input.ApplyServerSideEncryptionByDefault != null) {
10411
10504
  const node = serializeAws_restXmlServerSideEncryptionByDefault(input.ApplyServerSideEncryptionByDefault, context).withName("ApplyServerSideEncryptionByDefault");
10412
10505
  bodyNode.addChildNode(node);
10413
10506
  }
10414
- if (input.BucketKeyEnabled !== undefined && input.BucketKeyEnabled !== null) {
10507
+ if (input.BucketKeyEnabled != null) {
10415
10508
  const node = new xml_builder_1.XmlNode("BucketKeyEnabled")
10416
10509
  .addChildNode(new xml_builder_1.XmlText(String(input.BucketKeyEnabled)))
10417
10510
  .withName("BucketKeyEnabled");
@@ -10432,11 +10525,11 @@ const serializeAws_restXmlServerSideEncryptionRules = (input, context) => {
10432
10525
  };
10433
10526
  const serializeAws_restXmlSourceSelectionCriteria = (input, context) => {
10434
10527
  const bodyNode = new xml_builder_1.XmlNode("SourceSelectionCriteria");
10435
- if (input.SseKmsEncryptedObjects !== undefined && input.SseKmsEncryptedObjects !== null) {
10528
+ if (input.SseKmsEncryptedObjects != null) {
10436
10529
  const node = serializeAws_restXmlSseKmsEncryptedObjects(input.SseKmsEncryptedObjects, context).withName("SseKmsEncryptedObjects");
10437
10530
  bodyNode.addChildNode(node);
10438
10531
  }
10439
- if (input.ReplicaModifications !== undefined && input.ReplicaModifications !== null) {
10532
+ if (input.ReplicaModifications != null) {
10440
10533
  const node = serializeAws_restXmlReplicaModifications(input.ReplicaModifications, context).withName("ReplicaModifications");
10441
10534
  bodyNode.addChildNode(node);
10442
10535
  }
@@ -10444,7 +10537,7 @@ const serializeAws_restXmlSourceSelectionCriteria = (input, context) => {
10444
10537
  };
10445
10538
  const serializeAws_restXmlSSEKMS = (input, context) => {
10446
10539
  const bodyNode = new xml_builder_1.XmlNode("SSE-KMS");
10447
- if (input.KeyId !== undefined && input.KeyId !== null) {
10540
+ if (input.KeyId != null) {
10448
10541
  const node = new xml_builder_1.XmlNode("SSEKMSKeyId").addChildNode(new xml_builder_1.XmlText(input.KeyId)).withName("KeyId");
10449
10542
  bodyNode.addChildNode(node);
10450
10543
  }
@@ -10452,7 +10545,7 @@ const serializeAws_restXmlSSEKMS = (input, context) => {
10452
10545
  };
10453
10546
  const serializeAws_restXmlSseKmsEncryptedObjects = (input, context) => {
10454
10547
  const bodyNode = new xml_builder_1.XmlNode("SseKmsEncryptedObjects");
10455
- if (input.Status !== undefined && input.Status !== null) {
10548
+ if (input.Status != null) {
10456
10549
  const node = new xml_builder_1.XmlNode("SseKmsEncryptedObjectsStatus")
10457
10550
  .addChildNode(new xml_builder_1.XmlText(input.Status))
10458
10551
  .withName("Status");
@@ -10466,7 +10559,7 @@ const serializeAws_restXmlSSES3 = (input, context) => {
10466
10559
  };
10467
10560
  const serializeAws_restXmlStorageClassAnalysis = (input, context) => {
10468
10561
  const bodyNode = new xml_builder_1.XmlNode("StorageClassAnalysis");
10469
- if (input.DataExport !== undefined && input.DataExport !== null) {
10562
+ if (input.DataExport != null) {
10470
10563
  const node = serializeAws_restXmlStorageClassAnalysisDataExport(input.DataExport, context).withName("DataExport");
10471
10564
  bodyNode.addChildNode(node);
10472
10565
  }
@@ -10474,13 +10567,13 @@ const serializeAws_restXmlStorageClassAnalysis = (input, context) => {
10474
10567
  };
10475
10568
  const serializeAws_restXmlStorageClassAnalysisDataExport = (input, context) => {
10476
10569
  const bodyNode = new xml_builder_1.XmlNode("StorageClassAnalysisDataExport");
10477
- if (input.OutputSchemaVersion !== undefined && input.OutputSchemaVersion !== null) {
10570
+ if (input.OutputSchemaVersion != null) {
10478
10571
  const node = new xml_builder_1.XmlNode("StorageClassAnalysisSchemaVersion")
10479
10572
  .addChildNode(new xml_builder_1.XmlText(input.OutputSchemaVersion))
10480
10573
  .withName("OutputSchemaVersion");
10481
10574
  bodyNode.addChildNode(node);
10482
10575
  }
10483
- if (input.Destination !== undefined && input.Destination !== null) {
10576
+ if (input.Destination != null) {
10484
10577
  const node = serializeAws_restXmlAnalyticsExportDestination(input.Destination, context).withName("Destination");
10485
10578
  bodyNode.addChildNode(node);
10486
10579
  }
@@ -10488,11 +10581,11 @@ const serializeAws_restXmlStorageClassAnalysisDataExport = (input, context) => {
10488
10581
  };
10489
10582
  const serializeAws_restXmlTag = (input, context) => {
10490
10583
  const bodyNode = new xml_builder_1.XmlNode("Tag");
10491
- if (input.Key !== undefined && input.Key !== null) {
10584
+ if (input.Key != null) {
10492
10585
  const node = new xml_builder_1.XmlNode("ObjectKey").addChildNode(new xml_builder_1.XmlText(input.Key)).withName("Key");
10493
10586
  bodyNode.addChildNode(node);
10494
10587
  }
10495
- if (input.Value !== undefined && input.Value !== null) {
10588
+ if (input.Value != null) {
10496
10589
  const node = new xml_builder_1.XmlNode("Value").addChildNode(new xml_builder_1.XmlText(input.Value)).withName("Value");
10497
10590
  bodyNode.addChildNode(node);
10498
10591
  }
@@ -10500,7 +10593,7 @@ const serializeAws_restXmlTag = (input, context) => {
10500
10593
  };
10501
10594
  const serializeAws_restXmlTagging = (input, context) => {
10502
10595
  const bodyNode = new xml_builder_1.XmlNode("Tagging");
10503
- if (input.TagSet !== undefined && input.TagSet !== null) {
10596
+ if (input.TagSet != null) {
10504
10597
  const nodes = serializeAws_restXmlTagSet(input.TagSet, context);
10505
10598
  const containerNode = new xml_builder_1.XmlNode("TagSet");
10506
10599
  nodes.map((node) => {
@@ -10523,12 +10616,12 @@ const serializeAws_restXmlTagSet = (input, context) => {
10523
10616
  };
10524
10617
  const serializeAws_restXmlTargetGrant = (input, context) => {
10525
10618
  const bodyNode = new xml_builder_1.XmlNode("TargetGrant");
10526
- if (input.Grantee !== undefined && input.Grantee !== null) {
10619
+ if (input.Grantee != null) {
10527
10620
  const node = serializeAws_restXmlGrantee(input.Grantee, context).withName("Grantee");
10528
10621
  node.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
10529
10622
  bodyNode.addChildNode(node);
10530
10623
  }
10531
- if (input.Permission !== undefined && input.Permission !== null) {
10624
+ if (input.Permission != null) {
10532
10625
  const node = new xml_builder_1.XmlNode("BucketLogsPermission")
10533
10626
  .addChildNode(new xml_builder_1.XmlText(input.Permission))
10534
10627
  .withName("Permission");
@@ -10549,13 +10642,13 @@ const serializeAws_restXmlTargetGrants = (input, context) => {
10549
10642
  };
10550
10643
  const serializeAws_restXmlTiering = (input, context) => {
10551
10644
  const bodyNode = new xml_builder_1.XmlNode("Tiering");
10552
- if (input.Days !== undefined && input.Days !== null) {
10645
+ if (input.Days != null) {
10553
10646
  const node = new xml_builder_1.XmlNode("IntelligentTieringDays")
10554
10647
  .addChildNode(new xml_builder_1.XmlText(String(input.Days)))
10555
10648
  .withName("Days");
10556
10649
  bodyNode.addChildNode(node);
10557
10650
  }
10558
- if (input.AccessTier !== undefined && input.AccessTier !== null) {
10651
+ if (input.AccessTier != null) {
10559
10652
  const node = new xml_builder_1.XmlNode("IntelligentTieringAccessTier")
10560
10653
  .addChildNode(new xml_builder_1.XmlText(input.AccessTier))
10561
10654
  .withName("AccessTier");
@@ -10576,22 +10669,22 @@ const serializeAws_restXmlTieringList = (input, context) => {
10576
10669
  };
10577
10670
  const serializeAws_restXmlTopicConfiguration = (input, context) => {
10578
10671
  const bodyNode = new xml_builder_1.XmlNode("TopicConfiguration");
10579
- if (input.Id !== undefined && input.Id !== null) {
10672
+ if (input.Id != null) {
10580
10673
  const node = new xml_builder_1.XmlNode("NotificationId").addChildNode(new xml_builder_1.XmlText(input.Id)).withName("Id");
10581
10674
  bodyNode.addChildNode(node);
10582
10675
  }
10583
- if (input.TopicArn !== undefined && input.TopicArn !== null) {
10676
+ if (input.TopicArn != null) {
10584
10677
  const node = new xml_builder_1.XmlNode("TopicArn").addChildNode(new xml_builder_1.XmlText(input.TopicArn)).withName("Topic");
10585
10678
  bodyNode.addChildNode(node);
10586
10679
  }
10587
- if (input.Events !== undefined && input.Events !== null) {
10680
+ if (input.Events != null) {
10588
10681
  const nodes = serializeAws_restXmlEventList(input.Events, context);
10589
10682
  nodes.map((node) => {
10590
10683
  node = node.withName("Event");
10591
10684
  bodyNode.addChildNode(node);
10592
10685
  });
10593
10686
  }
10594
- if (input.Filter !== undefined && input.Filter !== null) {
10687
+ if (input.Filter != null) {
10595
10688
  const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter");
10596
10689
  bodyNode.addChildNode(node);
10597
10690
  }
@@ -10610,17 +10703,17 @@ const serializeAws_restXmlTopicConfigurationList = (input, context) => {
10610
10703
  };
10611
10704
  const serializeAws_restXmlTransition = (input, context) => {
10612
10705
  const bodyNode = new xml_builder_1.XmlNode("Transition");
10613
- if (input.Date !== undefined && input.Date !== null) {
10706
+ if (input.Date != null) {
10614
10707
  const node = new xml_builder_1.XmlNode("Date")
10615
10708
  .addChildNode(new xml_builder_1.XmlText(input.Date.toISOString().split(".")[0] + "Z"))
10616
10709
  .withName("Date");
10617
10710
  bodyNode.addChildNode(node);
10618
10711
  }
10619
- if (input.Days !== undefined && input.Days !== null) {
10712
+ if (input.Days != null) {
10620
10713
  const node = new xml_builder_1.XmlNode("Days").addChildNode(new xml_builder_1.XmlText(String(input.Days))).withName("Days");
10621
10714
  bodyNode.addChildNode(node);
10622
10715
  }
10623
- if (input.StorageClass !== undefined && input.StorageClass !== null) {
10716
+ if (input.StorageClass != null) {
10624
10717
  const node = new xml_builder_1.XmlNode("TransitionStorageClass")
10625
10718
  .addChildNode(new xml_builder_1.XmlText(input.StorageClass))
10626
10719
  .withName("StorageClass");
@@ -10652,11 +10745,11 @@ const serializeAws_restXmlUserMetadata = (input, context) => {
10652
10745
  };
10653
10746
  const serializeAws_restXmlVersioningConfiguration = (input, context) => {
10654
10747
  const bodyNode = new xml_builder_1.XmlNode("VersioningConfiguration");
10655
- if (input.MFADelete !== undefined && input.MFADelete !== null) {
10748
+ if (input.MFADelete != null) {
10656
10749
  const node = new xml_builder_1.XmlNode("MFADelete").addChildNode(new xml_builder_1.XmlText(input.MFADelete)).withName("MfaDelete");
10657
10750
  bodyNode.addChildNode(node);
10658
10751
  }
10659
- if (input.Status !== undefined && input.Status !== null) {
10752
+ if (input.Status != null) {
10660
10753
  const node = new xml_builder_1.XmlNode("BucketVersioningStatus").addChildNode(new xml_builder_1.XmlText(input.Status)).withName("Status");
10661
10754
  bodyNode.addChildNode(node);
10662
10755
  }
@@ -10664,19 +10757,19 @@ const serializeAws_restXmlVersioningConfiguration = (input, context) => {
10664
10757
  };
10665
10758
  const serializeAws_restXmlWebsiteConfiguration = (input, context) => {
10666
10759
  const bodyNode = new xml_builder_1.XmlNode("WebsiteConfiguration");
10667
- if (input.ErrorDocument !== undefined && input.ErrorDocument !== null) {
10760
+ if (input.ErrorDocument != null) {
10668
10761
  const node = serializeAws_restXmlErrorDocument(input.ErrorDocument, context).withName("ErrorDocument");
10669
10762
  bodyNode.addChildNode(node);
10670
10763
  }
10671
- if (input.IndexDocument !== undefined && input.IndexDocument !== null) {
10764
+ if (input.IndexDocument != null) {
10672
10765
  const node = serializeAws_restXmlIndexDocument(input.IndexDocument, context).withName("IndexDocument");
10673
10766
  bodyNode.addChildNode(node);
10674
10767
  }
10675
- if (input.RedirectAllRequestsTo !== undefined && input.RedirectAllRequestsTo !== null) {
10768
+ if (input.RedirectAllRequestsTo != null) {
10676
10769
  const node = serializeAws_restXmlRedirectAllRequestsTo(input.RedirectAllRequestsTo, context).withName("RedirectAllRequestsTo");
10677
10770
  bodyNode.addChildNode(node);
10678
10771
  }
10679
- if (input.RoutingRules !== undefined && input.RoutingRules !== null) {
10772
+ if (input.RoutingRules != null) {
10680
10773
  const nodes = serializeAws_restXmlRoutingRules(input.RoutingRules, context);
10681
10774
  const containerNode = new xml_builder_1.XmlNode("RoutingRules");
10682
10775
  nodes.map((node) => {
@@ -12822,5 +12915,4 @@ const loadRestXmlErrorCode = (output, data) => {
12822
12915
  if (output.statusCode == 404) {
12823
12916
  return "NotFound";
12824
12917
  }
12825
- return "";
12826
12918
  };