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EAbzDnN,QAAQ,SAAU,KAClBA,QAAQ,UAAW,KACnBA,QAAQ,UAAW,KACnBA,QAAQ,QAAS,KACjBA,QAAQ,QAAS,QAYVqN,EAAMnK,OAAOC,KAAK2J,GAAW,GAC7BQ,EAAoBR,EAAUO,GAKpC,OAJIC,EAAkBC,WACpBD,EAAkBD,GAAOC,EAAkBC,gBACpCD,EAAkBC,WAEpB,QAAuBD,GAEhC,MAAO,OAGL3G,EAAuB,SAACZ,EAAwB6B,GACpD,YAAkBjI,IAAdiI,EAAKX,KACAW,EAAKX,KAEW,KAArBlB,EAAOC,WACF,WAEF","sources":["webpack://leadsbridge/./node_modules/@aws-sdk/client-s3/protocols/Aws_restXml.ts"],"sourcesContent":["import {\n AbortMultipartUploadCommandInput,\n AbortMultipartUploadCommandOutput,\n} from \"../commands/AbortMultipartUploadCommand\";\nimport {\n CompleteMultipartUploadCommandInput,\n CompleteMultipartUploadCommandOutput,\n} from \"../commands/CompleteMultipartUploadCommand\";\nimport { CopyObjectCommandInput, CopyObjectCommandOutput } from \"../commands/CopyObjectCommand\";\nimport { CreateBucketCommandInput, CreateBucketCommandOutput } from \"../commands/CreateBucketCommand\";\nimport {\n CreateMultipartUploadCommandInput,\n CreateMultipartUploadCommandOutput,\n} from \"../commands/CreateMultipartUploadCommand\";\nimport {\n DeleteBucketAnalyticsConfigurationCommandInput,\n DeleteBucketAnalyticsConfigurationCommandOutput,\n} from \"../commands/DeleteBucketAnalyticsConfigurationCommand\";\nimport { DeleteBucketCommandInput, DeleteBucketCommandOutput } from \"../commands/DeleteBucketCommand\";\nimport { DeleteBucketCorsCommandInput, DeleteBucketCorsCommandOutput } from \"../commands/DeleteBucketCorsCommand\";\nimport {\n DeleteBucketEncryptionCommandInput,\n DeleteBucketEncryptionCommandOutput,\n} from \"../commands/DeleteBucketEncryptionCommand\";\nimport {\n DeleteBucketIntelligentTieringConfigurationCommandInput,\n DeleteBucketIntelligentTieringConfigurationCommandOutput,\n} from \"../commands/DeleteBucketIntelligentTieringConfigurationCommand\";\nimport {\n DeleteBucketInventoryConfigurationCommandInput,\n DeleteBucketInventoryConfigurationCommandOutput,\n} from \"../commands/DeleteBucketInventoryConfigurationCommand\";\nimport {\n DeleteBucketLifecycleCommandInput,\n DeleteBucketLifecycleCommandOutput,\n} from \"../commands/DeleteBucketLifecycleCommand\";\nimport {\n DeleteBucketMetricsConfigurationCommandInput,\n DeleteBucketMetricsConfigurationCommandOutput,\n} from \"../commands/DeleteBucketMetricsConfigurationCommand\";\nimport {\n DeleteBucketOwnershipControlsCommandInput,\n DeleteBucketOwnershipControlsCommandOutput,\n} from \"../commands/DeleteBucketOwnershipControlsCommand\";\nimport { DeleteBucketPolicyCommandInput, DeleteBucketPolicyCommandOutput } from \"../commands/DeleteBucketPolicyCommand\";\nimport {\n DeleteBucketReplicationCommandInput,\n DeleteBucketReplicationCommandOutput,\n} from \"../commands/DeleteBucketReplicationCommand\";\nimport {\n DeleteBucketTaggingCommandInput,\n DeleteBucketTaggingCommandOutput,\n} from \"../commands/DeleteBucketTaggingCommand\";\nimport {\n DeleteBucketWebsiteCommandInput,\n DeleteBucketWebsiteCommandOutput,\n} from \"../commands/DeleteBucketWebsiteCommand\";\nimport { DeleteObjectCommandInput, DeleteObjectCommandOutput } from \"../commands/DeleteObjectCommand\";\nimport {\n DeleteObjectTaggingCommandInput,\n DeleteObjectTaggingCommandOutput,\n} from \"../commands/DeleteObjectTaggingCommand\";\nimport { DeleteObjectsCommandInput, DeleteObjectsCommandOutput } from \"../commands/DeleteObjectsCommand\";\nimport {\n DeletePublicAccessBlockCommandInput,\n DeletePublicAccessBlockCommandOutput,\n} from \"../commands/DeletePublicAccessBlockCommand\";\nimport {\n GetBucketAccelerateConfigurationCommandInput,\n GetBucketAccelerateConfigurationCommandOutput,\n} from \"../commands/GetBucketAccelerateConfigurationCommand\";\nimport { GetBucketAclCommandInput, GetBucketAclCommandOutput } from \"../commands/GetBucketAclCommand\";\nimport {\n GetBucketAnalyticsConfigurationCommandInput,\n GetBucketAnalyticsConfigurationCommandOutput,\n} from \"../commands/GetBucketAnalyticsConfigurationCommand\";\nimport { GetBucketCorsCommandInput, GetBucketCorsCommandOutput } from \"../commands/GetBucketCorsCommand\";\nimport {\n GetBucketEncryptionCommandInput,\n GetBucketEncryptionCommandOutput,\n} from \"../commands/GetBucketEncryptionCommand\";\nimport {\n GetBucketIntelligentTieringConfigurationCommandInput,\n GetBucketIntelligentTieringConfigurationCommandOutput,\n} from \"../commands/GetBucketIntelligentTieringConfigurationCommand\";\nimport {\n GetBucketInventoryConfigurationCommandInput,\n GetBucketInventoryConfigurationCommandOutput,\n} from \"../commands/GetBucketInventoryConfigurationCommand\";\nimport {\n GetBucketLifecycleConfigurationCommandInput,\n GetBucketLifecycleConfigurationCommandOutput,\n} from \"../commands/GetBucketLifecycleConfigurationCommand\";\nimport { GetBucketLocationCommandInput, GetBucketLocationCommandOutput } from \"../commands/GetBucketLocationCommand\";\nimport { GetBucketLoggingCommandInput, GetBucketLoggingCommandOutput } from \"../commands/GetBucketLoggingCommand\";\nimport {\n GetBucketMetricsConfigurationCommandInput,\n GetBucketMetricsConfigurationCommandOutput,\n} from \"../commands/GetBucketMetricsConfigurationCommand\";\nimport {\n GetBucketNotificationConfigurationCommandInput,\n GetBucketNotificationConfigurationCommandOutput,\n} from \"../commands/GetBucketNotificationConfigurationCommand\";\nimport {\n GetBucketOwnershipControlsCommandInput,\n GetBucketOwnershipControlsCommandOutput,\n} from \"../commands/GetBucketOwnershipControlsCommand\";\nimport { GetBucketPolicyCommandInput, GetBucketPolicyCommandOutput } from \"../commands/GetBucketPolicyCommand\";\nimport {\n GetBucketPolicyStatusCommandInput,\n GetBucketPolicyStatusCommandOutput,\n} from \"../commands/GetBucketPolicyStatusCommand\";\nimport {\n GetBucketReplicationCommandInput,\n GetBucketReplicationCommandOutput,\n} from \"../commands/GetBucketReplicationCommand\";\nimport {\n GetBucketRequestPaymentCommandInput,\n GetBucketRequestPaymentCommandOutput,\n} from \"../commands/GetBucketRequestPaymentCommand\";\nimport { GetBucketTaggingCommandInput, GetBucketTaggingCommandOutput } from \"../commands/GetBucketTaggingCommand\";\nimport {\n GetBucketVersioningCommandInput,\n GetBucketVersioningCommandOutput,\n} from \"../commands/GetBucketVersioningCommand\";\nimport { GetBucketWebsiteCommandInput, GetBucketWebsiteCommandOutput } from \"../commands/GetBucketWebsiteCommand\";\nimport { GetObjectAclCommandInput, GetObjectAclCommandOutput } from \"../commands/GetObjectAclCommand\";\nimport { GetObjectCommandInput, GetObjectCommandOutput } from \"../commands/GetObjectCommand\";\nimport { GetObjectLegalHoldCommandInput, GetObjectLegalHoldCommandOutput } from \"../commands/GetObjectLegalHoldCommand\";\nimport {\n GetObjectLockConfigurationCommandInput,\n GetObjectLockConfigurationCommandOutput,\n} from \"../commands/GetObjectLockConfigurationCommand\";\nimport { GetObjectRetentionCommandInput, GetObjectRetentionCommandOutput } from \"../commands/GetObjectRetentionCommand\";\nimport { GetObjectTaggingCommandInput, GetObjectTaggingCommandOutput } from \"../commands/GetObjectTaggingCommand\";\nimport { GetObjectTorrentCommandInput, GetObjectTorrentCommandOutput } from \"../commands/GetObjectTorrentCommand\";\nimport {\n GetPublicAccessBlockCommandInput,\n GetPublicAccessBlockCommandOutput,\n} from \"../commands/GetPublicAccessBlockCommand\";\nimport { HeadBucketCommandInput, HeadBucketCommandOutput } from \"../commands/HeadBucketCommand\";\nimport { HeadObjectCommandInput, HeadObjectCommandOutput } from \"../commands/HeadObjectCommand\";\nimport {\n ListBucketAnalyticsConfigurationsCommandInput,\n ListBucketAnalyticsConfigurationsCommandOutput,\n} from \"../commands/ListBucketAnalyticsConfigurationsCommand\";\nimport {\n ListBucketIntelligentTieringConfigurationsCommandInput,\n ListBucketIntelligentTieringConfigurationsCommandOutput,\n} from \"../commands/ListBucketIntelligentTieringConfigurationsCommand\";\nimport {\n ListBucketInventoryConfigurationsCommandInput,\n ListBucketInventoryConfigurationsCommandOutput,\n} from \"../commands/ListBucketInventoryConfigurationsCommand\";\nimport {\n ListBucketMetricsConfigurationsCommandInput,\n ListBucketMetricsConfigurationsCommandOutput,\n} from \"../commands/ListBucketMetricsConfigurationsCommand\";\nimport { ListBucketsCommandInput, ListBucketsCommandOutput } from \"../commands/ListBucketsCommand\";\nimport {\n ListMultipartUploadsCommandInput,\n ListMultipartUploadsCommandOutput,\n} from \"../commands/ListMultipartUploadsCommand\";\nimport { ListObjectVersionsCommandInput, ListObjectVersionsCommandOutput } from \"../commands/ListObjectVersionsCommand\";\nimport { ListObjectsCommandInput, ListObjectsCommandOutput } from \"../commands/ListObjectsCommand\";\nimport { ListObjectsV2CommandInput, ListObjectsV2CommandOutput } from \"../commands/ListObjectsV2Command\";\nimport { ListPartsCommandInput, ListPartsCommandOutput } from \"../commands/ListPartsCommand\";\nimport {\n PutBucketAccelerateConfigurationCommandInput,\n PutBucketAccelerateConfigurationCommandOutput,\n} from \"../commands/PutBucketAccelerateConfigurationCommand\";\nimport { PutBucketAclCommandInput, PutBucketAclCommandOutput } from \"../commands/PutBucketAclCommand\";\nimport {\n PutBucketAnalyticsConfigurationCommandInput,\n PutBucketAnalyticsConfigurationCommandOutput,\n} from \"../commands/PutBucketAnalyticsConfigurationCommand\";\nimport { PutBucketCorsCommandInput, PutBucketCorsCommandOutput } from \"../commands/PutBucketCorsCommand\";\nimport {\n PutBucketEncryptionCommandInput,\n PutBucketEncryptionCommandOutput,\n} from \"../commands/PutBucketEncryptionCommand\";\nimport {\n PutBucketIntelligentTieringConfigurationCommandInput,\n PutBucketIntelligentTieringConfigurationCommandOutput,\n} from \"../commands/PutBucketIntelligentTieringConfigurationCommand\";\nimport {\n PutBucketInventoryConfigurationCommandInput,\n PutBucketInventoryConfigurationCommandOutput,\n} from \"../commands/PutBucketInventoryConfigurationCommand\";\nimport {\n PutBucketLifecycleConfigurationCommandInput,\n PutBucketLifecycleConfigurationCommandOutput,\n} from \"../commands/PutBucketLifecycleConfigurationCommand\";\nimport { PutBucketLoggingCommandInput, PutBucketLoggingCommandOutput } from \"../commands/PutBucketLoggingCommand\";\nimport {\n PutBucketMetricsConfigurationCommandInput,\n PutBucketMetricsConfigurationCommandOutput,\n} from \"../commands/PutBucketMetricsConfigurationCommand\";\nimport {\n PutBucketNotificationConfigurationCommandInput,\n PutBucketNotificationConfigurationCommandOutput,\n} from \"../commands/PutBucketNotificationConfigurationCommand\";\nimport {\n PutBucketOwnershipControlsCommandInput,\n PutBucketOwnershipControlsCommandOutput,\n} from \"../commands/PutBucketOwnershipControlsCommand\";\nimport { PutBucketPolicyCommandInput, PutBucketPolicyCommandOutput } from \"../commands/PutBucketPolicyCommand\";\nimport {\n PutBucketReplicationCommandInput,\n PutBucketReplicationCommandOutput,\n} from \"../commands/PutBucketReplicationCommand\";\nimport {\n PutBucketRequestPaymentCommandInput,\n PutBucketRequestPaymentCommandOutput,\n} from \"../commands/PutBucketRequestPaymentCommand\";\nimport { PutBucketTaggingCommandInput, PutBucketTaggingCommandOutput } from \"../commands/PutBucketTaggingCommand\";\nimport {\n PutBucketVersioningCommandInput,\n PutBucketVersioningCommandOutput,\n} from \"../commands/PutBucketVersioningCommand\";\nimport { PutBucketWebsiteCommandInput, PutBucketWebsiteCommandOutput } from \"../commands/PutBucketWebsiteCommand\";\nimport { PutObjectAclCommandInput, PutObjectAclCommandOutput } from \"../commands/PutObjectAclCommand\";\nimport { PutObjectCommandInput, PutObjectCommandOutput } from \"../commands/PutObjectCommand\";\nimport { PutObjectLegalHoldCommandInput, PutObjectLegalHoldCommandOutput } from \"../commands/PutObjectLegalHoldCommand\";\nimport {\n PutObjectLockConfigurationCommandInput,\n PutObjectLockConfigurationCommandOutput,\n} from \"../commands/PutObjectLockConfigurationCommand\";\nimport { PutObjectRetentionCommandInput, PutObjectRetentionCommandOutput } from \"../commands/PutObjectRetentionCommand\";\nimport { PutObjectTaggingCommandInput, PutObjectTaggingCommandOutput } from \"../commands/PutObjectTaggingCommand\";\nimport {\n PutPublicAccessBlockCommandInput,\n PutPublicAccessBlockCommandOutput,\n} from \"../commands/PutPublicAccessBlockCommand\";\nimport { RestoreObjectCommandInput, RestoreObjectCommandOutput } from \"../commands/RestoreObjectCommand\";\nimport {\n SelectObjectContentCommandInput,\n SelectObjectContentCommandOutput,\n} from \"../commands/SelectObjectContentCommand\";\nimport { UploadPartCommandInput, UploadPartCommandOutput } from \"../commands/UploadPartCommand\";\nimport { UploadPartCopyCommandInput, UploadPartCopyCommandOutput } from \"../commands/UploadPartCopyCommand\";\nimport {\n AbortIncompleteMultipartUpload,\n AccelerateConfiguration,\n AccessControlPolicy,\n AccessControlTranslation,\n AnalyticsAndOperator,\n AnalyticsConfiguration,\n AnalyticsExportDestination,\n AnalyticsFilter,\n AnalyticsS3BucketDestination,\n Bucket,\n BucketAlreadyExists,\n BucketAlreadyOwnedByYou,\n BucketLifecycleConfiguration,\n BucketLoggingStatus,\n CORSConfiguration,\n CORSRule,\n CommonPrefix,\n CompletedMultipartUpload,\n CompletedPart,\n Condition,\n CopyObjectResult,\n CreateBucketConfiguration,\n DefaultRetention,\n Delete,\n DeleteMarkerEntry,\n DeleteMarkerReplication,\n DeletedObject,\n Destination,\n Encryption,\n EncryptionConfiguration,\n ErrorDocument,\n Event,\n ExistingObjectReplication,\n FilterRule,\n GlacierJobParameters,\n Grant,\n Grantee,\n IndexDocument,\n Initiator,\n IntelligentTieringAndOperator,\n IntelligentTieringConfiguration,\n IntelligentTieringFilter,\n InvalidObjectState,\n InventoryConfiguration,\n InventoryDestination,\n InventoryEncryption,\n InventoryFilter,\n InventoryOptionalField,\n InventoryS3BucketDestination,\n InventorySchedule,\n LambdaFunctionConfiguration,\n LifecycleExpiration,\n LifecycleRule,\n LifecycleRuleAndOperator,\n LifecycleRuleFilter,\n LoggingEnabled,\n Metrics,\n MetricsAndOperator,\n MetricsConfiguration,\n MetricsFilter,\n MultipartUpload,\n NoSuchBucket,\n NoSuchKey,\n NoSuchUpload,\n NoncurrentVersionExpiration,\n NoncurrentVersionTransition,\n NotificationConfiguration,\n NotificationConfigurationFilter,\n ObjectAlreadyInActiveTierError,\n ObjectIdentifier,\n ObjectLockConfiguration,\n ObjectLockLegalHold,\n ObjectLockRetention,\n ObjectLockRule,\n ObjectNotInActiveTierError,\n ObjectVersion,\n Owner,\n OwnershipControls,\n OwnershipControlsRule,\n Part,\n PolicyStatus,\n PublicAccessBlockConfiguration,\n QueueConfiguration,\n Redirect,\n RedirectAllRequestsTo,\n ReplicaModifications,\n ReplicationConfiguration,\n ReplicationRule,\n ReplicationRuleAndOperator,\n ReplicationRuleFilter,\n ReplicationTime,\n ReplicationTimeValue,\n RequestPaymentConfiguration,\n RoutingRule,\n S3KeyFilter,\n SSEKMS,\n SSES3,\n ServerSideEncryptionByDefault,\n ServerSideEncryptionConfiguration,\n ServerSideEncryptionRule,\n SourceSelectionCriteria,\n SseKmsEncryptedObjects,\n StorageClassAnalysis,\n StorageClassAnalysisDataExport,\n Tag,\n Tagging,\n TargetGrant,\n Tiering,\n TopicConfiguration,\n Transition,\n VersioningConfiguration,\n WebsiteConfiguration,\n _Error,\n _Object,\n} from \"../models/models_0\";\nimport {\n CSVInput,\n CSVOutput,\n ContinuationEvent,\n CopyPartResult,\n EndEvent,\n InputSerialization,\n JSONInput,\n JSONOutput,\n MetadataEntry,\n OutputLocation,\n OutputSerialization,\n ParquetInput,\n ProgressEvent,\n RecordsEvent,\n RequestProgress,\n RestoreRequest,\n S3Location,\n ScanRange,\n SelectObjectContentEventStream,\n SelectParameters,\n StatsEvent,\n} from \"../models/models_1\";\nimport { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from \"@aws-sdk/protocol-http\";\nimport {\n SmithyException as __SmithyException,\n dateToUtcString as __dateToUtcString,\n extendedEncodeURIComponent as __extendedEncodeURIComponent,\n getArrayIfSingleItem as __getArrayIfSingleItem,\n getValueFromTextNode as __getValueFromTextNode,\n} from \"@aws-sdk/smithy-client\";\nimport {\n Endpoint as __Endpoint,\n EventStreamSerdeContext as __EventStreamSerdeContext,\n MetadataBearer as __MetadataBearer,\n ResponseMetadata as __ResponseMetadata,\n SerdeContext as __SerdeContext,\n} from \"@aws-sdk/types\";\nimport { XmlNode as __XmlNode, XmlText as __XmlText } from \"@aws-sdk/xml-builder\";\nimport { parse as xmlParse } from \"fast-xml-parser\";\n\nexport const serializeAws_restXmlAbortMultipartUploadCommand = async (\n input: AbortMultipartUploadCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"AbortMultipartUpload\",\n ...(input.UploadId !== undefined && { uploadId: input.UploadId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlCompleteMultipartUploadCommand = async (\n input: CompleteMultipartUploadCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n ...(input.UploadId !== undefined && { uploadId: input.UploadId }),\n };\n let body: any;\n let contents: any;\n if (input.MultipartUpload !== undefined) {\n contents = serializeAws_restXmlCompletedMultipartUpload(input.MultipartUpload, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlCopyObjectCommand = async (\n input: CopyObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.CacheControl) && { \"cache-control\": input.CacheControl! }),\n ...(isSerializableHeaderValue(input.ContentDisposition) && { \"content-disposition\": input.ContentDisposition! }),\n ...(isSerializableHeaderValue(input.ContentEncoding) && { \"content-encoding\": input.ContentEncoding! }),\n ...(isSerializableHeaderValue(input.ContentLanguage) && { \"content-language\": input.ContentLanguage! }),\n ...(isSerializableHeaderValue(input.ContentType) && { \"content-type\": input.ContentType! }),\n ...(isSerializableHeaderValue(input.CopySource) && { \"x-amz-copy-source\": input.CopySource! }),\n ...(isSerializableHeaderValue(input.CopySourceIfMatch) && {\n \"x-amz-copy-source-if-match\": input.CopySourceIfMatch!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfModifiedSince) && {\n \"x-amz-copy-source-if-modified-since\": __dateToUtcString(input.CopySourceIfModifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfNoneMatch) && {\n \"x-amz-copy-source-if-none-match\": input.CopySourceIfNoneMatch!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfUnmodifiedSince) && {\n \"x-amz-copy-source-if-unmodified-since\": __dateToUtcString(input.CopySourceIfUnmodifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.Expires) && { expires: __dateToUtcString(input.Expires!).toString() }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.MetadataDirective) && { \"x-amz-metadata-directive\": input.MetadataDirective! }),\n ...(isSerializableHeaderValue(input.TaggingDirective) && { \"x-amz-tagging-directive\": input.TaggingDirective! }),\n ...(isSerializableHeaderValue(input.ServerSideEncryption) && {\n \"x-amz-server-side-encryption\": input.ServerSideEncryption!,\n }),\n ...(isSerializableHeaderValue(input.StorageClass) && { \"x-amz-storage-class\": input.StorageClass! }),\n ...(isSerializableHeaderValue(input.WebsiteRedirectLocation) && {\n \"x-amz-website-redirect-location\": input.WebsiteRedirectLocation!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSKeyId) && {\n \"x-amz-server-side-encryption-aws-kms-key-id\": input.SSEKMSKeyId!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSEncryptionContext) && {\n \"x-amz-server-side-encryption-context\": input.SSEKMSEncryptionContext!,\n }),\n ...(isSerializableHeaderValue(input.BucketKeyEnabled) && {\n \"x-amz-server-side-encryption-bucket-key-enabled\": input.BucketKeyEnabled!.toString(),\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerAlgorithm) && {\n \"x-amz-copy-source-server-side-encryption-customer-algorithm\": input.CopySourceSSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerKey) && {\n \"x-amz-copy-source-server-side-encryption-customer-key\": input.CopySourceSSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerKeyMD5) && {\n \"x-amz-copy-source-server-side-encryption-customer-key-md5\": input.CopySourceSSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.Tagging) && { \"x-amz-tagging\": input.Tagging! }),\n ...(isSerializableHeaderValue(input.ObjectLockMode) && { \"x-amz-object-lock-mode\": input.ObjectLockMode! }),\n ...(isSerializableHeaderValue(input.ObjectLockRetainUntilDate) && {\n \"x-amz-object-lock-retain-until-date\": (\n input.ObjectLockRetainUntilDate!.toISOString().split(\".\")[0] + \"Z\"\n ).toString(),\n }),\n ...(isSerializableHeaderValue(input.ObjectLockLegalHoldStatus) && {\n \"x-amz-object-lock-legal-hold\": input.ObjectLockLegalHoldStatus!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedSourceBucketOwner) && {\n \"x-amz-source-expected-bucket-owner\": input.ExpectedSourceBucketOwner!,\n }),\n ...(input.Metadata !== undefined &&\n Object.keys(input.Metadata).reduce(\n (acc: any, suffix: string) => ({\n ...acc,\n [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata![suffix],\n }),\n {}\n )),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"CopyObject\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlCreateBucketCommand = async (\n input: CreateBucketCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWrite) && { \"x-amz-grant-write\": input.GrantWrite! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.ObjectLockEnabledForBucket) && {\n \"x-amz-bucket-object-lock-enabled\": input.ObjectLockEnabledForBucket!.toString(),\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n let body: any;\n let contents: any;\n if (input.CreateBucketConfiguration !== undefined) {\n contents = serializeAws_restXmlCreateBucketConfiguration(input.CreateBucketConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n body,\n });\n};\n\nexport const serializeAws_restXmlCreateMultipartUploadCommand = async (\n input: CreateMultipartUploadCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.CacheControl) && { \"cache-control\": input.CacheControl! }),\n ...(isSerializableHeaderValue(input.ContentDisposition) && { \"content-disposition\": input.ContentDisposition! }),\n ...(isSerializableHeaderValue(input.ContentEncoding) && { \"content-encoding\": input.ContentEncoding! }),\n ...(isSerializableHeaderValue(input.ContentLanguage) && { \"content-language\": input.ContentLanguage! }),\n ...(isSerializableHeaderValue(input.ContentType) && { \"content-type\": input.ContentType! }),\n ...(isSerializableHeaderValue(input.Expires) && { expires: __dateToUtcString(input.Expires!).toString() }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.ServerSideEncryption) && {\n \"x-amz-server-side-encryption\": input.ServerSideEncryption!,\n }),\n ...(isSerializableHeaderValue(input.StorageClass) && { \"x-amz-storage-class\": input.StorageClass! }),\n ...(isSerializableHeaderValue(input.WebsiteRedirectLocation) && {\n \"x-amz-website-redirect-location\": input.WebsiteRedirectLocation!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSKeyId) && {\n \"x-amz-server-side-encryption-aws-kms-key-id\": input.SSEKMSKeyId!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSEncryptionContext) && {\n \"x-amz-server-side-encryption-context\": input.SSEKMSEncryptionContext!,\n }),\n ...(isSerializableHeaderValue(input.BucketKeyEnabled) && {\n \"x-amz-server-side-encryption-bucket-key-enabled\": input.BucketKeyEnabled!.toString(),\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.Tagging) && { \"x-amz-tagging\": input.Tagging! }),\n ...(isSerializableHeaderValue(input.ObjectLockMode) && { \"x-amz-object-lock-mode\": input.ObjectLockMode! }),\n ...(isSerializableHeaderValue(input.ObjectLockRetainUntilDate) && {\n \"x-amz-object-lock-retain-until-date\": (\n input.ObjectLockRetainUntilDate!.toISOString().split(\".\")[0] + \"Z\"\n ).toString(),\n }),\n ...(isSerializableHeaderValue(input.ObjectLockLegalHoldStatus) && {\n \"x-amz-object-lock-legal-hold\": input.ObjectLockLegalHoldStatus!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n ...(input.Metadata !== undefined &&\n Object.keys(input.Metadata).reduce(\n (acc: any, suffix: string) => ({\n ...acc,\n [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata![suffix],\n }),\n {}\n )),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n uploads: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketCommand = async (\n input: DeleteBucketCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = async (\n input: DeleteBucketAnalyticsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n analytics: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketCorsCommand = async (\n input: DeleteBucketCorsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n cors: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketEncryptionCommand = async (\n input: DeleteBucketEncryptionCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n encryption: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = async (\n input: DeleteBucketIntelligentTieringConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {};\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"intelligent-tiering\": \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketInventoryConfigurationCommand = async (\n input: DeleteBucketInventoryConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n inventory: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketLifecycleCommand = async (\n input: DeleteBucketLifecycleCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n lifecycle: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketMetricsConfigurationCommand = async (\n input: DeleteBucketMetricsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n metrics: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketOwnershipControlsCommand = async (\n input: DeleteBucketOwnershipControlsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n ownershipControls: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketPolicyCommand = async (\n input: DeleteBucketPolicyCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n policy: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketReplicationCommand = async (\n input: DeleteBucketReplicationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n replication: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketTaggingCommand = async (\n input: DeleteBucketTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n tagging: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteBucketWebsiteCommand = async (\n input: DeleteBucketWebsiteCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n website: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteObjectCommand = async (\n input: DeleteObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.MFA) && { \"x-amz-mfa\": input.MFA! }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.BypassGovernanceRetention) && {\n \"x-amz-bypass-governance-retention\": input.BypassGovernanceRetention!.toString(),\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"DeleteObject\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteObjectsCommand = async (\n input: DeleteObjectsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.MFA) && { \"x-amz-mfa\": input.MFA! }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.BypassGovernanceRetention) && {\n \"x-amz-bypass-governance-retention\": input.BypassGovernanceRetention!.toString(),\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n delete: \"\",\n };\n let body: any;\n let contents: any;\n if (input.Delete !== undefined) {\n contents = serializeAws_restXmlDelete(input.Delete, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeleteObjectTaggingCommand = async (\n input: DeleteObjectTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n tagging: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlDeletePublicAccessBlockCommand = async (\n input: DeletePublicAccessBlockCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n publicAccessBlock: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"DELETE\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketAccelerateConfigurationCommand = async (\n input: GetBucketAccelerateConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n accelerate: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketAclCommand = async (\n input: GetBucketAclCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n acl: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketAnalyticsConfigurationCommand = async (\n input: GetBucketAnalyticsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n analytics: \"\",\n \"x-id\": \"GetBucketAnalyticsConfiguration\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketCorsCommand = async (\n input: GetBucketCorsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n cors: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketEncryptionCommand = async (\n input: GetBucketEncryptionCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n encryption: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = async (\n input: GetBucketIntelligentTieringConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {};\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"intelligent-tiering\": \"\",\n \"x-id\": \"GetBucketIntelligentTieringConfiguration\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketInventoryConfigurationCommand = async (\n input: GetBucketInventoryConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n inventory: \"\",\n \"x-id\": \"GetBucketInventoryConfiguration\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketLifecycleConfigurationCommand = async (\n input: GetBucketLifecycleConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n lifecycle: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketLocationCommand = async (\n input: GetBucketLocationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n location: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketLoggingCommand = async (\n input: GetBucketLoggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n logging: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketMetricsConfigurationCommand = async (\n input: GetBucketMetricsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n metrics: \"\",\n \"x-id\": \"GetBucketMetricsConfiguration\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketNotificationConfigurationCommand = async (\n input: GetBucketNotificationConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n notification: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketOwnershipControlsCommand = async (\n input: GetBucketOwnershipControlsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n ownershipControls: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketPolicyCommand = async (\n input: GetBucketPolicyCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n policy: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketPolicyStatusCommand = async (\n input: GetBucketPolicyStatusCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n policyStatus: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketReplicationCommand = async (\n input: GetBucketReplicationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n replication: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketRequestPaymentCommand = async (\n input: GetBucketRequestPaymentCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n requestPayment: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketTaggingCommand = async (\n input: GetBucketTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n tagging: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketVersioningCommand = async (\n input: GetBucketVersioningCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n versioning: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetBucketWebsiteCommand = async (\n input: GetBucketWebsiteCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n website: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectCommand = async (\n input: GetObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.IfMatch) && { \"if-match\": input.IfMatch! }),\n ...(isSerializableHeaderValue(input.IfModifiedSince) && {\n \"if-modified-since\": __dateToUtcString(input.IfModifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.IfNoneMatch) && { \"if-none-match\": input.IfNoneMatch! }),\n ...(isSerializableHeaderValue(input.IfUnmodifiedSince) && {\n \"if-unmodified-since\": __dateToUtcString(input.IfUnmodifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.Range) && { range: input.Range! }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"GetObject\",\n ...(input.ResponseCacheControl !== undefined && { \"response-cache-control\": input.ResponseCacheControl }),\n ...(input.ResponseContentDisposition !== undefined && {\n \"response-content-disposition\": input.ResponseContentDisposition,\n }),\n ...(input.ResponseContentEncoding !== undefined && { \"response-content-encoding\": input.ResponseContentEncoding }),\n ...(input.ResponseContentLanguage !== undefined && { \"response-content-language\": input.ResponseContentLanguage }),\n ...(input.ResponseContentType !== undefined && { \"response-content-type\": input.ResponseContentType }),\n ...(input.ResponseExpires !== undefined && {\n \"response-expires\": (input.ResponseExpires.toISOString().split(\".\")[0] + \"Z\").toString(),\n }),\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n ...(input.PartNumber !== undefined && { partNumber: input.PartNumber.toString() }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectAclCommand = async (\n input: GetObjectAclCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n acl: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectLegalHoldCommand = async (\n input: GetObjectLegalHoldCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"legal-hold\": \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectLockConfigurationCommand = async (\n input: GetObjectLockConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"object-lock\": \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectRetentionCommand = async (\n input: GetObjectRetentionCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n retention: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectTaggingCommand = async (\n input: GetObjectTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n tagging: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetObjectTorrentCommand = async (\n input: GetObjectTorrentCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n torrent: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlGetPublicAccessBlockCommand = async (\n input: GetPublicAccessBlockCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n publicAccessBlock: \"\",\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlHeadBucketCommand = async (\n input: HeadBucketCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"HEAD\",\n headers,\n path: resolvedPath,\n body,\n });\n};\n\nexport const serializeAws_restXmlHeadObjectCommand = async (\n input: HeadObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.IfMatch) && { \"if-match\": input.IfMatch! }),\n ...(isSerializableHeaderValue(input.IfModifiedSince) && {\n \"if-modified-since\": __dateToUtcString(input.IfModifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.IfNoneMatch) && { \"if-none-match\": input.IfNoneMatch! }),\n ...(isSerializableHeaderValue(input.IfUnmodifiedSince) && {\n \"if-unmodified-since\": __dateToUtcString(input.IfUnmodifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.Range) && { range: input.Range! }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n ...(input.PartNumber !== undefined && { partNumber: input.PartNumber.toString() }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"HEAD\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListBucketAnalyticsConfigurationsCommand = async (\n input: ListBucketAnalyticsConfigurationsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n analytics: \"\",\n \"x-id\": \"ListBucketAnalyticsConfigurations\",\n ...(input.ContinuationToken !== undefined && { \"continuation-token\": input.ContinuationToken }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = async (\n input: ListBucketIntelligentTieringConfigurationsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {};\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"intelligent-tiering\": \"\",\n \"x-id\": \"ListBucketIntelligentTieringConfigurations\",\n ...(input.ContinuationToken !== undefined && { \"continuation-token\": input.ContinuationToken }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListBucketInventoryConfigurationsCommand = async (\n input: ListBucketInventoryConfigurationsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n inventory: \"\",\n \"x-id\": \"ListBucketInventoryConfigurations\",\n ...(input.ContinuationToken !== undefined && { \"continuation-token\": input.ContinuationToken }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListBucketMetricsConfigurationsCommand = async (\n input: ListBucketMetricsConfigurationsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n metrics: \"\",\n \"x-id\": \"ListBucketMetricsConfigurations\",\n ...(input.ContinuationToken !== undefined && { \"continuation-token\": input.ContinuationToken }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListBucketsCommand = async (\n input: ListBucketsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {};\n let resolvedPath = \"/\";\n let body: any;\n body = \"\";\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n body,\n });\n};\n\nexport const serializeAws_restXmlListMultipartUploadsCommand = async (\n input: ListMultipartUploadsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n uploads: \"\",\n ...(input.Delimiter !== undefined && { delimiter: input.Delimiter }),\n ...(input.EncodingType !== undefined && { \"encoding-type\": input.EncodingType }),\n ...(input.KeyMarker !== undefined && { \"key-marker\": input.KeyMarker }),\n ...(input.MaxUploads !== undefined && { \"max-uploads\": input.MaxUploads.toString() }),\n ...(input.Prefix !== undefined && { prefix: input.Prefix }),\n ...(input.UploadIdMarker !== undefined && { \"upload-id-marker\": input.UploadIdMarker }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListObjectsCommand = async (\n input: ListObjectsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n ...(input.Delimiter !== undefined && { delimiter: input.Delimiter }),\n ...(input.EncodingType !== undefined && { \"encoding-type\": input.EncodingType }),\n ...(input.Marker !== undefined && { marker: input.Marker }),\n ...(input.MaxKeys !== undefined && { \"max-keys\": input.MaxKeys.toString() }),\n ...(input.Prefix !== undefined && { prefix: input.Prefix }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListObjectsV2Command = async (\n input: ListObjectsV2CommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"list-type\": \"2\",\n ...(input.Delimiter !== undefined && { delimiter: input.Delimiter }),\n ...(input.EncodingType !== undefined && { \"encoding-type\": input.EncodingType }),\n ...(input.MaxKeys !== undefined && { \"max-keys\": input.MaxKeys.toString() }),\n ...(input.Prefix !== undefined && { prefix: input.Prefix }),\n ...(input.ContinuationToken !== undefined && { \"continuation-token\": input.ContinuationToken }),\n ...(input.FetchOwner !== undefined && { \"fetch-owner\": input.FetchOwner.toString() }),\n ...(input.StartAfter !== undefined && { \"start-after\": input.StartAfter }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListObjectVersionsCommand = async (\n input: ListObjectVersionsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n versions: \"\",\n ...(input.Delimiter !== undefined && { delimiter: input.Delimiter }),\n ...(input.EncodingType !== undefined && { \"encoding-type\": input.EncodingType }),\n ...(input.KeyMarker !== undefined && { \"key-marker\": input.KeyMarker }),\n ...(input.MaxKeys !== undefined && { \"max-keys\": input.MaxKeys.toString() }),\n ...(input.Prefix !== undefined && { prefix: input.Prefix }),\n ...(input.VersionIdMarker !== undefined && { \"version-id-marker\": input.VersionIdMarker }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlListPartsCommand = async (\n input: ListPartsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"ListParts\",\n ...(input.MaxParts !== undefined && { \"max-parts\": input.MaxParts.toString() }),\n ...(input.PartNumberMarker !== undefined && { \"part-number-marker\": input.PartNumberMarker }),\n ...(input.UploadId !== undefined && { uploadId: input.UploadId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"GET\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketAccelerateConfigurationCommand = async (\n input: PutBucketAccelerateConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n accelerate: \"\",\n };\n let body: any;\n let contents: any;\n if (input.AccelerateConfiguration !== undefined) {\n contents = serializeAws_restXmlAccelerateConfiguration(input.AccelerateConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketAclCommand = async (\n input: PutBucketAclCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWrite) && { \"x-amz-grant-write\": input.GrantWrite! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n acl: \"\",\n };\n let body: any;\n let contents: any;\n if (input.AccessControlPolicy !== undefined) {\n contents = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketAnalyticsConfigurationCommand = async (\n input: PutBucketAnalyticsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n analytics: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n let contents: any;\n if (input.AnalyticsConfiguration !== undefined) {\n contents = serializeAws_restXmlAnalyticsConfiguration(input.AnalyticsConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketCorsCommand = async (\n input: PutBucketCorsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n cors: \"\",\n };\n let body: any;\n let contents: any;\n if (input.CORSConfiguration !== undefined) {\n contents = serializeAws_restXmlCORSConfiguration(input.CORSConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketEncryptionCommand = async (\n input: PutBucketEncryptionCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n encryption: \"\",\n };\n let body: any;\n let contents: any;\n if (input.ServerSideEncryptionConfiguration !== undefined) {\n contents = serializeAws_restXmlServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = async (\n input: PutBucketIntelligentTieringConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"intelligent-tiering\": \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n let contents: any;\n if (input.IntelligentTieringConfiguration !== undefined) {\n contents = serializeAws_restXmlIntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketInventoryConfigurationCommand = async (\n input: PutBucketInventoryConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n inventory: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n let contents: any;\n if (input.InventoryConfiguration !== undefined) {\n contents = serializeAws_restXmlInventoryConfiguration(input.InventoryConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketLifecycleConfigurationCommand = async (\n input: PutBucketLifecycleConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n lifecycle: \"\",\n };\n let body: any;\n let contents: any;\n if (input.LifecycleConfiguration !== undefined) {\n contents = serializeAws_restXmlBucketLifecycleConfiguration(input.LifecycleConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketLoggingCommand = async (\n input: PutBucketLoggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n logging: \"\",\n };\n let body: any;\n let contents: any;\n if (input.BucketLoggingStatus !== undefined) {\n contents = serializeAws_restXmlBucketLoggingStatus(input.BucketLoggingStatus, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketMetricsConfigurationCommand = async (\n input: PutBucketMetricsConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n metrics: \"\",\n ...(input.Id !== undefined && { id: input.Id }),\n };\n let body: any;\n let contents: any;\n if (input.MetricsConfiguration !== undefined) {\n contents = serializeAws_restXmlMetricsConfiguration(input.MetricsConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketNotificationConfigurationCommand = async (\n input: PutBucketNotificationConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n notification: \"\",\n };\n let body: any;\n let contents: any;\n if (input.NotificationConfiguration !== undefined) {\n contents = serializeAws_restXmlNotificationConfiguration(input.NotificationConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketOwnershipControlsCommand = async (\n input: PutBucketOwnershipControlsCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n ownershipControls: \"\",\n };\n let body: any;\n let contents: any;\n if (input.OwnershipControls !== undefined) {\n contents = serializeAws_restXmlOwnershipControls(input.OwnershipControls, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketPolicyCommand = async (\n input: PutBucketPolicyCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"text/plain\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ConfirmRemoveSelfBucketAccess) && {\n \"x-amz-confirm-remove-self-bucket-access\": input.ConfirmRemoveSelfBucketAccess!.toString(),\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n policy: \"\",\n };\n let body: any;\n let contents: any;\n if (input.Policy !== undefined) {\n contents = input.Policy;\n body = contents;\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketReplicationCommand = async (\n input: PutBucketReplicationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.Token) && { \"x-amz-bucket-object-lock-token\": input.Token! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n replication: \"\",\n };\n let body: any;\n let contents: any;\n if (input.ReplicationConfiguration !== undefined) {\n contents = serializeAws_restXmlReplicationConfiguration(input.ReplicationConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketRequestPaymentCommand = async (\n input: PutBucketRequestPaymentCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n requestPayment: \"\",\n };\n let body: any;\n let contents: any;\n if (input.RequestPaymentConfiguration !== undefined) {\n contents = serializeAws_restXmlRequestPaymentConfiguration(input.RequestPaymentConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketTaggingCommand = async (\n input: PutBucketTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n tagging: \"\",\n };\n let body: any;\n let contents: any;\n if (input.Tagging !== undefined) {\n contents = serializeAws_restXmlTagging(input.Tagging, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketVersioningCommand = async (\n input: PutBucketVersioningCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.MFA) && { \"x-amz-mfa\": input.MFA! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n versioning: \"\",\n };\n let body: any;\n let contents: any;\n if (input.VersioningConfiguration !== undefined) {\n contents = serializeAws_restXmlVersioningConfiguration(input.VersioningConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutBucketWebsiteCommand = async (\n input: PutBucketWebsiteCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n website: \"\",\n };\n let body: any;\n let contents: any;\n if (input.WebsiteConfiguration !== undefined) {\n contents = serializeAws_restXmlWebsiteConfiguration(input.WebsiteConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectCommand = async (\n input: PutObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/octet-stream\",\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.CacheControl) && { \"cache-control\": input.CacheControl! }),\n ...(isSerializableHeaderValue(input.ContentDisposition) && { \"content-disposition\": input.ContentDisposition! }),\n ...(isSerializableHeaderValue(input.ContentEncoding) && { \"content-encoding\": input.ContentEncoding! }),\n ...(isSerializableHeaderValue(input.ContentLanguage) && { \"content-language\": input.ContentLanguage! }),\n ...(isSerializableHeaderValue(input.ContentLength) && { \"content-length\": input.ContentLength!.toString() }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ContentType) && { \"content-type\": input.ContentType! }),\n ...(isSerializableHeaderValue(input.Expires) && { expires: __dateToUtcString(input.Expires!).toString() }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.ServerSideEncryption) && {\n \"x-amz-server-side-encryption\": input.ServerSideEncryption!,\n }),\n ...(isSerializableHeaderValue(input.StorageClass) && { \"x-amz-storage-class\": input.StorageClass! }),\n ...(isSerializableHeaderValue(input.WebsiteRedirectLocation) && {\n \"x-amz-website-redirect-location\": input.WebsiteRedirectLocation!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSKeyId) && {\n \"x-amz-server-side-encryption-aws-kms-key-id\": input.SSEKMSKeyId!,\n }),\n ...(isSerializableHeaderValue(input.SSEKMSEncryptionContext) && {\n \"x-amz-server-side-encryption-context\": input.SSEKMSEncryptionContext!,\n }),\n ...(isSerializableHeaderValue(input.BucketKeyEnabled) && {\n \"x-amz-server-side-encryption-bucket-key-enabled\": input.BucketKeyEnabled!.toString(),\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.Tagging) && { \"x-amz-tagging\": input.Tagging! }),\n ...(isSerializableHeaderValue(input.ObjectLockMode) && { \"x-amz-object-lock-mode\": input.ObjectLockMode! }),\n ...(isSerializableHeaderValue(input.ObjectLockRetainUntilDate) && {\n \"x-amz-object-lock-retain-until-date\": (\n input.ObjectLockRetainUntilDate!.toISOString().split(\".\")[0] + \"Z\"\n ).toString(),\n }),\n ...(isSerializableHeaderValue(input.ObjectLockLegalHoldStatus) && {\n \"x-amz-object-lock-legal-hold\": input.ObjectLockLegalHoldStatus!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n ...(input.Metadata !== undefined &&\n Object.keys(input.Metadata).reduce(\n (acc: any, suffix: string) => ({\n ...acc,\n [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata![suffix],\n }),\n {}\n )),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"PutObject\",\n };\n let body: any;\n let contents: any;\n if (input.Body !== undefined) {\n contents = input.Body;\n body = contents;\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectAclCommand = async (\n input: PutObjectAclCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ACL) && { \"x-amz-acl\": input.ACL! }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.GrantFullControl) && { \"x-amz-grant-full-control\": input.GrantFullControl! }),\n ...(isSerializableHeaderValue(input.GrantRead) && { \"x-amz-grant-read\": input.GrantRead! }),\n ...(isSerializableHeaderValue(input.GrantReadACP) && { \"x-amz-grant-read-acp\": input.GrantReadACP! }),\n ...(isSerializableHeaderValue(input.GrantWrite) && { \"x-amz-grant-write\": input.GrantWrite! }),\n ...(isSerializableHeaderValue(input.GrantWriteACP) && { \"x-amz-grant-write-acp\": input.GrantWriteACP! }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n acl: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n let contents: any;\n if (input.AccessControlPolicy !== undefined) {\n contents = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectLegalHoldCommand = async (\n input: PutObjectLegalHoldCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"legal-hold\": \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n let contents: any;\n if (input.LegalHold !== undefined) {\n contents = serializeAws_restXmlObjectLockLegalHold(input.LegalHold, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectLockConfigurationCommand = async (\n input: PutObjectLockConfigurationCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.Token) && { \"x-amz-bucket-object-lock-token\": input.Token! }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n \"object-lock\": \"\",\n };\n let body: any;\n let contents: any;\n if (input.ObjectLockConfiguration !== undefined) {\n contents = serializeAws_restXmlObjectLockConfiguration(input.ObjectLockConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectRetentionCommand = async (\n input: PutObjectRetentionCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.BypassGovernanceRetention) && {\n \"x-amz-bypass-governance-retention\": input.BypassGovernanceRetention!.toString(),\n }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n retention: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n let contents: any;\n if (input.Retention !== undefined) {\n contents = serializeAws_restXmlObjectLockRetention(input.Retention, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutObjectTaggingCommand = async (\n input: PutObjectTaggingCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n tagging: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n let contents: any;\n if (input.Tagging !== undefined) {\n contents = serializeAws_restXmlTagging(input.Tagging, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlPutPublicAccessBlockCommand = async (\n input: PutPublicAccessBlockCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n const query: any = {\n publicAccessBlock: \"\",\n };\n let body: any;\n let contents: any;\n if (input.PublicAccessBlockConfiguration !== undefined) {\n contents = serializeAws_restXmlPublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlRestoreObjectCommand = async (\n input: RestoreObjectCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n restore: \"\",\n ...(input.VersionId !== undefined && { versionId: input.VersionId }),\n };\n let body: any;\n let contents: any;\n if (input.RestoreRequest !== undefined) {\n contents = serializeAws_restXmlRestoreRequest(input.RestoreRequest, context);\n body = '';\n contents.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n body += contents.toString();\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlSelectObjectContentCommand = async (\n input: SelectObjectContentCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/xml\",\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n select: \"\",\n \"select-type\": \"2\",\n };\n let body: any;\n body = '';\n const bodyNode = new __XmlNode(\"SelectObjectContentRequest\");\n bodyNode.addAttribute(\"xmlns\", \"http://s3.amazonaws.com/doc/2006-03-01/\");\n if (input.Expression !== undefined) {\n const node = new __XmlNode(\"Expression\").addChildNode(new __XmlText(input.Expression)).withName(\"Expression\");\n bodyNode.addChildNode(node);\n }\n if (input.ExpressionType !== undefined) {\n const node = new __XmlNode(\"ExpressionType\")\n .addChildNode(new __XmlText(input.ExpressionType))\n .withName(\"ExpressionType\");\n bodyNode.addChildNode(node);\n }\n if (input.InputSerialization !== undefined) {\n const node = serializeAws_restXmlInputSerialization(input.InputSerialization, context).withName(\n \"InputSerialization\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.OutputSerialization !== undefined) {\n const node = serializeAws_restXmlOutputSerialization(input.OutputSerialization, context).withName(\n \"OutputSerialization\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.RequestProgress !== undefined) {\n const node = serializeAws_restXmlRequestProgress(input.RequestProgress, context).withName(\"RequestProgress\");\n bodyNode.addChildNode(node);\n }\n if (input.ScanRange !== undefined) {\n const node = serializeAws_restXmlScanRange(input.ScanRange, context).withName(\"ScanRange\");\n bodyNode.addChildNode(node);\n }\n body += bodyNode.toString();\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"POST\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlUploadPartCommand = async (\n input: UploadPartCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n \"content-type\": \"application/octet-stream\",\n ...(isSerializableHeaderValue(input.ContentLength) && { \"content-length\": input.ContentLength!.toString() }),\n ...(isSerializableHeaderValue(input.ContentMD5) && { \"content-md5\": input.ContentMD5! }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"UploadPart\",\n ...(input.PartNumber !== undefined && { partNumber: input.PartNumber.toString() }),\n ...(input.UploadId !== undefined && { uploadId: input.UploadId }),\n };\n let body: any;\n let contents: any;\n if (input.Body !== undefined) {\n contents = input.Body;\n body = contents;\n }\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const serializeAws_restXmlUploadPartCopyCommand = async (\n input: UploadPartCopyCommandInput,\n context: __SerdeContext\n): Promise<__HttpRequest> => {\n const headers: any = {\n ...(isSerializableHeaderValue(input.CopySource) && { \"x-amz-copy-source\": input.CopySource! }),\n ...(isSerializableHeaderValue(input.CopySourceIfMatch) && {\n \"x-amz-copy-source-if-match\": input.CopySourceIfMatch!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfModifiedSince) && {\n \"x-amz-copy-source-if-modified-since\": __dateToUtcString(input.CopySourceIfModifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfNoneMatch) && {\n \"x-amz-copy-source-if-none-match\": input.CopySourceIfNoneMatch!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceIfUnmodifiedSince) && {\n \"x-amz-copy-source-if-unmodified-since\": __dateToUtcString(input.CopySourceIfUnmodifiedSince!).toString(),\n }),\n ...(isSerializableHeaderValue(input.CopySourceRange) && { \"x-amz-copy-source-range\": input.CopySourceRange! }),\n ...(isSerializableHeaderValue(input.SSECustomerAlgorithm) && {\n \"x-amz-server-side-encryption-customer-algorithm\": input.SSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKey) && {\n \"x-amz-server-side-encryption-customer-key\": input.SSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.SSECustomerKeyMD5) && {\n \"x-amz-server-side-encryption-customer-key-md5\": input.SSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerAlgorithm) && {\n \"x-amz-copy-source-server-side-encryption-customer-algorithm\": input.CopySourceSSECustomerAlgorithm!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerKey) && {\n \"x-amz-copy-source-server-side-encryption-customer-key\": input.CopySourceSSECustomerKey!,\n }),\n ...(isSerializableHeaderValue(input.CopySourceSSECustomerKeyMD5) && {\n \"x-amz-copy-source-server-side-encryption-customer-key-md5\": input.CopySourceSSECustomerKeyMD5!,\n }),\n ...(isSerializableHeaderValue(input.RequestPayer) && { \"x-amz-request-payer\": input.RequestPayer! }),\n ...(isSerializableHeaderValue(input.ExpectedBucketOwner) && {\n \"x-amz-expected-bucket-owner\": input.ExpectedBucketOwner!,\n }),\n ...(isSerializableHeaderValue(input.ExpectedSourceBucketOwner) && {\n \"x-amz-source-expected-bucket-owner\": input.ExpectedSourceBucketOwner!,\n }),\n };\n let resolvedPath = \"/{Bucket}/{Key+}\";\n if (input.Bucket !== undefined) {\n const labelValue: string = input.Bucket;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Bucket.\");\n }\n resolvedPath = resolvedPath.replace(\"{Bucket}\", __extendedEncodeURIComponent(labelValue));\n } else {\n throw new Error(\"No value provided for input HTTP label: Bucket.\");\n }\n if (input.Key !== undefined) {\n const labelValue: string = input.Key;\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: Key.\");\n }\n resolvedPath = resolvedPath.replace(\n \"{Key+}\",\n labelValue\n .split(\"/\")\n .map((segment) => __extendedEncodeURIComponent(segment))\n .join(\"/\")\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: Key.\");\n }\n const query: any = {\n \"x-id\": \"UploadPartCopy\",\n ...(input.PartNumber !== undefined && { partNumber: input.PartNumber.toString() }),\n ...(input.UploadId !== undefined && { uploadId: input.UploadId }),\n };\n let body: any;\n const { hostname, protocol = \"https\", port } = await context.endpoint();\n return new __HttpRequest({\n protocol,\n hostname,\n port,\n method: \"PUT\",\n headers,\n path: resolvedPath,\n query,\n body,\n });\n};\n\nexport const deserializeAws_restXmlAbortMultipartUploadCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlAbortMultipartUploadCommandError(output, context);\n }\n const contents: AbortMultipartUploadCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlAbortMultipartUploadCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchUpload\":\n case \"com.amazonaws.s3#NoSuchUpload\":\n response = {\n ...(await deserializeAws_restXmlNoSuchUploadResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlCompleteMultipartUploadCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlCompleteMultipartUploadCommandError(output, context);\n }\n const contents: CompleteMultipartUploadCommandOutput = {\n $metadata: deserializeMetadata(output),\n Bucket: undefined,\n BucketKeyEnabled: undefined,\n ETag: undefined,\n Expiration: undefined,\n Key: undefined,\n Location: undefined,\n RequestCharged: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-expiration\"] !== undefined) {\n contents.Expiration = output.headers[\"x-amz-expiration\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data[\"Bucket\"] !== undefined) {\n contents.Bucket = data[\"Bucket\"];\n }\n if (data[\"ETag\"] !== undefined) {\n contents.ETag = data[\"ETag\"];\n }\n if (data[\"Key\"] !== undefined) {\n contents.Key = data[\"Key\"];\n }\n if (data[\"Location\"] !== undefined) {\n contents.Location = data[\"Location\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlCompleteMultipartUploadCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlCopyObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlCopyObjectCommandError(output, context);\n }\n const contents: CopyObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n BucketKeyEnabled: undefined,\n CopyObjectResult: undefined,\n CopySourceVersionId: undefined,\n Expiration: undefined,\n RequestCharged: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSEncryptionContext: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-expiration\"] !== undefined) {\n contents.Expiration = output.headers[\"x-amz-expiration\"];\n }\n if (output.headers[\"x-amz-copy-source-version-id\"] !== undefined) {\n contents.CopySourceVersionId = output.headers[\"x-amz-copy-source-version-id\"];\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-context\"] !== undefined) {\n contents.SSEKMSEncryptionContext = output.headers[\"x-amz-server-side-encryption-context\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n contents.CopyObjectResult = deserializeAws_restXmlCopyObjectResult(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlCopyObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ObjectNotInActiveTierError\":\n case \"com.amazonaws.s3#ObjectNotInActiveTierError\":\n response = {\n ...(await deserializeAws_restXmlObjectNotInActiveTierErrorResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlCreateBucketCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlCreateBucketCommandError(output, context);\n }\n const contents: CreateBucketCommandOutput = {\n $metadata: deserializeMetadata(output),\n Location: undefined,\n };\n if (output.headers[\"location\"] !== undefined) {\n contents.Location = output.headers[\"location\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlCreateBucketCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"BucketAlreadyExists\":\n case \"com.amazonaws.s3#BucketAlreadyExists\":\n response = {\n ...(await deserializeAws_restXmlBucketAlreadyExistsResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"BucketAlreadyOwnedByYou\":\n case \"com.amazonaws.s3#BucketAlreadyOwnedByYou\":\n response = {\n ...(await deserializeAws_restXmlBucketAlreadyOwnedByYouResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlCreateMultipartUploadCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlCreateMultipartUploadCommandError(output, context);\n }\n const contents: CreateMultipartUploadCommandOutput = {\n $metadata: deserializeMetadata(output),\n AbortDate: undefined,\n AbortRuleId: undefined,\n Bucket: undefined,\n BucketKeyEnabled: undefined,\n Key: undefined,\n RequestCharged: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSEncryptionContext: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n UploadId: undefined,\n };\n if (output.headers[\"x-amz-abort-date\"] !== undefined) {\n contents.AbortDate = new Date(output.headers[\"x-amz-abort-date\"]);\n }\n if (output.headers[\"x-amz-abort-rule-id\"] !== undefined) {\n contents.AbortRuleId = output.headers[\"x-amz-abort-rule-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-context\"] !== undefined) {\n contents.SSEKMSEncryptionContext = output.headers[\"x-amz-server-side-encryption-context\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data[\"Bucket\"] !== undefined) {\n contents.Bucket = data[\"Bucket\"];\n }\n if (data[\"Key\"] !== undefined) {\n contents.Key = data[\"Key\"];\n }\n if (data[\"UploadId\"] !== undefined) {\n contents.UploadId = data[\"UploadId\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlCreateMultipartUploadCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketCommandError(output, context);\n }\n const contents: DeleteBucketCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommandError(output, context);\n }\n const contents: DeleteBucketAnalyticsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketCorsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketCorsCommandError(output, context);\n }\n const contents: DeleteBucketCorsCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketCorsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketEncryptionCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketEncryptionCommandError(output, context);\n }\n const contents: DeleteBucketEncryptionCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketEncryptionCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommandError(output, context);\n }\n const contents: DeleteBucketIntelligentTieringConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketInventoryConfigurationCommandError(output, context);\n }\n const contents: DeleteBucketInventoryConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketInventoryConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketLifecycleCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketLifecycleCommandError(output, context);\n }\n const contents: DeleteBucketLifecycleCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketLifecycleCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketMetricsConfigurationCommandError(output, context);\n }\n const contents: DeleteBucketMetricsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketMetricsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketOwnershipControlsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketOwnershipControlsCommandError(output, context);\n }\n const contents: DeleteBucketOwnershipControlsCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketOwnershipControlsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketPolicyCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketPolicyCommandError(output, context);\n }\n const contents: DeleteBucketPolicyCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketPolicyCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketReplicationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketReplicationCommandError(output, context);\n }\n const contents: DeleteBucketReplicationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketReplicationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketTaggingCommandError(output, context);\n }\n const contents: DeleteBucketTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteBucketWebsiteCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteBucketWebsiteCommandError(output, context);\n }\n const contents: DeleteBucketWebsiteCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteBucketWebsiteCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteObjectCommandError(output, context);\n }\n const contents: DeleteObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n DeleteMarker: undefined,\n RequestCharged: undefined,\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-delete-marker\"] !== undefined) {\n contents.DeleteMarker = output.headers[\"x-amz-delete-marker\"] === \"true\";\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteObjectsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteObjectsCommandError(output, context);\n }\n const contents: DeleteObjectsCommandOutput = {\n $metadata: deserializeMetadata(output),\n Deleted: undefined,\n Errors: undefined,\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data.Deleted === \"\") {\n contents.Deleted = [];\n }\n if (data[\"Deleted\"] !== undefined) {\n contents.Deleted = deserializeAws_restXmlDeletedObjects(__getArrayIfSingleItem(data[\"Deleted\"]), context);\n }\n if (data.Error === \"\") {\n contents.Errors = [];\n }\n if (data[\"Error\"] !== undefined) {\n contents.Errors = deserializeAws_restXmlErrors(__getArrayIfSingleItem(data[\"Error\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteObjectsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeleteObjectTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeleteObjectTaggingCommandError(output, context);\n }\n const contents: DeleteObjectTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeleteObjectTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlDeletePublicAccessBlockCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 204 && output.statusCode >= 300) {\n return deserializeAws_restXmlDeletePublicAccessBlockCommandError(output, context);\n }\n const contents: DeletePublicAccessBlockCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlDeletePublicAccessBlockCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketAccelerateConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketAccelerateConfigurationCommandError(output, context);\n }\n const contents: GetBucketAccelerateConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n Status: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"Status\"] !== undefined) {\n contents.Status = data[\"Status\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketAccelerateConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketAclCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketAclCommandError(output, context);\n }\n const contents: GetBucketAclCommandOutput = {\n $metadata: deserializeMetadata(output),\n Grants: undefined,\n Owner: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.AccessControlList === \"\") {\n contents.Grants = [];\n }\n if (data[\"AccessControlList\"] !== undefined && data[\"AccessControlList\"][\"Grant\"] !== undefined) {\n contents.Grants = deserializeAws_restXmlGrants(__getArrayIfSingleItem(data[\"AccessControlList\"][\"Grant\"]), context);\n }\n if (data[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(data[\"Owner\"], context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketAclCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketAnalyticsConfigurationCommandError(output, context);\n }\n const contents: GetBucketAnalyticsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n AnalyticsConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.AnalyticsConfiguration = deserializeAws_restXmlAnalyticsConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketAnalyticsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketCorsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketCorsCommandError(output, context);\n }\n const contents: GetBucketCorsCommandOutput = {\n $metadata: deserializeMetadata(output),\n CORSRules: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.CORSRule === \"\") {\n contents.CORSRules = [];\n }\n if (data[\"CORSRule\"] !== undefined) {\n contents.CORSRules = deserializeAws_restXmlCORSRules(__getArrayIfSingleItem(data[\"CORSRule\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketCorsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketEncryptionCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketEncryptionCommandError(output, context);\n }\n const contents: GetBucketEncryptionCommandOutput = {\n $metadata: deserializeMetadata(output),\n ServerSideEncryptionConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.ServerSideEncryptionConfiguration = deserializeAws_restXmlServerSideEncryptionConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketEncryptionCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommandError(output, context);\n }\n const contents: GetBucketIntelligentTieringConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n IntelligentTieringConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.IntelligentTieringConfiguration = deserializeAws_restXmlIntelligentTieringConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketInventoryConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketInventoryConfigurationCommandError(output, context);\n }\n const contents: GetBucketInventoryConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n InventoryConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.InventoryConfiguration = deserializeAws_restXmlInventoryConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketInventoryConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketLifecycleConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketLifecycleConfigurationCommandError(output, context);\n }\n const contents: GetBucketLifecycleConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n Rules: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.Rule === \"\") {\n contents.Rules = [];\n }\n if (data[\"Rule\"] !== undefined) {\n contents.Rules = deserializeAws_restXmlLifecycleRules(__getArrayIfSingleItem(data[\"Rule\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketLifecycleConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketLocationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketLocationCommandError(output, context);\n }\n const contents: GetBucketLocationCommandOutput = {\n $metadata: deserializeMetadata(output),\n LocationConstraint: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"LocationConstraint\"] !== undefined) {\n contents.LocationConstraint = data[\"LocationConstraint\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketLocationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketLoggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketLoggingCommandError(output, context);\n }\n const contents: GetBucketLoggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n LoggingEnabled: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"LoggingEnabled\"] !== undefined) {\n contents.LoggingEnabled = deserializeAws_restXmlLoggingEnabled(data[\"LoggingEnabled\"], context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketLoggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketMetricsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketMetricsConfigurationCommandError(output, context);\n }\n const contents: GetBucketMetricsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n MetricsConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.MetricsConfiguration = deserializeAws_restXmlMetricsConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketMetricsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketNotificationConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketNotificationConfigurationCommandError(output, context);\n }\n const contents: GetBucketNotificationConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n LambdaFunctionConfigurations: undefined,\n QueueConfigurations: undefined,\n TopicConfigurations: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.CloudFunctionConfiguration === \"\") {\n contents.LambdaFunctionConfigurations = [];\n }\n if (data[\"CloudFunctionConfiguration\"] !== undefined) {\n contents.LambdaFunctionConfigurations = deserializeAws_restXmlLambdaFunctionConfigurationList(\n __getArrayIfSingleItem(data[\"CloudFunctionConfiguration\"]),\n context\n );\n }\n if (data.QueueConfiguration === \"\") {\n contents.QueueConfigurations = [];\n }\n if (data[\"QueueConfiguration\"] !== undefined) {\n contents.QueueConfigurations = deserializeAws_restXmlQueueConfigurationList(\n __getArrayIfSingleItem(data[\"QueueConfiguration\"]),\n context\n );\n }\n if (data.TopicConfiguration === \"\") {\n contents.TopicConfigurations = [];\n }\n if (data[\"TopicConfiguration\"] !== undefined) {\n contents.TopicConfigurations = deserializeAws_restXmlTopicConfigurationList(\n __getArrayIfSingleItem(data[\"TopicConfiguration\"]),\n context\n );\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketNotificationConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketOwnershipControlsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketOwnershipControlsCommandError(output, context);\n }\n const contents: GetBucketOwnershipControlsCommandOutput = {\n $metadata: deserializeMetadata(output),\n OwnershipControls: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.OwnershipControls = deserializeAws_restXmlOwnershipControls(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketOwnershipControlsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketPolicyCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketPolicyCommandError(output, context);\n }\n const contents: GetBucketPolicyCommandOutput = {\n $metadata: deserializeMetadata(output),\n Policy: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"Policy\"] !== undefined) {\n contents.Policy = data[\"Policy\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketPolicyCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketPolicyStatusCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketPolicyStatusCommandError(output, context);\n }\n const contents: GetBucketPolicyStatusCommandOutput = {\n $metadata: deserializeMetadata(output),\n PolicyStatus: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.PolicyStatus = deserializeAws_restXmlPolicyStatus(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketPolicyStatusCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketReplicationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketReplicationCommandError(output, context);\n }\n const contents: GetBucketReplicationCommandOutput = {\n $metadata: deserializeMetadata(output),\n ReplicationConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.ReplicationConfiguration = deserializeAws_restXmlReplicationConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketReplicationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketRequestPaymentCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketRequestPaymentCommandError(output, context);\n }\n const contents: GetBucketRequestPaymentCommandOutput = {\n $metadata: deserializeMetadata(output),\n Payer: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"Payer\"] !== undefined) {\n contents.Payer = data[\"Payer\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketRequestPaymentCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketTaggingCommandError(output, context);\n }\n const contents: GetBucketTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n TagSet: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.TagSet === \"\") {\n contents.TagSet = [];\n }\n if (data[\"TagSet\"] !== undefined && data[\"TagSet\"][\"Tag\"] !== undefined) {\n contents.TagSet = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(data[\"TagSet\"][\"Tag\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketVersioningCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketVersioningCommandError(output, context);\n }\n const contents: GetBucketVersioningCommandOutput = {\n $metadata: deserializeMetadata(output),\n MFADelete: undefined,\n Status: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"MfaDelete\"] !== undefined) {\n contents.MFADelete = data[\"MfaDelete\"];\n }\n if (data[\"Status\"] !== undefined) {\n contents.Status = data[\"Status\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketVersioningCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetBucketWebsiteCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetBucketWebsiteCommandError(output, context);\n }\n const contents: GetBucketWebsiteCommandOutput = {\n $metadata: deserializeMetadata(output),\n ErrorDocument: undefined,\n IndexDocument: undefined,\n RedirectAllRequestsTo: undefined,\n RoutingRules: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"ErrorDocument\"] !== undefined) {\n contents.ErrorDocument = deserializeAws_restXmlErrorDocument(data[\"ErrorDocument\"], context);\n }\n if (data[\"IndexDocument\"] !== undefined) {\n contents.IndexDocument = deserializeAws_restXmlIndexDocument(data[\"IndexDocument\"], context);\n }\n if (data[\"RedirectAllRequestsTo\"] !== undefined) {\n contents.RedirectAllRequestsTo = deserializeAws_restXmlRedirectAllRequestsTo(\n data[\"RedirectAllRequestsTo\"],\n context\n );\n }\n if (data.RoutingRules === \"\") {\n contents.RoutingRules = [];\n }\n if (data[\"RoutingRules\"] !== undefined && data[\"RoutingRules\"][\"RoutingRule\"] !== undefined) {\n contents.RoutingRules = deserializeAws_restXmlRoutingRules(\n __getArrayIfSingleItem(data[\"RoutingRules\"][\"RoutingRule\"]),\n context\n );\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetBucketWebsiteCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectCommandError(output, context);\n }\n const contents: GetObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n AcceptRanges: undefined,\n Body: undefined,\n BucketKeyEnabled: undefined,\n CacheControl: undefined,\n ContentDisposition: undefined,\n ContentEncoding: undefined,\n ContentLanguage: undefined,\n ContentLength: undefined,\n ContentRange: undefined,\n ContentType: undefined,\n DeleteMarker: undefined,\n ETag: undefined,\n Expiration: undefined,\n Expires: undefined,\n LastModified: undefined,\n Metadata: undefined,\n MissingMeta: undefined,\n ObjectLockLegalHoldStatus: undefined,\n ObjectLockMode: undefined,\n ObjectLockRetainUntilDate: undefined,\n PartsCount: undefined,\n ReplicationStatus: undefined,\n RequestCharged: undefined,\n Restore: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n StorageClass: undefined,\n TagCount: undefined,\n VersionId: undefined,\n WebsiteRedirectLocation: undefined,\n };\n if (output.headers[\"x-amz-delete-marker\"] !== undefined) {\n contents.DeleteMarker = output.headers[\"x-amz-delete-marker\"] === \"true\";\n }\n if (output.headers[\"accept-ranges\"] !== undefined) {\n contents.AcceptRanges = output.headers[\"accept-ranges\"];\n }\n if (output.headers[\"x-amz-expiration\"] !== undefined) {\n contents.Expiration = output.headers[\"x-amz-expiration\"];\n }\n if (output.headers[\"x-amz-restore\"] !== undefined) {\n contents.Restore = output.headers[\"x-amz-restore\"];\n }\n if (output.headers[\"last-modified\"] !== undefined) {\n contents.LastModified = new Date(output.headers[\"last-modified\"]);\n }\n if (output.headers[\"content-length\"] !== undefined) {\n contents.ContentLength = parseInt(output.headers[\"content-length\"], 10);\n }\n if (output.headers[\"etag\"] !== undefined) {\n contents.ETag = output.headers[\"etag\"];\n }\n if (output.headers[\"x-amz-missing-meta\"] !== undefined) {\n contents.MissingMeta = parseInt(output.headers[\"x-amz-missing-meta\"], 10);\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"cache-control\"] !== undefined) {\n contents.CacheControl = output.headers[\"cache-control\"];\n }\n if (output.headers[\"content-disposition\"] !== undefined) {\n contents.ContentDisposition = output.headers[\"content-disposition\"];\n }\n if (output.headers[\"content-encoding\"] !== undefined) {\n contents.ContentEncoding = output.headers[\"content-encoding\"];\n }\n if (output.headers[\"content-language\"] !== undefined) {\n contents.ContentLanguage = output.headers[\"content-language\"];\n }\n if (output.headers[\"content-range\"] !== undefined) {\n contents.ContentRange = output.headers[\"content-range\"];\n }\n if (output.headers[\"content-type\"] !== undefined) {\n contents.ContentType = output.headers[\"content-type\"];\n }\n if (output.headers[\"expires\"] !== undefined) {\n contents.Expires = new Date(output.headers[\"expires\"]);\n }\n if (output.headers[\"x-amz-website-redirect-location\"] !== undefined) {\n contents.WebsiteRedirectLocation = output.headers[\"x-amz-website-redirect-location\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-storage-class\"] !== undefined) {\n contents.StorageClass = output.headers[\"x-amz-storage-class\"];\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n if (output.headers[\"x-amz-replication-status\"] !== undefined) {\n contents.ReplicationStatus = output.headers[\"x-amz-replication-status\"];\n }\n if (output.headers[\"x-amz-mp-parts-count\"] !== undefined) {\n contents.PartsCount = parseInt(output.headers[\"x-amz-mp-parts-count\"], 10);\n }\n if (output.headers[\"x-amz-tagging-count\"] !== undefined) {\n contents.TagCount = parseInt(output.headers[\"x-amz-tagging-count\"], 10);\n }\n if (output.headers[\"x-amz-object-lock-mode\"] !== undefined) {\n contents.ObjectLockMode = output.headers[\"x-amz-object-lock-mode\"];\n }\n if (output.headers[\"x-amz-object-lock-retain-until-date\"] !== undefined) {\n contents.ObjectLockRetainUntilDate = new Date(output.headers[\"x-amz-object-lock-retain-until-date\"]);\n }\n if (output.headers[\"x-amz-object-lock-legal-hold\"] !== undefined) {\n contents.ObjectLockLegalHoldStatus = output.headers[\"x-amz-object-lock-legal-hold\"];\n }\n Object.keys(output.headers).forEach((header) => {\n if (contents.Metadata === undefined) {\n contents.Metadata = {};\n }\n if (header.startsWith(\"x-amz-meta-\")) {\n contents.Metadata[header.substring(11)] = output.headers[header];\n }\n });\n const data: any = output.body;\n contents.Body = data;\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidObjectState\":\n case \"com.amazonaws.s3#InvalidObjectState\":\n response = {\n ...(await deserializeAws_restXmlInvalidObjectStateResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n case \"NoSuchKey\":\n case \"com.amazonaws.s3#NoSuchKey\":\n response = {\n ...(await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectAclCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectAclCommandError(output, context);\n }\n const contents: GetObjectAclCommandOutput = {\n $metadata: deserializeMetadata(output),\n Grants: undefined,\n Owner: undefined,\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data.AccessControlList === \"\") {\n contents.Grants = [];\n }\n if (data[\"AccessControlList\"] !== undefined && data[\"AccessControlList\"][\"Grant\"] !== undefined) {\n contents.Grants = deserializeAws_restXmlGrants(__getArrayIfSingleItem(data[\"AccessControlList\"][\"Grant\"]), context);\n }\n if (data[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(data[\"Owner\"], context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectAclCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchKey\":\n case \"com.amazonaws.s3#NoSuchKey\":\n response = {\n ...(await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectLegalHoldCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectLegalHoldCommandError(output, context);\n }\n const contents: GetObjectLegalHoldCommandOutput = {\n $metadata: deserializeMetadata(output),\n LegalHold: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.LegalHold = deserializeAws_restXmlObjectLockLegalHold(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectLegalHoldCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectLockConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectLockConfigurationCommandError(output, context);\n }\n const contents: GetObjectLockConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n ObjectLockConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.ObjectLockConfiguration = deserializeAws_restXmlObjectLockConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectLockConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectRetentionCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectRetentionCommandError(output, context);\n }\n const contents: GetObjectRetentionCommandOutput = {\n $metadata: deserializeMetadata(output),\n Retention: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.Retention = deserializeAws_restXmlObjectLockRetention(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectRetentionCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectTaggingCommandError(output, context);\n }\n const contents: GetObjectTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n TagSet: undefined,\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data.TagSet === \"\") {\n contents.TagSet = [];\n }\n if (data[\"TagSet\"] !== undefined && data[\"TagSet\"][\"Tag\"] !== undefined) {\n contents.TagSet = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(data[\"TagSet\"][\"Tag\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetObjectTorrentCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetObjectTorrentCommandError(output, context);\n }\n const contents: GetObjectTorrentCommandOutput = {\n $metadata: deserializeMetadata(output),\n Body: undefined,\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = output.body;\n contents.Body = data;\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetObjectTorrentCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlGetPublicAccessBlockCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlGetPublicAccessBlockCommandError(output, context);\n }\n const contents: GetPublicAccessBlockCommandOutput = {\n $metadata: deserializeMetadata(output),\n PublicAccessBlockConfiguration: undefined,\n };\n const data: any = await parseBody(output.body, context);\n contents.PublicAccessBlockConfiguration = deserializeAws_restXmlPublicAccessBlockConfiguration(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlGetPublicAccessBlockCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlHeadBucketCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlHeadBucketCommandError(output, context);\n }\n const contents: HeadBucketCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlHeadBucketCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchBucket\":\n case \"com.amazonaws.s3#NoSuchBucket\":\n response = {\n ...(await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlHeadObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlHeadObjectCommandError(output, context);\n }\n const contents: HeadObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n AcceptRanges: undefined,\n ArchiveStatus: undefined,\n BucketKeyEnabled: undefined,\n CacheControl: undefined,\n ContentDisposition: undefined,\n ContentEncoding: undefined,\n ContentLanguage: undefined,\n ContentLength: undefined,\n ContentType: undefined,\n DeleteMarker: undefined,\n ETag: undefined,\n Expiration: undefined,\n Expires: undefined,\n LastModified: undefined,\n Metadata: undefined,\n MissingMeta: undefined,\n ObjectLockLegalHoldStatus: undefined,\n ObjectLockMode: undefined,\n ObjectLockRetainUntilDate: undefined,\n PartsCount: undefined,\n ReplicationStatus: undefined,\n RequestCharged: undefined,\n Restore: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n StorageClass: undefined,\n VersionId: undefined,\n WebsiteRedirectLocation: undefined,\n };\n if (output.headers[\"x-amz-delete-marker\"] !== undefined) {\n contents.DeleteMarker = output.headers[\"x-amz-delete-marker\"] === \"true\";\n }\n if (output.headers[\"accept-ranges\"] !== undefined) {\n contents.AcceptRanges = output.headers[\"accept-ranges\"];\n }\n if (output.headers[\"x-amz-expiration\"] !== undefined) {\n contents.Expiration = output.headers[\"x-amz-expiration\"];\n }\n if (output.headers[\"x-amz-restore\"] !== undefined) {\n contents.Restore = output.headers[\"x-amz-restore\"];\n }\n if (output.headers[\"x-amz-archive-status\"] !== undefined) {\n contents.ArchiveStatus = output.headers[\"x-amz-archive-status\"];\n }\n if (output.headers[\"last-modified\"] !== undefined) {\n contents.LastModified = new Date(output.headers[\"last-modified\"]);\n }\n if (output.headers[\"content-length\"] !== undefined) {\n contents.ContentLength = parseInt(output.headers[\"content-length\"], 10);\n }\n if (output.headers[\"etag\"] !== undefined) {\n contents.ETag = output.headers[\"etag\"];\n }\n if (output.headers[\"x-amz-missing-meta\"] !== undefined) {\n contents.MissingMeta = parseInt(output.headers[\"x-amz-missing-meta\"], 10);\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"cache-control\"] !== undefined) {\n contents.CacheControl = output.headers[\"cache-control\"];\n }\n if (output.headers[\"content-disposition\"] !== undefined) {\n contents.ContentDisposition = output.headers[\"content-disposition\"];\n }\n if (output.headers[\"content-encoding\"] !== undefined) {\n contents.ContentEncoding = output.headers[\"content-encoding\"];\n }\n if (output.headers[\"content-language\"] !== undefined) {\n contents.ContentLanguage = output.headers[\"content-language\"];\n }\n if (output.headers[\"content-type\"] !== undefined) {\n contents.ContentType = output.headers[\"content-type\"];\n }\n if (output.headers[\"expires\"] !== undefined) {\n contents.Expires = new Date(output.headers[\"expires\"]);\n }\n if (output.headers[\"x-amz-website-redirect-location\"] !== undefined) {\n contents.WebsiteRedirectLocation = output.headers[\"x-amz-website-redirect-location\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-storage-class\"] !== undefined) {\n contents.StorageClass = output.headers[\"x-amz-storage-class\"];\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n if (output.headers[\"x-amz-replication-status\"] !== undefined) {\n contents.ReplicationStatus = output.headers[\"x-amz-replication-status\"];\n }\n if (output.headers[\"x-amz-mp-parts-count\"] !== undefined) {\n contents.PartsCount = parseInt(output.headers[\"x-amz-mp-parts-count\"], 10);\n }\n if (output.headers[\"x-amz-object-lock-mode\"] !== undefined) {\n contents.ObjectLockMode = output.headers[\"x-amz-object-lock-mode\"];\n }\n if (output.headers[\"x-amz-object-lock-retain-until-date\"] !== undefined) {\n contents.ObjectLockRetainUntilDate = new Date(output.headers[\"x-amz-object-lock-retain-until-date\"]);\n }\n if (output.headers[\"x-amz-object-lock-legal-hold\"] !== undefined) {\n contents.ObjectLockLegalHoldStatus = output.headers[\"x-amz-object-lock-legal-hold\"];\n }\n Object.keys(output.headers).forEach((header) => {\n if (contents.Metadata === undefined) {\n contents.Metadata = {};\n }\n if (header.startsWith(\"x-amz-meta-\")) {\n contents.Metadata[header.substring(11)] = output.headers[header];\n }\n });\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlHeadObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchKey\":\n case \"com.amazonaws.s3#NoSuchKey\":\n response = {\n ...(await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListBucketAnalyticsConfigurationsCommandError(output, context);\n }\n const contents: ListBucketAnalyticsConfigurationsCommandOutput = {\n $metadata: deserializeMetadata(output),\n AnalyticsConfigurationList: undefined,\n ContinuationToken: undefined,\n IsTruncated: undefined,\n NextContinuationToken: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.AnalyticsConfiguration === \"\") {\n contents.AnalyticsConfigurationList = [];\n }\n if (data[\"AnalyticsConfiguration\"] !== undefined) {\n contents.AnalyticsConfigurationList = deserializeAws_restXmlAnalyticsConfigurationList(\n __getArrayIfSingleItem(data[\"AnalyticsConfiguration\"]),\n context\n );\n }\n if (data[\"ContinuationToken\"] !== undefined) {\n contents.ContinuationToken = data[\"ContinuationToken\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"NextContinuationToken\"] !== undefined) {\n contents.NextContinuationToken = data[\"NextContinuationToken\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListBucketAnalyticsConfigurationsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommandError(output, context);\n }\n const contents: ListBucketIntelligentTieringConfigurationsCommandOutput = {\n $metadata: deserializeMetadata(output),\n ContinuationToken: undefined,\n IntelligentTieringConfigurationList: undefined,\n IsTruncated: undefined,\n NextContinuationToken: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"ContinuationToken\"] !== undefined) {\n contents.ContinuationToken = data[\"ContinuationToken\"];\n }\n if (data.IntelligentTieringConfiguration === \"\") {\n contents.IntelligentTieringConfigurationList = [];\n }\n if (data[\"IntelligentTieringConfiguration\"] !== undefined) {\n contents.IntelligentTieringConfigurationList = deserializeAws_restXmlIntelligentTieringConfigurationList(\n __getArrayIfSingleItem(data[\"IntelligentTieringConfiguration\"]),\n context\n );\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"NextContinuationToken\"] !== undefined) {\n contents.NextContinuationToken = data[\"NextContinuationToken\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListBucketInventoryConfigurationsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListBucketInventoryConfigurationsCommandError(output, context);\n }\n const contents: ListBucketInventoryConfigurationsCommandOutput = {\n $metadata: deserializeMetadata(output),\n ContinuationToken: undefined,\n InventoryConfigurationList: undefined,\n IsTruncated: undefined,\n NextContinuationToken: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"ContinuationToken\"] !== undefined) {\n contents.ContinuationToken = data[\"ContinuationToken\"];\n }\n if (data.InventoryConfiguration === \"\") {\n contents.InventoryConfigurationList = [];\n }\n if (data[\"InventoryConfiguration\"] !== undefined) {\n contents.InventoryConfigurationList = deserializeAws_restXmlInventoryConfigurationList(\n __getArrayIfSingleItem(data[\"InventoryConfiguration\"]),\n context\n );\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"NextContinuationToken\"] !== undefined) {\n contents.NextContinuationToken = data[\"NextContinuationToken\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListBucketInventoryConfigurationsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListBucketMetricsConfigurationsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListBucketMetricsConfigurationsCommandError(output, context);\n }\n const contents: ListBucketMetricsConfigurationsCommandOutput = {\n $metadata: deserializeMetadata(output),\n ContinuationToken: undefined,\n IsTruncated: undefined,\n MetricsConfigurationList: undefined,\n NextContinuationToken: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"ContinuationToken\"] !== undefined) {\n contents.ContinuationToken = data[\"ContinuationToken\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data.MetricsConfiguration === \"\") {\n contents.MetricsConfigurationList = [];\n }\n if (data[\"MetricsConfiguration\"] !== undefined) {\n contents.MetricsConfigurationList = deserializeAws_restXmlMetricsConfigurationList(\n __getArrayIfSingleItem(data[\"MetricsConfiguration\"]),\n context\n );\n }\n if (data[\"NextContinuationToken\"] !== undefined) {\n contents.NextContinuationToken = data[\"NextContinuationToken\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListBucketMetricsConfigurationsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListBucketsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListBucketsCommandError(output, context);\n }\n const contents: ListBucketsCommandOutput = {\n $metadata: deserializeMetadata(output),\n Buckets: undefined,\n Owner: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.Buckets === \"\") {\n contents.Buckets = [];\n }\n if (data[\"Buckets\"] !== undefined && data[\"Buckets\"][\"Bucket\"] !== undefined) {\n contents.Buckets = deserializeAws_restXmlBuckets(__getArrayIfSingleItem(data[\"Buckets\"][\"Bucket\"]), context);\n }\n if (data[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(data[\"Owner\"], context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListBucketsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListMultipartUploadsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListMultipartUploadsCommandError(output, context);\n }\n const contents: ListMultipartUploadsCommandOutput = {\n $metadata: deserializeMetadata(output),\n Bucket: undefined,\n CommonPrefixes: undefined,\n Delimiter: undefined,\n EncodingType: undefined,\n IsTruncated: undefined,\n KeyMarker: undefined,\n MaxUploads: undefined,\n NextKeyMarker: undefined,\n NextUploadIdMarker: undefined,\n Prefix: undefined,\n UploadIdMarker: undefined,\n Uploads: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data[\"Bucket\"] !== undefined) {\n contents.Bucket = data[\"Bucket\"];\n }\n if (data.CommonPrefixes === \"\") {\n contents.CommonPrefixes = [];\n }\n if (data[\"CommonPrefixes\"] !== undefined) {\n contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList(\n __getArrayIfSingleItem(data[\"CommonPrefixes\"]),\n context\n );\n }\n if (data[\"Delimiter\"] !== undefined) {\n contents.Delimiter = data[\"Delimiter\"];\n }\n if (data[\"EncodingType\"] !== undefined) {\n contents.EncodingType = data[\"EncodingType\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"KeyMarker\"] !== undefined) {\n contents.KeyMarker = data[\"KeyMarker\"];\n }\n if (data[\"MaxUploads\"] !== undefined) {\n contents.MaxUploads = parseInt(data[\"MaxUploads\"]);\n }\n if (data[\"NextKeyMarker\"] !== undefined) {\n contents.NextKeyMarker = data[\"NextKeyMarker\"];\n }\n if (data[\"NextUploadIdMarker\"] !== undefined) {\n contents.NextUploadIdMarker = data[\"NextUploadIdMarker\"];\n }\n if (data[\"Prefix\"] !== undefined) {\n contents.Prefix = data[\"Prefix\"];\n }\n if (data[\"UploadIdMarker\"] !== undefined) {\n contents.UploadIdMarker = data[\"UploadIdMarker\"];\n }\n if (data.Upload === \"\") {\n contents.Uploads = [];\n }\n if (data[\"Upload\"] !== undefined) {\n contents.Uploads = deserializeAws_restXmlMultipartUploadList(__getArrayIfSingleItem(data[\"Upload\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListMultipartUploadsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListObjectsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListObjectsCommandError(output, context);\n }\n const contents: ListObjectsCommandOutput = {\n $metadata: deserializeMetadata(output),\n CommonPrefixes: undefined,\n Contents: undefined,\n Delimiter: undefined,\n EncodingType: undefined,\n IsTruncated: undefined,\n Marker: undefined,\n MaxKeys: undefined,\n Name: undefined,\n NextMarker: undefined,\n Prefix: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.CommonPrefixes === \"\") {\n contents.CommonPrefixes = [];\n }\n if (data[\"CommonPrefixes\"] !== undefined) {\n contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList(\n __getArrayIfSingleItem(data[\"CommonPrefixes\"]),\n context\n );\n }\n if (data.Contents === \"\") {\n contents.Contents = [];\n }\n if (data[\"Contents\"] !== undefined) {\n contents.Contents = deserializeAws_restXmlObjectList(__getArrayIfSingleItem(data[\"Contents\"]), context);\n }\n if (data[\"Delimiter\"] !== undefined) {\n contents.Delimiter = data[\"Delimiter\"];\n }\n if (data[\"EncodingType\"] !== undefined) {\n contents.EncodingType = data[\"EncodingType\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"Marker\"] !== undefined) {\n contents.Marker = data[\"Marker\"];\n }\n if (data[\"MaxKeys\"] !== undefined) {\n contents.MaxKeys = parseInt(data[\"MaxKeys\"]);\n }\n if (data[\"Name\"] !== undefined) {\n contents.Name = data[\"Name\"];\n }\n if (data[\"NextMarker\"] !== undefined) {\n contents.NextMarker = data[\"NextMarker\"];\n }\n if (data[\"Prefix\"] !== undefined) {\n contents.Prefix = data[\"Prefix\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListObjectsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchBucket\":\n case \"com.amazonaws.s3#NoSuchBucket\":\n response = {\n ...(await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListObjectsV2Command = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListObjectsV2CommandError(output, context);\n }\n const contents: ListObjectsV2CommandOutput = {\n $metadata: deserializeMetadata(output),\n CommonPrefixes: undefined,\n Contents: undefined,\n ContinuationToken: undefined,\n Delimiter: undefined,\n EncodingType: undefined,\n IsTruncated: undefined,\n KeyCount: undefined,\n MaxKeys: undefined,\n Name: undefined,\n NextContinuationToken: undefined,\n Prefix: undefined,\n StartAfter: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.CommonPrefixes === \"\") {\n contents.CommonPrefixes = [];\n }\n if (data[\"CommonPrefixes\"] !== undefined) {\n contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList(\n __getArrayIfSingleItem(data[\"CommonPrefixes\"]),\n context\n );\n }\n if (data.Contents === \"\") {\n contents.Contents = [];\n }\n if (data[\"Contents\"] !== undefined) {\n contents.Contents = deserializeAws_restXmlObjectList(__getArrayIfSingleItem(data[\"Contents\"]), context);\n }\n if (data[\"ContinuationToken\"] !== undefined) {\n contents.ContinuationToken = data[\"ContinuationToken\"];\n }\n if (data[\"Delimiter\"] !== undefined) {\n contents.Delimiter = data[\"Delimiter\"];\n }\n if (data[\"EncodingType\"] !== undefined) {\n contents.EncodingType = data[\"EncodingType\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"KeyCount\"] !== undefined) {\n contents.KeyCount = parseInt(data[\"KeyCount\"]);\n }\n if (data[\"MaxKeys\"] !== undefined) {\n contents.MaxKeys = parseInt(data[\"MaxKeys\"]);\n }\n if (data[\"Name\"] !== undefined) {\n contents.Name = data[\"Name\"];\n }\n if (data[\"NextContinuationToken\"] !== undefined) {\n contents.NextContinuationToken = data[\"NextContinuationToken\"];\n }\n if (data[\"Prefix\"] !== undefined) {\n contents.Prefix = data[\"Prefix\"];\n }\n if (data[\"StartAfter\"] !== undefined) {\n contents.StartAfter = data[\"StartAfter\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListObjectsV2CommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchBucket\":\n case \"com.amazonaws.s3#NoSuchBucket\":\n response = {\n ...(await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListObjectVersionsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListObjectVersionsCommandError(output, context);\n }\n const contents: ListObjectVersionsCommandOutput = {\n $metadata: deserializeMetadata(output),\n CommonPrefixes: undefined,\n DeleteMarkers: undefined,\n Delimiter: undefined,\n EncodingType: undefined,\n IsTruncated: undefined,\n KeyMarker: undefined,\n MaxKeys: undefined,\n Name: undefined,\n NextKeyMarker: undefined,\n NextVersionIdMarker: undefined,\n Prefix: undefined,\n VersionIdMarker: undefined,\n Versions: undefined,\n };\n const data: any = await parseBody(output.body, context);\n if (data.CommonPrefixes === \"\") {\n contents.CommonPrefixes = [];\n }\n if (data[\"CommonPrefixes\"] !== undefined) {\n contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList(\n __getArrayIfSingleItem(data[\"CommonPrefixes\"]),\n context\n );\n }\n if (data.DeleteMarker === \"\") {\n contents.DeleteMarkers = [];\n }\n if (data[\"DeleteMarker\"] !== undefined) {\n contents.DeleteMarkers = deserializeAws_restXmlDeleteMarkers(__getArrayIfSingleItem(data[\"DeleteMarker\"]), context);\n }\n if (data[\"Delimiter\"] !== undefined) {\n contents.Delimiter = data[\"Delimiter\"];\n }\n if (data[\"EncodingType\"] !== undefined) {\n contents.EncodingType = data[\"EncodingType\"];\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"KeyMarker\"] !== undefined) {\n contents.KeyMarker = data[\"KeyMarker\"];\n }\n if (data[\"MaxKeys\"] !== undefined) {\n contents.MaxKeys = parseInt(data[\"MaxKeys\"]);\n }\n if (data[\"Name\"] !== undefined) {\n contents.Name = data[\"Name\"];\n }\n if (data[\"NextKeyMarker\"] !== undefined) {\n contents.NextKeyMarker = data[\"NextKeyMarker\"];\n }\n if (data[\"NextVersionIdMarker\"] !== undefined) {\n contents.NextVersionIdMarker = data[\"NextVersionIdMarker\"];\n }\n if (data[\"Prefix\"] !== undefined) {\n contents.Prefix = data[\"Prefix\"];\n }\n if (data[\"VersionIdMarker\"] !== undefined) {\n contents.VersionIdMarker = data[\"VersionIdMarker\"];\n }\n if (data.Version === \"\") {\n contents.Versions = [];\n }\n if (data[\"Version\"] !== undefined) {\n contents.Versions = deserializeAws_restXmlObjectVersionList(__getArrayIfSingleItem(data[\"Version\"]), context);\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListObjectVersionsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlListPartsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlListPartsCommandError(output, context);\n }\n const contents: ListPartsCommandOutput = {\n $metadata: deserializeMetadata(output),\n AbortDate: undefined,\n AbortRuleId: undefined,\n Bucket: undefined,\n Initiator: undefined,\n IsTruncated: undefined,\n Key: undefined,\n MaxParts: undefined,\n NextPartNumberMarker: undefined,\n Owner: undefined,\n PartNumberMarker: undefined,\n Parts: undefined,\n RequestCharged: undefined,\n StorageClass: undefined,\n UploadId: undefined,\n };\n if (output.headers[\"x-amz-abort-date\"] !== undefined) {\n contents.AbortDate = new Date(output.headers[\"x-amz-abort-date\"]);\n }\n if (output.headers[\"x-amz-abort-rule-id\"] !== undefined) {\n contents.AbortRuleId = output.headers[\"x-amz-abort-rule-id\"];\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n if (data[\"Bucket\"] !== undefined) {\n contents.Bucket = data[\"Bucket\"];\n }\n if (data[\"Initiator\"] !== undefined) {\n contents.Initiator = deserializeAws_restXmlInitiator(data[\"Initiator\"], context);\n }\n if (data[\"IsTruncated\"] !== undefined) {\n contents.IsTruncated = data[\"IsTruncated\"] == \"true\";\n }\n if (data[\"Key\"] !== undefined) {\n contents.Key = data[\"Key\"];\n }\n if (data[\"MaxParts\"] !== undefined) {\n contents.MaxParts = parseInt(data[\"MaxParts\"]);\n }\n if (data[\"NextPartNumberMarker\"] !== undefined) {\n contents.NextPartNumberMarker = data[\"NextPartNumberMarker\"];\n }\n if (data[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(data[\"Owner\"], context);\n }\n if (data[\"PartNumberMarker\"] !== undefined) {\n contents.PartNumberMarker = data[\"PartNumberMarker\"];\n }\n if (data.Part === \"\") {\n contents.Parts = [];\n }\n if (data[\"Part\"] !== undefined) {\n contents.Parts = deserializeAws_restXmlParts(__getArrayIfSingleItem(data[\"Part\"]), context);\n }\n if (data[\"StorageClass\"] !== undefined) {\n contents.StorageClass = data[\"StorageClass\"];\n }\n if (data[\"UploadId\"] !== undefined) {\n contents.UploadId = data[\"UploadId\"];\n }\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlListPartsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketAccelerateConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketAccelerateConfigurationCommandError(output, context);\n }\n const contents: PutBucketAccelerateConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketAccelerateConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketAclCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketAclCommandError(output, context);\n }\n const contents: PutBucketAclCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketAclCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketAnalyticsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketAnalyticsConfigurationCommandError(output, context);\n }\n const contents: PutBucketAnalyticsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketAnalyticsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketCorsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketCorsCommandError(output, context);\n }\n const contents: PutBucketCorsCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketCorsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketEncryptionCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketEncryptionCommandError(output, context);\n }\n const contents: PutBucketEncryptionCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketEncryptionCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommandError(output, context);\n }\n const contents: PutBucketIntelligentTieringConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketInventoryConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketInventoryConfigurationCommandError(output, context);\n }\n const contents: PutBucketInventoryConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketInventoryConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketLifecycleConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketLifecycleConfigurationCommandError(output, context);\n }\n const contents: PutBucketLifecycleConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketLifecycleConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketLoggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketLoggingCommandError(output, context);\n }\n const contents: PutBucketLoggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketLoggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketMetricsConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketMetricsConfigurationCommandError(output, context);\n }\n const contents: PutBucketMetricsConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketMetricsConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketNotificationConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketNotificationConfigurationCommandError(output, context);\n }\n const contents: PutBucketNotificationConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketNotificationConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketOwnershipControlsCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketOwnershipControlsCommandError(output, context);\n }\n const contents: PutBucketOwnershipControlsCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketOwnershipControlsCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketPolicyCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketPolicyCommandError(output, context);\n }\n const contents: PutBucketPolicyCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketPolicyCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketReplicationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketReplicationCommandError(output, context);\n }\n const contents: PutBucketReplicationCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketReplicationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketRequestPaymentCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketRequestPaymentCommandError(output, context);\n }\n const contents: PutBucketRequestPaymentCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketRequestPaymentCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketTaggingCommandError(output, context);\n }\n const contents: PutBucketTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketVersioningCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketVersioningCommandError(output, context);\n }\n const contents: PutBucketVersioningCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketVersioningCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutBucketWebsiteCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutBucketWebsiteCommandError(output, context);\n }\n const contents: PutBucketWebsiteCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutBucketWebsiteCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectCommandError(output, context);\n }\n const contents: PutObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n BucketKeyEnabled: undefined,\n ETag: undefined,\n Expiration: undefined,\n RequestCharged: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSEncryptionContext: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-expiration\"] !== undefined) {\n contents.Expiration = output.headers[\"x-amz-expiration\"];\n }\n if (output.headers[\"etag\"] !== undefined) {\n contents.ETag = output.headers[\"etag\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-context\"] !== undefined) {\n contents.SSEKMSEncryptionContext = output.headers[\"x-amz-server-side-encryption-context\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectAclCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectAclCommandError(output, context);\n }\n const contents: PutObjectAclCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectAclCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"NoSuchKey\":\n case \"com.amazonaws.s3#NoSuchKey\":\n response = {\n ...(await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectLegalHoldCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectLegalHoldCommandError(output, context);\n }\n const contents: PutObjectLegalHoldCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectLegalHoldCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectLockConfigurationCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectLockConfigurationCommandError(output, context);\n }\n const contents: PutObjectLockConfigurationCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectLockConfigurationCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectRetentionCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectRetentionCommandError(output, context);\n }\n const contents: PutObjectRetentionCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectRetentionCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutObjectTaggingCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutObjectTaggingCommandError(output, context);\n }\n const contents: PutObjectTaggingCommandOutput = {\n $metadata: deserializeMetadata(output),\n VersionId: undefined,\n };\n if (output.headers[\"x-amz-version-id\"] !== undefined) {\n contents.VersionId = output.headers[\"x-amz-version-id\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutObjectTaggingCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlPutPublicAccessBlockCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlPutPublicAccessBlockCommandError(output, context);\n }\n const contents: PutPublicAccessBlockCommandOutput = {\n $metadata: deserializeMetadata(output),\n };\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlPutPublicAccessBlockCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlRestoreObjectCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlRestoreObjectCommandError(output, context);\n }\n const contents: RestoreObjectCommandOutput = {\n $metadata: deserializeMetadata(output),\n RequestCharged: undefined,\n RestoreOutputPath: undefined,\n };\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n if (output.headers[\"x-amz-restore-output-path\"] !== undefined) {\n contents.RestoreOutputPath = output.headers[\"x-amz-restore-output-path\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlRestoreObjectCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ObjectAlreadyInActiveTierError\":\n case \"com.amazonaws.s3#ObjectAlreadyInActiveTierError\":\n response = {\n ...(await deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse(parsedOutput, context)),\n name: errorCode,\n $metadata: deserializeMetadata(output),\n };\n break;\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlSelectObjectContentCommand = async (\n output: __HttpResponse,\n context: __SerdeContext & __EventStreamSerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlSelectObjectContentCommandError(output, context);\n }\n const contents: SelectObjectContentCommandOutput = {\n $metadata: deserializeMetadata(output),\n Payload: undefined,\n };\n const data: any = context.eventStreamMarshaller.deserialize(output.body, async (event) => {\n const eventName = Object.keys(event)[0];\n const eventHeaders = Object.entries(event[eventName].headers).reduce((accummulator, curr) => {\n accummulator[curr[0]] = curr[1].value;\n return accummulator;\n }, {} as { [key: string]: any });\n const eventMessage = {\n headers: eventHeaders,\n body: event[eventName].body,\n };\n const parsedEvent = {\n [eventName]: eventMessage,\n };\n return await deserializeAws_restXmlSelectObjectContentEventStream_event(parsedEvent, context);\n });\n contents.Payload = data;\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlSelectObjectContentCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlUploadPartCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlUploadPartCommandError(output, context);\n }\n const contents: UploadPartCommandOutput = {\n $metadata: deserializeMetadata(output),\n BucketKeyEnabled: undefined,\n ETag: undefined,\n RequestCharged: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n };\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"etag\"] !== undefined) {\n contents.ETag = output.headers[\"etag\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n await collectBody(output.body, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlUploadPartCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nexport const deserializeAws_restXmlUploadPartCopyCommand = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return deserializeAws_restXmlUploadPartCopyCommandError(output, context);\n }\n const contents: UploadPartCopyCommandOutput = {\n $metadata: deserializeMetadata(output),\n BucketKeyEnabled: undefined,\n CopyPartResult: undefined,\n CopySourceVersionId: undefined,\n RequestCharged: undefined,\n SSECustomerAlgorithm: undefined,\n SSECustomerKeyMD5: undefined,\n SSEKMSKeyId: undefined,\n ServerSideEncryption: undefined,\n };\n if (output.headers[\"x-amz-copy-source-version-id\"] !== undefined) {\n contents.CopySourceVersionId = output.headers[\"x-amz-copy-source-version-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption\"] !== undefined) {\n contents.ServerSideEncryption = output.headers[\"x-amz-server-side-encryption\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-algorithm\"] !== undefined) {\n contents.SSECustomerAlgorithm = output.headers[\"x-amz-server-side-encryption-customer-algorithm\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-customer-key-md5\"] !== undefined) {\n contents.SSECustomerKeyMD5 = output.headers[\"x-amz-server-side-encryption-customer-key-md5\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"] !== undefined) {\n contents.SSEKMSKeyId = output.headers[\"x-amz-server-side-encryption-aws-kms-key-id\"];\n }\n if (output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] !== undefined) {\n contents.BucketKeyEnabled = output.headers[\"x-amz-server-side-encryption-bucket-key-enabled\"] === \"true\";\n }\n if (output.headers[\"x-amz-request-charged\"] !== undefined) {\n contents.RequestCharged = output.headers[\"x-amz-request-charged\"];\n }\n const data: any = await parseBody(output.body, context);\n contents.CopyPartResult = deserializeAws_restXmlCopyPartResult(data, context);\n return Promise.resolve(contents);\n};\n\nconst deserializeAws_restXmlUploadPartCopyCommandError = async (\n output: __HttpResponse,\n context: __SerdeContext\n): Promise => {\n const parsedOutput: any = {\n ...output,\n body: await parseBody(output.body, context),\n };\n let response: __SmithyException & __MetadataBearer & { [key: string]: any };\n let errorCode: string = \"UnknownError\";\n errorCode = loadRestXmlErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n default:\n const parsedBody = parsedOutput.body;\n errorCode = parsedBody.code || parsedBody.Code || errorCode;\n response = {\n ...parsedBody,\n name: `${errorCode}`,\n message: parsedBody.message || parsedBody.Message || errorCode,\n $fault: \"client\",\n $metadata: deserializeMetadata(output),\n } as any;\n }\n const message = response.message || response.Message || errorCode;\n response.message = message;\n delete response.Message;\n return Promise.reject(Object.assign(new Error(message), response));\n};\n\nconst deserializeAws_restXmlSelectObjectContentEventStream_event = async (\n output: any,\n context: __SerdeContext\n): Promise => {\n if (output[\"Records\"] !== undefined) {\n return {\n Records: await deserializeAws_restXmlRecordsEvent_event(output[\"Records\"], context),\n };\n }\n if (output[\"Stats\"] !== undefined) {\n return {\n Stats: await deserializeAws_restXmlStatsEvent_event(output[\"Stats\"], context),\n };\n }\n if (output[\"Progress\"] !== undefined) {\n return {\n Progress: await deserializeAws_restXmlProgressEvent_event(output[\"Progress\"], context),\n };\n }\n if (output[\"Cont\"] !== undefined) {\n return {\n Cont: await deserializeAws_restXmlContinuationEvent_event(output[\"Cont\"], context),\n };\n }\n if (output[\"End\"] !== undefined) {\n return {\n End: await deserializeAws_restXmlEndEvent_event(output[\"End\"], context),\n };\n }\n return { $unknown: output };\n};\nconst deserializeAws_restXmlContinuationEvent_event = async (\n output: any,\n context: __SerdeContext\n): Promise => {\n let contents: ContinuationEvent = {} as any;\n return contents;\n};\nconst deserializeAws_restXmlEndEvent_event = async (output: any, context: __SerdeContext): Promise => {\n let contents: EndEvent = {} as any;\n return contents;\n};\nconst deserializeAws_restXmlProgressEvent_event = async (\n output: any,\n context: __SerdeContext\n): Promise => {\n let contents: ProgressEvent = {} as any;\n contents.Details = await parseBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restXmlRecordsEvent_event = async (\n output: any,\n context: __SerdeContext\n): Promise => {\n let contents: RecordsEvent = {} as any;\n contents.Payload = output.body;\n return contents;\n};\nconst deserializeAws_restXmlStatsEvent_event = async (output: any, context: __SerdeContext): Promise => {\n let contents: StatsEvent = {} as any;\n contents.Details = await parseBody(output.body, context);\n return contents;\n};\nconst deserializeAws_restXmlBucketAlreadyExistsResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: BucketAlreadyExists = {\n name: \"BucketAlreadyExists\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlBucketAlreadyOwnedByYouResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: BucketAlreadyOwnedByYou = {\n name: \"BucketAlreadyOwnedByYou\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlInvalidObjectStateResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: InvalidObjectState = {\n name: \"InvalidObjectState\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n AccessTier: undefined,\n StorageClass: undefined,\n };\n const data: any = parsedOutput.body;\n if (data[\"AccessTier\"] !== undefined) {\n contents.AccessTier = data[\"AccessTier\"];\n }\n if (data[\"StorageClass\"] !== undefined) {\n contents.StorageClass = data[\"StorageClass\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlNoSuchBucketResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: NoSuchBucket = {\n name: \"NoSuchBucket\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlNoSuchKeyResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: NoSuchKey = {\n name: \"NoSuchKey\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlNoSuchUploadResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: NoSuchUpload = {\n name: \"NoSuchUpload\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: ObjectAlreadyInActiveTierError = {\n name: \"ObjectAlreadyInActiveTierError\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst deserializeAws_restXmlObjectNotInActiveTierErrorResponse = async (\n parsedOutput: any,\n context: __SerdeContext\n): Promise => {\n const contents: ObjectNotInActiveTierError = {\n name: \"ObjectNotInActiveTierError\",\n $fault: \"client\",\n $metadata: deserializeMetadata(parsedOutput),\n };\n const data: any = parsedOutput.body;\n return contents;\n};\n\nconst serializeAws_restXmlAbortIncompleteMultipartUpload = (\n input: AbortIncompleteMultipartUpload,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"AbortIncompleteMultipartUpload\");\n if (input.DaysAfterInitiation !== undefined && input.DaysAfterInitiation !== null) {\n const node = new __XmlNode(\"DaysAfterInitiation\")\n .addChildNode(new __XmlText(String(input.DaysAfterInitiation)))\n .withName(\"DaysAfterInitiation\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAccelerateConfiguration = (input: AccelerateConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"AccelerateConfiguration\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"BucketAccelerateStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAccessControlPolicy = (input: AccessControlPolicy, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"AccessControlPolicy\");\n if (input.Grants !== undefined && input.Grants !== null) {\n const nodes = serializeAws_restXmlGrants(input.Grants, context);\n const containerNode = new __XmlNode(\"AccessControlList\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n if (input.Owner !== undefined && input.Owner !== null) {\n const node = serializeAws_restXmlOwner(input.Owner, context).withName(\"Owner\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAccessControlTranslation = (\n input: AccessControlTranslation,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"AccessControlTranslation\");\n if (input.Owner !== undefined && input.Owner !== null) {\n const node = new __XmlNode(\"OwnerOverride\").addChildNode(new __XmlText(input.Owner)).withName(\"Owner\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAllowedHeaders = (input: string[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"AllowedHeader\").addChildNode(new __XmlText(entry));\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlAllowedMethods = (input: string[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"AllowedMethod\").addChildNode(new __XmlText(entry));\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlAllowedOrigins = (input: string[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"AllowedOrigin\").addChildNode(new __XmlText(entry));\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlAnalyticsAndOperator = (input: AnalyticsAndOperator, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"AnalyticsAndOperator\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const nodes = serializeAws_restXmlTagSet(input.Tags, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tag\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAnalyticsConfiguration = (input: AnalyticsConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"AnalyticsConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"AnalyticsId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlAnalyticsFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n if (input.StorageClassAnalysis !== undefined && input.StorageClassAnalysis !== null) {\n const node = serializeAws_restXmlStorageClassAnalysis(input.StorageClassAnalysis, context).withName(\n \"StorageClassAnalysis\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAnalyticsExportDestination = (\n input: AnalyticsExportDestination,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"AnalyticsExportDestination\");\n if (input.S3BucketDestination !== undefined && input.S3BucketDestination !== null) {\n const node = serializeAws_restXmlAnalyticsS3BucketDestination(input.S3BucketDestination, context).withName(\n \"S3BucketDestination\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlAnalyticsFilter = (input: AnalyticsFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"AnalyticsFilter\");\n AnalyticsFilter.visit(input, {\n Prefix: (value) => {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(value)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n },\n Tag: (value) => {\n const node = serializeAws_restXmlTag(value, context).withName(\"Tag\");\n bodyNode.addChildNode(node);\n },\n And: (value) => {\n const node = serializeAws_restXmlAnalyticsAndOperator(value, context).withName(\"And\");\n bodyNode.addChildNode(node);\n },\n _: (name: string, value: any) => {\n if (!(value instanceof __XmlNode || value instanceof __XmlText)) {\n throw new Error(\"Unable to serialize unknown union members in XML.\");\n }\n bodyNode.addChildNode(new __XmlNode(name).addChildNode(value));\n },\n });\n return bodyNode;\n};\n\nconst serializeAws_restXmlAnalyticsS3BucketDestination = (\n input: AnalyticsS3BucketDestination,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"AnalyticsS3BucketDestination\");\n if (input.Format !== undefined && input.Format !== null) {\n const node = new __XmlNode(\"AnalyticsS3ExportFileFormat\")\n .addChildNode(new __XmlText(input.Format))\n .withName(\"Format\");\n bodyNode.addChildNode(node);\n }\n if (input.BucketAccountId !== undefined && input.BucketAccountId !== null) {\n const node = new __XmlNode(\"AccountId\")\n .addChildNode(new __XmlText(input.BucketAccountId))\n .withName(\"BucketAccountId\");\n bodyNode.addChildNode(node);\n }\n if (input.Bucket !== undefined && input.Bucket !== null) {\n const node = new __XmlNode(\"BucketName\").addChildNode(new __XmlText(input.Bucket)).withName(\"Bucket\");\n bodyNode.addChildNode(node);\n }\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlBucketLifecycleConfiguration = (\n input: BucketLifecycleConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"BucketLifecycleConfiguration\");\n if (input.Rules !== undefined && input.Rules !== null) {\n const nodes = serializeAws_restXmlLifecycleRules(input.Rules, context);\n nodes.map((node: any) => {\n node = node.withName(\"Rule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlBucketLoggingStatus = (input: BucketLoggingStatus, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"BucketLoggingStatus\");\n if (input.LoggingEnabled !== undefined && input.LoggingEnabled !== null) {\n const node = serializeAws_restXmlLoggingEnabled(input.LoggingEnabled, context).withName(\"LoggingEnabled\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCompletedMultipartUpload = (\n input: CompletedMultipartUpload,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"CompletedMultipartUpload\");\n if (input.Parts !== undefined && input.Parts !== null) {\n const nodes = serializeAws_restXmlCompletedPartList(input.Parts, context);\n nodes.map((node: any) => {\n node = node.withName(\"Part\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCompletedPart = (input: CompletedPart, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"CompletedPart\");\n if (input.ETag !== undefined && input.ETag !== null) {\n const node = new __XmlNode(\"ETag\").addChildNode(new __XmlText(input.ETag)).withName(\"ETag\");\n bodyNode.addChildNode(node);\n }\n if (input.PartNumber !== undefined && input.PartNumber !== null) {\n const node = new __XmlNode(\"PartNumber\")\n .addChildNode(new __XmlText(String(input.PartNumber)))\n .withName(\"PartNumber\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCompletedPartList = (input: CompletedPart[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlCompletedPart(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlCondition = (input: Condition, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Condition\");\n if (input.HttpErrorCodeReturnedEquals !== undefined && input.HttpErrorCodeReturnedEquals !== null) {\n const node = new __XmlNode(\"HttpErrorCodeReturnedEquals\")\n .addChildNode(new __XmlText(input.HttpErrorCodeReturnedEquals))\n .withName(\"HttpErrorCodeReturnedEquals\");\n bodyNode.addChildNode(node);\n }\n if (input.KeyPrefixEquals !== undefined && input.KeyPrefixEquals !== null) {\n const node = new __XmlNode(\"KeyPrefixEquals\")\n .addChildNode(new __XmlText(input.KeyPrefixEquals))\n .withName(\"KeyPrefixEquals\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCORSConfiguration = (input: CORSConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"CORSConfiguration\");\n if (input.CORSRules !== undefined && input.CORSRules !== null) {\n const nodes = serializeAws_restXmlCORSRules(input.CORSRules, context);\n nodes.map((node: any) => {\n node = node.withName(\"CORSRule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCORSRule = (input: CORSRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"CORSRule\");\n if (input.AllowedHeaders !== undefined && input.AllowedHeaders !== null) {\n const nodes = serializeAws_restXmlAllowedHeaders(input.AllowedHeaders, context);\n nodes.map((node: any) => {\n node = node.withName(\"AllowedHeader\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.AllowedMethods !== undefined && input.AllowedMethods !== null) {\n const nodes = serializeAws_restXmlAllowedMethods(input.AllowedMethods, context);\n nodes.map((node: any) => {\n node = node.withName(\"AllowedMethod\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.AllowedOrigins !== undefined && input.AllowedOrigins !== null) {\n const nodes = serializeAws_restXmlAllowedOrigins(input.AllowedOrigins, context);\n nodes.map((node: any) => {\n node = node.withName(\"AllowedOrigin\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.ExposeHeaders !== undefined && input.ExposeHeaders !== null) {\n const nodes = serializeAws_restXmlExposeHeaders(input.ExposeHeaders, context);\n nodes.map((node: any) => {\n node = node.withName(\"ExposeHeader\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.MaxAgeSeconds !== undefined && input.MaxAgeSeconds !== null) {\n const node = new __XmlNode(\"MaxAgeSeconds\")\n .addChildNode(new __XmlText(String(input.MaxAgeSeconds)))\n .withName(\"MaxAgeSeconds\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCORSRules = (input: CORSRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlCORSRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlCreateBucketConfiguration = (\n input: CreateBucketConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"CreateBucketConfiguration\");\n if (input.LocationConstraint !== undefined && input.LocationConstraint !== null) {\n const node = new __XmlNode(\"BucketLocationConstraint\")\n .addChildNode(new __XmlText(input.LocationConstraint))\n .withName(\"LocationConstraint\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCSVInput = (input: CSVInput, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"CSVInput\");\n if (input.FileHeaderInfo !== undefined && input.FileHeaderInfo !== null) {\n const node = new __XmlNode(\"FileHeaderInfo\")\n .addChildNode(new __XmlText(input.FileHeaderInfo))\n .withName(\"FileHeaderInfo\");\n bodyNode.addChildNode(node);\n }\n if (input.Comments !== undefined && input.Comments !== null) {\n const node = new __XmlNode(\"Comments\").addChildNode(new __XmlText(input.Comments)).withName(\"Comments\");\n bodyNode.addChildNode(node);\n }\n if (input.QuoteEscapeCharacter !== undefined && input.QuoteEscapeCharacter !== null) {\n const node = new __XmlNode(\"QuoteEscapeCharacter\")\n .addChildNode(new __XmlText(input.QuoteEscapeCharacter))\n .withName(\"QuoteEscapeCharacter\");\n bodyNode.addChildNode(node);\n }\n if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {\n const node = new __XmlNode(\"RecordDelimiter\")\n .addChildNode(new __XmlText(input.RecordDelimiter))\n .withName(\"RecordDelimiter\");\n bodyNode.addChildNode(node);\n }\n if (input.FieldDelimiter !== undefined && input.FieldDelimiter !== null) {\n const node = new __XmlNode(\"FieldDelimiter\")\n .addChildNode(new __XmlText(input.FieldDelimiter))\n .withName(\"FieldDelimiter\");\n bodyNode.addChildNode(node);\n }\n if (input.QuoteCharacter !== undefined && input.QuoteCharacter !== null) {\n const node = new __XmlNode(\"QuoteCharacter\")\n .addChildNode(new __XmlText(input.QuoteCharacter))\n .withName(\"QuoteCharacter\");\n bodyNode.addChildNode(node);\n }\n if (input.AllowQuotedRecordDelimiter !== undefined && input.AllowQuotedRecordDelimiter !== null) {\n const node = new __XmlNode(\"AllowQuotedRecordDelimiter\")\n .addChildNode(new __XmlText(String(input.AllowQuotedRecordDelimiter)))\n .withName(\"AllowQuotedRecordDelimiter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlCSVOutput = (input: CSVOutput, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"CSVOutput\");\n if (input.QuoteFields !== undefined && input.QuoteFields !== null) {\n const node = new __XmlNode(\"QuoteFields\").addChildNode(new __XmlText(input.QuoteFields)).withName(\"QuoteFields\");\n bodyNode.addChildNode(node);\n }\n if (input.QuoteEscapeCharacter !== undefined && input.QuoteEscapeCharacter !== null) {\n const node = new __XmlNode(\"QuoteEscapeCharacter\")\n .addChildNode(new __XmlText(input.QuoteEscapeCharacter))\n .withName(\"QuoteEscapeCharacter\");\n bodyNode.addChildNode(node);\n }\n if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {\n const node = new __XmlNode(\"RecordDelimiter\")\n .addChildNode(new __XmlText(input.RecordDelimiter))\n .withName(\"RecordDelimiter\");\n bodyNode.addChildNode(node);\n }\n if (input.FieldDelimiter !== undefined && input.FieldDelimiter !== null) {\n const node = new __XmlNode(\"FieldDelimiter\")\n .addChildNode(new __XmlText(input.FieldDelimiter))\n .withName(\"FieldDelimiter\");\n bodyNode.addChildNode(node);\n }\n if (input.QuoteCharacter !== undefined && input.QuoteCharacter !== null) {\n const node = new __XmlNode(\"QuoteCharacter\")\n .addChildNode(new __XmlText(input.QuoteCharacter))\n .withName(\"QuoteCharacter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlDefaultRetention = (input: DefaultRetention, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"DefaultRetention\");\n if (input.Mode !== undefined && input.Mode !== null) {\n const node = new __XmlNode(\"ObjectLockRetentionMode\").addChildNode(new __XmlText(input.Mode)).withName(\"Mode\");\n bodyNode.addChildNode(node);\n }\n if (input.Days !== undefined && input.Days !== null) {\n const node = new __XmlNode(\"Days\").addChildNode(new __XmlText(String(input.Days))).withName(\"Days\");\n bodyNode.addChildNode(node);\n }\n if (input.Years !== undefined && input.Years !== null) {\n const node = new __XmlNode(\"Years\").addChildNode(new __XmlText(String(input.Years))).withName(\"Years\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlDelete = (input: Delete, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Delete\");\n if (input.Objects !== undefined && input.Objects !== null) {\n const nodes = serializeAws_restXmlObjectIdentifierList(input.Objects, context);\n nodes.map((node: any) => {\n node = node.withName(\"Object\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.Quiet !== undefined && input.Quiet !== null) {\n const node = new __XmlNode(\"Quiet\").addChildNode(new __XmlText(String(input.Quiet))).withName(\"Quiet\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlDeleteMarkerReplication = (input: DeleteMarkerReplication, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"DeleteMarkerReplication\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"DeleteMarkerReplicationStatus\")\n .addChildNode(new __XmlText(input.Status))\n .withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlDestination = (input: Destination, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Destination\");\n if (input.Bucket !== undefined && input.Bucket !== null) {\n const node = new __XmlNode(\"BucketName\").addChildNode(new __XmlText(input.Bucket)).withName(\"Bucket\");\n bodyNode.addChildNode(node);\n }\n if (input.Account !== undefined && input.Account !== null) {\n const node = new __XmlNode(\"AccountId\").addChildNode(new __XmlText(input.Account)).withName(\"Account\");\n bodyNode.addChildNode(node);\n }\n if (input.StorageClass !== undefined && input.StorageClass !== null) {\n const node = new __XmlNode(\"StorageClass\").addChildNode(new __XmlText(input.StorageClass)).withName(\"StorageClass\");\n bodyNode.addChildNode(node);\n }\n if (input.AccessControlTranslation !== undefined && input.AccessControlTranslation !== null) {\n const node = serializeAws_restXmlAccessControlTranslation(input.AccessControlTranslation, context).withName(\n \"AccessControlTranslation\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.EncryptionConfiguration !== undefined && input.EncryptionConfiguration !== null) {\n const node = serializeAws_restXmlEncryptionConfiguration(input.EncryptionConfiguration, context).withName(\n \"EncryptionConfiguration\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.ReplicationTime !== undefined && input.ReplicationTime !== null) {\n const node = serializeAws_restXmlReplicationTime(input.ReplicationTime, context).withName(\"ReplicationTime\");\n bodyNode.addChildNode(node);\n }\n if (input.Metrics !== undefined && input.Metrics !== null) {\n const node = serializeAws_restXmlMetrics(input.Metrics, context).withName(\"Metrics\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlEncryption = (input: Encryption, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Encryption\");\n if (input.EncryptionType !== undefined && input.EncryptionType !== null) {\n const node = new __XmlNode(\"ServerSideEncryption\")\n .addChildNode(new __XmlText(input.EncryptionType))\n .withName(\"EncryptionType\");\n bodyNode.addChildNode(node);\n }\n if (input.KMSKeyId !== undefined && input.KMSKeyId !== null) {\n const node = new __XmlNode(\"SSEKMSKeyId\").addChildNode(new __XmlText(input.KMSKeyId)).withName(\"KMSKeyId\");\n bodyNode.addChildNode(node);\n }\n if (input.KMSContext !== undefined && input.KMSContext !== null) {\n const node = new __XmlNode(\"KMSContext\").addChildNode(new __XmlText(input.KMSContext)).withName(\"KMSContext\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlEncryptionConfiguration = (input: EncryptionConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"EncryptionConfiguration\");\n if (input.ReplicaKmsKeyID !== undefined && input.ReplicaKmsKeyID !== null) {\n const node = new __XmlNode(\"ReplicaKmsKeyID\")\n .addChildNode(new __XmlText(input.ReplicaKmsKeyID))\n .withName(\"ReplicaKmsKeyID\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlErrorDocument = (input: ErrorDocument, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ErrorDocument\");\n if (input.Key !== undefined && input.Key !== null) {\n const node = new __XmlNode(\"ObjectKey\").addChildNode(new __XmlText(input.Key)).withName(\"Key\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlEventList = (input: (Event | string)[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"Event\").addChildNode(new __XmlText(entry));\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlExistingObjectReplication = (\n input: ExistingObjectReplication,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ExistingObjectReplication\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ExistingObjectReplicationStatus\")\n .addChildNode(new __XmlText(input.Status))\n .withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlExposeHeaders = (input: string[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"ExposeHeader\").addChildNode(new __XmlText(entry));\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlFilterRule = (input: FilterRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"FilterRule\");\n if (input.Name !== undefined && input.Name !== null) {\n const node = new __XmlNode(\"FilterRuleName\").addChildNode(new __XmlText(input.Name)).withName(\"Name\");\n bodyNode.addChildNode(node);\n }\n if (input.Value !== undefined && input.Value !== null) {\n const node = new __XmlNode(\"FilterRuleValue\").addChildNode(new __XmlText(input.Value)).withName(\"Value\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlFilterRuleList = (input: FilterRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlFilterRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlGlacierJobParameters = (input: GlacierJobParameters, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"GlacierJobParameters\");\n if (input.Tier !== undefined && input.Tier !== null) {\n const node = new __XmlNode(\"Tier\").addChildNode(new __XmlText(input.Tier)).withName(\"Tier\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlGrant = (input: Grant, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Grant\");\n if (input.Grantee !== undefined && input.Grantee !== null) {\n const node = serializeAws_restXmlGrantee(input.Grantee, context).withName(\"Grantee\");\n bodyNode.addChildNode(node);\n }\n if (input.Permission !== undefined && input.Permission !== null) {\n const node = new __XmlNode(\"Permission\").addChildNode(new __XmlText(input.Permission)).withName(\"Permission\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlGrantee = (input: Grantee, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Grantee\");\n if (input.DisplayName !== undefined && input.DisplayName !== null) {\n const node = new __XmlNode(\"DisplayName\").addChildNode(new __XmlText(input.DisplayName)).withName(\"DisplayName\");\n bodyNode.addChildNode(node);\n }\n if (input.EmailAddress !== undefined && input.EmailAddress !== null) {\n const node = new __XmlNode(\"EmailAddress\").addChildNode(new __XmlText(input.EmailAddress)).withName(\"EmailAddress\");\n bodyNode.addChildNode(node);\n }\n if (input.ID !== undefined && input.ID !== null) {\n const node = new __XmlNode(\"ID\").addChildNode(new __XmlText(input.ID)).withName(\"ID\");\n bodyNode.addChildNode(node);\n }\n if (input.URI !== undefined && input.URI !== null) {\n const node = new __XmlNode(\"URI\").addChildNode(new __XmlText(input.URI)).withName(\"URI\");\n bodyNode.addChildNode(node);\n }\n if (input.Type !== undefined && input.Type !== null) {\n bodyNode.addAttribute(\"xsi:type\", input.Type);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlGrants = (input: Grant[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlGrant(entry, context);\n return node.withName(\"Grant\");\n });\n};\n\nconst serializeAws_restXmlIndexDocument = (input: IndexDocument, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"IndexDocument\");\n if (input.Suffix !== undefined && input.Suffix !== null) {\n const node = new __XmlNode(\"Suffix\").addChildNode(new __XmlText(input.Suffix)).withName(\"Suffix\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInputSerialization = (input: InputSerialization, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InputSerialization\");\n if (input.CSV !== undefined && input.CSV !== null) {\n const node = serializeAws_restXmlCSVInput(input.CSV, context).withName(\"CSV\");\n bodyNode.addChildNode(node);\n }\n if (input.CompressionType !== undefined && input.CompressionType !== null) {\n const node = new __XmlNode(\"CompressionType\")\n .addChildNode(new __XmlText(input.CompressionType))\n .withName(\"CompressionType\");\n bodyNode.addChildNode(node);\n }\n if (input.JSON !== undefined && input.JSON !== null) {\n const node = serializeAws_restXmlJSONInput(input.JSON, context).withName(\"JSON\");\n bodyNode.addChildNode(node);\n }\n if (input.Parquet !== undefined && input.Parquet !== null) {\n const node = serializeAws_restXmlParquetInput(input.Parquet, context).withName(\"Parquet\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlIntelligentTieringAndOperator = (\n input: IntelligentTieringAndOperator,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"IntelligentTieringAndOperator\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const nodes = serializeAws_restXmlTagSet(input.Tags, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tag\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlIntelligentTieringConfiguration = (\n input: IntelligentTieringConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"IntelligentTieringConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"IntelligentTieringId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlIntelligentTieringFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"IntelligentTieringStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n if (input.Tierings !== undefined && input.Tierings !== null) {\n const nodes = serializeAws_restXmlTieringList(input.Tierings, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tiering\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlIntelligentTieringFilter = (\n input: IntelligentTieringFilter,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"IntelligentTieringFilter\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tag !== undefined && input.Tag !== null) {\n const node = serializeAws_restXmlTag(input.Tag, context).withName(\"Tag\");\n bodyNode.addChildNode(node);\n }\n if (input.And !== undefined && input.And !== null) {\n const node = serializeAws_restXmlIntelligentTieringAndOperator(input.And, context).withName(\"And\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventoryConfiguration = (input: InventoryConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InventoryConfiguration\");\n if (input.Destination !== undefined && input.Destination !== null) {\n const node = serializeAws_restXmlInventoryDestination(input.Destination, context).withName(\"Destination\");\n bodyNode.addChildNode(node);\n }\n if (input.IsEnabled !== undefined && input.IsEnabled !== null) {\n const node = new __XmlNode(\"IsEnabled\").addChildNode(new __XmlText(String(input.IsEnabled))).withName(\"IsEnabled\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlInventoryFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"InventoryId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.IncludedObjectVersions !== undefined && input.IncludedObjectVersions !== null) {\n const node = new __XmlNode(\"InventoryIncludedObjectVersions\")\n .addChildNode(new __XmlText(input.IncludedObjectVersions))\n .withName(\"IncludedObjectVersions\");\n bodyNode.addChildNode(node);\n }\n if (input.OptionalFields !== undefined && input.OptionalFields !== null) {\n const nodes = serializeAws_restXmlInventoryOptionalFields(input.OptionalFields, context);\n const containerNode = new __XmlNode(\"OptionalFields\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n if (input.Schedule !== undefined && input.Schedule !== null) {\n const node = serializeAws_restXmlInventorySchedule(input.Schedule, context).withName(\"Schedule\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventoryDestination = (input: InventoryDestination, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InventoryDestination\");\n if (input.S3BucketDestination !== undefined && input.S3BucketDestination !== null) {\n const node = serializeAws_restXmlInventoryS3BucketDestination(input.S3BucketDestination, context).withName(\n \"S3BucketDestination\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventoryEncryption = (input: InventoryEncryption, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InventoryEncryption\");\n if (input.SSES3 !== undefined && input.SSES3 !== null) {\n const node = serializeAws_restXmlSSES3(input.SSES3, context).withName(\"SSE-S3\");\n bodyNode.addChildNode(node);\n }\n if (input.SSEKMS !== undefined && input.SSEKMS !== null) {\n const node = serializeAws_restXmlSSEKMS(input.SSEKMS, context).withName(\"SSE-KMS\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventoryFilter = (input: InventoryFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InventoryFilter\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventoryOptionalFields = (\n input: (InventoryOptionalField | string)[],\n context: __SerdeContext\n): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = new __XmlNode(\"InventoryOptionalField\").addChildNode(new __XmlText(entry));\n return node.withName(\"Field\");\n });\n};\n\nconst serializeAws_restXmlInventoryS3BucketDestination = (\n input: InventoryS3BucketDestination,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"InventoryS3BucketDestination\");\n if (input.AccountId !== undefined && input.AccountId !== null) {\n const node = new __XmlNode(\"AccountId\").addChildNode(new __XmlText(input.AccountId)).withName(\"AccountId\");\n bodyNode.addChildNode(node);\n }\n if (input.Bucket !== undefined && input.Bucket !== null) {\n const node = new __XmlNode(\"BucketName\").addChildNode(new __XmlText(input.Bucket)).withName(\"Bucket\");\n bodyNode.addChildNode(node);\n }\n if (input.Format !== undefined && input.Format !== null) {\n const node = new __XmlNode(\"InventoryFormat\").addChildNode(new __XmlText(input.Format)).withName(\"Format\");\n bodyNode.addChildNode(node);\n }\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Encryption !== undefined && input.Encryption !== null) {\n const node = serializeAws_restXmlInventoryEncryption(input.Encryption, context).withName(\"Encryption\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlInventorySchedule = (input: InventorySchedule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"InventorySchedule\");\n if (input.Frequency !== undefined && input.Frequency !== null) {\n const node = new __XmlNode(\"InventoryFrequency\").addChildNode(new __XmlText(input.Frequency)).withName(\"Frequency\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlJSONInput = (input: JSONInput, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"JSONInput\");\n if (input.Type !== undefined && input.Type !== null) {\n const node = new __XmlNode(\"JSONType\").addChildNode(new __XmlText(input.Type)).withName(\"Type\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlJSONOutput = (input: JSONOutput, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"JSONOutput\");\n if (input.RecordDelimiter !== undefined && input.RecordDelimiter !== null) {\n const node = new __XmlNode(\"RecordDelimiter\")\n .addChildNode(new __XmlText(input.RecordDelimiter))\n .withName(\"RecordDelimiter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlLambdaFunctionConfiguration = (\n input: LambdaFunctionConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"LambdaFunctionConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"NotificationId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.LambdaFunctionArn !== undefined && input.LambdaFunctionArn !== null) {\n const node = new __XmlNode(\"LambdaFunctionArn\")\n .addChildNode(new __XmlText(input.LambdaFunctionArn))\n .withName(\"CloudFunction\");\n bodyNode.addChildNode(node);\n }\n if (input.Events !== undefined && input.Events !== null) {\n const nodes = serializeAws_restXmlEventList(input.Events, context);\n nodes.map((node: any) => {\n node = node.withName(\"Event\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlLambdaFunctionConfigurationList = (\n input: LambdaFunctionConfiguration[],\n context: __SerdeContext\n): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlLambdaFunctionConfiguration(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlLifecycleExpiration = (input: LifecycleExpiration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"LifecycleExpiration\");\n if (input.Date !== undefined && input.Date !== null) {\n const node = new __XmlNode(\"Date\")\n .addChildNode(new __XmlText(input.Date.toISOString().split(\".\")[0] + \"Z\"))\n .withName(\"Date\");\n bodyNode.addChildNode(node);\n }\n if (input.Days !== undefined && input.Days !== null) {\n const node = new __XmlNode(\"Days\").addChildNode(new __XmlText(String(input.Days))).withName(\"Days\");\n bodyNode.addChildNode(node);\n }\n if (input.ExpiredObjectDeleteMarker !== undefined && input.ExpiredObjectDeleteMarker !== null) {\n const node = new __XmlNode(\"ExpiredObjectDeleteMarker\")\n .addChildNode(new __XmlText(String(input.ExpiredObjectDeleteMarker)))\n .withName(\"ExpiredObjectDeleteMarker\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlLifecycleRule = (input: LifecycleRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"LifecycleRule\");\n if (input.Expiration !== undefined && input.Expiration !== null) {\n const node = serializeAws_restXmlLifecycleExpiration(input.Expiration, context).withName(\"Expiration\");\n bodyNode.addChildNode(node);\n }\n if (input.ID !== undefined && input.ID !== null) {\n const node = new __XmlNode(\"ID\").addChildNode(new __XmlText(input.ID)).withName(\"ID\");\n bodyNode.addChildNode(node);\n }\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlLifecycleRuleFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ExpirationStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n if (input.Transitions !== undefined && input.Transitions !== null) {\n const nodes = serializeAws_restXmlTransitionList(input.Transitions, context);\n nodes.map((node: any) => {\n node = node.withName(\"Transition\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.NoncurrentVersionTransitions !== undefined && input.NoncurrentVersionTransitions !== null) {\n const nodes = serializeAws_restXmlNoncurrentVersionTransitionList(input.NoncurrentVersionTransitions, context);\n nodes.map((node: any) => {\n node = node.withName(\"NoncurrentVersionTransition\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.NoncurrentVersionExpiration !== undefined && input.NoncurrentVersionExpiration !== null) {\n const node = serializeAws_restXmlNoncurrentVersionExpiration(input.NoncurrentVersionExpiration, context).withName(\n \"NoncurrentVersionExpiration\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.AbortIncompleteMultipartUpload !== undefined && input.AbortIncompleteMultipartUpload !== null) {\n const node = serializeAws_restXmlAbortIncompleteMultipartUpload(\n input.AbortIncompleteMultipartUpload,\n context\n ).withName(\"AbortIncompleteMultipartUpload\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlLifecycleRuleAndOperator = (\n input: LifecycleRuleAndOperator,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"LifecycleRuleAndOperator\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const nodes = serializeAws_restXmlTagSet(input.Tags, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tag\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlLifecycleRuleFilter = (input: LifecycleRuleFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"LifecycleRuleFilter\");\n LifecycleRuleFilter.visit(input, {\n Prefix: (value) => {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(value)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n },\n Tag: (value) => {\n const node = serializeAws_restXmlTag(value, context).withName(\"Tag\");\n bodyNode.addChildNode(node);\n },\n And: (value) => {\n const node = serializeAws_restXmlLifecycleRuleAndOperator(value, context).withName(\"And\");\n bodyNode.addChildNode(node);\n },\n _: (name: string, value: any) => {\n if (!(value instanceof __XmlNode || value instanceof __XmlText)) {\n throw new Error(\"Unable to serialize unknown union members in XML.\");\n }\n bodyNode.addChildNode(new __XmlNode(name).addChildNode(value));\n },\n });\n return bodyNode;\n};\n\nconst serializeAws_restXmlLifecycleRules = (input: LifecycleRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlLifecycleRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlLoggingEnabled = (input: LoggingEnabled, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"LoggingEnabled\");\n if (input.TargetBucket !== undefined && input.TargetBucket !== null) {\n const node = new __XmlNode(\"TargetBucket\").addChildNode(new __XmlText(input.TargetBucket)).withName(\"TargetBucket\");\n bodyNode.addChildNode(node);\n }\n if (input.TargetGrants !== undefined && input.TargetGrants !== null) {\n const nodes = serializeAws_restXmlTargetGrants(input.TargetGrants, context);\n const containerNode = new __XmlNode(\"TargetGrants\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n if (input.TargetPrefix !== undefined && input.TargetPrefix !== null) {\n const node = new __XmlNode(\"TargetPrefix\").addChildNode(new __XmlText(input.TargetPrefix)).withName(\"TargetPrefix\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlMetadataEntry = (input: MetadataEntry, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"MetadataEntry\");\n if (input.Name !== undefined && input.Name !== null) {\n const node = new __XmlNode(\"MetadataKey\").addChildNode(new __XmlText(input.Name)).withName(\"Name\");\n bodyNode.addChildNode(node);\n }\n if (input.Value !== undefined && input.Value !== null) {\n const node = new __XmlNode(\"MetadataValue\").addChildNode(new __XmlText(input.Value)).withName(\"Value\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlMetrics = (input: Metrics, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Metrics\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"MetricsStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n if (input.EventThreshold !== undefined && input.EventThreshold !== null) {\n const node = serializeAws_restXmlReplicationTimeValue(input.EventThreshold, context).withName(\"EventThreshold\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlMetricsAndOperator = (input: MetricsAndOperator, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"MetricsAndOperator\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const nodes = serializeAws_restXmlTagSet(input.Tags, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tag\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlMetricsConfiguration = (input: MetricsConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"MetricsConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"MetricsId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlMetricsFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlMetricsFilter = (input: MetricsFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"MetricsFilter\");\n MetricsFilter.visit(input, {\n Prefix: (value) => {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(value)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n },\n Tag: (value) => {\n const node = serializeAws_restXmlTag(value, context).withName(\"Tag\");\n bodyNode.addChildNode(node);\n },\n And: (value) => {\n const node = serializeAws_restXmlMetricsAndOperator(value, context).withName(\"And\");\n bodyNode.addChildNode(node);\n },\n _: (name: string, value: any) => {\n if (!(value instanceof __XmlNode || value instanceof __XmlText)) {\n throw new Error(\"Unable to serialize unknown union members in XML.\");\n }\n bodyNode.addChildNode(new __XmlNode(name).addChildNode(value));\n },\n });\n return bodyNode;\n};\n\nconst serializeAws_restXmlNoncurrentVersionExpiration = (\n input: NoncurrentVersionExpiration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"NoncurrentVersionExpiration\");\n if (input.NoncurrentDays !== undefined && input.NoncurrentDays !== null) {\n const node = new __XmlNode(\"Days\")\n .addChildNode(new __XmlText(String(input.NoncurrentDays)))\n .withName(\"NoncurrentDays\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlNoncurrentVersionTransition = (\n input: NoncurrentVersionTransition,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"NoncurrentVersionTransition\");\n if (input.NoncurrentDays !== undefined && input.NoncurrentDays !== null) {\n const node = new __XmlNode(\"Days\")\n .addChildNode(new __XmlText(String(input.NoncurrentDays)))\n .withName(\"NoncurrentDays\");\n bodyNode.addChildNode(node);\n }\n if (input.StorageClass !== undefined && input.StorageClass !== null) {\n const node = new __XmlNode(\"TransitionStorageClass\")\n .addChildNode(new __XmlText(input.StorageClass))\n .withName(\"StorageClass\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlNoncurrentVersionTransitionList = (\n input: NoncurrentVersionTransition[],\n context: __SerdeContext\n): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlNoncurrentVersionTransition(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlNotificationConfiguration = (\n input: NotificationConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"NotificationConfiguration\");\n if (input.TopicConfigurations !== undefined && input.TopicConfigurations !== null) {\n const nodes = serializeAws_restXmlTopicConfigurationList(input.TopicConfigurations, context);\n nodes.map((node: any) => {\n node = node.withName(\"TopicConfiguration\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.QueueConfigurations !== undefined && input.QueueConfigurations !== null) {\n const nodes = serializeAws_restXmlQueueConfigurationList(input.QueueConfigurations, context);\n nodes.map((node: any) => {\n node = node.withName(\"QueueConfiguration\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.LambdaFunctionConfigurations !== undefined && input.LambdaFunctionConfigurations !== null) {\n const nodes = serializeAws_restXmlLambdaFunctionConfigurationList(input.LambdaFunctionConfigurations, context);\n nodes.map((node: any) => {\n node = node.withName(\"CloudFunctionConfiguration\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlNotificationConfigurationFilter = (\n input: NotificationConfigurationFilter,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"NotificationConfigurationFilter\");\n if (input.Key !== undefined && input.Key !== null) {\n const node = serializeAws_restXmlS3KeyFilter(input.Key, context).withName(\"S3Key\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlObjectIdentifier = (input: ObjectIdentifier, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ObjectIdentifier\");\n if (input.Key !== undefined && input.Key !== null) {\n const node = new __XmlNode(\"ObjectKey\").addChildNode(new __XmlText(input.Key)).withName(\"Key\");\n bodyNode.addChildNode(node);\n }\n if (input.VersionId !== undefined && input.VersionId !== null) {\n const node = new __XmlNode(\"ObjectVersionId\").addChildNode(new __XmlText(input.VersionId)).withName(\"VersionId\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlObjectIdentifierList = (input: ObjectIdentifier[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlObjectIdentifier(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlObjectLockConfiguration = (input: ObjectLockConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ObjectLockConfiguration\");\n if (input.ObjectLockEnabled !== undefined && input.ObjectLockEnabled !== null) {\n const node = new __XmlNode(\"ObjectLockEnabled\")\n .addChildNode(new __XmlText(input.ObjectLockEnabled))\n .withName(\"ObjectLockEnabled\");\n bodyNode.addChildNode(node);\n }\n if (input.Rule !== undefined && input.Rule !== null) {\n const node = serializeAws_restXmlObjectLockRule(input.Rule, context).withName(\"Rule\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlObjectLockLegalHold = (input: ObjectLockLegalHold, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ObjectLockLegalHold\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ObjectLockLegalHoldStatus\")\n .addChildNode(new __XmlText(input.Status))\n .withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlObjectLockRetention = (input: ObjectLockRetention, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ObjectLockRetention\");\n if (input.Mode !== undefined && input.Mode !== null) {\n const node = new __XmlNode(\"ObjectLockRetentionMode\").addChildNode(new __XmlText(input.Mode)).withName(\"Mode\");\n bodyNode.addChildNode(node);\n }\n if (input.RetainUntilDate !== undefined && input.RetainUntilDate !== null) {\n const node = new __XmlNode(\"Date\")\n .addChildNode(new __XmlText(input.RetainUntilDate.toISOString().split(\".\")[0] + \"Z\"))\n .withName(\"RetainUntilDate\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlObjectLockRule = (input: ObjectLockRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ObjectLockRule\");\n if (input.DefaultRetention !== undefined && input.DefaultRetention !== null) {\n const node = serializeAws_restXmlDefaultRetention(input.DefaultRetention, context).withName(\"DefaultRetention\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOutputLocation = (input: OutputLocation, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"OutputLocation\");\n if (input.S3 !== undefined && input.S3 !== null) {\n const node = serializeAws_restXmlS3Location(input.S3, context).withName(\"S3\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOutputSerialization = (input: OutputSerialization, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"OutputSerialization\");\n if (input.CSV !== undefined && input.CSV !== null) {\n const node = serializeAws_restXmlCSVOutput(input.CSV, context).withName(\"CSV\");\n bodyNode.addChildNode(node);\n }\n if (input.JSON !== undefined && input.JSON !== null) {\n const node = serializeAws_restXmlJSONOutput(input.JSON, context).withName(\"JSON\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOwner = (input: Owner, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Owner\");\n if (input.DisplayName !== undefined && input.DisplayName !== null) {\n const node = new __XmlNode(\"DisplayName\").addChildNode(new __XmlText(input.DisplayName)).withName(\"DisplayName\");\n bodyNode.addChildNode(node);\n }\n if (input.ID !== undefined && input.ID !== null) {\n const node = new __XmlNode(\"ID\").addChildNode(new __XmlText(input.ID)).withName(\"ID\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOwnershipControls = (input: OwnershipControls, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"OwnershipControls\");\n if (input.Rules !== undefined && input.Rules !== null) {\n const nodes = serializeAws_restXmlOwnershipControlsRules(input.Rules, context);\n nodes.map((node: any) => {\n node = node.withName(\"Rule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOwnershipControlsRule = (input: OwnershipControlsRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"OwnershipControlsRule\");\n if (input.ObjectOwnership !== undefined && input.ObjectOwnership !== null) {\n const node = new __XmlNode(\"ObjectOwnership\")\n .addChildNode(new __XmlText(input.ObjectOwnership))\n .withName(\"ObjectOwnership\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlOwnershipControlsRules = (input: OwnershipControlsRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlOwnershipControlsRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlParquetInput = (input: ParquetInput, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ParquetInput\");\n return bodyNode;\n};\n\nconst serializeAws_restXmlPublicAccessBlockConfiguration = (\n input: PublicAccessBlockConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"PublicAccessBlockConfiguration\");\n if (input.BlockPublicAcls !== undefined && input.BlockPublicAcls !== null) {\n const node = new __XmlNode(\"Setting\")\n .addChildNode(new __XmlText(String(input.BlockPublicAcls)))\n .withName(\"BlockPublicAcls\");\n bodyNode.addChildNode(node);\n }\n if (input.IgnorePublicAcls !== undefined && input.IgnorePublicAcls !== null) {\n const node = new __XmlNode(\"Setting\")\n .addChildNode(new __XmlText(String(input.IgnorePublicAcls)))\n .withName(\"IgnorePublicAcls\");\n bodyNode.addChildNode(node);\n }\n if (input.BlockPublicPolicy !== undefined && input.BlockPublicPolicy !== null) {\n const node = new __XmlNode(\"Setting\")\n .addChildNode(new __XmlText(String(input.BlockPublicPolicy)))\n .withName(\"BlockPublicPolicy\");\n bodyNode.addChildNode(node);\n }\n if (input.RestrictPublicBuckets !== undefined && input.RestrictPublicBuckets !== null) {\n const node = new __XmlNode(\"Setting\")\n .addChildNode(new __XmlText(String(input.RestrictPublicBuckets)))\n .withName(\"RestrictPublicBuckets\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlQueueConfiguration = (input: QueueConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"QueueConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"NotificationId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.QueueArn !== undefined && input.QueueArn !== null) {\n const node = new __XmlNode(\"QueueArn\").addChildNode(new __XmlText(input.QueueArn)).withName(\"Queue\");\n bodyNode.addChildNode(node);\n }\n if (input.Events !== undefined && input.Events !== null) {\n const nodes = serializeAws_restXmlEventList(input.Events, context);\n nodes.map((node: any) => {\n node = node.withName(\"Event\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlQueueConfigurationList = (input: QueueConfiguration[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlQueueConfiguration(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlRedirect = (input: Redirect, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Redirect\");\n if (input.HostName !== undefined && input.HostName !== null) {\n const node = new __XmlNode(\"HostName\").addChildNode(new __XmlText(input.HostName)).withName(\"HostName\");\n bodyNode.addChildNode(node);\n }\n if (input.HttpRedirectCode !== undefined && input.HttpRedirectCode !== null) {\n const node = new __XmlNode(\"HttpRedirectCode\")\n .addChildNode(new __XmlText(input.HttpRedirectCode))\n .withName(\"HttpRedirectCode\");\n bodyNode.addChildNode(node);\n }\n if (input.Protocol !== undefined && input.Protocol !== null) {\n const node = new __XmlNode(\"Protocol\").addChildNode(new __XmlText(input.Protocol)).withName(\"Protocol\");\n bodyNode.addChildNode(node);\n }\n if (input.ReplaceKeyPrefixWith !== undefined && input.ReplaceKeyPrefixWith !== null) {\n const node = new __XmlNode(\"ReplaceKeyPrefixWith\")\n .addChildNode(new __XmlText(input.ReplaceKeyPrefixWith))\n .withName(\"ReplaceKeyPrefixWith\");\n bodyNode.addChildNode(node);\n }\n if (input.ReplaceKeyWith !== undefined && input.ReplaceKeyWith !== null) {\n const node = new __XmlNode(\"ReplaceKeyWith\")\n .addChildNode(new __XmlText(input.ReplaceKeyWith))\n .withName(\"ReplaceKeyWith\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRedirectAllRequestsTo = (input: RedirectAllRequestsTo, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"RedirectAllRequestsTo\");\n if (input.HostName !== undefined && input.HostName !== null) {\n const node = new __XmlNode(\"HostName\").addChildNode(new __XmlText(input.HostName)).withName(\"HostName\");\n bodyNode.addChildNode(node);\n }\n if (input.Protocol !== undefined && input.Protocol !== null) {\n const node = new __XmlNode(\"Protocol\").addChildNode(new __XmlText(input.Protocol)).withName(\"Protocol\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicaModifications = (input: ReplicaModifications, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ReplicaModifications\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ReplicaModificationsStatus\")\n .addChildNode(new __XmlText(input.Status))\n .withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationConfiguration = (\n input: ReplicationConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ReplicationConfiguration\");\n if (input.Role !== undefined && input.Role !== null) {\n const node = new __XmlNode(\"Role\").addChildNode(new __XmlText(input.Role)).withName(\"Role\");\n bodyNode.addChildNode(node);\n }\n if (input.Rules !== undefined && input.Rules !== null) {\n const nodes = serializeAws_restXmlReplicationRules(input.Rules, context);\n nodes.map((node: any) => {\n node = node.withName(\"Rule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationRule = (input: ReplicationRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ReplicationRule\");\n if (input.ID !== undefined && input.ID !== null) {\n const node = new __XmlNode(\"ID\").addChildNode(new __XmlText(input.ID)).withName(\"ID\");\n bodyNode.addChildNode(node);\n }\n if (input.Priority !== undefined && input.Priority !== null) {\n const node = new __XmlNode(\"Priority\").addChildNode(new __XmlText(String(input.Priority))).withName(\"Priority\");\n bodyNode.addChildNode(node);\n }\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlReplicationRuleFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ReplicationRuleStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n if (input.SourceSelectionCriteria !== undefined && input.SourceSelectionCriteria !== null) {\n const node = serializeAws_restXmlSourceSelectionCriteria(input.SourceSelectionCriteria, context).withName(\n \"SourceSelectionCriteria\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.ExistingObjectReplication !== undefined && input.ExistingObjectReplication !== null) {\n const node = serializeAws_restXmlExistingObjectReplication(input.ExistingObjectReplication, context).withName(\n \"ExistingObjectReplication\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.Destination !== undefined && input.Destination !== null) {\n const node = serializeAws_restXmlDestination(input.Destination, context).withName(\"Destination\");\n bodyNode.addChildNode(node);\n }\n if (input.DeleteMarkerReplication !== undefined && input.DeleteMarkerReplication !== null) {\n const node = serializeAws_restXmlDeleteMarkerReplication(input.DeleteMarkerReplication, context).withName(\n \"DeleteMarkerReplication\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationRuleAndOperator = (\n input: ReplicationRuleAndOperator,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ReplicationRuleAndOperator\");\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Tags !== undefined && input.Tags !== null) {\n const nodes = serializeAws_restXmlTagSet(input.Tags, context);\n nodes.map((node: any) => {\n node = node.withName(\"Tag\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationRuleFilter = (input: ReplicationRuleFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ReplicationRuleFilter\");\n ReplicationRuleFilter.visit(input, {\n Prefix: (value) => {\n const node = new __XmlNode(\"Prefix\").addChildNode(new __XmlText(value)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n },\n Tag: (value) => {\n const node = serializeAws_restXmlTag(value, context).withName(\"Tag\");\n bodyNode.addChildNode(node);\n },\n And: (value) => {\n const node = serializeAws_restXmlReplicationRuleAndOperator(value, context).withName(\"And\");\n bodyNode.addChildNode(node);\n },\n _: (name: string, value: any) => {\n if (!(value instanceof __XmlNode || value instanceof __XmlText)) {\n throw new Error(\"Unable to serialize unknown union members in XML.\");\n }\n bodyNode.addChildNode(new __XmlNode(name).addChildNode(value));\n },\n });\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationRules = (input: ReplicationRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlReplicationRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlReplicationTime = (input: ReplicationTime, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ReplicationTime\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"ReplicationTimeStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n if (input.Time !== undefined && input.Time !== null) {\n const node = serializeAws_restXmlReplicationTimeValue(input.Time, context).withName(\"Time\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlReplicationTimeValue = (input: ReplicationTimeValue, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ReplicationTimeValue\");\n if (input.Minutes !== undefined && input.Minutes !== null) {\n const node = new __XmlNode(\"Minutes\").addChildNode(new __XmlText(String(input.Minutes))).withName(\"Minutes\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRequestPaymentConfiguration = (\n input: RequestPaymentConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"RequestPaymentConfiguration\");\n if (input.Payer !== undefined && input.Payer !== null) {\n const node = new __XmlNode(\"Payer\").addChildNode(new __XmlText(input.Payer)).withName(\"Payer\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRequestProgress = (input: RequestProgress, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"RequestProgress\");\n if (input.Enabled !== undefined && input.Enabled !== null) {\n const node = new __XmlNode(\"EnableRequestProgress\")\n .addChildNode(new __XmlText(String(input.Enabled)))\n .withName(\"Enabled\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRestoreRequest = (input: RestoreRequest, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"RestoreRequest\");\n if (input.Days !== undefined && input.Days !== null) {\n const node = new __XmlNode(\"Days\").addChildNode(new __XmlText(String(input.Days))).withName(\"Days\");\n bodyNode.addChildNode(node);\n }\n if (input.GlacierJobParameters !== undefined && input.GlacierJobParameters !== null) {\n const node = serializeAws_restXmlGlacierJobParameters(input.GlacierJobParameters, context).withName(\n \"GlacierJobParameters\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.Type !== undefined && input.Type !== null) {\n const node = new __XmlNode(\"RestoreRequestType\").addChildNode(new __XmlText(input.Type)).withName(\"Type\");\n bodyNode.addChildNode(node);\n }\n if (input.Tier !== undefined && input.Tier !== null) {\n const node = new __XmlNode(\"Tier\").addChildNode(new __XmlText(input.Tier)).withName(\"Tier\");\n bodyNode.addChildNode(node);\n }\n if (input.Description !== undefined && input.Description !== null) {\n const node = new __XmlNode(\"Description\").addChildNode(new __XmlText(input.Description)).withName(\"Description\");\n bodyNode.addChildNode(node);\n }\n if (input.SelectParameters !== undefined && input.SelectParameters !== null) {\n const node = serializeAws_restXmlSelectParameters(input.SelectParameters, context).withName(\"SelectParameters\");\n bodyNode.addChildNode(node);\n }\n if (input.OutputLocation !== undefined && input.OutputLocation !== null) {\n const node = serializeAws_restXmlOutputLocation(input.OutputLocation, context).withName(\"OutputLocation\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRoutingRule = (input: RoutingRule, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"RoutingRule\");\n if (input.Condition !== undefined && input.Condition !== null) {\n const node = serializeAws_restXmlCondition(input.Condition, context).withName(\"Condition\");\n bodyNode.addChildNode(node);\n }\n if (input.Redirect !== undefined && input.Redirect !== null) {\n const node = serializeAws_restXmlRedirect(input.Redirect, context).withName(\"Redirect\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlRoutingRules = (input: RoutingRule[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlRoutingRule(entry, context);\n return node.withName(\"RoutingRule\");\n });\n};\n\nconst serializeAws_restXmlS3KeyFilter = (input: S3KeyFilter, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"S3KeyFilter\");\n if (input.FilterRules !== undefined && input.FilterRules !== null) {\n const nodes = serializeAws_restXmlFilterRuleList(input.FilterRules, context);\n nodes.map((node: any) => {\n node = node.withName(\"FilterRule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlS3Location = (input: S3Location, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"S3Location\");\n if (input.BucketName !== undefined && input.BucketName !== null) {\n const node = new __XmlNode(\"BucketName\").addChildNode(new __XmlText(input.BucketName)).withName(\"BucketName\");\n bodyNode.addChildNode(node);\n }\n if (input.Prefix !== undefined && input.Prefix !== null) {\n const node = new __XmlNode(\"LocationPrefix\").addChildNode(new __XmlText(input.Prefix)).withName(\"Prefix\");\n bodyNode.addChildNode(node);\n }\n if (input.Encryption !== undefined && input.Encryption !== null) {\n const node = serializeAws_restXmlEncryption(input.Encryption, context).withName(\"Encryption\");\n bodyNode.addChildNode(node);\n }\n if (input.CannedACL !== undefined && input.CannedACL !== null) {\n const node = new __XmlNode(\"ObjectCannedACL\").addChildNode(new __XmlText(input.CannedACL)).withName(\"CannedACL\");\n bodyNode.addChildNode(node);\n }\n if (input.AccessControlList !== undefined && input.AccessControlList !== null) {\n const nodes = serializeAws_restXmlGrants(input.AccessControlList, context);\n const containerNode = new __XmlNode(\"AccessControlList\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n if (input.Tagging !== undefined && input.Tagging !== null) {\n const node = serializeAws_restXmlTagging(input.Tagging, context).withName(\"Tagging\");\n bodyNode.addChildNode(node);\n }\n if (input.UserMetadata !== undefined && input.UserMetadata !== null) {\n const nodes = serializeAws_restXmlUserMetadata(input.UserMetadata, context);\n const containerNode = new __XmlNode(\"UserMetadata\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n if (input.StorageClass !== undefined && input.StorageClass !== null) {\n const node = new __XmlNode(\"StorageClass\").addChildNode(new __XmlText(input.StorageClass)).withName(\"StorageClass\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlScanRange = (input: ScanRange, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"ScanRange\");\n if (input.Start !== undefined && input.Start !== null) {\n const node = new __XmlNode(\"Start\").addChildNode(new __XmlText(String(input.Start))).withName(\"Start\");\n bodyNode.addChildNode(node);\n }\n if (input.End !== undefined && input.End !== null) {\n const node = new __XmlNode(\"End\").addChildNode(new __XmlText(String(input.End))).withName(\"End\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlSelectParameters = (input: SelectParameters, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"SelectParameters\");\n if (input.InputSerialization !== undefined && input.InputSerialization !== null) {\n const node = serializeAws_restXmlInputSerialization(input.InputSerialization, context).withName(\n \"InputSerialization\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.ExpressionType !== undefined && input.ExpressionType !== null) {\n const node = new __XmlNode(\"ExpressionType\")\n .addChildNode(new __XmlText(input.ExpressionType))\n .withName(\"ExpressionType\");\n bodyNode.addChildNode(node);\n }\n if (input.Expression !== undefined && input.Expression !== null) {\n const node = new __XmlNode(\"Expression\").addChildNode(new __XmlText(input.Expression)).withName(\"Expression\");\n bodyNode.addChildNode(node);\n }\n if (input.OutputSerialization !== undefined && input.OutputSerialization !== null) {\n const node = serializeAws_restXmlOutputSerialization(input.OutputSerialization, context).withName(\n \"OutputSerialization\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlServerSideEncryptionByDefault = (\n input: ServerSideEncryptionByDefault,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ServerSideEncryptionByDefault\");\n if (input.SSEAlgorithm !== undefined && input.SSEAlgorithm !== null) {\n const node = new __XmlNode(\"ServerSideEncryption\")\n .addChildNode(new __XmlText(input.SSEAlgorithm))\n .withName(\"SSEAlgorithm\");\n bodyNode.addChildNode(node);\n }\n if (input.KMSMasterKeyID !== undefined && input.KMSMasterKeyID !== null) {\n const node = new __XmlNode(\"SSEKMSKeyId\")\n .addChildNode(new __XmlText(input.KMSMasterKeyID))\n .withName(\"KMSMasterKeyID\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlServerSideEncryptionConfiguration = (\n input: ServerSideEncryptionConfiguration,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ServerSideEncryptionConfiguration\");\n if (input.Rules !== undefined && input.Rules !== null) {\n const nodes = serializeAws_restXmlServerSideEncryptionRules(input.Rules, context);\n nodes.map((node: any) => {\n node = node.withName(\"Rule\");\n bodyNode.addChildNode(node);\n });\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlServerSideEncryptionRule = (\n input: ServerSideEncryptionRule,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"ServerSideEncryptionRule\");\n if (input.ApplyServerSideEncryptionByDefault !== undefined && input.ApplyServerSideEncryptionByDefault !== null) {\n const node = serializeAws_restXmlServerSideEncryptionByDefault(\n input.ApplyServerSideEncryptionByDefault,\n context\n ).withName(\"ApplyServerSideEncryptionByDefault\");\n bodyNode.addChildNode(node);\n }\n if (input.BucketKeyEnabled !== undefined && input.BucketKeyEnabled !== null) {\n const node = new __XmlNode(\"BucketKeyEnabled\")\n .addChildNode(new __XmlText(String(input.BucketKeyEnabled)))\n .withName(\"BucketKeyEnabled\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlServerSideEncryptionRules = (\n input: ServerSideEncryptionRule[],\n context: __SerdeContext\n): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlServerSideEncryptionRule(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlSourceSelectionCriteria = (input: SourceSelectionCriteria, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"SourceSelectionCriteria\");\n if (input.SseKmsEncryptedObjects !== undefined && input.SseKmsEncryptedObjects !== null) {\n const node = serializeAws_restXmlSseKmsEncryptedObjects(input.SseKmsEncryptedObjects, context).withName(\n \"SseKmsEncryptedObjects\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.ReplicaModifications !== undefined && input.ReplicaModifications !== null) {\n const node = serializeAws_restXmlReplicaModifications(input.ReplicaModifications, context).withName(\n \"ReplicaModifications\"\n );\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlSSEKMS = (input: SSEKMS, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"SSE-KMS\");\n if (input.KeyId !== undefined && input.KeyId !== null) {\n const node = new __XmlNode(\"SSEKMSKeyId\").addChildNode(new __XmlText(input.KeyId)).withName(\"KeyId\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlSseKmsEncryptedObjects = (input: SseKmsEncryptedObjects, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"SseKmsEncryptedObjects\");\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"SseKmsEncryptedObjectsStatus\")\n .addChildNode(new __XmlText(input.Status))\n .withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlSSES3 = (input: SSES3, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"SSE-S3\");\n return bodyNode;\n};\n\nconst serializeAws_restXmlStorageClassAnalysis = (input: StorageClassAnalysis, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"StorageClassAnalysis\");\n if (input.DataExport !== undefined && input.DataExport !== null) {\n const node = serializeAws_restXmlStorageClassAnalysisDataExport(input.DataExport, context).withName(\"DataExport\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlStorageClassAnalysisDataExport = (\n input: StorageClassAnalysisDataExport,\n context: __SerdeContext\n): any => {\n const bodyNode = new __XmlNode(\"StorageClassAnalysisDataExport\");\n if (input.OutputSchemaVersion !== undefined && input.OutputSchemaVersion !== null) {\n const node = new __XmlNode(\"StorageClassAnalysisSchemaVersion\")\n .addChildNode(new __XmlText(input.OutputSchemaVersion))\n .withName(\"OutputSchemaVersion\");\n bodyNode.addChildNode(node);\n }\n if (input.Destination !== undefined && input.Destination !== null) {\n const node = serializeAws_restXmlAnalyticsExportDestination(input.Destination, context).withName(\"Destination\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTag = (input: Tag, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Tag\");\n if (input.Key !== undefined && input.Key !== null) {\n const node = new __XmlNode(\"ObjectKey\").addChildNode(new __XmlText(input.Key)).withName(\"Key\");\n bodyNode.addChildNode(node);\n }\n if (input.Value !== undefined && input.Value !== null) {\n const node = new __XmlNode(\"Value\").addChildNode(new __XmlText(input.Value)).withName(\"Value\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTagging = (input: Tagging, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Tagging\");\n if (input.TagSet !== undefined && input.TagSet !== null) {\n const nodes = serializeAws_restXmlTagSet(input.TagSet, context);\n const containerNode = new __XmlNode(\"TagSet\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTagSet = (input: Tag[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlTag(entry, context);\n return node.withName(\"Tag\");\n });\n};\n\nconst serializeAws_restXmlTargetGrant = (input: TargetGrant, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"TargetGrant\");\n if (input.Grantee !== undefined && input.Grantee !== null) {\n const node = serializeAws_restXmlGrantee(input.Grantee, context).withName(\"Grantee\");\n bodyNode.addChildNode(node);\n }\n if (input.Permission !== undefined && input.Permission !== null) {\n const node = new __XmlNode(\"BucketLogsPermission\")\n .addChildNode(new __XmlText(input.Permission))\n .withName(\"Permission\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTargetGrants = (input: TargetGrant[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlTargetGrant(entry, context);\n return node.withName(\"Grant\");\n });\n};\n\nconst serializeAws_restXmlTiering = (input: Tiering, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Tiering\");\n if (input.Days !== undefined && input.Days !== null) {\n const node = new __XmlNode(\"IntelligentTieringDays\")\n .addChildNode(new __XmlText(String(input.Days)))\n .withName(\"Days\");\n bodyNode.addChildNode(node);\n }\n if (input.AccessTier !== undefined && input.AccessTier !== null) {\n const node = new __XmlNode(\"IntelligentTieringAccessTier\")\n .addChildNode(new __XmlText(input.AccessTier))\n .withName(\"AccessTier\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTieringList = (input: Tiering[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlTiering(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlTopicConfiguration = (input: TopicConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"TopicConfiguration\");\n if (input.Id !== undefined && input.Id !== null) {\n const node = new __XmlNode(\"NotificationId\").addChildNode(new __XmlText(input.Id)).withName(\"Id\");\n bodyNode.addChildNode(node);\n }\n if (input.TopicArn !== undefined && input.TopicArn !== null) {\n const node = new __XmlNode(\"TopicArn\").addChildNode(new __XmlText(input.TopicArn)).withName(\"Topic\");\n bodyNode.addChildNode(node);\n }\n if (input.Events !== undefined && input.Events !== null) {\n const nodes = serializeAws_restXmlEventList(input.Events, context);\n nodes.map((node: any) => {\n node = node.withName(\"Event\");\n bodyNode.addChildNode(node);\n });\n }\n if (input.Filter !== undefined && input.Filter !== null) {\n const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName(\"Filter\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTopicConfigurationList = (input: TopicConfiguration[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlTopicConfiguration(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlTransition = (input: Transition, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"Transition\");\n if (input.Date !== undefined && input.Date !== null) {\n const node = new __XmlNode(\"Date\")\n .addChildNode(new __XmlText(input.Date.toISOString().split(\".\")[0] + \"Z\"))\n .withName(\"Date\");\n bodyNode.addChildNode(node);\n }\n if (input.Days !== undefined && input.Days !== null) {\n const node = new __XmlNode(\"Days\").addChildNode(new __XmlText(String(input.Days))).withName(\"Days\");\n bodyNode.addChildNode(node);\n }\n if (input.StorageClass !== undefined && input.StorageClass !== null) {\n const node = new __XmlNode(\"TransitionStorageClass\")\n .addChildNode(new __XmlText(input.StorageClass))\n .withName(\"StorageClass\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlTransitionList = (input: Transition[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlTransition(entry, context);\n return node.withName(\"member\");\n });\n};\n\nconst serializeAws_restXmlUserMetadata = (input: MetadataEntry[], context: __SerdeContext): any => {\n return input\n .filter((e: any) => e != null)\n .map((entry) => {\n if (entry === null) {\n return null as any;\n }\n const node = serializeAws_restXmlMetadataEntry(entry, context);\n return node.withName(\"MetadataEntry\");\n });\n};\n\nconst serializeAws_restXmlVersioningConfiguration = (input: VersioningConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"VersioningConfiguration\");\n if (input.MFADelete !== undefined && input.MFADelete !== null) {\n const node = new __XmlNode(\"MFADelete\").addChildNode(new __XmlText(input.MFADelete)).withName(\"MfaDelete\");\n bodyNode.addChildNode(node);\n }\n if (input.Status !== undefined && input.Status !== null) {\n const node = new __XmlNode(\"BucketVersioningStatus\").addChildNode(new __XmlText(input.Status)).withName(\"Status\");\n bodyNode.addChildNode(node);\n }\n return bodyNode;\n};\n\nconst serializeAws_restXmlWebsiteConfiguration = (input: WebsiteConfiguration, context: __SerdeContext): any => {\n const bodyNode = new __XmlNode(\"WebsiteConfiguration\");\n if (input.ErrorDocument !== undefined && input.ErrorDocument !== null) {\n const node = serializeAws_restXmlErrorDocument(input.ErrorDocument, context).withName(\"ErrorDocument\");\n bodyNode.addChildNode(node);\n }\n if (input.IndexDocument !== undefined && input.IndexDocument !== null) {\n const node = serializeAws_restXmlIndexDocument(input.IndexDocument, context).withName(\"IndexDocument\");\n bodyNode.addChildNode(node);\n }\n if (input.RedirectAllRequestsTo !== undefined && input.RedirectAllRequestsTo !== null) {\n const node = serializeAws_restXmlRedirectAllRequestsTo(input.RedirectAllRequestsTo, context).withName(\n \"RedirectAllRequestsTo\"\n );\n bodyNode.addChildNode(node);\n }\n if (input.RoutingRules !== undefined && input.RoutingRules !== null) {\n const nodes = serializeAws_restXmlRoutingRules(input.RoutingRules, context);\n const containerNode = new __XmlNode(\"RoutingRules\");\n nodes.map((node: any) => {\n containerNode.addChildNode(node);\n });\n bodyNode.addChildNode(containerNode);\n }\n return bodyNode;\n};\n\nconst deserializeAws_restXmlAbortIncompleteMultipartUpload = (\n output: any,\n context: __SerdeContext\n): AbortIncompleteMultipartUpload => {\n let contents: any = {\n DaysAfterInitiation: undefined,\n };\n if (output[\"DaysAfterInitiation\"] !== undefined) {\n contents.DaysAfterInitiation = parseInt(output[\"DaysAfterInitiation\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlAccessControlTranslation = (\n output: any,\n context: __SerdeContext\n): AccessControlTranslation => {\n let contents: any = {\n Owner: undefined,\n };\n if (output[\"Owner\"] !== undefined) {\n contents.Owner = output[\"Owner\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlAllowedHeaders = (output: any, context: __SerdeContext): string[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlAllowedMethods = (output: any, context: __SerdeContext): string[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlAllowedOrigins = (output: any, context: __SerdeContext): string[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlAnalyticsAndOperator = (output: any, context: __SerdeContext): AnalyticsAndOperator => {\n let contents: any = {\n Prefix: undefined,\n Tags: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output.Tag === \"\") {\n contents.Tags = [];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tags = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(output[\"Tag\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlAnalyticsConfiguration = (output: any, context: __SerdeContext): AnalyticsConfiguration => {\n let contents: any = {\n Id: undefined,\n Filter: undefined,\n StorageClassAnalysis: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlAnalyticsFilter(output[\"Filter\"], context);\n }\n if (output[\"StorageClassAnalysis\"] !== undefined) {\n contents.StorageClassAnalysis = deserializeAws_restXmlStorageClassAnalysis(output[\"StorageClassAnalysis\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlAnalyticsConfigurationList = (\n output: any,\n context: __SerdeContext\n): AnalyticsConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlAnalyticsConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlAnalyticsExportDestination = (\n output: any,\n context: __SerdeContext\n): AnalyticsExportDestination => {\n let contents: any = {\n S3BucketDestination: undefined,\n };\n if (output[\"S3BucketDestination\"] !== undefined) {\n contents.S3BucketDestination = deserializeAws_restXmlAnalyticsS3BucketDestination(\n output[\"S3BucketDestination\"],\n context\n );\n }\n return contents;\n};\n\nconst deserializeAws_restXmlAnalyticsFilter = (output: any, context: __SerdeContext): AnalyticsFilter => {\n if (output[\"Prefix\"] !== undefined) {\n return {\n Prefix: output[\"Prefix\"],\n };\n }\n if (output[\"Tag\"] !== undefined) {\n return {\n Tag: deserializeAws_restXmlTag(output[\"Tag\"], context),\n };\n }\n if (output[\"And\"] !== undefined) {\n return {\n And: deserializeAws_restXmlAnalyticsAndOperator(output[\"And\"], context),\n };\n }\n return { $unknown: Object.entries(output)[0] };\n};\n\nconst deserializeAws_restXmlAnalyticsS3BucketDestination = (\n output: any,\n context: __SerdeContext\n): AnalyticsS3BucketDestination => {\n let contents: any = {\n Format: undefined,\n BucketAccountId: undefined,\n Bucket: undefined,\n Prefix: undefined,\n };\n if (output[\"Format\"] !== undefined) {\n contents.Format = output[\"Format\"];\n }\n if (output[\"BucketAccountId\"] !== undefined) {\n contents.BucketAccountId = output[\"BucketAccountId\"];\n }\n if (output[\"Bucket\"] !== undefined) {\n contents.Bucket = output[\"Bucket\"];\n }\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlBucket = (output: any, context: __SerdeContext): Bucket => {\n let contents: any = {\n Name: undefined,\n CreationDate: undefined,\n };\n if (output[\"Name\"] !== undefined) {\n contents.Name = output[\"Name\"];\n }\n if (output[\"CreationDate\"] !== undefined) {\n contents.CreationDate = new Date(output[\"CreationDate\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlBuckets = (output: any, context: __SerdeContext): Bucket[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlBucket(entry, context);\n });\n};\n\nconst deserializeAws_restXmlCommonPrefix = (output: any, context: __SerdeContext): CommonPrefix => {\n let contents: any = {\n Prefix: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlCommonPrefixList = (output: any, context: __SerdeContext): CommonPrefix[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlCommonPrefix(entry, context);\n });\n};\n\nconst deserializeAws_restXmlCondition = (output: any, context: __SerdeContext): Condition => {\n let contents: any = {\n HttpErrorCodeReturnedEquals: undefined,\n KeyPrefixEquals: undefined,\n };\n if (output[\"HttpErrorCodeReturnedEquals\"] !== undefined) {\n contents.HttpErrorCodeReturnedEquals = output[\"HttpErrorCodeReturnedEquals\"];\n }\n if (output[\"KeyPrefixEquals\"] !== undefined) {\n contents.KeyPrefixEquals = output[\"KeyPrefixEquals\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlCopyObjectResult = (output: any, context: __SerdeContext): CopyObjectResult => {\n let contents: any = {\n ETag: undefined,\n LastModified: undefined,\n };\n if (output[\"ETag\"] !== undefined) {\n contents.ETag = output[\"ETag\"];\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlCopyPartResult = (output: any, context: __SerdeContext): CopyPartResult => {\n let contents: any = {\n ETag: undefined,\n LastModified: undefined,\n };\n if (output[\"ETag\"] !== undefined) {\n contents.ETag = output[\"ETag\"];\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlCORSRule = (output: any, context: __SerdeContext): CORSRule => {\n let contents: any = {\n AllowedHeaders: undefined,\n AllowedMethods: undefined,\n AllowedOrigins: undefined,\n ExposeHeaders: undefined,\n MaxAgeSeconds: undefined,\n };\n if (output.AllowedHeader === \"\") {\n contents.AllowedHeaders = [];\n }\n if (output[\"AllowedHeader\"] !== undefined) {\n contents.AllowedHeaders = deserializeAws_restXmlAllowedHeaders(\n __getArrayIfSingleItem(output[\"AllowedHeader\"]),\n context\n );\n }\n if (output.AllowedMethod === \"\") {\n contents.AllowedMethods = [];\n }\n if (output[\"AllowedMethod\"] !== undefined) {\n contents.AllowedMethods = deserializeAws_restXmlAllowedMethods(\n __getArrayIfSingleItem(output[\"AllowedMethod\"]),\n context\n );\n }\n if (output.AllowedOrigin === \"\") {\n contents.AllowedOrigins = [];\n }\n if (output[\"AllowedOrigin\"] !== undefined) {\n contents.AllowedOrigins = deserializeAws_restXmlAllowedOrigins(\n __getArrayIfSingleItem(output[\"AllowedOrigin\"]),\n context\n );\n }\n if (output.ExposeHeader === \"\") {\n contents.ExposeHeaders = [];\n }\n if (output[\"ExposeHeader\"] !== undefined) {\n contents.ExposeHeaders = deserializeAws_restXmlExposeHeaders(\n __getArrayIfSingleItem(output[\"ExposeHeader\"]),\n context\n );\n }\n if (output[\"MaxAgeSeconds\"] !== undefined) {\n contents.MaxAgeSeconds = parseInt(output[\"MaxAgeSeconds\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlCORSRules = (output: any, context: __SerdeContext): CORSRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlCORSRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlDefaultRetention = (output: any, context: __SerdeContext): DefaultRetention => {\n let contents: any = {\n Mode: undefined,\n Days: undefined,\n Years: undefined,\n };\n if (output[\"Mode\"] !== undefined) {\n contents.Mode = output[\"Mode\"];\n }\n if (output[\"Days\"] !== undefined) {\n contents.Days = parseInt(output[\"Days\"]);\n }\n if (output[\"Years\"] !== undefined) {\n contents.Years = parseInt(output[\"Years\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlDeletedObject = (output: any, context: __SerdeContext): DeletedObject => {\n let contents: any = {\n Key: undefined,\n VersionId: undefined,\n DeleteMarker: undefined,\n DeleteMarkerVersionId: undefined,\n };\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"VersionId\"] !== undefined) {\n contents.VersionId = output[\"VersionId\"];\n }\n if (output[\"DeleteMarker\"] !== undefined) {\n contents.DeleteMarker = output[\"DeleteMarker\"] == \"true\";\n }\n if (output[\"DeleteMarkerVersionId\"] !== undefined) {\n contents.DeleteMarkerVersionId = output[\"DeleteMarkerVersionId\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlDeletedObjects = (output: any, context: __SerdeContext): DeletedObject[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlDeletedObject(entry, context);\n });\n};\n\nconst deserializeAws_restXmlDeleteMarkerEntry = (output: any, context: __SerdeContext): DeleteMarkerEntry => {\n let contents: any = {\n Owner: undefined,\n Key: undefined,\n VersionId: undefined,\n IsLatest: undefined,\n LastModified: undefined,\n };\n if (output[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(output[\"Owner\"], context);\n }\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"VersionId\"] !== undefined) {\n contents.VersionId = output[\"VersionId\"];\n }\n if (output[\"IsLatest\"] !== undefined) {\n contents.IsLatest = output[\"IsLatest\"] == \"true\";\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlDeleteMarkerReplication = (\n output: any,\n context: __SerdeContext\n): DeleteMarkerReplication => {\n let contents: any = {\n Status: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlDeleteMarkers = (output: any, context: __SerdeContext): DeleteMarkerEntry[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlDeleteMarkerEntry(entry, context);\n });\n};\n\nconst deserializeAws_restXmlDestination = (output: any, context: __SerdeContext): Destination => {\n let contents: any = {\n Bucket: undefined,\n Account: undefined,\n StorageClass: undefined,\n AccessControlTranslation: undefined,\n EncryptionConfiguration: undefined,\n ReplicationTime: undefined,\n Metrics: undefined,\n };\n if (output[\"Bucket\"] !== undefined) {\n contents.Bucket = output[\"Bucket\"];\n }\n if (output[\"Account\"] !== undefined) {\n contents.Account = output[\"Account\"];\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n if (output[\"AccessControlTranslation\"] !== undefined) {\n contents.AccessControlTranslation = deserializeAws_restXmlAccessControlTranslation(\n output[\"AccessControlTranslation\"],\n context\n );\n }\n if (output[\"EncryptionConfiguration\"] !== undefined) {\n contents.EncryptionConfiguration = deserializeAws_restXmlEncryptionConfiguration(\n output[\"EncryptionConfiguration\"],\n context\n );\n }\n if (output[\"ReplicationTime\"] !== undefined) {\n contents.ReplicationTime = deserializeAws_restXmlReplicationTime(output[\"ReplicationTime\"], context);\n }\n if (output[\"Metrics\"] !== undefined) {\n contents.Metrics = deserializeAws_restXmlMetrics(output[\"Metrics\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlEncryptionConfiguration = (\n output: any,\n context: __SerdeContext\n): EncryptionConfiguration => {\n let contents: any = {\n ReplicaKmsKeyID: undefined,\n };\n if (output[\"ReplicaKmsKeyID\"] !== undefined) {\n contents.ReplicaKmsKeyID = output[\"ReplicaKmsKeyID\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXml_Error = (output: any, context: __SerdeContext): _Error => {\n let contents: any = {\n Key: undefined,\n VersionId: undefined,\n Code: undefined,\n Message: undefined,\n };\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"VersionId\"] !== undefined) {\n contents.VersionId = output[\"VersionId\"];\n }\n if (output[\"Code\"] !== undefined) {\n contents.Code = output[\"Code\"];\n }\n if (output[\"Message\"] !== undefined) {\n contents.Message = output[\"Message\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlErrorDocument = (output: any, context: __SerdeContext): ErrorDocument => {\n let contents: any = {\n Key: undefined,\n };\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlErrors = (output: any, context: __SerdeContext): _Error[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXml_Error(entry, context);\n });\n};\n\nconst deserializeAws_restXmlEventList = (output: any, context: __SerdeContext): (Event | string)[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlExistingObjectReplication = (\n output: any,\n context: __SerdeContext\n): ExistingObjectReplication => {\n let contents: any = {\n Status: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlExposeHeaders = (output: any, context: __SerdeContext): string[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlFilterRule = (output: any, context: __SerdeContext): FilterRule => {\n let contents: any = {\n Name: undefined,\n Value: undefined,\n };\n if (output[\"Name\"] !== undefined) {\n contents.Name = output[\"Name\"];\n }\n if (output[\"Value\"] !== undefined) {\n contents.Value = output[\"Value\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlFilterRuleList = (output: any, context: __SerdeContext): FilterRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlFilterRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlGrant = (output: any, context: __SerdeContext): Grant => {\n let contents: any = {\n Grantee: undefined,\n Permission: undefined,\n };\n if (output[\"Grantee\"] !== undefined) {\n contents.Grantee = deserializeAws_restXmlGrantee(output[\"Grantee\"], context);\n }\n if (output[\"Permission\"] !== undefined) {\n contents.Permission = output[\"Permission\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlGrantee = (output: any, context: __SerdeContext): Grantee => {\n let contents: any = {\n DisplayName: undefined,\n EmailAddress: undefined,\n ID: undefined,\n URI: undefined,\n Type: undefined,\n };\n if (output[\"DisplayName\"] !== undefined) {\n contents.DisplayName = output[\"DisplayName\"];\n }\n if (output[\"EmailAddress\"] !== undefined) {\n contents.EmailAddress = output[\"EmailAddress\"];\n }\n if (output[\"ID\"] !== undefined) {\n contents.ID = output[\"ID\"];\n }\n if (output[\"URI\"] !== undefined) {\n contents.URI = output[\"URI\"];\n }\n if (output[\"xsi:type\"] !== undefined) {\n contents.Type = output[\"xsi:type\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlGrants = (output: any, context: __SerdeContext): Grant[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlGrant(entry, context);\n });\n};\n\nconst deserializeAws_restXmlIndexDocument = (output: any, context: __SerdeContext): IndexDocument => {\n let contents: any = {\n Suffix: undefined,\n };\n if (output[\"Suffix\"] !== undefined) {\n contents.Suffix = output[\"Suffix\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInitiator = (output: any, context: __SerdeContext): Initiator => {\n let contents: any = {\n ID: undefined,\n DisplayName: undefined,\n };\n if (output[\"ID\"] !== undefined) {\n contents.ID = output[\"ID\"];\n }\n if (output[\"DisplayName\"] !== undefined) {\n contents.DisplayName = output[\"DisplayName\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlIntelligentTieringAndOperator = (\n output: any,\n context: __SerdeContext\n): IntelligentTieringAndOperator => {\n let contents: any = {\n Prefix: undefined,\n Tags: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output.Tag === \"\") {\n contents.Tags = [];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tags = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(output[\"Tag\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlIntelligentTieringConfiguration = (\n output: any,\n context: __SerdeContext\n): IntelligentTieringConfiguration => {\n let contents: any = {\n Id: undefined,\n Filter: undefined,\n Status: undefined,\n Tierings: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlIntelligentTieringFilter(output[\"Filter\"], context);\n }\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n if (output.Tiering === \"\") {\n contents.Tierings = [];\n }\n if (output[\"Tiering\"] !== undefined) {\n contents.Tierings = deserializeAws_restXmlTieringList(__getArrayIfSingleItem(output[\"Tiering\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlIntelligentTieringConfigurationList = (\n output: any,\n context: __SerdeContext\n): IntelligentTieringConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlIntelligentTieringConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlIntelligentTieringFilter = (\n output: any,\n context: __SerdeContext\n): IntelligentTieringFilter => {\n let contents: any = {\n Prefix: undefined,\n Tag: undefined,\n And: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tag = deserializeAws_restXmlTag(output[\"Tag\"], context);\n }\n if (output[\"And\"] !== undefined) {\n contents.And = deserializeAws_restXmlIntelligentTieringAndOperator(output[\"And\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventoryConfiguration = (output: any, context: __SerdeContext): InventoryConfiguration => {\n let contents: any = {\n Destination: undefined,\n IsEnabled: undefined,\n Filter: undefined,\n Id: undefined,\n IncludedObjectVersions: undefined,\n OptionalFields: undefined,\n Schedule: undefined,\n };\n if (output[\"Destination\"] !== undefined) {\n contents.Destination = deserializeAws_restXmlInventoryDestination(output[\"Destination\"], context);\n }\n if (output[\"IsEnabled\"] !== undefined) {\n contents.IsEnabled = output[\"IsEnabled\"] == \"true\";\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlInventoryFilter(output[\"Filter\"], context);\n }\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"IncludedObjectVersions\"] !== undefined) {\n contents.IncludedObjectVersions = output[\"IncludedObjectVersions\"];\n }\n if (output.OptionalFields === \"\") {\n contents.OptionalFields = [];\n }\n if (output[\"OptionalFields\"] !== undefined && output[\"OptionalFields\"][\"Field\"] !== undefined) {\n contents.OptionalFields = deserializeAws_restXmlInventoryOptionalFields(\n __getArrayIfSingleItem(output[\"OptionalFields\"][\"Field\"]),\n context\n );\n }\n if (output[\"Schedule\"] !== undefined) {\n contents.Schedule = deserializeAws_restXmlInventorySchedule(output[\"Schedule\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventoryConfigurationList = (\n output: any,\n context: __SerdeContext\n): InventoryConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlInventoryConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlInventoryDestination = (output: any, context: __SerdeContext): InventoryDestination => {\n let contents: any = {\n S3BucketDestination: undefined,\n };\n if (output[\"S3BucketDestination\"] !== undefined) {\n contents.S3BucketDestination = deserializeAws_restXmlInventoryS3BucketDestination(\n output[\"S3BucketDestination\"],\n context\n );\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventoryEncryption = (output: any, context: __SerdeContext): InventoryEncryption => {\n let contents: any = {\n SSES3: undefined,\n SSEKMS: undefined,\n };\n if (output[\"SSE-S3\"] !== undefined) {\n contents.SSES3 = deserializeAws_restXmlSSES3(output[\"SSE-S3\"], context);\n }\n if (output[\"SSE-KMS\"] !== undefined) {\n contents.SSEKMS = deserializeAws_restXmlSSEKMS(output[\"SSE-KMS\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventoryFilter = (output: any, context: __SerdeContext): InventoryFilter => {\n let contents: any = {\n Prefix: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventoryOptionalFields = (\n output: any,\n context: __SerdeContext\n): (InventoryOptionalField | string)[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return entry;\n });\n};\n\nconst deserializeAws_restXmlInventoryS3BucketDestination = (\n output: any,\n context: __SerdeContext\n): InventoryS3BucketDestination => {\n let contents: any = {\n AccountId: undefined,\n Bucket: undefined,\n Format: undefined,\n Prefix: undefined,\n Encryption: undefined,\n };\n if (output[\"AccountId\"] !== undefined) {\n contents.AccountId = output[\"AccountId\"];\n }\n if (output[\"Bucket\"] !== undefined) {\n contents.Bucket = output[\"Bucket\"];\n }\n if (output[\"Format\"] !== undefined) {\n contents.Format = output[\"Format\"];\n }\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output[\"Encryption\"] !== undefined) {\n contents.Encryption = deserializeAws_restXmlInventoryEncryption(output[\"Encryption\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlInventorySchedule = (output: any, context: __SerdeContext): InventorySchedule => {\n let contents: any = {\n Frequency: undefined,\n };\n if (output[\"Frequency\"] !== undefined) {\n contents.Frequency = output[\"Frequency\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlLambdaFunctionConfiguration = (\n output: any,\n context: __SerdeContext\n): LambdaFunctionConfiguration => {\n let contents: any = {\n Id: undefined,\n LambdaFunctionArn: undefined,\n Events: undefined,\n Filter: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"CloudFunction\"] !== undefined) {\n contents.LambdaFunctionArn = output[\"CloudFunction\"];\n }\n if (output.Event === \"\") {\n contents.Events = [];\n }\n if (output[\"Event\"] !== undefined) {\n contents.Events = deserializeAws_restXmlEventList(__getArrayIfSingleItem(output[\"Event\"]), context);\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output[\"Filter\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlLambdaFunctionConfigurationList = (\n output: any,\n context: __SerdeContext\n): LambdaFunctionConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlLambdaFunctionConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlLifecycleExpiration = (output: any, context: __SerdeContext): LifecycleExpiration => {\n let contents: any = {\n Date: undefined,\n Days: undefined,\n ExpiredObjectDeleteMarker: undefined,\n };\n if (output[\"Date\"] !== undefined) {\n contents.Date = new Date(output[\"Date\"]);\n }\n if (output[\"Days\"] !== undefined) {\n contents.Days = parseInt(output[\"Days\"]);\n }\n if (output[\"ExpiredObjectDeleteMarker\"] !== undefined) {\n contents.ExpiredObjectDeleteMarker = output[\"ExpiredObjectDeleteMarker\"] == \"true\";\n }\n return contents;\n};\n\nconst deserializeAws_restXmlLifecycleRule = (output: any, context: __SerdeContext): LifecycleRule => {\n let contents: any = {\n Expiration: undefined,\n ID: undefined,\n Prefix: undefined,\n Filter: undefined,\n Status: undefined,\n Transitions: undefined,\n NoncurrentVersionTransitions: undefined,\n NoncurrentVersionExpiration: undefined,\n AbortIncompleteMultipartUpload: undefined,\n };\n if (output[\"Expiration\"] !== undefined) {\n contents.Expiration = deserializeAws_restXmlLifecycleExpiration(output[\"Expiration\"], context);\n }\n if (output[\"ID\"] !== undefined) {\n contents.ID = output[\"ID\"];\n }\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlLifecycleRuleFilter(output[\"Filter\"], context);\n }\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n if (output.Transition === \"\") {\n contents.Transitions = [];\n }\n if (output[\"Transition\"] !== undefined) {\n contents.Transitions = deserializeAws_restXmlTransitionList(__getArrayIfSingleItem(output[\"Transition\"]), context);\n }\n if (output.NoncurrentVersionTransition === \"\") {\n contents.NoncurrentVersionTransitions = [];\n }\n if (output[\"NoncurrentVersionTransition\"] !== undefined) {\n contents.NoncurrentVersionTransitions = deserializeAws_restXmlNoncurrentVersionTransitionList(\n __getArrayIfSingleItem(output[\"NoncurrentVersionTransition\"]),\n context\n );\n }\n if (output[\"NoncurrentVersionExpiration\"] !== undefined) {\n contents.NoncurrentVersionExpiration = deserializeAws_restXmlNoncurrentVersionExpiration(\n output[\"NoncurrentVersionExpiration\"],\n context\n );\n }\n if (output[\"AbortIncompleteMultipartUpload\"] !== undefined) {\n contents.AbortIncompleteMultipartUpload = deserializeAws_restXmlAbortIncompleteMultipartUpload(\n output[\"AbortIncompleteMultipartUpload\"],\n context\n );\n }\n return contents;\n};\n\nconst deserializeAws_restXmlLifecycleRuleAndOperator = (\n output: any,\n context: __SerdeContext\n): LifecycleRuleAndOperator => {\n let contents: any = {\n Prefix: undefined,\n Tags: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output.Tag === \"\") {\n contents.Tags = [];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tags = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(output[\"Tag\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlLifecycleRuleFilter = (output: any, context: __SerdeContext): LifecycleRuleFilter => {\n if (output[\"Prefix\"] !== undefined) {\n return {\n Prefix: output[\"Prefix\"],\n };\n }\n if (output[\"Tag\"] !== undefined) {\n return {\n Tag: deserializeAws_restXmlTag(output[\"Tag\"], context),\n };\n }\n if (output[\"And\"] !== undefined) {\n return {\n And: deserializeAws_restXmlLifecycleRuleAndOperator(output[\"And\"], context),\n };\n }\n return { $unknown: Object.entries(output)[0] };\n};\n\nconst deserializeAws_restXmlLifecycleRules = (output: any, context: __SerdeContext): LifecycleRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlLifecycleRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlLoggingEnabled = (output: any, context: __SerdeContext): LoggingEnabled => {\n let contents: any = {\n TargetBucket: undefined,\n TargetGrants: undefined,\n TargetPrefix: undefined,\n };\n if (output[\"TargetBucket\"] !== undefined) {\n contents.TargetBucket = output[\"TargetBucket\"];\n }\n if (output.TargetGrants === \"\") {\n contents.TargetGrants = [];\n }\n if (output[\"TargetGrants\"] !== undefined && output[\"TargetGrants\"][\"Grant\"] !== undefined) {\n contents.TargetGrants = deserializeAws_restXmlTargetGrants(\n __getArrayIfSingleItem(output[\"TargetGrants\"][\"Grant\"]),\n context\n );\n }\n if (output[\"TargetPrefix\"] !== undefined) {\n contents.TargetPrefix = output[\"TargetPrefix\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlMetrics = (output: any, context: __SerdeContext): Metrics => {\n let contents: any = {\n Status: undefined,\n EventThreshold: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n if (output[\"EventThreshold\"] !== undefined) {\n contents.EventThreshold = deserializeAws_restXmlReplicationTimeValue(output[\"EventThreshold\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlMetricsAndOperator = (output: any, context: __SerdeContext): MetricsAndOperator => {\n let contents: any = {\n Prefix: undefined,\n Tags: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output.Tag === \"\") {\n contents.Tags = [];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tags = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(output[\"Tag\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlMetricsConfiguration = (output: any, context: __SerdeContext): MetricsConfiguration => {\n let contents: any = {\n Id: undefined,\n Filter: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlMetricsFilter(output[\"Filter\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlMetricsConfigurationList = (\n output: any,\n context: __SerdeContext\n): MetricsConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlMetricsConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlMetricsFilter = (output: any, context: __SerdeContext): MetricsFilter => {\n if (output[\"Prefix\"] !== undefined) {\n return {\n Prefix: output[\"Prefix\"],\n };\n }\n if (output[\"Tag\"] !== undefined) {\n return {\n Tag: deserializeAws_restXmlTag(output[\"Tag\"], context),\n };\n }\n if (output[\"And\"] !== undefined) {\n return {\n And: deserializeAws_restXmlMetricsAndOperator(output[\"And\"], context),\n };\n }\n return { $unknown: Object.entries(output)[0] };\n};\n\nconst deserializeAws_restXmlMultipartUpload = (output: any, context: __SerdeContext): MultipartUpload => {\n let contents: any = {\n UploadId: undefined,\n Key: undefined,\n Initiated: undefined,\n StorageClass: undefined,\n Owner: undefined,\n Initiator: undefined,\n };\n if (output[\"UploadId\"] !== undefined) {\n contents.UploadId = output[\"UploadId\"];\n }\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"Initiated\"] !== undefined) {\n contents.Initiated = new Date(output[\"Initiated\"]);\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n if (output[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(output[\"Owner\"], context);\n }\n if (output[\"Initiator\"] !== undefined) {\n contents.Initiator = deserializeAws_restXmlInitiator(output[\"Initiator\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlMultipartUploadList = (output: any, context: __SerdeContext): MultipartUpload[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlMultipartUpload(entry, context);\n });\n};\n\nconst deserializeAws_restXmlNoncurrentVersionExpiration = (\n output: any,\n context: __SerdeContext\n): NoncurrentVersionExpiration => {\n let contents: any = {\n NoncurrentDays: undefined,\n };\n if (output[\"NoncurrentDays\"] !== undefined) {\n contents.NoncurrentDays = parseInt(output[\"NoncurrentDays\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlNoncurrentVersionTransition = (\n output: any,\n context: __SerdeContext\n): NoncurrentVersionTransition => {\n let contents: any = {\n NoncurrentDays: undefined,\n StorageClass: undefined,\n };\n if (output[\"NoncurrentDays\"] !== undefined) {\n contents.NoncurrentDays = parseInt(output[\"NoncurrentDays\"]);\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlNoncurrentVersionTransitionList = (\n output: any,\n context: __SerdeContext\n): NoncurrentVersionTransition[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlNoncurrentVersionTransition(entry, context);\n });\n};\n\nconst deserializeAws_restXmlNotificationConfigurationFilter = (\n output: any,\n context: __SerdeContext\n): NotificationConfigurationFilter => {\n let contents: any = {\n Key: undefined,\n };\n if (output[\"S3Key\"] !== undefined) {\n contents.Key = deserializeAws_restXmlS3KeyFilter(output[\"S3Key\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXml_Object = (output: any, context: __SerdeContext): _Object => {\n let contents: any = {\n Key: undefined,\n LastModified: undefined,\n ETag: undefined,\n Size: undefined,\n StorageClass: undefined,\n Owner: undefined,\n };\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n if (output[\"ETag\"] !== undefined) {\n contents.ETag = output[\"ETag\"];\n }\n if (output[\"Size\"] !== undefined) {\n contents.Size = parseInt(output[\"Size\"]);\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n if (output[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(output[\"Owner\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectList = (output: any, context: __SerdeContext): _Object[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXml_Object(entry, context);\n });\n};\n\nconst deserializeAws_restXmlObjectLockConfiguration = (\n output: any,\n context: __SerdeContext\n): ObjectLockConfiguration => {\n let contents: any = {\n ObjectLockEnabled: undefined,\n Rule: undefined,\n };\n if (output[\"ObjectLockEnabled\"] !== undefined) {\n contents.ObjectLockEnabled = output[\"ObjectLockEnabled\"];\n }\n if (output[\"Rule\"] !== undefined) {\n contents.Rule = deserializeAws_restXmlObjectLockRule(output[\"Rule\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectLockLegalHold = (output: any, context: __SerdeContext): ObjectLockLegalHold => {\n let contents: any = {\n Status: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectLockRetention = (output: any, context: __SerdeContext): ObjectLockRetention => {\n let contents: any = {\n Mode: undefined,\n RetainUntilDate: undefined,\n };\n if (output[\"Mode\"] !== undefined) {\n contents.Mode = output[\"Mode\"];\n }\n if (output[\"RetainUntilDate\"] !== undefined) {\n contents.RetainUntilDate = new Date(output[\"RetainUntilDate\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectLockRule = (output: any, context: __SerdeContext): ObjectLockRule => {\n let contents: any = {\n DefaultRetention: undefined,\n };\n if (output[\"DefaultRetention\"] !== undefined) {\n contents.DefaultRetention = deserializeAws_restXmlDefaultRetention(output[\"DefaultRetention\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectVersion = (output: any, context: __SerdeContext): ObjectVersion => {\n let contents: any = {\n ETag: undefined,\n Size: undefined,\n StorageClass: undefined,\n Key: undefined,\n VersionId: undefined,\n IsLatest: undefined,\n LastModified: undefined,\n Owner: undefined,\n };\n if (output[\"ETag\"] !== undefined) {\n contents.ETag = output[\"ETag\"];\n }\n if (output[\"Size\"] !== undefined) {\n contents.Size = parseInt(output[\"Size\"]);\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"VersionId\"] !== undefined) {\n contents.VersionId = output[\"VersionId\"];\n }\n if (output[\"IsLatest\"] !== undefined) {\n contents.IsLatest = output[\"IsLatest\"] == \"true\";\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n if (output[\"Owner\"] !== undefined) {\n contents.Owner = deserializeAws_restXmlOwner(output[\"Owner\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlObjectVersionList = (output: any, context: __SerdeContext): ObjectVersion[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlObjectVersion(entry, context);\n });\n};\n\nconst deserializeAws_restXmlOwner = (output: any, context: __SerdeContext): Owner => {\n let contents: any = {\n DisplayName: undefined,\n ID: undefined,\n };\n if (output[\"DisplayName\"] !== undefined) {\n contents.DisplayName = output[\"DisplayName\"];\n }\n if (output[\"ID\"] !== undefined) {\n contents.ID = output[\"ID\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlOwnershipControls = (output: any, context: __SerdeContext): OwnershipControls => {\n let contents: any = {\n Rules: undefined,\n };\n if (output.Rule === \"\") {\n contents.Rules = [];\n }\n if (output[\"Rule\"] !== undefined) {\n contents.Rules = deserializeAws_restXmlOwnershipControlsRules(__getArrayIfSingleItem(output[\"Rule\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlOwnershipControlsRule = (output: any, context: __SerdeContext): OwnershipControlsRule => {\n let contents: any = {\n ObjectOwnership: undefined,\n };\n if (output[\"ObjectOwnership\"] !== undefined) {\n contents.ObjectOwnership = output[\"ObjectOwnership\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlOwnershipControlsRules = (\n output: any,\n context: __SerdeContext\n): OwnershipControlsRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlOwnershipControlsRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlPart = (output: any, context: __SerdeContext): Part => {\n let contents: any = {\n PartNumber: undefined,\n LastModified: undefined,\n ETag: undefined,\n Size: undefined,\n };\n if (output[\"PartNumber\"] !== undefined) {\n contents.PartNumber = parseInt(output[\"PartNumber\"]);\n }\n if (output[\"LastModified\"] !== undefined) {\n contents.LastModified = new Date(output[\"LastModified\"]);\n }\n if (output[\"ETag\"] !== undefined) {\n contents.ETag = output[\"ETag\"];\n }\n if (output[\"Size\"] !== undefined) {\n contents.Size = parseInt(output[\"Size\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlParts = (output: any, context: __SerdeContext): Part[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlPart(entry, context);\n });\n};\n\nconst deserializeAws_restXmlPolicyStatus = (output: any, context: __SerdeContext): PolicyStatus => {\n let contents: any = {\n IsPublic: undefined,\n };\n if (output[\"IsPublic\"] !== undefined) {\n contents.IsPublic = output[\"IsPublic\"] == \"true\";\n }\n return contents;\n};\n\nconst deserializeAws_restXmlPublicAccessBlockConfiguration = (\n output: any,\n context: __SerdeContext\n): PublicAccessBlockConfiguration => {\n let contents: any = {\n BlockPublicAcls: undefined,\n IgnorePublicAcls: undefined,\n BlockPublicPolicy: undefined,\n RestrictPublicBuckets: undefined,\n };\n if (output[\"BlockPublicAcls\"] !== undefined) {\n contents.BlockPublicAcls = output[\"BlockPublicAcls\"] == \"true\";\n }\n if (output[\"IgnorePublicAcls\"] !== undefined) {\n contents.IgnorePublicAcls = output[\"IgnorePublicAcls\"] == \"true\";\n }\n if (output[\"BlockPublicPolicy\"] !== undefined) {\n contents.BlockPublicPolicy = output[\"BlockPublicPolicy\"] == \"true\";\n }\n if (output[\"RestrictPublicBuckets\"] !== undefined) {\n contents.RestrictPublicBuckets = output[\"RestrictPublicBuckets\"] == \"true\";\n }\n return contents;\n};\n\nconst deserializeAws_restXmlQueueConfiguration = (output: any, context: __SerdeContext): QueueConfiguration => {\n let contents: any = {\n Id: undefined,\n QueueArn: undefined,\n Events: undefined,\n Filter: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"Queue\"] !== undefined) {\n contents.QueueArn = output[\"Queue\"];\n }\n if (output.Event === \"\") {\n contents.Events = [];\n }\n if (output[\"Event\"] !== undefined) {\n contents.Events = deserializeAws_restXmlEventList(__getArrayIfSingleItem(output[\"Event\"]), context);\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output[\"Filter\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlQueueConfigurationList = (output: any, context: __SerdeContext): QueueConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlQueueConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlRedirect = (output: any, context: __SerdeContext): Redirect => {\n let contents: any = {\n HostName: undefined,\n HttpRedirectCode: undefined,\n Protocol: undefined,\n ReplaceKeyPrefixWith: undefined,\n ReplaceKeyWith: undefined,\n };\n if (output[\"HostName\"] !== undefined) {\n contents.HostName = output[\"HostName\"];\n }\n if (output[\"HttpRedirectCode\"] !== undefined) {\n contents.HttpRedirectCode = output[\"HttpRedirectCode\"];\n }\n if (output[\"Protocol\"] !== undefined) {\n contents.Protocol = output[\"Protocol\"];\n }\n if (output[\"ReplaceKeyPrefixWith\"] !== undefined) {\n contents.ReplaceKeyPrefixWith = output[\"ReplaceKeyPrefixWith\"];\n }\n if (output[\"ReplaceKeyWith\"] !== undefined) {\n contents.ReplaceKeyWith = output[\"ReplaceKeyWith\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlRedirectAllRequestsTo = (output: any, context: __SerdeContext): RedirectAllRequestsTo => {\n let contents: any = {\n HostName: undefined,\n Protocol: undefined,\n };\n if (output[\"HostName\"] !== undefined) {\n contents.HostName = output[\"HostName\"];\n }\n if (output[\"Protocol\"] !== undefined) {\n contents.Protocol = output[\"Protocol\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicaModifications = (output: any, context: __SerdeContext): ReplicaModifications => {\n let contents: any = {\n Status: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicationConfiguration = (\n output: any,\n context: __SerdeContext\n): ReplicationConfiguration => {\n let contents: any = {\n Role: undefined,\n Rules: undefined,\n };\n if (output[\"Role\"] !== undefined) {\n contents.Role = output[\"Role\"];\n }\n if (output.Rule === \"\") {\n contents.Rules = [];\n }\n if (output[\"Rule\"] !== undefined) {\n contents.Rules = deserializeAws_restXmlReplicationRules(__getArrayIfSingleItem(output[\"Rule\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicationRule = (output: any, context: __SerdeContext): ReplicationRule => {\n let contents: any = {\n ID: undefined,\n Priority: undefined,\n Prefix: undefined,\n Filter: undefined,\n Status: undefined,\n SourceSelectionCriteria: undefined,\n ExistingObjectReplication: undefined,\n Destination: undefined,\n DeleteMarkerReplication: undefined,\n };\n if (output[\"ID\"] !== undefined) {\n contents.ID = output[\"ID\"];\n }\n if (output[\"Priority\"] !== undefined) {\n contents.Priority = parseInt(output[\"Priority\"]);\n }\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlReplicationRuleFilter(output[\"Filter\"], context);\n }\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n if (output[\"SourceSelectionCriteria\"] !== undefined) {\n contents.SourceSelectionCriteria = deserializeAws_restXmlSourceSelectionCriteria(\n output[\"SourceSelectionCriteria\"],\n context\n );\n }\n if (output[\"ExistingObjectReplication\"] !== undefined) {\n contents.ExistingObjectReplication = deserializeAws_restXmlExistingObjectReplication(\n output[\"ExistingObjectReplication\"],\n context\n );\n }\n if (output[\"Destination\"] !== undefined) {\n contents.Destination = deserializeAws_restXmlDestination(output[\"Destination\"], context);\n }\n if (output[\"DeleteMarkerReplication\"] !== undefined) {\n contents.DeleteMarkerReplication = deserializeAws_restXmlDeleteMarkerReplication(\n output[\"DeleteMarkerReplication\"],\n context\n );\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicationRuleAndOperator = (\n output: any,\n context: __SerdeContext\n): ReplicationRuleAndOperator => {\n let contents: any = {\n Prefix: undefined,\n Tags: undefined,\n };\n if (output[\"Prefix\"] !== undefined) {\n contents.Prefix = output[\"Prefix\"];\n }\n if (output.Tag === \"\") {\n contents.Tags = [];\n }\n if (output[\"Tag\"] !== undefined) {\n contents.Tags = deserializeAws_restXmlTagSet(__getArrayIfSingleItem(output[\"Tag\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicationRuleFilter = (output: any, context: __SerdeContext): ReplicationRuleFilter => {\n if (output[\"Prefix\"] !== undefined) {\n return {\n Prefix: output[\"Prefix\"],\n };\n }\n if (output[\"Tag\"] !== undefined) {\n return {\n Tag: deserializeAws_restXmlTag(output[\"Tag\"], context),\n };\n }\n if (output[\"And\"] !== undefined) {\n return {\n And: deserializeAws_restXmlReplicationRuleAndOperator(output[\"And\"], context),\n };\n }\n return { $unknown: Object.entries(output)[0] };\n};\n\nconst deserializeAws_restXmlReplicationRules = (output: any, context: __SerdeContext): ReplicationRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlReplicationRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlReplicationTime = (output: any, context: __SerdeContext): ReplicationTime => {\n let contents: any = {\n Status: undefined,\n Time: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n if (output[\"Time\"] !== undefined) {\n contents.Time = deserializeAws_restXmlReplicationTimeValue(output[\"Time\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlReplicationTimeValue = (output: any, context: __SerdeContext): ReplicationTimeValue => {\n let contents: any = {\n Minutes: undefined,\n };\n if (output[\"Minutes\"] !== undefined) {\n contents.Minutes = parseInt(output[\"Minutes\"]);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlRoutingRule = (output: any, context: __SerdeContext): RoutingRule => {\n let contents: any = {\n Condition: undefined,\n Redirect: undefined,\n };\n if (output[\"Condition\"] !== undefined) {\n contents.Condition = deserializeAws_restXmlCondition(output[\"Condition\"], context);\n }\n if (output[\"Redirect\"] !== undefined) {\n contents.Redirect = deserializeAws_restXmlRedirect(output[\"Redirect\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlRoutingRules = (output: any, context: __SerdeContext): RoutingRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlRoutingRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlS3KeyFilter = (output: any, context: __SerdeContext): S3KeyFilter => {\n let contents: any = {\n FilterRules: undefined,\n };\n if (output.FilterRule === \"\") {\n contents.FilterRules = [];\n }\n if (output[\"FilterRule\"] !== undefined) {\n contents.FilterRules = deserializeAws_restXmlFilterRuleList(__getArrayIfSingleItem(output[\"FilterRule\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlServerSideEncryptionByDefault = (\n output: any,\n context: __SerdeContext\n): ServerSideEncryptionByDefault => {\n let contents: any = {\n SSEAlgorithm: undefined,\n KMSMasterKeyID: undefined,\n };\n if (output[\"SSEAlgorithm\"] !== undefined) {\n contents.SSEAlgorithm = output[\"SSEAlgorithm\"];\n }\n if (output[\"KMSMasterKeyID\"] !== undefined) {\n contents.KMSMasterKeyID = output[\"KMSMasterKeyID\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlServerSideEncryptionConfiguration = (\n output: any,\n context: __SerdeContext\n): ServerSideEncryptionConfiguration => {\n let contents: any = {\n Rules: undefined,\n };\n if (output.Rule === \"\") {\n contents.Rules = [];\n }\n if (output[\"Rule\"] !== undefined) {\n contents.Rules = deserializeAws_restXmlServerSideEncryptionRules(__getArrayIfSingleItem(output[\"Rule\"]), context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlServerSideEncryptionRule = (\n output: any,\n context: __SerdeContext\n): ServerSideEncryptionRule => {\n let contents: any = {\n ApplyServerSideEncryptionByDefault: undefined,\n BucketKeyEnabled: undefined,\n };\n if (output[\"ApplyServerSideEncryptionByDefault\"] !== undefined) {\n contents.ApplyServerSideEncryptionByDefault = deserializeAws_restXmlServerSideEncryptionByDefault(\n output[\"ApplyServerSideEncryptionByDefault\"],\n context\n );\n }\n if (output[\"BucketKeyEnabled\"] !== undefined) {\n contents.BucketKeyEnabled = output[\"BucketKeyEnabled\"] == \"true\";\n }\n return contents;\n};\n\nconst deserializeAws_restXmlServerSideEncryptionRules = (\n output: any,\n context: __SerdeContext\n): ServerSideEncryptionRule[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlServerSideEncryptionRule(entry, context);\n });\n};\n\nconst deserializeAws_restXmlSourceSelectionCriteria = (\n output: any,\n context: __SerdeContext\n): SourceSelectionCriteria => {\n let contents: any = {\n SseKmsEncryptedObjects: undefined,\n ReplicaModifications: undefined,\n };\n if (output[\"SseKmsEncryptedObjects\"] !== undefined) {\n contents.SseKmsEncryptedObjects = deserializeAws_restXmlSseKmsEncryptedObjects(\n output[\"SseKmsEncryptedObjects\"],\n context\n );\n }\n if (output[\"ReplicaModifications\"] !== undefined) {\n contents.ReplicaModifications = deserializeAws_restXmlReplicaModifications(output[\"ReplicaModifications\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlSSEKMS = (output: any, context: __SerdeContext): SSEKMS => {\n let contents: any = {\n KeyId: undefined,\n };\n if (output[\"KeyId\"] !== undefined) {\n contents.KeyId = output[\"KeyId\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlSseKmsEncryptedObjects = (output: any, context: __SerdeContext): SseKmsEncryptedObjects => {\n let contents: any = {\n Status: undefined,\n };\n if (output[\"Status\"] !== undefined) {\n contents.Status = output[\"Status\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlSSES3 = (output: any, context: __SerdeContext): SSES3 => {\n let contents: any = {};\n return contents;\n};\n\nconst deserializeAws_restXmlStorageClassAnalysis = (output: any, context: __SerdeContext): StorageClassAnalysis => {\n let contents: any = {\n DataExport: undefined,\n };\n if (output[\"DataExport\"] !== undefined) {\n contents.DataExport = deserializeAws_restXmlStorageClassAnalysisDataExport(output[\"DataExport\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlStorageClassAnalysisDataExport = (\n output: any,\n context: __SerdeContext\n): StorageClassAnalysisDataExport => {\n let contents: any = {\n OutputSchemaVersion: undefined,\n Destination: undefined,\n };\n if (output[\"OutputSchemaVersion\"] !== undefined) {\n contents.OutputSchemaVersion = output[\"OutputSchemaVersion\"];\n }\n if (output[\"Destination\"] !== undefined) {\n contents.Destination = deserializeAws_restXmlAnalyticsExportDestination(output[\"Destination\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTag = (output: any, context: __SerdeContext): Tag => {\n let contents: any = {\n Key: undefined,\n Value: undefined,\n };\n if (output[\"Key\"] !== undefined) {\n contents.Key = output[\"Key\"];\n }\n if (output[\"Value\"] !== undefined) {\n contents.Value = output[\"Value\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTagSet = (output: any, context: __SerdeContext): Tag[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlTag(entry, context);\n });\n};\n\nconst deserializeAws_restXmlTargetGrant = (output: any, context: __SerdeContext): TargetGrant => {\n let contents: any = {\n Grantee: undefined,\n Permission: undefined,\n };\n if (output[\"Grantee\"] !== undefined) {\n contents.Grantee = deserializeAws_restXmlGrantee(output[\"Grantee\"], context);\n }\n if (output[\"Permission\"] !== undefined) {\n contents.Permission = output[\"Permission\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTargetGrants = (output: any, context: __SerdeContext): TargetGrant[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlTargetGrant(entry, context);\n });\n};\n\nconst deserializeAws_restXmlTiering = (output: any, context: __SerdeContext): Tiering => {\n let contents: any = {\n Days: undefined,\n AccessTier: undefined,\n };\n if (output[\"Days\"] !== undefined) {\n contents.Days = parseInt(output[\"Days\"]);\n }\n if (output[\"AccessTier\"] !== undefined) {\n contents.AccessTier = output[\"AccessTier\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTieringList = (output: any, context: __SerdeContext): Tiering[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlTiering(entry, context);\n });\n};\n\nconst deserializeAws_restXmlTopicConfiguration = (output: any, context: __SerdeContext): TopicConfiguration => {\n let contents: any = {\n Id: undefined,\n TopicArn: undefined,\n Events: undefined,\n Filter: undefined,\n };\n if (output[\"Id\"] !== undefined) {\n contents.Id = output[\"Id\"];\n }\n if (output[\"Topic\"] !== undefined) {\n contents.TopicArn = output[\"Topic\"];\n }\n if (output.Event === \"\") {\n contents.Events = [];\n }\n if (output[\"Event\"] !== undefined) {\n contents.Events = deserializeAws_restXmlEventList(__getArrayIfSingleItem(output[\"Event\"]), context);\n }\n if (output[\"Filter\"] !== undefined) {\n contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output[\"Filter\"], context);\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTopicConfigurationList = (output: any, context: __SerdeContext): TopicConfiguration[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlTopicConfiguration(entry, context);\n });\n};\n\nconst deserializeAws_restXmlTransition = (output: any, context: __SerdeContext): Transition => {\n let contents: any = {\n Date: undefined,\n Days: undefined,\n StorageClass: undefined,\n };\n if (output[\"Date\"] !== undefined) {\n contents.Date = new Date(output[\"Date\"]);\n }\n if (output[\"Days\"] !== undefined) {\n contents.Days = parseInt(output[\"Days\"]);\n }\n if (output[\"StorageClass\"] !== undefined) {\n contents.StorageClass = output[\"StorageClass\"];\n }\n return contents;\n};\n\nconst deserializeAws_restXmlTransitionList = (output: any, context: __SerdeContext): Transition[] => {\n return (output || [])\n .filter((e: any) => e != null)\n .map((entry: any) => {\n if (entry === null) {\n return null as any;\n }\n return deserializeAws_restXmlTransition(entry, context);\n });\n};\n\nconst deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"],\n});\n\n// Collect low-level response body stream to Uint8Array.\nconst collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise => {\n if (streamBody instanceof Uint8Array) {\n return Promise.resolve(streamBody);\n }\n return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());\n};\n\n// Encode Uint8Array data into string with utf-8.\nconst collectBodyString = (streamBody: any, context: __SerdeContext): Promise =>\n collectBody(streamBody, context).then((body) => context.utf8Encoder(body));\n\nconst isSerializableHeaderValue = (value: any): boolean =>\n value !== undefined &&\n value !== null &&\n value !== \"\" &&\n (!Object.getOwnPropertyNames(value).includes(\"length\") || value.length != 0) &&\n (!Object.getOwnPropertyNames(value).includes(\"size\") || value.size != 0);\n\nconst decodeEscapedXML = (str: string) =>\n str\n .replace(/&/g, \"&\")\n .replace(/'/g, \"'\")\n .replace(/"/g, '\"')\n .replace(/>/g, \">\")\n .replace(/</g, \"<\");\n\nconst parseBody = (streamBody: any, context: __SerdeContext): any =>\n collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parsedObj = xmlParse(encoded, {\n attributeNamePrefix: \"\",\n ignoreAttributes: false,\n parseNodeValue: false,\n tagValueProcessor: (val, tagName) => decodeEscapedXML(val),\n });\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return __getValueFromTextNode(parsedObjToReturn);\n }\n return {};\n });\n\nconst loadRestXmlErrorCode = (output: __HttpResponse, data: any): string => {\n if (data.Code !== undefined) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n return \"\";\n};\n"],"names":["serializeAws_restXmlAbortMultipartUploadCommand","input","context","headers","isSerializableHeaderValue","RequestPayer","ExpectedBucketOwner","resolvedPath","undefined","Bucket","Error","labelValue","length","replace","Key","split","map","segment","join","query","UploadId","uploadId","endpoint","protocol","hostname","port","method","path","body","serializeAws_restXmlCompleteMultipartUploadCommand","MultipartUpload","contents","serializeAws_restXmlCompletedMultipartUpload","addAttribute","toString","serializeAws_restXmlCreateMultipartUploadCommand","ACL","CacheControl","ContentDisposition","ContentEncoding","ContentLanguage","ContentType","Expires","expires","GrantFullControl","GrantRead","GrantReadACP","GrantWriteACP","ServerSideEncryption","StorageClass","WebsiteRedirectLocation","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId","SSEKMSEncryptionContext","BucketKeyEnabled","Tagging","ObjectLockMode","ObjectLockRetainUntilDate","toISOString","ObjectLockLegalHoldStatus","Metadata","Object","keys","reduce","acc","suffix","toLowerCase","uploads","serializeAws_restXmlDeleteObjectCommand","MFA","BypassGovernanceRetention","VersionId","versionId","serializeAws_restXmlGetObjectCommand","IfMatch","IfModifiedSince","IfNoneMatch","IfUnmodifiedSince","Range","range","ResponseCacheControl","ResponseContentDisposition","ResponseContentEncoding","ResponseContentLanguage","ResponseContentType","ResponseExpires","PartNumber","partNumber","serializeAws_restXmlListObjectsCommand","Delimiter","delimiter","EncodingType","Marker","marker","MaxKeys","Prefix","prefix","serializeAws_restXmlListPartsCommand","MaxParts","PartNumberMarker","serializeAws_restXmlPutObjectCommand","ContentLength","ContentMD5","Body","serializeAws_restXmlUploadPartCommand","deserializeAws_restXmlAbortMultipartUploadCommand","output","statusCode","$metadata","deserializeMetadata","RequestCharged","collectBody","deserializeAws_restXmlAbortMultipartUploadCommandError","Promise","resolve","parseBody","parsedOutput","errorCode","loadRestXmlErrorCode","deserializeAws_restXmlNoSuchUploadResponse","response","name","parsedBody","code","Code","message","Message","$fault","reject","assign","deserializeAws_restXmlCompleteMultipartUploadCommand","ETag","Expiration","Location","deserializeAws_restXmlCompleteMultipartUploadCommandError","data","deserializeAws_restXmlCreateMultipartUploadCommand","AbortDate","AbortRuleId","Date","deserializeAws_restXmlCreateMultipartUploadCommandError","deserializeAws_restXmlDeleteObjectCommand","DeleteMarker","deserializeAws_restXmlDeleteObjectCommandError","deserializeAws_restXmlGetObjectCommand","AcceptRanges","ContentRange","LastModified","MissingMeta","PartsCount","ReplicationStatus","Restore","TagCount","parseInt","forEach","header","startsWith","substring","deserializeAws_restXmlGetObjectCommandError","deserializeAws_restXmlInvalidObjectStateResponse","deserializeAws_restXmlNoSuchKeyResponse","deserializeAws_restXmlListObjectsCommand","CommonPrefixes","Contents","IsTruncated","Name","NextMarker","deserializeAws_restXmlListObjectsCommandError","deserializeAws_restXmlCommonPrefixList","deserializeAws_restXmlObjectList","deserializeAws_restXmlNoSuchBucketResponse","deserializeAws_restXmlListPartsCommand","Initiator","NextPartNumberMarker","Owner","Parts","deserializeAws_restXmlListPartsCommandError","deserializeAws_restXmlInitiator","deserializeAws_restXmlOwner","Part","deserializeAws_restXmlParts","deserializeAws_restXmlPutObjectCommand","deserializeAws_restXmlPutObjectCommandError","deserializeAws_restXmlUploadPartCommand","deserializeAws_restXmlUploadPartCommandError","AccessTier","bodyNode","serializeAws_restXmlCompletedPartList","node","withName","addChildNode","filter","e","entry","String","serializeAws_restXmlCompletedPart","deserializeAws_restXmlCommonPrefix","ID","DisplayName","Size","deserializeAws_restXml_Object","deserializeAws_restXmlPart","httpStatusCode","requestId","extendedRequestId","cfId","streamBody","Uint8Array","streamCollector","value","getOwnPropertyNames","includes","size","then","utf8Encoder","collectBodyString","encoded","parsedObj","attributeNamePrefix","ignoreAttributes","parseNodeValue","tagValueProcessor","val","tagName","key","parsedObjToReturn","textNodeName"],"sourceRoot":""}