diff --git a/clients/client-s3/src/schemas/schemas.ts b/clients/client-s3/src/schemas/schemas.ts new file mode 100644 index 0000000000000..5c290cf21273a --- /dev/null +++ b/clients/client-s3/src/schemas/schemas.ts @@ -0,0 +1,9375 @@ +const _A = "Account"; +const _AAO = "AnalyticsAndOperator"; +const _AC = "AccelerateConfiguration"; +const _ACL = "AccessControlList"; +const _ACL_ = "ACL"; +const _ACLn = "AnalyticsConfigurationList"; +const _ACP = "AccessControlPolicy"; +const _ACT = "AccessControlTranslation"; +const _ACn = "AnalyticsConfiguration"; +const _AD = "AbortDate"; +const _AED = "AnalyticsExportDestination"; +const _AF = "AnalyticsFilter"; +const _AH = "AllowedHeaders"; +const _AHl = "AllowedHeader"; +const _AI = "AccountId"; +const _AIMU = "AbortIncompleteMultipartUpload"; +const _AIn = "AnalyticsId"; +const _AKI = "AccessKeyId"; +const _AKIV = "AccessKeyIdValue"; +const _AM = "AllowedMethods"; +const _AMU = "AbortMultipartUpload"; +const _AMUO = "AbortMultipartUploadOutput"; +const _AMUR = "AbortMultipartUploadRequest"; +const _AMl = "AllowedMethod"; +const _AO = "AllowedOrigins"; +const _AOl = "AllowedOrigin"; +const _APA = "AccessPointArn"; +const _APAc = "AccessPointAlias"; +const _AQRD = "AllowQuotedRecordDelimiter"; +const _AR = "AcceptRanges"; +const _ARI = "AbortRuleId"; +const _AS = "ArchiveStatus"; +const _ASBD = "AnalyticsS3BucketDestination"; +const _ASEFF = "AnalyticsS3ExportFileFormat"; +const _ASSEBD = "ApplyServerSideEncryptionByDefault"; +const _AT = "AccessTier"; +const _An = "And"; +const _B = "Body"; +const _BAE = "BucketAlreadyExists"; +const _BAI = "BucketAccountId"; +const _BAOBY = "BucketAlreadyOwnedByYou"; +const _BAS = "BucketAccelerateStatus"; +const _BCACL = "BucketCannedACL"; +const _BGR = "BypassGovernanceRetention"; +const _BI = "BucketInfo"; +const _BKE = "BucketKeyEnabled"; +const _BLC = "BucketLocationConstraint"; +const _BLCu = "BucketLifecycleConfiguration"; +const _BLN = "BucketLocationName"; +const _BLP = "BucketLogsPermission"; +const _BLS = "BucketLoggingStatus"; +const _BLT = "BucketLocationType"; +const _BN = "BucketName"; +const _BP = "BytesProcessed"; +const _BPA = "BlockPublicAcls"; +const _BPP = "BlockPublicPolicy"; +const _BR = "BucketRegion"; +const _BRy = "BytesReturned"; +const _BS = "BytesScanned"; +const _BT = "BucketType"; +const _BVS = "BucketVersioningStatus"; +const _Bu = "Bucket"; +const _Buc = "Buckets"; +const _C = "Code"; +const _CA = "ChecksumAlgorithm"; +const _CACL = "CannedACL"; +const _CAL = "ChecksumAlgorithmList"; +const _CB = "CreateBucket"; +const _CBC = "CreateBucketConfiguration"; +const _CBMTC = "CreateBucketMetadataTableConfiguration"; +const _CBMTCR = "CreateBucketMetadataTableConfigurationRequest"; +const _CBO = "CreateBucketOutput"; +const _CBR = "CreateBucketRequest"; +const _CC = "CacheControl"; +const _CCRC = "ChecksumCRC32"; +const _CCRCC = "ChecksumCRC32C"; +const _CCRCNVME = "ChecksumCRC64NVME"; +const _CC_ = "Cache-Control"; +const _CD = "ContentDisposition"; +const _CD_ = "Content-Disposition"; +const _CDr = "CreationDate"; +const _CE = "ContentEncoding"; +const _CE_ = "Content-Encoding"; +const _CEo = "ContinuationEvent"; +const _CF = "CloudFunction"; +const _CFC = "CloudFunctionConfiguration"; +const _CL = "ContentLanguage"; +const _CL_ = "Content-Language"; +const _CL__ = "Content-Length"; +const _CLo = "ContentLength"; +const _CM = "ChecksumMode"; +const _CMD = "ContentMD5"; +const _CMU = "CompletedMultipartUpload"; +const _CMUO = "CompleteMultipartUploadOutput"; +const _CMUOr = "CreateMultipartUploadOutput"; +const _CMUR = "CompleteMultipartUploadResult"; +const _CMURo = "CompleteMultipartUploadRequest"; +const _CMURr = "CreateMultipartUploadRequest"; +const _CMUo = "CompleteMultipartUpload"; +const _CMUr = "CreateMultipartUpload"; +const _CM_ = "Content-MD5"; +const _CO = "CopyObject"; +const _COO = "CopyObjectOutput"; +const _COR = "CopyObjectResult"; +const _CORSC = "CORSConfiguration"; +const _CORSR = "CORSRules"; +const _CORSRu = "CORSRule"; +const _CORo = "CopyObjectRequest"; +const _CP = "CommonPrefix"; +const _CPL = "CommonPrefixList"; +const _CPLo = "CompletedPartList"; +const _CPR = "CopyPartResult"; +const _CPo = "CompletedPart"; +const _CPom = "CommonPrefixes"; +const _CR = "ContentRange"; +const _CRSBA = "ConfirmRemoveSelfBucketAccess"; +const _CR_ = "Content-Range"; +const _CS = "CopySource"; +const _CSHA = "ChecksumSHA256"; +const _CSHAh = "ChecksumSHA1"; +const _CSIM = "CopySourceIfMatch"; +const _CSIMS = "CopySourceIfModifiedSince"; +const _CSINM = "CopySourceIfNoneMatch"; +const _CSIUS = "CopySourceIfUnmodifiedSince"; +const _CSO = "CreateSessionOutput"; +const _CSR = "CopySourceRange"; +const _CSRr = "CreateSessionResult"; +const _CSRre = "CreateSessionRequest"; +const _CSSSECA = "CopySourceSSECustomerAlgorithm"; +const _CSSSECK = "CopySourceSSECustomerKey"; +const _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; +const _CSV = "CSV"; +const _CSVI = "CopySourceVersionId"; +const _CSVIn = "CSVInput"; +const _CSVO = "CSVOutput"; +const _CSr = "CreateSession"; +const _CT = "ChecksumType"; +const _CT_ = "Content-Type"; +const _CTo = "ContentType"; +const _CTom = "CompressionType"; +const _CTon = "ContinuationToken"; +const _Ch = "Checksum"; +const _Co = "Comments"; +const _Con = "Condition"; +const _Cont = "Contents"; +const _Cont_ = "Cont"; +const _Cr = "Credentials"; +const _D = "Date"; +const _DAI = "DaysAfterInitiation"; +const _DB = "DeleteBucket"; +const _DBAC = "DeleteBucketAnalyticsConfiguration"; +const _DBACR = "DeleteBucketAnalyticsConfigurationRequest"; +const _DBC = "DeleteBucketCors"; +const _DBCR = "DeleteBucketCorsRequest"; +const _DBE = "DeleteBucketEncryption"; +const _DBER = "DeleteBucketEncryptionRequest"; +const _DBIC = "DeleteBucketInventoryConfiguration"; +const _DBICR = "DeleteBucketInventoryConfigurationRequest"; +const _DBITC = "DeleteBucketIntelligentTieringConfiguration"; +const _DBITCR = "DeleteBucketIntelligentTieringConfigurationRequest"; +const _DBL = "DeleteBucketLifecycle"; +const _DBLR = "DeleteBucketLifecycleRequest"; +const _DBMC = "DeleteBucketMetricsConfiguration"; +const _DBMCR = "DeleteBucketMetricsConfigurationRequest"; +const _DBMTC = "DeleteBucketMetadataTableConfiguration"; +const _DBMTCR = "DeleteBucketMetadataTableConfigurationRequest"; +const _DBOC = "DeleteBucketOwnershipControls"; +const _DBOCR = "DeleteBucketOwnershipControlsRequest"; +const _DBP = "DeleteBucketPolicy"; +const _DBPR = "DeleteBucketPolicyRequest"; +const _DBR = "DeleteBucketRequest"; +const _DBRR = "DeleteBucketReplicationRequest"; +const _DBRe = "DeleteBucketReplication"; +const _DBT = "DirectoryBucketToken"; +const _DBTR = "DeleteBucketTaggingRequest"; +const _DBTe = "DeleteBucketTagging"; +const _DBW = "DeleteBucketWebsite"; +const _DBWR = "DeleteBucketWebsiteRequest"; +const _DE = "DataExport"; +const _DM = "DeleteMarker"; +const _DME = "DeleteMarkerEntry"; +const _DMR = "DeleteMarkerReplication"; +const _DMRS = "DeleteMarkerReplicationStatus"; +const _DMVI = "DeleteMarkerVersionId"; +const _DMe = "DeleteMarkers"; +const _DN = "DisplayName"; +const _DO = "DeletedObject"; +const _DOO = "DeleteObjectOutput"; +const _DOOe = "DeleteObjectsOutput"; +const _DOR = "DeleteObjectRequest"; +const _DORe = "DeleteObjectsRequest"; +const _DOT = "DeleteObjectTagging"; +const _DOTO = "DeleteObjectTaggingOutput"; +const _DOTR = "DeleteObjectTaggingRequest"; +const _DOe = "DeletedObjects"; +const _DOel = "DeleteObject"; +const _DOele = "DeleteObjects"; +const _DPAB = "DeletePublicAccessBlock"; +const _DPABR = "DeletePublicAccessBlockRequest"; +const _DR = "DataRedundancy"; +const _DRe = "DefaultRetention"; +const _DRel = "DeleteResult"; +const _Da = "Days"; +const _De = "Delimiter"; +const _Del = "Delete"; +const _Dele = "Deleted"; +const _Des = "Description"; +const _Dest = "Destination"; +const _Det = "Details"; +const _E = "Expiration"; +const _EA = "EmailAddress"; +const _EBC = "EventBridgeConfiguration"; +const _EBO = "ExpectedBucketOwner"; +const _EC = "ErrorCode"; +const _ECn = "EncryptionConfiguration"; +const _ED = "ErrorDetails"; +const _EDr = "ErrorDocument"; +const _EE = "EndEvent"; +const _EH = "ExposeHeaders"; +const _EHx = "ExposeHeader"; +const _EL = "EventList"; +const _EM = "ErrorMessage"; +const _EODM = "ExpiredObjectDeleteMarker"; +const _EOR = "ExistingObjectReplication"; +const _EORS = "ExistingObjectReplicationStatus"; +const _ERP = "EnableRequestProgress"; +const _ES = "ExpirationStatus"; +const _ESBO = "ExpectedSourceBucketOwner"; +const _ESx = "ExpiresString"; +const _ET = "ETag"; +const _ETM = "EncryptionTypeMismatch"; +const _ETn = "EncodingType"; +const _ETnc = "EncryptionType"; +const _ETv = "EventThreshold"; +const _ETx = "ExpressionType"; +const _En = "End"; +const _Ena = "Enabled"; +const _Enc = "Encryption"; +const _Er = "Errors"; +const _Err = "Error"; +const _Ev = "Event"; +const _Eve = "Events"; +const _Ex = "Expires"; +const _Exp = "Expression"; +const _F = "Filter"; +const _FD = "FieldDelimiter"; +const _FHI = "FileHeaderInfo"; +const _FO = "FetchOwner"; +const _FR = "FilterRule"; +const _FRL = "FilterRuleList"; +const _FRN = "FilterRuleName"; +const _FRV = "FilterRuleValue"; +const _FRi = "FilterRules"; +const _Fi = "Field"; +const _Fo = "Format"; +const _Fr = "Frequency"; +const _G = "Grants"; +const _GBA = "GetBucketAcl"; +const _GBAC = "GetBucketAccelerateConfiguration"; +const _GBACO = "GetBucketAccelerateConfigurationOutput"; +const _GBACOe = "GetBucketAnalyticsConfigurationOutput"; +const _GBACR = "GetBucketAccelerateConfigurationRequest"; +const _GBACRe = "GetBucketAnalyticsConfigurationRequest"; +const _GBACe = "GetBucketAnalyticsConfiguration"; +const _GBAO = "GetBucketAclOutput"; +const _GBAR = "GetBucketAclRequest"; +const _GBC = "GetBucketCors"; +const _GBCO = "GetBucketCorsOutput"; +const _GBCR = "GetBucketCorsRequest"; +const _GBE = "GetBucketEncryption"; +const _GBEO = "GetBucketEncryptionOutput"; +const _GBER = "GetBucketEncryptionRequest"; +const _GBIC = "GetBucketInventoryConfiguration"; +const _GBICO = "GetBucketInventoryConfigurationOutput"; +const _GBICR = "GetBucketInventoryConfigurationRequest"; +const _GBITC = "GetBucketIntelligentTieringConfiguration"; +const _GBITCO = "GetBucketIntelligentTieringConfigurationOutput"; +const _GBITCR = "GetBucketIntelligentTieringConfigurationRequest"; +const _GBL = "GetBucketLocation"; +const _GBLC = "GetBucketLifecycleConfiguration"; +const _GBLCO = "GetBucketLifecycleConfigurationOutput"; +const _GBLCR = "GetBucketLifecycleConfigurationRequest"; +const _GBLO = "GetBucketLocationOutput"; +const _GBLOe = "GetBucketLoggingOutput"; +const _GBLR = "GetBucketLocationRequest"; +const _GBLRe = "GetBucketLoggingRequest"; +const _GBLe = "GetBucketLogging"; +const _GBMC = "GetBucketMetricsConfiguration"; +const _GBMCO = "GetBucketMetricsConfigurationOutput"; +const _GBMCR = "GetBucketMetricsConfigurationRequest"; +const _GBMTC = "GetBucketMetadataTableConfiguration"; +const _GBMTCO = "GetBucketMetadataTableConfigurationOutput"; +const _GBMTCR = "GetBucketMetadataTableConfigurationResult"; +const _GBMTCRe = "GetBucketMetadataTableConfigurationRequest"; +const _GBNC = "GetBucketNotificationConfiguration"; +const _GBNCR = "GetBucketNotificationConfigurationRequest"; +const _GBOC = "GetBucketOwnershipControls"; +const _GBOCO = "GetBucketOwnershipControlsOutput"; +const _GBOCR = "GetBucketOwnershipControlsRequest"; +const _GBP = "GetBucketPolicy"; +const _GBPO = "GetBucketPolicyOutput"; +const _GBPR = "GetBucketPolicyRequest"; +const _GBPS = "GetBucketPolicyStatus"; +const _GBPSO = "GetBucketPolicyStatusOutput"; +const _GBPSR = "GetBucketPolicyStatusRequest"; +const _GBR = "GetBucketReplication"; +const _GBRO = "GetBucketReplicationOutput"; +const _GBRP = "GetBucketRequestPayment"; +const _GBRPO = "GetBucketRequestPaymentOutput"; +const _GBRPR = "GetBucketRequestPaymentRequest"; +const _GBRR = "GetBucketReplicationRequest"; +const _GBT = "GetBucketTagging"; +const _GBTO = "GetBucketTaggingOutput"; +const _GBTR = "GetBucketTaggingRequest"; +const _GBV = "GetBucketVersioning"; +const _GBVO = "GetBucketVersioningOutput"; +const _GBVR = "GetBucketVersioningRequest"; +const _GBW = "GetBucketWebsite"; +const _GBWO = "GetBucketWebsiteOutput"; +const _GBWR = "GetBucketWebsiteRequest"; +const _GFC = "GrantFullControl"; +const _GJP = "GlacierJobParameters"; +const _GO = "GetObject"; +const _GOA = "GetObjectAcl"; +const _GOAO = "GetObjectAclOutput"; +const _GOAOe = "GetObjectAttributesOutput"; +const _GOAP = "GetObjectAttributesParts"; +const _GOAR = "GetObjectAclRequest"; +const _GOARe = "GetObjectAttributesResponse"; +const _GOARet = "GetObjectAttributesRequest"; +const _GOAe = "GetObjectAttributes"; +const _GOLC = "GetObjectLockConfiguration"; +const _GOLCO = "GetObjectLockConfigurationOutput"; +const _GOLCR = "GetObjectLockConfigurationRequest"; +const _GOLH = "GetObjectLegalHold"; +const _GOLHO = "GetObjectLegalHoldOutput"; +const _GOLHR = "GetObjectLegalHoldRequest"; +const _GOO = "GetObjectOutput"; +const _GOR = "GetObjectRequest"; +const _GORO = "GetObjectRetentionOutput"; +const _GORR = "GetObjectRetentionRequest"; +const _GORSC = "GetObjectResponseStatusCode"; +const _GORe = "GetObjectRetention"; +const _GOT = "GetObjectTagging"; +const _GOTO = "GetObjectTaggingOutput"; +const _GOTOe = "GetObjectTorrentOutput"; +const _GOTR = "GetObjectTaggingRequest"; +const _GOTRe = "GetObjectTorrentRequest"; +const _GOTe = "GetObjectTorrent"; +const _GPAB = "GetPublicAccessBlock"; +const _GPABO = "GetPublicAccessBlockOutput"; +const _GPABR = "GetPublicAccessBlockRequest"; +const _GR = "GrantRead"; +const _GRACP = "GrantReadACP"; +const _GW = "GrantWrite"; +const _GWACP = "GrantWriteACP"; +const _Gr = "Grant"; +const _Gra = "Grantee"; +const _HB = "HeadBucket"; +const _HBO = "HeadBucketOutput"; +const _HBR = "HeadBucketRequest"; +const _HECRE = "HttpErrorCodeReturnedEquals"; +const _HN = "HostName"; +const _HO = "HeadObject"; +const _HOO = "HeadObjectOutput"; +const _HOR = "HeadObjectRequest"; +const _HRC = "HttpRedirectCode"; +const _I = "Initiated"; +const _IC = "InventoryConfiguration"; +const _ICL = "InventoryConfigurationList"; +const _ID = "ID"; +const _IDn = "IndexDocument"; +const _IDnv = "InventoryDestination"; +const _IE = "IsEnabled"; +const _IEn = "InventoryEncryption"; +const _IF = "InventoryFrequency"; +const _IFn = "InventoryFormat"; +const _IFnv = "InventoryFilter"; +const _II = "InventoryId"; +const _IIOV = "InventoryIncludedObjectVersions"; +const _IL = "IsLatest"; +const _IM = "IfMatch"; +const _IMIT = "IfMatchInitiatedTime"; +const _IMLMT = "IfMatchLastModifiedTime"; +const _IMS = "IfMatchSize"; +const _IMS_ = "If-Modified-Since"; +const _IMSf = "IfModifiedSince"; +const _IMUR = "InitiateMultipartUploadResult"; +const _IM_ = "If-Match"; +const _INM = "IfNoneMatch"; +const _INM_ = "If-None-Match"; +const _IOF = "InventoryOptionalFields"; +const _IOFn = "InventoryOptionalField"; +const _IOS = "InvalidObjectState"; +const _IOV = "IncludedObjectVersions"; +const _IP = "IsPublic"; +const _IPA = "IgnorePublicAcls"; +const _IR = "InvalidRequest"; +const _IRIP = "IsRestoreInProgress"; +const _IS = "InputSerialization"; +const _ISBD = "InventoryS3BucketDestination"; +const _ISn = "InventorySchedule"; +const _IT = "IsTruncated"; +const _ITAO = "IntelligentTieringAndOperator"; +const _ITAT = "IntelligentTieringAccessTier"; +const _ITC = "IntelligentTieringConfiguration"; +const _ITCL = "IntelligentTieringConfigurationList"; +const _ITD = "IntelligentTieringDays"; +const _ITF = "IntelligentTieringFilter"; +const _ITI = "IntelligentTieringId"; +const _ITS = "IntelligentTieringStatus"; +const _IUS = "IfUnmodifiedSince"; +const _IUS_ = "If-Unmodified-Since"; +const _IWO = "InvalidWriteOffset"; +const _Id = "Id"; +const _In = "Initiator"; +const _JSON = "JSON"; +const _JSONI = "JSONInput"; +const _JSONO = "JSONOutput"; +const _JSONT = "JSONType"; +const _K = "Key"; +const _KC = "KeyCount"; +const _KI = "KeyId"; +const _KM = "KeyMarker"; +const _KMSC = "KMSContext"; +const _KMSKI = "KMSKeyId"; +const _KMSMKID = "KMSMasterKeyID"; +const _KPE = "KeyPrefixEquals"; +const _L = "Location"; +const _LAMBR = "ListAllMyBucketsResult"; +const _LAMDBR = "ListAllMyDirectoryBucketsResult"; +const _LB = "ListBuckets"; +const _LBAC = "ListBucketAnalyticsConfigurations"; +const _LBACO = "ListBucketAnalyticsConfigurationsOutput"; +const _LBACR = "ListBucketAnalyticsConfigurationResult"; +const _LBACRi = "ListBucketAnalyticsConfigurationsRequest"; +const _LBIC = "ListBucketInventoryConfigurations"; +const _LBICO = "ListBucketInventoryConfigurationsOutput"; +const _LBICR = "ListBucketInventoryConfigurationsRequest"; +const _LBITC = "ListBucketIntelligentTieringConfigurations"; +const _LBITCO = "ListBucketIntelligentTieringConfigurationsOutput"; +const _LBITCR = "ListBucketIntelligentTieringConfigurationsRequest"; +const _LBMC = "ListBucketMetricsConfigurations"; +const _LBMCO = "ListBucketMetricsConfigurationsOutput"; +const _LBMCR = "ListBucketMetricsConfigurationsRequest"; +const _LBO = "ListBucketsOutput"; +const _LBR = "ListBucketsRequest"; +const _LBRi = "ListBucketResult"; +const _LC = "LocationConstraint"; +const _LCi = "LifecycleConfiguration"; +const _LDB = "ListDirectoryBuckets"; +const _LDBO = "ListDirectoryBucketsOutput"; +const _LDBR = "ListDirectoryBucketsRequest"; +const _LE = "LoggingEnabled"; +const _LEi = "LifecycleExpiration"; +const _LFA = "LambdaFunctionArn"; +const _LFC = "LambdaFunctionConfiguration"; +const _LFCL = "LambdaFunctionConfigurationList"; +const _LFCa = "LambdaFunctionConfigurations"; +const _LH = "LegalHold"; +const _LI = "LocationInfo"; +const _LICR = "ListInventoryConfigurationsResult"; +const _LM = "LastModified"; +const _LMCR = "ListMetricsConfigurationsResult"; +const _LMT = "LastModifiedTime"; +const _LMU = "ListMultipartUploads"; +const _LMUO = "ListMultipartUploadsOutput"; +const _LMUR = "ListMultipartUploadsResult"; +const _LMURi = "ListMultipartUploadsRequest"; +const _LM_ = "Last-Modified"; +const _LNAS = "LocationNameAsString"; +const _LO = "ListObjects"; +const _LOO = "ListObjectsOutput"; +const _LOR = "ListObjectsRequest"; +const _LOV = "ListObjectsV2"; +const _LOVO = "ListObjectsV2Output"; +const _LOVOi = "ListObjectVersionsOutput"; +const _LOVR = "ListObjectsV2Request"; +const _LOVRi = "ListObjectVersionsRequest"; +const _LOVi = "ListObjectVersions"; +const _LP = "LocationPrefix"; +const _LPO = "ListPartsOutput"; +const _LPR = "ListPartsResult"; +const _LPRi = "ListPartsRequest"; +const _LPi = "ListParts"; +const _LR = "LifecycleRule"; +const _LRAO = "LifecycleRuleAndOperator"; +const _LRF = "LifecycleRuleFilter"; +const _LRi = "LifecycleRules"; +const _LT = "LocationType"; +const _LVR = "ListVersionsResult"; +const _M = "Metadata"; +const _MAO = "MetricsAndOperator"; +const _MAS = "MaxAgeSeconds"; +const _MB = "MaxBuckets"; +const _MC = "MetricsConfiguration"; +const _MCL = "MetricsConfigurationList"; +const _MD = "MetadataDirective"; +const _MDB = "MaxDirectoryBuckets"; +const _MDf = "MfaDelete"; +const _ME = "MetadataEntry"; +const _MF = "MetricsFilter"; +const _MFA = "MFA"; +const _MFAD = "MFADelete"; +const _MFADS = "MFADeleteStatus"; +const _MI = "MetricsId"; +const _MK = "MetadataKey"; +const _MKa = "MaxKeys"; +const _MM = "MissingMeta"; +const _MOS = "MpuObjectSize"; +const _MP = "MaxParts"; +const _MS = "MetricsStatus"; +const _MTC = "MetadataTableConfiguration"; +const _MTCR = "MetadataTableConfigurationResult"; +const _MTS = "MetadataTableStatus"; +const _MU = "MaxUploads"; +const _MUI = "MultipartUploadId"; +const _MUL = "MultipartUploadList"; +const _MUu = "MultipartUpload"; +const _MV = "MetadataValue"; +const _Ma = "Marker"; +const _Me = "Message"; +const _Met = "Metrics"; +const _Mi = "Minutes"; +const _Mo = "Mode"; +const _N = "Name"; +const _NC = "NotificationConfiguration"; +const _NCF = "NotificationConfigurationFilter"; +const _NCT = "NextContinuationToken"; +const _ND = "NoncurrentDays"; +const _NF = "NotFound"; +const _NI = "NotificationId"; +const _NKM = "NextKeyMarker"; +const _NM = "NextMarker"; +const _NNV = "NewerNoncurrentVersions"; +const _NPNM = "NextPartNumberMarker"; +const _NSB = "NoSuchBucket"; +const _NSK = "NoSuchKey"; +const _NSU = "NoSuchUpload"; +const _NT = "NextToken"; +const _NUIM = "NextUploadIdMarker"; +const _NVE = "NoncurrentVersionExpiration"; +const _NVIM = "NextVersionIdMarker"; +const _NVT = "NoncurrentVersionTransitions"; +const _NVTL = "NoncurrentVersionTransitionList"; +const _NVTo = "NoncurrentVersionTransition"; +const _O = "Owner"; +const _OA = "ObjectAttributes"; +const _OAIATE = "ObjectAlreadyInActiveTierError"; +const _OAL = "ObjectAttributesList"; +const _OC = "OwnershipControls"; +const _OCACL = "ObjectCannedACL"; +const _OCR = "OwnershipControlsRule"; +const _OCRw = "OwnershipControlsRules"; +const _OF = "OptionalFields"; +const _OI = "ObjectIdentifier"; +const _OIL = "ObjectIdentifierList"; +const _OK = "ObjectKey"; +const _OL = "OutputLocation"; +const _OLC = "ObjectLockConfiguration"; +const _OLE = "ObjectLockEnabled"; +const _OLEFB = "ObjectLockEnabledForBucket"; +const _OLLH = "ObjectLockLegalHold"; +const _OLLHS = "ObjectLockLegalHoldStatus"; +const _OLM = "ObjectLockMode"; +const _OLR = "ObjectLockRetention"; +const _OLRM = "ObjectLockRetentionMode"; +const _OLRUD = "ObjectLockRetainUntilDate"; +const _OLRb = "ObjectLockRule"; +const _OLT = "ObjectLockToken"; +const _OLb = "ObjectList"; +const _ONIATE = "ObjectNotInActiveTierError"; +const _OO = "ObjectOwnership"; +const _OOA = "OptionalObjectAttributes"; +const _OOAL = "OptionalObjectAttributesList"; +const _OOw = "OwnerOverride"; +const _OP = "ObjectParts"; +const _OPb = "ObjectPart"; +const _OS = "ObjectSize"; +const _OSC = "ObjectStorageClass"; +const _OSGT = "ObjectSizeGreaterThan"; +const _OSGTB = "ObjectSizeGreaterThanBytes"; +const _OSLT = "ObjectSizeLessThan"; +const _OSLTB = "ObjectSizeLessThanBytes"; +const _OSV = "OutputSchemaVersion"; +const _OSu = "OutputSerialization"; +const _OV = "ObjectVersion"; +const _OVI = "ObjectVersionId"; +const _OVL = "ObjectVersionList"; +const _OVSC = "ObjectVersionStorageClass"; +const _Ob = "Objects"; +const _Obj = "Object"; +const _P = "Permission"; +const _PABC = "PublicAccessBlockConfiguration"; +const _PBA = "PutBucketAcl"; +const _PBAC = "PutBucketAccelerateConfiguration"; +const _PBACR = "PutBucketAccelerateConfigurationRequest"; +const _PBACRu = "PutBucketAnalyticsConfigurationRequest"; +const _PBACu = "PutBucketAnalyticsConfiguration"; +const _PBAR = "PutBucketAclRequest"; +const _PBC = "PutBucketCors"; +const _PBCR = "PutBucketCorsRequest"; +const _PBE = "PutBucketEncryption"; +const _PBER = "PutBucketEncryptionRequest"; +const _PBIC = "PutBucketInventoryConfiguration"; +const _PBICR = "PutBucketInventoryConfigurationRequest"; +const _PBITC = "PutBucketIntelligentTieringConfiguration"; +const _PBITCR = "PutBucketIntelligentTieringConfigurationRequest"; +const _PBL = "PutBucketLogging"; +const _PBLC = "PutBucketLifecycleConfiguration"; +const _PBLCO = "PutBucketLifecycleConfigurationOutput"; +const _PBLCR = "PutBucketLifecycleConfigurationRequest"; +const _PBLR = "PutBucketLoggingRequest"; +const _PBMC = "PutBucketMetricsConfiguration"; +const _PBMCR = "PutBucketMetricsConfigurationRequest"; +const _PBNC = "PutBucketNotificationConfiguration"; +const _PBNCR = "PutBucketNotificationConfigurationRequest"; +const _PBOC = "PutBucketOwnershipControls"; +const _PBOCR = "PutBucketOwnershipControlsRequest"; +const _PBP = "PutBucketPolicy"; +const _PBPR = "PutBucketPolicyRequest"; +const _PBR = "PutBucketReplication"; +const _PBRP = "PutBucketRequestPayment"; +const _PBRPR = "PutBucketRequestPaymentRequest"; +const _PBRR = "PutBucketReplicationRequest"; +const _PBT = "PutBucketTagging"; +const _PBTR = "PutBucketTaggingRequest"; +const _PBV = "PutBucketVersioning"; +const _PBVR = "PutBucketVersioningRequest"; +const _PBW = "PutBucketWebsite"; +const _PBWR = "PutBucketWebsiteRequest"; +const _PC = "PartsCount"; +const _PDS = "PartitionDateSource"; +const _PE = "ProgressEvent"; +const _PI = "ParquetInput"; +const _PL = "PartsList"; +const _PN = "PartNumber"; +const _PNM = "PartNumberMarker"; +const _PO = "PutObject"; +const _POA = "PutObjectAcl"; +const _POAO = "PutObjectAclOutput"; +const _POAR = "PutObjectAclRequest"; +const _POLC = "PutObjectLockConfiguration"; +const _POLCO = "PutObjectLockConfigurationOutput"; +const _POLCR = "PutObjectLockConfigurationRequest"; +const _POLH = "PutObjectLegalHold"; +const _POLHO = "PutObjectLegalHoldOutput"; +const _POLHR = "PutObjectLegalHoldRequest"; +const _POO = "PutObjectOutput"; +const _POR = "PutObjectRequest"; +const _PORO = "PutObjectRetentionOutput"; +const _PORR = "PutObjectRetentionRequest"; +const _PORu = "PutObjectRetention"; +const _POT = "PutObjectTagging"; +const _POTO = "PutObjectTaggingOutput"; +const _POTR = "PutObjectTaggingRequest"; +const _PP = "PartitionedPrefix"; +const _PPAB = "PutPublicAccessBlock"; +const _PPABR = "PutPublicAccessBlockRequest"; +const _PS = "PolicyStatus"; +const _Pa = "Payer"; +const _Par = "Parts"; +const _Parq = "Parquet"; +const _Part = "Part"; +const _Pay = "Payload"; +const _Po = "Policy"; +const _Pr = "Prefix"; +const _Pri = "Priority"; +const _Pro = "Protocol"; +const _Prog = "Progress"; +const _Q = "Quiet"; +const _QA = "QueueArn"; +const _QC = "QuoteCharacter"; +const _QCL = "QueueConfigurationList"; +const _QCu = "QueueConfigurations"; +const _QCue = "QueueConfiguration"; +const _QEC = "QuoteEscapeCharacter"; +const _QF = "QuoteFields"; +const _Qu = "Queue"; +const _R = "Role"; +const _RART = "RedirectAllRequestsTo"; +const _RC = "RequestCharged"; +const _RCC = "ResponseCacheControl"; +const _RCD = "ResponseContentDisposition"; +const _RCE = "ResponseContentEncoding"; +const _RCL = "ResponseContentLanguage"; +const _RCT = "ResponseContentType"; +const _RCe = "ReplicationConfiguration"; +const _RD = "RecordDelimiter"; +const _RE = "ResponseExpires"; +const _RED = "RestoreExpiryDate"; +const _REe = "RecordsEvent"; +const _RKKID = "ReplicaKmsKeyID"; +const _RKPW = "ReplaceKeyPrefixWith"; +const _RKW = "ReplaceKeyWith"; +const _RM = "ReplicaModifications"; +const _RMS = "ReplicaModificationsStatus"; +const _RO = "RestoreObject"; +const _ROO = "RestoreObjectOutput"; +const _ROP = "RestoreOutputPath"; +const _ROR = "RestoreObjectRequest"; +const _RP = "RequestPayer"; +const _RPB = "RestrictPublicBuckets"; +const _RPC = "RequestPaymentConfiguration"; +const _RPe = "RequestProgress"; +const _RR = "RequestRoute"; +const _RRAO = "ReplicationRuleAndOperator"; +const _RRF = "ReplicationRuleFilter"; +const _RRS = "ReplicationRuleStatus"; +const _RRT = "RestoreRequestType"; +const _RRe = "ReplicationRule"; +const _RRep = "ReplicationRules"; +const _RRes = "RestoreRequest"; +const _RRo = "RoutingRules"; +const _RRou = "RoutingRule"; +const _RS = "ReplicationStatus"; +const _RSe = "RestoreStatus"; +const _RT = "RequestToken"; +const _RTS = "ReplicationTimeStatus"; +const _RTV = "ReplicationTimeValue"; +const _RTe = "ReplicationTime"; +const _RUD = "RetainUntilDate"; +const _Ra = "Range"; +const _Re = "Restore"; +const _Rec = "Records"; +const _Red = "Redirect"; +const _Reg = "Region"; +const _Ret = "Retention"; +const _Ru = "Rules"; +const _Rul = "Rule"; +const _S = "Size"; +const _SA = "StartAfter"; +const _SAK = "SecretAccessKey"; +const _SB = "StreamingBlob"; +const _SBD = "S3BucketDestination"; +const _SC = "StorageClass"; +const _SCA = "StorageClassAnalysis"; +const _SCADE = "StorageClassAnalysisDataExport"; +const _SCASV = "StorageClassAnalysisSchemaVersion"; +const _SCV = "SessionCredentialValue"; +const _SCe = "SessionCredentials"; +const _SCt = "StatusCode"; +const _SDV = "SkipDestinationValidation"; +const _SE = "SessionExpiration"; +const _SEt = "StatsEvent"; +const _SK = "SSE-KMS"; +const _SKEO = "SseKmsEncryptedObjects"; +const _SKEOS = "SseKmsEncryptedObjectsStatus"; +const _SKF = "S3KeyFilter"; +const _SKe = "S3Key"; +const _SL = "S3Location"; +const _SM = "SessionMode"; +const _SOC = "SelectObjectContent"; +const _SOCES = "SelectObjectContentEventStream"; +const _SOCO = "SelectObjectContentOutput"; +const _SOCR = "SelectObjectContentRequest"; +const _SP = "SelectParameters"; +const _SPi = "SimplePrefix"; +const _SR = "ScanRange"; +const _SS = "SSE-S3"; +const _SSC = "SourceSelectionCriteria"; +const _SSE = "ServerSideEncryption"; +const _SSEA = "SSEAlgorithm"; +const _SSEBD = "ServerSideEncryptionByDefault"; +const _SSEC = "ServerSideEncryptionConfiguration"; +const _SSECA = "SSECustomerAlgorithm"; +const _SSECK = "SSECustomerKey"; +const _SSECKMD = "SSECustomerKeyMD5"; +const _SSEKMS = "SSEKMS"; +const _SSEKMSEC = "SSEKMSEncryptionContext"; +const _SSEKMSKI = "SSEKMSKeyId"; +const _SSER = "ServerSideEncryptionRule"; +const _SSERe = "ServerSideEncryptionRules"; +const _SSES = "SSES3"; +const _ST = "SessionToken"; +const _STA = "S3TablesArn"; +const _STBA = "S3TablesBucketArn"; +const _STD = "S3TablesDestination"; +const _STDR = "S3TablesDestinationResult"; +const _STN = "S3TablesName"; +const _STNa = "S3TablesNamespace"; +const _SV = "SkipValidation"; +const _S_ = "S3"; +const _Sc = "Schedule"; +const _Se = "Setting"; +const _St = "Start"; +const _Sta = "Status"; +const _Stat = "Stats"; +const _Su = "Suffix"; +const _T = "Type"; +const _TA = "TopicArn"; +const _TAa = "TableArn"; +const _TB = "TargetBucket"; +const _TBA = "TableBucketArn"; +const _TC = "TagCount"; +const _TCL = "TopicConfigurationList"; +const _TCo = "TopicConfigurations"; +const _TCop = "TopicConfiguration"; +const _TD = "TaggingDirective"; +const _TDMOS = "TransitionDefaultMinimumObjectSize"; +const _TG = "TargetGrants"; +const _TGa = "TargetGrant"; +const _TH = "TaggingHeader"; +const _TL = "TieringList"; +const _TLr = "TransitionList"; +const _TMP = "TooManyParts"; +const _TN = "TableName"; +const _TNa = "TableNamespace"; +const _TOKF = "TargetObjectKeyFormat"; +const _TP = "TargetPrefix"; +const _TPC = "TotalPartsCount"; +const _TS = "TagSet"; +const _TSC = "TransitionStorageClass"; +const _Ta = "Tags"; +const _Tag = "Tag"; +const _Tagg = "Tagging"; +const _Ti = "Tier"; +const _Tie = "Tierings"; +const _Tier = "Tiering"; +const _Tim = "Time"; +const _To = "Token"; +const _Top = "Topic"; +const _Tr = "Transitions"; +const _Tra = "Transition"; +const _U = "Uploads"; +const _UI = "UploadId"; +const _UIM = "UploadIdMarker"; +const _UM = "UserMetadata"; +const _UP = "UploadPart"; +const _UPC = "UploadPartCopy"; +const _UPCO = "UploadPartCopyOutput"; +const _UPCR = "UploadPartCopyRequest"; +const _UPO = "UploadPartOutput"; +const _UPR = "UploadPartRequest"; +const _URI = "URI"; +const _Up = "Upload"; +const _V = "Value"; +const _VC = "VersionCount"; +const _VCe = "VersioningConfiguration"; +const _VI = "VersionId"; +const _VIM = "VersionIdMarker"; +const _Ve = "Versions"; +const _Ver = "Version"; +const _WC = "WebsiteConfiguration"; +const _WGOR = "WriteGetObjectResponse"; +const _WGORR = "WriteGetObjectResponseRequest"; +const _WOB = "WriteOffsetBytes"; +const _WRL = "WebsiteRedirectLocation"; +const _Y = "Years"; +const _ar = "accept-ranges"; +const _br = "bucket-region"; +const _c = "client"; +const _ct = "continuation-token"; +const _d = "delimiter"; +const _e = "error"; +const _eP = "eventPayload"; +const _en = "endpoint"; +const _et = "encoding-type"; +const _fo = "fetch-owner"; +const _h = "http"; +const _hE = "httpError"; +const _hH = "httpHeader"; +const _hL = "hostLabel"; +const _hP = "httpPayload"; +const _hPH = "httpPrefixHeaders"; +const _hQ = "httpQuery"; +const _hi = "http://www.w3.org/2001/XMLSchema-instance"; +const _i = "id"; +const _km = "key-marker"; +const _m = "marker"; +const _mb = "max-buckets"; +const _mdb = "max-directory-buckets"; +const _mk = "max-keys"; +const _mp = "max-parts"; +const _mu = "max-uploads"; +const _p = "prefix"; +const _pN = "partNumber"; +const _pnm = "part-number-marker"; +const _rcc = "response-cache-control"; +const _rcd = "response-content-disposition"; +const _rce = "response-content-encoding"; +const _rcl = "response-content-language"; +const _rct = "response-content-type"; +const _re = "response-expires"; +const _s = "streaming"; +const _sa = "start-after"; +const _uI = "uploadId"; +const _uim = "upload-id-marker"; +const _vI = "versionId"; +const _vim = "version-id-marker"; +const _x = "xsi"; +const _xA = "xmlAttribute"; +const _xF = "xmlFlattened"; +const _xN = "xmlName"; +const _xNm = "xmlNamespace"; +const _xaa = "x-amz-acl"; +const _xaad = "x-amz-abort-date"; +const _xaapa = "x-amz-access-point-alias"; +const _xaari = "x-amz-abort-rule-id"; +const _xaas = "x-amz-archive-status"; +const _xabgr = "x-amz-bypass-governance-retention"; +const _xabln = "x-amz-bucket-location-name"; +const _xablt = "x-amz-bucket-location-type"; +const _xabole = "x-amz-bucket-object-lock-enabled"; +const _xabolt = "x-amz-bucket-object-lock-token"; +const _xabr = "x-amz-bucket-region"; +const _xaca = "x-amz-checksum-algorithm"; +const _xacc = "x-amz-checksum-crc32"; +const _xacc_ = "x-amz-checksum-crc32c"; +const _xacc__ = "x-amz-checksum-crc64nvme"; +const _xacm = "x-amz-checksum-mode"; +const _xacrsba = "x-amz-confirm-remove-self-bucket-access"; +const _xacs = "x-amz-checksum-sha1"; +const _xacs_ = "x-amz-checksum-sha256"; +const _xacs__ = "x-amz-copy-source"; +const _xacsim = "x-amz-copy-source-if-match"; +const _xacsims = "x-amz-copy-source-if-modified-since"; +const _xacsinm = "x-amz-copy-source-if-none-match"; +const _xacsius = "x-amz-copy-source-if-unmodified-since"; +const _xacsm = "x-amz-create-session-mode"; +const _xacsr = "x-amz-copy-source-range"; +const _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; +const _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; +const _xacssseckM = "x-amz-copy-source-server-side-encryption-customer-key-MD5"; +const _xacsvi = "x-amz-copy-source-version-id"; +const _xact = "x-amz-checksum-type"; +const _xadm = "x-amz-delete-marker"; +const _xae = "x-amz-expiration"; +const _xaebo = "x-amz-expected-bucket-owner"; +const _xafec = "x-amz-fwd-error-code"; +const _xafem = "x-amz-fwd-error-message"; +const _xafhCC = "x-amz-fwd-header-Cache-Control"; +const _xafhCD = "x-amz-fwd-header-Content-Disposition"; +const _xafhCE = "x-amz-fwd-header-Content-Encoding"; +const _xafhCL = "x-amz-fwd-header-Content-Language"; +const _xafhCR = "x-amz-fwd-header-Content-Range"; +const _xafhCT = "x-amz-fwd-header-Content-Type"; +const _xafhE = "x-amz-fwd-header-ETag"; +const _xafhE_ = "x-amz-fwd-header-Expires"; +const _xafhLM = "x-amz-fwd-header-Last-Modified"; +const _xafhar = "x-amz-fwd-header-accept-ranges"; +const _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; +const _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; +const _xafhxacc__ = "x-amz-fwd-header-x-amz-checksum-crc64nvme"; +const _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; +const _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; +const _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; +const _xafhxae = "x-amz-fwd-header-x-amz-expiration"; +const _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; +const _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; +const _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; +const _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; +const _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; +const _xafhxar = "x-amz-fwd-header-x-amz-restore"; +const _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; +const _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; +const _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; +const _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; +const _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; +const _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; +const _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; +const _xafhxasseckM = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"; +const _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; +const _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; +const _xafs = "x-amz-fwd-status"; +const _xagfc = "x-amz-grant-full-control"; +const _xagr = "x-amz-grant-read"; +const _xagra = "x-amz-grant-read-acp"; +const _xagw = "x-amz-grant-write"; +const _xagwa = "x-amz-grant-write-acp"; +const _xaimit = "x-amz-if-match-initiated-time"; +const _xaimlmt = "x-amz-if-match-last-modified-time"; +const _xaims = "x-amz-if-match-size"; +const _xam = "x-amz-meta-"; +const _xam_ = "x-amz-mfa"; +const _xamd = "x-amz-metadata-directive"; +const _xamm = "x-amz-missing-meta"; +const _xamos = "x-amz-mp-object-size"; +const _xamp = "x-amz-max-parts"; +const _xampc = "x-amz-mp-parts-count"; +const _xaoa = "x-amz-object-attributes"; +const _xaollh = "x-amz-object-lock-legal-hold"; +const _xaolm = "x-amz-object-lock-mode"; +const _xaolrud = "x-amz-object-lock-retain-until-date"; +const _xaoo = "x-amz-object-ownership"; +const _xaooa = "x-amz-optional-object-attributes"; +const _xaos = "x-amz-object-size"; +const _xapnm = "x-amz-part-number-marker"; +const _xar = "x-amz-restore"; +const _xarc = "x-amz-request-charged"; +const _xarop = "x-amz-restore-output-path"; +const _xarp = "x-amz-request-payer"; +const _xarr = "x-amz-request-route"; +const _xars = "x-amz-replication-status"; +const _xart = "x-amz-request-token"; +const _xasc = "x-amz-storage-class"; +const _xasca = "x-amz-sdk-checksum-algorithm"; +const _xasdv = "x-amz-skip-destination-validation"; +const _xasebo = "x-amz-source-expected-bucket-owner"; +const _xasse = "x-amz-server-side-encryption"; +const _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; +const _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; +const _xassec = "x-amz-server-side-encryption-context"; +const _xasseca = "x-amz-server-side-encryption-customer-algorithm"; +const _xasseck = "x-amz-server-side-encryption-customer-key"; +const _xasseckM = "x-amz-server-side-encryption-customer-key-MD5"; +const _xat = "x-amz-tagging"; +const _xatc = "x-amz-tagging-count"; +const _xatd = "x-amz-tagging-directive"; +const _xatdmos = "x-amz-transition-default-minimum-object-size"; +const _xavi = "x-amz-version-id"; +const _xawob = "x-amz-write-offset-bytes"; +const _xawrl = "x-amz-website-redirect-location"; +const _xs = "xsi:type"; +const n0 = "com.amazonaws.s3"; + +// smithy-typescript generated code +import { error, list, op, sim, struct, struct as uni } from "@smithy/core/schema"; + +import { + BucketAlreadyExists as __BucketAlreadyExists, + BucketAlreadyOwnedByYou as __BucketAlreadyOwnedByYou, + EncryptionTypeMismatch as __EncryptionTypeMismatch, + InvalidObjectState as __InvalidObjectState, + InvalidRequest as __InvalidRequest, + InvalidWriteOffset as __InvalidWriteOffset, + NoSuchBucket as __NoSuchBucket, + NoSuchKey as __NoSuchKey, + NoSuchUpload as __NoSuchUpload, + NotFound as __NotFound, + ObjectAlreadyInActiveTierError as __ObjectAlreadyInActiveTierError, + ObjectNotInActiveTierError as __ObjectNotInActiveTierError, + TooManyParts as __TooManyParts, +} from "../models/index"; +import { S3ServiceException as __S3ServiceException } from "../models/S3ServiceException"; + +/* eslint no-var: 0 */ + +export var CopySourceSSECustomerKey = sim(n0, _CSSSECK, 0, 8); +export var SessionCredentialValue = sim(n0, _SCV, 0, 8); +export var SSECustomerKey = sim(n0, _SSECK, 0, 8); +export var SSEKMSEncryptionContext = sim(n0, _SSEKMSEC, 0, 8); +export var SSEKMSKeyId = sim(n0, _SSEKMSKI, 0, 8); +export var StreamingBlob = sim(n0, _SB, 42, { + [_s]: 1, +}); +export var AbortIncompleteMultipartUpload = struct(n0, _AIMU, 0, [_DAI], [1]); +export var AbortMultipartUploadOutput = struct( + n0, + _AMUO, + 0, + [_RC], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var AbortMultipartUploadRequest = struct( + n0, + _AMUR, + 0, + [_Bu, _K, _UI, _RP, _EBO, _IMIT], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _uI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 6, + { + [_hH]: _xaimit, + }, + ], + ] +); +export var AccelerateConfiguration = struct(n0, _AC, 0, [_Sta], [0]); +export var AccessControlPolicy = struct( + n0, + _ACP, + 0, + [_G, _O], + [ + [ + () => Grants, + { + [_xN]: _ACL, + }, + ], + () => Owner, + ] +); +export var AccessControlTranslation = struct(n0, _ACT, 0, [_O], [0]); +export var AnalyticsAndOperator = struct( + n0, + _AAO, + 0, + [_Pr, _Ta], + [ + 0, + [ + () => TagSet, + { + [_xN]: _Tag, + [_xF]: 1, + }, + ], + ] +); +export var AnalyticsConfiguration = struct( + n0, + _ACn, + 0, + [_Id, _F, _SCA], + [0, [() => AnalyticsFilter, 0], () => StorageClassAnalysis] +); +export var AnalyticsExportDestination = struct(n0, _AED, 0, [_SBD], [() => AnalyticsS3BucketDestination]); +export var AnalyticsS3BucketDestination = struct(n0, _ASBD, 0, [_Fo, _BAI, _Bu, _Pr], [0, 0, 0, 0]); +export var Bucket = struct(n0, _Bu, 0, [_N, _CDr, _BR], [0, 4, 0]); +export var BucketAlreadyExists = error( + n0, + _BAE, + { + [_e]: _c, + [_hE]: 409, + }, + [], + [], + + __BucketAlreadyExists +); +export var BucketAlreadyOwnedByYou = error( + n0, + _BAOBY, + { + [_e]: _c, + [_hE]: 409, + }, + [], + [], + + __BucketAlreadyOwnedByYou +); +export var BucketInfo = struct(n0, _BI, 0, [_DR, _T], [0, 0]); +export var BucketLifecycleConfiguration = struct( + n0, + _BLCu, + 0, + [_Ru], + [ + [ + () => LifecycleRules, + { + [_xN]: _Rul, + [_xF]: 1, + }, + ], + ] +); +export var BucketLoggingStatus = struct(n0, _BLS, 0, [_LE], [[() => LoggingEnabled, 0]]); +export var Checksum = struct(n0, _Ch, 0, [_CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA, _CT], [0, 0, 0, 0, 0, 0]); +export var CommonPrefix = struct(n0, _CP, 0, [_Pr], [0]); +export var CompletedMultipartUpload = struct( + n0, + _CMU, + 0, + [_Par], + [ + [ + () => CompletedPartList, + { + [_xN]: _Part, + [_xF]: 1, + }, + ], + ] +); +export var CompletedPart = struct( + n0, + _CPo, + 0, + [_ET, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA, _PN], + [0, 0, 0, 0, 0, 0, 1] +); +export var CompleteMultipartUploadOutput = struct( + n0, + _CMUO, + { + [_xN]: _CMUR, + }, + [_L, _Bu, _K, _E, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA, _CT, _SSE, _VI, _SSEKMSKI, _BKE, _RC], + [ + 0, + 0, + 0, + [ + 0, + { + [_hH]: _xae, + }, + ], + 0, + 0, + 0, + 0, + 0, + 0, + 0, + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var CompleteMultipartUploadRequest = struct( + n0, + _CMURo, + 0, + [ + _Bu, + _K, + _MUu, + _UI, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _CT, + _MOS, + _RP, + _EBO, + _IM, + _INM, + _SSECA, + _SSECK, + _SSECKMD, + ], + [ + [0, 1], + [0, 1], + [ + () => CompletedMultipartUpload, + { + [_xN]: _CMUo, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hQ]: _uI, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + [ + 1, + { + [_hH]: _xamos, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _IM_, + }, + ], + [ + 0, + { + [_hH]: _INM_, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + ] +); +export var Condition = struct(n0, _Con, 0, [_HECRE, _KPE], [0, 0]); +export var ContinuationEvent = struct(n0, _CEo, 0, [], []); +export var CopyObjectOutput = struct( + n0, + _COO, + 0, + [_COR, _E, _CSVI, _VI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC], + [ + [() => CopyObjectResult, 16], + [ + 0, + { + [_hH]: _xae, + }, + ], + [ + 0, + { + [_hH]: _xacsvi, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var CopyObjectRequest = struct( + n0, + _CORo, + 0, + [ + _ACL_, + _Bu, + _CC, + _CA, + _CD, + _CE, + _CL, + _CTo, + _CS, + _CSIM, + _CSIMS, + _CSINM, + _CSIUS, + _Ex, + _GFC, + _GR, + _GRACP, + _GWACP, + _K, + _M, + _MD, + _TD, + _SSE, + _SC, + _WRL, + _SSECA, + _SSECK, + _SSECKMD, + _SSEKMSKI, + _SSEKMSEC, + _BKE, + _CSSSECA, + _CSSSECK, + _CSSSECKMD, + _RP, + _Tagg, + _OLM, + _OLRUD, + _OLLHS, + _EBO, + _ESBO, + ], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _CC_, + }, + ], + [ + 0, + { + [_hH]: _xaca, + }, + ], + [ + 0, + { + [_hH]: _CD_, + }, + ], + [ + 0, + { + [_hH]: _CE_, + }, + ], + [ + 0, + { + [_hH]: _CL_, + }, + ], + [ + 0, + { + [_hH]: _CT_, + }, + ], + [ + 0, + { + [_hH]: _xacs__, + }, + ], + [ + 0, + { + [_hH]: _xacsim, + }, + ], + [ + 4, + { + [_hH]: _xacsims, + }, + ], + [ + 0, + { + [_hH]: _xacsinm, + }, + ], + [ + 4, + { + [_hH]: _xacsius, + }, + ], + [ + 4, + { + [_hH]: _Ex, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [0, 1], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xamd, + }, + ], + [ + 0, + { + [_hH]: _xatd, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasc, + }, + ], + [ + 0, + { + [_hH]: _xawrl, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xacssseca, + }, + ], + [ + () => CopySourceSSECustomerKey, + { + [_hH]: _xacssseck, + }, + ], + [ + 0, + { + [_hH]: _xacssseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xat, + }, + ], + [ + 0, + { + [_hH]: _xaolm, + }, + ], + [ + 5, + { + [_hH]: _xaolrud, + }, + ], + [ + 0, + { + [_hH]: _xaollh, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xasebo, + }, + ], + ] +); +export var CopyObjectResult = struct( + n0, + _COR, + 0, + [_ET, _LM, _CT, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA], + [0, 4, 0, 0, 0, 0, 0, 0] +); +export var CopyPartResult = struct( + n0, + _CPR, + 0, + [_ET, _LM, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA], + [0, 4, 0, 0, 0, 0, 0] +); +export var CORSConfiguration = struct( + n0, + _CORSC, + 0, + [_CORSR], + [ + [ + () => CORSRules, + { + [_xN]: _CORSRu, + [_xF]: 1, + }, + ], + ] +); +export var CORSRule = struct( + n0, + _CORSRu, + 0, + [_ID, _AH, _AM, _AO, _EH, _MAS], + [ + 0, + [ + 64 | 0, + { + [_xN]: _AHl, + [_xF]: 1, + }, + ], + [ + 64 | 0, + { + [_xN]: _AMl, + [_xF]: 1, + }, + ], + [ + 64 | 0, + { + [_xN]: _AOl, + [_xF]: 1, + }, + ], + [ + 64 | 0, + { + [_xN]: _EHx, + [_xF]: 1, + }, + ], + 1, + ] +); +export var CreateBucketConfiguration = struct(n0, _CBC, 0, [_LC, _L, _Bu], [0, () => LocationInfo, () => BucketInfo]); +export var CreateBucketMetadataTableConfigurationRequest = struct( + n0, + _CBMTCR, + 0, + [_Bu, _CMD, _CA, _MTC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => MetadataTableConfiguration, + { + [_xN]: _MTC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var CreateBucketOutput = struct( + n0, + _CBO, + 0, + [_L], + [ + [ + 0, + { + [_hH]: _L, + }, + ], + ] +); +export var CreateBucketRequest = struct( + n0, + _CBR, + 0, + [_ACL_, _Bu, _CBC, _GFC, _GR, _GRACP, _GW, _GWACP, _OLEFB, _OO], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [0, 1], + [ + () => CreateBucketConfiguration, + { + [_xN]: _CBC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagw, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [ + 2, + { + [_hH]: _xabole, + }, + ], + [ + 0, + { + [_hH]: _xaoo, + }, + ], + ] +); +export var CreateMultipartUploadOutput = struct( + n0, + _CMUOr, + { + [_xN]: _IMUR, + }, + [_AD, _ARI, _Bu, _K, _UI, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _SSEKMSEC, _BKE, _RC, _CA, _CT], + [ + [ + 4, + { + [_hH]: _xaad, + }, + ], + [ + 0, + { + [_hH]: _xaari, + }, + ], + [ + 0, + { + [_xN]: _Bu, + }, + ], + 0, + 0, + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + [ + 0, + { + [_hH]: _xaca, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + ] +); +export var CreateMultipartUploadRequest = struct( + n0, + _CMURr, + 0, + [ + _ACL_, + _Bu, + _CC, + _CD, + _CE, + _CL, + _CTo, + _Ex, + _GFC, + _GR, + _GRACP, + _GWACP, + _K, + _M, + _SSE, + _SC, + _WRL, + _SSECA, + _SSECK, + _SSECKMD, + _SSEKMSKI, + _SSEKMSEC, + _BKE, + _RP, + _Tagg, + _OLM, + _OLRUD, + _OLLHS, + _EBO, + _CA, + _CT, + ], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _CC_, + }, + ], + [ + 0, + { + [_hH]: _CD_, + }, + ], + [ + 0, + { + [_hH]: _CE_, + }, + ], + [ + 0, + { + [_hH]: _CL_, + }, + ], + [ + 0, + { + [_hH]: _CT_, + }, + ], + [ + 4, + { + [_hH]: _Ex, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [0, 1], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasc, + }, + ], + [ + 0, + { + [_hH]: _xawrl, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xat, + }, + ], + [ + 0, + { + [_hH]: _xaolm, + }, + ], + [ + 5, + { + [_hH]: _xaolrud, + }, + ], + [ + 0, + { + [_hH]: _xaollh, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xaca, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + ] +); +export var CreateSessionOutput = struct( + n0, + _CSO, + { + [_xN]: _CSRr, + }, + [_SSE, _SSEKMSKI, _SSEKMSEC, _BKE, _Cr], + [ + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + () => SessionCredentials, + { + [_xN]: _Cr, + }, + ], + ] +); +export var CreateSessionRequest = struct( + n0, + _CSRre, + 0, + [_SM, _Bu, _SSE, _SSEKMSKI, _SSEKMSEC, _BKE], + [ + [ + 0, + { + [_hH]: _xacsm, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + ] +); +export var CSVInput = struct(n0, _CSVIn, 0, [_FHI, _Co, _QEC, _RD, _FD, _QC, _AQRD], [0, 0, 0, 0, 0, 0, 2]); +export var CSVOutput = struct(n0, _CSVO, 0, [_QF, _QEC, _RD, _FD, _QC], [0, 0, 0, 0, 0]); +export var DefaultRetention = struct(n0, _DRe, 0, [_Mo, _Da, _Y], [0, 1, 1]); +export var Delete = struct( + n0, + _Del, + 0, + [_Ob, _Q], + [ + [ + () => ObjectIdentifierList, + { + [_xN]: _Obj, + [_xF]: 1, + }, + ], + 2, + ] +); +export var DeleteBucketAnalyticsConfigurationRequest = struct( + n0, + _DBACR, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketCorsRequest = struct( + n0, + _DBCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketEncryptionRequest = struct( + n0, + _DBER, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketIntelligentTieringConfigurationRequest = struct( + n0, + _DBITCR, + 0, + [_Bu, _Id], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + ] +); +export var DeleteBucketInventoryConfigurationRequest = struct( + n0, + _DBICR, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketLifecycleRequest = struct( + n0, + _DBLR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketMetadataTableConfigurationRequest = struct( + n0, + _DBMTCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketMetricsConfigurationRequest = struct( + n0, + _DBMCR, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketOwnershipControlsRequest = struct( + n0, + _DBOCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketPolicyRequest = struct( + n0, + _DBPR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketReplicationRequest = struct( + n0, + _DBRR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketRequest = struct( + n0, + _DBR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketTaggingRequest = struct( + n0, + _DBTR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeleteBucketWebsiteRequest = struct( + n0, + _DBWR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeletedObject = struct(n0, _DO, 0, [_K, _VI, _DM, _DMVI], [0, 0, 2, 0]); +export var DeleteMarkerEntry = struct(n0, _DME, 0, [_O, _K, _VI, _IL, _LM], [() => Owner, 0, 0, 2, 4]); +export var DeleteMarkerReplication = struct(n0, _DMR, 0, [_Sta], [0]); +export var DeleteObjectOutput = struct( + n0, + _DOO, + 0, + [_DM, _VI, _RC], + [ + [ + 2, + { + [_hH]: _xadm, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var DeleteObjectRequest = struct( + n0, + _DOR, + 0, + [_Bu, _K, _MFA, _VI, _RP, _BGR, _EBO, _IM, _IMLMT, _IMS], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hH]: _xam_, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 2, + { + [_hH]: _xabgr, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _IM_, + }, + ], + [ + 6, + { + [_hH]: _xaimlmt, + }, + ], + [ + 1, + { + [_hH]: _xaims, + }, + ], + ] +); +export var DeleteObjectsOutput = struct( + n0, + _DOOe, + { + [_xN]: _DRel, + }, + [_Dele, _RC, _Er], + [ + [ + () => DeletedObjects, + { + [_xF]: 1, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + [ + () => Errors, + { + [_xN]: _Err, + [_xF]: 1, + }, + ], + ] +); +export var DeleteObjectsRequest = struct( + n0, + _DORe, + 0, + [_Bu, _Del, _MFA, _RP, _BGR, _EBO, _CA], + [ + [0, 1], + [ + () => Delete, + { + [_xN]: _Del, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xam_, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 2, + { + [_hH]: _xabgr, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + ] +); +export var DeleteObjectTaggingOutput = struct( + n0, + _DOTO, + 0, + [_VI], + [ + [ + 0, + { + [_hH]: _xavi, + }, + ], + ] +); +export var DeleteObjectTaggingRequest = struct( + n0, + _DOTR, + 0, + [_Bu, _K, _VI, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var DeletePublicAccessBlockRequest = struct( + n0, + _DPABR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var Destination = struct( + n0, + _Dest, + 0, + [_Bu, _A, _SC, _ACT, _ECn, _RTe, _Met], + [0, 0, 0, () => AccessControlTranslation, () => EncryptionConfiguration, () => ReplicationTime, () => Metrics] +); +export var Encryption = struct(n0, _Enc, 0, [_ETnc, _KMSKI, _KMSC], [0, [() => SSEKMSKeyId, 0], 0]); +export var EncryptionConfiguration = struct(n0, _ECn, 0, [_RKKID], [0]); +export var EncryptionTypeMismatch = error( + n0, + _ETM, + { + [_e]: _c, + [_hE]: 400, + }, + [], + [], + + __EncryptionTypeMismatch +); +export var EndEvent = struct(n0, _EE, 0, [], []); +export var _Error = struct(n0, _Err, 0, [_K, _VI, _C, _Me], [0, 0, 0, 0]); +export var ErrorDetails = struct(n0, _ED, 0, [_EC, _EM], [0, 0]); +export var ErrorDocument = struct(n0, _EDr, 0, [_K], [0]); +export var EventBridgeConfiguration = struct(n0, _EBC, 0, [], []); +export var ExistingObjectReplication = struct(n0, _EOR, 0, [_Sta], [0]); +export var FilterRule = struct(n0, _FR, 0, [_N, _V], [0, 0]); +export var GetBucketAccelerateConfigurationOutput = struct( + n0, + _GBACO, + { + [_xN]: _AC, + }, + [_Sta, _RC], + [ + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var GetBucketAccelerateConfigurationRequest = struct( + n0, + _GBACR, + 0, + [_Bu, _EBO, _RP], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + ] +); +export var GetBucketAclOutput = struct( + n0, + _GBAO, + { + [_xN]: _ACP, + }, + [_O, _G], + [ + () => Owner, + [ + () => Grants, + { + [_xN]: _ACL, + }, + ], + ] +); +export var GetBucketAclRequest = struct( + n0, + _GBAR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketAnalyticsConfigurationOutput = struct(n0, _GBACOe, 0, [_ACn], [[() => AnalyticsConfiguration, 16]]); +export var GetBucketAnalyticsConfigurationRequest = struct( + n0, + _GBACRe, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketCorsOutput = struct( + n0, + _GBCO, + { + [_xN]: _CORSC, + }, + [_CORSR], + [ + [ + () => CORSRules, + { + [_xN]: _CORSRu, + [_xF]: 1, + }, + ], + ] +); +export var GetBucketCorsRequest = struct( + n0, + _GBCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketEncryptionOutput = struct(n0, _GBEO, 0, [_SSEC], [[() => ServerSideEncryptionConfiguration, 16]]); +export var GetBucketEncryptionRequest = struct( + n0, + _GBER, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketIntelligentTieringConfigurationOutput = struct( + n0, + _GBITCO, + 0, + [_ITC], + [[() => IntelligentTieringConfiguration, 16]] +); +export var GetBucketIntelligentTieringConfigurationRequest = struct( + n0, + _GBITCR, + 0, + [_Bu, _Id], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + ] +); +export var GetBucketInventoryConfigurationOutput = struct(n0, _GBICO, 0, [_IC], [[() => InventoryConfiguration, 16]]); +export var GetBucketInventoryConfigurationRequest = struct( + n0, + _GBICR, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketLifecycleConfigurationOutput = struct( + n0, + _GBLCO, + { + [_xN]: _LCi, + }, + [_Ru, _TDMOS], + [ + [ + () => LifecycleRules, + { + [_xN]: _Rul, + [_xF]: 1, + }, + ], + [ + 0, + { + [_hH]: _xatdmos, + }, + ], + ] +); +export var GetBucketLifecycleConfigurationRequest = struct( + n0, + _GBLCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketLocationOutput = struct( + n0, + _GBLO, + { + [_xN]: _LC, + }, + [_LC], + [0] +); +export var GetBucketLocationRequest = struct( + n0, + _GBLR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketLoggingOutput = struct( + n0, + _GBLOe, + { + [_xN]: _BLS, + }, + [_LE], + [[() => LoggingEnabled, 0]] +); +export var GetBucketLoggingRequest = struct( + n0, + _GBLRe, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketMetadataTableConfigurationOutput = struct( + n0, + _GBMTCO, + 0, + [_GBMTCR], + [[() => GetBucketMetadataTableConfigurationResult, 16]] +); +export var GetBucketMetadataTableConfigurationRequest = struct( + n0, + _GBMTCRe, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketMetadataTableConfigurationResult = struct( + n0, + _GBMTCR, + 0, + [_MTCR, _Sta, _Err], + [() => MetadataTableConfigurationResult, 0, () => ErrorDetails] +); +export var GetBucketMetricsConfigurationOutput = struct(n0, _GBMCO, 0, [_MC], [[() => MetricsConfiguration, 16]]); +export var GetBucketMetricsConfigurationRequest = struct( + n0, + _GBMCR, + 0, + [_Bu, _Id, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketNotificationConfigurationRequest = struct( + n0, + _GBNCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketOwnershipControlsOutput = struct(n0, _GBOCO, 0, [_OC], [[() => OwnershipControls, 16]]); +export var GetBucketOwnershipControlsRequest = struct( + n0, + _GBOCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketPolicyOutput = struct(n0, _GBPO, 0, [_Po], [[0, 16]]); +export var GetBucketPolicyRequest = struct( + n0, + _GBPR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketPolicyStatusOutput = struct(n0, _GBPSO, 0, [_PS], [[() => PolicyStatus, 16]]); +export var GetBucketPolicyStatusRequest = struct( + n0, + _GBPSR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketReplicationOutput = struct(n0, _GBRO, 0, [_RCe], [[() => ReplicationConfiguration, 16]]); +export var GetBucketReplicationRequest = struct( + n0, + _GBRR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketRequestPaymentOutput = struct( + n0, + _GBRPO, + { + [_xN]: _RPC, + }, + [_Pa], + [0] +); +export var GetBucketRequestPaymentRequest = struct( + n0, + _GBRPR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketTaggingOutput = struct( + n0, + _GBTO, + { + [_xN]: _Tagg, + }, + [_TS], + [[() => TagSet, 0]] +); +export var GetBucketTaggingRequest = struct( + n0, + _GBTR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketVersioningOutput = struct( + n0, + _GBVO, + { + [_xN]: _VCe, + }, + [_Sta, _MFAD], + [ + 0, + [ + 0, + { + [_xN]: _MDf, + }, + ], + ] +); +export var GetBucketVersioningRequest = struct( + n0, + _GBVR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetBucketWebsiteOutput = struct( + n0, + _GBWO, + { + [_xN]: _WC, + }, + [_RART, _IDn, _EDr, _RRo], + [() => RedirectAllRequestsTo, () => IndexDocument, () => ErrorDocument, [() => RoutingRules, 0]] +); +export var GetBucketWebsiteRequest = struct( + n0, + _GBWR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetObjectAclOutput = struct( + n0, + _GOAO, + { + [_xN]: _ACP, + }, + [_O, _G, _RC], + [ + () => Owner, + [ + () => Grants, + { + [_xN]: _ACL, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var GetObjectAclRequest = struct( + n0, + _GOAR, + 0, + [_Bu, _K, _VI, _RP, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetObjectAttributesOutput = struct( + n0, + _GOAOe, + { + [_xN]: _GOARe, + }, + [_DM, _LM, _VI, _RC, _ET, _Ch, _OP, _SC, _OS], + [ + [ + 2, + { + [_hH]: _xadm, + }, + ], + [ + 4, + { + [_hH]: _LM_, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + 0, + () => Checksum, + [() => GetObjectAttributesParts, 0], + 0, + 1, + ] +); +export var GetObjectAttributesParts = struct( + n0, + _GOAP, + 0, + [_TPC, _PNM, _NPNM, _MP, _IT, _Par], + [ + [ + 1, + { + [_xN]: _PC, + }, + ], + 0, + 0, + 1, + 2, + [ + () => PartsList, + { + [_xN]: _Part, + [_xF]: 1, + }, + ], + ] +); +export var GetObjectAttributesRequest = struct( + n0, + _GOARet, + 0, + [_Bu, _K, _VI, _MP, _PNM, _SSECA, _SSECK, _SSECKMD, _RP, _EBO, _OA], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 1, + { + [_hH]: _xamp, + }, + ], + [ + 0, + { + [_hH]: _xapnm, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 64 | 0, + { + [_hH]: _xaoa, + }, + ], + ] +); +export var GetObjectLegalHoldOutput = struct( + n0, + _GOLHO, + 0, + [_LH], + [ + [ + () => ObjectLockLegalHold, + { + [_xN]: _LH, + [_hP]: 1, + }, + ], + ] +); +export var GetObjectLegalHoldRequest = struct( + n0, + _GOLHR, + 0, + [_Bu, _K, _VI, _RP, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetObjectLockConfigurationOutput = struct(n0, _GOLCO, 0, [_OLC], [[() => ObjectLockConfiguration, 16]]); +export var GetObjectLockConfigurationRequest = struct( + n0, + _GOLCR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetObjectOutput = struct( + n0, + _GOO, + 0, + [ + _B, + _DM, + _AR, + _E, + _Re, + _LM, + _CLo, + _ET, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _CT, + _MM, + _VI, + _CC, + _CD, + _CE, + _CL, + _CR, + _CTo, + _Ex, + _ESx, + _WRL, + _SSE, + _M, + _SSECA, + _SSECKMD, + _SSEKMSKI, + _BKE, + _SC, + _RC, + _RS, + _PC, + _TC, + _OLM, + _OLRUD, + _OLLHS, + ], + [ + [() => StreamingBlob, 16], + [ + 2, + { + [_hH]: _xadm, + }, + ], + [ + 0, + { + [_hH]: _ar, + }, + ], + [ + 0, + { + [_hH]: _xae, + }, + ], + [ + 0, + { + [_hH]: _xar, + }, + ], + [ + 4, + { + [_hH]: _LM_, + }, + ], + [ + 1, + { + [_hH]: _CL__, + }, + ], + [ + 0, + { + [_hH]: _ET, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + [ + 1, + { + [_hH]: _xamm, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _CC_, + }, + ], + [ + 0, + { + [_hH]: _CD_, + }, + ], + [ + 0, + { + [_hH]: _CE_, + }, + ], + [ + 0, + { + [_hH]: _CL_, + }, + ], + [ + 0, + { + [_hH]: _CR_, + }, + ], + [ + 0, + { + [_hH]: _CT_, + }, + ], + [ + 4, + { + [_hH]: _Ex, + }, + ], + [ + 0, + { + [_hH]: _ESx, + }, + ], + [ + 0, + { + [_hH]: _xawrl, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xasc, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + [ + 0, + { + [_hH]: _xars, + }, + ], + [ + 1, + { + [_hH]: _xampc, + }, + ], + [ + 1, + { + [_hH]: _xatc, + }, + ], + [ + 0, + { + [_hH]: _xaolm, + }, + ], + [ + 5, + { + [_hH]: _xaolrud, + }, + ], + [ + 0, + { + [_hH]: _xaollh, + }, + ], + ] +); +export var GetObjectRequest = struct( + n0, + _GOR, + 0, + [ + _Bu, + _IM, + _IMSf, + _INM, + _IUS, + _K, + _Ra, + _RCC, + _RCD, + _RCE, + _RCL, + _RCT, + _RE, + _VI, + _SSECA, + _SSECK, + _SSECKMD, + _RP, + _PN, + _EBO, + _CM, + ], + [ + [0, 1], + [ + 0, + { + [_hH]: _IM_, + }, + ], + [ + 4, + { + [_hH]: _IMS_, + }, + ], + [ + 0, + { + [_hH]: _INM_, + }, + ], + [ + 4, + { + [_hH]: _IUS_, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _Ra, + }, + ], + [ + 0, + { + [_hQ]: _rcc, + }, + ], + [ + 0, + { + [_hQ]: _rcd, + }, + ], + [ + 0, + { + [_hQ]: _rce, + }, + ], + [ + 0, + { + [_hQ]: _rcl, + }, + ], + [ + 0, + { + [_hQ]: _rct, + }, + ], + [ + 6, + { + [_hQ]: _re, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 1, + { + [_hQ]: _pN, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xacm, + }, + ], + ] +); +export var GetObjectRetentionOutput = struct( + n0, + _GORO, + 0, + [_Ret], + [ + [ + () => ObjectLockRetention, + { + [_xN]: _Ret, + [_hP]: 1, + }, + ], + ] +); +export var GetObjectRetentionRequest = struct( + n0, + _GORR, + 0, + [_Bu, _K, _VI, _RP, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetObjectTaggingOutput = struct( + n0, + _GOTO, + { + [_xN]: _Tagg, + }, + [_VI, _TS], + [ + [ + 0, + { + [_hH]: _xavi, + }, + ], + [() => TagSet, 0], + ] +); +export var GetObjectTaggingRequest = struct( + n0, + _GOTR, + 0, + [_Bu, _K, _VI, _EBO, _RP], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + ] +); +export var GetObjectTorrentOutput = struct( + n0, + _GOTOe, + 0, + [_B, _RC], + [ + [() => StreamingBlob, 16], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var GetObjectTorrentRequest = struct( + n0, + _GOTRe, + 0, + [_Bu, _K, _RP, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GetPublicAccessBlockOutput = struct(n0, _GPABO, 0, [_PABC], [[() => PublicAccessBlockConfiguration, 16]]); +export var GetPublicAccessBlockRequest = struct( + n0, + _GPABR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var GlacierJobParameters = struct(n0, _GJP, 0, [_Ti], [0]); +export var Grant = struct( + n0, + _Gr, + 0, + [_Gra, _P], + [ + [ + () => Grantee, + { + [_xNm]: [_x, _hi], + }, + ], + 0, + ] +); +export var Grantee = struct( + n0, + _Gra, + 0, + [_DN, _EA, _ID, _URI, _T], + [ + 0, + 0, + 0, + 0, + [ + 0, + { + [_xN]: _xs, + [_xA]: 1, + }, + ], + ] +); +export var HeadBucketOutput = struct( + n0, + _HBO, + 0, + [_BLT, _BLN, _BR, _APAc], + [ + [ + 0, + { + [_hH]: _xablt, + }, + ], + [ + 0, + { + [_hH]: _xabln, + }, + ], + [ + 0, + { + [_hH]: _xabr, + }, + ], + [ + 2, + { + [_hH]: _xaapa, + }, + ], + ] +); +export var HeadBucketRequest = struct( + n0, + _HBR, + 0, + [_Bu, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var HeadObjectOutput = struct( + n0, + _HOO, + 0, + [ + _DM, + _AR, + _E, + _Re, + _AS, + _LM, + _CLo, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _CT, + _ET, + _MM, + _VI, + _CC, + _CD, + _CE, + _CL, + _CTo, + _CR, + _Ex, + _ESx, + _WRL, + _SSE, + _M, + _SSECA, + _SSECKMD, + _SSEKMSKI, + _BKE, + _SC, + _RC, + _RS, + _PC, + _OLM, + _OLRUD, + _OLLHS, + ], + [ + [ + 2, + { + [_hH]: _xadm, + }, + ], + [ + 0, + { + [_hH]: _ar, + }, + ], + [ + 0, + { + [_hH]: _xae, + }, + ], + [ + 0, + { + [_hH]: _xar, + }, + ], + [ + 0, + { + [_hH]: _xaas, + }, + ], + [ + 4, + { + [_hH]: _LM_, + }, + ], + [ + 1, + { + [_hH]: _CL__, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + [ + 0, + { + [_hH]: _ET, + }, + ], + [ + 1, + { + [_hH]: _xamm, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _CC_, + }, + ], + [ + 0, + { + [_hH]: _CD_, + }, + ], + [ + 0, + { + [_hH]: _CE_, + }, + ], + [ + 0, + { + [_hH]: _CL_, + }, + ], + [ + 0, + { + [_hH]: _CT_, + }, + ], + [ + 0, + { + [_hH]: _CR_, + }, + ], + [ + 4, + { + [_hH]: _Ex, + }, + ], + [ + 0, + { + [_hH]: _ESx, + }, + ], + [ + 0, + { + [_hH]: _xawrl, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xasc, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + [ + 0, + { + [_hH]: _xars, + }, + ], + [ + 1, + { + [_hH]: _xampc, + }, + ], + [ + 0, + { + [_hH]: _xaolm, + }, + ], + [ + 5, + { + [_hH]: _xaolrud, + }, + ], + [ + 0, + { + [_hH]: _xaollh, + }, + ], + ] +); +export var HeadObjectRequest = struct( + n0, + _HOR, + 0, + [ + _Bu, + _IM, + _IMSf, + _INM, + _IUS, + _K, + _Ra, + _RCC, + _RCD, + _RCE, + _RCL, + _RCT, + _RE, + _VI, + _SSECA, + _SSECK, + _SSECKMD, + _RP, + _PN, + _EBO, + _CM, + ], + [ + [0, 1], + [ + 0, + { + [_hH]: _IM_, + }, + ], + [ + 4, + { + [_hH]: _IMS_, + }, + ], + [ + 0, + { + [_hH]: _INM_, + }, + ], + [ + 4, + { + [_hH]: _IUS_, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _Ra, + }, + ], + [ + 0, + { + [_hQ]: _rcc, + }, + ], + [ + 0, + { + [_hQ]: _rcd, + }, + ], + [ + 0, + { + [_hQ]: _rce, + }, + ], + [ + 0, + { + [_hQ]: _rcl, + }, + ], + [ + 0, + { + [_hQ]: _rct, + }, + ], + [ + 6, + { + [_hQ]: _re, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 1, + { + [_hQ]: _pN, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xacm, + }, + ], + ] +); +export var IndexDocument = struct(n0, _IDn, 0, [_Su], [0]); +export var Initiator = struct(n0, _In, 0, [_ID, _DN], [0, 0]); +export var InputSerialization = struct( + n0, + _IS, + 0, + [_CSV, _CTom, _JSON, _Parq], + [() => CSVInput, 0, () => JSONInput, () => ParquetInput] +); +export var IntelligentTieringAndOperator = struct( + n0, + _ITAO, + 0, + [_Pr, _Ta], + [ + 0, + [ + () => TagSet, + { + [_xN]: _Tag, + [_xF]: 1, + }, + ], + ] +); +export var IntelligentTieringConfiguration = struct( + n0, + _ITC, + 0, + [_Id, _F, _Sta, _Tie], + [ + 0, + [() => IntelligentTieringFilter, 0], + 0, + [ + () => TieringList, + { + [_xN]: _Tier, + [_xF]: 1, + }, + ], + ] +); +export var IntelligentTieringFilter = struct( + n0, + _ITF, + 0, + [_Pr, _Tag, _An], + [0, () => Tag, [() => IntelligentTieringAndOperator, 0]] +); +export var InvalidObjectState = error( + n0, + _IOS, + { + [_e]: _c, + [_hE]: 403, + }, + [_SC, _AT], + [0, 0], + + __InvalidObjectState +); +export var InvalidRequest = error( + n0, + _IR, + { + [_e]: _c, + [_hE]: 400, + }, + [], + [], + + __InvalidRequest +); +export var InvalidWriteOffset = error( + n0, + _IWO, + { + [_e]: _c, + [_hE]: 400, + }, + [], + [], + + __InvalidWriteOffset +); +export var InventoryConfiguration = struct( + n0, + _IC, + 0, + [_Dest, _IE, _F, _Id, _IOV, _OF, _Sc], + [ + [() => InventoryDestination, 0], + 2, + () => InventoryFilter, + 0, + 0, + [() => InventoryOptionalFields, 0], + () => InventorySchedule, + ] +); +export var InventoryDestination = struct(n0, _IDnv, 0, [_SBD], [[() => InventoryS3BucketDestination, 0]]); +export var InventoryEncryption = struct( + n0, + _IEn, + 0, + [_SSES, _SSEKMS], + [ + [ + () => SSES3, + { + [_xN]: _SS, + }, + ], + [ + () => SSEKMS, + { + [_xN]: _SK, + }, + ], + ] +); +export var InventoryFilter = struct(n0, _IFnv, 0, [_Pr], [0]); +export var InventoryS3BucketDestination = struct( + n0, + _ISBD, + 0, + [_AI, _Bu, _Fo, _Pr, _Enc], + [0, 0, 0, 0, [() => InventoryEncryption, 0]] +); +export var InventorySchedule = struct(n0, _ISn, 0, [_Fr], [0]); +export var JSONInput = struct(n0, _JSONI, 0, [_T], [0]); +export var JSONOutput = struct(n0, _JSONO, 0, [_RD], [0]); +export var LambdaFunctionConfiguration = struct( + n0, + _LFC, + 0, + [_Id, _LFA, _Eve, _F], + [ + 0, + [ + 0, + { + [_xN]: _CF, + }, + ], + [ + 64 | 0, + { + [_xN]: _Ev, + [_xF]: 1, + }, + ], + [() => NotificationConfigurationFilter, 0], + ] +); +export var LifecycleExpiration = struct(n0, _LEi, 0, [_D, _Da, _EODM], [5, 1, 2]); +export var LifecycleRule = struct( + n0, + _LR, + 0, + [_E, _ID, _Pr, _F, _Sta, _Tr, _NVT, _NVE, _AIMU], + [ + () => LifecycleExpiration, + 0, + 0, + [() => LifecycleRuleFilter, 0], + 0, + [ + () => TransitionList, + { + [_xN]: _Tra, + [_xF]: 1, + }, + ], + [ + () => NoncurrentVersionTransitionList, + { + [_xN]: _NVTo, + [_xF]: 1, + }, + ], + () => NoncurrentVersionExpiration, + () => AbortIncompleteMultipartUpload, + ] +); +export var LifecycleRuleAndOperator = struct( + n0, + _LRAO, + 0, + [_Pr, _Ta, _OSGT, _OSLT], + [ + 0, + [ + () => TagSet, + { + [_xN]: _Tag, + [_xF]: 1, + }, + ], + 1, + 1, + ] +); +export var LifecycleRuleFilter = struct( + n0, + _LRF, + 0, + [_Pr, _Tag, _OSGT, _OSLT, _An], + [0, () => Tag, 1, 1, [() => LifecycleRuleAndOperator, 0]] +); +export var ListBucketAnalyticsConfigurationsOutput = struct( + n0, + _LBACO, + { + [_xN]: _LBACR, + }, + [_IT, _CTon, _NCT, _ACLn], + [ + 2, + 0, + 0, + [ + () => AnalyticsConfigurationList, + { + [_xN]: _ACn, + [_xF]: 1, + }, + ], + ] +); +export var ListBucketAnalyticsConfigurationsRequest = struct( + n0, + _LBACRi, + 0, + [_Bu, _CTon, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var ListBucketIntelligentTieringConfigurationsOutput = struct( + n0, + _LBITCO, + 0, + [_IT, _CTon, _NCT, _ITCL], + [ + 2, + 0, + 0, + [ + () => IntelligentTieringConfigurationList, + { + [_xN]: _ITC, + [_xF]: 1, + }, + ], + ] +); +export var ListBucketIntelligentTieringConfigurationsRequest = struct( + n0, + _LBITCR, + 0, + [_Bu, _CTon], + [ + [0, 1], + [ + 0, + { + [_hQ]: _ct, + }, + ], + ] +); +export var ListBucketInventoryConfigurationsOutput = struct( + n0, + _LBICO, + { + [_xN]: _LICR, + }, + [_CTon, _ICL, _IT, _NCT], + [ + 0, + [ + () => InventoryConfigurationList, + { + [_xN]: _IC, + [_xF]: 1, + }, + ], + 2, + 0, + ] +); +export var ListBucketInventoryConfigurationsRequest = struct( + n0, + _LBICR, + 0, + [_Bu, _CTon, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var ListBucketMetricsConfigurationsOutput = struct( + n0, + _LBMCO, + { + [_xN]: _LMCR, + }, + [_IT, _CTon, _NCT, _MCL], + [ + 2, + 0, + 0, + [ + () => MetricsConfigurationList, + { + [_xN]: _MC, + [_xF]: 1, + }, + ], + ] +); +export var ListBucketMetricsConfigurationsRequest = struct( + n0, + _LBMCR, + 0, + [_Bu, _CTon, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var ListBucketsOutput = struct( + n0, + _LBO, + { + [_xN]: _LAMBR, + }, + [_Buc, _O, _CTon, _Pr], + [[() => Buckets, 0], () => Owner, 0, 0] +); +export var ListBucketsRequest = struct( + n0, + _LBR, + 0, + [_MB, _CTon, _Pr, _BR], + [ + [ + 1, + { + [_hQ]: _mb, + }, + ], + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 0, + { + [_hQ]: _p, + }, + ], + [ + 0, + { + [_hQ]: _br, + }, + ], + ] +); +export var ListDirectoryBucketsOutput = struct( + n0, + _LDBO, + { + [_xN]: _LAMDBR, + }, + [_Buc, _CTon], + [[() => Buckets, 0], 0] +); +export var ListDirectoryBucketsRequest = struct( + n0, + _LDBR, + 0, + [_CTon, _MDB], + [ + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 1, + { + [_hQ]: _mdb, + }, + ], + ] +); +export var ListMultipartUploadsOutput = struct( + n0, + _LMUO, + { + [_xN]: _LMUR, + }, + [_Bu, _KM, _UIM, _NKM, _Pr, _De, _NUIM, _MU, _IT, _U, _CPom, _ETn, _RC], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 2, + [ + () => MultipartUploadList, + { + [_xN]: _Up, + [_xF]: 1, + }, + ], + [ + () => CommonPrefixList, + { + [_xF]: 1, + }, + ], + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var ListMultipartUploadsRequest = struct( + n0, + _LMURi, + 0, + [_Bu, _De, _ETn, _KM, _MU, _Pr, _UIM, _EBO, _RP], + [ + [0, 1], + [ + 0, + { + [_hQ]: _d, + }, + ], + [ + 0, + { + [_hQ]: _et, + }, + ], + [ + 0, + { + [_hQ]: _km, + }, + ], + [ + 1, + { + [_hQ]: _mu, + }, + ], + [ + 0, + { + [_hQ]: _p, + }, + ], + [ + 0, + { + [_hQ]: _uim, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + ] +); +export var ListObjectsOutput = struct( + n0, + _LOO, + { + [_xN]: _LBRi, + }, + [_IT, _Ma, _NM, _Cont, _N, _Pr, _De, _MKa, _CPom, _ETn, _RC], + [ + 2, + 0, + 0, + [ + () => ObjectList, + { + [_xF]: 1, + }, + ], + 0, + 0, + 0, + 1, + [ + () => CommonPrefixList, + { + [_xF]: 1, + }, + ], + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var ListObjectsRequest = struct( + n0, + _LOR, + 0, + [_Bu, _De, _ETn, _Ma, _MKa, _Pr, _RP, _EBO, _OOA], + [ + [0, 1], + [ + 0, + { + [_hQ]: _d, + }, + ], + [ + 0, + { + [_hQ]: _et, + }, + ], + [ + 0, + { + [_hQ]: _m, + }, + ], + [ + 1, + { + [_hQ]: _mk, + }, + ], + [ + 0, + { + [_hQ]: _p, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 64 | 0, + { + [_hH]: _xaooa, + }, + ], + ] +); +export var ListObjectsV2Output = struct( + n0, + _LOVO, + { + [_xN]: _LBRi, + }, + [_IT, _Cont, _N, _Pr, _De, _MKa, _CPom, _ETn, _KC, _CTon, _NCT, _SA, _RC], + [ + 2, + [ + () => ObjectList, + { + [_xF]: 1, + }, + ], + 0, + 0, + 0, + 1, + [ + () => CommonPrefixList, + { + [_xF]: 1, + }, + ], + 0, + 1, + 0, + 0, + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var ListObjectsV2Request = struct( + n0, + _LOVR, + 0, + [_Bu, _De, _ETn, _MKa, _Pr, _CTon, _FO, _SA, _RP, _EBO, _OOA], + [ + [0, 1], + [ + 0, + { + [_hQ]: _d, + }, + ], + [ + 0, + { + [_hQ]: _et, + }, + ], + [ + 1, + { + [_hQ]: _mk, + }, + ], + [ + 0, + { + [_hQ]: _p, + }, + ], + [ + 0, + { + [_hQ]: _ct, + }, + ], + [ + 2, + { + [_hQ]: _fo, + }, + ], + [ + 0, + { + [_hQ]: _sa, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 64 | 0, + { + [_hH]: _xaooa, + }, + ], + ] +); +export var ListObjectVersionsOutput = struct( + n0, + _LOVOi, + { + [_xN]: _LVR, + }, + [_IT, _KM, _VIM, _NKM, _NVIM, _Ve, _DMe, _N, _Pr, _De, _MKa, _CPom, _ETn, _RC], + [ + 2, + 0, + 0, + 0, + 0, + [ + () => ObjectVersionList, + { + [_xN]: _Ver, + [_xF]: 1, + }, + ], + [ + () => DeleteMarkers, + { + [_xN]: _DM, + [_xF]: 1, + }, + ], + 0, + 0, + 0, + 1, + [ + () => CommonPrefixList, + { + [_xF]: 1, + }, + ], + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var ListObjectVersionsRequest = struct( + n0, + _LOVRi, + 0, + [_Bu, _De, _ETn, _KM, _MKa, _Pr, _VIM, _EBO, _RP, _OOA], + [ + [0, 1], + [ + 0, + { + [_hQ]: _d, + }, + ], + [ + 0, + { + [_hQ]: _et, + }, + ], + [ + 0, + { + [_hQ]: _km, + }, + ], + [ + 1, + { + [_hQ]: _mk, + }, + ], + [ + 0, + { + [_hQ]: _p, + }, + ], + [ + 0, + { + [_hQ]: _vim, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 64 | 0, + { + [_hH]: _xaooa, + }, + ], + ] +); +export var ListPartsOutput = struct( + n0, + _LPO, + { + [_xN]: _LPR, + }, + [_AD, _ARI, _Bu, _K, _UI, _PNM, _NPNM, _MP, _IT, _Par, _In, _O, _SC, _RC, _CA, _CT], + [ + [ + 4, + { + [_hH]: _xaad, + }, + ], + [ + 0, + { + [_hH]: _xaari, + }, + ], + 0, + 0, + 0, + 0, + 0, + 1, + 2, + [ + () => Parts, + { + [_xN]: _Part, + [_xF]: 1, + }, + ], + () => Initiator, + () => Owner, + 0, + [ + 0, + { + [_hH]: _xarc, + }, + ], + 0, + 0, + ] +); +export var ListPartsRequest = struct( + n0, + _LPRi, + 0, + [_Bu, _K, _MP, _PNM, _UI, _RP, _EBO, _SSECA, _SSECK, _SSECKMD], + [ + [0, 1], + [0, 1], + [ + 1, + { + [_hQ]: _mp, + }, + ], + [ + 0, + { + [_hQ]: _pnm, + }, + ], + [ + 0, + { + [_hQ]: _uI, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + ] +); +export var LocationInfo = struct(n0, _LI, 0, [_T, _N], [0, 0]); +export var LoggingEnabled = struct( + n0, + _LE, + 0, + [_TB, _TG, _TP, _TOKF], + [0, [() => TargetGrants, 0], 0, [() => TargetObjectKeyFormat, 0]] +); +export var MetadataEntry = struct(n0, _ME, 0, [_N, _V], [0, 0]); +export var MetadataTableConfiguration = struct(n0, _MTC, 0, [_STD], [() => S3TablesDestination]); +export var MetadataTableConfigurationResult = struct(n0, _MTCR, 0, [_STDR], [() => S3TablesDestinationResult]); +export var Metrics = struct(n0, _Met, 0, [_Sta, _ETv], [0, () => ReplicationTimeValue]); +export var MetricsAndOperator = struct( + n0, + _MAO, + 0, + [_Pr, _Ta, _APA], + [ + 0, + [ + () => TagSet, + { + [_xN]: _Tag, + [_xF]: 1, + }, + ], + 0, + ] +); +export var MetricsConfiguration = struct(n0, _MC, 0, [_Id, _F], [0, [() => MetricsFilter, 0]]); +export var MultipartUpload = struct( + n0, + _MUu, + 0, + [_UI, _K, _I, _SC, _O, _In, _CA, _CT], + [0, 0, 4, 0, () => Owner, () => Initiator, 0, 0] +); +export var NoncurrentVersionExpiration = struct(n0, _NVE, 0, [_ND, _NNV], [1, 1]); +export var NoncurrentVersionTransition = struct(n0, _NVTo, 0, [_ND, _SC, _NNV], [1, 0, 1]); +export var NoSuchBucket = error( + n0, + _NSB, + { + [_e]: _c, + [_hE]: 404, + }, + [], + [], + + __NoSuchBucket +); +export var NoSuchKey = error( + n0, + _NSK, + { + [_e]: _c, + [_hE]: 404, + }, + [], + [], + + __NoSuchKey +); +export var NoSuchUpload = error( + n0, + _NSU, + { + [_e]: _c, + [_hE]: 404, + }, + [], + [], + + __NoSuchUpload +); +export var NotFound = error( + n0, + _NF, + { + [_e]: _c, + }, + [], + [], + + __NotFound +); +export var NotificationConfiguration = struct( + n0, + _NC, + 0, + [_TCo, _QCu, _LFCa, _EBC], + [ + [ + () => TopicConfigurationList, + { + [_xN]: _TCop, + [_xF]: 1, + }, + ], + [ + () => QueueConfigurationList, + { + [_xN]: _QCue, + [_xF]: 1, + }, + ], + [ + () => LambdaFunctionConfigurationList, + { + [_xN]: _CFC, + [_xF]: 1, + }, + ], + () => EventBridgeConfiguration, + ] +); +export var NotificationConfigurationFilter = struct( + n0, + _NCF, + 0, + [_K], + [ + [ + () => S3KeyFilter, + { + [_xN]: _SKe, + }, + ], + ] +); +export var _Object = struct( + n0, + _Obj, + 0, + [_K, _LM, _ET, _CA, _CT, _S, _SC, _O, _RSe], + [ + 0, + 4, + 0, + [ + 64 | 0, + { + [_xF]: 1, + }, + ], + 0, + 1, + 0, + () => Owner, + () => RestoreStatus, + ] +); +export var ObjectAlreadyInActiveTierError = error( + n0, + _OAIATE, + { + [_e]: _c, + [_hE]: 403, + }, + [], + [], + + __ObjectAlreadyInActiveTierError +); +export var ObjectIdentifier = struct(n0, _OI, 0, [_K, _VI, _ET, _LMT, _S], [0, 0, 0, 6, 1]); +export var ObjectLockConfiguration = struct(n0, _OLC, 0, [_OLE, _Rul], [0, () => ObjectLockRule]); +export var ObjectLockLegalHold = struct(n0, _OLLH, 0, [_Sta], [0]); +export var ObjectLockRetention = struct(n0, _OLR, 0, [_Mo, _RUD], [0, 5]); +export var ObjectLockRule = struct(n0, _OLRb, 0, [_DRe], [() => DefaultRetention]); +export var ObjectNotInActiveTierError = error( + n0, + _ONIATE, + { + [_e]: _c, + [_hE]: 403, + }, + [], + [], + + __ObjectNotInActiveTierError +); +export var ObjectPart = struct(n0, _OPb, 0, [_PN, _S, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA], [1, 1, 0, 0, 0, 0, 0]); +export var ObjectVersion = struct( + n0, + _OV, + 0, + [_ET, _CA, _CT, _S, _SC, _K, _VI, _IL, _LM, _O, _RSe], + [ + 0, + [ + 64 | 0, + { + [_xF]: 1, + }, + ], + 0, + 1, + 0, + 0, + 0, + 2, + 4, + () => Owner, + () => RestoreStatus, + ] +); +export var OutputLocation = struct(n0, _OL, 0, [_S_], [[() => S3Location, 0]]); +export var OutputSerialization = struct(n0, _OSu, 0, [_CSV, _JSON], [() => CSVOutput, () => JSONOutput]); +export var Owner = struct(n0, _O, 0, [_DN, _ID], [0, 0]); +export var OwnershipControls = struct( + n0, + _OC, + 0, + [_Ru], + [ + [ + () => OwnershipControlsRules, + { + [_xN]: _Rul, + [_xF]: 1, + }, + ], + ] +); +export var OwnershipControlsRule = struct(n0, _OCR, 0, [_OO], [0]); +export var ParquetInput = struct(n0, _PI, 0, [], []); +export var Part = struct( + n0, + _Part, + 0, + [_PN, _LM, _ET, _S, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA], + [1, 4, 0, 1, 0, 0, 0, 0, 0] +); +export var PartitionedPrefix = struct( + n0, + _PP, + { + [_xN]: _PP, + }, + [_PDS], + [0] +); +export var PolicyStatus = struct( + n0, + _PS, + 0, + [_IP], + [ + [ + 2, + { + [_xN]: _IP, + }, + ], + ] +); +export var Progress = struct(n0, _Prog, 0, [_BS, _BP, _BRy], [1, 1, 1]); +export var ProgressEvent = struct( + n0, + _PE, + 0, + [_Det], + [ + [ + () => Progress, + { + [_eP]: 1, + }, + ], + ] +); +export var PublicAccessBlockConfiguration = struct( + n0, + _PABC, + 0, + [_BPA, _IPA, _BPP, _RPB], + [ + [ + 2, + { + [_xN]: _BPA, + }, + ], + [ + 2, + { + [_xN]: _IPA, + }, + ], + [ + 2, + { + [_xN]: _BPP, + }, + ], + [ + 2, + { + [_xN]: _RPB, + }, + ], + ] +); +export var PutBucketAccelerateConfigurationRequest = struct( + n0, + _PBACR, + 0, + [_Bu, _AC, _EBO, _CA], + [ + [0, 1], + [ + () => AccelerateConfiguration, + { + [_xN]: _AC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + ] +); +export var PutBucketAclRequest = struct( + n0, + _PBAR, + 0, + [_ACL_, _ACP, _Bu, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _EBO], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [ + () => AccessControlPolicy, + { + [_xN]: _ACP, + [_hP]: 1, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagw, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketAnalyticsConfigurationRequest = struct( + n0, + _PBACRu, + 0, + [_Bu, _Id, _ACn, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + () => AnalyticsConfiguration, + { + [_xN]: _ACn, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketCorsRequest = struct( + n0, + _PBCR, + 0, + [_Bu, _CORSC, _CMD, _CA, _EBO], + [ + [0, 1], + [ + () => CORSConfiguration, + { + [_xN]: _CORSC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketEncryptionRequest = struct( + n0, + _PBER, + 0, + [_Bu, _CMD, _CA, _SSEC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => ServerSideEncryptionConfiguration, + { + [_xN]: _SSEC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketIntelligentTieringConfigurationRequest = struct( + n0, + _PBITCR, + 0, + [_Bu, _Id, _ITC], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + () => IntelligentTieringConfiguration, + { + [_xN]: _ITC, + [_hP]: 1, + }, + ], + ] +); +export var PutBucketInventoryConfigurationRequest = struct( + n0, + _PBICR, + 0, + [_Bu, _Id, _IC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + () => InventoryConfiguration, + { + [_xN]: _IC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketLifecycleConfigurationOutput = struct( + n0, + _PBLCO, + 0, + [_TDMOS], + [ + [ + 0, + { + [_hH]: _xatdmos, + }, + ], + ] +); +export var PutBucketLifecycleConfigurationRequest = struct( + n0, + _PBLCR, + 0, + [_Bu, _CA, _LCi, _EBO, _TDMOS], + [ + [0, 1], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => BucketLifecycleConfiguration, + { + [_xN]: _LCi, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xatdmos, + }, + ], + ] +); +export var PutBucketLoggingRequest = struct( + n0, + _PBLR, + 0, + [_Bu, _BLS, _CMD, _CA, _EBO], + [ + [0, 1], + [ + () => BucketLoggingStatus, + { + [_xN]: _BLS, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketMetricsConfigurationRequest = struct( + n0, + _PBMCR, + 0, + [_Bu, _Id, _MC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hQ]: _i, + }, + ], + [ + () => MetricsConfiguration, + { + [_xN]: _MC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketNotificationConfigurationRequest = struct( + n0, + _PBNCR, + 0, + [_Bu, _NC, _EBO, _SDV], + [ + [0, 1], + [ + () => NotificationConfiguration, + { + [_xN]: _NC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 2, + { + [_hH]: _xasdv, + }, + ], + ] +); +export var PutBucketOwnershipControlsRequest = struct( + n0, + _PBOCR, + 0, + [_Bu, _CMD, _EBO, _OC], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + () => OwnershipControls, + { + [_xN]: _OC, + [_hP]: 1, + }, + ], + ] +); +export var PutBucketPolicyRequest = struct( + n0, + _PBPR, + 0, + [_Bu, _CMD, _CA, _CRSBA, _Po, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 2, + { + [_hH]: _xacrsba, + }, + ], + [0, 16], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketReplicationRequest = struct( + n0, + _PBRR, + 0, + [_Bu, _CMD, _CA, _RCe, _To, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => ReplicationConfiguration, + { + [_xN]: _RCe, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xabolt, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketRequestPaymentRequest = struct( + n0, + _PBRPR, + 0, + [_Bu, _CMD, _CA, _RPC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => RequestPaymentConfiguration, + { + [_xN]: _RPC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketTaggingRequest = struct( + n0, + _PBTR, + 0, + [_Bu, _CMD, _CA, _Tagg, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => Tagging, + { + [_xN]: _Tagg, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketVersioningRequest = struct( + n0, + _PBVR, + 0, + [_Bu, _CMD, _CA, _MFA, _VCe, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xam_, + }, + ], + [ + () => VersioningConfiguration, + { + [_xN]: _VCe, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutBucketWebsiteRequest = struct( + n0, + _PBWR, + 0, + [_Bu, _CMD, _CA, _WC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => WebsiteConfiguration, + { + [_xN]: _WC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectAclOutput = struct( + n0, + _POAO, + 0, + [_RC], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var PutObjectAclRequest = struct( + n0, + _POAR, + 0, + [_ACL_, _ACP, _Bu, _CMD, _CA, _GFC, _GR, _GRACP, _GW, _GWACP, _K, _RP, _VI, _EBO], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [ + () => AccessControlPolicy, + { + [_xN]: _ACP, + [_hP]: 1, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagw, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [0, 1], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectLegalHoldOutput = struct( + n0, + _POLHO, + 0, + [_RC], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var PutObjectLegalHoldRequest = struct( + n0, + _POLHR, + 0, + [_Bu, _K, _LH, _RP, _VI, _CMD, _CA, _EBO], + [ + [0, 1], + [0, 1], + [ + () => ObjectLockLegalHold, + { + [_xN]: _LH, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectLockConfigurationOutput = struct( + n0, + _POLCO, + 0, + [_RC], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var PutObjectLockConfigurationRequest = struct( + n0, + _POLCR, + 0, + [_Bu, _OLC, _RP, _To, _CMD, _CA, _EBO], + [ + [0, 1], + [ + () => ObjectLockConfiguration, + { + [_xN]: _OLC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xabolt, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectOutput = struct( + n0, + _POO, + 0, + [ + _E, + _ET, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _CT, + _SSE, + _VI, + _SSECA, + _SSECKMD, + _SSEKMSKI, + _SSEKMSEC, + _BKE, + _S, + _RC, + ], + [ + [ + 0, + { + [_hH]: _xae, + }, + ], + [ + 0, + { + [_hH]: _ET, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 0, + { + [_hH]: _xact, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xavi, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 1, + { + [_hH]: _xaos, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var PutObjectRequest = struct( + n0, + _POR, + 0, + [ + _ACL_, + _B, + _Bu, + _CC, + _CD, + _CE, + _CL, + _CLo, + _CMD, + _CTo, + _CA, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _Ex, + _IM, + _INM, + _GFC, + _GR, + _GRACP, + _GWACP, + _K, + _WOB, + _M, + _SSE, + _SC, + _WRL, + _SSECA, + _SSECK, + _SSECKMD, + _SSEKMSKI, + _SSEKMSEC, + _BKE, + _RP, + _Tagg, + _OLM, + _OLRUD, + _OLLHS, + _EBO, + ], + [ + [ + 0, + { + [_hH]: _xaa, + }, + ], + [() => StreamingBlob, 16], + [0, 1], + [ + 0, + { + [_hH]: _CC_, + }, + ], + [ + 0, + { + [_hH]: _CD_, + }, + ], + [ + 0, + { + [_hH]: _CE_, + }, + ], + [ + 0, + { + [_hH]: _CL_, + }, + ], + [ + 1, + { + [_hH]: _CL__, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _CT_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 4, + { + [_hH]: _Ex, + }, + ], + [ + 0, + { + [_hH]: _IM_, + }, + ], + [ + 0, + { + [_hH]: _INM_, + }, + ], + [ + 0, + { + [_hH]: _xagfc, + }, + ], + [ + 0, + { + [_hH]: _xagr, + }, + ], + [ + 0, + { + [_hH]: _xagra, + }, + ], + [ + 0, + { + [_hH]: _xagwa, + }, + ], + [0, 1], + [ + 1, + { + [_hH]: _xawob, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasc, + }, + ], + [ + 0, + { + [_hH]: _xawrl, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + () => SSEKMSEncryptionContext, + { + [_hH]: _xassec, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xat, + }, + ], + [ + 0, + { + [_hH]: _xaolm, + }, + ], + [ + 5, + { + [_hH]: _xaolrud, + }, + ], + [ + 0, + { + [_hH]: _xaollh, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectRetentionOutput = struct( + n0, + _PORO, + 0, + [_RC], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var PutObjectRetentionRequest = struct( + n0, + _PORR, + 0, + [_Bu, _K, _Ret, _RP, _VI, _BGR, _CMD, _CA, _EBO], + [ + [0, 1], + [0, 1], + [ + () => ObjectLockRetention, + { + [_xN]: _Ret, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 2, + { + [_hH]: _xabgr, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var PutObjectTaggingOutput = struct( + n0, + _POTO, + 0, + [_VI], + [ + [ + 0, + { + [_hH]: _xavi, + }, + ], + ] +); +export var PutObjectTaggingRequest = struct( + n0, + _POTR, + 0, + [_Bu, _K, _VI, _CMD, _CA, _Tagg, _EBO, _RP], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => Tagging, + { + [_xN]: _Tagg, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + ] +); +export var PutPublicAccessBlockRequest = struct( + n0, + _PPABR, + 0, + [_Bu, _CMD, _CA, _PABC, _EBO], + [ + [0, 1], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + () => PublicAccessBlockConfiguration, + { + [_xN]: _PABC, + [_hP]: 1, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var QueueConfiguration = struct( + n0, + _QCue, + 0, + [_Id, _QA, _Eve, _F], + [ + 0, + [ + 0, + { + [_xN]: _Qu, + }, + ], + [ + 64 | 0, + { + [_xN]: _Ev, + [_xF]: 1, + }, + ], + [() => NotificationConfigurationFilter, 0], + ] +); +export var RecordsEvent = struct( + n0, + _REe, + 0, + [_Pay], + [ + [ + 21, + { + [_eP]: 1, + }, + ], + ] +); +export var Redirect = struct(n0, _Red, 0, [_HN, _HRC, _Pro, _RKPW, _RKW], [0, 0, 0, 0, 0]); +export var RedirectAllRequestsTo = struct(n0, _RART, 0, [_HN, _Pro], [0, 0]); +export var ReplicaModifications = struct(n0, _RM, 0, [_Sta], [0]); +export var ReplicationConfiguration = struct( + n0, + _RCe, + 0, + [_R, _Ru], + [ + 0, + [ + () => ReplicationRules, + { + [_xN]: _Rul, + [_xF]: 1, + }, + ], + ] +); +export var ReplicationRule = struct( + n0, + _RRe, + 0, + [_ID, _Pri, _Pr, _F, _Sta, _SSC, _EOR, _Dest, _DMR], + [ + 0, + 1, + 0, + [() => ReplicationRuleFilter, 0], + 0, + () => SourceSelectionCriteria, + () => ExistingObjectReplication, + () => Destination, + () => DeleteMarkerReplication, + ] +); +export var ReplicationRuleAndOperator = struct( + n0, + _RRAO, + 0, + [_Pr, _Ta], + [ + 0, + [ + () => TagSet, + { + [_xN]: _Tag, + [_xF]: 1, + }, + ], + ] +); +export var ReplicationRuleFilter = struct( + n0, + _RRF, + 0, + [_Pr, _Tag, _An], + [0, () => Tag, [() => ReplicationRuleAndOperator, 0]] +); +export var ReplicationTime = struct(n0, _RTe, 0, [_Sta, _Tim], [0, () => ReplicationTimeValue]); +export var ReplicationTimeValue = struct(n0, _RTV, 0, [_Mi], [1]); +export var RequestPaymentConfiguration = struct(n0, _RPC, 0, [_Pa], [0]); +export var RequestProgress = struct(n0, _RPe, 0, [_Ena], [2]); +export var RestoreObjectOutput = struct( + n0, + _ROO, + 0, + [_RC, _ROP], + [ + [ + 0, + { + [_hH]: _xarc, + }, + ], + [ + 0, + { + [_hH]: _xarop, + }, + ], + ] +); +export var RestoreObjectRequest = struct( + n0, + _ROR, + 0, + [_Bu, _K, _VI, _RRes, _RP, _CA, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hQ]: _vI, + }, + ], + [ + () => RestoreRequest, + { + [_hP]: 1, + [_xN]: _RRes, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var RestoreRequest = struct( + n0, + _RRes, + 0, + [_Da, _GJP, _T, _Ti, _Des, _SP, _OL], + [1, () => GlacierJobParameters, 0, 0, 0, () => SelectParameters, [() => OutputLocation, 0]] +); +export var RestoreStatus = struct(n0, _RSe, 0, [_IRIP, _RED], [2, 4]); +export var RoutingRule = struct(n0, _RRou, 0, [_Con, _Red], [() => Condition, () => Redirect]); +export var S3KeyFilter = struct( + n0, + _SKF, + 0, + [_FRi], + [ + [ + () => FilterRuleList, + { + [_xN]: _FR, + [_xF]: 1, + }, + ], + ] +); +export var S3Location = struct( + n0, + _SL, + 0, + [_BN, _Pr, _Enc, _CACL, _ACL, _Tagg, _UM, _SC], + [0, 0, [() => Encryption, 0], 0, [() => Grants, 0], [() => Tagging, 0], [() => UserMetadata, 0], 0] +); +export var S3TablesDestination = struct(n0, _STD, 0, [_TBA, _TN], [0, 0]); +export var S3TablesDestinationResult = struct(n0, _STDR, 0, [_TBA, _TN, _TAa, _TNa], [0, 0, 0, 0]); +export var ScanRange = struct(n0, _SR, 0, [_St, _En], [1, 1]); +export var SelectObjectContentOutput = struct(n0, _SOCO, 0, [_Pay], [[() => SelectObjectContentEventStream, 16]]); +export var SelectObjectContentRequest = struct( + n0, + _SOCR, + 0, + [_Bu, _K, _SSECA, _SSECK, _SSECKMD, _Exp, _ETx, _RPe, _IS, _OSu, _SR, _EBO], + [ + [0, 1], + [0, 1], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + 0, + 0, + () => RequestProgress, + () => InputSerialization, + () => OutputSerialization, + () => ScanRange, + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var SelectParameters = struct( + n0, + _SP, + 0, + [_IS, _ETx, _Exp, _OSu], + [() => InputSerialization, 0, 0, () => OutputSerialization] +); +export var ServerSideEncryptionByDefault = struct(n0, _SSEBD, 0, [_SSEA, _KMSMKID], [0, [() => SSEKMSKeyId, 0]]); +export var ServerSideEncryptionConfiguration = struct( + n0, + _SSEC, + 0, + [_Ru], + [ + [ + () => ServerSideEncryptionRules, + { + [_xN]: _Rul, + [_xF]: 1, + }, + ], + ] +); +export var ServerSideEncryptionRule = struct( + n0, + _SSER, + 0, + [_ASSEBD, _BKE], + [[() => ServerSideEncryptionByDefault, 0], 2] +); +export var SessionCredentials = struct( + n0, + _SCe, + 0, + [_AKI, _SAK, _ST, _E], + [ + [ + 0, + { + [_xN]: _AKI, + }, + ], + [ + () => SessionCredentialValue, + { + [_xN]: _SAK, + }, + ], + [ + () => SessionCredentialValue, + { + [_xN]: _ST, + }, + ], + [ + 4, + { + [_xN]: _E, + }, + ], + ] +); +export var SimplePrefix = struct( + n0, + _SPi, + { + [_xN]: _SPi, + }, + [], + [] +); +export var SourceSelectionCriteria = struct( + n0, + _SSC, + 0, + [_SKEO, _RM], + [() => SseKmsEncryptedObjects, () => ReplicaModifications] +); +export var SSEKMS = struct( + n0, + _SSEKMS, + { + [_xN]: _SK, + }, + [_KI], + [[() => SSEKMSKeyId, 0]] +); +export var SseKmsEncryptedObjects = struct(n0, _SKEO, 0, [_Sta], [0]); +export var SSES3 = struct( + n0, + _SSES, + { + [_xN]: _SS, + }, + [], + [] +); +export var Stats = struct(n0, _Stat, 0, [_BS, _BP, _BRy], [1, 1, 1]); +export var StatsEvent = struct( + n0, + _SEt, + 0, + [_Det], + [ + [ + () => Stats, + { + [_eP]: 1, + }, + ], + ] +); +export var StorageClassAnalysis = struct(n0, _SCA, 0, [_DE], [() => StorageClassAnalysisDataExport]); +export var StorageClassAnalysisDataExport = struct(n0, _SCADE, 0, [_OSV, _Dest], [0, () => AnalyticsExportDestination]); +export var Tag = struct(n0, _Tag, 0, [_K, _V], [0, 0]); +export var Tagging = struct(n0, _Tagg, 0, [_TS], [[() => TagSet, 0]]); +export var TargetGrant = struct( + n0, + _TGa, + 0, + [_Gra, _P], + [ + [ + () => Grantee, + { + [_xNm]: [_x, _hi], + }, + ], + 0, + ] +); +export var TargetObjectKeyFormat = struct( + n0, + _TOKF, + 0, + [_SPi, _PP], + [ + [ + () => SimplePrefix, + { + [_xN]: _SPi, + }, + ], + [ + () => PartitionedPrefix, + { + [_xN]: _PP, + }, + ], + ] +); +export var Tiering = struct(n0, _Tier, 0, [_Da, _AT], [1, 0]); +export var TooManyParts = error( + n0, + _TMP, + { + [_e]: _c, + [_hE]: 400, + }, + [], + [], + + __TooManyParts +); +export var TopicConfiguration = struct( + n0, + _TCop, + 0, + [_Id, _TA, _Eve, _F], + [ + 0, + [ + 0, + { + [_xN]: _Top, + }, + ], + [ + 64 | 0, + { + [_xN]: _Ev, + [_xF]: 1, + }, + ], + [() => NotificationConfigurationFilter, 0], + ] +); +export var Transition = struct(n0, _Tra, 0, [_D, _Da, _SC], [5, 1, 0]); +export var UploadPartCopyOutput = struct( + n0, + _UPCO, + 0, + [_CSVI, _CPR, _SSE, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [ + [ + 0, + { + [_hH]: _xacsvi, + }, + ], + [() => CopyPartResult, 16], + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var UploadPartCopyRequest = struct( + n0, + _UPCR, + 0, + [ + _Bu, + _CS, + _CSIM, + _CSIMS, + _CSINM, + _CSIUS, + _CSR, + _K, + _PN, + _UI, + _SSECA, + _SSECK, + _SSECKMD, + _CSSSECA, + _CSSSECK, + _CSSSECKMD, + _RP, + _EBO, + _ESBO, + ], + [ + [0, 1], + [ + 0, + { + [_hH]: _xacs__, + }, + ], + [ + 0, + { + [_hH]: _xacsim, + }, + ], + [ + 4, + { + [_hH]: _xacsims, + }, + ], + [ + 0, + { + [_hH]: _xacsinm, + }, + ], + [ + 4, + { + [_hH]: _xacsius, + }, + ], + [ + 0, + { + [_hH]: _xacsr, + }, + ], + [0, 1], + [ + 1, + { + [_hQ]: _pN, + }, + ], + [ + 0, + { + [_hQ]: _uI, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + 0, + { + [_hH]: _xacssseca, + }, + ], + [ + () => CopySourceSSECustomerKey, + { + [_hH]: _xacssseck, + }, + ], + [ + 0, + { + [_hH]: _xacssseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + [ + 0, + { + [_hH]: _xasebo, + }, + ], + ] +); +export var UploadPartOutput = struct( + n0, + _UPO, + 0, + [_SSE, _ET, _CCRC, _CCRCC, _CCRCNVME, _CSHAh, _CSHA, _SSECA, _SSECKMD, _SSEKMSKI, _BKE, _RC], + [ + [ + 0, + { + [_hH]: _xasse, + }, + ], + [ + 0, + { + [_hH]: _ET, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xasseakki, + }, + ], + [ + 2, + { + [_hH]: _xassebke, + }, + ], + [ + 0, + { + [_hH]: _xarc, + }, + ], + ] +); +export var UploadPartRequest = struct( + n0, + _UPR, + 0, + [ + _B, + _Bu, + _CLo, + _CMD, + _CA, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _K, + _PN, + _UI, + _SSECA, + _SSECK, + _SSECKMD, + _RP, + _EBO, + ], + [ + [() => StreamingBlob, 16], + [0, 1], + [ + 1, + { + [_hH]: _CL__, + }, + ], + [ + 0, + { + [_hH]: _CM_, + }, + ], + [ + 0, + { + [_hH]: _xasca, + }, + ], + [ + 0, + { + [_hH]: _xacc, + }, + ], + [ + 0, + { + [_hH]: _xacc_, + }, + ], + [ + 0, + { + [_hH]: _xacc__, + }, + ], + [ + 0, + { + [_hH]: _xacs, + }, + ], + [ + 0, + { + [_hH]: _xacs_, + }, + ], + [0, 1], + [ + 1, + { + [_hQ]: _pN, + }, + ], + [ + 0, + { + [_hQ]: _uI, + }, + ], + [ + 0, + { + [_hH]: _xasseca, + }, + ], + [ + () => SSECustomerKey, + { + [_hH]: _xasseck, + }, + ], + [ + 0, + { + [_hH]: _xasseckM, + }, + ], + [ + 0, + { + [_hH]: _xarp, + }, + ], + [ + 0, + { + [_hH]: _xaebo, + }, + ], + ] +); +export var VersioningConfiguration = struct( + n0, + _VCe, + 0, + [_MFAD, _Sta], + [ + [ + 0, + { + [_xN]: _MDf, + }, + ], + 0, + ] +); +export var WebsiteConfiguration = struct( + n0, + _WC, + 0, + [_EDr, _IDn, _RART, _RRo], + [() => ErrorDocument, () => IndexDocument, () => RedirectAllRequestsTo, [() => RoutingRules, 0]] +); +export var WriteGetObjectResponseRequest = struct( + n0, + _WGORR, + 0, + [ + _RR, + _RT, + _B, + _SCt, + _EC, + _EM, + _AR, + _CC, + _CD, + _CE, + _CL, + _CLo, + _CR, + _CTo, + _CCRC, + _CCRCC, + _CCRCNVME, + _CSHAh, + _CSHA, + _DM, + _ET, + _Ex, + _E, + _LM, + _MM, + _M, + _OLM, + _OLLHS, + _OLRUD, + _PC, + _RS, + _RC, + _Re, + _SSE, + _SSECA, + _SSEKMSKI, + _SSECKMD, + _SC, + _TC, + _VI, + _BKE, + ], + [ + [ + 0, + { + [_hL]: 1, + [_hH]: _xarr, + }, + ], + [ + 0, + { + [_hH]: _xart, + }, + ], + [() => StreamingBlob, 16], + [ + 1, + { + [_hH]: _xafs, + }, + ], + [ + 0, + { + [_hH]: _xafec, + }, + ], + [ + 0, + { + [_hH]: _xafem, + }, + ], + [ + 0, + { + [_hH]: _xafhar, + }, + ], + [ + 0, + { + [_hH]: _xafhCC, + }, + ], + [ + 0, + { + [_hH]: _xafhCD, + }, + ], + [ + 0, + { + [_hH]: _xafhCE, + }, + ], + [ + 0, + { + [_hH]: _xafhCL, + }, + ], + [ + 1, + { + [_hH]: _CL__, + }, + ], + [ + 0, + { + [_hH]: _xafhCR, + }, + ], + [ + 0, + { + [_hH]: _xafhCT, + }, + ], + [ + 0, + { + [_hH]: _xafhxacc, + }, + ], + [ + 0, + { + [_hH]: _xafhxacc_, + }, + ], + [ + 0, + { + [_hH]: _xafhxacc__, + }, + ], + [ + 0, + { + [_hH]: _xafhxacs, + }, + ], + [ + 0, + { + [_hH]: _xafhxacs_, + }, + ], + [ + 2, + { + [_hH]: _xafhxadm, + }, + ], + [ + 0, + { + [_hH]: _xafhE, + }, + ], + [ + 4, + { + [_hH]: _xafhE_, + }, + ], + [ + 0, + { + [_hH]: _xafhxae, + }, + ], + [ + 4, + { + [_hH]: _xafhLM, + }, + ], + [ + 1, + { + [_hH]: _xafhxamm, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xam, + }, + ], + [ + 0, + { + [_hH]: _xafhxaolm, + }, + ], + [ + 0, + { + [_hH]: _xafhxaollh, + }, + ], + [ + 5, + { + [_hH]: _xafhxaolrud, + }, + ], + [ + 1, + { + [_hH]: _xafhxampc, + }, + ], + [ + 0, + { + [_hH]: _xafhxars, + }, + ], + [ + 0, + { + [_hH]: _xafhxarc, + }, + ], + [ + 0, + { + [_hH]: _xafhxar, + }, + ], + [ + 0, + { + [_hH]: _xafhxasse, + }, + ], + [ + 0, + { + [_hH]: _xafhxasseca, + }, + ], + [ + () => SSEKMSKeyId, + { + [_hH]: _xafhxasseakki, + }, + ], + [ + 0, + { + [_hH]: _xafhxasseckM, + }, + ], + [ + 0, + { + [_hH]: _xafhxasc, + }, + ], + [ + 1, + { + [_hH]: _xafhxatc, + }, + ], + [ + 0, + { + [_hH]: _xafhxavi, + }, + ], + [ + 2, + { + [_hH]: _xafhxassebke, + }, + ], + ] +); +export var Unit = "unit" as const; + +export var S3ServiceException = error( + "awssdkjs.synthetic.com.amazonaws.s3", + "S3ServiceException", + 0, + [], + [], + __S3ServiceException +); +export var AllowedHeaders = 64 | 0; + +export var AllowedMethods = 64 | 0; + +export var AllowedOrigins = 64 | 0; + +export var AnalyticsConfigurationList = list(n0, _ACLn, 0, [() => AnalyticsConfiguration, 0]); +export var Buckets = list(n0, _Buc, 0, [ + () => Bucket, + { + [_xN]: _Bu, + }, +]); +export var ChecksumAlgorithmList = 64 | 0; + +export var CommonPrefixList = list(n0, _CPL, 0, () => CommonPrefix); +export var CompletedPartList = list(n0, _CPLo, 0, () => CompletedPart); +export var CORSRules = list(n0, _CORSR, 0, [() => CORSRule, 0]); +export var DeletedObjects = list(n0, _DOe, 0, () => DeletedObject); +export var DeleteMarkers = list(n0, _DMe, 0, () => DeleteMarkerEntry); +export var Errors = list(n0, _Er, 0, () => _Error); +export var EventList = 64 | 0; + +export var ExposeHeaders = 64 | 0; + +export var FilterRuleList = list(n0, _FRL, 0, () => FilterRule); +export var Grants = list(n0, _G, 0, [ + () => Grant, + { + [_xN]: _Gr, + }, +]); +export var IntelligentTieringConfigurationList = list(n0, _ITCL, 0, [() => IntelligentTieringConfiguration, 0]); +export var InventoryConfigurationList = list(n0, _ICL, 0, [() => InventoryConfiguration, 0]); +export var InventoryOptionalFields = list(n0, _IOF, 0, [ + 0, + { + [_xN]: _Fi, + }, +]); +export var LambdaFunctionConfigurationList = list(n0, _LFCL, 0, [() => LambdaFunctionConfiguration, 0]); +export var LifecycleRules = list(n0, _LRi, 0, [() => LifecycleRule, 0]); +export var MetricsConfigurationList = list(n0, _MCL, 0, [() => MetricsConfiguration, 0]); +export var MultipartUploadList = list(n0, _MUL, 0, () => MultipartUpload); +export var NoncurrentVersionTransitionList = list(n0, _NVTL, 0, () => NoncurrentVersionTransition); +export var ObjectAttributesList = 64 | 0; + +export var ObjectIdentifierList = list(n0, _OIL, 0, () => ObjectIdentifier); +export var ObjectList = list(n0, _OLb, 0, [() => _Object, 0]); +export var ObjectVersionList = list(n0, _OVL, 0, [() => ObjectVersion, 0]); +export var OptionalObjectAttributesList = 64 | 0; + +export var OwnershipControlsRules = list(n0, _OCRw, 0, () => OwnershipControlsRule); +export var Parts = list(n0, _Par, 0, () => Part); +export var PartsList = list(n0, _PL, 0, () => ObjectPart); +export var QueueConfigurationList = list(n0, _QCL, 0, [() => QueueConfiguration, 0]); +export var ReplicationRules = list(n0, _RRep, 0, [() => ReplicationRule, 0]); +export var RoutingRules = list(n0, _RRo, 0, [ + () => RoutingRule, + { + [_xN]: _RRou, + }, +]); +export var ServerSideEncryptionRules = list(n0, _SSERe, 0, [() => ServerSideEncryptionRule, 0]); +export var TagSet = list(n0, _TS, 0, [ + () => Tag, + { + [_xN]: _Tag, + }, +]); +export var TargetGrants = list(n0, _TG, 0, [ + () => TargetGrant, + { + [_xN]: _Gr, + }, +]); +export var TieringList = list(n0, _TL, 0, () => Tiering); +export var TopicConfigurationList = list(n0, _TCL, 0, [() => TopicConfiguration, 0]); +export var TransitionList = list(n0, _TLr, 0, () => Transition); +export var UserMetadata = list(n0, _UM, 0, [ + () => MetadataEntry, + { + [_xN]: _ME, + }, +]); +export var Metadata = 128 | 0; + +export var AnalyticsFilter = uni(n0, _AF, 0, [_Pr, _Tag, _An], [0, () => Tag, [() => AnalyticsAndOperator, 0]]); +export var MetricsFilter = uni(n0, _MF, 0, [_Pr, _Tag, _APA, _An], [0, () => Tag, 0, [() => MetricsAndOperator, 0]]); +export var SelectObjectContentEventStream = uni( + n0, + _SOCES, + { + [_s]: 1, + }, + [_Rec, _Stat, _Prog, _Cont_, _En], + [[() => RecordsEvent, 0], [() => StatsEvent, 0], [() => ProgressEvent, 0], () => ContinuationEvent, () => EndEvent] +); +export var AbortMultipartUpload = op( + n0, + _AMU, + { + [_h]: ["DELETE", "/{Bucket}/{Key+}?x-id=AbortMultipartUpload", 204], + }, + () => AbortMultipartUploadRequest, + () => AbortMultipartUploadOutput +); +export var CompleteMultipartUpload = op( + n0, + _CMUo, + { + [_h]: ["POST", "/{Bucket}/{Key+}", 200], + }, + () => CompleteMultipartUploadRequest, + () => CompleteMultipartUploadOutput +); +export var CopyObject = op( + n0, + _CO, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?x-id=CopyObject", 200], + }, + () => CopyObjectRequest, + () => CopyObjectOutput +); +export var CreateBucket = op( + n0, + _CB, + { + [_h]: ["PUT", "/{Bucket}", 200], + }, + () => CreateBucketRequest, + () => CreateBucketOutput +); +export var CreateBucketMetadataTableConfiguration = op( + n0, + _CBMTC, + { + [_h]: ["POST", "/{Bucket}?metadataTable", 200], + }, + () => CreateBucketMetadataTableConfigurationRequest, + () => Unit +); +export var CreateMultipartUpload = op( + n0, + _CMUr, + { + [_h]: ["POST", "/{Bucket}/{Key+}?uploads", 200], + }, + () => CreateMultipartUploadRequest, + () => CreateMultipartUploadOutput +); +export var CreateSession = op( + n0, + _CSr, + { + [_h]: ["GET", "/{Bucket}?session", 200], + }, + () => CreateSessionRequest, + () => CreateSessionOutput +); +export var DeleteBucket = op( + n0, + _DB, + { + [_h]: ["DELETE", "/{Bucket}", 204], + }, + () => DeleteBucketRequest, + () => Unit +); +export var DeleteBucketAnalyticsConfiguration = op( + n0, + _DBAC, + { + [_h]: ["DELETE", "/{Bucket}?analytics", 204], + }, + () => DeleteBucketAnalyticsConfigurationRequest, + () => Unit +); +export var DeleteBucketCors = op( + n0, + _DBC, + { + [_h]: ["DELETE", "/{Bucket}?cors", 204], + }, + () => DeleteBucketCorsRequest, + () => Unit +); +export var DeleteBucketEncryption = op( + n0, + _DBE, + { + [_h]: ["DELETE", "/{Bucket}?encryption", 204], + }, + () => DeleteBucketEncryptionRequest, + () => Unit +); +export var DeleteBucketIntelligentTieringConfiguration = op( + n0, + _DBITC, + { + [_h]: ["DELETE", "/{Bucket}?intelligent-tiering", 204], + }, + () => DeleteBucketIntelligentTieringConfigurationRequest, + () => Unit +); +export var DeleteBucketInventoryConfiguration = op( + n0, + _DBIC, + { + [_h]: ["DELETE", "/{Bucket}?inventory", 204], + }, + () => DeleteBucketInventoryConfigurationRequest, + () => Unit +); +export var DeleteBucketLifecycle = op( + n0, + _DBL, + { + [_h]: ["DELETE", "/{Bucket}?lifecycle", 204], + }, + () => DeleteBucketLifecycleRequest, + () => Unit +); +export var DeleteBucketMetadataTableConfiguration = op( + n0, + _DBMTC, + { + [_h]: ["DELETE", "/{Bucket}?metadataTable", 204], + }, + () => DeleteBucketMetadataTableConfigurationRequest, + () => Unit +); +export var DeleteBucketMetricsConfiguration = op( + n0, + _DBMC, + { + [_h]: ["DELETE", "/{Bucket}?metrics", 204], + }, + () => DeleteBucketMetricsConfigurationRequest, + () => Unit +); +export var DeleteBucketOwnershipControls = op( + n0, + _DBOC, + { + [_h]: ["DELETE", "/{Bucket}?ownershipControls", 204], + }, + () => DeleteBucketOwnershipControlsRequest, + () => Unit +); +export var DeleteBucketPolicy = op( + n0, + _DBP, + { + [_h]: ["DELETE", "/{Bucket}?policy", 204], + }, + () => DeleteBucketPolicyRequest, + () => Unit +); +export var DeleteBucketReplication = op( + n0, + _DBRe, + { + [_h]: ["DELETE", "/{Bucket}?replication", 204], + }, + () => DeleteBucketReplicationRequest, + () => Unit +); +export var DeleteBucketTagging = op( + n0, + _DBTe, + { + [_h]: ["DELETE", "/{Bucket}?tagging", 204], + }, + () => DeleteBucketTaggingRequest, + () => Unit +); +export var DeleteBucketWebsite = op( + n0, + _DBW, + { + [_h]: ["DELETE", "/{Bucket}?website", 204], + }, + () => DeleteBucketWebsiteRequest, + () => Unit +); +export var DeleteObject = op( + n0, + _DOel, + { + [_h]: ["DELETE", "/{Bucket}/{Key+}?x-id=DeleteObject", 204], + }, + () => DeleteObjectRequest, + () => DeleteObjectOutput +); +export var DeleteObjects = op( + n0, + _DOele, + { + [_h]: ["POST", "/{Bucket}?delete", 200], + }, + () => DeleteObjectsRequest, + () => DeleteObjectsOutput +); +export var DeleteObjectTagging = op( + n0, + _DOT, + { + [_h]: ["DELETE", "/{Bucket}/{Key+}?tagging", 204], + }, + () => DeleteObjectTaggingRequest, + () => DeleteObjectTaggingOutput +); +export var DeletePublicAccessBlock = op( + n0, + _DPAB, + { + [_h]: ["DELETE", "/{Bucket}?publicAccessBlock", 204], + }, + () => DeletePublicAccessBlockRequest, + () => Unit +); +export var GetBucketAccelerateConfiguration = op( + n0, + _GBAC, + { + [_h]: ["GET", "/{Bucket}?accelerate", 200], + }, + () => GetBucketAccelerateConfigurationRequest, + () => GetBucketAccelerateConfigurationOutput +); +export var GetBucketAcl = op( + n0, + _GBA, + { + [_h]: ["GET", "/{Bucket}?acl", 200], + }, + () => GetBucketAclRequest, + () => GetBucketAclOutput +); +export var GetBucketAnalyticsConfiguration = op( + n0, + _GBACe, + { + [_h]: ["GET", "/{Bucket}?analytics&x-id=GetBucketAnalyticsConfiguration", 200], + }, + () => GetBucketAnalyticsConfigurationRequest, + () => GetBucketAnalyticsConfigurationOutput +); +export var GetBucketCors = op( + n0, + _GBC, + { + [_h]: ["GET", "/{Bucket}?cors", 200], + }, + () => GetBucketCorsRequest, + () => GetBucketCorsOutput +); +export var GetBucketEncryption = op( + n0, + _GBE, + { + [_h]: ["GET", "/{Bucket}?encryption", 200], + }, + () => GetBucketEncryptionRequest, + () => GetBucketEncryptionOutput +); +export var GetBucketIntelligentTieringConfiguration = op( + n0, + _GBITC, + { + [_h]: ["GET", "/{Bucket}?intelligent-tiering&x-id=GetBucketIntelligentTieringConfiguration", 200], + }, + () => GetBucketIntelligentTieringConfigurationRequest, + () => GetBucketIntelligentTieringConfigurationOutput +); +export var GetBucketInventoryConfiguration = op( + n0, + _GBIC, + { + [_h]: ["GET", "/{Bucket}?inventory&x-id=GetBucketInventoryConfiguration", 200], + }, + () => GetBucketInventoryConfigurationRequest, + () => GetBucketInventoryConfigurationOutput +); +export var GetBucketLifecycleConfiguration = op( + n0, + _GBLC, + { + [_h]: ["GET", "/{Bucket}?lifecycle", 200], + }, + () => GetBucketLifecycleConfigurationRequest, + () => GetBucketLifecycleConfigurationOutput +); +export var GetBucketLocation = op( + n0, + _GBL, + { + [_h]: ["GET", "/{Bucket}?location", 200], + }, + () => GetBucketLocationRequest, + () => GetBucketLocationOutput +); +export var GetBucketLogging = op( + n0, + _GBLe, + { + [_h]: ["GET", "/{Bucket}?logging", 200], + }, + () => GetBucketLoggingRequest, + () => GetBucketLoggingOutput +); +export var GetBucketMetadataTableConfiguration = op( + n0, + _GBMTC, + { + [_h]: ["GET", "/{Bucket}?metadataTable", 200], + }, + () => GetBucketMetadataTableConfigurationRequest, + () => GetBucketMetadataTableConfigurationOutput +); +export var GetBucketMetricsConfiguration = op( + n0, + _GBMC, + { + [_h]: ["GET", "/{Bucket}?metrics&x-id=GetBucketMetricsConfiguration", 200], + }, + () => GetBucketMetricsConfigurationRequest, + () => GetBucketMetricsConfigurationOutput +); +export var GetBucketNotificationConfiguration = op( + n0, + _GBNC, + { + [_h]: ["GET", "/{Bucket}?notification", 200], + }, + () => GetBucketNotificationConfigurationRequest, + () => NotificationConfiguration +); +export var GetBucketOwnershipControls = op( + n0, + _GBOC, + { + [_h]: ["GET", "/{Bucket}?ownershipControls", 200], + }, + () => GetBucketOwnershipControlsRequest, + () => GetBucketOwnershipControlsOutput +); +export var GetBucketPolicy = op( + n0, + _GBP, + { + [_h]: ["GET", "/{Bucket}?policy", 200], + }, + () => GetBucketPolicyRequest, + () => GetBucketPolicyOutput +); +export var GetBucketPolicyStatus = op( + n0, + _GBPS, + { + [_h]: ["GET", "/{Bucket}?policyStatus", 200], + }, + () => GetBucketPolicyStatusRequest, + () => GetBucketPolicyStatusOutput +); +export var GetBucketReplication = op( + n0, + _GBR, + { + [_h]: ["GET", "/{Bucket}?replication", 200], + }, + () => GetBucketReplicationRequest, + () => GetBucketReplicationOutput +); +export var GetBucketRequestPayment = op( + n0, + _GBRP, + { + [_h]: ["GET", "/{Bucket}?requestPayment", 200], + }, + () => GetBucketRequestPaymentRequest, + () => GetBucketRequestPaymentOutput +); +export var GetBucketTagging = op( + n0, + _GBT, + { + [_h]: ["GET", "/{Bucket}?tagging", 200], + }, + () => GetBucketTaggingRequest, + () => GetBucketTaggingOutput +); +export var GetBucketVersioning = op( + n0, + _GBV, + { + [_h]: ["GET", "/{Bucket}?versioning", 200], + }, + () => GetBucketVersioningRequest, + () => GetBucketVersioningOutput +); +export var GetBucketWebsite = op( + n0, + _GBW, + { + [_h]: ["GET", "/{Bucket}?website", 200], + }, + () => GetBucketWebsiteRequest, + () => GetBucketWebsiteOutput +); +export var GetObject = op( + n0, + _GO, + { + [_h]: ["GET", "/{Bucket}/{Key+}?x-id=GetObject", 200], + }, + () => GetObjectRequest, + () => GetObjectOutput +); +export var GetObjectAcl = op( + n0, + _GOA, + { + [_h]: ["GET", "/{Bucket}/{Key+}?acl", 200], + }, + () => GetObjectAclRequest, + () => GetObjectAclOutput +); +export var GetObjectAttributes = op( + n0, + _GOAe, + { + [_h]: ["GET", "/{Bucket}/{Key+}?attributes", 200], + }, + () => GetObjectAttributesRequest, + () => GetObjectAttributesOutput +); +export var GetObjectLegalHold = op( + n0, + _GOLH, + { + [_h]: ["GET", "/{Bucket}/{Key+}?legal-hold", 200], + }, + () => GetObjectLegalHoldRequest, + () => GetObjectLegalHoldOutput +); +export var GetObjectLockConfiguration = op( + n0, + _GOLC, + { + [_h]: ["GET", "/{Bucket}?object-lock", 200], + }, + () => GetObjectLockConfigurationRequest, + () => GetObjectLockConfigurationOutput +); +export var GetObjectRetention = op( + n0, + _GORe, + { + [_h]: ["GET", "/{Bucket}/{Key+}?retention", 200], + }, + () => GetObjectRetentionRequest, + () => GetObjectRetentionOutput +); +export var GetObjectTagging = op( + n0, + _GOT, + { + [_h]: ["GET", "/{Bucket}/{Key+}?tagging", 200], + }, + () => GetObjectTaggingRequest, + () => GetObjectTaggingOutput +); +export var GetObjectTorrent = op( + n0, + _GOTe, + { + [_h]: ["GET", "/{Bucket}/{Key+}?torrent", 200], + }, + () => GetObjectTorrentRequest, + () => GetObjectTorrentOutput +); +export var GetPublicAccessBlock = op( + n0, + _GPAB, + { + [_h]: ["GET", "/{Bucket}?publicAccessBlock", 200], + }, + () => GetPublicAccessBlockRequest, + () => GetPublicAccessBlockOutput +); +export var HeadBucket = op( + n0, + _HB, + { + [_h]: ["HEAD", "/{Bucket}", 200], + }, + () => HeadBucketRequest, + () => HeadBucketOutput +); +export var HeadObject = op( + n0, + _HO, + { + [_h]: ["HEAD", "/{Bucket}/{Key+}", 200], + }, + () => HeadObjectRequest, + () => HeadObjectOutput +); +export var ListBucketAnalyticsConfigurations = op( + n0, + _LBAC, + { + [_h]: ["GET", "/{Bucket}?analytics&x-id=ListBucketAnalyticsConfigurations", 200], + }, + () => ListBucketAnalyticsConfigurationsRequest, + () => ListBucketAnalyticsConfigurationsOutput +); +export var ListBucketIntelligentTieringConfigurations = op( + n0, + _LBITC, + { + [_h]: ["GET", "/{Bucket}?intelligent-tiering&x-id=ListBucketIntelligentTieringConfigurations", 200], + }, + () => ListBucketIntelligentTieringConfigurationsRequest, + () => ListBucketIntelligentTieringConfigurationsOutput +); +export var ListBucketInventoryConfigurations = op( + n0, + _LBIC, + { + [_h]: ["GET", "/{Bucket}?inventory&x-id=ListBucketInventoryConfigurations", 200], + }, + () => ListBucketInventoryConfigurationsRequest, + () => ListBucketInventoryConfigurationsOutput +); +export var ListBucketMetricsConfigurations = op( + n0, + _LBMC, + { + [_h]: ["GET", "/{Bucket}?metrics&x-id=ListBucketMetricsConfigurations", 200], + }, + () => ListBucketMetricsConfigurationsRequest, + () => ListBucketMetricsConfigurationsOutput +); +export var ListBuckets = op( + n0, + _LB, + { + [_h]: ["GET", "/?x-id=ListBuckets", 200], + }, + () => ListBucketsRequest, + () => ListBucketsOutput +); +export var ListDirectoryBuckets = op( + n0, + _LDB, + { + [_h]: ["GET", "/?x-id=ListDirectoryBuckets", 200], + }, + () => ListDirectoryBucketsRequest, + () => ListDirectoryBucketsOutput +); +export var ListMultipartUploads = op( + n0, + _LMU, + { + [_h]: ["GET", "/{Bucket}?uploads", 200], + }, + () => ListMultipartUploadsRequest, + () => ListMultipartUploadsOutput +); +export var ListObjects = op( + n0, + _LO, + { + [_h]: ["GET", "/{Bucket}", 200], + }, + () => ListObjectsRequest, + () => ListObjectsOutput +); +export var ListObjectsV2 = op( + n0, + _LOV, + { + [_h]: ["GET", "/{Bucket}?list-type=2", 200], + }, + () => ListObjectsV2Request, + () => ListObjectsV2Output +); +export var ListObjectVersions = op( + n0, + _LOVi, + { + [_h]: ["GET", "/{Bucket}?versions", 200], + }, + () => ListObjectVersionsRequest, + () => ListObjectVersionsOutput +); +export var ListParts = op( + n0, + _LPi, + { + [_h]: ["GET", "/{Bucket}/{Key+}?x-id=ListParts", 200], + }, + () => ListPartsRequest, + () => ListPartsOutput +); +export var PutBucketAccelerateConfiguration = op( + n0, + _PBAC, + { + [_h]: ["PUT", "/{Bucket}?accelerate", 200], + }, + () => PutBucketAccelerateConfigurationRequest, + () => Unit +); +export var PutBucketAcl = op( + n0, + _PBA, + { + [_h]: ["PUT", "/{Bucket}?acl", 200], + }, + () => PutBucketAclRequest, + () => Unit +); +export var PutBucketAnalyticsConfiguration = op( + n0, + _PBACu, + { + [_h]: ["PUT", "/{Bucket}?analytics", 200], + }, + () => PutBucketAnalyticsConfigurationRequest, + () => Unit +); +export var PutBucketCors = op( + n0, + _PBC, + { + [_h]: ["PUT", "/{Bucket}?cors", 200], + }, + () => PutBucketCorsRequest, + () => Unit +); +export var PutBucketEncryption = op( + n0, + _PBE, + { + [_h]: ["PUT", "/{Bucket}?encryption", 200], + }, + () => PutBucketEncryptionRequest, + () => Unit +); +export var PutBucketIntelligentTieringConfiguration = op( + n0, + _PBITC, + { + [_h]: ["PUT", "/{Bucket}?intelligent-tiering", 200], + }, + () => PutBucketIntelligentTieringConfigurationRequest, + () => Unit +); +export var PutBucketInventoryConfiguration = op( + n0, + _PBIC, + { + [_h]: ["PUT", "/{Bucket}?inventory", 200], + }, + () => PutBucketInventoryConfigurationRequest, + () => Unit +); +export var PutBucketLifecycleConfiguration = op( + n0, + _PBLC, + { + [_h]: ["PUT", "/{Bucket}?lifecycle", 200], + }, + () => PutBucketLifecycleConfigurationRequest, + () => PutBucketLifecycleConfigurationOutput +); +export var PutBucketLogging = op( + n0, + _PBL, + { + [_h]: ["PUT", "/{Bucket}?logging", 200], + }, + () => PutBucketLoggingRequest, + () => Unit +); +export var PutBucketMetricsConfiguration = op( + n0, + _PBMC, + { + [_h]: ["PUT", "/{Bucket}?metrics", 200], + }, + () => PutBucketMetricsConfigurationRequest, + () => Unit +); +export var PutBucketNotificationConfiguration = op( + n0, + _PBNC, + { + [_h]: ["PUT", "/{Bucket}?notification", 200], + }, + () => PutBucketNotificationConfigurationRequest, + () => Unit +); +export var PutBucketOwnershipControls = op( + n0, + _PBOC, + { + [_h]: ["PUT", "/{Bucket}?ownershipControls", 200], + }, + () => PutBucketOwnershipControlsRequest, + () => Unit +); +export var PutBucketPolicy = op( + n0, + _PBP, + { + [_h]: ["PUT", "/{Bucket}?policy", 200], + }, + () => PutBucketPolicyRequest, + () => Unit +); +export var PutBucketReplication = op( + n0, + _PBR, + { + [_h]: ["PUT", "/{Bucket}?replication", 200], + }, + () => PutBucketReplicationRequest, + () => Unit +); +export var PutBucketRequestPayment = op( + n0, + _PBRP, + { + [_h]: ["PUT", "/{Bucket}?requestPayment", 200], + }, + () => PutBucketRequestPaymentRequest, + () => Unit +); +export var PutBucketTagging = op( + n0, + _PBT, + { + [_h]: ["PUT", "/{Bucket}?tagging", 200], + }, + () => PutBucketTaggingRequest, + () => Unit +); +export var PutBucketVersioning = op( + n0, + _PBV, + { + [_h]: ["PUT", "/{Bucket}?versioning", 200], + }, + () => PutBucketVersioningRequest, + () => Unit +); +export var PutBucketWebsite = op( + n0, + _PBW, + { + [_h]: ["PUT", "/{Bucket}?website", 200], + }, + () => PutBucketWebsiteRequest, + () => Unit +); +export var PutObject = op( + n0, + _PO, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?x-id=PutObject", 200], + }, + () => PutObjectRequest, + () => PutObjectOutput +); +export var PutObjectAcl = op( + n0, + _POA, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?acl", 200], + }, + () => PutObjectAclRequest, + () => PutObjectAclOutput +); +export var PutObjectLegalHold = op( + n0, + _POLH, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?legal-hold", 200], + }, + () => PutObjectLegalHoldRequest, + () => PutObjectLegalHoldOutput +); +export var PutObjectLockConfiguration = op( + n0, + _POLC, + { + [_h]: ["PUT", "/{Bucket}?object-lock", 200], + }, + () => PutObjectLockConfigurationRequest, + () => PutObjectLockConfigurationOutput +); +export var PutObjectRetention = op( + n0, + _PORu, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?retention", 200], + }, + () => PutObjectRetentionRequest, + () => PutObjectRetentionOutput +); +export var PutObjectTagging = op( + n0, + _POT, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?tagging", 200], + }, + () => PutObjectTaggingRequest, + () => PutObjectTaggingOutput +); +export var PutPublicAccessBlock = op( + n0, + _PPAB, + { + [_h]: ["PUT", "/{Bucket}?publicAccessBlock", 200], + }, + () => PutPublicAccessBlockRequest, + () => Unit +); +export var RestoreObject = op( + n0, + _RO, + { + [_h]: ["POST", "/{Bucket}/{Key+}?restore", 200], + }, + () => RestoreObjectRequest, + () => RestoreObjectOutput +); +export var SelectObjectContent = op( + n0, + _SOC, + { + [_h]: ["POST", "/{Bucket}/{Key+}?select&select-type=2", 200], + }, + () => SelectObjectContentRequest, + () => SelectObjectContentOutput +); +export var UploadPart = op( + n0, + _UP, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?x-id=UploadPart", 200], + }, + () => UploadPartRequest, + () => UploadPartOutput +); +export var UploadPartCopy = op( + n0, + _UPC, + { + [_h]: ["PUT", "/{Bucket}/{Key+}?x-id=UploadPartCopy", 200], + }, + () => UploadPartCopyRequest, + () => UploadPartCopyOutput +); +export var WriteGetObjectResponse = op( + n0, + _WGOR, + { + [_en]: ["{RequestRoute}."], + [_h]: ["POST", "/WriteGetObjectResponse", 200], + }, + () => WriteGetObjectResponseRequest, + () => Unit +); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddProtocolConfig.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddProtocolConfig.java new file mode 100644 index 0000000000000..d1f467bf87d00 --- /dev/null +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddProtocolConfig.java @@ -0,0 +1,167 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package software.amazon.smithy.aws.typescript.codegen; + +import java.util.Collections; +import java.util.Map; +import java.util.Objects; +import java.util.function.Consumer; + +import software.amazon.smithy.aws.traits.protocols.AwsJson1_0Trait; +import software.amazon.smithy.aws.traits.protocols.AwsJson1_1Trait; +import software.amazon.smithy.aws.traits.protocols.AwsQueryTrait; +import software.amazon.smithy.aws.traits.protocols.Ec2QueryTrait; +import software.amazon.smithy.aws.traits.protocols.RestJson1Trait; +import software.amazon.smithy.aws.traits.protocols.RestXmlTrait; +import software.amazon.smithy.codegen.core.SymbolProvider; +import software.amazon.smithy.model.Model; +import software.amazon.smithy.model.traits.XmlNamespaceTrait; +import software.amazon.smithy.typescript.codegen.LanguageTarget; +import software.amazon.smithy.typescript.codegen.TypeScriptSettings; +import software.amazon.smithy.typescript.codegen.TypeScriptWriter; +import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration; +import software.amazon.smithy.typescript.codegen.schema.SchemaGenerationAllowlist; +import software.amazon.smithy.utils.MapUtils; +import software.amazon.smithy.utils.SmithyInternalApi; + + +/** + * Adds a protocol implementation to the runtime config. + */ +@SmithyInternalApi +public final class AddProtocolConfig implements TypeScriptIntegration { + + public AddProtocolConfig() { + SchemaGenerationAllowlist.allow("com.amazonaws.s3#AmazonS3"); + SchemaGenerationAllowlist.allow("com.amazonaws.dynamodb#DynamoDB_20120810"); + SchemaGenerationAllowlist.allow("com.amazonaws.lambda#AWSGirApiService"); + + // protocol tests + SchemaGenerationAllowlist.allow("aws.protocoltests.json10#JsonRpc10"); + SchemaGenerationAllowlist.allow("aws.protocoltests.json#JsonProtocol"); + SchemaGenerationAllowlist.allow("aws.protocoltests.restjson#RestJson"); + SchemaGenerationAllowlist.allow("aws.protocoltests.restxml#RestXml"); + SchemaGenerationAllowlist.allow("aws.protocoltests.query#AwsQuery"); + SchemaGenerationAllowlist.allow("aws.protocoltests.ec2#AwsEc2"); + } + + @Override + public void addConfigInterfaceFields( + TypeScriptSettings settings, + Model model, + SymbolProvider symbolProvider, + TypeScriptWriter writer + ) { + // the {{ protocol?: Protocol }} type field is provided + // by the smithy client config interface. + } + + @Override + public Map> getRuntimeConfigWriters( + TypeScriptSettings settings, + Model model, + SymbolProvider symbolProvider, + LanguageTarget target + ) { + if (!SchemaGenerationAllowlist.contains(settings.getService())) { + return Collections.emptyMap(); + } + String namespace = settings.getService().getNamespace(); + String xmlns = settings.getService(model) + .getTrait(XmlNamespaceTrait.class) + .map(XmlNamespaceTrait::getUri) + .orElse(""); + + switch (target) { + case SHARED: + if (Objects.equals(settings.getProtocol(), RestXmlTrait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsRestXmlProtocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write(""" + new AwsRestXmlProtocol({ + defaultNamespace: $S, xmlNamespace: $S, + })""", + namespace, + xmlns + ); + } + ); + } else if (Objects.equals(settings.getProtocol(), AwsQueryTrait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsQueryProtocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write( + """ + new AwsQueryProtocol({ + defaultNamespace: $S, + xmlNamespace: $S, + version: $S + })""", + namespace, + xmlns, + settings.getService(model).getVersion() + ); + } + ); + } else if (Objects.equals(settings.getProtocol(), Ec2QueryTrait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsEc2QueryProtocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write( + """ + new AwsEc2QueryProtocol({ + defaultNamespace: $S, + xmlNamespace: $S, + version: $S + })""", + namespace, + xmlns, + settings.getService(model).getVersion() + ); + } + ); + } else if (Objects.equals(settings.getProtocol(), RestJson1Trait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsRestJsonProtocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write("new AwsRestJsonProtocol({ defaultNamespace: $S })", namespace); + } + ); + } else if (Objects.equals(settings.getProtocol(), AwsJson1_0Trait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsJson1_0Protocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write("new AwsJson1_0Protocol({ defaultNamespace: $S })", namespace); + } + ); + } else if (Objects.equals(settings.getProtocol(), AwsJson1_1Trait.ID)) { + return MapUtils.of( + "protocol", writer -> { + writer.addImportSubmodule( + "AwsJson1_1Protocol", null, + AwsDependency.AWS_SDK_CORE, "/protocols"); + writer.write("new AwsJson1_1Protocol({ defaultNamespace: $S })", namespace); + } + ); + } + case BROWSER: + case NODE: + default: + return Collections.emptyMap(); + } + } +} diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsQuery.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsQuery.java index 5632010ae91bc..30e4fa09f3046 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsQuery.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AwsQuery.java @@ -28,6 +28,8 @@ import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.model.shapes.StructureShape; import software.amazon.smithy.model.traits.TimestampFormatTrait.Format; +import software.amazon.smithy.model.traits.Trait; +import software.amazon.smithy.typescript.codegen.schema.SchemaTraitExtension; import software.amazon.smithy.typescript.codegen.TypeScriptWriter; import software.amazon.smithy.typescript.codegen.integration.HttpRpcProtocolGenerator; import software.amazon.smithy.typescript.codegen.util.StringStore; @@ -50,6 +52,21 @@ */ @SmithyInternalApi final class AwsQuery extends HttpRpcProtocolGenerator { + static { + SchemaTraitExtension.INSTANCE.add( + AwsQueryErrorTrait.ID, + (Trait trait) -> { + if (trait instanceof AwsQueryErrorTrait awsQueryError) { + return """ + [`%s`, %s]""".formatted( + awsQueryError.getCode(), + awsQueryError.getHttpResponseCode() + ); + } + return ""; + } + ); + } AwsQuery() { // AWS Query protocols will attempt to parse error codes from response bodies. diff --git a/codegen/smithy-aws-typescript-codegen/src/main/resources/META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration b/codegen/smithy-aws-typescript-codegen/src/main/resources/META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration index 55b9da53abf1d..3d66c3fc046b3 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/resources/META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration +++ b/codegen/smithy-aws-typescript-codegen/src/main/resources/META-INF/services/software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration @@ -12,6 +12,7 @@ software.amazon.smithy.aws.typescript.codegen.AwsServiceIdIntegration software.amazon.smithy.aws.typescript.codegen.AwsPackageFixturesGeneratorIntegration software.amazon.smithy.aws.typescript.codegen.AddSqsDependency software.amazon.smithy.aws.typescript.codegen.AddBodyChecksumGeneratorDependency +software.amazon.smithy.aws.typescript.codegen.AddProtocolConfig software.amazon.smithy.aws.typescript.codegen.AddS3Config software.amazon.smithy.aws.typescript.codegen.AddS3ControlDependency software.amazon.smithy.aws.typescript.codegen.AddEventStreamHandlingDependency diff --git a/packages/core/src/submodules/protocols/ConfigurableSerdeContext.ts b/packages/core/src/submodules/protocols/ConfigurableSerdeContext.ts new file mode 100644 index 0000000000000..af2ba0fc84a1d --- /dev/null +++ b/packages/core/src/submodules/protocols/ConfigurableSerdeContext.ts @@ -0,0 +1,12 @@ +import { ConfigurableSerdeContext, SerdeFunctions } from "@smithy/types"; + +/** + * @internal + */ +export class SerdeContextConfig implements ConfigurableSerdeContext { + protected serdeContext?: SerdeFunctions; + + public setSerdeContext(serdeContext: SerdeFunctions): void { + this.serdeContext = serdeContext; + } +} diff --git a/packages/core/src/submodules/protocols/common.ts b/packages/core/src/submodules/protocols/common.ts index d4efe45bd2657..d8c9785258618 100644 --- a/packages/core/src/submodules/protocols/common.ts +++ b/packages/core/src/submodules/protocols/common.ts @@ -1,5 +1,5 @@ import { collectBody } from "@smithy/smithy-client"; -import type { HttpResponse, SerdeContext } from "@smithy/types"; +import type { SerdeFunctions } from "@smithy/types"; -export const collectBodyString = (streamBody: any, context: SerdeContext): Promise => +export const collectBodyString = (streamBody: any, context: SerdeFunctions): Promise => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); diff --git a/packages/core/src/submodules/protocols/index.ts b/packages/core/src/submodules/protocols/index.ts index 09a6ac214ca00..a93942b0399e2 100644 --- a/packages/core/src/submodules/protocols/index.ts +++ b/packages/core/src/submodules/protocols/index.ts @@ -1,4 +1,17 @@ export * from "./coercing-serializers"; +export * from "./json/AwsJson1_0Protocol"; +export * from "./json/AwsJson1_1Protocol"; +export * from "./json/AwsJsonRpcProtocol"; +export * from "./json/AwsRestJsonProtocol"; +export * from "./json/JsonCodec"; +export * from "./json/JsonShapeDeserializer"; +export * from "./json/JsonShapeSerializer"; export * from "./json/awsExpectUnion"; export * from "./json/parseJsonBody"; +export * from "./query/AwsEc2QueryProtocol"; +export * from "./query/AwsQueryProtocol"; +export * from "./xml/AwsRestXmlProtocol"; +export * from "./xml/XmlCodec"; +export * from "./xml/XmlShapeDeserializer"; +export * from "./xml/XmlShapeSerializer"; export * from "./xml/parseXmlBody"; diff --git a/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.spec.ts b/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.spec.ts new file mode 100644 index 0000000000000..741d5c3df996d --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.spec.ts @@ -0,0 +1,112 @@ +import { map, op, SCHEMA, sim, struct } from "@smithy/core/schema"; +import { toBase64 } from "@smithy/util-base64"; +import { toUtf8 } from "@smithy/util-utf8"; +import { describe, expect, test as it } from "vitest"; + +import { AwsJson1_0Protocol } from "./AwsJson1_0Protocol"; + +describe(AwsJson1_0Protocol.name, () => { + const json = { + string: "string", + number: 1234, + boolean: false, + blob: "AAAAAAAAAAA=", + timestamp: 0, + }; + const schema = struct( + "MyStruct", + 0, + [...Object.keys(json)], + [SCHEMA.STRING, SCHEMA.NUMERIC, SCHEMA.BOOLEAN, SCHEMA.BLOB, SCHEMA.TIMESTAMP_DEFAULT] + ); + const serdeContext = { + base64Encoder: toBase64, + utf8Encoder: toUtf8, + } as any; + + describe("codec", () => { + it("serializes blobs and timestamps", () => { + const protocol = new AwsJson1_0Protocol(); + protocol.setSerdeContext(serdeContext); + const codec = protocol.getPayloadCodec(); + const serializer = codec.createSerializer(); + const data = { + string: "string", + number: 1234, + boolean: false, + blob: new Uint8Array(8), + timestamp: new Date(0), + }; + serializer.write(schema, data); + const serialized = serializer.flush(); + expect(JSON.parse(serialized)).toEqual({ + string: "string", + number: 1234, + boolean: false, + blob: "AAAAAAAAAAA=", + timestamp: 0, + }); + }); + + it("deserializes blobs and timestamps", async () => { + const protocol = new AwsJson1_0Protocol(); + protocol.setSerdeContext(serdeContext); + const codec = protocol.getPayloadCodec(); + const deserializer = codec.createDeserializer(); + + const parsed = await deserializer.read(schema, JSON.stringify(json)); + expect(parsed).toEqual({ + string: "string", + number: 1234, + boolean: false, + blob: new Uint8Array(8), + timestamp: new Date(0), + }); + }); + + it("ignores JSON name and HTTP bindings", async () => { + const protocol = new AwsJson1_0Protocol(); + protocol.setSerdeContext(serdeContext); + + const schema = struct( + "MyHttpBindingStructure", + {}, + ["header", "query", "headerMap", "payload"], + [ + sim("MyHeader", SCHEMA.STRING, { httpHeader: "header", jsonName: "MyHeader" }), + sim("MyQuery", SCHEMA.STRING, { httpQuery: "query" }), + map( + "HeaderMap", + { + httpPrefixHeaders: "", + }, + SCHEMA.NUMERIC + ), + sim("MyPayload", SCHEMA.DOCUMENT, { httpPayload: 1 }), + ] + ); + const operationSchema = op("MyOperation", {}, schema, "unit"); + + const request = await protocol.serializeRequest( + operationSchema, + { + header: "hello", + query: "world", + headerMap: { + a: 1, + b: 2, + }, + }, + { + endpointV2: { + url: new URL("https://amazonaws.com/"), + }, + } + ); + + expect(request.headers).toEqual({}); + expect(request.query).toEqual({}); + expect(request.body).toEqual(`{"header":"hello","query":"world","headerMap":{"a":1,"b":2}}`); + }); + }); +}); diff --git a/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.ts b/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.ts new file mode 100644 index 0000000000000..fdb7cd5d4eac0 --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsJson1_0Protocol.ts @@ -0,0 +1,21 @@ +import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol"; + +/** + * @public + * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1 + */ +export class AwsJson1_0Protocol extends AwsJsonRpcProtocol { + public constructor({ defaultNamespace }: { defaultNamespace: string }) { + super({ + defaultNamespace, + }); + } + + public getShapeId(): string { + return "aws.protocols#awsJson1_0"; + } + + protected getJsonRpcVersion() { + return "1.0" as const; + } +} diff --git a/packages/core/src/submodules/protocols/json/AwsJson1_1Protocol.ts b/packages/core/src/submodules/protocols/json/AwsJson1_1Protocol.ts new file mode 100644 index 0000000000000..ca56a89a9059c --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsJson1_1Protocol.ts @@ -0,0 +1,21 @@ +import { AwsJsonRpcProtocol } from "./AwsJsonRpcProtocol"; + +/** + * @public + * @see https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html#differences-between-awsjson1-0-and-awsjson1-1 + */ +export class AwsJson1_1Protocol extends AwsJsonRpcProtocol { + public constructor({ defaultNamespace }: { defaultNamespace: string }) { + super({ + defaultNamespace, + }); + } + + public getShapeId(): string { + return "aws.protocols#awsJson1_1"; + } + + protected getJsonRpcVersion() { + return "1.1" as const; + } +} diff --git a/packages/core/src/submodules/protocols/json/AwsJsonRpcProtocol.ts b/packages/core/src/submodules/protocols/json/AwsJsonRpcProtocol.ts new file mode 100644 index 0000000000000..4a51021f2651e --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsJsonRpcProtocol.ts @@ -0,0 +1,129 @@ +import { RpcProtocol } from "@smithy/core/protocols"; +import { deref, ErrorSchema, NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema"; +import { + EndpointBearer, + HandlerExecutionContext, + HttpRequest, + HttpResponse, + OperationSchema, + ResponseMetadata, + SerdeFunctions, + ShapeDeserializer, + ShapeSerializer, +} from "@smithy/types"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; + +import { JsonCodec } from "./JsonCodec"; +import { loadRestJsonErrorCode } from "./parseJsonBody"; + +/** + * @public + */ +export abstract class AwsJsonRpcProtocol extends RpcProtocol { + protected serializer: ShapeSerializer; + protected deserializer: ShapeDeserializer; + private codec: JsonCodec; + + protected constructor({ defaultNamespace }: { defaultNamespace: string }) { + super({ + defaultNamespace, + }); + this.codec = new JsonCodec({ + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS, + }, + jsonName: false, + }); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + } + + public async serializeRequest( + operationSchema: OperationSchema, + input: Input, + context: HandlerExecutionContext & SerdeFunctions & EndpointBearer + ): Promise { + const request = await super.serializeRequest(operationSchema, input, context); + if (!request.path.endsWith("/")) { + request.path += "/"; + } + Object.assign(request.headers, { + "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, + "x-amz-target": + (this.getJsonRpcVersion() === "1.0" ? `JsonRpc10.` : `JsonProtocol.`) + + NormalizedSchema.of(operationSchema).getName(), + }); + if (deref(operationSchema.input) === "unit" || !request.body) { + request.body = "{}"; + } + try { + request.headers["content-length"] = String(calculateBodyLength(request.body)); + } catch (e) {} + return request; + } + + public getPayloadCodec(): JsonCodec { + return this.codec; + } + + protected abstract getJsonRpcVersion(): "1.1" | "1.0"; + + protected async handleError( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: HttpResponse, + dataObject: any, + metadata: ResponseMetadata + ): Promise { + // loadRestJsonErrorCode is still used in JSON RPC. + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + + const registry = TypeRegistry.for(namespace); + let errorSchema: ErrorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier) as ErrorSchema; + } catch (e) { + const baseExceptionSchema = TypeRegistry.for("awssdkjs.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + + const headerBindings = new Set( + Object.values(NormalizedSchema.of(errorSchema).getMemberSchemas()) + .map((schema) => { + return schema.getMergedTraits().httpHeader; + }) + .filter(Boolean) as string[] + ); + await this.deserializeHttpMessage(errorSchema, context, response, headerBindings, dataObject); + const output = {} as any; + for (const [name, member] of Object.entries(ns.getMemberSchemas())) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output, + }); + + throw exception; + } +} diff --git a/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.spec.ts b/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.spec.ts new file mode 100644 index 0000000000000..c2997af5e5c75 --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.spec.ts @@ -0,0 +1,261 @@ +import { op, SCHEMA, sim, struct } from "@smithy/core/schema"; +import { HttpResponse } from "@smithy/protocol-http"; +import { toBase64 } from "@smithy/util-base64"; +import { toUtf8 } from "@smithy/util-utf8"; +import { describe, expect, test as it } from "vitest"; + +import { AwsRestJsonProtocol } from "./AwsRestJsonProtocol"; + +describe(AwsRestJsonProtocol.name, () => { + const json = { + string: "string", + number: 1234, + boolean: false, + blob: "AAAAAAAAAAA=", + timestamp: 0, + }; + const schema = struct( + "MyStruct", + 0, + [...Object.keys(json)], + [SCHEMA.STRING, SCHEMA.NUMERIC, SCHEMA.BOOLEAN, SCHEMA.BLOB, SCHEMA.TIMESTAMP_DEFAULT] + ); + const serdeContext = { + base64Encoder: toBase64, + utf8Encoder: toUtf8, + } as any; + + describe("codec", () => { + it("serializes blobs and timestamps", () => { + const protocol = new AwsRestJsonProtocol(); + protocol.setSerdeContext(serdeContext); + const codec = protocol.getPayloadCodec(); + const serializer = codec.createSerializer(); + const data = { + string: "string", + number: 1234, + boolean: false, + blob: new Uint8Array(8), + timestamp: new Date(0), + }; + serializer.write(schema, data); + const serialized = serializer.flush(); + expect(JSON.parse(serialized)).toEqual({ + string: "string", + number: 1234, + boolean: false, + blob: "AAAAAAAAAAA=", + timestamp: 0, + }); + }); + + it("deserializes blobs and timestamps", async () => { + const protocol = new AwsRestJsonProtocol(); + protocol.setSerdeContext(serdeContext); + const codec = protocol.getPayloadCodec(); + const deserializer = codec.createDeserializer(); + const parsed = await deserializer.read(schema, JSON.stringify(json)); + expect(parsed).toEqual({ + string: "string", + number: 1234, + boolean: false, + blob: new Uint8Array(8), + timestamp: new Date(0), + }); + }); + }); + + describe("protocol", async () => { + const protocol = new AwsRestJsonProtocol(); + protocol.setSerdeContext(serdeContext); + + const operationSchema = op( + "MyOperation", + {}, + struct( + "MyHttpBindingStructureRequest", + {}, + ["header", "query", "headerMap", "payload"], + [ + [SCHEMA.STRING, { httpHeader: "header" }], + [SCHEMA.STRING, { httpQuery: "query" }], + [ + SCHEMA.MAP_MODIFIER | SCHEMA.NUMERIC, + { + httpPrefixHeaders: "", + }, + ], + [ + struct( + "PayloadStruct", + 0, + ["a", "b"], + [ + [SCHEMA.STRING, 0], + [SCHEMA.STRING, { jsonName: "JSON_NAME" }], + ] + ), + { httpPayload: 1 }, + ], + ] + ), + struct( + "MyHttpBindingStructureResponse", + {}, + ["header", "code", "headerMap", "payload"], + [ + [SCHEMA.STRING, { httpHeader: "header" }], + [SCHEMA.NUMERIC, { httpResponseCode: 1 }], + [ + SCHEMA.MAP_MODIFIER | SCHEMA.NUMERIC, + { + httpPrefixHeaders: "x-", + }, + ], + [ + struct( + "PayloadStruct", + { httpPayload: 1 }, + ["a", "b"], + [ + [SCHEMA.STRING, 0], + [SCHEMA.STRING, { jsonName: "JSON_NAME" }], + ] + ), + { httpPayload: 1 }, + ], + ] + ) + ); + + it("obeys jsonName and HTTP bindings during serialization", async () => { + const request = await protocol.serializeRequest( + operationSchema, + { + header: "hello", + query: "world", + headerMap: { + a: 1, + b: 2, + c: 3, + }, + payload: { + a: "a", + b: "b", + }, + }, + { + endpointV2: { + url: new URL("https://amazonaws.com/"), + }, + } + ); + + expect(request.headers).toEqual({ + "content-type": "application/json", + header: "hello", + a: "1", + b: "2", + c: "3", + }); + expect(request.query).toEqual({ + query: "world", + }); + expect(request.body).toEqual(`{"a":"a","JSON_NAME":"b"}`); + }); + + it("obeys jsonName and HTTP bindings and deserialization", async () => { + const output = await protocol.deserializeResponse( + operationSchema, + {}, + new HttpResponse({ + statusCode: 200, + headers: { header: "hello", "x-a": "1", "x-b": "2", "x-c": "3" }, + body: Buffer.from( + JSON.stringify({ + a: "a", + JSON_NAME: "b", + }) + ), + }) + ); + + expect(output).toEqual({ + $metadata: { + cfId: undefined, + extendedRequestId: undefined, + httpStatusCode: 200, + requestId: undefined, + }, + header: "hello", + code: 200, + headerMap: { + a: 1, + b: 2, + c: 3, + }, + payload: { + a: "a", + b: "b", + }, + }); + }); + + it("selects the correct timestamp format based on http binding location", async () => { + const request = await protocol.serializeRequest( + op( + "", + 0, + struct( + "", + 0, + [ + "headerDefaultDate", + "headerMemberTraitDate", + "headerHttpDate", + "headerEpochSeconds", + "headerTargetTraitDate", + "queryDefaultDate", + "payloadDefaultDate", + ], + [ + [SCHEMA.TIMESTAMP_DEFAULT, { httpHeader: "header-default-date" }], + [SCHEMA.TIMESTAMP_DATE_TIME, { httpHeader: "header-member-trait-date" }], + [SCHEMA.TIMESTAMP_HTTP_DATE, { httpHeader: "header-http-date" }], + [SCHEMA.TIMESTAMP_EPOCH_SECONDS, { httpHeader: "header-epoch-seconds" }], + [sim("", SCHEMA.TIMESTAMP_EPOCH_SECONDS, 0), 0], + [SCHEMA.TIMESTAMP_DEFAULT, { httpQuery: "query-default-date" }], + [SCHEMA.TIMESTAMP_DEFAULT, { httpPayload: 1 }], + ] + ), + "unit" + ), + { + headerDefaultDate: new Date(0), + headerMemberTraitDate: new Date(0), + headerHttpDate: new Date(0), + headerEpochSeconds: new Date(0), + headerTargetTraitDate: new Date(0), + queryDefaultDate: new Date(0), + payloadDefaultDate: new Date(0), + }, + { + endpointV2: { + url: new URL("https://amazonaws.com/"), + }, + } + ); + + expect(request.headers).toEqual({ + "content-type": "application/json", + "header-default-date": "Thu, 01 Jan 1970 00:00:00 GMT", + "header-member-trait-date": "1970-01-01T00:00:00Z", + "header-epoch-seconds": "0", + "header-http-date": "Thu, 01 Jan 1970 00:00:00 GMT", + }); + expect(request.query).toEqual({ + "query-default-date": "1970-01-01T00:00:00Z", + }); + }); + }); +}); diff --git a/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.ts b/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.ts new file mode 100644 index 0000000000000..38708caa7d4ab --- /dev/null +++ b/packages/core/src/submodules/protocols/json/AwsRestJsonProtocol.ts @@ -0,0 +1,167 @@ +import { + HttpBindingProtocol, + HttpInterceptingShapeDeserializer, + HttpInterceptingShapeSerializer, +} from "@smithy/core/protocols"; +import { ErrorSchema, NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema"; +import { + EndpointBearer, + HandlerExecutionContext, + HttpRequest, + HttpResponse, + OperationSchema, + ResponseMetadata, + SerdeFunctions, + ShapeDeserializer, + ShapeSerializer, +} from "@smithy/types"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; + +import { JsonCodec, JsonSettings } from "./JsonCodec"; +import { loadRestJsonErrorCode } from "./parseJsonBody"; + +/** + * @public + */ +export class AwsRestJsonProtocol extends HttpBindingProtocol { + protected serializer: ShapeSerializer; + protected deserializer: ShapeDeserializer; + private readonly codec: JsonCodec; + + public constructor({ defaultNamespace }: { defaultNamespace: string }) { + super({ + defaultNamespace, + }); + const settings: JsonSettings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_EPOCH_SECONDS, + }, + httpBindings: true, + jsonName: true, + }; + this.codec = new JsonCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + + public getShapeId(): string { + return "aws.protocols#restJson1"; + } + + public getPayloadCodec() { + return this.codec; + } + + public setSerdeContext(serdeContext: SerdeFunctions) { + this.codec.setSerdeContext(serdeContext); + super.setSerdeContext(serdeContext); + } + + public async serializeRequest( + operationSchema: OperationSchema, + input: Input, + context: HandlerExecutionContext & SerdeFunctions & EndpointBearer + ): Promise { + const request = await super.serializeRequest(operationSchema, input, context); + const inputSchema = NormalizedSchema.of(operationSchema.input); + const members = inputSchema.getMemberSchemas(); + + if (!request.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m) => { + return !!m.getMergedTraits().httpPayload; + }); + + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType as string; + if (mediaType) { + request.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request.headers["content-type"] = "application/octet-stream"; + } else { + request.headers["content-type"] = "application/json"; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request.headers["content-type"] = "application/json"; + } + } + } + + if (request.headers["content-type"] && !request.body) { + request.body = "{}"; + } + + if (request.body) { + try { + // todo(schema): use config.bodyLengthChecker or move that into serdeContext. + request.headers["content-length"] = String(calculateBodyLength(request.body)); + } catch (e) {} + } + + return request; + } + + protected async handleError( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: HttpResponse, + dataObject: any, + metadata: ResponseMetadata + ): Promise { + const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; + + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + + const registry = TypeRegistry.for(namespace); + let errorSchema: ErrorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier) as ErrorSchema; + } catch (e) { + const baseExceptionSchema = TypeRegistry.for("awssdkjs.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + + const ns = NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + + const headerBindings = new Set( + Object.values(NormalizedSchema.of(errorSchema).getMemberSchemas()) + .map((schema) => { + return schema.getMergedTraits().httpHeader; + }) + .filter(Boolean) as string[] + ); + await this.deserializeHttpMessage(errorSchema, context, response, headerBindings, dataObject); + const output = {} as any; + for (const [name, member] of Object.entries(ns.getMemberSchemas())) { + const target = member.getMergedTraits().jsonName ?? name; + output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + } + + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output, + }); + + throw exception; + } +} diff --git a/packages/core/src/submodules/protocols/json/JsonCodec.ts b/packages/core/src/submodules/protocols/json/JsonCodec.ts new file mode 100644 index 0000000000000..76157c0b678ab --- /dev/null +++ b/packages/core/src/submodules/protocols/json/JsonCodec.ts @@ -0,0 +1,33 @@ +import { Codec, CodecSettings, ShapeDeserializer, ShapeSerializer } from "@smithy/types"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { JsonShapeDeserializer } from "./JsonShapeDeserializer"; +import { JsonShapeSerializer } from "./JsonShapeSerializer"; + +/** + * @public + */ +export type JsonSettings = CodecSettings & { + jsonName: boolean; +}; + +/** + * @public + */ +export class JsonCodec extends SerdeContextConfig implements Codec { + public constructor(public settings: JsonSettings) { + super(); + } + + public createSerializer(): JsonShapeSerializer { + const serializer = new JsonShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext!); + return serializer; + } + + public createDeserializer(): JsonShapeDeserializer { + const deserializer = new JsonShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext!); + return deserializer; + } +} diff --git a/packages/core/src/submodules/protocols/json/JsonShapeDeserializer.ts b/packages/core/src/submodules/protocols/json/JsonShapeDeserializer.ts new file mode 100644 index 0000000000000..1667267417408 --- /dev/null +++ b/packages/core/src/submodules/protocols/json/JsonShapeDeserializer.ts @@ -0,0 +1,124 @@ +import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import { + LazyJsonString, + parseEpochTimestamp, + parseRfc3339DateTimeWithOffset, + parseRfc7231DateTime, +} from "@smithy/core/serde"; +import { DocumentType, Schema, ShapeDeserializer } from "@smithy/types"; +import { fromBase64 } from "@smithy/util-base64"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { JsonSettings } from "./JsonCodec"; +import { jsonReviver } from "./jsonReviver"; +import { parseJsonBody } from "./parseJsonBody"; + +/** + * @public + */ +export class JsonShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer { + public constructor(public settings: JsonSettings) { + super(); + } + + public async read(schema: Schema, data: string | Uint8Array | unknown): Promise { + return this._read( + schema, + typeof data === "string" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext!) + ); + } + + public readObject(schema: Schema, data: DocumentType): any { + return this._read(schema, data); + } + + private _read(schema: Schema, value: unknown): any { + const isObject = value !== null && typeof value === "object"; + + const ns = NormalizedSchema.of(schema); + + // === aggregate types === + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = [] as any[]; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject) { + const mapMember = ns.getValueSchema(); + const out = {} as any; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject) { + const out = {} as any; + for (const [memberName, memberSchema] of Object.entries(ns.getMemberSchemas())) { + const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const deserializedValue = this._read(memberSchema, (value as any)[fromKey]); + if (deserializedValue != null) { + out[memberName] = deserializedValue; + } + } + return out; + } + + // === simple types === + if (ns.isBlobSchema() && typeof value === "string") { + return fromBase64(value); + } + + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString.from(value); + } + } + + if (ns.isTimestampSchema()) { + const options = this.settings.timestampFormat; + const format = options.useTrait + ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT + ? options.default + : ns.getSchema() ?? options.default + : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return parseRfc3339DateTimeWithOffset(value); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return parseRfc7231DateTime(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return parseEpochTimestamp(value); + default: + console.warn("Missing timestamp format, parsing value with Date constructor:", value); + return new Date(value as string | number); + } + } + + if (ns.isBigIntegerSchema()) { + return BigInt(value as number | string); + } + + if (ns.isNumericSchema() && typeof value === "string") { + switch (value) { + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + case "NaN": + return NaN; + } + } + + // covers string, numeric, boolean, document, bigDecimal + return value; + } +} diff --git a/packages/core/src/submodules/protocols/json/JsonShapeSerializer.ts b/packages/core/src/submodules/protocols/json/JsonShapeSerializer.ts new file mode 100644 index 0000000000000..b7efb2f624053 --- /dev/null +++ b/packages/core/src/submodules/protocols/json/JsonShapeSerializer.ts @@ -0,0 +1,128 @@ +import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import { dateToUtcString } from "@smithy/core/serde"; +import { LazyJsonString } from "@smithy/core/serde"; +import { Schema, ShapeSerializer } from "@smithy/types"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { JsonSettings } from "./JsonCodec"; + +/** + * @public + */ +export class JsonShapeSerializer extends SerdeContextConfig implements ShapeSerializer { + private buffer: any; + private rootSchema: NormalizedSchema | undefined; + + public constructor(public settings: JsonSettings) { + super(); + } + + public write(schema: Schema, value: unknown): void { + this.rootSchema = NormalizedSchema.of(schema); + this.buffer = this._write(this.rootSchema, value); + } + + public flush(): string { + if (this.rootSchema?.isStructSchema() || this.rootSchema?.isDocumentSchema()) { + return JSON.stringify( + this.buffer, + // todo(schema) use replacer. + function replacer(key: string, value: any) { + return value; + }, + 0 + ); + } + return this.buffer; + } + + private _write(schema: Schema, value: unknown, container?: NormalizedSchema): any { + const isObject = value !== null && typeof value === "object"; + + const ns = NormalizedSchema.of(schema); + + // === aggregate types === + if (ns.isListSchema() && Array.isArray(value)) { + const listMember = ns.getValueSchema(); + const out = [] as any[]; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } + } + return out; + } else if (ns.isMapSchema() && isObject) { + const mapMember = ns.getValueSchema(); + const out = {} as any; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); + } + } + return out; + } else if (ns.isStructSchema() && isObject) { + const out = {} as any; + for (const [memberName, memberSchema] of Object.entries(ns.getMemberSchemas())) { + const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; + const serializableValue = this._write(memberSchema, (value as any)[memberName], ns); + if (serializableValue !== undefined) { + out[targetKey] = serializableValue; + } + } + return out; + } + + // === simple types === + if (value === null && container?.isStructSchema()) { + return void 0; + } + + if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) { + if (ns === this.rootSchema) { + return value; + } + if (!this.serdeContext?.base64Encoder) { + throw new Error("Missing base64Encoder in serdeContext"); + } + return this.serdeContext?.base64Encoder(value); + } + + if (ns.isTimestampSchema() && value instanceof Date) { + const options = this.settings.timestampFormat; + const format = options.useTrait + ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT + ? options.default + : ns.getSchema() ?? options.default + : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + return value.toISOString().replace(".000Z", "Z"); + case SCHEMA.TIMESTAMP_HTTP_DATE: + return dateToUtcString(value); + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + return value.getTime() / 1000; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1000; + } + } + + if (ns.isNumericSchema() && typeof value === "number") { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + } + + const mediaType = ns.getMergedTraits().mediaType; + if (ns.isStringSchema() && typeof value === "string" && mediaType) { + const isJson = mediaType === "application/json" || mediaType.endsWith("+json"); + if (isJson) { + return LazyJsonString.from(value); + } + } + + return value; + } +} diff --git a/packages/core/src/submodules/protocols/json/jsonReviver.ts b/packages/core/src/submodules/protocols/json/jsonReviver.ts new file mode 100644 index 0000000000000..a30a0553d03f4 --- /dev/null +++ b/packages/core/src/submodules/protocols/json/jsonReviver.ts @@ -0,0 +1,14 @@ +/** + * @param key - JSON object key. + * @param value - parsed value. + * @param context - original JSON string for reference. Not available until Node.js 21 and unavailable in Safari as + * of April 2025. + * + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#browser_compatibility + * + * @returns transformed value. + */ +export function jsonReviver(key: string, value: any, context?: { source?: string }) { + // todo(schema): handle big numbers. + return value; +} diff --git a/packages/core/src/submodules/protocols/json/parseJsonBody.ts b/packages/core/src/submodules/protocols/json/parseJsonBody.ts index e2a5b7b7390a7..754a87eabc73c 100644 --- a/packages/core/src/submodules/protocols/json/parseJsonBody.ts +++ b/packages/core/src/submodules/protocols/json/parseJsonBody.ts @@ -1,11 +1,11 @@ -import type { HttpResponse, SerdeContext } from "@smithy/types"; +import type { HttpResponse, SerdeFunctions } from "@smithy/types"; import { collectBodyString } from "../common"; /** * @internal */ -export const parseJsonBody = (streamBody: any, context: SerdeContext): any => +export const parseJsonBody = (streamBody: any, context: SerdeFunctions): any => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { try { @@ -25,7 +25,7 @@ export const parseJsonBody = (streamBody: any, context: SerdeContext): any => /** * @internal */ -export const parseJsonErrorBody = async (errorBody: any, context: SerdeContext) => { +export const parseJsonErrorBody = async (errorBody: any, context: SerdeFunctions) => { const value = await parseJsonBody(errorBody, context); value.message = value.message ?? value.Message; return value; diff --git a/packages/core/src/submodules/protocols/query/AwsEc2QueryProtocol.ts b/packages/core/src/submodules/protocols/query/AwsEc2QueryProtocol.ts new file mode 100644 index 0000000000000..3ad7459c43136 --- /dev/null +++ b/packages/core/src/submodules/protocols/query/AwsEc2QueryProtocol.ts @@ -0,0 +1,6 @@ +import { AwsQueryProtocol } from "./AwsQueryProtocol"; + +/** + * @public + */ +export class AwsEc2QueryProtocol extends AwsQueryProtocol {} diff --git a/packages/core/src/submodules/protocols/query/AwsQueryProtocol.ts b/packages/core/src/submodules/protocols/query/AwsQueryProtocol.ts new file mode 100644 index 0000000000000..b36ad6b0a1476 --- /dev/null +++ b/packages/core/src/submodules/protocols/query/AwsQueryProtocol.ts @@ -0,0 +1,190 @@ +import { collectBody, RpcProtocol } from "@smithy/core/protocols"; +import { deref, ErrorSchema, NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema"; +import { + Codec, + EndpointBearer, + HandlerExecutionContext, + HttpRequest, + MetadataBearer, + OperationSchema, + ResponseMetadata, + SerdeFunctions, +} from "@smithy/types"; +import type { HttpResponse as IHttpResponse } from "@smithy/types/dist-types/http"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; + +import { XmlShapeDeserializer } from "../xml/XmlShapeDeserializer"; +import { QueryShapeSerializer } from "./QueryShapeSerializer"; + +/** + * @public + */ +export class AwsQueryProtocol extends RpcProtocol { + protected serializer: QueryShapeSerializer; + protected deserializer: XmlShapeDeserializer; + + public constructor( + public options: { + defaultNamespace: string; + xmlNamespace: string; + version: string; + } + ) { + super({ + defaultNamespace: options.defaultNamespace, + }); + const settings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME, + }, + httpBindings: false, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace, + }; + this.serializer = new QueryShapeSerializer(settings); + this.deserializer = new XmlShapeDeserializer(settings); + } + + public getShapeId(): string { + return "aws.protocols#awsQuery"; + } + + public setSerdeContext(serdeContext: SerdeFunctions) { + this.serializer.setSerdeContext(serdeContext); + this.deserializer.setSerdeContext(serdeContext); + } + + public getPayloadCodec(): Codec { + throw new Error("AWSQuery protocol has no payload codec."); + } + + public async serializeRequest( + operationSchema: OperationSchema, + input: Input, + context: HandlerExecutionContext & SerdeFunctions & EndpointBearer + ): Promise { + const request = await super.serializeRequest(operationSchema, input, context); + if (!request.path.endsWith("/")) { + request.path += "/"; + } + Object.assign(request.headers, { + "content-type": `application/x-www-form-urlencoded`, + }); + if (deref(operationSchema.input) === "unit" || !request.body) { + request.body = ""; + } + request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body; + if (request.body.endsWith("&")) { + request.body = request.body.slice(-1); + } + + try { + request.headers["content-length"] = String(calculateBodyLength(request.body)); + } catch (e) {} + return request; + } + + public async deserializeResponse( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: IHttpResponse + ): Promise { + const deserializer = this.deserializer; + const ns = NormalizedSchema.of(operationSchema.output); + + const dataObject: any = {}; + + if (response.statusCode >= 300) { + const bytes: Uint8Array = await collectBody(response.body, context as SerdeFunctions); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(SCHEMA.DOCUMENT, bytes)); + } + await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); + } + + for (const header in response.headers) { + const value = response.headers[header]; + delete response.headers[header]; + response.headers[header.toLowerCase()] = value; + } + + const awsQueryResultKey = ns.isStructSchema() ? operationSchema.name.split("#")[1] + "Result" : undefined; + const bytes: Uint8Array = await collectBody(response.body, context as SerdeFunctions); + if (bytes.byteLength > 0) { + Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); + } + + const output: Output = { + $metadata: this.deserializeMetadata(response), + ...dataObject, + }; + + return output; + } + + protected async handleError( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: IHttpResponse, + dataObject: any, + metadata: ResponseMetadata + ): Promise { + const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + + const registry = TypeRegistry.for(namespace); + let errorSchema: ErrorSchema; + + try { + errorSchema = registry.find( + (schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName + ) as ErrorSchema; + if (!errorSchema) { + errorSchema = registry.getSchema(errorIdentifier) as ErrorSchema; + } + } catch (e) { + const baseExceptionSchema = TypeRegistry.for("awssdkjs.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + + const ns = NormalizedSchema.of(errorSchema); + const message = + dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + + const output = {} as any; + for (const [name, member] of Object.entries(ns.getMemberSchemas())) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.deserializer.readSchema(member, value); + } + + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output, + }); + + throw exception; + } + + protected loadQueryErrorCode(output: IHttpResponse, data: any): string | undefined { + if (data.Error?.Code !== undefined) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } + } +} diff --git a/packages/core/src/submodules/protocols/query/QueryShapeSerializer.ts b/packages/core/src/submodules/protocols/query/QueryShapeSerializer.ts new file mode 100644 index 0000000000000..e2b40f7e4734c --- /dev/null +++ b/packages/core/src/submodules/protocols/query/QueryShapeSerializer.ts @@ -0,0 +1,135 @@ +import { determineTimestampFormat, extendedEncodeURIComponent } from "@smithy/core/protocols"; +import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import { dateToUtcString } from "@smithy/smithy-client"; +import type { CodecSettings, Schema, ShapeSerializer } from "@smithy/types"; +import { toBase64 } from "@smithy/util-base64"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; + +export class QueryShapeSerializer extends SerdeContextConfig implements ShapeSerializer { + private buffer: string | undefined; + + public constructor(private settings: CodecSettings) { + super(); + } + + public write(schema: Schema, value: unknown, prefix = ""): void { + if (this.buffer === undefined) { + this.buffer = ""; + } + const ns = NormalizedSchema.of(schema); + if (prefix && !prefix.endsWith(".")) { + prefix += "."; + } + + if (ns.isBlobSchema()) { + if (typeof value === "string" || value instanceof Uint8Array) { + this.writeKey(prefix); + this.writeValue((this.serdeContext?.base64Encoder ?? toBase64)(value as Uint8Array)); + } + } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isBigDecimalSchema() || ns.isBigIntegerSchema()) { + if (value != null) { + this.writeKey(prefix); + this.writeValue(String(value)); + } + } else if (ns.isTimestampSchema()) { + if (value instanceof Date) { + this.writeKey(prefix); + const format = determineTimestampFormat(ns, this.settings); + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + this.writeValue(value.toISOString().replace(".000Z", "Z")); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + this.writeValue(dateToUtcString(value)); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + this.writeValue(String(value.getTime() / 1000)); + break; + } + } + } else if (ns.isDocumentSchema()) { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + } else if (ns.isListSchema()) { + if (Array.isArray(value)) { + if (value.length === 0) { + this.writeKey(prefix); + this.writeValue(""); + } else { + const member = ns.getValueSchema(); + const flat = ns.getMergedTraits().xmlFlattened; + let i = 1; + for (const item of value) { + if (item == null) { + continue; + } + const suffix = member.getMergedTraits().xmlName ?? "member"; + const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`; + this.write(member, item, key); + ++i; + } + } + } + } else if (ns.isMapSchema()) { + if (value && typeof value === "object") { + const keySchema = ns.getKeySchema(); + const memberSchema = ns.getValueSchema(); + const flat = ns.getMergedTraits().xmlFlattened; + let i = 1; + for (const [k, v] of Object.entries(value)) { + if (v == null) { + continue; + } + const keySuffix = keySchema.getMergedTraits().xmlName ?? "key"; + const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; + + const valueSuffix = memberSchema.getMergedTraits().xmlName ?? "value"; + const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`; + + this.write(keySchema, k, key); + this.write(memberSchema, v, valueKey); + ++i; + } + } + } else if (ns.isStructSchema()) { + if (value && typeof value === "object") { + for (const [memberName, member] of Object.entries(ns.getMemberSchemas())) { + if ((value as any)[memberName] == null) { + continue; + } + const suffix = member.getMergedTraits().xmlName ?? memberName; + const key = `${prefix}${suffix}`; + this.write(member, (value as any)[memberName], key); + } + } + } else if (ns.isUnitSchema()) { + } else { + throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`); + } + } + + public flush(): string | Uint8Array { + if (this.buffer === undefined) { + throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer."); + } + const str = this.buffer; + delete this.buffer; + return str; + } + + public writeKey(key: string) { + if (key.endsWith(".")) { + key = key.slice(0, key.length - 1); + } + this.buffer += `&${extendedEncodeURIComponent(key)}=`; + } + + public writeValue(value: string) { + this.buffer += extendedEncodeURIComponent(value); + } +} diff --git a/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.integ.spec.ts b/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.integ.spec.ts new file mode 100644 index 0000000000000..5f3e010a4e6a3 --- /dev/null +++ b/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.integ.spec.ts @@ -0,0 +1,98 @@ +import { DeleteObjectsCommand } from "@aws-sdk/client-s3"; +import { HttpRequest } from "@smithy/protocol-http"; +import { toUtf8 } from "@smithy/util-utf8"; +import { describe, expect, test as it } from "vitest"; + +import { AwsRestXmlProtocol } from "./AwsRestXmlProtocol"; +import { parseXmlBody } from "./parseXmlBody"; + +describe(AwsRestXmlProtocol.name, () => { + const command = new DeleteObjectsCommand({} as any); + + describe("serialization", () => { + const testCases = [ + { + name: "DeleteObjects", + schema: command.schema?.input, + input: { + Delete: { + Objects: [ + { + Key: "key1", + }, + { + Key: "key2", + }, + ], + }, + }, + expected: { + request: { + path: "/", + method: "POST", + headers: { + "content-type": "application/xml", + }, + query: { + delete: "", + }, + }, + body: ` + + + + + key1 + + + key2 + + + +`, + }, + }, + ]; + + for (const testCase of testCases) { + it(`should serialize HTTP Requests: ${testCase.name}`, async () => { + const protocol = new AwsRestXmlProtocol("http://s3.amazonaws.com/doc/2006-03-01/", "com.amazonaws.s3"); + const httpRequest = await protocol.serializeRequest(command.schema!, testCase.input, { + endpointV2: { + url: new URL("https://example.com/"), + }, + }); + + const body = httpRequest.body; + httpRequest.body = void 0; + + expect(httpRequest).toEqual( + new HttpRequest({ + protocol: "https:", + hostname: "example.com", + ...testCase.expected.request, + headers: { + ...testCase.expected.request.headers, + }, + }) + ); + + const serdeContext = { + utf8Encoder: toUtf8, + } as any; + + expect(await parseXmlBody(Buffer.from(body), serdeContext)).toEqual( + await parseXmlBody(Buffer.from(testCase.expected.body), serdeContext) + ); + }); + } + }); + + describe("deserialization", () => { + const testCases = [{ name: "" }]; + + for (const testCase of testCases) { + it(`should deserialize HTTP Responses: ${testCase.name}`, async () => {}); + } + }); +}); diff --git a/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.ts b/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.ts new file mode 100644 index 0000000000000..6f9b40ce50152 --- /dev/null +++ b/packages/core/src/submodules/protocols/xml/AwsRestXmlProtocol.ts @@ -0,0 +1,180 @@ +import { + HttpBindingProtocol, + HttpInterceptingShapeDeserializer, + HttpInterceptingShapeSerializer, +} from "@smithy/core/protocols"; +import { ErrorSchema, NormalizedSchema, OperationSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema"; +import type { + EndpointBearer, + HandlerExecutionContext, + HttpRequest as IHttpRequest, + HttpResponse as IHttpResponse, + MetadataBearer, + ResponseMetadata, + SerdeContext, + SerdeFunctions, + ShapeDeserializer, + ShapeSerializer, +} from "@smithy/types"; +import { calculateBodyLength } from "@smithy/util-body-length-browser"; + +import { loadRestXmlErrorCode } from "./parseXmlBody"; +import { XmlCodec, XmlSettings } from "./XmlCodec"; + +export class AwsRestXmlProtocol extends HttpBindingProtocol { + private readonly codec: XmlCodec; + protected serializer: ShapeSerializer; + protected deserializer: ShapeDeserializer; + + public constructor(options: { defaultNamespace: string; xmlNamespace: string }) { + super(options); + const settings: XmlSettings = { + timestampFormat: { + useTrait: true, + default: SCHEMA.TIMESTAMP_DATE_TIME, + }, + httpBindings: true, + xmlNamespace: options.xmlNamespace, + serviceNamespace: options.defaultNamespace, + }; + this.codec = new XmlCodec(settings); + this.serializer = new HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings); + this.deserializer = new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings); + } + + public getPayloadCodec(): XmlCodec { + return this.codec; + } + + public getShapeId(): string { + return "aws.protocols#restXml"; + } + + public async serializeRequest( + operationSchema: OperationSchema, + input: Input, + context: HandlerExecutionContext & SerdeFunctions & EndpointBearer + ): Promise { + const request = await super.serializeRequest(operationSchema, input, context); + const ns = NormalizedSchema.of(operationSchema.input); + const members = ns.getMemberSchemas(); + + request.path = + String(request.path) + .split("/") + .filter((segment) => { + // for legacy reasons, + // Bucket is in the http trait but is handled by endpoints ruleset. + return segment !== "{Bucket}"; + }) + .join("/") || "/"; + + if (!request.headers["content-type"]) { + const httpPayloadMember = Object.values(members).find((m) => { + return !!m.getMergedTraits().httpPayload; + }); + + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType as string; + if (mediaType) { + request.headers["content-type"] = mediaType; + } else if (httpPayloadMember.isStringSchema()) { + request.headers["content-type"] = "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + request.headers["content-type"] = "application/octet-stream"; + } else { + request.headers["content-type"] = "application/xml"; + } + } else if (!ns.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; + }); + if (hasBody) { + request.headers["content-type"] = "application/xml"; + } + } + } + + if (request.headers["content-type"] === "application/xml") { + if (typeof request.body === "string") { + request.body = '' + request.body; + } + } + + if (request.body) { + try { + // todo(schema): use config.bodyLengthChecker or move that into serdeContext. + request.headers["content-length"] = String(calculateBodyLength(request.body)); + } catch (e) {} + } + + return request; + } + + public async deserializeResponse( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: IHttpResponse + ): Promise { + return super.deserializeResponse(operationSchema, context, response); + } + + protected async handleError( + operationSchema: OperationSchema, + context: HandlerExecutionContext & SerdeFunctions, + response: IHttpResponse, + dataObject: any, + metadata: ResponseMetadata + ): Promise { + const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + let namespace = this.options.defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + + const registry = TypeRegistry.for(namespace); + let errorSchema: ErrorSchema; + try { + errorSchema = registry.getSchema(errorIdentifier) as ErrorSchema; + } catch (e) { + const baseExceptionSchema = TypeRegistry.for("awssdkjs.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor(errorName), dataObject); + } + throw new Error(errorName); + } + + const ns = NormalizedSchema.of(errorSchema); + const message = + dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + + const headerBindings = new Set( + Object.values(NormalizedSchema.of(errorSchema).getMemberSchemas()) + .map((schema) => { + return schema.getMergedTraits().httpHeader; + }) + .filter(Boolean) as string[] + ); + await this.deserializeHttpMessage(errorSchema, context, response, headerBindings, dataObject); + const output = {} as any; + for (const [name, member] of Object.entries(ns.getMemberSchemas())) { + const target = member.getMergedTraits().xmlName ?? name; + const value = dataObject.Error?.[target] ?? dataObject[target]; + output[name] = this.codec.createDeserializer().readSchema(member, value); + } + + Object.assign(exception, { + $metadata: metadata, + $response: response, + $fault: ns.getMergedTraits().error, + message, + ...output, + }); + + throw exception; + } +} diff --git a/packages/core/src/submodules/protocols/xml/XmlCodec.ts b/packages/core/src/submodules/protocols/xml/XmlCodec.ts new file mode 100644 index 0000000000000..c1271b6907f20 --- /dev/null +++ b/packages/core/src/submodules/protocols/xml/XmlCodec.ts @@ -0,0 +1,27 @@ +import { Codec, CodecSettings, ShapeDeserializer, ShapeSerializer } from "@smithy/types"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { XmlShapeDeserializer } from "./XmlShapeDeserializer"; +import { XmlShapeSerializer } from "./XmlShapeSerializer"; + +export type XmlSettings = CodecSettings & { + xmlNamespace: string; + serviceNamespace: string; +}; + +export class XmlCodec extends SerdeContextConfig implements Codec { + public constructor(public readonly settings: XmlSettings) { + super(); + } + + public createSerializer(): XmlShapeSerializer { + const serializer = new XmlShapeSerializer(this.settings); + serializer.setSerdeContext(this.serdeContext!); + return serializer; + } + public createDeserializer(): XmlShapeDeserializer { + const deserializer = new XmlShapeDeserializer(this.settings); + deserializer.setSerdeContext(this.serdeContext!); + return deserializer; + } +} diff --git a/packages/core/src/submodules/protocols/xml/XmlShapeDeserializer.ts b/packages/core/src/submodules/protocols/xml/XmlShapeDeserializer.ts new file mode 100644 index 0000000000000..15c54fb7a9ab3 --- /dev/null +++ b/packages/core/src/submodules/protocols/xml/XmlShapeDeserializer.ts @@ -0,0 +1,182 @@ +import { FromStringShapeDeserializer } from "@smithy/core/protocols"; +import { NormalizedSchema, SCHEMA, TypeRegistry } from "@smithy/core/schema"; +import { getValueFromTextNode } from "@smithy/smithy-client"; +import { Schema, SerdeContext, SerdeFunctions, ShapeDeserializer } from "@smithy/types"; +import { toUtf8 } from "@smithy/util-utf8"; +import { XMLParser } from "fast-xml-parser"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { XmlSettings } from "./XmlCodec"; + +export class XmlShapeDeserializer extends SerdeContextConfig implements ShapeDeserializer { + private stringDeserializer: FromStringShapeDeserializer; + + public constructor(public readonly settings: XmlSettings) { + super(); + this.stringDeserializer = new FromStringShapeDeserializer(settings); + } + + public setSerdeContext(serdeContext: SerdeFunctions): void { + this.serdeContext = serdeContext; + this.stringDeserializer.setSerdeContext(serdeContext); + } + + /** + * @param schema + * @param bytes + * @param key - used by AwsQuery to step one additional depth into the object before reading it. + */ + public read(schema: Schema, bytes: Uint8Array | string, key?: string): any { + const ns = NormalizedSchema.of(schema); + const memberSchemas = ns.getMemberSchemas(); + const isEventPayload = + ns.isStructSchema() && + ns.isMemberSchema() && + !!Object.values(memberSchemas).find((memberNs) => { + return !!memberNs.getMemberTraits().eventPayload; + }); + + if (isEventPayload) { + const output = {} as any; + const memberName = Object.keys(memberSchemas)[0]; + const eventMemberSchema = memberSchemas[memberName]; + if (eventMemberSchema.isBlobSchema()) { + output[memberName] = bytes; + } else { + output[memberName] = this.read(memberSchemas[memberName], bytes); + } + return output; + } + + const xmlString = (this.serdeContext?.utf8Encoder ?? toUtf8)(bytes); + const parsedObject = this.parseXml(xmlString); + return this.readSchema(schema, key ? parsedObject[key] : parsedObject); + } + + public readSchema(_schema: Schema, value: any): any { + const ns = NormalizedSchema.of(_schema); + const traits = ns.getMergedTraits(); + const schema = ns.getSchema(); + + if (ns.isListSchema() && !Array.isArray(value)) { + // single item in what should have been a list. + return this.readSchema(schema, [value]); + } + + if (value == null) { + return value; + } + + if (typeof value === "object") { + const sparse = !!traits.sparse; + const flat = !!traits.xmlFlattened; + + if (ns.isListSchema()) { + const listValue = ns.getValueSchema(); + const buffer = [] as any[]; + + const sourceKey = listValue.getMergedTraits().xmlName ?? "member"; + const source = flat ? value : (value[0] ?? value)[sourceKey]; + const sourceArray = Array.isArray(source) ? source : [source]; + + for (const v of sourceArray) { + if (v != null || sparse) { + buffer.push(this.readSchema(listValue, v)); + } + } + return buffer; + } + + const buffer = {} as any; + if (ns.isMapSchema()) { + const keyNs = ns.getKeySchema(); + const memberNs = ns.getValueSchema(); + let entries: any[]; + if (flat) { + entries = Array.isArray(value) ? value : [value]; + } else { + entries = Array.isArray(value.entry) ? value.entry : [value.entry]; + } + const keyProperty = keyNs.getMergedTraits().xmlName ?? "key"; + const valueProperty = memberNs.getMergedTraits().xmlName ?? "value"; + for (const entry of entries) { + const key = entry[keyProperty]; + const value = entry[valueProperty]; + if (value != null || sparse) { + buffer[key] = this.readSchema(memberNs, value); + } + } + return buffer; + } + + if (ns.isStructSchema()) { + for (const [memberName, memberSchema] of Object.entries(ns.getMemberSchemas())) { + const memberTraits = memberSchema.getMergedTraits(); + const xmlObjectKey = !memberTraits.httpPayload + ? memberSchema.getMemberTraits().xmlName ?? memberName + : memberTraits.xmlName ?? memberSchema.getName()!; + + if (value[xmlObjectKey] != null) { + buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); + } + } + return buffer; + } + + if (ns.isDocumentSchema()) { + // this should indicate an error being deserialized with no schema. + return value; + } + + throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`); + } else { + // non-object aggregate type. + if (ns.isListSchema()) { + return []; + } else if (ns.isMapSchema() || ns.isStructSchema()) { + return {} as any; + } + + // simple + return this.stringDeserializer.read(ns, value as string); + } + } + + protected parseXml(xml: string): any { + if (xml.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_: any, val: any) => (val.trim() === "" && val.includes("\n") ? "" : undefined), + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + + let parsedObj; + try { + parsedObj = parser.parse(xml, true); + } catch (e: any) { + if (e && typeof e === "object") { + Object.defineProperty(e, "$responseBodyText", { + value: xml, + }); + } + throw e; + } + + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return getValueFromTextNode(parsedObjToReturn); + } + return {}; + } +} diff --git a/packages/core/src/submodules/protocols/xml/XmlShapeSerializer.ts b/packages/core/src/submodules/protocols/xml/XmlShapeSerializer.ts new file mode 100644 index 0000000000000..f4a816707486a --- /dev/null +++ b/packages/core/src/submodules/protocols/xml/XmlShapeSerializer.ts @@ -0,0 +1,330 @@ +import { XmlNode, XmlText } from "@aws-sdk/xml-builder"; +import { NormalizedSchema, SCHEMA } from "@smithy/core/schema"; +import { dateToUtcString } from "@smithy/smithy-client"; +import type { Schema as ISchema, ShapeSerializer } from "@smithy/types"; +import { fromBase64, toBase64 } from "@smithy/util-base64"; + +import { SerdeContextConfig } from "../ConfigurableSerdeContext"; +import { XmlSettings } from "./XmlCodec"; + +type XmlNamespaceAttributeValuePair = [string, string] | [undefined, undefined]; + +export class XmlShapeSerializer extends SerdeContextConfig implements ShapeSerializer { + private stringBuffer?: string; + private byteBuffer?: Uint8Array; + private buffer?: XmlNode; + + public constructor(public readonly settings: XmlSettings) { + super(); + } + + public write(schema: ISchema, value: unknown): void { + const ns = NormalizedSchema.of(schema); + if (ns.isStringSchema() && typeof value === "string") { + this.stringBuffer = value as string; + } else if (ns.isBlobSchema()) { + this.byteBuffer = + "byteLength" in (value as Uint8Array) + ? (value as Uint8Array) + : (this.serdeContext?.base64Decoder ?? fromBase64)(value as string); + } else { + this.buffer = this.writeStruct(ns, value, undefined) as XmlNode; + const traits = ns.getMergedTraits(); + if (traits.httpPayload && !traits.xmlName) { + this.buffer.withName(ns.getName()!); + } + } + } + + public flush(): string | Uint8Array { + if (this.byteBuffer !== undefined) { + const bytes = this.byteBuffer; + delete this.byteBuffer; + return bytes; + } + if (this.stringBuffer !== undefined) { + const str = this.stringBuffer; + delete this.stringBuffer; + return str; + } + const buffer = this.buffer!; + if (this.settings.xmlNamespace) { + if (!(buffer as any)?.attributes?.["xmlns"]) { + buffer.addAttribute("xmlns", this.settings.xmlNamespace); + } + } + delete this.buffer; + return buffer.toString(); + } + + private writeStruct(ns: NormalizedSchema, value: unknown, parentXmlns: string | undefined): XmlNode { + const traits = ns.getMergedTraits(); + const name = + ns.isMemberSchema() && !traits.httpPayload + ? ns.getMemberTraits().xmlName ?? ns.getMemberName() + : traits.xmlName ?? ns.getName(); + + if (!name || !ns.isStructSchema()) { + throw new Error( + `@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName( + true + )}.` + ); + } + const structXmlNode = XmlNode.of(name); + + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr as string, xmlns); + } + + for (const [memberName, memberSchema] of Object.entries(ns.getMemberSchemas())) { + const val = (value as any)[memberName]; + + if (val != null) { + if (memberSchema.getMergedTraits().xmlAttribute) { + structXmlNode.addAttribute( + memberSchema.getMergedTraits().xmlName ?? memberName, + this.writeSimple(memberSchema, val) + ); + continue; + } + if (memberSchema.isListSchema()) { + this.writeList(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isMapSchema()) { + this.writeMap(memberSchema, val, structXmlNode, xmlns); + } else if (memberSchema.isStructSchema()) { + structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns)); + } else { + const memberNode = XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName()); + this.writeSimpleInto(memberSchema, val, memberNode, xmlns); + structXmlNode.addChildNode(memberNode); + } + } + } + + return structXmlNode; + } + + private writeList( + listMember: NormalizedSchema, + array: unknown[], + container: XmlNode, + parentXmlns: string | undefined + ): void { + if (!listMember.isMemberSchema()) { + throw new Error( + `@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}` + ); + } + const listTraits = listMember.getMergedTraits(); + const listValueSchema = listMember.getValueSchema(); + const listValueTraits = listValueSchema.getMergedTraits(); + const sparse = !!listValueTraits.sparse; + const flat = !!listTraits.xmlFlattened; + + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns); + + const writeItem = (container: XmlNode, value: any) => { + if (listValueSchema.isListSchema()) { + this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container, xmlns); + } else if (listValueSchema.isMapSchema()) { + this.writeMap(listValueSchema, value as any, container, xmlns); + } else if (listValueSchema.isStructSchema()) { + const struct = this.writeStruct(listValueSchema, value, xmlns); + container.addChildNode( + struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member") + ); + } else { + const listItemNode = XmlNode.of( + flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? "member" + ); + this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns); + container.addChildNode(listItemNode); + } + }; + + if (flat) { + for (const value of array) { + if (sparse || value != null) { + writeItem(container, value); + } + } + } else { + const listNode = XmlNode.of(listTraits.xmlName ?? listMember.getMemberName()); + if (xmlns) { + listNode.addAttribute(xmlnsAttr as string, xmlns); + } + for (const value of array) { + if (sparse || value != null) { + writeItem(listNode, value); + } + } + container.addChildNode(listNode); + } + } + + private writeMap( + mapMember: NormalizedSchema, + map: Record, + container: XmlNode, + parentXmlns: string | undefined, + containerIsMap = false + ): void { + if (!mapMember.isMemberSchema()) { + throw new Error( + `@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}` + ); + } + + const mapTraits = mapMember.getMergedTraits(); + + const mapKeySchema = mapMember.getKeySchema(); + const mapKeyTraits = mapKeySchema.getMergedTraits(); + const keyTag = mapKeyTraits.xmlName ?? "key"; + + const mapValueSchema = mapMember.getValueSchema(); + const mapValueTraits = mapValueSchema.getMergedTraits(); + const valueTag = mapValueTraits.xmlName ?? "value"; + + const sparse = !!mapValueTraits.sparse; + const flat = !!mapTraits.xmlFlattened; + + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns); + + const addKeyValue = (entry: XmlNode, key: string, val: any) => { + const keyNode = XmlNode.of(keyTag, key); + const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns); + if (keyXmlns) { + keyNode.addAttribute(keyXmlnsAttr as string, keyXmlns); + } + + entry.addChildNode(keyNode); + let valueNode = XmlNode.of(valueTag); + + if (mapValueSchema.isListSchema()) { + this.writeList(mapValueSchema, val, valueNode, xmlns); + } else if (mapValueSchema.isMapSchema()) { + this.writeMap(mapValueSchema, val, valueNode, xmlns, true); + } else if (mapValueSchema.isStructSchema()) { + valueNode = this.writeStruct(mapValueSchema, val, xmlns); + } else { + this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns); + } + + entry.addChildNode(valueNode); + }; + + if (flat) { + for (const [key, val] of Object.entries(map as object)) { + if (sparse || val != null) { + const entry = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + addKeyValue(entry, key, val); + container.addChildNode(entry); + } + } + } else { + let mapNode: XmlNode | undefined; + if (!containerIsMap) { + mapNode = XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName()); + if (xmlns) { + mapNode.addAttribute(xmlnsAttr as string, xmlns); + } + container.addChildNode(mapNode); + } + + for (const [key, val] of Object.entries(map as object)) { + if (sparse || val != null) { + const entry = XmlNode.of("entry"); + addKeyValue(entry, key, val); + (containerIsMap ? container : mapNode!).addChildNode(entry); + } + } + } + } + + private writeSimple(_schema: ISchema, value: unknown): string { + if (null === value) { + throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); + } + const ns = NormalizedSchema.of(_schema); + let nodeContents: any = null; + + if (ns.isBlobSchema()) { + nodeContents = (this.serdeContext?.base64Encoder ?? toBase64)(value as string | Uint8Array); + } else if (typeof value === "object") { + if (value instanceof Date && ns.isTimestampSchema()) { + const options = this.settings.timestampFormat; + const format = options.useTrait + ? ns.getSchema() === SCHEMA.TIMESTAMP_DEFAULT + ? options.default + : ns.getSchema() ?? options.default + : options.default; + switch (format) { + case SCHEMA.TIMESTAMP_DATE_TIME: + nodeContents = value.toISOString().replace(".000Z", "Z"); + break; + case SCHEMA.TIMESTAMP_HTTP_DATE: + nodeContents = dateToUtcString(value); + break; + case SCHEMA.TIMESTAMP_EPOCH_SECONDS: + nodeContents = String(value.getTime() / 1000); + break; + default: + console.warn("Missing timestamp format, using http date", value); + nodeContents = dateToUtcString(value); + break; + } + } else if (ns.isMapSchema() || ns.isListSchema()) { + throw new Error( + "@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead." + ); + } else { + throw new Error( + `@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName( + true + )}` + ); + } + } + + if ( + ns.isStringSchema() || + ns.isBooleanSchema() || + ns.isNumericSchema() || + ns.isBigIntegerSchema() || + ns.isBigDecimalSchema() + ) { + nodeContents = String(value); + } + + if (nodeContents === null) { + throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`); + } + + return nodeContents; + } + + private writeSimpleInto(_schema: ISchema, value: unknown, into: XmlNode, parentXmlns: string | undefined): void { + const nodeContents = this.writeSimple(_schema, value); + const ns = NormalizedSchema.of(_schema); + + const content = new XmlText(nodeContents); + const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); + if (xmlns) { + into.addAttribute(xmlnsAttr as string, xmlns); + } + + into.addChildNode(content); + } + + private getXmlnsAttribute(ns: NormalizedSchema, parentXmlns: string | undefined): XmlNamespaceAttributeValuePair { + const traits = ns.getMergedTraits(); + const [prefix, xmlns] = traits.xmlNamespace ?? []; + if (xmlns && xmlns !== parentXmlns) { + return [prefix ? `xmlns:${prefix}` : "xmlns", xmlns]; + } + return [void 0, void 0]; + } +} diff --git a/private/aws-protocoltests-ec2/src/schemas/schemas.ts b/private/aws-protocoltests-ec2/src/schemas/schemas.ts new file mode 100644 index 0000000000000..b2b21e41ff542 --- /dev/null +++ b/private/aws-protocoltests-ec2/src/schemas/schemas.ts @@ -0,0 +1,746 @@ +const _ = ""; +const _B = "Boolean"; +const _BL = "BooleanList"; +const _Ba = "Bar"; +const _Bam = "Bam"; +const _Baz = "Baz"; +const _Bl = "Blob"; +const _Bo = "Boo"; +const _By = "Byte"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CLA = "ComplexListArg"; +const _CNED = "ComplexNestedErrorData"; +const _D = "Double"; +const _DD = "DoubleDribble"; +const _DO = "DatetimeOffsets"; +const _DOO = "DatetimeOffsetsOutput"; +const _DT = "DateTime"; +const _EIAEO = "EmptyInputAndEmptyOutput"; +const _EIAEOI = "EmptyInputAndEmptyOutputInput"; +const _EIAEOO = "EmptyInputAndEmptyOutputOutput"; +const _EO = "EndpointOperation"; +const _ES = "EpochSeconds"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FEM = "FooEnumMap"; +const _FES = "FooEnumSet"; +const _FS = "FractionalSeconds"; +const _FSO = "FractionalSecondsOutput"; +const _FV = "FloatValue"; +const _Fo = "Foo"; +const _GL = "GreetingList"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _H = "Hi"; +const _HD = "HttpDate"; +const _HLI = "HostLabelInput"; +const _HQAXN = "HasQueryAndXmlName"; +const _HQN = "HasQueryName"; +const _HWPO = "HostWithPathOperation"; +const _I = "Integer"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IEM = "IntegerEnumMap"; +const _IES = "IntegerEnumSet"; +const _IG = "InvalidGreeting"; +const _IL = "IntegerList"; +const _IM = "IgnoreMe"; +const _IWXN = "IgnoresWrappingXmlName"; +const _IWXNO = "IgnoresWrappingXmlNameOutput"; +const _L = "Long"; +const _LA = "ListArg"; +const _LAWXN = "ListArgWithXmlName"; +const _LAWXNM = "ListArgWithXmlNameMember"; +const _LWMN = "ListWithMemberNamespace"; +const _LWN = "ListWithNamespace"; +const _LWXN = "ListWithXmlName"; +const _M = "Message"; +const _N = "Nested"; +const _NIAO = "NoInputAndOutput"; +const _NIAOO = "NoInputAndOutputOutput"; +const _NS = "NestedStructures"; +const _NSI = "NestedStructuresInput"; +const _NSL = "NestedStringList"; +const _NSWL = "NestedStructWithList"; +const _NWL = "NestedWithList"; +const _OA = "OtherArg"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _Q = "Qux"; +const _QITAF = "QueryIdempotencyTokenAutoFill"; +const _QITAFI = "QueryIdempotencyTokenAutoFillInput"; +const _QL = "QueryLists"; +const _QLI = "QueryListsInput"; +const _QT = "QueryTimestamps"; +const _QTI = "QueryTimestampsInput"; +const _RA = "RecursiveArg"; +const _RLM = "RenamedListMembers"; +const _RXS = "RecursiveXmlShapes"; +const _RXSO = "RecursiveXmlShapesOutput"; +const _RXSON = "RecursiveXmlShapesOutputNested1"; +const _RXSONe = "RecursiveXmlShapesOutputNested2"; +const _S = "String"; +const _SA = "StructArg"; +const _SAt = "StringArg"; +const _SIP = "SimpleInputParams"; +const _SIPI = "SimpleInputParamsInput"; +const _SL = "StringList"; +const _SLM = "StructureListMember"; +const _SLt = "StructureList"; +const _SS = "StringSet"; +const _SSXP = "SimpleScalarXmlProperties"; +const _SSXPO = "SimpleScalarXmlPropertiesOutput"; +const _Sh = "Short"; +const _T = "Timestamp"; +const _TL = "TimestampList"; +const _TLo = "TopLevel"; +const _UXN = "UsesXmlName"; +const _XB = "XmlBlobs"; +const _XBO = "XmlBlobsOutput"; +const _XE = "XmlEnums"; +const _XEB = "XmlEmptyBlobs"; +const _XEL = "XmlEmptyLists"; +const _XEO = "XmlEnumsOutput"; +const _XIE = "XmlIntEnums"; +const _XIEO = "XmlIntEnumsOutput"; +const _XL = "XmlLists"; +const _XLO = "XmlListsOutput"; +const _XN = "XmlNamespaces"; +const _XNL = "XmlNamespacedList"; +const _XNN = "XmlNamespaceNested"; +const _XNO = "XmlNamespacesOutput"; +const _XT = "XmlTimestamps"; +const _XTO = "XmlTimestampsOutput"; +const _a = "a"; +const _b = "bar"; +const _bL = "booleanList"; +const _bV = "byteValue"; +const _b_ = "b"; +const _ba = "baz"; +const _c = "client"; +const _cN = "customName"; +const _d = "datetime"; +const _dT = "dateTime"; +const _dTOT = "dateTimeOnTarget"; +const _dV = "doubleValue"; +const _da = "data"; +const _e = "error"; +const _eL = "enumList"; +const _eM = "epochMember"; +const _eS = "epochSeconds"; +const _eSOT = "epochSecondsOnTarget"; +const _eSV = "emptyStringValue"; +const _eT = "epochTarget"; +const _en = "encoding"; +const _end = "endpoint"; +const _f = "foo"; +const _fBV = "falseBooleanValue"; +const _fE = "fooEnum1"; +const _fEL = "fooEnumList"; +const _fEM = "fooEnumMap"; +const _fES = "fooEnumSet"; +const _fEo = "fooEnum2"; +const _fEoo = "fooEnum3"; +const _fL = "flattenedList"; +const _fLWMN = "flattenedListWithMemberNamespace"; +const _fLWN = "flattenedListWithNamespace"; +const _fLl = "flattenedList2"; +const _fV = "floatValue"; +const _g = "greeting"; +const _h = "http://foo.com"; +const _hD = "httpDate"; +const _hDOT = "httpDateOnTarget"; +const _hH = "httpHeader"; +const _hL = "hostLabel"; +const _hQAXN = "hasQueryAndXmlName"; +const _hi = "hi"; +const _hl = "https://xml-list.example.com"; +const _hm = "https://xml-member.example.com"; +const _ht = "http://baz.com"; +const _htt = "http://qux.com"; +const _http = "http://bux.com"; +const _i = "item"; +const _iE = "intEnum1"; +const _iEL = "intEnumList"; +const _iEM = "intEnumMap"; +const _iES = "intEnumSet"; +const _iEn = "intEnum2"; +const _iEnt = "intEnum3"; +const _iL = "integerList"; +const _iV = "integerValue"; +const _l = "label"; +const _lV = "longValue"; +const _mSL = "myStructureList"; +const _n = "nested"; +const _nF = "normalFormat"; +const _nSL = "nestedStringList"; +const _no = "normal"; +const _o = "other"; +const _r = "renamed"; +const _rLM = "renamedListMembers"; +const _rM = "recursiveMember"; +const _sL = "stringList"; +const _sLt = "structureList"; +const _sS = "stringSet"; +const _sV = "stringValue"; +const _sVh = "shortValue"; +const _t = "token"; +const _tBV = "trueBooleanValue"; +const _tL = "timestampList"; +const _uXN = "usesXmlName"; +const _v = "value"; +const _va = "values"; +const _xF = "xmlFlattened"; +const _xN = "xmlName"; +const _xNm = "xmlNamespace"; +const n0 = "aws.protocoltests.ec2"; +const n1 = "aws.protocoltests.shared"; + +// smithy-typescript generated code +import { error, list, op, struct } from "@smithy/core/schema"; + +import { EC2ProtocolServiceException as __EC2ProtocolServiceException } from "../models/EC2ProtocolServiceException"; +import { ComplexError as __ComplexError, InvalidGreeting as __InvalidGreeting } from "../models/index"; + +/* eslint no-var: 0 */ + +export var ComplexError = error( + n0, + _CE, + { + [_e]: _c, + }, + [_TLo, _N], + [0, () => ComplexNestedErrorData], + + __ComplexError +); +export var ComplexNestedErrorData = struct(n0, _CNED, 0, [_Fo], [0]); +export var DatetimeOffsetsOutput = struct(n0, _DOO, 0, [_d], [5]); +export var EmptyInputAndEmptyOutputInput = struct(n0, _EIAEOI, 0, [], []); +export var EmptyInputAndEmptyOutputOutput = struct(n0, _EIAEOO, 0, [], []); +export var FractionalSecondsOutput = struct(n0, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct(n0, _GWEO, 0, [_g], [0]); +export var HostLabelInput = struct( + n0, + _HLI, + 0, + [_l], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var IgnoresWrappingXmlNameOutput = struct( + n0, + _IWXNO, + { + [_xN]: _IM, + }, + [_f], + [0] +); +export var InvalidGreeting = error( + n0, + _IG, + { + [_e]: _c, + }, + [_M], + [0], + + __InvalidGreeting +); +export var NestedStructuresInput = struct(n0, _NSI, 0, [_N], [() => StructArg]); +export var NestedStructWithList = struct(n0, _NSWL, 0, [_LA], [64 | 0]); +export var NoInputAndOutputOutput = struct(n0, _NIAOO, 0, [], []); +export var PutWithContentEncodingInput = struct( + n0, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var QueryIdempotencyTokenAutoFillInput = struct(n0, _QITAFI, 0, [_t], [[0, 4]]); +export var QueryListsInput = struct( + n0, + _QLI, + 0, + [_LA, _CLA, _LAWXNM, _LAWXN, _NWL], + [ + 64 | 0, + () => GreetingList, + [() => ListWithXmlName, 0], + [ + () => ListWithXmlName, + { + [_xN]: _H, + }, + ], + () => NestedStructWithList, + ] +); +export var QueryTimestampsInput = struct(n0, _QTI, 0, [_nF, _eM, _eT], [4, 7, 7]); +export var RecursiveXmlShapesOutput = struct(n0, _RXSO, 0, [_n], [() => RecursiveXmlShapesOutputNested1]); +export var RecursiveXmlShapesOutputNested1 = struct( + n0, + _RXSON, + 0, + [_f, _n], + [0, () => RecursiveXmlShapesOutputNested2] +); +export var RecursiveXmlShapesOutputNested2 = struct( + n0, + _RXSONe, + 0, + [_b, _rM], + [0, () => RecursiveXmlShapesOutputNested1] +); +export var SimpleInputParamsInput = struct( + n0, + _SIPI, + 0, + [_Fo, _Ba, _Baz, _Bam, _FV, _Bo, _Q, _FE, _HQN, _HQAXN, _UXN], + [ + 0, + 0, + 2, + 1, + 1, + 1, + 21, + 0, + 0, + [ + 0, + { + [_xN]: _hQAXN, + }, + ], + [ + 0, + { + [_xN]: _uXN, + }, + ], + ] +); +export var SimpleScalarXmlPropertiesOutput = struct( + n0, + _SSXPO, + 0, + [_sV, _eSV, _tBV, _fBV, _bV, _sVh, _iV, _lV, _fV, _dV], + [ + 0, + 0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + [ + 1, + { + [_xN]: _DD, + }, + ], + ] +); +export var StructArg = struct(n0, _SA, 0, [_SAt, _OA, _RA], [0, 2, () => StructArg]); +export var StructureListMember = struct( + n0, + _SLM, + 0, + [_a, _b_], + [ + [ + 0, + { + [_xN]: _v, + }, + ], + [ + 0, + { + [_xN]: _o, + }, + ], + ] +); +export var XmlBlobsOutput = struct(n0, _XBO, 0, [_da], [21]); +export var XmlEnumsOutput = struct( + n0, + _XEO, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var XmlIntEnumsOutput = struct( + n0, + _XIEO, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var XmlListsOutput = struct( + n0, + _XLO, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n1, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + ] +); +export var XmlNamespaceNested = struct( + n0, + _XNN, + { + [_xNm]: [_, _h], + }, + [_f, _va], + [ + [ + 0, + { + [_xNm]: [_ba, _ht], + }, + ], + [ + () => XmlNamespacedList, + { + [_xNm]: [_, _htt], + }, + ], + ] +); +export var XmlNamespacesOutput = struct( + n0, + _XNO, + { + [_xNm]: [_, _h], + }, + [_n], + [[() => XmlNamespaceNested, 0]] +); +export var XmlTimestampsOutput = struct(n0, _XTO, 0, [_no, _dT, _dTOT, _eS, _eSOT, _hD, _hDOT], [4, 5, 5, 7, 7, 6, 6]); +export var GreetingStruct = struct(n1, _GS, 0, [_hi], [0]); +export var Unit = "unit" as const; + +export var EC2ProtocolServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.ec2", + "EC2ProtocolServiceException", + 0, + [], + [], + __EC2ProtocolServiceException +); +export var ListWithMemberNamespace = list( + n0, + _LWMN, + { + [_xNm]: [_, _hl], + }, + [ + 0, + { + [_xNm]: [_, _hm], + }, + ] +); +export var ListWithNamespace = list( + n0, + _LWN, + { + [_xNm]: [_, _hl], + }, + 0 +); +export var ListWithXmlName = list(n0, _LWXN, 0, [ + 0, + { + [_xN]: _i, + }, +]); +export var RenamedListMembers = list(n0, _RLM, 0, [ + 0, + { + [_xN]: _i, + }, +]); +export var StructureList = list(n0, _SLt, 0, [ + () => StructureListMember, + { + [_xN]: _i, + }, +]); +export var XmlNamespacedList = list(n0, _XNL, 0, [ + 0, + { + [_xNm]: [_, _http], + }, +]); +export var BooleanList = 64 | 2; + +export var FooEnumList = 64 | 0; + +export var FooEnumSet = 64 | 0; + +export var GreetingList = list(n1, _GL, 0, () => GreetingStruct); +export var IntegerEnumList = 64 | 1; + +export var IntegerEnumSet = 64 | 1; + +export var IntegerList = 64 | 1; + +export var NestedStringList = list(n1, _NSL, 0, 64 | 0); +export var StringList = 64 | 0; + +export var StringSet = 64 | 0; + +export var TimestampList = 64 | 4; + +export var FooEnumMap = 128 | 0; + +export var IntegerEnumMap = 128 | 1; + +export var DatetimeOffsets = op( + n0, + _DO, + 0, + () => Unit, + () => DatetimeOffsetsOutput +); +export var EmptyInputAndEmptyOutput = op( + n0, + _EIAEO, + 0, + () => EmptyInputAndEmptyOutputInput, + () => EmptyInputAndEmptyOutputOutput +); +export var EndpointOperation = op( + n0, + _EO, + { + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n0, + _EWHLO, + { + [_end]: ["foo.{label}."], + }, + () => HostLabelInput, + () => Unit +); +export var FractionalSeconds = op( + n0, + _FS, + 0, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n0, + _GWE, + 0, + () => Unit, + () => GreetingWithErrorsOutput +); +export var HostWithPathOperation = op( + n0, + _HWPO, + 0, + () => Unit, + () => Unit +); +export var IgnoresWrappingXmlName = op( + n0, + _IWXN, + 0, + () => Unit, + () => IgnoresWrappingXmlNameOutput +); +export var NestedStructures = op( + n0, + _NS, + 0, + () => NestedStructuresInput, + () => Unit +); +export var NoInputAndOutput = op( + n0, + _NIAO, + 0, + () => Unit, + () => NoInputAndOutputOutput +); +export var PutWithContentEncoding = op( + n0, + _PWCE, + 0, + () => PutWithContentEncodingInput, + () => Unit +); +export var QueryIdempotencyTokenAutoFill = op( + n0, + _QITAF, + 0, + () => QueryIdempotencyTokenAutoFillInput, + () => Unit +); +export var QueryLists = op( + n0, + _QL, + 0, + () => QueryListsInput, + () => Unit +); +export var QueryTimestamps = op( + n0, + _QT, + 0, + () => QueryTimestampsInput, + () => Unit +); +export var RecursiveXmlShapes = op( + n0, + _RXS, + 0, + () => Unit, + () => RecursiveXmlShapesOutput +); +export var SimpleInputParams = op( + n0, + _SIP, + 0, + () => SimpleInputParamsInput, + () => Unit +); +export var SimpleScalarXmlProperties = op( + n0, + _SSXP, + 0, + () => Unit, + () => SimpleScalarXmlPropertiesOutput +); +export var XmlBlobs = op( + n0, + _XB, + 0, + () => Unit, + () => XmlBlobsOutput +); +export var XmlEmptyBlobs = op( + n0, + _XEB, + 0, + () => Unit, + () => XmlBlobsOutput +); +export var XmlEmptyLists = op( + n0, + _XEL, + 0, + () => Unit, + () => XmlListsOutput +); +export var XmlEnums = op( + n0, + _XE, + 0, + () => Unit, + () => XmlEnumsOutput +); +export var XmlIntEnums = op( + n0, + _XIE, + 0, + () => Unit, + () => XmlIntEnumsOutput +); +export var XmlLists = op( + n0, + _XL, + 0, + () => Unit, + () => XmlListsOutput +); +export var XmlNamespaces = op( + n0, + _XN, + 0, + () => Unit, + () => XmlNamespacesOutput +); +export var XmlTimestamps = op( + n0, + _XT, + 0, + () => Unit, + () => XmlTimestampsOutput +); diff --git a/private/aws-protocoltests-json-10/src/schemas/schemas.ts b/private/aws-protocoltests-json-10/src/schemas/schemas.ts new file mode 100644 index 0000000000000..973504d70bf84 --- /dev/null +++ b/private/aws-protocoltests-json-10/src/schemas/schemas.ts @@ -0,0 +1,502 @@ +const _B = "Boolean"; +const _Bl = "Blob"; +const _By = "Byte"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CNED = "ComplexNestedErrorData"; +const _COD = "ClientOptionalDefaults"; +const _CTP = "ContentTypeParameters"; +const _CTPI = "ContentTypeParametersInput"; +const _CTPO = "ContentTypeParametersOutput"; +const _D = "Double"; +const _DL = "DialogList"; +const _DM = "DialogMap"; +const _De = "Defaults"; +const _Di = "Dialog"; +const _EIAEO = "EmptyInputAndEmptyOutput"; +const _EIAEOI = "EmptyInputAndEmptyOutputInput"; +const _EIAEOO = "EmptyInputAndEmptyOutputOutput"; +const _EO = "EndpointOperation"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _EWHLOI = "EndpointWithHostLabelOperationInput"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEo = "FooError"; +const _Fa = "Farewell"; +const _Fo = "Foo"; +const _Foo = "Fooooo"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEI = "GreetingWithErrorsInput"; +const _GWEO = "GreetingWithErrorsOutput"; +const _HWPO = "HostWithPathOperation"; +const _I = "Integer"; +const _IE = "IntegerEnum"; +const _IG = "InvalidGreeting"; +const _JU = "JsonUnions"; +const _JUI = "JsonUnionsInput"; +const _JUO = "JsonUnionsOutput"; +const _L = "Long"; +const _M = "Message"; +const _MU = "MyUnion"; +const _N = "Nested"; +const _NIANO = "NoInputAndNoOutput"; +const _NIAO = "NoInputAndOutput"; +const _NIAOO = "NoInputAndOutputOutput"; +const _OWD = "OperationWithDefaults"; +const _OWDI = "OperationWithDefaultsInput"; +const _OWDO = "OperationWithDefaultsOutput"; +const _OWNS = "OperationWithNestedStructure"; +const _OWNSI = "OperationWithNestedStructureInput"; +const _OWNSO = "OperationWithNestedStructureOutput"; +const _OWRM = "OperationWithRequiredMembers"; +const _OWRMO = "OperationWithRequiredMembersOutput"; +const _OWRMWD = "OperationWithRequiredMembersWithDefaults"; +const _OWRMWDO = "OperationWithRequiredMembersWithDefaultsOutput"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _RE = "RequiredEnum"; +const _RIE = "RequiredIntEnum"; +const _RSL = "RequiredStringList"; +const _RSM = "RequiredStringMap"; +const _S = "String"; +const _SL = "StringList"; +const _SM = "StringMap"; +const _SSP = "SimpleScalarProperties"; +const _SSPI = "SimpleScalarPropertiesInput"; +const _SSPO = "SimpleScalarPropertiesOutput"; +const _Sh = "Short"; +const _T = "Timestamp"; +const _TE = "TestEnum"; +const _TIE = "TestIntEnum"; +const _TL = "TopLevel"; +const _TSL = "TestStringList"; +const _TSM = "TestStringMap"; +const _bV = "booleanValue"; +const _bVl = "blobValue"; +const _c = "client"; +const _cOD = "clientOptionalDefaults"; +const _co = "contents"; +const _d = "defaults"; +const _dB = "defaultBoolean"; +const _dBe = "defaultBlob"; +const _dBef = "defaultByte"; +const _dD = "defaultDouble"; +const _dDB = "defaultDocumentBoolean"; +const _dDL = "defaultDocumentList"; +const _dDM = "defaultDocumentMap"; +const _dDS = "defaultDocumentString"; +const _dE = "defaultEnum"; +const _dF = "defaultFloat"; +const _dI = "defaultInteger"; +const _dIE = "defaultIntEnum"; +const _dL = "defaultList"; +const _dLe = "defaultLong"; +const _dLi = "dialogList"; +const _dM = "defaultMap"; +const _dMi = "dialogMap"; +const _dND = "defaultNullDocument"; +const _dS = "defaultString"; +const _dSe = "defaultShort"; +const _dT = "defaultTimestamp"; +const _dV = "doubleValue"; +const _da = "data"; +const _di = "dialog"; +const _e = "error"; +const _eB = "emptyBlob"; +const _eS = "emptyString"; +const _eV = "enumValue"; +const _en = "encoding"; +const _end = "endpoint"; +const _f = "farewell"; +const _fB = "falseBoolean"; +const _fV = "floatValue"; +const _g = "greeting"; +const _h = "hi"; +const _hH = "httpHeader"; +const _hL = "hostLabel"; +const _iEV = "intEnumValue"; +const _jN = "jsonName"; +const _l = "language"; +const _lV = "listValue"; +const _la = "label"; +const _m = "member"; +const _mV = "mapValue"; +const _nV = "numberValue"; +const _oTLD = "otherTopLevelDefault"; +const _p = "phrase"; +const _rB = "requiredBoolean"; +const _rBe = "requiredBlob"; +const _rBeq = "requiredByte"; +const _rD = "requiredDouble"; +const _rE = "requiredEnum"; +const _rF = "requiredFloat"; +const _rI = "requiredInteger"; +const _rIE = "requiredIntEnum"; +const _rL = "requiredList"; +const _rLe = "requiredLong"; +const _rM = "requiredMap"; +const _rS = "requiredString"; +const _rSe = "requiredShort"; +const _rT = "requiredTimestamp"; +const _s = "server"; +const _sV = "stringValue"; +const _sVt = "structureValue"; +const _tL = "topLevel"; +const _tLD = "topLevelDefault"; +const _tV = "timestampValue"; +const _v = "value"; +const _zB = "zeroByte"; +const _zD = "zeroDouble"; +const _zF = "zeroFloat"; +const _zI = "zeroInteger"; +const _zL = "zeroLong"; +const _zS = "zeroShort"; +const n0 = "aws.protocoltests.json10"; +const n1 = "aws.protocoltests.shared"; + +// smithy-typescript generated code +import { error, list, map, op, struct, struct as uni } from "@smithy/core/schema"; + +import { + ComplexError as __ComplexError, + FooError as __FooError, + InvalidGreeting as __InvalidGreeting, +} from "../models/index"; +import { JSONRPC10ServiceException as __JSONRPC10ServiceException } from "../models/JSONRPC10ServiceException"; + +/* eslint no-var: 0 */ + +export var ClientOptionalDefaults = struct(n0, _COD, 0, [_m], [1]); +export var ComplexError = error( + n0, + _CE, + { + [_e]: _c, + }, + [_TL, _N], + [0, [() => ComplexNestedErrorData, 0]], + + __ComplexError +); +export var ComplexNestedErrorData = struct( + n0, + _CNED, + 0, + [_Fo], + [ + [ + 0, + { + [_jN]: _Foo, + }, + ], + ] +); +export var ContentTypeParametersInput = struct(n0, _CTPI, 0, [_v], [1]); +export var ContentTypeParametersOutput = struct(n0, _CTPO, 0, [], []); +export var Defaults = struct( + n0, + _De, + 0, + [ + _dS, + _dB, + _dL, + _dDM, + _dDS, + _dDB, + _dDL, + _dND, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 15, 15, 15, 15, 15, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var Dialog = struct(n0, _Di, 0, [_l, _g, _f], [0, 0, () => Farewell]); +export var EmptyInputAndEmptyOutputInput = struct(n0, _EIAEOI, 0, [], []); +export var EmptyInputAndEmptyOutputOutput = struct(n0, _EIAEOO, 0, [], []); +export var EndpointWithHostLabelOperationInput = struct( + n0, + _EWHLOI, + 0, + [_la], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var Farewell = struct(n0, _Fa, 0, [_p], [0]); +export var FooError = error( + n0, + _FEo, + { + [_e]: _s, + }, + [], + [], + + __FooError +); +export var GreetingWithErrorsInput = struct(n0, _GWEI, 0, [_g], [0]); +export var GreetingWithErrorsOutput = struct(n0, _GWEO, 0, [_g], [0]); +export var InvalidGreeting = error( + n0, + _IG, + { + [_e]: _c, + }, + [_M], + [0], + + __InvalidGreeting +); +export var JsonUnionsInput = struct(n0, _JUI, 0, [_co], [() => MyUnion]); +export var JsonUnionsOutput = struct(n0, _JUO, 0, [_co], [() => MyUnion]); +export var NoInputAndOutputOutput = struct(n0, _NIAOO, 0, [], []); +export var OperationWithDefaultsInput = struct( + n0, + _OWDI, + 0, + [_d, _cOD, _tLD, _oTLD], + [() => Defaults, () => ClientOptionalDefaults, 0, 1] +); +export var OperationWithDefaultsOutput = struct( + n0, + _OWDO, + 0, + [ + _dS, + _dB, + _dL, + _dDM, + _dDS, + _dDB, + _dDL, + _dND, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 15, 15, 15, 15, 15, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var OperationWithNestedStructureInput = struct(n0, _OWNSI, 0, [_tL], [() => TopLevel]); +export var OperationWithNestedStructureOutput = struct( + n0, + _OWNSO, + 0, + [_di, _dLi, _dMi], + [() => Dialog, () => DialogList, () => DialogMap] +); +export var OperationWithRequiredMembersOutput = struct( + n0, + _OWRMO, + 0, + [_rS, _rB, _rL, _rT, _rBe, _rBeq, _rSe, _rI, _rLe, _rF, _rD, _rM], + [0, 2, 64 | 0, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0] +); +export var OperationWithRequiredMembersWithDefaultsOutput = struct( + n0, + _OWRMWDO, + 0, + [_rS, _rB, _rL, _rT, _rBe, _rBeq, _rSe, _rI, _rLe, _rF, _rD, _rM, _rE, _rIE], + [0, 2, 64 | 0, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1] +); +export var PutWithContentEncodingInput = struct( + n0, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var SimpleScalarPropertiesInput = struct(n0, _SSPI, 0, [_fV, _dV], [1, 1]); +export var SimpleScalarPropertiesOutput = struct(n0, _SSPO, 0, [_fV, _dV], [1, 1]); +export var TopLevel = struct(n0, _TL, 0, [_di, _dLi, _dMi], [() => Dialog, () => DialogList, () => DialogMap]); +export var GreetingStruct = struct(n1, _GS, 0, [_h], [0]); +export var Unit = "unit" as const; + +export var JSONRPC10ServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.json10", + "JSONRPC10ServiceException", + 0, + [], + [], + __JSONRPC10ServiceException +); +export var DialogList = list(n0, _DL, 0, () => Dialog); +export var RequiredStringList = 64 | 0; + +export var TestStringList = 64 | 0; + +export var StringList = 64 | 0; + +export var DialogMap = map(n0, _DM, 0, 0, () => Dialog); +export var RequiredStringMap = 128 | 0; + +export var TestStringMap = 128 | 0; + +export var StringMap = 128 | 0; + +export var MyUnion = uni( + n0, + _MU, + 0, + [_sV, _bV, _nV, _bVl, _tV, _eV, _iEV, _lV, _mV, _sVt], + [0, 2, 1, 21, 4, 0, 1, 64 | 0, 128 | 0, () => GreetingStruct] +); +export var ContentTypeParameters = op( + n0, + _CTP, + 0, + () => ContentTypeParametersInput, + () => ContentTypeParametersOutput +); +export var EmptyInputAndEmptyOutput = op( + n0, + _EIAEO, + 0, + () => EmptyInputAndEmptyOutputInput, + () => EmptyInputAndEmptyOutputOutput +); +export var EndpointOperation = op( + n0, + _EO, + { + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n0, + _EWHLO, + { + [_end]: ["foo.{label}."], + }, + () => EndpointWithHostLabelOperationInput, + () => Unit +); +export var GreetingWithErrors = op( + n0, + _GWE, + 2, + () => GreetingWithErrorsInput, + () => GreetingWithErrorsOutput +); +export var HostWithPathOperation = op( + n0, + _HWPO, + 0, + () => Unit, + () => Unit +); +export var JsonUnions = op( + n0, + _JU, + 2, + () => JsonUnionsInput, + () => JsonUnionsOutput +); +export var NoInputAndNoOutput = op( + n0, + _NIANO, + 0, + () => Unit, + () => Unit +); +export var NoInputAndOutput = op( + n0, + _NIAO, + 0, + () => Unit, + () => NoInputAndOutputOutput +); +export var OperationWithDefaults = op( + n0, + _OWD, + 0, + () => OperationWithDefaultsInput, + () => OperationWithDefaultsOutput +); +export var OperationWithNestedStructure = op( + n0, + _OWNS, + 0, + () => OperationWithNestedStructureInput, + () => OperationWithNestedStructureOutput +); +export var OperationWithRequiredMembers = op( + n0, + _OWRM, + 0, + () => Unit, + () => OperationWithRequiredMembersOutput +); +export var OperationWithRequiredMembersWithDefaults = op( + n0, + _OWRMWD, + 0, + () => Unit, + () => OperationWithRequiredMembersWithDefaultsOutput +); +export var PutWithContentEncoding = op( + n0, + _PWCE, + 0, + () => PutWithContentEncodingInput, + () => Unit +); +export var SimpleScalarProperties = op( + n0, + _SSP, + 0, + () => SimpleScalarPropertiesInput, + () => SimpleScalarPropertiesOutput +); diff --git a/private/aws-protocoltests-json/src/schemas/schemas.ts b/private/aws-protocoltests-json/src/schemas/schemas.ts new file mode 100644 index 0000000000000..d1a61d54eadc3 --- /dev/null +++ b/private/aws-protocoltests-json/src/schemas/schemas.ts @@ -0,0 +1,568 @@ +const _B = "Boolean"; +const _Bl = "Blob"; +const _C = "Code"; +const _CD = "ComplexData"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CNED = "ComplexNestedErrorData"; +const _CTP = "ContentTypeParameters"; +const _CTPI = "ContentTypeParametersInput"; +const _CTPO = "ContentTypeParametersOutput"; +const _D = "Double"; +const _DO = "DatetimeOffsets"; +const _DOO = "DatetimeOffsetsOutput"; +const _DT = "DateTime"; +const _EO = "EmptyOperation"; +const _EOn = "EndpointOperation"; +const _ES = "EmptyStruct"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _EWM = "ErrorWithMembers"; +const _EWMr = "ErrorWithoutMembers"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FEM = "FooEnumMap"; +const _FES = "FooEnumSet"; +const _FEo = "FooError"; +const _FS = "FractionalSeconds"; +const _FSO = "FractionalSecondsOutput"; +const _Fo = "Foo"; +const _Foo = "Fooooo"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _HLI = "HostLabelInput"; +const _HT = "HttpdateTimestamp"; +const _HWPO = "HostWithPathOperation"; +const _I = "Integer"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IEM = "IntegerEnumMap"; +const _IES = "IntegerEnumSet"; +const _IF = "IntegerField"; +const _IG = "InvalidGreeting"; +const _IT = "Iso8601Timestamp"; +const _JE = "JsonEnums"; +const _JEIO = "JsonEnumsInputOutput"; +const _JIE = "JsonIntEnums"; +const _JIEIO = "JsonIntEnumsInputOutput"; +const _JU = "JsonUnions"; +const _JV = "JsonValue"; +const _KS = "KitchenSink"; +const _KSO = "KitchenSinkOperation"; +const _L = "Long"; +const _LF = "ListField"; +const _LOKS = "ListOfKitchenSinks"; +const _LOL = "ListOfLists"; +const _LOLOS = "ListOfListOfStrings"; +const _LOMOS = "ListOfMapsOfStrings"; +const _LOS = "ListOfStrings"; +const _LOSi = "ListOfStructs"; +const _M = "Message"; +const _MF = "MapField"; +const _MOKS = "MapOfKitchenSinks"; +const _MOLOS = "MapOfListsOfStrings"; +const _MOM = "MapOfMaps"; +const _MOMOS = "MapOfMapOfStrings"; +const _MOS = "MapOfStrings"; +const _MOSa = "MapOfStructs"; +const _MU = "MyUnion"; +const _N = "Nested"; +const _NO = "NullOperation"; +const _NOIO = "NullOperationInputOutput"; +const _OWOIO = "OperationWithOptionalInputOutput"; +const _OWOIOI = "OperationWithOptionalInputOutputInput"; +const _OWOIOO = "OperationWithOptionalInputOutputOutput"; +const _PAGID = "PutAndGetInlineDocuments"; +const _PAGIDIO = "PutAndGetInlineDocumentsInputOutput"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _RL = "RecursiveList"; +const _RM = "RecursiveMap"; +const _RMe = "RenamedMember"; +const _RS = "RecursiveStruct"; +const _S = "String"; +const _SF = "StringField"; +const _SL = "StringList"; +const _SM = "StringMap"; +const _SNO = "SparseNullsOperation"; +const _SNOIO = "SparseNullsOperationInputOutput"; +const _SS = "SimpleStruct"; +const _SSL = "SparseStringList"; +const _SSM = "SparseStringMap"; +const _SSP = "SimpleScalarProperties"; +const _SSPIO = "SimpleScalarPropertiesInputOutput"; +const _SWJN = "StructWithJsonName"; +const _T = "Timestamp"; +const _TL = "TopLevel"; +const _UIO = "UnionInputOutput"; +const _UT = "UnixTimestamp"; +const _V = "Value"; +const _a = "application/json"; +const _bV = "booleanValue"; +const _bVl = "blobValue"; +const _c = "client"; +const _co = "contents"; +const _d = "datetime"; +const _dV = "doubleValue"; +const _da = "data"; +const _e = "error"; +const _eV = "enumValue"; +const _en = "encoding"; +const _end = "endpoint"; +const _fE = "fooEnum1"; +const _fEL = "fooEnumList"; +const _fEM = "fooEnumMap"; +const _fES = "fooEnumSet"; +const _fEo = "fooEnum2"; +const _fEoo = "fooEnum3"; +const _fV = "floatValue"; +const _g = "greeting"; +const _h = "hi"; +const _hH = "httpHeader"; +const _hL = "hostLabel"; +const _iD = "inlineDocument"; +const _iE = "intEnum1"; +const _iEL = "intEnumList"; +const _iEM = "intEnumMap"; +const _iES = "intEnumSet"; +const _iEn = "intEnum2"; +const _iEnt = "intEnum3"; +const _jN = "jsonName"; +const _l = "label"; +const _lV = "listValue"; +const _mT = "mediaType"; +const _mV = "mapValue"; +const _nV = "numberValue"; +const _s = "server"; +const _sSL = "sparseStringList"; +const _sSM = "sparseStringMap"; +const _sV = "stringValue"; +const _sVt = "structureValue"; +const _sp = "sparse"; +const _st = "string"; +const _tV = "timestampValue"; +const _v = "value"; +const n0 = "aws.protocoltests.json"; +const n1 = "aws.protocoltests.shared"; + +// smithy-typescript generated code +import { error, list, map, op, sim, struct, struct as uni } from "@smithy/core/schema"; + +import { + ComplexError as __ComplexError, + ErrorWithMembers as __ErrorWithMembers, + ErrorWithoutMembers as __ErrorWithoutMembers, + FooError as __FooError, + InvalidGreeting as __InvalidGreeting, +} from "../models/index"; +import { JsonProtocolServiceException as __JsonProtocolServiceException } from "../models/JsonProtocolServiceException"; + +/* eslint no-var: 0 */ + +export var JsonValue = sim(n0, _JV, 0, { + [_mT]: _a, +}); +export var ComplexError = error( + n0, + _CE, + { + [_e]: _c, + }, + [_TL, _N], + [0, [() => ComplexNestedErrorData, 0]], + + __ComplexError +); +export var ComplexNestedErrorData = struct( + n0, + _CNED, + 0, + [_Fo], + [ + [ + 0, + { + [_jN]: _Foo, + }, + ], + ] +); +export var ContentTypeParametersInput = struct(n0, _CTPI, 0, [_v], [1]); +export var ContentTypeParametersOutput = struct(n0, _CTPO, 0, [], []); +export var DatetimeOffsetsOutput = struct(n0, _DOO, 0, [_d], [5]); +export var EmptyStruct = struct(n0, _ES, 0, [], []); +export var ErrorWithMembers = error( + n0, + _EWM, + { + [_e]: _c, + }, + [_C, _CD, _IF, _LF, _MF, _M, _SF], + [0, [() => KitchenSink, 0], 1, 64 | 0, 128 | 0, 0, 0], + + __ErrorWithMembers +); +export var ErrorWithoutMembers = error( + n0, + _EWMr, + { + [_e]: _s, + }, + [], + [], + + __ErrorWithoutMembers +); +export var FooError = error( + n0, + _FEo, + { + [_e]: _s, + }, + [], + [], + + __FooError +); +export var FractionalSecondsOutput = struct(n0, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct(n0, _GWEO, 0, [_g], [0]); +export var HostLabelInput = struct( + n0, + _HLI, + 0, + [_l], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var InvalidGreeting = error( + n0, + _IG, + { + [_e]: _c, + }, + [_M], + [0], + + __InvalidGreeting +); +export var JsonEnumsInputOutput = struct( + n0, + _JEIO, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var JsonIntEnumsInputOutput = struct( + n0, + _JIEIO, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var KitchenSink = struct( + n0, + _KS, + 0, + [ + _Bl, + _B, + _D, + _ES, + _F, + _HT, + _I, + _IT, + _JV, + _LOL, + _LOMOS, + _LOS, + _LOSi, + _L, + _MOLOS, + _MOM, + _MOS, + _MOSa, + _RL, + _RM, + _RS, + _SS, + _S, + _SWJN, + _T, + _UT, + ], + [ + 21, + 2, + 1, + () => EmptyStruct, + 1, + 6, + 1, + 5, + [() => JsonValue, 0], + list(n0, _LOLOS, 0, 64 | 0), + list(n0, _LOMOS, 0, 128 | 0), + 64 | 0, + () => ListOfStructs, + 1, + map(n0, _MOLOS, 0, 0, 64 | 0), + map(n0, _MOMOS, 0, 0, 128 | 0), + 128 | 0, + () => MapOfStructs, + [() => ListOfKitchenSinks, 0], + [() => MapOfKitchenSinks, 0], + [() => KitchenSink, 0], + () => SimpleStruct, + 0, + [() => StructWithJsonName, 0], + 4, + 7, + ] +); +export var NullOperationInputOutput = struct(n0, _NOIO, 0, [_st], [0]); +export var OperationWithOptionalInputOutputInput = struct(n0, _OWOIOI, 0, [_V], [0]); +export var OperationWithOptionalInputOutputOutput = struct(n0, _OWOIOO, 0, [_V], [0]); +export var PutAndGetInlineDocumentsInputOutput = struct(n0, _PAGIDIO, 0, [_iD], [15]); +export var PutWithContentEncodingInput = struct( + n0, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var SimpleScalarPropertiesInputOutput = struct(n0, _SSPIO, 0, [_fV, _dV], [1, 1]); +export var SimpleStruct = struct(n0, _SS, 0, [_V], [0]); +export var SparseNullsOperationInputOutput = struct( + n0, + _SNOIO, + 0, + [_sSL, _sSM], + [ + [() => SparseStringList, 0], + [() => SparseStringMap, 0], + ] +); +export var StructWithJsonName = struct( + n0, + _SWJN, + 0, + [_V], + [ + [ + 0, + { + [_jN]: _RMe, + }, + ], + ] +); +export var UnionInputOutput = struct(n0, _UIO, 0, [_co], [() => MyUnion]); +export var GreetingStruct = struct(n1, _GS, 0, [_h], [0]); +export var Unit = "unit" as const; + +export var JsonProtocolServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.json", + "JsonProtocolServiceException", + 0, + [], + [], + __JsonProtocolServiceException +); +export var ListOfKitchenSinks = list(n0, _LOKS, 0, [() => KitchenSink, 0]); +export var ListOfListOfStrings = list(n0, _LOLOS, 0, 64 | 0); +export var ListOfMapsOfStrings = list(n0, _LOMOS, 0, 128 | 0); +export var ListOfStrings = 64 | 0; + +export var ListOfStructs = list(n0, _LOSi, 0, () => SimpleStruct); +export var FooEnumList = 64 | 0; + +export var FooEnumSet = 64 | 0; + +export var IntegerEnumList = 64 | 1; + +export var IntegerEnumSet = 64 | 1; + +export var SparseStringList = list( + n1, + _SSL, + { + [_sp]: 1, + }, + 0 +); +export var StringList = 64 | 0; + +export var MapOfKitchenSinks = map(n0, _MOKS, 0, [0, 0], [() => KitchenSink, 0]); +export var MapOfListsOfStrings = map(n0, _MOLOS, 0, 0, 64 | 0); +export var MapOfMapOfStrings = map(n0, _MOMOS, 0, 0, 128 | 0); +export var MapOfStrings = 128 | 0; + +export var MapOfStructs = map(n0, _MOSa, 0, 0, () => SimpleStruct); +export var FooEnumMap = 128 | 0; + +export var IntegerEnumMap = 128 | 1; + +export var SparseStringMap = map( + n1, + _SSM, + { + [_sp]: 1, + }, + 0, + 0 +); +export var StringMap = 128 | 0; + +export var MyUnion = uni( + n0, + _MU, + 0, + [_sV, _bV, _nV, _bVl, _tV, _eV, _lV, _mV, _sVt], + [0, 2, 1, 21, 4, 0, 64 | 0, 128 | 0, () => GreetingStruct] +); +export var ContentTypeParameters = op( + n0, + _CTP, + 0, + () => ContentTypeParametersInput, + () => ContentTypeParametersOutput +); +export var DatetimeOffsets = op( + n0, + _DO, + 0, + () => Unit, + () => DatetimeOffsetsOutput +); +export var EmptyOperation = op( + n0, + _EO, + 0, + () => Unit, + () => Unit +); +export var EndpointOperation = op( + n0, + _EOn, + { + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n0, + _EWHLO, + { + [_end]: ["foo.{label}."], + }, + () => HostLabelInput, + () => Unit +); +export var FractionalSeconds = op( + n0, + _FS, + 0, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n0, + _GWE, + 2, + () => Unit, + () => GreetingWithErrorsOutput +); +export var HostWithPathOperation = op( + n0, + _HWPO, + 0, + () => Unit, + () => Unit +); +export var JsonEnums = op( + n0, + _JE, + 2, + () => JsonEnumsInputOutput, + () => JsonEnumsInputOutput +); +export var JsonIntEnums = op( + n0, + _JIE, + 2, + () => JsonIntEnumsInputOutput, + () => JsonIntEnumsInputOutput +); +export var JsonUnions = op( + n0, + _JU, + 2, + () => UnionInputOutput, + () => UnionInputOutput +); +export var KitchenSinkOperation = op( + n0, + _KSO, + 0, + () => KitchenSink, + () => KitchenSink +); +export var NullOperation = op( + n0, + _NO, + 0, + () => NullOperationInputOutput, + () => NullOperationInputOutput +); +export var OperationWithOptionalInputOutput = op( + n0, + _OWOIO, + 0, + () => OperationWithOptionalInputOutputInput, + () => OperationWithOptionalInputOutputOutput +); +export var PutAndGetInlineDocuments = op( + n0, + _PAGID, + 0, + () => PutAndGetInlineDocumentsInputOutput, + () => PutAndGetInlineDocumentsInputOutput +); +export var PutWithContentEncoding = op( + n0, + _PWCE, + 0, + () => PutWithContentEncodingInput, + () => Unit +); +export var SimpleScalarProperties = op( + n0, + _SSP, + 0, + () => SimpleScalarPropertiesInputOutput, + () => SimpleScalarPropertiesInputOutput +); +export var SparseNullsOperation = op( + n0, + _SNO, + 0, + () => SparseNullsOperationInputOutput, + () => SparseNullsOperationInputOutput +); diff --git a/private/aws-protocoltests-query/src/schemas/schemas.ts b/private/aws-protocoltests-query/src/schemas/schemas.ts new file mode 100644 index 0000000000000..61122c112a548 --- /dev/null +++ b/private/aws-protocoltests-query/src/schemas/schemas.ts @@ -0,0 +1,995 @@ +const _ = ""; +const _A = "Attribute"; +const _B = "Boolean"; +const _BL = "BooleanList"; +const _Ba = "Bar"; +const _Bam = "Bam"; +const _Baz = "Baz"; +const _Bl = "Blob"; +const _Bo = "Boo"; +const _By = "Byte"; +const _CCE = "CustomCodeError"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CLA = "ComplexListArg"; +const _CM = "ComplexMap"; +const _CMA = "ComplexMapArg"; +const _CNED = "ComplexNestedErrorData"; +const _D = "Double"; +const _DD = "DoubleDribble"; +const _DO = "DatetimeOffsets"; +const _DOO = "DatetimeOffsetsOutput"; +const _DT = "DateTime"; +const _EIAEO = "EmptyInputAndEmptyOutput"; +const _EIAEOI = "EmptyInputAndEmptyOutputInput"; +const _EIAEOO = "EmptyInputAndEmptyOutputOutput"; +const _EO = "EndpointOperation"; +const _ES = "EpochSeconds"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FEM = "FooEnumMap"; +const _FES = "FooEnumSet"; +const _FLA = "FlattenedListArg"; +const _FLAWXN = "FlattenedListArgWithXmlName"; +const _FM = "FlattenedMap"; +const _FMWXN = "FlattenedMapWithXmlName"; +const _FS = "FractionalSeconds"; +const _FSO = "FractionalSecondsOutput"; +const _FV = "FloatValue"; +const _FXM = "FlattenedXmlMap"; +const _FXMO = "FlattenedXmlMapOutput"; +const _FXMWXN = "FlattenedXmlMapWithXmlName"; +const _FXMWXNO = "FlattenedXmlMapWithXmlNameOutput"; +const _FXMWXNOM = "FlattenedXmlMapWithXmlNameOutputMap"; +const _FXMWXNOMl = "FlattenedXmlMapWithXmlNamespaceOutputMap"; +const _FXMWXNOl = "FlattenedXmlMapWithXmlNamespaceOutput"; +const _FXMWXNl = "FlattenedXmlMapWithXmlNamespace"; +const _Fo = "Foo"; +const _GL = "GreetingList"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _H = "Hi"; +const _HD = "HttpDate"; +const _HLI = "HostLabelInput"; +const _HWPO = "HostWithPathOperation"; +const _I = "Integer"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IEM = "IntegerEnumMap"; +const _IES = "IntegerEnumSet"; +const _IG = "InvalidGreeting"; +const _IL = "IntegerList"; +const _IM = "IgnoreMe"; +const _IWXN = "IgnoresWrappingXmlName"; +const _IWXNO = "IgnoresWrappingXmlNameOutput"; +const _K = "K"; +const _KVP = "KVP"; +const _L = "Long"; +const _LA = "ListArg"; +const _LAWXNM = "ListArgWithXmlNameMember"; +const _LWMN = "ListWithMemberNamespace"; +const _LWN = "ListWithNamespace"; +const _LWXN = "ListWithXmlName"; +const _M = "Message"; +const _MA = "MapArg"; +const _MOL = "MapOfLists"; +const _MWXMN = "MapWithXmlMemberName"; +const _MWXN = "MapWithXmlName"; +const _N = "Nested"; +const _NIANO = "NoInputAndNoOutput"; +const _NIAO = "NoInputAndOutput"; +const _NIAOI = "NoInputAndOutputInput"; +const _NIAOO = "NoInputAndOutputOutput"; +const _NS = "NestedStructures"; +const _NSI = "NestedStructuresInput"; +const _NSL = "NestedStringList"; +const _NSWL = "NestedStructWithList"; +const _NSWM = "NestedStructWithMap"; +const _NWL = "NestedWithList"; +const _OA = "OtherArg"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _Q = "Qux"; +const _QITAF = "QueryIdempotencyTokenAutoFill"; +const _QITAFI = "QueryIdempotencyTokenAutoFillInput"; +const _QL = "QueryLists"; +const _QLI = "QueryListsInput"; +const _QM = "QueryMaps"; +const _QMI = "QueryMapsInput"; +const _QT = "QueryTimestamps"; +const _QTI = "QueryTimestampsInput"; +const _RA = "RecursiveArg"; +const _RLM = "RenamedListMembers"; +const _RMA = "RenamedMapArg"; +const _RXS = "RecursiveXmlShapes"; +const _RXSO = "RecursiveXmlShapesOutput"; +const _RXSON = "RecursiveXmlShapesOutputNested1"; +const _RXSONe = "RecursiveXmlShapesOutputNested2"; +const _S = "String"; +const _SA = "StructArg"; +const _SAt = "StringArg"; +const _SIP = "SimpleInputParams"; +const _SIPI = "SimpleInputParamsInput"; +const _SL = "StringList"; +const _SLM = "StructureListMember"; +const _SLt = "StructureList"; +const _SM = "StringMap"; +const _SS = "StringSet"; +const _SSXP = "SimpleScalarXmlProperties"; +const _SSXPO = "SimpleScalarXmlPropertiesOutput"; +const _Se = "Setting"; +const _Sh = "Short"; +const _T = "Timestamp"; +const _TL = "TimestampList"; +const _TLo = "TopLevel"; +const _V = "V"; +const _XB = "XmlBlobs"; +const _XBO = "XmlBlobsOutput"; +const _XE = "XmlEnums"; +const _XEB = "XmlEmptyBlobs"; +const _XEL = "XmlEmptyLists"; +const _XEM = "XmlEmptyMaps"; +const _XEO = "XmlEnumsOutput"; +const _XIE = "XmlIntEnums"; +const _XIEO = "XmlIntEnumsOutput"; +const _XL = "XmlLists"; +const _XLO = "XmlListsOutput"; +const _XM = "XmlMaps"; +const _XMO = "XmlMapsOutput"; +const _XMOM = "XmlMapsOutputMap"; +const _XMXN = "XmlMapsXmlName"; +const _XMXNO = "XmlMapsXmlNameOutput"; +const _XMXNOM = "XmlMapsXmlNameOutputMap"; +const _XN = "XmlNamespaces"; +const _XNL = "XmlNamespacedList"; +const _XNN = "XmlNamespaceNested"; +const _XNO = "XmlNamespacesOutput"; +const _XT = "XmlTimestamps"; +const _XTO = "XmlTimestampsOutput"; +const _a = "a"; +const _aQE = "awsQueryError"; +const _b = "bar"; +const _bL = "booleanList"; +const _bV = "byteValue"; +const _b_ = "b"; +const _ba = "baz"; +const _c = "client"; +const _cN = "customName"; +const _d = "datetime"; +const _dT = "dateTime"; +const _dTOT = "dateTimeOnTarget"; +const _dV = "doubleValue"; +const _da = "data"; +const _e = "error"; +const _eL = "enumList"; +const _eM = "epochMember"; +const _eS = "epochSeconds"; +const _eSOT = "epochSecondsOnTarget"; +const _eSV = "emptyStringValue"; +const _eT = "epochTarget"; +const _en = "encoding"; +const _end = "endpoint"; +const _f = "foo"; +const _fBV = "falseBooleanValue"; +const _fE = "fooEnum1"; +const _fEL = "fooEnumList"; +const _fEM = "fooEnumMap"; +const _fES = "fooEnumSet"; +const _fEo = "fooEnum2"; +const _fEoo = "fooEnum3"; +const _fL = "flattenedList"; +const _fLWMN = "flattenedListWithMemberNamespace"; +const _fLWN = "flattenedListWithNamespace"; +const _fLl = "flattenedList2"; +const _fV = "floatValue"; +const _g = "greeting"; +const _h = "http://boo.com"; +const _hD = "httpDate"; +const _hDOT = "httpDateOnTarget"; +const _hH = "httpHeader"; +const _hL = "hostLabel"; +const _hi = "hi"; +const _hk = "https://the-key.example.com"; +const _hl = "https://xml-list.example.com"; +const _hm = "https://the-member.example.com"; +const _hm_ = "https://xml-member.example.com"; +const _ht = "http://baz.com"; +const _htt = "http://qux.com"; +const _http = "http://foo.com"; +const _httpb = "http://bux.com"; +const _hv = "https://the-value.example.com"; +const _i = "item"; +const _iE = "intEnum1"; +const _iEL = "intEnumList"; +const _iEM = "intEnumMap"; +const _iES = "intEnumSet"; +const _iEn = "intEnum2"; +const _iEnt = "intEnum3"; +const _iL = "integerList"; +const _iV = "integerValue"; +const _l = "label"; +const _lV = "longValue"; +const _mM = "myMap"; +const _mSL = "myStructureList"; +const _n = "nested"; +const _nF = "normalFormat"; +const _nSL = "nestedStringList"; +const _no = "normal"; +const _o = "other"; +const _r = "renamed"; +const _rLM = "renamedListMembers"; +const _rM = "recursiveMember"; +const _sL = "stringList"; +const _sLt = "structureList"; +const _sS = "stringSet"; +const _sV = "stringValue"; +const _sVh = "shortValue"; +const _t = "token"; +const _tBV = "trueBooleanValue"; +const _tL = "timestampList"; +const _v = "value"; +const _va = "values"; +const _xF = "xmlFlattened"; +const _xN = "xmlName"; +const _xNm = "xmlNamespace"; +const n0 = "aws.protocoltests.query"; +const n1 = "aws.protocoltests.shared"; + +// smithy-typescript generated code +import { error, list, map, op, struct } from "@smithy/core/schema"; + +import { + ComplexError as __ComplexError, + CustomCodeError as __CustomCodeError, + InvalidGreeting as __InvalidGreeting, +} from "../models/index"; +import { QueryProtocolServiceException as __QueryProtocolServiceException } from "../models/QueryProtocolServiceException"; + +/* eslint no-var: 0 */ + +export var ComplexError = error( + n0, + _CE, + { + [_e]: _c, + }, + [_TLo, _N], + [0, () => ComplexNestedErrorData], + __ComplexError +); +export var ComplexNestedErrorData = struct(n0, _CNED, 0, [_Fo], [0]); +export var CustomCodeError = error( + n0, + _CCE, + { + [_e]: _c, + [_aQE]: [`Customized`, 402], + }, + [_M], + [0], + __CustomCodeError +); +export var DatetimeOffsetsOutput = struct(n0, _DOO, 0, [_d], [5]); +export var EmptyInputAndEmptyOutputInput = struct(n0, _EIAEOI, 0, [], []); +export var EmptyInputAndEmptyOutputOutput = struct(n0, _EIAEOO, 0, [], []); +export var FlattenedXmlMapOutput = struct( + n0, + _FXMO, + 0, + [_mM], + [ + [ + 128 | 0, + { + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapWithXmlNameOutput = struct( + n0, + _FXMWXNO, + 0, + [_mM], + [ + [ + () => FlattenedXmlMapWithXmlNameOutputMap, + { + [_xN]: _KVP, + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapWithXmlNamespaceOutput = struct( + n0, + _FXMWXNOl, + 0, + [_mM], + [ + [ + () => FlattenedXmlMapWithXmlNamespaceOutputMap, + { + [_xN]: _KVP, + [_xF]: 1, + [_xNm]: [_, _hm], + }, + ], + ] +); +export var FractionalSecondsOutput = struct(n0, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct(n0, _GWEO, 0, [_g], [0]); +export var HostLabelInput = struct( + n0, + _HLI, + 0, + [_l], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var IgnoresWrappingXmlNameOutput = struct( + n0, + _IWXNO, + { + [_xN]: _IM, + }, + [_f], + [0] +); +export var InvalidGreeting = error( + n0, + _IG, + { + [_e]: _c, + }, + [_M], + [0], + + __InvalidGreeting +); +export var NestedStructuresInput = struct(n0, _NSI, 0, [_N], [() => StructArg]); +export var NestedStructWithList = struct(n0, _NSWL, 0, [_LA], [64 | 0]); +export var NestedStructWithMap = struct(n0, _NSWM, 0, [_MA], [128 | 0]); +export var NoInputAndOutputInput = struct(n0, _NIAOI, 0, [], []); +export var NoInputAndOutputOutput = struct(n0, _NIAOO, 0, [], []); +export var PutWithContentEncodingInput = struct( + n0, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var QueryIdempotencyTokenAutoFillInput = struct(n0, _QITAFI, 0, [_t], [[0, 4]]); +export var QueryListsInput = struct( + n0, + _QLI, + 0, + [_LA, _CLA, _FLA, _LAWXNM, _FLAWXN, _NWL], + [ + 64 | 0, + () => GreetingList, + [ + 64 | 0, + { + [_xF]: 1, + }, + ], + [() => ListWithXmlName, 0], + [ + () => ListWithXmlName, + { + [_xN]: _H, + [_xF]: 1, + }, + ], + () => NestedStructWithList, + ] +); +export var QueryMapsInput = struct( + n0, + _QMI, + 0, + [_MA, _RMA, _CMA, _MWXMN, _FM, _FMWXN, _MOL, _NSWM], + [ + 128 | 0, + [ + 128 | 0, + { + [_xN]: _Fo, + }, + ], + () => ComplexMap, + [() => MapWithXmlName, 0], + [ + 128 | 0, + { + [_xF]: 1, + }, + ], + [ + () => MapWithXmlName, + { + [_xN]: _H, + [_xF]: 1, + }, + ], + map(n0, _MOL, 0, 0, 64 | 0), + () => NestedStructWithMap, + ] +); +export var QueryTimestampsInput = struct(n0, _QTI, 0, [_nF, _eM, _eT], [4, 7, 7]); +export var RecursiveXmlShapesOutput = struct(n0, _RXSO, 0, [_n], [() => RecursiveXmlShapesOutputNested1]); +export var RecursiveXmlShapesOutputNested1 = struct( + n0, + _RXSON, + 0, + [_f, _n], + [0, () => RecursiveXmlShapesOutputNested2] +); +export var RecursiveXmlShapesOutputNested2 = struct( + n0, + _RXSONe, + 0, + [_b, _rM], + [0, () => RecursiveXmlShapesOutputNested1] +); +export var SimpleInputParamsInput = struct( + n0, + _SIPI, + 0, + [_Fo, _Ba, _Baz, _Bam, _FV, _Bo, _Q, _FE, _IE], + [0, 0, 2, 1, 1, 1, 21, 0, 1] +); +export var SimpleScalarXmlPropertiesOutput = struct( + n0, + _SSXPO, + 0, + [_sV, _eSV, _tBV, _fBV, _bV, _sVh, _iV, _lV, _fV, _dV], + [ + 0, + 0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + [ + 1, + { + [_xN]: _DD, + }, + ], + ] +); +export var StructArg = struct(n0, _SA, 0, [_SAt, _OA, _RA], [0, 2, () => StructArg]); +export var StructureListMember = struct( + n0, + _SLM, + 0, + [_a, _b_], + [ + [ + 0, + { + [_xN]: _v, + }, + ], + [ + 0, + { + [_xN]: _o, + }, + ], + ] +); +export var XmlBlobsOutput = struct(n0, _XBO, 0, [_da], [21]); +export var XmlEnumsOutput = struct( + n0, + _XEO, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var XmlIntEnumsOutput = struct( + n0, + _XIEO, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var XmlListsOutput = struct( + n0, + _XLO, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n1, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + ] +); +export var XmlMapsOutput = struct(n0, _XMO, 0, [_mM], [() => XmlMapsOutputMap]); +export var XmlMapsXmlNameOutput = struct(n0, _XMXNO, 0, [_mM], [[() => XmlMapsXmlNameOutputMap, 0]]); +export var XmlNamespaceNested = struct( + n0, + _XNN, + { + [_xNm]: [_, _h], + }, + [_f, _va], + [ + [ + 0, + { + [_xNm]: [_ba, _ht], + }, + ], + [ + () => XmlNamespacedList, + { + [_xNm]: [_, _htt], + }, + ], + ] +); +export var XmlNamespacesOutput = struct( + n0, + _XNO, + { + [_xNm]: [_, _http], + }, + [_n], + [[() => XmlNamespaceNested, 0]] +); +export var XmlTimestampsOutput = struct(n0, _XTO, 0, [_no, _dT, _dTOT, _eS, _eSOT, _hD, _hDOT], [4, 5, 5, 7, 7, 6, 6]); +export var GreetingStruct = struct(n1, _GS, 0, [_hi], [0]); +export var Unit = "unit" as const; + +export var QueryProtocolServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.query", + "QueryProtocolServiceException", + 0, + [], + [], + __QueryProtocolServiceException +); +export var ListWithMemberNamespace = list( + n0, + _LWMN, + { + [_xNm]: [_, _hl], + }, + [ + 0, + { + [_xNm]: [_, _hm_], + }, + ] +); +export var ListWithNamespace = list( + n0, + _LWN, + { + [_xNm]: [_, _hl], + }, + 0 +); +export var ListWithXmlName = list(n0, _LWXN, 0, [ + 0, + { + [_xN]: _i, + }, +]); +export var RenamedListMembers = list(n0, _RLM, 0, [ + 0, + { + [_xN]: _i, + }, +]); +export var StructureList = list(n0, _SLt, 0, [ + () => StructureListMember, + { + [_xN]: _i, + }, +]); +export var XmlNamespacedList = list(n0, _XNL, 0, [ + 0, + { + [_xNm]: [_, _httpb], + }, +]); +export var BooleanList = 64 | 2; + +export var FooEnumList = 64 | 0; + +export var FooEnumSet = 64 | 0; + +export var GreetingList = list(n1, _GL, 0, () => GreetingStruct); +export var IntegerEnumList = 64 | 1; + +export var IntegerEnumSet = 64 | 1; + +export var IntegerList = 64 | 1; + +export var NestedStringList = list(n1, _NSL, 0, 64 | 0); +export var StringList = 64 | 0; + +export var StringSet = 64 | 0; + +export var TimestampList = 64 | 4; + +export var ComplexMap = map(n0, _CM, 0, 0, () => GreetingStruct); +export var FlattenedXmlMapWithXmlNameOutputMap = map( + n0, + _FXMWXNOM, + 0, + [ + 0, + { + [_xN]: _K, + }, + ], + [ + 0, + { + [_xN]: _V, + }, + ] +); +export var FlattenedXmlMapWithXmlNamespaceOutputMap = map( + n0, + _FXMWXNOMl, + 0, + [ + 0, + { + [_xNm]: [_, _hk], + [_xN]: _K, + }, + ], + [ + 0, + { + [_xNm]: [_, _hv], + [_xN]: _V, + }, + ] +); +export var MapOfLists = map(n0, _MOL, 0, 0, 64 | 0); +export var MapWithXmlName = map( + n0, + _MWXN, + 0, + [ + 0, + { + [_xN]: _K, + }, + ], + [ + 0, + { + [_xN]: _V, + }, + ] +); +export var XmlMapsOutputMap = map(n0, _XMOM, 0, 0, () => GreetingStruct); +export var XmlMapsXmlNameOutputMap = map( + n0, + _XMXNOM, + 0, + [ + 0, + { + [_xN]: _A, + }, + ], + [ + () => GreetingStruct, + { + [_xN]: _Se, + }, + ] +); +export var FooEnumMap = 128 | 0; + +export var IntegerEnumMap = 128 | 1; + +export var StringMap = 128 | 0; + +export var DatetimeOffsets = op( + n0, + _DO, + 0, + () => Unit, + () => DatetimeOffsetsOutput +); +export var EmptyInputAndEmptyOutput = op( + n0, + _EIAEO, + 0, + () => EmptyInputAndEmptyOutputInput, + () => EmptyInputAndEmptyOutputOutput +); +export var EndpointOperation = op( + n0, + _EO, + { + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n0, + _EWHLO, + { + [_end]: ["foo.{label}."], + }, + () => HostLabelInput, + () => Unit +); +export var FlattenedXmlMap = op( + n0, + _FXM, + 0, + () => Unit, + () => FlattenedXmlMapOutput +); +export var FlattenedXmlMapWithXmlName = op( + n0, + _FXMWXN, + 0, + () => Unit, + () => FlattenedXmlMapWithXmlNameOutput +); +export var FlattenedXmlMapWithXmlNamespace = op( + n0, + _FXMWXNl, + 0, + () => Unit, + () => FlattenedXmlMapWithXmlNamespaceOutput +); +export var FractionalSeconds = op( + n0, + _FS, + 0, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n0, + _GWE, + 0, + () => Unit, + () => GreetingWithErrorsOutput +); +export var HostWithPathOperation = op( + n0, + _HWPO, + 0, + () => Unit, + () => Unit +); +export var IgnoresWrappingXmlName = op( + n0, + _IWXN, + 0, + () => Unit, + () => IgnoresWrappingXmlNameOutput +); +export var NestedStructures = op( + n0, + _NS, + 0, + () => NestedStructuresInput, + () => Unit +); +export var NoInputAndNoOutput = op( + n0, + _NIANO, + 0, + () => Unit, + () => Unit +); +export var NoInputAndOutput = op( + n0, + _NIAO, + 0, + () => NoInputAndOutputInput, + () => NoInputAndOutputOutput +); +export var PutWithContentEncoding = op( + n0, + _PWCE, + 0, + () => PutWithContentEncodingInput, + () => Unit +); +export var QueryIdempotencyTokenAutoFill = op( + n0, + _QITAF, + 0, + () => QueryIdempotencyTokenAutoFillInput, + () => Unit +); +export var QueryLists = op( + n0, + _QL, + 0, + () => QueryListsInput, + () => Unit +); +export var QueryMaps = op( + n0, + _QM, + 0, + () => QueryMapsInput, + () => Unit +); +export var QueryTimestamps = op( + n0, + _QT, + 0, + () => QueryTimestampsInput, + () => Unit +); +export var RecursiveXmlShapes = op( + n0, + _RXS, + 0, + () => Unit, + () => RecursiveXmlShapesOutput +); +export var SimpleInputParams = op( + n0, + _SIP, + 0, + () => SimpleInputParamsInput, + () => Unit +); +export var SimpleScalarXmlProperties = op( + n0, + _SSXP, + 0, + () => Unit, + () => SimpleScalarXmlPropertiesOutput +); +export var XmlBlobs = op( + n0, + _XB, + 0, + () => Unit, + () => XmlBlobsOutput +); +export var XmlEmptyBlobs = op( + n0, + _XEB, + 0, + () => Unit, + () => XmlBlobsOutput +); +export var XmlEmptyLists = op( + n0, + _XEL, + 0, + () => Unit, + () => XmlListsOutput +); +export var XmlEmptyMaps = op( + n0, + _XEM, + 0, + () => Unit, + () => XmlMapsOutput +); +export var XmlEnums = op( + n0, + _XE, + 0, + () => Unit, + () => XmlEnumsOutput +); +export var XmlIntEnums = op( + n0, + _XIE, + 0, + () => Unit, + () => XmlIntEnumsOutput +); +export var XmlLists = op( + n0, + _XL, + 0, + () => Unit, + () => XmlListsOutput +); +export var XmlMaps = op( + n0, + _XM, + 0, + () => Unit, + () => XmlMapsOutput +); +export var XmlMapsXmlName = op( + n0, + _XMXN, + 0, + () => Unit, + () => XmlMapsXmlNameOutput +); +export var XmlNamespaces = op( + n0, + _XN, + 0, + () => Unit, + () => XmlNamespacesOutput +); +export var XmlTimestamps = op( + n0, + _XT, + 0, + () => Unit, + () => XmlTimestampsOutput +); diff --git a/private/aws-protocoltests-restjson/src/schemas/schemas.ts b/private/aws-protocoltests-restjson/src/schemas/schemas.ts new file mode 100644 index 0000000000000..ffaba28fc686b --- /dev/null +++ b/private/aws-protocoltests-restjson/src/schemas/schemas.ts @@ -0,0 +1,3125 @@ +const _ = ""; +const _AQST = "AllQueryStringTypes"; +const _AQSTI = "AllQueryStringTypesInput"; +const _B = "Boolean"; +const _BL = "BooleanList"; +const _Bl = "Blob"; +const _By = "Byte"; +const _CAVQS = "ConstantAndVariableQueryString"; +const _CAVQSI = "ConstantAndVariableQueryStringInput"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CNED = "ComplexNestedErrorData"; +const _COD = "ClientOptionalDefaults"; +const _CQS = "ConstantQueryString"; +const _CQSI = "ConstantQueryStringInput"; +const _CT = "Content-Type"; +const _CTP = "ContentTypeParameters"; +const _CTPI = "ContentTypeParametersInput"; +const _CTPO = "ContentTypeParametersOutput"; +const _D = "Double"; +const _DBM = "DenseBooleanMap"; +const _DD = "DoubleDribble"; +const _DL = "DoubleList"; +const _DLi = "DialogList"; +const _DM = "DialogMap"; +const _DNM = "DenseNumberMap"; +const _DO = "DatetimeOffsets"; +const _DOO = "DatetimeOffsetsOutput"; +const _DSM = "DenseStringMap"; +const _DSMe = "DenseSetMap"; +const _DSMen = "DenseStructMap"; +const _DT = "DateTime"; +const _DTAMV = "DocumentTypeAsMapValue"; +const _DTAMVIO = "DocumentTypeAsMapValueInputOutput"; +const _DTAP = "DocumentTypeAsPayload"; +const _DTAPIO = "DocumentTypeAsPayloadInputOutput"; +const _DTIO = "DocumentTypeInputOutput"; +const _DTo = "DocumentType"; +const _DVM = "DocumentValuedMap"; +const _De = "Defaults"; +const _Di = "Dialog"; +const _E = "Enum"; +const _EIAEO = "EmptyInputAndEmptyOutput"; +const _EIAEOI = "EmptyInputAndEmptyOutputInput"; +const _EIAEOO = "EmptyInputAndEmptyOutputOutput"; +const _EL = "EnumList"; +const _EO = "EndpointOperation"; +const _EPI = "EnumPayloadInput"; +const _ES = "EpochSeconds"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _Em = "Empty"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FEM = "FooEnumMap"; +const _FES = "FooEnumSet"; +const _FEo = "FooError"; +const _FOO = "FOO"; +const _FS = "FractionalSeconds"; +const _FSB = "FiniteStreamingBlob"; +const _FSO = "FractionalSecondsOutput"; +const _Fa = "Farewell"; +const _Fo = "Foo"; +const _Foo = "Fooooo"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _H = "Header"; +const _HCR = "HttpChecksumRequired"; +const _HCRIO = "HttpChecksumRequiredInputOutput"; +const _HD = "HttpDate"; +const _HEP = "HttpEnumPayload"; +const _HLI = "HostLabelInput"; +const _HPH = "HttpPrefixHeaders"; +const _HPHI = "HttpPrefixHeadersInput"; +const _HPHIR = "HttpPrefixHeadersInResponse"; +const _HPHIRI = "HttpPrefixHeadersInResponseInput"; +const _HPHIRO = "HttpPrefixHeadersInResponseOutput"; +const _HPHO = "HttpPrefixHeadersOutput"; +const _HPT = "HttpPayloadTraits"; +const _HPTIO = "HttpPayloadTraitsInputOutput"; +const _HPTWMT = "HttpPayloadTraitsWithMediaType"; +const _HPTWMTIO = "HttpPayloadTraitsWithMediaTypeInputOutput"; +const _HPWS = "HttpPayloadWithStructure"; +const _HPWSIO = "HttpPayloadWithStructureInputOutput"; +const _HPWU = "HttpPayloadWithUnion"; +const _HPWUIO = "HttpPayloadWithUnionInputOutput"; +const _HRC = "HttpResponseCode"; +const _HRCO = "HttpResponseCodeOutput"; +const _HRWFL = "HttpRequestWithFloatLabels"; +const _HRWFLI = "HttpRequestWithFloatLabelsInput"; +const _HRWGLIP = "HttpRequestWithGreedyLabelInPath"; +const _HRWGLIPI = "HttpRequestWithGreedyLabelInPathInput"; +const _HRWL = "HttpRequestWithLabels"; +const _HRWLATF = "HttpRequestWithLabelsAndTimestampFormat"; +const _HRWLATFI = "HttpRequestWithLabelsAndTimestampFormatInput"; +const _HRWLI = "HttpRequestWithLabelsInput"; +const _HRWRL = "HttpRequestWithRegexLiteral"; +const _HRWRLI = "HttpRequestWithRegexLiteralInput"; +const _HSP = "HttpStringPayload"; +const _HWPO = "HostWithPathOperation"; +const _I = "Integer"; +const _IAOWH = "InputAndOutputWithHeaders"; +const _IAOWHIO = "InputAndOutputWithHeadersIO"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IEM = "IntegerEnumMap"; +const _IES = "IntegerEnumSet"; +const _IG = "InvalidGreeting"; +const _IL = "IntegerList"; +const _IQPIR = "IgnoreQueryParamsInResponse"; +const _IQPIRO = "IgnoreQueryParamsInResponseOutput"; +const _IS = "IntegerSet"; +const _JB = "JpegBlob"; +const _JBIO = "JsonBlobsInputOutput"; +const _JBs = "JsonBlobs"; +const _JE = "JsonEnums"; +const _JEIO = "JsonEnumsInputOutput"; +const _JHS = "JsonHeaderString"; +const _JIE = "JsonIntEnums"; +const _JIEIO = "JsonIntEnumsInputOutput"; +const _JL = "JsonLists"; +const _JLIO = "JsonListsInputOutput"; +const _JM = "JsonMaps"; +const _JMIO = "JsonMapsInputOutput"; +const _JT = "JsonTimestamps"; +const _JTIO = "JsonTimestampsInputOutput"; +const _JU = "JsonUnions"; +const _JV = "JsonValue"; +const _L = "Long"; +const _M = "Message"; +const _MAWB = "MalformedAcceptWithBody"; +const _MAWGS = "MalformedAcceptWithGenericString"; +const _MAWGSO = "MalformedAcceptWithGenericStringOutput"; +const _MAWP = "MalformedAcceptWithPayload"; +const _MAWPO = "MalformedAcceptWithPayloadOutput"; +const _MB = "MalformedBlob"; +const _MBI = "MalformedBlobInput"; +const _MBIa = "MalformedBooleanInput"; +const _MBIal = "MalformedByteInput"; +const _MBa = "MalformedBoolean"; +const _MBal = "MalformedByte"; +const _MCTWB = "MalformedContentTypeWithBody"; +const _MCTWBEI = "MalformedContentTypeWithoutBodyEmptyInput"; +const _MCTWBEII = "MalformedContentTypeWithoutBodyEmptyInputInput"; +const _MCTWBa = "MalformedContentTypeWithoutBody"; +const _MCTWGS = "MalformedContentTypeWithGenericString"; +const _MCTWGSI = "MalformedContentTypeWithGenericStringInput"; +const _MCTWP = "MalformedContentTypeWithPayload"; +const _MCTWPI = "MalformedContentTypeWithPayloadInput"; +const _MD = "MalformedDouble"; +const _MDI = "MalformedDoubleInput"; +const _MF = "MalformedFloat"; +const _MFI = "MalformedFloatInput"; +const _MI = "MalformedInteger"; +const _MII = "MalformedIntegerInput"; +const _ML = "MalformedList"; +const _MLI = "MalformedListInput"; +const _MLIa = "MalformedLongInput"; +const _MLa = "MalformedLong"; +const _MM = "MalformedMap"; +const _MMI = "MalformedMapInput"; +const _MRB = "MalformedRequestBody"; +const _MRBI = "MalformedRequestBodyInput"; +const _MS = "MalformedShort"; +const _MSI = "MalformedShortInput"; +const _MSIa = "MalformedStringInput"; +const _MSa = "MalformedString"; +const _MTBD = "MalformedTimestampBodyDefault"; +const _MTBDI = "MalformedTimestampBodyDefaultInput"; +const _MTBDT = "MalformedTimestampBodyDateTime"; +const _MTBDTI = "MalformedTimestampBodyDateTimeInput"; +const _MTBHD = "MalformedTimestampBodyHttpDate"; +const _MTBHDI = "MalformedTimestampBodyHttpDateInput"; +const _MTH = "MediaTypeHeader"; +const _MTHD = "MalformedTimestampHeaderDefault"; +const _MTHDI = "MalformedTimestampHeaderDefaultInput"; +const _MTHDT = "MalformedTimestampHeaderDateTime"; +const _MTHDTI = "MalformedTimestampHeaderDateTimeInput"; +const _MTHE = "MalformedTimestampHeaderEpoch"; +const _MTHEI = "MalformedTimestampHeaderEpochInput"; +const _MTHI = "MediaTypeHeaderInput"; +const _MTHO = "MediaTypeHeaderOutput"; +const _MTPD = "MalformedTimestampPathDefault"; +const _MTPDI = "MalformedTimestampPathDefaultInput"; +const _MTPE = "MalformedTimestampPathEpoch"; +const _MTPEI = "MalformedTimestampPathEpochInput"; +const _MTPHD = "MalformedTimestampPathHttpDate"; +const _MTPHDI = "MalformedTimestampPathHttpDateInput"; +const _MTQD = "MalformedTimestampQueryDefault"; +const _MTQDI = "MalformedTimestampQueryDefaultInput"; +const _MTQE = "MalformedTimestampQueryEpoch"; +const _MTQEI = "MalformedTimestampQueryEpochInput"; +const _MTQHD = "MalformedTimestampQueryHttpDate"; +const _MTQHDI = "MalformedTimestampQueryHttpDateInput"; +const _MU = "MyUnion"; +const _MUI = "MalformedUnionInput"; +const _MUa = "MalformedUnion"; +const _N = "Nested"; +const _NAEHC = "NullAndEmptyHeadersClient"; +const _NAEHIO = "NullAndEmptyHeadersIO"; +const _NAEHS = "NullAndEmptyHeadersServer"; +const _NIANO = "NoInputAndNoOutput"; +const _NIAO = "NoInputAndOutput"; +const _NIAOO = "NoInputAndOutputOutput"; +const _NP = "NestedPayload"; +const _NSL = "NestedStringList"; +const _Nu = "Null"; +const _ONSES = "OmitsNullSerializesEmptyString"; +const _ONSESI = "OmitsNullSerializesEmptyStringInput"; +const _OSEL = "OmitsSerializingEmptyLists"; +const _OSELI = "OmitsSerializingEmptyListsInput"; +const _OWD = "OperationWithDefaults"; +const _OWDI = "OperationWithDefaultsInput"; +const _OWDO = "OperationWithDefaultsOutput"; +const _OWNS = "OperationWithNestedStructure"; +const _OWNSI = "OperationWithNestedStructureInput"; +const _OWNSO = "OperationWithNestedStructureOutput"; +const _PA = "PlayerAction"; +const _PC = "PayloadConfig"; +const _PPA = "PostPlayerAction"; +const _PPAI = "PostPlayerActionInput"; +const _PPAO = "PostPlayerActionOutput"; +const _PUWJN = "PostUnionWithJsonName"; +const _PUWJNI = "PostUnionWithJsonNameInput"; +const _PUWJNO = "PostUnionWithJsonNameOutput"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _QITAF = "QueryIdempotencyTokenAutoFill"; +const _QITAFI = "QueryIdempotencyTokenAutoFillInput"; +const _QP = "QueryPrecedence"; +const _QPASLM = "QueryParamsAsStringListMap"; +const _QPASLMI = "QueryParamsAsStringListMapInput"; +const _QPI = "QueryPrecedenceInput"; +const _RCHF = "ResponseCodeHttpFallback"; +const _RCHFIO = "ResponseCodeHttpFallbackInputOutput"; +const _RCR = "ResponseCodeRequired"; +const _RCRO = "ResponseCodeRequiredOutput"; +const _RS = "RecursiveShapes"; +const _RSIO = "RecursiveShapesInputOutput"; +const _RSION = "RecursiveShapesInputOutputNested1"; +const _RSIONe = "RecursiveShapesInputOutputNested2"; +const _S = "String"; +const _SB = "StreamingBlob"; +const _SBM = "SparseBooleanMap"; +const _SE = "StringEnum"; +const _SJL = "SparseJsonLists"; +const _SJLIO = "SparseJsonListsInputOutput"; +const _SJM = "SparseJsonMaps"; +const _SJMIO = "SparseJsonMapsInputOutput"; +const _SL = "StringList"; +const _SLM = "StringListMap"; +const _SLMt = "StructureListMember"; +const _SLi = "SimpleList"; +const _SLt = "StructureList"; +const _SM = "StringMap"; +const _SMi = "SimpleMap"; +const _SNM = "SparseNumberMap"; +const _SPI = "StringPayloadInput"; +const _SS = "StringSet"; +const _SSL = "SparseStringList"; +const _SSLp = "SparseShortList"; +const _SSM = "SparseStringMap"; +const _SSMp = "SparseSetMap"; +const _SSMpa = "SparseStructMap"; +const _SSP = "SimpleScalarProperties"; +const _SSPIO = "SimpleScalarPropertiesInputOutput"; +const _ST = "StreamingTraits"; +const _STIO = "StreamingTraitsInputOutput"; +const _STPB = "StreamingTextPlainBlob"; +const _STRL = "StreamingTraitsRequireLength"; +const _STRLI = "StreamingTraitsRequireLengthInput"; +const _STWMT = "StreamingTraitsWithMediaType"; +const _STWMTIO = "StreamingTraitsWithMediaTypeInputOutput"; +const _SU = "SimpleUnion"; +const _Sh = "Short"; +const _St = "Status"; +const _T = "Timestamp"; +const _TBS = "TestBodyStructure"; +const _TBSIO = "TestBodyStructureInputOutput"; +const _TC = "TestConfig"; +const _TE = "TestEnum"; +const _TFH = "TimestampFormatHeaders"; +const _TFHIO = "TimestampFormatHeadersIO"; +const _TGNINP = "TestGetNoInputNoPayload"; +const _TGNP = "TestGetNoPayload"; +const _TIE = "TestIntEnum"; +const _TL = "TimestampList"; +const _TLo = "TopLevel"; +const _TNPIO = "TestNoPayloadInputOutput"; +const _TPB = "TextPlainBlob"; +const _TPBIO = "TestPayloadBlobInputOutput"; +const _TPBe = "TestPayloadBlob"; +const _TPNINP = "TestPostNoInputNoPayload"; +const _TPNP = "TestPostNoPayload"; +const _TPS = "TestPayloadStructure"; +const _TPSIO = "TestPayloadStructureInputOutput"; +const _TSL = "TestStringList"; +const _TSM = "TestStringMap"; +const _UIAO = "UnitInputAndOutput"; +const _UIO = "UnionInputOutput"; +const _UP = "UnionPayload"; +const _UWJN = "UnionWithJsonName"; +const _XA = "X-A"; +const _XATI = "X-Amz-Test-Id"; +const _XB = "X-Byte"; +const _XB_ = "X-Boolean1"; +const _XB__ = "X-Boolean2"; +const _XB___ = "X-BooleanList"; +const _XB____ = "X-B"; +const _XC = "X-C"; +const _XD = "X-Double"; +const _XE = "X-Enum"; +const _XE_ = "X-EnumList"; +const _XF = "X-Foo"; +const _XF_ = "X-Float"; +const _XG = "X-Greeting"; +const _XH = "X-Header"; +const _XI = "X-Integer"; +const _XI_ = "X-IntegerList"; +const _XI__ = "X-IntegerEnum"; +const _XI___ = "X-IntegerEnumList"; +const _XJ = "X-Json"; +const _XL = "X-Long"; +const _XS = "X-String"; +const _XS_ = "X-Short"; +const _XS__ = "X-StringList"; +const _XS___ = "X-StringSet"; +const _XT = "X-TimestampList"; +const _Xd = "X-defaultFormat"; +const _Xm = "X-memberEpochSeconds"; +const _Xm_ = "X-memberHttpDate"; +const _Xm__ = "X-memberDateTime"; +const _Xt = "X-targetEpochSeconds"; +const _Xt_ = "X-targetHttpDate"; +const _Xt__ = "X-targetDateTime"; +const _a = "application/json"; +const _a_ = "a"; +const _ac = "action"; +const _amth = "amz-media-typed-header"; +const _b = "baz"; +const _bIB = "booleanInBody"; +const _bIBy = "byteInBody"; +const _bIH = "booleanInHeader"; +const _bIHy = "byteInHeader"; +const _bIP = "booleanInPath"; +const _bIPy = "byteInPath"; +const _bIQ = "booleanInQuery"; +const _bIQy = "byteInQuery"; +const _bL = "booleanList"; +const _bLo = "bodyList"; +const _bM = "bodyMap"; +const _bV = "byteValue"; +const _bVl = "blobValue"; +const _bVo = "booleanValue"; +const _b_ = "b"; +const _ba = "bar"; +const _baz = "_baz"; +const _bl = "blob"; +const _bo = "boolean"; +const _c = "client"; +const _cOD = "clientOptionalDefaults"; +const _cT = "contentType"; +const _c_ = "c"; +const _co = "corge"; +const _con = "contents"; +const _d = "datetime"; +const _dB = "defaultBoolean"; +const _dBM = "denseBooleanMap"; +const _dBe = "defaultBlob"; +const _dBef = "defaultByte"; +const _dD = "defaultDouble"; +const _dDB = "defaultDocumentBoolean"; +const _dDL = "defaultDocumentList"; +const _dDM = "defaultDocumentMap"; +const _dDS = "defaultDocumentString"; +const _dE = "defaultEnum"; +const _dF = "defaultFloat"; +const _dFe = "defaultFormat"; +const _dI = "defaultInteger"; +const _dIB = "doubleInBody"; +const _dIE = "defaultIntEnum"; +const _dIH = "doubleInHeader"; +const _dIP = "doubleInPath"; +const _dIQ = "doubleInQuery"; +const _dL = "defaultList"; +const _dLe = "defaultLong"; +const _dLi = "dialogList"; +const _dM = "defaultMap"; +const _dMi = "dialogMap"; +const _dND = "defaultNullDocument"; +const _dNM = "denseNumberMap"; +const _dS = "defaultString"; +const _dSM = "denseStructMap"; +const _dSMe = "denseStringMap"; +const _dSMen = "denseSetMap"; +const _dSe = "defaultShort"; +const _dT = "defaultTimestamp"; +const _dTOT = "dateTimeOnTarget"; +const _dTa = "dateTime"; +const _dV = "documentValue"; +const _dVM = "docValuedMap"; +const _dVo = "doubleValue"; +const _da = "data"; +const _de = "defaults"; +const _di = "dialog"; +const _do = "double"; +const _e = "error"; +const _eB = "emptyBlob"; +const _eL = "enumList"; +const _eS = "emptyString"; +const _eSOT = "epochSecondsOnTarget"; +const _eSp = "epochSeconds"; +const _eV = "enumValue"; +const _en = "encoding"; +const _end = "endpoint"; +const _f = "farewell"; +const _fB = "falseBoolean"; +const _fBV = "falseBooleanValue"; +const _fE = "fooEnum1"; +const _fEL = "fooEnumList"; +const _fEM = "fooEnumMap"; +const _fES = "fooEnumSet"; +const _fEo = "fooEnum2"; +const _fEoo = "fooEnum3"; +const _fIB = "floatInBody"; +const _fIH = "floatInHeader"; +const _fIP = "floatInPath"; +const _fIQ = "floatInQuery"; +const _fM = "fooMap"; +const _fV = "floatValue"; +const _fl = "float"; +const _fo = "foo"; +const _g = "greeting"; +const _h = "hello"; +const _hB = "headerByte"; +const _hBL = "headerBooleanList"; +const _hD = "headerDouble"; +const _hDOT = "httpDateOnTarget"; +const _hDt = "httpDate"; +const _hE = "httpError"; +const _hEL = "headerEnumList"; +const _hEe = "headerEnum"; +const _hF = "headerFloat"; +const _hFB = "headerFalseBool"; +const _hH = "httpHeader"; +const _hI = "headerInteger"; +const _hIE = "headerIntegerEnum"; +const _hIEL = "headerIntegerEnumList"; +const _hIL = "headerIntegerList"; +const _hL = "hostLabel"; +const _hLe = "headerLong"; +const _hPH = "httpPrefixHeaders"; +const _hQ = "httpQuery"; +const _hS = "headerString"; +const _hSL = "headerStringList"; +const _hSS = "headerStringSet"; +const _hSe = "headerShort"; +const _hTB = "headerTrueBool"; +const _hTL = "headerTimestampList"; +const _he = "header"; +const _hi = "hi"; +const _ht = "http"; +const _i = "image/jpeg"; +const _iE = "integerEnum1"; +const _iEL = "integerEnumList"; +const _iELn = "intEnumList"; +const _iEM = "integerEnumMap"; +const _iES = "integerEnumSet"; +const _iEn = "integerEnum2"; +const _iEnt = "integerEnum3"; +const _iIB = "integerInBody"; +const _iIH = "integerInHeader"; +const _iIP = "integerInPath"; +const _iIQ = "integerInQuery"; +const _iL = "integerList"; +const _iT = "idempotencyToken"; +const _iV = "integerValue"; +const _in = "integer"; +const _int = "int"; +const _j = "json"; +const _jN = "jsonName"; +const _l = "language"; +const _lIB = "longInBody"; +const _lIH = "longInHeader"; +const _lIP = "longInPath"; +const _lIQ = "longInQuery"; +const _lV = "longValue"; +const _lVi = "listValue"; +const _la = "label"; +const _lo = "long"; +const _m = "member"; +const _mDT = "memberDateTime"; +const _mES = "memberEpochSeconds"; +const _mHD = "memberHttpDate"; +const _mS = "maybeSet"; +const _mSL = "myStructureList"; +const _mT = "mediaType"; +const _mV = "mapValue"; +const _n = "nested"; +const _nSL = "nestedStringList"; +const _nV = "nullValue"; +const _nVu = "numberValue"; +const _na = "name"; +const _no = "normal"; +const _o = "other"; +const _oTLD = "otherTopLevelDefault"; +const _p = "payload"; +const _pC = "payloadConfig"; +const _pH = "prefixHeaders"; +const _ph = "phrase"; +const _q = "qux"; +const _qB = "queryByte"; +const _qBL = "queryBooleanList"; +const _qBu = "queryBoolean"; +const _qD = "queryDouble"; +const _qDL = "queryDoubleList"; +const _qE = "queryEnum"; +const _qEL = "queryEnumList"; +const _qF = "queryFloat"; +const _qI = "queryInteger"; +const _qIE = "queryIntegerEnum"; +const _qIEL = "queryIntegerEnumList"; +const _qIL = "queryIntegerList"; +const _qIS = "queryIntegerSet"; +const _qL = "queryLong"; +const _qPMOSL = "queryParamsMapOfStringList"; +const _qS = "queryString"; +const _qSL = "queryStringList"; +const _qSS = "queryStringSet"; +const _qSu = "queryShort"; +const _qT = "queryTimestamp"; +const _qTL = "queryTimestampList"; +const _qu = "quit"; +const _rC = "responseCode"; +const _rL = "requiresLength"; +const _rM = "recursiveMember"; +const _rSV = "renamedStructureValue"; +const _s = "streaming"; +const _sBM = "sparseBooleanMap"; +const _sIB = "shortInBody"; +const _sIH = "shortInHeader"; +const _sIP = "shortInPath"; +const _sIQ = "shortInQuery"; +const _sL = "stringList"; +const _sLt = "structureList"; +const _sNM = "sparseNumberMap"; +const _sS = "stringSet"; +const _sSL = "sparseStringList"; +const _sSLp = "sparseShortList"; +const _sSM = "sparseStructMap"; +const _sSMp = "sparseStringMap"; +const _sSMpa = "sparseSetMap"; +const _sV = "stringValue"; +const _sVh = "shortValue"; +const _sVt = "structureValue"; +const _sa = "salutation"; +const _se = "server"; +const _sh = "short"; +const _sp = "sparse"; +const _st = "string"; +const _str = "str"; +const _t = "text/plain"; +const _tBV = "trueBooleanValue"; +const _tC = "testConfig"; +const _tDT = "targetDateTime"; +const _tES = "targetEpochSeconds"; +const _tHD = "targetHttpDate"; +const _tI = "testId"; +const _tL = "timestampList"; +const _tLD = "topLevelDefault"; +const _tLo = "topLevel"; +const _tV = "timestampValue"; +const _ti = "timestamp"; +const _tim = "timeout"; +const _to = "token"; +const _u = "union"; +const _v = "value"; +const _xati = "x-amz-test-id"; +const _xf = "x-foo"; +const _xf_ = "x-foo-"; +const _zB = "zeroByte"; +const _zD = "zeroDouble"; +const _zF = "zeroFloat"; +const _zI = "zeroInteger"; +const _zL = "zeroLong"; +const _zS = "zeroShort"; +const n0 = "aws.protocoltests.restjson"; +const n1 = "aws.protocoltests.shared"; +const n2 = "aws.protocoltests.restjson.nested"; + +// smithy-typescript generated code +import { error, list, map, op, sim, struct, struct as uni } from "@smithy/core/schema"; + +import { + ComplexError as __ComplexError, + FooError as __FooError, + InvalidGreeting as __InvalidGreeting, +} from "../models/index"; +import { RestJsonProtocolServiceException as __RestJsonProtocolServiceException } from "../models/RestJsonProtocolServiceException"; + +/* eslint no-var: 0 */ + +export var FiniteStreamingBlob = sim(n0, _FSB, 42, { + [_rL]: 1, + [_s]: 1, +}); +export var JsonHeaderString = sim(n0, _JHS, 0, { + [_mT]: _a, +}); +export var JsonValue = sim(n0, _JV, 0, { + [_mT]: _a, +}); +export var StreamingBlob = sim(n0, _SB, 42, { + [_s]: 1, +}); +export var StreamingTextPlainBlob = sim(n0, _STPB, 42, { + [_mT]: _t, + [_s]: 1, +}); +export var JpegBlob = sim(n1, _JB, 21, { + [_mT]: _i, +}); +export var TextPlainBlob = sim(n1, _TPB, 21, { + [_mT]: _t, +}); +export var AllQueryStringTypesInput = struct( + n0, + _AQSTI, + 0, + [ + _qS, + _qSL, + _qSS, + _qB, + _qSu, + _qI, + _qIL, + _qIS, + _qL, + _qF, + _qD, + _qDL, + _qBu, + _qBL, + _qT, + _qTL, + _qE, + _qEL, + _qIE, + _qIEL, + _qPMOSL, + ], + [ + [ + 0, + { + [_hQ]: _S, + }, + ], + [ + 64 | 0, + { + [_hQ]: _SL, + }, + ], + [ + 64 | 0, + { + [_hQ]: _SS, + }, + ], + [ + 1, + { + [_hQ]: _By, + }, + ], + [ + 1, + { + [_hQ]: _Sh, + }, + ], + [ + 1, + { + [_hQ]: _I, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IL, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IS, + }, + ], + [ + 1, + { + [_hQ]: _L, + }, + ], + [ + 1, + { + [_hQ]: _F, + }, + ], + [ + 1, + { + [_hQ]: _D, + }, + ], + [ + 64 | 1, + { + [_hQ]: _DL, + }, + ], + [ + 2, + { + [_hQ]: _B, + }, + ], + [ + 64 | 2, + { + [_hQ]: _BL, + }, + ], + [ + 4, + { + [_hQ]: _T, + }, + ], + [ + 64 | 4, + { + [_hQ]: _TL, + }, + ], + [ + 0, + { + [_hQ]: _E, + }, + ], + [ + 64 | 0, + { + [_hQ]: _EL, + }, + ], + [ + 1, + { + [_hQ]: _IE, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IEL, + }, + ], + [map(n1, _SLM, 0, 0, 64 | 0), 64], + ] +); +export var ClientOptionalDefaults = struct(n0, _COD, 0, [_m], [1]); +export var ComplexError = error( + n0, + _CE, + { + [_e]: _c, + [_hE]: 403, + }, + [_H, _TLo, _N], + [ + [ + 0, + { + [_hH]: _XH, + }, + ], + 0, + [() => ComplexNestedErrorData, 0], + ], + + __ComplexError +); +export var ComplexNestedErrorData = struct( + n0, + _CNED, + 0, + [_Fo], + [ + [ + 0, + { + [_jN]: _Foo, + }, + ], + ] +); +export var ConstantAndVariableQueryStringInput = struct( + n0, + _CAVQSI, + 0, + [_b, _mS], + [ + [ + 0, + { + [_hQ]: _b, + }, + ], + [ + 0, + { + [_hQ]: _mS, + }, + ], + ] +); +export var ConstantQueryStringInput = struct(n0, _CQSI, 0, [_h], [[0, 1]]); +export var ContentTypeParametersInput = struct(n0, _CTPI, 0, [_v], [1]); +export var ContentTypeParametersOutput = struct(n0, _CTPO, 0, [], []); +export var DatetimeOffsetsOutput = struct(n0, _DOO, 0, [_d], [5]); +export var Defaults = struct( + n0, + _De, + 0, + [ + _dS, + _dB, + _dL, + _dDM, + _dDS, + _dDB, + _dDL, + _dND, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 15, 15, 15, 15, 15, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var Dialog = struct(n0, _Di, 0, [_l, _g, _f], [0, 0, () => Farewell]); +export var DocumentTypeAsMapValueInputOutput = struct(n0, _DTAMVIO, 0, [_dVM], [128 | 15]); +export var DocumentTypeAsPayloadInputOutput = struct(n0, _DTAPIO, 0, [_dV], [[15, 16]]); +export var DocumentTypeInputOutput = struct(n0, _DTIO, 0, [_sV, _dV], [0, 15]); +export var EmptyInputAndEmptyOutputInput = struct(n0, _EIAEOI, 0, [], []); +export var EmptyInputAndEmptyOutputOutput = struct(n0, _EIAEOO, 0, [], []); +export var EnumPayloadInput = struct(n0, _EPI, 0, [_p], [[0, 16]]); +export var Farewell = struct(n0, _Fa, 0, [_ph], [0]); +export var FooError = error( + n0, + _FEo, + { + [_e]: _se, + [_hE]: 500, + }, + [], + [], + + __FooError +); +export var FractionalSecondsOutput = struct(n0, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct( + n0, + _GWEO, + 0, + [_g], + [ + [ + 0, + { + [_hH]: _XG, + }, + ], + ] +); +export var HostLabelInput = struct( + n0, + _HLI, + 0, + [_la], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var HttpChecksumRequiredInputOutput = struct(n0, _HCRIO, 0, [_fo], [0]); +export var HttpPayloadTraitsInputOutput = struct( + n0, + _HPTIO, + 0, + [_fo, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [21, 16], + ] +); +export var HttpPayloadTraitsWithMediaTypeInputOutput = struct( + n0, + _HPTWMTIO, + 0, + [_fo, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [() => TextPlainBlob, 16], + ] +); +export var HttpPayloadWithStructureInputOutput = struct(n0, _HPWSIO, 0, [_n], [[() => NestedPayload, 16]]); +export var HttpPayloadWithUnionInputOutput = struct(n0, _HPWUIO, 0, [_n], [[() => UnionPayload, 16]]); +export var HttpPrefixHeadersInput = struct( + n0, + _HPHI, + 0, + [_fo, _fM], + [ + [ + 0, + { + [_hH]: _xf, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xf_, + }, + ], + ] +); +export var HttpPrefixHeadersInResponseInput = struct(n0, _HPHIRI, 0, [], []); +export var HttpPrefixHeadersInResponseOutput = struct( + n0, + _HPHIRO, + 0, + [_pH], + [ + [ + 128 | 0, + { + [_hPH]: _, + }, + ], + ] +); +export var HttpPrefixHeadersOutput = struct( + n0, + _HPHO, + 0, + [_fo, _fM], + [ + [ + 0, + { + [_hH]: _xf, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xf_, + }, + ], + ] +); +export var HttpRequestWithFloatLabelsInput = struct( + n0, + _HRWFLI, + 0, + [_fl, _do], + [ + [1, 1], + [1, 1], + ] +); +export var HttpRequestWithGreedyLabelInPathInput = struct( + n0, + _HRWGLIPI, + 0, + [_fo, _b], + [ + [0, 1], + [0, 1], + ] +); +export var HttpRequestWithLabelsAndTimestampFormatInput = struct( + n0, + _HRWLATFI, + 0, + [_mES, _mHD, _mDT, _dFe, _tES, _tHD, _tDT], + [ + [7, 1], + [6, 1], + [5, 1], + [4, 1], + [7, 1], + [6, 1], + [5, 1], + ] +); +export var HttpRequestWithLabelsInput = struct( + n0, + _HRWLI, + 0, + [_st, _sh, _in, _lo, _fl, _do, _bo, _ti], + [ + [0, 1], + [1, 1], + [1, 1], + [1, 1], + [1, 1], + [1, 1], + [2, 1], + [4, 1], + ] +); +export var HttpRequestWithRegexLiteralInput = struct(n0, _HRWRLI, 0, [_str], [[0, 1]]); +export var HttpResponseCodeOutput = struct(n0, _HRCO, 0, [_St], [[1, 32]]); +export var IgnoreQueryParamsInResponseOutput = struct( + n0, + _IQPIRO, + 0, + [_b], + [ + [ + 0, + { + [_hQ]: _b, + }, + ], + ] +); +export var InputAndOutputWithHeadersIO = struct( + n0, + _IAOWHIO, + 0, + [_hS, _hB, _hSe, _hI, _hLe, _hF, _hD, _hTB, _hFB, _hSL, _hSS, _hIL, _hBL, _hTL, _hEe, _hEL, _hIE, _hIEL], + [ + [ + 0, + { + [_hH]: _XS, + }, + ], + [ + 1, + { + [_hH]: _XB, + }, + ], + [ + 1, + { + [_hH]: _XS_, + }, + ], + [ + 1, + { + [_hH]: _XI, + }, + ], + [ + 1, + { + [_hH]: _XL, + }, + ], + [ + 1, + { + [_hH]: _XF_, + }, + ], + [ + 1, + { + [_hH]: _XD, + }, + ], + [ + 2, + { + [_hH]: _XB_, + }, + ], + [ + 2, + { + [_hH]: _XB__, + }, + ], + [ + 64 | 0, + { + [_hH]: _XS__, + }, + ], + [ + 64 | 0, + { + [_hH]: _XS___, + }, + ], + [ + 64 | 1, + { + [_hH]: _XI_, + }, + ], + [ + 64 | 2, + { + [_hH]: _XB___, + }, + ], + [ + 64 | 4, + { + [_hH]: _XT, + }, + ], + [ + 0, + { + [_hH]: _XE, + }, + ], + [ + 64 | 0, + { + [_hH]: _XE_, + }, + ], + [ + 1, + { + [_hH]: _XI__, + }, + ], + [ + 64 | 1, + { + [_hH]: _XI___, + }, + ], + ] +); +export var InvalidGreeting = error( + n0, + _IG, + { + [_e]: _c, + [_hE]: 400, + }, + [_M], + [0], + + __InvalidGreeting +); +export var JsonBlobsInputOutput = struct(n0, _JBIO, 0, [_da], [21]); +export var JsonEnumsInputOutput = struct( + n0, + _JEIO, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var JsonIntEnumsInputOutput = struct( + n0, + _JIEIO, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var JsonListsInputOutput = struct( + n0, + _JLIO, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iELn, _nSL, _sLt], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n1, _NSL, 0, 64 | 0), + [ + () => StructureList, + { + [_jN]: _mSL, + }, + ], + ] +); +export var JsonMapsInputOutput = struct( + n0, + _JMIO, + 0, + [_dSM, _dNM, _dBM, _dSMe, _dSMen], + [() => DenseStructMap, 128 | 1, 128 | 2, 128 | 0, map(n0, _DSMe, 0, 0, 64 | 0)] +); +export var JsonTimestampsInputOutput = struct( + n0, + _JTIO, + 0, + [_no, _dTa, _dTOT, _eSp, _eSOT, _hDt, _hDOT], + [4, 5, 5, 7, 7, 6, 6] +); +export var MalformedAcceptWithGenericStringOutput = struct(n0, _MAWGSO, 0, [_p], [[0, 16]]); +export var MalformedAcceptWithPayloadOutput = struct(n0, _MAWPO, 0, [_p], [[() => JpegBlob, 16]]); +export var MalformedBlobInput = struct(n0, _MBI, 0, [_bl], [21]); +export var MalformedBooleanInput = struct( + n0, + _MBIa, + 0, + [_bIB, _bIP, _bIQ, _bIH], + [ + 2, + [2, 1], + [ + 2, + { + [_hQ]: _bIQ, + }, + ], + [ + 2, + { + [_hH]: _bIH, + }, + ], + ] +); +export var MalformedByteInput = struct( + n0, + _MBIal, + 0, + [_bIBy, _bIPy, _bIQy, _bIHy], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _bIQy, + }, + ], + [ + 1, + { + [_hH]: _bIHy, + }, + ], + ] +); +export var MalformedContentTypeWithGenericStringInput = struct(n0, _MCTWGSI, 0, [_p], [[0, 16]]); +export var MalformedContentTypeWithoutBodyEmptyInputInput = struct( + n0, + _MCTWBEII, + 0, + [_he], + [ + [ + 0, + { + [_hH]: _he, + }, + ], + ] +); +export var MalformedContentTypeWithPayloadInput = struct(n0, _MCTWPI, 0, [_p], [[() => JpegBlob, 16]]); +export var MalformedDoubleInput = struct( + n0, + _MDI, + 0, + [_dIB, _dIP, _dIQ, _dIH], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _dIQ, + }, + ], + [ + 1, + { + [_hH]: _dIH, + }, + ], + ] +); +export var MalformedFloatInput = struct( + n0, + _MFI, + 0, + [_fIB, _fIP, _fIQ, _fIH], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _fIQ, + }, + ], + [ + 1, + { + [_hH]: _fIH, + }, + ], + ] +); +export var MalformedIntegerInput = struct( + n0, + _MII, + 0, + [_iIB, _iIP, _iIQ, _iIH], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _iIQ, + }, + ], + [ + 1, + { + [_hH]: _iIH, + }, + ], + ] +); +export var MalformedListInput = struct(n0, _MLI, 0, [_bLo], [64 | 0]); +export var MalformedLongInput = struct( + n0, + _MLIa, + 0, + [_lIB, _lIP, _lIQ, _lIH], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _lIQ, + }, + ], + [ + 1, + { + [_hH]: _lIH, + }, + ], + ] +); +export var MalformedMapInput = struct(n0, _MMI, 0, [_bM], [128 | 0]); +export var MalformedRequestBodyInput = struct(n0, _MRBI, 0, [_int, _fl], [1, 1]); +export var MalformedShortInput = struct( + n0, + _MSI, + 0, + [_sIB, _sIP, _sIQ, _sIH], + [ + 1, + [1, 1], + [ + 1, + { + [_hQ]: _sIQ, + }, + ], + [ + 1, + { + [_hH]: _sIH, + }, + ], + ] +); +export var MalformedStringInput = struct( + n0, + _MSIa, + 0, + [_bl], + [ + [ + () => JsonHeaderString, + { + [_hH]: _amth, + }, + ], + ] +); +export var MalformedTimestampBodyDateTimeInput = struct(n0, _MTBDTI, 0, [_ti], [5]); +export var MalformedTimestampBodyDefaultInput = struct(n0, _MTBDI, 0, [_ti], [4]); +export var MalformedTimestampBodyHttpDateInput = struct(n0, _MTBHDI, 0, [_ti], [6]); +export var MalformedTimestampHeaderDateTimeInput = struct( + n0, + _MTHDTI, + 0, + [_ti], + [ + [ + 5, + { + [_hH]: _ti, + }, + ], + ] +); +export var MalformedTimestampHeaderDefaultInput = struct( + n0, + _MTHDI, + 0, + [_ti], + [ + [ + 4, + { + [_hH]: _ti, + }, + ], + ] +); +export var MalformedTimestampHeaderEpochInput = struct( + n0, + _MTHEI, + 0, + [_ti], + [ + [ + 7, + { + [_hH]: _ti, + }, + ], + ] +); +export var MalformedTimestampPathDefaultInput = struct(n0, _MTPDI, 0, [_ti], [[4, 1]]); +export var MalformedTimestampPathEpochInput = struct(n0, _MTPEI, 0, [_ti], [[7, 1]]); +export var MalformedTimestampPathHttpDateInput = struct(n0, _MTPHDI, 0, [_ti], [[6, 1]]); +export var MalformedTimestampQueryDefaultInput = struct( + n0, + _MTQDI, + 0, + [_ti], + [ + [ + 4, + { + [_hQ]: _ti, + }, + ], + ] +); +export var MalformedTimestampQueryEpochInput = struct( + n0, + _MTQEI, + 0, + [_ti], + [ + [ + 7, + { + [_hQ]: _ti, + }, + ], + ] +); +export var MalformedTimestampQueryHttpDateInput = struct( + n0, + _MTQHDI, + 0, + [_ti], + [ + [ + 6, + { + [_hQ]: _ti, + }, + ], + ] +); +export var MalformedUnionInput = struct(n0, _MUI, 0, [_u], [() => SimpleUnion]); +export var MediaTypeHeaderInput = struct( + n0, + _MTHI, + 0, + [_j], + [ + [ + () => JsonValue, + { + [_hH]: _XJ, + }, + ], + ] +); +export var MediaTypeHeaderOutput = struct( + n0, + _MTHO, + 0, + [_j], + [ + [ + () => JsonValue, + { + [_hH]: _XJ, + }, + ], + ] +); +export var NestedPayload = struct(n0, _NP, 0, [_g, _na], [0, 0]); +export var NoInputAndOutputOutput = struct(n0, _NIAOO, 0, [], []); +export var NullAndEmptyHeadersIO = struct( + n0, + _NAEHIO, + 0, + [_a_, _b_, _c_], + [ + [ + 0, + { + [_hH]: _XA, + }, + ], + [ + 0, + { + [_hH]: _XB____, + }, + ], + [ + 64 | 0, + { + [_hH]: _XC, + }, + ], + ] +); +export var OmitsNullSerializesEmptyStringInput = struct( + n0, + _ONSESI, + 0, + [_nV, _eS], + [ + [ + 0, + { + [_hQ]: _Nu, + }, + ], + [ + 0, + { + [_hQ]: _Em, + }, + ], + ] +); +export var OmitsSerializingEmptyListsInput = struct( + n0, + _OSELI, + 0, + [_qSL, _qIL, _qDL, _qBL, _qTL, _qEL, _qIEL], + [ + [ + 64 | 0, + { + [_hQ]: _SL, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IL, + }, + ], + [ + 64 | 1, + { + [_hQ]: _DL, + }, + ], + [ + 64 | 2, + { + [_hQ]: _BL, + }, + ], + [ + 64 | 4, + { + [_hQ]: _TL, + }, + ], + [ + 64 | 0, + { + [_hQ]: _EL, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IEL, + }, + ], + ] +); +export var OperationWithDefaultsInput = struct( + n0, + _OWDI, + 0, + [_de, _cOD, _tLD, _oTLD], + [() => Defaults, () => ClientOptionalDefaults, 0, 1] +); +export var OperationWithDefaultsOutput = struct( + n0, + _OWDO, + 0, + [ + _dS, + _dB, + _dL, + _dDM, + _dDS, + _dDB, + _dDL, + _dND, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 15, 15, 15, 15, 15, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var OperationWithNestedStructureInput = struct(n0, _OWNSI, 0, [_tLo], [() => TopLevel]); +export var OperationWithNestedStructureOutput = struct( + n0, + _OWNSO, + 0, + [_di, _dLi, _dMi], + [() => Dialog, () => DialogList, () => DialogMap] +); +export var PayloadConfig = struct(n0, _PC, 0, [_da], [1]); +export var PostPlayerActionInput = struct(n0, _PPAI, 0, [_ac], [() => PlayerAction]); +export var PostPlayerActionOutput = struct(n0, _PPAO, 0, [_ac], [() => PlayerAction]); +export var PostUnionWithJsonNameInput = struct(n0, _PUWJNI, 0, [_v], [[() => UnionWithJsonName, 0]]); +export var PostUnionWithJsonNameOutput = struct(n0, _PUWJNO, 0, [_v], [[() => UnionWithJsonName, 0]]); +export var PutWithContentEncodingInput = struct( + n0, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var QueryIdempotencyTokenAutoFillInput = struct( + n0, + _QITAFI, + 0, + [_to], + [ + [ + 0, + { + [_iT]: 1, + [_hQ]: _to, + }, + ], + ] +); +export var QueryParamsAsStringListMapInput = struct( + n0, + _QPASLMI, + 0, + [_q, _fo], + [ + [ + 0, + { + [_hQ]: _co, + }, + ], + [map(n1, _SLM, 0, 0, 64 | 0), 64], + ] +); +export var QueryPrecedenceInput = struct( + n0, + _QPI, + 0, + [_fo, _b], + [ + [ + 0, + { + [_hQ]: _ba, + }, + ], + [128 | 0, 64], + ] +); +export var RecursiveShapesInputOutput = struct(n0, _RSIO, 0, [_n], [() => RecursiveShapesInputOutputNested1]); +export var RecursiveShapesInputOutputNested1 = struct( + n0, + _RSION, + 0, + [_fo, _n], + [0, () => RecursiveShapesInputOutputNested2] +); +export var RecursiveShapesInputOutputNested2 = struct( + n0, + _RSIONe, + 0, + [_ba, _rM], + [0, () => RecursiveShapesInputOutputNested1] +); +export var ResponseCodeHttpFallbackInputOutput = struct(n0, _RCHFIO, 0, [], []); +export var ResponseCodeRequiredOutput = struct(n0, _RCRO, 0, [_rC], [[1, 32]]); +export var SimpleScalarPropertiesInputOutput = struct( + n0, + _SSPIO, + 0, + [_fo, _sV, _tBV, _fBV, _bV, _sVh, _iV, _lV, _fV, _dVo], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + 0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + [ + 1, + { + [_jN]: _DD, + }, + ], + ] +); +export var SparseJsonListsInputOutput = struct( + n0, + _SJLIO, + 0, + [_sSL, _sSLp], + [ + [() => SparseStringList, 0], + [() => SparseShortList, 0], + ] +); +export var SparseJsonMapsInputOutput = struct( + n0, + _SJMIO, + 0, + [_sSM, _sNM, _sBM, _sSMp, _sSMpa], + [ + [() => SparseStructMap, 0], + [() => SparseNumberMap, 0], + [() => SparseBooleanMap, 0], + [() => SparseStringMap, 0], + [() => SparseSetMap, 0], + ] +); +export var StreamingTraitsInputOutput = struct( + n0, + _STIO, + 0, + [_fo, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [() => StreamingBlob, 16], + ] +); +export var StreamingTraitsRequireLengthInput = struct( + n0, + _STRLI, + 0, + [_fo, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [() => FiniteStreamingBlob, 16], + ] +); +export var StreamingTraitsWithMediaTypeInputOutput = struct( + n0, + _STWMTIO, + 0, + [_fo, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [() => StreamingTextPlainBlob, 16], + ] +); +export var StringPayloadInput = struct(n0, _SPI, 0, [_p], [[0, 16]]); +export var StructureListMember = struct( + n0, + _SLMt, + 0, + [_a_, _b_], + [ + [ + 0, + { + [_jN]: _v, + }, + ], + [ + 0, + { + [_jN]: _o, + }, + ], + ] +); +export var TestBodyStructureInputOutput = struct( + n0, + _TBSIO, + 0, + [_tI, _tC], + [ + [ + 0, + { + [_hH]: _xati, + }, + ], + () => TestConfig, + ] +); +export var TestConfig = struct(n0, _TC, 0, [_tim], [1]); +export var TestNoPayloadInputOutput = struct( + n0, + _TNPIO, + 0, + [_tI], + [ + [ + 0, + { + [_hH]: _XATI, + }, + ], + ] +); +export var TestPayloadBlobInputOutput = struct( + n0, + _TPBIO, + 0, + [_cT, _da], + [ + [ + 0, + { + [_hH]: _CT, + }, + ], + [21, 16], + ] +); +export var TestPayloadStructureInputOutput = struct( + n0, + _TPSIO, + 0, + [_tI, _pC], + [ + [ + 0, + { + [_hH]: _xati, + }, + ], + [() => PayloadConfig, 16], + ] +); +export var TimestampFormatHeadersIO = struct( + n0, + _TFHIO, + 0, + [_mES, _mHD, _mDT, _dFe, _tES, _tHD, _tDT], + [ + [ + 7, + { + [_hH]: _Xm, + }, + ], + [ + 6, + { + [_hH]: _Xm_, + }, + ], + [ + 5, + { + [_hH]: _Xm__, + }, + ], + [ + 4, + { + [_hH]: _Xd, + }, + ], + [ + 7, + { + [_hH]: _Xt, + }, + ], + [ + 6, + { + [_hH]: _Xt_, + }, + ], + [ + 5, + { + [_hH]: _Xt__, + }, + ], + ] +); +export var TopLevel = struct(n0, _TLo, 0, [_di, _dLi, _dMi], [() => Dialog, () => DialogList, () => DialogMap]); +export var UnionInputOutput = struct(n0, _UIO, 0, [_con], [() => MyUnion]); +export var GreetingStruct_n2 = struct(n2, _GS, 0, [_sa], [0]); +export var GreetingStruct = struct(n1, _GS, 0, [_hi], [0]); +export var Unit = "unit" as const; + +export var RestJsonProtocolServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.restjson", + "RestJsonProtocolServiceException", + 0, + [], + [], + __RestJsonProtocolServiceException +); +export var DialogList = list(n0, _DLi, 0, () => Dialog); +export var SimpleList = 64 | 0; + +export var StructureList = list(n0, _SLt, 0, [() => StructureListMember, 0]); +export var TestStringList = 64 | 0; + +export var BooleanList = 64 | 2; + +export var DoubleList = 64 | 1; + +export var FooEnumList = 64 | 0; + +export var FooEnumSet = 64 | 0; + +export var IntegerEnumList = 64 | 1; + +export var IntegerEnumSet = 64 | 1; + +export var IntegerList = 64 | 1; + +export var IntegerSet = 64 | 1; + +export var NestedStringList = list(n1, _NSL, 0, 64 | 0); +export var SparseShortList = list( + n1, + _SSLp, + { + [_sp]: 1, + }, + 1 +); +export var SparseStringList = list( + n1, + _SSL, + { + [_sp]: 1, + }, + 0 +); +export var StringList = 64 | 0; + +export var StringSet = 64 | 0; + +export var TimestampList = 64 | 4; + +export var DenseBooleanMap = 128 | 2; + +export var DenseNumberMap = 128 | 1; + +export var DenseSetMap = map(n0, _DSMe, 0, 0, 64 | 0); +export var DenseStringMap = 128 | 0; + +export var DenseStructMap = map(n0, _DSMen, 0, 0, () => GreetingStruct); +export var DialogMap = map(n0, _DM, 0, 0, () => Dialog); +export var DocumentValuedMap = map(n0, _DVM, 0, 0, 15); +export var SimpleMap = 128 | 0; + +export var SparseBooleanMap = map( + n0, + _SBM, + { + [_sp]: 1, + }, + 0, + 2 +); +export var SparseNumberMap = map( + n0, + _SNM, + { + [_sp]: 1, + }, + 0, + 1 +); +export var SparseSetMap = map( + n0, + _SSMp, + { + [_sp]: 1, + }, + 0, + 64 | 0 +); +export var SparseStructMap = map( + n0, + _SSMpa, + { + [_sp]: 1, + }, + 0, + () => GreetingStruct +); +export var TestStringMap = 128 | 0; + +export var FooEnumMap = 128 | 0; + +export var IntegerEnumMap = 128 | 1; + +export var SparseStringMap = map( + n1, + _SSM, + { + [_sp]: 1, + }, + 0, + 0 +); +export var StringListMap = map(n1, _SLM, 0, 0, 64 | 0); +export var StringMap = 128 | 0; + +export var MyUnion = uni( + n0, + _MU, + 0, + [_sV, _bVo, _nVu, _bVl, _tV, _eV, _lVi, _mV, _sVt, _rSV], + [0, 2, 1, 21, 4, 0, 64 | 0, 128 | 0, () => GreetingStruct, () => GreetingStruct_n2] +); +export var PlayerAction = uni(n0, _PA, 0, [_qu], [() => Unit]); +export var SimpleUnion = uni(n0, _SU, 0, [_int, _st], [1, 0]); +export var UnionPayload = uni(n0, _UP, 0, [_g], [0]); +export var UnionWithJsonName = uni( + n0, + _UWJN, + 0, + [_fo, _ba, _b], + [ + [ + 0, + { + [_jN]: _FOO, + }, + ], + 0, + [ + 0, + { + [_jN]: _baz, + }, + ], + ] +); +export var AllQueryStringTypes = op( + n0, + _AQST, + { + [_ht]: ["GET", "/AllQueryStringTypesInput", 200], + }, + () => AllQueryStringTypesInput, + () => Unit +); +export var ConstantAndVariableQueryString = op( + n0, + _CAVQS, + { + [_ht]: ["GET", "/ConstantAndVariableQueryString?foo=bar", 200], + }, + () => ConstantAndVariableQueryStringInput, + () => Unit +); +export var ConstantQueryString = op( + n0, + _CQS, + { + [_ht]: ["GET", "/ConstantQueryString/{hello}?foo=bar&hello", 200], + }, + () => ConstantQueryStringInput, + () => Unit +); +export var ContentTypeParameters = op( + n0, + _CTP, + { + [_ht]: ["POST", "/ContentTypeParameters", 200], + }, + () => ContentTypeParametersInput, + () => ContentTypeParametersOutput +); +export var DatetimeOffsets = op( + n0, + _DO, + { + [_ht]: ["POST", "/DatetimeOffsets", 200], + }, + () => Unit, + () => DatetimeOffsetsOutput +); +export var DocumentType = op( + n0, + _DTo, + { + [_ht]: ["PUT", "/DocumentType", 200], + }, + () => DocumentTypeInputOutput, + () => DocumentTypeInputOutput +); +export var DocumentTypeAsMapValue = op( + n0, + _DTAMV, + { + [_ht]: ["PUT", "/DocumentTypeAsMapValue", 200], + }, + () => DocumentTypeAsMapValueInputOutput, + () => DocumentTypeAsMapValueInputOutput +); +export var DocumentTypeAsPayload = op( + n0, + _DTAP, + { + [_ht]: ["PUT", "/DocumentTypeAsPayload", 200], + }, + () => DocumentTypeAsPayloadInputOutput, + () => DocumentTypeAsPayloadInputOutput +); +export var EmptyInputAndEmptyOutput = op( + n0, + _EIAEO, + { + [_ht]: ["POST", "/EmptyInputAndEmptyOutput", 200], + }, + () => EmptyInputAndEmptyOutputInput, + () => EmptyInputAndEmptyOutputOutput +); +export var EndpointOperation = op( + n0, + _EO, + { + [_ht]: ["POST", "/EndpointOperation", 200], + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n0, + _EWHLO, + { + [_ht]: ["POST", "/EndpointWithHostLabelOperation", 200], + [_end]: ["foo.{label}."], + }, + () => HostLabelInput, + () => Unit +); +export var FractionalSeconds = op( + n0, + _FS, + { + [_ht]: ["POST", "/FractionalSeconds", 200], + }, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n0, + _GWE, + { + [_ht]: ["PUT", "/GreetingWithErrors", 200], + }, + () => Unit, + () => GreetingWithErrorsOutput +); +export var HostWithPathOperation = op( + n0, + _HWPO, + { + [_ht]: ["GET", "/HostWithPathOperation", 200], + }, + () => Unit, + () => Unit +); +export var HttpChecksumRequired = op( + n0, + _HCR, + { + [_ht]: ["POST", "/HttpChecksumRequired", 200], + }, + () => HttpChecksumRequiredInputOutput, + () => HttpChecksumRequiredInputOutput +); +export var HttpEnumPayload = op( + n0, + _HEP, + { + [_ht]: ["POST", "/EnumPayload", 200], + }, + () => EnumPayloadInput, + () => EnumPayloadInput +); +export var HttpPayloadTraits = op( + n0, + _HPT, + { + [_ht]: ["POST", "/HttpPayloadTraits", 200], + }, + () => HttpPayloadTraitsInputOutput, + () => HttpPayloadTraitsInputOutput +); +export var HttpPayloadTraitsWithMediaType = op( + n0, + _HPTWMT, + { + [_ht]: ["POST", "/HttpPayloadTraitsWithMediaType", 200], + }, + () => HttpPayloadTraitsWithMediaTypeInputOutput, + () => HttpPayloadTraitsWithMediaTypeInputOutput +); +export var HttpPayloadWithStructure = op( + n0, + _HPWS, + { + [_ht]: ["PUT", "/HttpPayloadWithStructure", 200], + }, + () => HttpPayloadWithStructureInputOutput, + () => HttpPayloadWithStructureInputOutput +); +export var HttpPayloadWithUnion = op( + n0, + _HPWU, + { + [_ht]: ["PUT", "/HttpPayloadWithUnion", 200], + }, + () => HttpPayloadWithUnionInputOutput, + () => HttpPayloadWithUnionInputOutput +); +export var HttpPrefixHeaders = op( + n0, + _HPH, + { + [_ht]: ["GET", "/HttpPrefixHeaders", 200], + }, + () => HttpPrefixHeadersInput, + () => HttpPrefixHeadersOutput +); +export var HttpPrefixHeadersInResponse = op( + n0, + _HPHIR, + { + [_ht]: ["GET", "/HttpPrefixHeadersResponse", 200], + }, + () => HttpPrefixHeadersInResponseInput, + () => HttpPrefixHeadersInResponseOutput +); +export var HttpRequestWithFloatLabels = op( + n0, + _HRWFL, + { + [_ht]: ["GET", "/FloatHttpLabels/{float}/{double}", 200], + }, + () => HttpRequestWithFloatLabelsInput, + () => Unit +); +export var HttpRequestWithGreedyLabelInPath = op( + n0, + _HRWGLIP, + { + [_ht]: ["GET", "/HttpRequestWithGreedyLabelInPath/foo/{foo}/baz/{baz+}", 200], + }, + () => HttpRequestWithGreedyLabelInPathInput, + () => Unit +); +export var HttpRequestWithLabels = op( + n0, + _HRWL, + { + [_ht]: [ + "GET", + "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}", + 200, + ], + }, + () => HttpRequestWithLabelsInput, + () => Unit +); +export var HttpRequestWithLabelsAndTimestampFormat = op( + n0, + _HRWLATF, + { + [_ht]: [ + "GET", + "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}", + 200, + ], + }, + () => HttpRequestWithLabelsAndTimestampFormatInput, + () => Unit +); +export var HttpRequestWithRegexLiteral = op( + n0, + _HRWRL, + { + [_ht]: ["GET", "/ReDosLiteral/{str}/(a+)+", 200], + }, + () => HttpRequestWithRegexLiteralInput, + () => Unit +); +export var HttpResponseCode = op( + n0, + _HRC, + { + [_ht]: ["PUT", "/HttpResponseCode", 200], + }, + () => Unit, + () => HttpResponseCodeOutput +); +export var HttpStringPayload = op( + n0, + _HSP, + { + [_ht]: ["POST", "/StringPayload", 200], + }, + () => StringPayloadInput, + () => StringPayloadInput +); +export var IgnoreQueryParamsInResponse = op( + n0, + _IQPIR, + { + [_ht]: ["GET", "/IgnoreQueryParamsInResponse", 200], + }, + () => Unit, + () => IgnoreQueryParamsInResponseOutput +); +export var InputAndOutputWithHeaders = op( + n0, + _IAOWH, + { + [_ht]: ["POST", "/InputAndOutputWithHeaders", 200], + }, + () => InputAndOutputWithHeadersIO, + () => InputAndOutputWithHeadersIO +); +export var JsonBlobs = op( + n0, + _JBs, + { + [_ht]: ["POST", "/JsonBlobs", 200], + }, + () => JsonBlobsInputOutput, + () => JsonBlobsInputOutput +); +export var JsonEnums = op( + n0, + _JE, + { + [_ht]: ["PUT", "/JsonEnums", 200], + }, + () => JsonEnumsInputOutput, + () => JsonEnumsInputOutput +); +export var JsonIntEnums = op( + n0, + _JIE, + { + [_ht]: ["PUT", "/JsonIntEnums", 200], + }, + () => JsonIntEnumsInputOutput, + () => JsonIntEnumsInputOutput +); +export var JsonLists = op( + n0, + _JL, + { + [_ht]: ["PUT", "/JsonLists", 200], + }, + () => JsonListsInputOutput, + () => JsonListsInputOutput +); +export var JsonMaps = op( + n0, + _JM, + { + [_ht]: ["POST", "/JsonMaps", 200], + }, + () => JsonMapsInputOutput, + () => JsonMapsInputOutput +); +export var JsonTimestamps = op( + n0, + _JT, + { + [_ht]: ["POST", "/JsonTimestamps", 200], + }, + () => JsonTimestampsInputOutput, + () => JsonTimestampsInputOutput +); +export var JsonUnions = op( + n0, + _JU, + { + [_ht]: ["PUT", "/JsonUnions", 200], + }, + () => UnionInputOutput, + () => UnionInputOutput +); +export var MalformedAcceptWithBody = op( + n0, + _MAWB, + { + [_ht]: ["POST", "/MalformedAcceptWithBody", 200], + }, + () => Unit, + () => GreetingStruct +); +export var MalformedAcceptWithGenericString = op( + n0, + _MAWGS, + { + [_ht]: ["POST", "/MalformedAcceptWithGenericString", 200], + }, + () => Unit, + () => MalformedAcceptWithGenericStringOutput +); +export var MalformedAcceptWithPayload = op( + n0, + _MAWP, + { + [_ht]: ["POST", "/MalformedAcceptWithPayload", 200], + }, + () => Unit, + () => MalformedAcceptWithPayloadOutput +); +export var MalformedBlob = op( + n0, + _MB, + { + [_ht]: ["POST", "/MalformedBlob", 200], + }, + () => MalformedBlobInput, + () => Unit +); +export var MalformedBoolean = op( + n0, + _MBa, + { + [_ht]: ["POST", "/MalformedBoolean/{booleanInPath}", 200], + }, + () => MalformedBooleanInput, + () => Unit +); +export var MalformedByte = op( + n0, + _MBal, + { + [_ht]: ["POST", "/MalformedByte/{byteInPath}", 200], + }, + () => MalformedByteInput, + () => Unit +); +export var MalformedContentTypeWithBody = op( + n0, + _MCTWB, + { + [_ht]: ["POST", "/MalformedContentTypeWithBody", 200], + }, + () => GreetingStruct, + () => Unit +); +export var MalformedContentTypeWithGenericString = op( + n0, + _MCTWGS, + { + [_ht]: ["POST", "/MalformedContentTypeWithGenericString", 200], + }, + () => MalformedContentTypeWithGenericStringInput, + () => Unit +); +export var MalformedContentTypeWithoutBody = op( + n0, + _MCTWBa, + { + [_ht]: ["POST", "/MalformedContentTypeWithoutBody", 200], + }, + () => Unit, + () => Unit +); +export var MalformedContentTypeWithoutBodyEmptyInput = op( + n0, + _MCTWBEI, + { + [_ht]: ["POST", "/MalformedContentTypeWithoutBodyEmptyInput", 200], + }, + () => MalformedContentTypeWithoutBodyEmptyInputInput, + () => Unit +); +export var MalformedContentTypeWithPayload = op( + n0, + _MCTWP, + { + [_ht]: ["POST", "/MalformedContentTypeWithPayload", 200], + }, + () => MalformedContentTypeWithPayloadInput, + () => Unit +); +export var MalformedDouble = op( + n0, + _MD, + { + [_ht]: ["POST", "/MalformedDouble/{doubleInPath}", 200], + }, + () => MalformedDoubleInput, + () => Unit +); +export var MalformedFloat = op( + n0, + _MF, + { + [_ht]: ["POST", "/MalformedFloat/{floatInPath}", 200], + }, + () => MalformedFloatInput, + () => Unit +); +export var MalformedInteger = op( + n0, + _MI, + { + [_ht]: ["POST", "/MalformedInteger/{integerInPath}", 200], + }, + () => MalformedIntegerInput, + () => Unit +); +export var MalformedList = op( + n0, + _ML, + { + [_ht]: ["POST", "/MalformedList", 200], + }, + () => MalformedListInput, + () => Unit +); +export var MalformedLong = op( + n0, + _MLa, + { + [_ht]: ["POST", "/MalformedLong/{longInPath}", 200], + }, + () => MalformedLongInput, + () => Unit +); +export var MalformedMap = op( + n0, + _MM, + { + [_ht]: ["POST", "/MalformedMap", 200], + }, + () => MalformedMapInput, + () => Unit +); +export var MalformedRequestBody = op( + n0, + _MRB, + { + [_ht]: ["POST", "/MalformedRequestBody", 200], + }, + () => MalformedRequestBodyInput, + () => Unit +); +export var MalformedShort = op( + n0, + _MS, + { + [_ht]: ["POST", "/MalformedShort/{shortInPath}", 200], + }, + () => MalformedShortInput, + () => Unit +); +export var MalformedString = op( + n0, + _MSa, + { + [_ht]: ["POST", "/MalformedString", 200], + }, + () => MalformedStringInput, + () => Unit +); +export var MalformedTimestampBodyDateTime = op( + n0, + _MTBDT, + { + [_ht]: ["POST", "/MalformedTimestampBodyDateTime", 200], + }, + () => MalformedTimestampBodyDateTimeInput, + () => Unit +); +export var MalformedTimestampBodyDefault = op( + n0, + _MTBD, + { + [_ht]: ["POST", "/MalformedTimestampBodyDefault", 200], + }, + () => MalformedTimestampBodyDefaultInput, + () => Unit +); +export var MalformedTimestampBodyHttpDate = op( + n0, + _MTBHD, + { + [_ht]: ["POST", "/MalformedTimestampBodyHttpDate", 200], + }, + () => MalformedTimestampBodyHttpDateInput, + () => Unit +); +export var MalformedTimestampHeaderDateTime = op( + n0, + _MTHDT, + { + [_ht]: ["POST", "/MalformedTimestampHeaderDateTime", 200], + }, + () => MalformedTimestampHeaderDateTimeInput, + () => Unit +); +export var MalformedTimestampHeaderDefault = op( + n0, + _MTHD, + { + [_ht]: ["POST", "/MalformedTimestampHeaderDefault", 200], + }, + () => MalformedTimestampHeaderDefaultInput, + () => Unit +); +export var MalformedTimestampHeaderEpoch = op( + n0, + _MTHE, + { + [_ht]: ["POST", "/MalformedTimestampHeaderEpoch", 200], + }, + () => MalformedTimestampHeaderEpochInput, + () => Unit +); +export var MalformedTimestampPathDefault = op( + n0, + _MTPD, + { + [_ht]: ["POST", "/MalformedTimestampPathDefault/{timestamp}", 200], + }, + () => MalformedTimestampPathDefaultInput, + () => Unit +); +export var MalformedTimestampPathEpoch = op( + n0, + _MTPE, + { + [_ht]: ["POST", "/MalformedTimestampPathEpoch/{timestamp}", 200], + }, + () => MalformedTimestampPathEpochInput, + () => Unit +); +export var MalformedTimestampPathHttpDate = op( + n0, + _MTPHD, + { + [_ht]: ["POST", "/MalformedTimestampPathHttpDate/{timestamp}", 200], + }, + () => MalformedTimestampPathHttpDateInput, + () => Unit +); +export var MalformedTimestampQueryDefault = op( + n0, + _MTQD, + { + [_ht]: ["POST", "/MalformedTimestampQueryDefault", 200], + }, + () => MalformedTimestampQueryDefaultInput, + () => Unit +); +export var MalformedTimestampQueryEpoch = op( + n0, + _MTQE, + { + [_ht]: ["POST", "/MalformedTimestampQueryEpoch", 200], + }, + () => MalformedTimestampQueryEpochInput, + () => Unit +); +export var MalformedTimestampQueryHttpDate = op( + n0, + _MTQHD, + { + [_ht]: ["POST", "/MalformedTimestampQueryHttpDate", 200], + }, + () => MalformedTimestampQueryHttpDateInput, + () => Unit +); +export var MalformedUnion = op( + n0, + _MUa, + { + [_ht]: ["POST", "/MalformedUnion", 200], + }, + () => MalformedUnionInput, + () => Unit +); +export var MediaTypeHeader = op( + n0, + _MTH, + { + [_ht]: ["GET", "/MediaTypeHeader", 200], + }, + () => MediaTypeHeaderInput, + () => MediaTypeHeaderOutput +); +export var NoInputAndNoOutput = op( + n0, + _NIANO, + { + [_ht]: ["POST", "/NoInputAndNoOutput", 200], + }, + () => Unit, + () => Unit +); +export var NoInputAndOutput = op( + n0, + _NIAO, + { + [_ht]: ["POST", "/NoInputAndOutputOutput", 200], + }, + () => Unit, + () => NoInputAndOutputOutput +); +export var NullAndEmptyHeadersClient = op( + n0, + _NAEHC, + { + [_ht]: ["GET", "/NullAndEmptyHeadersClient", 200], + }, + () => NullAndEmptyHeadersIO, + () => NullAndEmptyHeadersIO +); +export var NullAndEmptyHeadersServer = op( + n0, + _NAEHS, + { + [_ht]: ["GET", "/NullAndEmptyHeadersServer", 200], + }, + () => NullAndEmptyHeadersIO, + () => NullAndEmptyHeadersIO +); +export var OmitsNullSerializesEmptyString = op( + n0, + _ONSES, + { + [_ht]: ["GET", "/OmitsNullSerializesEmptyString", 200], + }, + () => OmitsNullSerializesEmptyStringInput, + () => Unit +); +export var OmitsSerializingEmptyLists = op( + n0, + _OSEL, + { + [_ht]: ["POST", "/OmitsSerializingEmptyLists", 200], + }, + () => OmitsSerializingEmptyListsInput, + () => Unit +); +export var OperationWithDefaults = op( + n0, + _OWD, + { + [_ht]: ["POST", "/OperationWithDefaults", 200], + }, + () => OperationWithDefaultsInput, + () => OperationWithDefaultsOutput +); +export var OperationWithNestedStructure = op( + n0, + _OWNS, + { + [_ht]: ["POST", "/OperationWithNestedStructure", 200], + }, + () => OperationWithNestedStructureInput, + () => OperationWithNestedStructureOutput +); +export var PostPlayerAction = op( + n0, + _PPA, + { + [_ht]: ["POST", "/PostPlayerAction", 200], + }, + () => PostPlayerActionInput, + () => PostPlayerActionOutput +); +export var PostUnionWithJsonName = op( + n0, + _PUWJN, + { + [_ht]: ["POST", "/PostUnionWithJsonName", 200], + }, + () => PostUnionWithJsonNameInput, + () => PostUnionWithJsonNameOutput +); +export var PutWithContentEncoding = op( + n0, + _PWCE, + { + [_ht]: ["POST", "/requestcompression/putcontentwithencoding", 200], + }, + () => PutWithContentEncodingInput, + () => Unit +); +export var QueryIdempotencyTokenAutoFill = op( + n0, + _QITAF, + { + [_ht]: ["POST", "/QueryIdempotencyTokenAutoFill", 200], + }, + () => QueryIdempotencyTokenAutoFillInput, + () => Unit +); +export var QueryParamsAsStringListMap = op( + n0, + _QPASLM, + { + [_ht]: ["POST", "/StringListMap", 200], + }, + () => QueryParamsAsStringListMapInput, + () => Unit +); +export var QueryPrecedence = op( + n0, + _QP, + { + [_ht]: ["POST", "/Precedence", 200], + }, + () => QueryPrecedenceInput, + () => Unit +); +export var RecursiveShapes = op( + n0, + _RS, + { + [_ht]: ["PUT", "/RecursiveShapes", 200], + }, + () => RecursiveShapesInputOutput, + () => RecursiveShapesInputOutput +); +export var ResponseCodeHttpFallback = op( + n0, + _RCHF, + { + [_ht]: ["GET", "/responseCodeHttpFallback", 201], + }, + () => ResponseCodeHttpFallbackInputOutput, + () => ResponseCodeHttpFallbackInputOutput +); +export var ResponseCodeRequired = op( + n0, + _RCR, + { + [_ht]: ["GET", "/responseCodeRequired", 200], + }, + () => Unit, + () => ResponseCodeRequiredOutput +); +export var SimpleScalarProperties = op( + n0, + _SSP, + { + [_ht]: ["PUT", "/SimpleScalarProperties", 200], + }, + () => SimpleScalarPropertiesInputOutput, + () => SimpleScalarPropertiesInputOutput +); +export var SparseJsonLists = op( + n0, + _SJL, + { + [_ht]: ["PUT", "/SparseJsonLists", 200], + }, + () => SparseJsonListsInputOutput, + () => SparseJsonListsInputOutput +); +export var SparseJsonMaps = op( + n0, + _SJM, + { + [_ht]: ["POST", "/SparseJsonMaps", 200], + }, + () => SparseJsonMapsInputOutput, + () => SparseJsonMapsInputOutput +); +export var StreamingTraits = op( + n0, + _ST, + { + [_ht]: ["POST", "/StreamingTraits", 200], + }, + () => StreamingTraitsInputOutput, + () => StreamingTraitsInputOutput +); +export var StreamingTraitsRequireLength = op( + n0, + _STRL, + { + [_ht]: ["POST", "/StreamingTraitsRequireLength", 200], + }, + () => StreamingTraitsRequireLengthInput, + () => Unit +); +export var StreamingTraitsWithMediaType = op( + n0, + _STWMT, + { + [_ht]: ["POST", "/StreamingTraitsWithMediaType", 200], + }, + () => StreamingTraitsWithMediaTypeInputOutput, + () => StreamingTraitsWithMediaTypeInputOutput +); +export var TestBodyStructure = op( + n0, + _TBS, + { + [_ht]: ["POST", "/body", 200], + }, + () => TestBodyStructureInputOutput, + () => TestBodyStructureInputOutput +); +export var TestGetNoInputNoPayload = op( + n0, + _TGNINP, + { + [_ht]: ["GET", "/no_input_no_payload", 200], + }, + () => Unit, + () => TestNoPayloadInputOutput +); +export var TestGetNoPayload = op( + n0, + _TGNP, + { + [_ht]: ["GET", "/no_payload", 200], + }, + () => TestNoPayloadInputOutput, + () => TestNoPayloadInputOutput +); +export var TestPayloadBlob = op( + n0, + _TPBe, + { + [_ht]: ["POST", "/blob_payload", 200], + }, + () => TestPayloadBlobInputOutput, + () => TestPayloadBlobInputOutput +); +export var TestPayloadStructure = op( + n0, + _TPS, + { + [_ht]: ["POST", "/payload", 200], + }, + () => TestPayloadStructureInputOutput, + () => TestPayloadStructureInputOutput +); +export var TestPostNoInputNoPayload = op( + n0, + _TPNINP, + { + [_ht]: ["POST", "/no_input_no_payload", 200], + }, + () => Unit, + () => TestNoPayloadInputOutput +); +export var TestPostNoPayload = op( + n0, + _TPNP, + { + [_ht]: ["POST", "/no_payload", 200], + }, + () => TestNoPayloadInputOutput, + () => TestNoPayloadInputOutput +); +export var TimestampFormatHeaders = op( + n0, + _TFH, + { + [_ht]: ["POST", "/TimestampFormatHeaders", 200], + }, + () => TimestampFormatHeadersIO, + () => TimestampFormatHeadersIO +); +export var UnitInputAndOutput = op( + n0, + _UIAO, + { + [_ht]: ["POST", "/UnitInputAndOutput", 200], + }, + () => Unit, + () => Unit +); diff --git a/private/aws-protocoltests-restxml/src/schemas/schemas.ts b/private/aws-protocoltests-restxml/src/schemas/schemas.ts new file mode 100644 index 0000000000000..e0214d8d7bd52 --- /dev/null +++ b/private/aws-protocoltests-restxml/src/schemas/schemas.ts @@ -0,0 +1,2562 @@ +const _ = ""; +const _A = "Ahoy"; +const _AQST = "AllQueryStringTypes"; +const _AQSTI = "AllQueryStringTypesInput"; +const _At = "Attribute"; +const _B = "Boolean"; +const _BL = "BooleanList"; +const _BWXN = "BodyWithXmlName"; +const _BWXNIO = "BodyWithXmlNameInputOutput"; +const _Bl = "Blob"; +const _By = "Byte"; +const _CAVQS = "ConstantAndVariableQueryString"; +const _CAVQSI = "ConstantAndVariableQueryStringInput"; +const _CE = "ComplexError"; +const _CE_ = "Content-Encoding"; +const _CNED = "ComplexNestedErrorData"; +const _CQS = "ConstantQueryString"; +const _CQSI = "ConstantQueryStringInput"; +const _CTP = "ContentTypeParameters"; +const _CTPI = "ContentTypeParametersInput"; +const _CTPO = "ContentTypeParametersOutput"; +const _D = "Double"; +const _DD = "DoubleDribble"; +const _DL = "DoubleList"; +const _DO = "DatetimeOffsets"; +const _DOO = "DatetimeOffsetsOutput"; +const _DT = "DateTime"; +const _E = "Enum"; +const _EIAEO = "EmptyInputAndEmptyOutput"; +const _EIAEOI = "EmptyInputAndEmptyOutputInput"; +const _EIAEOO = "EmptyInputAndEmptyOutputOutput"; +const _EL = "EnumList"; +const _EO = "EndpointOperation"; +const _EPI = "EnumPayloadInput"; +const _ES = "EpochSeconds"; +const _EWHLHO = "EndpointWithHostLabelHeaderOperation"; +const _EWHLO = "EndpointWithHostLabelOperation"; +const _EWHLOR = "EndpointWithHostLabelOperationRequest"; +const _Em = "Empty"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FEM = "FooEnumMap"; +const _FES = "FooEnumSet"; +const _FPH = "FooPrefixHeaders"; +const _FS = "FractionalSeconds"; +const _FSO = "FractionalSecondsOutput"; +const _FXM = "FlattenedXmlMap"; +const _FXMR = "FlattenedXmlMapRequest"; +const _FXMRl = "FlattenedXmlMapResponse"; +const _FXMWXN = "FlattenedXmlMapWithXmlName"; +const _FXMWXNIOM = "FlattenedXmlMapWithXmlNameInputOutputMap"; +const _FXMWXNO = "FlattenedXmlMapWithXmlNamespaceOutput"; +const _FXMWXNOM = "FlattenedXmlMapWithXmlNamespaceOutputMap"; +const _FXMWXNR = "FlattenedXmlMapWithXmlNameRequest"; +const _FXMWXNRl = "FlattenedXmlMapWithXmlNameResponse"; +const _FXMWXNl = "FlattenedXmlMapWithXmlNamespace"; +const _Fo = "Foo"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _H = "Header"; +const _HD = "HttpDate"; +const _HEP = "HttpEnumPayload"; +const _HLHI = "HostLabelHeaderInput"; +const _HPH = "HttpPrefixHeaders"; +const _HPHIO = "HttpPrefixHeadersInputOutput"; +const _HPT = "HttpPayloadTraits"; +const _HPTIO = "HttpPayloadTraitsInputOutput"; +const _HPTWMT = "HttpPayloadTraitsWithMediaType"; +const _HPTWMTIO = "HttpPayloadTraitsWithMediaTypeInputOutput"; +const _HPWMXN = "HttpPayloadWithMemberXmlName"; +const _HPWMXNIO = "HttpPayloadWithMemberXmlNameInputOutput"; +const _HPWS = "HttpPayloadWithStructure"; +const _HPWSIO = "HttpPayloadWithStructureInputOutput"; +const _HPWU = "HttpPayloadWithUnion"; +const _HPWUIO = "HttpPayloadWithUnionInputOutput"; +const _HPWXN = "HttpPayloadWithXmlName"; +const _HPWXNAP = "HttpPayloadWithXmlNamespaceAndPrefix"; +const _HPWXNAPIO = "HttpPayloadWithXmlNamespaceAndPrefixInputOutput"; +const _HPWXNIO = "HttpPayloadWithXmlNameInputOutput"; +const _HPWXNIOt = "HttpPayloadWithXmlNamespaceInputOutput"; +const _HPWXNt = "HttpPayloadWithXmlNamespace"; +const _HRC = "HttpResponseCode"; +const _HRCO = "HttpResponseCodeOutput"; +const _HRWFL = "HttpRequestWithFloatLabels"; +const _HRWFLI = "HttpRequestWithFloatLabelsInput"; +const _HRWGLIP = "HttpRequestWithGreedyLabelInPath"; +const _HRWGLIPI = "HttpRequestWithGreedyLabelInPathInput"; +const _HRWL = "HttpRequestWithLabels"; +const _HRWLATF = "HttpRequestWithLabelsAndTimestampFormat"; +const _HRWLATFI = "HttpRequestWithLabelsAndTimestampFormatInput"; +const _HRWLI = "HttpRequestWithLabelsInput"; +const _HSP = "HttpStringPayload"; +const _He = "Hello"; +const _Ho = "Hola"; +const _I = "Integer"; +const _IAOWH = "InputAndOutputWithHeaders"; +const _IAOWHIO = "InputAndOutputWithHeadersIO"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IEM = "IntegerEnumMap"; +const _IES = "IntegerEnumSet"; +const _IG = "InvalidGreeting"; +const _IK = "InnerKey"; +const _IL = "IntegerList"; +const _IQPIR = "IgnoreQueryParamsInResponse"; +const _IQPIRO = "IgnoreQueryParamsInResponseOutput"; +const _IS = "IntegerSet"; +const _IV = "InnerValue"; +const _K = "K"; +const _KVP = "KVP"; +const _L = "Long"; +const _LWMN = "ListWithMemberNamespace"; +const _LWN = "ListWithNamespace"; +const _M = "Message"; +const _N = "Nested"; +const _NAEHC = "NullAndEmptyHeadersClient"; +const _NAEHIO = "NullAndEmptyHeadersIO"; +const _NAEHS = "NullAndEmptyHeadersServer"; +const _NIANO = "NoInputAndNoOutput"; +const _NIAO = "NoInputAndOutput"; +const _NIAOO = "NoInputAndOutputOutput"; +const _NM = "NestedMap"; +const _NP = "NestedPayload"; +const _NSL = "NestedStringList"; +const _NXM = "NestedXmlMaps"; +const _NXMR = "NestedXmlMapsRequest"; +const _NXMRe = "NestedXmlMapsResponse"; +const _NXMWXN = "NestedXmlMapWithXmlName"; +const _NXMWXNIM = "NestedXmlMapWithXmlNameInnerMap"; +const _NXMWXNM = "NestedXmlMapWithXmlNameMap"; +const _NXMWXNR = "NestedXmlMapWithXmlNameRequest"; +const _NXMWXNRe = "NestedXmlMapWithXmlNameResponse"; +const _Nu = "Null"; +const _OK = "OuterKey"; +const _ONSES = "OmitsNullSerializesEmptyString"; +const _ONSESI = "OmitsNullSerializesEmptyStringInput"; +const _PWCE = "PutWithContentEncoding"; +const _PWCEI = "PutWithContentEncodingInput"; +const _PWXN = "PayloadWithXmlName"; +const _PWXNAP = "PayloadWithXmlNamespaceAndPrefix"; +const _PWXNa = "PayloadWithXmlNamespace"; +const _QITAF = "QueryIdempotencyTokenAutoFill"; +const _QITAFI = "QueryIdempotencyTokenAutoFillInput"; +const _QP = "QueryPrecedence"; +const _QPASLM = "QueryParamsAsStringListMap"; +const _QPASLMI = "QueryParamsAsStringListMapInput"; +const _QPI = "QueryPrecedenceInput"; +const _RLM = "RenamedListMembers"; +const _RS = "RecursiveShapes"; +const _RSION = "RecursiveShapesInputOutputNested1"; +const _RSIONe = "RecursiveShapesInputOutputNested2"; +const _RSR = "RecursiveShapesRequest"; +const _RSRe = "RecursiveShapesResponse"; +const _S = "String"; +const _SE = "StringEnum"; +const _SL = "StringList"; +const _SLM = "StringListMap"; +const _SLMt = "StructureListMember"; +const _SLt = "StructureList"; +const _SM = "StringMap"; +const _SPI = "StringPayloadInput"; +const _SS = "StringSet"; +const _SSP = "SimpleScalarProperties"; +const _SSPR = "SimpleScalarPropertiesRequest"; +const _SSPRi = "SimpleScalarPropertiesResponse"; +const _Se = "Setting"; +const _Sh = "Short"; +const _St = "Status"; +const _T = "Timestamp"; +const _TFH = "TimestampFormatHeaders"; +const _TFHIO = "TimestampFormatHeadersIO"; +const _TL = "TimestampList"; +const _TLo = "TopLevel"; +const _TPB = "TextPlainBlob"; +const _UP = "UnionPayload"; +const _V = "V"; +const _XA = "X-A"; +const _XAAI = "X-Amz-Account-Id"; +const _XAOP = "XmlAttributesOnPayload"; +const _XAOPR = "XmlAttributesOnPayloadRequest"; +const _XAOPRm = "XmlAttributesOnPayloadResponse"; +const _XAPR = "XmlAttributesPayloadRequest"; +const _XAPRm = "XmlAttributesPayloadResponse"; +const _XAR = "XmlAttributesRequest"; +const _XARm = "XmlAttributesResponse"; +const _XAm = "XmlAttributes"; +const _XB = "X-Byte"; +const _XBR = "XmlBlobsRequest"; +const _XBRm = "XmlBlobsResponse"; +const _XB_ = "X-Boolean1"; +const _XB__ = "X-Boolean2"; +const _XB___ = "X-BooleanList"; +const _XB____ = "X-B"; +const _XBm = "XmlBlobs"; +const _XC = "X-C"; +const _XD = "X-Double"; +const _XE = "X-Enum"; +const _XEB = "XmlEmptyBlobs"; +const _XEBR = "XmlEmptyBlobsRequest"; +const _XEBRm = "XmlEmptyBlobsResponse"; +const _XEL = "XmlEmptyLists"; +const _XELR = "XmlEmptyListsRequest"; +const _XELRm = "XmlEmptyListsResponse"; +const _XEM = "XmlEmptyMaps"; +const _XEMR = "XmlEmptyMapsRequest"; +const _XEMRm = "XmlEmptyMapsResponse"; +const _XER = "XmlEnumsRequest"; +const _XERm = "XmlEnumsResponse"; +const _XES = "XmlEmptyStrings"; +const _XESR = "XmlEmptyStringsRequest"; +const _XESRm = "XmlEmptyStringsResponse"; +const _XE_ = "X-EnumList"; +const _XEm = "XmlEnums"; +const _XF = "X-Foo"; +const _XF_ = "X-Float"; +const _XG = "X-Greeting"; +const _XH = "X-Header"; +const _XI = "X-Integer"; +const _XIE = "XmlIntEnums"; +const _XIER = "XmlIntEnumsRequest"; +const _XIERm = "XmlIntEnumsResponse"; +const _XI_ = "X-IntegerList"; +const _XL = "X-Long"; +const _XLR = "XmlListsRequest"; +const _XLRm = "XmlListsResponse"; +const _XLm = "XmlLists"; +const _XM = "XmlMaps"; +const _XMIOM = "XmlMapsInputOutputMap"; +const _XMR = "XmlMapsRequest"; +const _XMRm = "XmlMapsResponse"; +const _XMWXN = "XmlMapWithXmlNamespace"; +const _XMWXNIOM = "XmlMapWithXmlNamespaceInputOutputMap"; +const _XMWXNR = "XmlMapWithXmlNamespaceRequest"; +const _XMWXNRm = "XmlMapWithXmlNamespaceResponse"; +const _XMXN = "XmlMapsXmlName"; +const _XMXNIOM = "XmlMapsXmlNameInputOutputMap"; +const _XMXNR = "XmlMapsXmlNameRequest"; +const _XMXNRm = "XmlMapsXmlNameResponse"; +const _XN = "XmlNamespaces"; +const _XNL = "XmlNamespacedList"; +const _XNN = "XmlNamespaceNested"; +const _XNR = "XmlNamespacesRequest"; +const _XNRm = "XmlNamespacesResponse"; +const _XNUS = "XmlNestedUnionStruct"; +const _XS = "X-String"; +const _XS_ = "X-Short"; +const _XS__ = "X-StringList"; +const _XS___ = "X-StringSet"; +const _XT = "X-TimestampList"; +const _XTR = "XmlTimestampsRequest"; +const _XTRm = "XmlTimestampsResponse"; +const _XTm = "XmlTimestamps"; +const _XU = "XmlUnions"; +const _XUR = "XmlUnionsRequest"; +const _XURm = "XmlUnionsResponse"; +const _XUS = "XmlUnionShape"; +const _Xd = "X-defaultFormat"; +const _Xm = "X-memberEpochSeconds"; +const _Xm_ = "X-memberHttpDate"; +const _Xm__ = "X-memberDateTime"; +const _Xt = "X-targetEpochSeconds"; +const _Xt_ = "X-targetHttpDate"; +const _Xt__ = "X-targetDateTime"; +const _a = "a"; +const _aI = "accountId"; +const _at = "attr"; +const _b = "baz"; +const _bL = "booleanList"; +const _bV = "byteValue"; +const _bVo = "booleanValue"; +const _b_ = "b"; +const _ba = "bar"; +const _bl = "blob"; +const _bo = "boolean"; +const _c = "client"; +const _cN = "customName"; +const _c_ = "c"; +const _co = "corge"; +const _d = "datetime"; +const _dF = "defaultFormat"; +const _dT = "dateTime"; +const _dTOT = "dateTimeOnTarget"; +const _dV = "doubleValue"; +const _da = "data"; +const _do = "double"; +const _e = "error"; +const _eL = "enumList"; +const _eS = "emptyString"; +const _eSOT = "epochSecondsOnTarget"; +const _eSp = "epochSeconds"; +const _en = "encoding"; +const _end = "endpoint"; +const _f = "foo"; +const _fBV = "falseBooleanValue"; +const _fE = "fooEnum1"; +const _fEL = "fooEnumList"; +const _fEM = "fooEnumMap"; +const _fES = "fooEnumSet"; +const _fEo = "fooEnum2"; +const _fEoo = "fooEnum3"; +const _fL = "flattenedList"; +const _fLWMN = "flattenedListWithMemberNamespace"; +const _fLWN = "flattenedListWithNamespace"; +const _fLl = "flattenedList2"; +const _fM = "fooMap"; +const _fNM = "flatNestedMap"; +const _fSL = "flattenedStructureList"; +const _fV = "floatValue"; +const _fl = "float"; +const _g = "greeting"; +const _h = "hello"; +const _hB = "headerByte"; +const _hBL = "headerBooleanList"; +const _hD = "headerDouble"; +const _hDOT = "httpDateOnTarget"; +const _hDt = "httpDate"; +const _hE = "httpError"; +const _hEL = "headerEnumList"; +const _hEe = "headerEnum"; +const _hF = "headerFloat"; +const _hFB = "headerFalseBool"; +const _hH = "httpHeader"; +const _hI = "headerInteger"; +const _hIL = "headerIntegerList"; +const _hL = "hostLabel"; +const _hLe = "headerLong"; +const _hP = "httpPayload"; +const _hPH = "httpPrefixHeaders"; +const _hQ = "httpQuery"; +const _hS = "headerString"; +const _hSL = "headerStringList"; +const _hSS = "headerStringSet"; +const _hSe = "headerShort"; +const _hTB = "headerTrueBool"; +const _hTL = "headerTimestampList"; +const _hi = "hi"; +const _hk = "https://the-key.example.com"; +const _hl = "https://xml-list.example.com"; +const _hm = "https://the-member.example.com"; +const _hm_ = "https://xml-member.example.com"; +const _ht = "http://foo.com"; +const _htt = "http://baz.com"; +const _http = "http://qux.com"; +const _http_ = "http"; +const _httpb = "http://bux.com"; +const _hv = "https://the-value.example.com"; +const _i = "integer"; +const _iE = "intEnum1"; +const _iEL = "intEnumList"; +const _iEM = "intEnumMap"; +const _iES = "intEnumSet"; +const _iEn = "intEnum2"; +const _iEnt = "intEnum3"; +const _iL = "integerList"; +const _iT = "idempotencyToken"; +const _iV = "integerValue"; +const _it = "item"; +const _l = "label"; +const _lV = "longValue"; +const _lo = "long"; +const _mDT = "memberDateTime"; +const _mES = "memberEpochSeconds"; +const _mHD = "memberHttpDate"; +const _mM = "myMap"; +const _mS = "maybeSet"; +const _mSL = "myStructureList"; +const _mT = "mediaType"; +const _n = "nested"; +const _nM = "nestedMap"; +const _nSL = "nestedStringList"; +const _nV = "nullValue"; +const _nXMWXNM = "nestedXmlMapWithXmlNameMap"; +const _na = "name"; +const _no = "normal"; +const _o = "other"; +const _p = "payload"; +const _q = "qux"; +const _qB = "queryByte"; +const _qBL = "queryBooleanList"; +const _qBu = "queryBoolean"; +const _qD = "queryDouble"; +const _qDL = "queryDoubleList"; +const _qE = "queryEnum"; +const _qEL = "queryEnumList"; +const _qF = "queryFloat"; +const _qI = "queryInteger"; +const _qIE = "queryIntegerEnum"; +const _qIEL = "queryIntegerEnumList"; +const _qIL = "queryIntegerList"; +const _qIS = "queryIntegerSet"; +const _qL = "queryLong"; +const _qPMOS = "queryParamsMapOfStrings"; +const _qS = "queryString"; +const _qSL = "queryStringList"; +const _qSS = "queryStringSet"; +const _qSu = "queryShort"; +const _qT = "queryTimestamp"; +const _qTL = "queryTimestampList"; +const _r = "renamed"; +const _rLM = "renamedListMembers"; +const _rM = "recursiveMember"; +const _s = "string"; +const _sL = "stringList"; +const _sLt = "structureList"; +const _sS = "stringSet"; +const _sV = "stringValue"; +const _sVh = "shortValue"; +const _sVt = "structValue"; +const _sh = "short"; +const _t = "text/plain"; +const _tBV = "trueBooleanValue"; +const _tDT = "targetDateTime"; +const _tES = "targetEpochSeconds"; +const _tHD = "targetHttpDate"; +const _tL = "timestampList"; +const _te = "test"; +const _ti = "timestamp"; +const _to = "token"; +const _uV = "unionValue"; +const _v = "value"; +const _va = "values"; +const _xA = "xmlAttribute"; +const _xF = "xmlFlattened"; +const _xN = "xmlName"; +const _xNm = "xmlNamespace"; +const _xf = "x-foo"; +const _xf_ = "x-foo-"; +const n0 = "aws.protocoltests.shared"; +const n1 = "aws.protocoltests.restxml"; + +// smithy-typescript generated code +import { error, list, map, op, sim, struct, struct as uni } from "@smithy/core/schema"; + +import { ComplexError as __ComplexError, InvalidGreeting as __InvalidGreeting } from "../models/index"; +import { RestXmlProtocolServiceException as __RestXmlProtocolServiceException } from "../models/RestXmlProtocolServiceException"; + +/* eslint no-var: 0 */ + +export var TextPlainBlob = sim(n0, _TPB, 21, { + [_mT]: _t, +}); +export var AllQueryStringTypesInput = struct( + n1, + _AQSTI, + 0, + [ + _qS, + _qSL, + _qSS, + _qB, + _qSu, + _qI, + _qIL, + _qIS, + _qL, + _qF, + _qD, + _qDL, + _qBu, + _qBL, + _qT, + _qTL, + _qE, + _qEL, + _qIE, + _qIEL, + _qPMOS, + ], + [ + [ + 0, + { + [_hQ]: _S, + }, + ], + [ + 64 | 0, + { + [_hQ]: _SL, + }, + ], + [ + 64 | 0, + { + [_hQ]: _SS, + }, + ], + [ + 1, + { + [_hQ]: _By, + }, + ], + [ + 1, + { + [_hQ]: _Sh, + }, + ], + [ + 1, + { + [_hQ]: _I, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IL, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IS, + }, + ], + [ + 1, + { + [_hQ]: _L, + }, + ], + [ + 1, + { + [_hQ]: _F, + }, + ], + [ + 1, + { + [_hQ]: _D, + }, + ], + [ + 64 | 1, + { + [_hQ]: _DL, + }, + ], + [ + 2, + { + [_hQ]: _B, + }, + ], + [ + 64 | 2, + { + [_hQ]: _BL, + }, + ], + [ + 4, + { + [_hQ]: _T, + }, + ], + [ + 64 | 4, + { + [_hQ]: _TL, + }, + ], + [ + 0, + { + [_hQ]: _E, + }, + ], + [ + 64 | 0, + { + [_hQ]: _EL, + }, + ], + [ + 1, + { + [_hQ]: _IE, + }, + ], + [ + 64 | 1, + { + [_hQ]: _IEL, + }, + ], + [128 | 0, 64], + ] +); +export var BodyWithXmlNameInputOutput = struct( + n1, + _BWXNIO, + { + [_xN]: _A, + }, + [_n], + [[() => PayloadWithXmlName, 0]] +); +export var ComplexError = error( + n1, + _CE, + { + [_e]: _c, + [_hE]: 403, + }, + [_H, _TLo, _N], + [ + [ + 0, + { + [_hH]: _XH, + }, + ], + 0, + () => ComplexNestedErrorData, + ], + + __ComplexError +); +export var ComplexNestedErrorData = struct(n1, _CNED, 0, [_Fo], [0]); +export var ConstantAndVariableQueryStringInput = struct( + n1, + _CAVQSI, + 0, + [_b, _mS], + [ + [ + 0, + { + [_hQ]: _b, + }, + ], + [ + 0, + { + [_hQ]: _mS, + }, + ], + ] +); +export var ConstantQueryStringInput = struct(n1, _CQSI, 0, [_h], [[0, 1]]); +export var ContentTypeParametersInput = struct(n1, _CTPI, 0, [_v], [1]); +export var ContentTypeParametersOutput = struct(n1, _CTPO, 0, [], []); +export var DatetimeOffsetsOutput = struct(n1, _DOO, 0, [_d], [5]); +export var EmptyInputAndEmptyOutputInput = struct(n1, _EIAEOI, 0, [], []); +export var EmptyInputAndEmptyOutputOutput = struct(n1, _EIAEOO, 0, [], []); +export var EndpointWithHostLabelOperationRequest = struct( + n1, + _EWHLOR, + 0, + [_l], + [ + [ + 0, + { + [_hL]: 1, + }, + ], + ] +); +export var EnumPayloadInput = struct(n1, _EPI, 0, [_p], [[0, 16]]); +export var FlattenedXmlMapRequest = struct( + n1, + _FXMR, + 0, + [_mM], + [ + [ + 128 | 0, + { + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapResponse = struct( + n1, + _FXMRl, + 0, + [_mM], + [ + [ + 128 | 0, + { + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapWithXmlNameRequest = struct( + n1, + _FXMWXNR, + 0, + [_mM], + [ + [ + () => FlattenedXmlMapWithXmlNameInputOutputMap, + { + [_xN]: _KVP, + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapWithXmlNameResponse = struct( + n1, + _FXMWXNRl, + 0, + [_mM], + [ + [ + () => FlattenedXmlMapWithXmlNameInputOutputMap, + { + [_xN]: _KVP, + [_xF]: 1, + }, + ], + ] +); +export var FlattenedXmlMapWithXmlNamespaceOutput = struct( + n1, + _FXMWXNO, + 0, + [_mM], + [ + [ + () => FlattenedXmlMapWithXmlNamespaceOutputMap, + { + [_xN]: _KVP, + [_xF]: 1, + [_xNm]: [_, _hm], + }, + ], + ] +); +export var FractionalSecondsOutput = struct(n1, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct( + n1, + _GWEO, + 0, + [_g], + [ + [ + 0, + { + [_hH]: _XG, + }, + ], + ] +); +export var HostLabelHeaderInput = struct( + n1, + _HLHI, + 0, + [_aI], + [ + [ + 0, + { + [_hL]: 1, + [_hH]: _XAAI, + }, + ], + ] +); +export var HttpPayloadTraitsInputOutput = struct( + n1, + _HPTIO, + 0, + [_f, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [21, 16], + ] +); +export var HttpPayloadTraitsWithMediaTypeInputOutput = struct( + n1, + _HPTWMTIO, + 0, + [_f, _bl], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + [() => TextPlainBlob, 16], + ] +); +export var HttpPayloadWithMemberXmlNameInputOutput = struct( + n1, + _HPWMXNIO, + 0, + [_n], + [ + [ + () => PayloadWithXmlName, + { + [_hP]: 1, + [_xN]: _Ho, + }, + ], + ] +); +export var HttpPayloadWithStructureInputOutput = struct(n1, _HPWSIO, 0, [_n], [[() => NestedPayload, 16]]); +export var HttpPayloadWithUnionInputOutput = struct(n1, _HPWUIO, 0, [_n], [[() => UnionPayload, 16]]); +export var HttpPayloadWithXmlNameInputOutput = struct(n1, _HPWXNIO, 0, [_n], [[() => PayloadWithXmlName, 16]]); +export var HttpPayloadWithXmlNamespaceAndPrefixInputOutput = struct( + n1, + _HPWXNAPIO, + 0, + [_n], + [[() => PayloadWithXmlNamespaceAndPrefix, 16]] +); +export var HttpPayloadWithXmlNamespaceInputOutput = struct( + n1, + _HPWXNIOt, + 0, + [_n], + [[() => PayloadWithXmlNamespace, 16]] +); +export var HttpPrefixHeadersInputOutput = struct( + n1, + _HPHIO, + 0, + [_f, _fM], + [ + [ + 0, + { + [_hH]: _xf, + }, + ], + [ + 128 | 0, + { + [_hPH]: _xf_, + }, + ], + ] +); +export var HttpRequestWithFloatLabelsInput = struct( + n1, + _HRWFLI, + 0, + [_fl, _do], + [ + [1, 1], + [1, 1], + ] +); +export var HttpRequestWithGreedyLabelInPathInput = struct( + n1, + _HRWGLIPI, + 0, + [_f, _b], + [ + [0, 1], + [0, 1], + ] +); +export var HttpRequestWithLabelsAndTimestampFormatInput = struct( + n1, + _HRWLATFI, + 0, + [_mES, _mHD, _mDT, _dF, _tES, _tHD, _tDT], + [ + [7, 1], + [6, 1], + [5, 1], + [4, 1], + [7, 1], + [6, 1], + [5, 1], + ] +); +export var HttpRequestWithLabelsInput = struct( + n1, + _HRWLI, + 0, + [_s, _sh, _i, _lo, _fl, _do, _bo, _ti], + [ + [0, 1], + [1, 1], + [1, 1], + [1, 1], + [1, 1], + [1, 1], + [2, 1], + [4, 1], + ] +); +export var HttpResponseCodeOutput = struct(n1, _HRCO, 0, [_St], [[1, 32]]); +export var IgnoreQueryParamsInResponseOutput = struct( + n1, + _IQPIRO, + 0, + [_b], + [ + [ + 0, + { + [_hQ]: _b, + }, + ], + ] +); +export var InputAndOutputWithHeadersIO = struct( + n1, + _IAOWHIO, + 0, + [_hS, _hB, _hSe, _hI, _hLe, _hF, _hD, _hTB, _hFB, _hSL, _hSS, _hIL, _hBL, _hTL, _hEe, _hEL], + [ + [ + 0, + { + [_hH]: _XS, + }, + ], + [ + 1, + { + [_hH]: _XB, + }, + ], + [ + 1, + { + [_hH]: _XS_, + }, + ], + [ + 1, + { + [_hH]: _XI, + }, + ], + [ + 1, + { + [_hH]: _XL, + }, + ], + [ + 1, + { + [_hH]: _XF_, + }, + ], + [ + 1, + { + [_hH]: _XD, + }, + ], + [ + 2, + { + [_hH]: _XB_, + }, + ], + [ + 2, + { + [_hH]: _XB__, + }, + ], + [ + 64 | 0, + { + [_hH]: _XS__, + }, + ], + [ + 64 | 0, + { + [_hH]: _XS___, + }, + ], + [ + 64 | 1, + { + [_hH]: _XI_, + }, + ], + [ + 64 | 2, + { + [_hH]: _XB___, + }, + ], + [ + 64 | 4, + { + [_hH]: _XT, + }, + ], + [ + 0, + { + [_hH]: _XE, + }, + ], + [ + 64 | 0, + { + [_hH]: _XE_, + }, + ], + ] +); +export var InvalidGreeting = error( + n1, + _IG, + { + [_e]: _c, + [_hE]: 400, + }, + [_M], + [0], + + __InvalidGreeting +); +export var NestedPayload = struct(n1, _NP, 0, [_g, _na], [0, 0]); +export var NestedXmlMapsRequest = struct( + n1, + _NXMR, + 0, + [_nM, _fNM], + [ + map(n1, _NM, 0, 0, 128 | 0), + [ + map(n1, _NM, 0, 0, 128 | 0), + { + [_xF]: 1, + }, + ], + ] +); +export var NestedXmlMapsResponse = struct( + n1, + _NXMRe, + 0, + [_nM, _fNM], + [ + map(n1, _NM, 0, 0, 128 | 0), + [ + map(n1, _NM, 0, 0, 128 | 0), + { + [_xF]: 1, + }, + ], + ] +); +export var NestedXmlMapWithXmlNameRequest = struct( + n1, + _NXMWXNR, + 0, + [_nXMWXNM], + [[() => NestedXmlMapWithXmlNameMap, 0]] +); +export var NestedXmlMapWithXmlNameResponse = struct( + n1, + _NXMWXNRe, + 0, + [_nXMWXNM], + [[() => NestedXmlMapWithXmlNameMap, 0]] +); +export var NoInputAndOutputOutput = struct(n1, _NIAOO, 0, [], []); +export var NullAndEmptyHeadersIO = struct( + n1, + _NAEHIO, + 0, + [_a, _b_, _c_], + [ + [ + 0, + { + [_hH]: _XA, + }, + ], + [ + 0, + { + [_hH]: _XB____, + }, + ], + [ + 64 | 0, + { + [_hH]: _XC, + }, + ], + ] +); +export var OmitsNullSerializesEmptyStringInput = struct( + n1, + _ONSESI, + 0, + [_nV, _eS], + [ + [ + 0, + { + [_hQ]: _Nu, + }, + ], + [ + 0, + { + [_hQ]: _Em, + }, + ], + ] +); +export var PayloadWithXmlName = struct( + n1, + _PWXN, + { + [_xN]: _He, + }, + [_na], + [0] +); +export var PayloadWithXmlNamespace = struct( + n1, + _PWXNa, + { + [_xNm]: [_, _ht], + }, + [_na], + [0] +); +export var PayloadWithXmlNamespaceAndPrefix = struct( + n1, + _PWXNAP, + { + [_xNm]: [_b, _ht], + }, + [_na], + [0] +); +export var PutWithContentEncodingInput = struct( + n1, + _PWCEI, + 0, + [_en, _da], + [ + [ + 0, + { + [_hH]: _CE_, + }, + ], + 0, + ] +); +export var QueryIdempotencyTokenAutoFillInput = struct( + n1, + _QITAFI, + 0, + [_to], + [ + [ + 0, + { + [_iT]: 1, + [_hQ]: _to, + }, + ], + ] +); +export var QueryParamsAsStringListMapInput = struct( + n1, + _QPASLMI, + 0, + [_q, _f], + [ + [ + 0, + { + [_hQ]: _co, + }, + ], + [map(n0, _SLM, 0, 0, 64 | 0), 64], + ] +); +export var QueryPrecedenceInput = struct( + n1, + _QPI, + 0, + [_f, _b], + [ + [ + 0, + { + [_hQ]: _ba, + }, + ], + [128 | 0, 64], + ] +); +export var RecursiveShapesInputOutputNested1 = struct( + n1, + _RSION, + 0, + [_f, _n], + [0, () => RecursiveShapesInputOutputNested2] +); +export var RecursiveShapesInputOutputNested2 = struct( + n1, + _RSIONe, + 0, + [_ba, _rM], + [0, () => RecursiveShapesInputOutputNested1] +); +export var RecursiveShapesRequest = struct(n1, _RSR, 0, [_n], [() => RecursiveShapesInputOutputNested1]); +export var RecursiveShapesResponse = struct(n1, _RSRe, 0, [_n], [() => RecursiveShapesInputOutputNested1]); +export var SimpleScalarPropertiesRequest = struct( + n1, + _SSPR, + 0, + [_f, _sV, _tBV, _fBV, _bV, _sVh, _iV, _lV, _fV, _dV], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + 0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + [ + 1, + { + [_xN]: _DD, + }, + ], + ] +); +export var SimpleScalarPropertiesResponse = struct( + n1, + _SSPRi, + 0, + [_f, _sV, _tBV, _fBV, _bV, _sVh, _iV, _lV, _fV, _dV], + [ + [ + 0, + { + [_hH]: _XF, + }, + ], + 0, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + [ + 1, + { + [_xN]: _DD, + }, + ], + ] +); +export var StringPayloadInput = struct(n1, _SPI, 0, [_p], [[0, 16]]); +export var StructureListMember = struct( + n1, + _SLMt, + 0, + [_a, _b_], + [ + [ + 0, + { + [_xN]: _v, + }, + ], + [ + 0, + { + [_xN]: _o, + }, + ], + ] +); +export var TimestampFormatHeadersIO = struct( + n1, + _TFHIO, + 0, + [_mES, _mHD, _mDT, _dF, _tES, _tHD, _tDT], + [ + [ + 7, + { + [_hH]: _Xm, + }, + ], + [ + 6, + { + [_hH]: _Xm_, + }, + ], + [ + 5, + { + [_hH]: _Xm__, + }, + ], + [ + 4, + { + [_hH]: _Xd, + }, + ], + [ + 7, + { + [_hH]: _Xt, + }, + ], + [ + 6, + { + [_hH]: _Xt_, + }, + ], + [ + 5, + { + [_hH]: _Xt__, + }, + ], + ] +); +export var XmlAttributesOnPayloadRequest = struct(n1, _XAOPR, 0, [_p], [[() => XmlAttributesPayloadRequest, 16]]); +export var XmlAttributesOnPayloadResponse = struct(n1, _XAOPRm, 0, [_p], [[() => XmlAttributesPayloadResponse, 16]]); +export var XmlAttributesPayloadRequest = struct( + n1, + _XAPR, + 0, + [_f, _at], + [ + 0, + [ + 0, + { + [_xN]: _te, + [_xA]: 1, + }, + ], + ] +); +export var XmlAttributesPayloadResponse = struct( + n1, + _XAPRm, + 0, + [_f, _at], + [ + 0, + [ + 0, + { + [_xN]: _te, + [_xA]: 1, + }, + ], + ] +); +export var XmlAttributesRequest = struct( + n1, + _XAR, + 0, + [_f, _at], + [ + 0, + [ + 0, + { + [_xN]: _te, + [_xA]: 1, + }, + ], + ] +); +export var XmlAttributesResponse = struct( + n1, + _XARm, + 0, + [_f, _at], + [ + 0, + [ + 0, + { + [_xN]: _te, + [_xA]: 1, + }, + ], + ] +); +export var XmlBlobsRequest = struct(n1, _XBR, 0, [_da], [21]); +export var XmlBlobsResponse = struct(n1, _XBRm, 0, [_da], [21]); +export var XmlEmptyBlobsRequest = struct(n1, _XEBR, 0, [_da], [21]); +export var XmlEmptyBlobsResponse = struct(n1, _XEBRm, 0, [_da], [21]); +export var XmlEmptyListsRequest = struct( + n1, + _XELR, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt, _fSL], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n0, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + [ + () => StructureList, + { + [_xF]: 1, + }, + ], + ] +); +export var XmlEmptyListsResponse = struct( + n1, + _XELRm, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt, _fSL], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n0, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + [ + () => StructureList, + { + [_xF]: 1, + }, + ], + ] +); +export var XmlEmptyMapsRequest = struct(n1, _XEMR, 0, [_mM], [() => XmlMapsInputOutputMap]); +export var XmlEmptyMapsResponse = struct(n1, _XEMRm, 0, [_mM], [() => XmlMapsInputOutputMap]); +export var XmlEmptyStringsRequest = struct(n1, _XESR, 0, [_eS], [0]); +export var XmlEmptyStringsResponse = struct(n1, _XESRm, 0, [_eS], [0]); +export var XmlEnumsRequest = struct( + n1, + _XER, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var XmlEnumsResponse = struct( + n1, + _XERm, + 0, + [_fE, _fEo, _fEoo, _fEL, _fES, _fEM], + [0, 0, 0, 64 | 0, 64 | 0, 128 | 0] +); +export var XmlIntEnumsRequest = struct( + n1, + _XIER, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var XmlIntEnumsResponse = struct( + n1, + _XIERm, + 0, + [_iE, _iEn, _iEnt, _iEL, _iES, _iEM], + [1, 1, 1, 64 | 1, 64 | 1, 128 | 1] +); +export var XmlListsRequest = struct( + n1, + _XLR, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt, _fSL], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n0, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + [ + () => StructureList, + { + [_xF]: 1, + }, + ], + ] +); +export var XmlListsResponse = struct( + n1, + _XLRm, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _rLM, _fL, _fLl, _fLWMN, _fLWN, _sLt, _fSL], + [ + 64 | 0, + 64 | 0, + 64 | 1, + 64 | 2, + 64 | 4, + 64 | 0, + 64 | 1, + list(n0, _NSL, 0, 64 | 0), + [ + () => RenamedListMembers, + { + [_xN]: _r, + }, + ], + [ + () => RenamedListMembers, + { + [_xF]: 1, + }, + ], + [ + () => RenamedListMembers, + { + [_xN]: _cN, + [_xF]: 1, + }, + ], + [ + () => ListWithMemberNamespace, + { + [_xF]: 1, + }, + ], + [ + () => ListWithNamespace, + { + [_xF]: 1, + }, + ], + [ + () => StructureList, + { + [_xN]: _mSL, + }, + ], + [ + () => StructureList, + { + [_xF]: 1, + }, + ], + ] +); +export var XmlMapsRequest = struct(n1, _XMR, 0, [_mM], [() => XmlMapsInputOutputMap]); +export var XmlMapsResponse = struct(n1, _XMRm, 0, [_mM], [() => XmlMapsInputOutputMap]); +export var XmlMapsXmlNameRequest = struct(n1, _XMXNR, 0, [_mM], [[() => XmlMapsXmlNameInputOutputMap, 0]]); +export var XmlMapsXmlNameResponse = struct(n1, _XMXNRm, 0, [_mM], [[() => XmlMapsXmlNameInputOutputMap, 0]]); +export var XmlMapWithXmlNamespaceRequest = struct( + n1, + _XMWXNR, + 0, + [_mM], + [ + [ + () => XmlMapWithXmlNamespaceInputOutputMap, + { + [_xNm]: [_, _hm], + [_xN]: _KVP, + }, + ], + ] +); +export var XmlMapWithXmlNamespaceResponse = struct( + n1, + _XMWXNRm, + 0, + [_mM], + [ + [ + () => XmlMapWithXmlNamespaceInputOutputMap, + { + [_xNm]: [_, _hm], + [_xN]: _KVP, + }, + ], + ] +); +export var XmlNamespaceNested = struct( + n1, + _XNN, + { + [_xNm]: [_, _ht], + }, + [_f, _va], + [ + [ + 0, + { + [_xNm]: [_b, _htt], + }, + ], + [ + () => XmlNamespacedList, + { + [_xNm]: [_, _http], + }, + ], + ] +); +export var XmlNamespacesRequest = struct( + n1, + _XNR, + { + [_xNm]: [_, _ht], + }, + [_n], + [[() => XmlNamespaceNested, 0]] +); +export var XmlNamespacesResponse = struct( + n1, + _XNRm, + { + [_xNm]: [_, _ht], + }, + [_n], + [[() => XmlNamespaceNested, 0]] +); +export var XmlNestedUnionStruct = struct( + n1, + _XNUS, + 0, + [_sV, _bVo, _bV, _sVh, _iV, _lV, _fV, _dV], + [0, 2, 1, 1, 1, 1, 1, 1] +); +export var XmlTimestampsRequest = struct( + n1, + _XTR, + 0, + [_no, _dT, _dTOT, _eSp, _eSOT, _hDt, _hDOT], + [4, 5, 5, 7, 7, 6, 6] +); +export var XmlTimestampsResponse = struct( + n1, + _XTRm, + 0, + [_no, _dT, _dTOT, _eSp, _eSOT, _hDt, _hDOT], + [4, 5, 5, 7, 7, 6, 6] +); +export var XmlUnionsRequest = struct(n1, _XUR, 0, [_uV], [() => XmlUnionShape]); +export var XmlUnionsResponse = struct(n1, _XURm, 0, [_uV], [() => XmlUnionShape]); +export var GreetingStruct = struct(n0, _GS, 0, [_hi], [0]); +export var Unit = "unit" as const; + +export var RestXmlProtocolServiceException = error( + "awssdkjs.synthetic.aws.protocoltests.restxml", + "RestXmlProtocolServiceException", + 0, + [], + [], + __RestXmlProtocolServiceException +); +export var ListWithMemberNamespace = list( + n1, + _LWMN, + { + [_xNm]: [_, _hl], + }, + [ + 0, + { + [_xNm]: [_, _hm_], + }, + ] +); +export var ListWithNamespace = list( + n1, + _LWN, + { + [_xNm]: [_, _hl], + }, + 0 +); +export var RenamedListMembers = list(n1, _RLM, 0, [ + 0, + { + [_xN]: _it, + }, +]); +export var StructureList = list(n1, _SLt, 0, [ + () => StructureListMember, + { + [_xN]: _it, + }, +]); +export var XmlNamespacedList = list(n1, _XNL, 0, [ + 0, + { + [_xNm]: [_, _httpb], + }, +]); +export var BooleanList = 64 | 2; + +export var DoubleList = 64 | 1; + +export var FooEnumList = 64 | 0; + +export var FooEnumSet = 64 | 0; + +export var IntegerEnumList = 64 | 1; + +export var IntegerEnumSet = 64 | 1; + +export var IntegerList = 64 | 1; + +export var IntegerSet = 64 | 1; + +export var NestedStringList = list(n0, _NSL, 0, 64 | 0); +export var StringList = 64 | 0; + +export var StringSet = 64 | 0; + +export var TimestampList = 64 | 4; + +export var FlattenedXmlMapWithXmlNameInputOutputMap = map( + n1, + _FXMWXNIOM, + 0, + [ + 0, + { + [_xN]: _K, + }, + ], + [ + 0, + { + [_xN]: _V, + }, + ] +); +export var FlattenedXmlMapWithXmlNamespaceOutputMap = map( + n1, + _FXMWXNOM, + 0, + [ + 0, + { + [_xNm]: [_, _hk], + [_xN]: _K, + }, + ], + [ + 0, + { + [_xNm]: [_, _hv], + [_xN]: _V, + }, + ] +); +export var FooPrefixHeaders = 128 | 0; + +export var NestedMap = map(n1, _NM, 0, 0, 128 | 0); +export var NestedXmlMapWithXmlNameInnerMap = map( + n1, + _NXMWXNIM, + 0, + [ + 0, + { + [_xN]: _IK, + }, + ], + [ + 0, + { + [_xN]: _IV, + }, + ] +); +export var NestedXmlMapWithXmlNameMap = map( + n1, + _NXMWXNM, + 0, + [ + 0, + { + [_xN]: _OK, + }, + ], + [() => NestedXmlMapWithXmlNameInnerMap, 0] +); +export var XmlMapsInputOutputMap = map(n1, _XMIOM, 0, 0, () => GreetingStruct); +export var XmlMapsXmlNameInputOutputMap = map( + n1, + _XMXNIOM, + 0, + [ + 0, + { + [_xN]: _At, + }, + ], + [ + () => GreetingStruct, + { + [_xN]: _Se, + }, + ] +); +export var XmlMapWithXmlNamespaceInputOutputMap = map( + n1, + _XMWXNIOM, + 0, + [ + 0, + { + [_xNm]: [_, _hk], + [_xN]: _K, + }, + ], + [ + 0, + { + [_xNm]: [_, _hv], + [_xN]: _V, + }, + ] +); +export var FooEnumMap = 128 | 0; + +export var IntegerEnumMap = 128 | 1; + +export var StringListMap = map(n0, _SLM, 0, 0, 64 | 0); +export var StringMap = 128 | 0; + +export var UnionPayload = uni(n1, _UP, 0, [_g], [0]); +export var XmlUnionShape = uni( + n1, + _XUS, + 0, + [_sV, _bVo, _bV, _sVh, _iV, _lV, _fV, _dV, _uV, _sVt], + [0, 2, 1, 1, 1, 1, 1, 1, () => XmlUnionShape, () => XmlNestedUnionStruct] +); +export var AllQueryStringTypes = op( + n1, + _AQST, + { + [_http_]: ["GET", "/AllQueryStringTypesInput", 200], + }, + () => AllQueryStringTypesInput, + () => Unit +); +export var BodyWithXmlName = op( + n1, + _BWXN, + { + [_http_]: ["PUT", "/BodyWithXmlName", 200], + }, + () => BodyWithXmlNameInputOutput, + () => BodyWithXmlNameInputOutput +); +export var ConstantAndVariableQueryString = op( + n1, + _CAVQS, + { + [_http_]: ["GET", "/ConstantAndVariableQueryString?foo=bar", 200], + }, + () => ConstantAndVariableQueryStringInput, + () => Unit +); +export var ConstantQueryString = op( + n1, + _CQS, + { + [_http_]: ["GET", "/ConstantQueryString/{hello}?foo=bar&hello", 200], + }, + () => ConstantQueryStringInput, + () => Unit +); +export var ContentTypeParameters = op( + n1, + _CTP, + { + [_http_]: ["PUT", "/ContentTypeParameters", 200], + }, + () => ContentTypeParametersInput, + () => ContentTypeParametersOutput +); +export var DatetimeOffsets = op( + n1, + _DO, + { + [_http_]: ["POST", "/DatetimeOffsets", 200], + }, + () => Unit, + () => DatetimeOffsetsOutput +); +export var EmptyInputAndEmptyOutput = op( + n1, + _EIAEO, + { + [_http_]: ["POST", "/EmptyInputAndEmptyOutput", 200], + }, + () => EmptyInputAndEmptyOutputInput, + () => EmptyInputAndEmptyOutputOutput +); +export var EndpointOperation = op( + n1, + _EO, + { + [_http_]: ["POST", "/EndpointOperation", 200], + [_end]: ["foo."], + }, + () => Unit, + () => Unit +); +export var EndpointWithHostLabelHeaderOperation = op( + n1, + _EWHLHO, + { + [_http_]: ["POST", "/EndpointWithHostLabelHeaderOperation", 200], + [_end]: ["{accountId}."], + }, + () => HostLabelHeaderInput, + () => Unit +); +export var EndpointWithHostLabelOperation = op( + n1, + _EWHLO, + { + [_http_]: ["POST", "/EndpointWithHostLabelOperation", 200], + [_end]: ["foo.{label}."], + }, + () => EndpointWithHostLabelOperationRequest, + () => Unit +); +export var FlattenedXmlMap = op( + n1, + _FXM, + { + [_http_]: ["POST", "/FlattenedXmlMap", 200], + }, + () => FlattenedXmlMapRequest, + () => FlattenedXmlMapResponse +); +export var FlattenedXmlMapWithXmlName = op( + n1, + _FXMWXN, + { + [_http_]: ["POST", "/FlattenedXmlMapWithXmlName", 200], + }, + () => FlattenedXmlMapWithXmlNameRequest, + () => FlattenedXmlMapWithXmlNameResponse +); +export var FlattenedXmlMapWithXmlNamespace = op( + n1, + _FXMWXNl, + { + [_http_]: ["POST", "/FlattenedXmlMapWithXmlNamespace", 200], + }, + () => Unit, + () => FlattenedXmlMapWithXmlNamespaceOutput +); +export var FractionalSeconds = op( + n1, + _FS, + { + [_http_]: ["POST", "/FractionalSeconds", 200], + }, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n1, + _GWE, + { + [_http_]: ["PUT", "/GreetingWithErrors", 200], + }, + () => Unit, + () => GreetingWithErrorsOutput +); +export var HttpEnumPayload = op( + n1, + _HEP, + { + [_http_]: ["POST", "/EnumPayload", 200], + }, + () => EnumPayloadInput, + () => EnumPayloadInput +); +export var HttpPayloadTraits = op( + n1, + _HPT, + { + [_http_]: ["POST", "/HttpPayloadTraits", 200], + }, + () => HttpPayloadTraitsInputOutput, + () => HttpPayloadTraitsInputOutput +); +export var HttpPayloadTraitsWithMediaType = op( + n1, + _HPTWMT, + { + [_http_]: ["POST", "/HttpPayloadTraitsWithMediaType", 200], + }, + () => HttpPayloadTraitsWithMediaTypeInputOutput, + () => HttpPayloadTraitsWithMediaTypeInputOutput +); +export var HttpPayloadWithMemberXmlName = op( + n1, + _HPWMXN, + { + [_http_]: ["PUT", "/HttpPayloadWithMemberXmlName", 200], + }, + () => HttpPayloadWithMemberXmlNameInputOutput, + () => HttpPayloadWithMemberXmlNameInputOutput +); +export var HttpPayloadWithStructure = op( + n1, + _HPWS, + { + [_http_]: ["PUT", "/HttpPayloadWithStructure", 200], + }, + () => HttpPayloadWithStructureInputOutput, + () => HttpPayloadWithStructureInputOutput +); +export var HttpPayloadWithUnion = op( + n1, + _HPWU, + { + [_http_]: ["PUT", "/HttpPayloadWithUnion", 200], + }, + () => HttpPayloadWithUnionInputOutput, + () => HttpPayloadWithUnionInputOutput +); +export var HttpPayloadWithXmlName = op( + n1, + _HPWXN, + { + [_http_]: ["PUT", "/HttpPayloadWithXmlName", 200], + }, + () => HttpPayloadWithXmlNameInputOutput, + () => HttpPayloadWithXmlNameInputOutput +); +export var HttpPayloadWithXmlNamespace = op( + n1, + _HPWXNt, + { + [_http_]: ["PUT", "/HttpPayloadWithXmlNamespace", 200], + }, + () => HttpPayloadWithXmlNamespaceInputOutput, + () => HttpPayloadWithXmlNamespaceInputOutput +); +export var HttpPayloadWithXmlNamespaceAndPrefix = op( + n1, + _HPWXNAP, + { + [_http_]: ["PUT", "/HttpPayloadWithXmlNamespaceAndPrefix", 200], + }, + () => HttpPayloadWithXmlNamespaceAndPrefixInputOutput, + () => HttpPayloadWithXmlNamespaceAndPrefixInputOutput +); +export var HttpPrefixHeaders = op( + n1, + _HPH, + { + [_http_]: ["GET", "/HttpPrefixHeaders", 200], + }, + () => HttpPrefixHeadersInputOutput, + () => HttpPrefixHeadersInputOutput +); +export var HttpRequestWithFloatLabels = op( + n1, + _HRWFL, + { + [_http_]: ["GET", "/FloatHttpLabels/{float}/{double}", 200], + }, + () => HttpRequestWithFloatLabelsInput, + () => Unit +); +export var HttpRequestWithGreedyLabelInPath = op( + n1, + _HRWGLIP, + { + [_http_]: ["GET", "/HttpRequestWithGreedyLabelInPath/foo/{foo}/baz/{baz+}", 200], + }, + () => HttpRequestWithGreedyLabelInPathInput, + () => Unit +); +export var HttpRequestWithLabels = op( + n1, + _HRWL, + { + [_http_]: [ + "GET", + "/HttpRequestWithLabels/{string}/{short}/{integer}/{long}/{float}/{double}/{boolean}/{timestamp}", + 200, + ], + }, + () => HttpRequestWithLabelsInput, + () => Unit +); +export var HttpRequestWithLabelsAndTimestampFormat = op( + n1, + _HRWLATF, + { + [_http_]: [ + "GET", + "/HttpRequestWithLabelsAndTimestampFormat/{memberEpochSeconds}/{memberHttpDate}/{memberDateTime}/{defaultFormat}/{targetEpochSeconds}/{targetHttpDate}/{targetDateTime}", + 200, + ], + }, + () => HttpRequestWithLabelsAndTimestampFormatInput, + () => Unit +); +export var HttpResponseCode = op( + n1, + _HRC, + { + [_http_]: ["PUT", "/HttpResponseCode", 200], + }, + () => Unit, + () => HttpResponseCodeOutput +); +export var HttpStringPayload = op( + n1, + _HSP, + { + [_http_]: ["POST", "/StringPayload", 200], + }, + () => StringPayloadInput, + () => StringPayloadInput +); +export var IgnoreQueryParamsInResponse = op( + n1, + _IQPIR, + { + [_http_]: ["GET", "/IgnoreQueryParamsInResponse", 200], + }, + () => Unit, + () => IgnoreQueryParamsInResponseOutput +); +export var InputAndOutputWithHeaders = op( + n1, + _IAOWH, + { + [_http_]: ["POST", "/InputAndOutputWithHeaders", 200], + }, + () => InputAndOutputWithHeadersIO, + () => InputAndOutputWithHeadersIO +); +export var NestedXmlMaps = op( + n1, + _NXM, + { + [_http_]: ["POST", "/NestedXmlMaps", 200], + }, + () => NestedXmlMapsRequest, + () => NestedXmlMapsResponse +); +export var NestedXmlMapWithXmlName = op( + n1, + _NXMWXN, + { + [_http_]: ["POST", "/NestedXmlMapWithXmlName", 200], + }, + () => NestedXmlMapWithXmlNameRequest, + () => NestedXmlMapWithXmlNameResponse +); +export var NoInputAndNoOutput = op( + n1, + _NIANO, + { + [_http_]: ["POST", "/NoInputAndNoOutput", 200], + }, + () => Unit, + () => Unit +); +export var NoInputAndOutput = op( + n1, + _NIAO, + { + [_http_]: ["POST", "/NoInputAndOutputOutput", 200], + }, + () => Unit, + () => NoInputAndOutputOutput +); +export var NullAndEmptyHeadersClient = op( + n1, + _NAEHC, + { + [_http_]: ["GET", "/NullAndEmptyHeadersClient", 200], + }, + () => NullAndEmptyHeadersIO, + () => NullAndEmptyHeadersIO +); +export var NullAndEmptyHeadersServer = op( + n1, + _NAEHS, + { + [_http_]: ["GET", "/NullAndEmptyHeadersServer", 200], + }, + () => NullAndEmptyHeadersIO, + () => NullAndEmptyHeadersIO +); +export var OmitsNullSerializesEmptyString = op( + n1, + _ONSES, + { + [_http_]: ["GET", "/OmitsNullSerializesEmptyString", 200], + }, + () => OmitsNullSerializesEmptyStringInput, + () => Unit +); +export var PutWithContentEncoding = op( + n1, + _PWCE, + { + [_http_]: ["POST", "/requestcompression/putcontentwithencoding", 200], + }, + () => PutWithContentEncodingInput, + () => Unit +); +export var QueryIdempotencyTokenAutoFill = op( + n1, + _QITAF, + { + [_http_]: ["POST", "/QueryIdempotencyTokenAutoFill", 200], + }, + () => QueryIdempotencyTokenAutoFillInput, + () => Unit +); +export var QueryParamsAsStringListMap = op( + n1, + _QPASLM, + { + [_http_]: ["POST", "/StringListMap", 200], + }, + () => QueryParamsAsStringListMapInput, + () => Unit +); +export var QueryPrecedence = op( + n1, + _QP, + { + [_http_]: ["POST", "/Precedence", 200], + }, + () => QueryPrecedenceInput, + () => Unit +); +export var RecursiveShapes = op( + n1, + _RS, + { + [_http_]: ["PUT", "/RecursiveShapes", 200], + }, + () => RecursiveShapesRequest, + () => RecursiveShapesResponse +); +export var SimpleScalarProperties = op( + n1, + _SSP, + { + [_http_]: ["PUT", "/SimpleScalarProperties", 200], + }, + () => SimpleScalarPropertiesRequest, + () => SimpleScalarPropertiesResponse +); +export var TimestampFormatHeaders = op( + n1, + _TFH, + { + [_http_]: ["POST", "/TimestampFormatHeaders", 200], + }, + () => TimestampFormatHeadersIO, + () => TimestampFormatHeadersIO +); +export var XmlAttributes = op( + n1, + _XAm, + { + [_http_]: ["PUT", "/XmlAttributes", 200], + }, + () => XmlAttributesRequest, + () => XmlAttributesResponse +); +export var XmlAttributesOnPayload = op( + n1, + _XAOP, + { + [_http_]: ["PUT", "/XmlAttributesOnPayload", 200], + }, + () => XmlAttributesOnPayloadRequest, + () => XmlAttributesOnPayloadResponse +); +export var XmlBlobs = op( + n1, + _XBm, + { + [_http_]: ["POST", "/XmlBlobs", 200], + }, + () => XmlBlobsRequest, + () => XmlBlobsResponse +); +export var XmlEmptyBlobs = op( + n1, + _XEB, + { + [_http_]: ["POST", "/XmlEmptyBlobs", 200], + }, + () => XmlEmptyBlobsRequest, + () => XmlEmptyBlobsResponse +); +export var XmlEmptyLists = op( + n1, + _XEL, + { + [_http_]: ["PUT", "/XmlEmptyLists", 200], + }, + () => XmlEmptyListsRequest, + () => XmlEmptyListsResponse +); +export var XmlEmptyMaps = op( + n1, + _XEM, + { + [_http_]: ["POST", "/XmlEmptyMaps", 200], + }, + () => XmlEmptyMapsRequest, + () => XmlEmptyMapsResponse +); +export var XmlEmptyStrings = op( + n1, + _XES, + { + [_http_]: ["PUT", "/XmlEmptyStrings", 200], + }, + () => XmlEmptyStringsRequest, + () => XmlEmptyStringsResponse +); +export var XmlEnums = op( + n1, + _XEm, + { + [_http_]: ["PUT", "/XmlEnums", 200], + }, + () => XmlEnumsRequest, + () => XmlEnumsResponse +); +export var XmlIntEnums = op( + n1, + _XIE, + { + [_http_]: ["PUT", "/XmlIntEnums", 200], + }, + () => XmlIntEnumsRequest, + () => XmlIntEnumsResponse +); +export var XmlLists = op( + n1, + _XLm, + { + [_http_]: ["PUT", "/XmlLists", 200], + }, + () => XmlListsRequest, + () => XmlListsResponse +); +export var XmlMaps = op( + n1, + _XM, + { + [_http_]: ["POST", "/XmlMaps", 200], + }, + () => XmlMapsRequest, + () => XmlMapsResponse +); +export var XmlMapsXmlName = op( + n1, + _XMXN, + { + [_http_]: ["POST", "/XmlMapsXmlName", 200], + }, + () => XmlMapsXmlNameRequest, + () => XmlMapsXmlNameResponse +); +export var XmlMapWithXmlNamespace = op( + n1, + _XMWXN, + { + [_http_]: ["POST", "/XmlMapWithXmlNamespace", 200], + }, + () => XmlMapWithXmlNamespaceRequest, + () => XmlMapWithXmlNamespaceResponse +); +export var XmlNamespaces = op( + n1, + _XN, + { + [_http_]: ["POST", "/XmlNamespaces", 200], + }, + () => XmlNamespacesRequest, + () => XmlNamespacesResponse +); +export var XmlTimestamps = op( + n1, + _XTm, + { + [_http_]: ["POST", "/XmlTimestamps", 200], + }, + () => XmlTimestampsRequest, + () => XmlTimestampsResponse +); +export var XmlUnions = op( + n1, + _XU, + { + [_http_]: ["PUT", "/XmlUnions", 200], + }, + () => XmlUnionsRequest, + () => XmlUnionsResponse +); diff --git a/private/aws-protocoltests-smithy-rpcv2-cbor/src/runtimeConfig.shared.ts b/private/aws-protocoltests-smithy-rpcv2-cbor/src/runtimeConfig.shared.ts index 12db82371dc9b..059f0767556ab 100644 --- a/private/aws-protocoltests-smithy-rpcv2-cbor/src/runtimeConfig.shared.ts +++ b/private/aws-protocoltests-smithy-rpcv2-cbor/src/runtimeConfig.shared.ts @@ -1,5 +1,6 @@ // smithy-typescript generated code import { NoAuthSigner } from "@smithy/core"; +import { SmithyRpcV2CborProtocol } from "@smithy/core/cbor"; import { NoOpLogger } from "@smithy/smithy-client"; import { IdentityProviderConfig } from "@smithy/types"; import { parseUrl } from "@smithy/url-parser"; @@ -31,6 +32,7 @@ export const getRuntimeConfig = (config: RpcV2ProtocolClientConfig) => { }, ], logger: config?.logger ?? new NoOpLogger(), + protocol: config?.protocol ?? new SmithyRpcV2CborProtocol({ defaultNamespace: "smithy.protocoltests.rpcv2Cbor" }), urlParser: config?.urlParser ?? parseUrl, utf8Decoder: config?.utf8Decoder ?? fromUtf8, utf8Encoder: config?.utf8Encoder ?? toUtf8, diff --git a/private/aws-protocoltests-smithy-rpcv2-cbor/src/schemas/schemas.ts b/private/aws-protocoltests-smithy-rpcv2-cbor/src/schemas/schemas.ts new file mode 100644 index 0000000000000..67d46d4ebd41a --- /dev/null +++ b/private/aws-protocoltests-smithy-rpcv2-cbor/src/schemas/schemas.ts @@ -0,0 +1,527 @@ +const _B = "Boolean"; +const _BL = "BlobList"; +const _BLo = "BooleanList"; +const _Bl = "Blob"; +const _By = "Byte"; +const _CE = "ComplexError"; +const _CNED = "ComplexNestedErrorData"; +const _COD = "ClientOptionalDefaults"; +const _D = "Double"; +const _DBM = "DenseBooleanMap"; +const _DNM = "DenseNumberMap"; +const _DSM = "DenseStringMap"; +const _DSMe = "DenseSetMap"; +const _DSMen = "DenseStructMap"; +const _DT = "DateTime"; +const _De = "Defaults"; +const _EIO = "EmptyInputOutput"; +const _ES = "EmptyStructure"; +const _F = "Float"; +const _FE = "FooEnum"; +const _FEL = "FooEnumList"; +const _FO = "Float16Output"; +const _FS = "FractionalSeconds"; +const _FSO = "FractionalSecondsOutput"; +const _Fl = "Float16"; +const _Fo = "Foo"; +const _GS = "GreetingStruct"; +const _GWE = "GreetingWithErrors"; +const _GWEO = "GreetingWithErrorsOutput"; +const _I = "Integer"; +const _IE = "IntegerEnum"; +const _IEL = "IntegerEnumList"; +const _IG = "InvalidGreeting"; +const _IL = "IntegerList"; +const _L = "Long"; +const _M = "Message"; +const _N = "Nested"; +const _NIO = "NoInputOutput"; +const _NSL = "NestedStringList"; +const _OIO = "OptionalInputOutput"; +const _OWD = "OperationWithDefaults"; +const _OWDI = "OperationWithDefaultsInput"; +const _OWDO = "OperationWithDefaultsOutput"; +const _RS = "RecursiveShapes"; +const _RSIO = "RecursiveShapesInputOutput"; +const _RSION = "RecursiveShapesInputOutputNested1"; +const _RSIONe = "RecursiveShapesInputOutputNested2"; +const _RVCDM = "RpcV2CborDenseMaps"; +const _RVCDMIO = "RpcV2CborDenseMapsInputOutput"; +const _RVCL = "RpcV2CborLists"; +const _RVCLIO = "RpcV2CborListInputOutput"; +const _RVCSM = "RpcV2CborSparseMaps"; +const _RVCSMIO = "RpcV2CborSparseMapsInputOutput"; +const _S = "String"; +const _SBM = "SparseBooleanMap"; +const _SL = "StringList"; +const _SLM = "StructureListMember"; +const _SLt = "StructureList"; +const _SNM = "SparseNumberMap"; +const _SNO = "SparseNullsOperation"; +const _SNOIO = "SparseNullsOperationInputOutput"; +const _SS = "StringSet"; +const _SSL = "SparseStringList"; +const _SSM = "SparseStringMap"; +const _SSMp = "SparseSetMap"; +const _SSMpa = "SparseStructMap"; +const _SSP = "SimpleScalarProperties"; +const _SSS = "SimpleScalarStructure"; +const _SSi = "SimpleStructure"; +const _Sh = "Short"; +const _T = "Timestamp"; +const _TE = "TestEnum"; +const _TIE = "TestIntEnum"; +const _TL = "TimestampList"; +const _TLo = "TopLevel"; +const _TSL = "TestStringList"; +const _TSM = "TestStringMap"; +const _VE = "ValidationException"; +const _VEF = "ValidationExceptionField"; +const _VEFL = "ValidationExceptionFieldList"; +const _a = "a"; +const _b = "bar"; +const _bL = "booleanList"; +const _bLl = "blobList"; +const _bV = "byteValue"; +const _bVl = "blobValue"; +const _b_ = "b"; +const _c = "client"; +const _cOD = "clientOptionalDefaults"; +const _d = "datetime"; +const _dB = "defaultBoolean"; +const _dBM = "denseBooleanMap"; +const _dBe = "defaultBlob"; +const _dBef = "defaultByte"; +const _dD = "defaultDouble"; +const _dE = "defaultEnum"; +const _dF = "defaultFloat"; +const _dI = "defaultInteger"; +const _dIE = "defaultIntEnum"; +const _dL = "defaultList"; +const _dLe = "defaultLong"; +const _dM = "defaultMap"; +const _dNM = "denseNumberMap"; +const _dS = "defaultString"; +const _dSM = "denseStructMap"; +const _dSMe = "denseStringMap"; +const _dSMen = "denseSetMap"; +const _dSe = "defaultShort"; +const _dT = "defaultTimestamp"; +const _dV = "doubleValue"; +const _de = "defaults"; +const _e = "error"; +const _eB = "emptyBlob"; +const _eL = "enumList"; +const _eS = "emptyString"; +const _f = "foo"; +const _fB = "falseBoolean"; +const _fBV = "falseBooleanValue"; +const _fL = "fieldList"; +const _fV = "floatValue"; +const _g = "greeting"; +const _h = "hi"; +const _iEL = "intEnumList"; +const _iL = "integerList"; +const _iV = "integerValue"; +const _lV = "longValue"; +const _m = "message"; +const _me = "member"; +const _n = "nested"; +const _nSL = "nestedStringList"; +const _oTLD = "otherTopLevelDefault"; +const _p = "path"; +const _rM = "recursiveMember"; +const _s = "sparse"; +const _sBM = "sparseBooleanMap"; +const _sL = "stringList"; +const _sLt = "structureList"; +const _sNM = "sparseNumberMap"; +const _sS = "stringSet"; +const _sSL = "sparseStringList"; +const _sSM = "sparseStructMap"; +const _sSMp = "sparseStringMap"; +const _sSMpa = "sparseSetMap"; +const _sV = "shortValue"; +const _sVt = "stringValue"; +const _tBV = "trueBooleanValue"; +const _tL = "timestampList"; +const _tLD = "topLevelDefault"; +const _v = "value"; +const _zB = "zeroByte"; +const _zD = "zeroDouble"; +const _zF = "zeroFloat"; +const _zI = "zeroInteger"; +const _zL = "zeroLong"; +const _zS = "zeroShort"; +const n0 = "smithy.framework"; +const n1 = "smithy.protocoltests.rpcv2Cbor"; +const n2 = "smithy.protocoltests.shared"; + +// smithy-typescript generated code +import { error, list, map, op, struct } from "@smithy/core/schema"; + +import { + ComplexError as __ComplexError, + InvalidGreeting as __InvalidGreeting, + ValidationException as __ValidationException, +} from "../models/index"; +import { RpcV2ProtocolServiceException as __RpcV2ProtocolServiceException } from "../models/RpcV2ProtocolServiceException"; + +/* eslint no-var: 0 */ + +export var Unit = "unit" as const; + +export var ValidationException = error( + n0, + _VE, + { + [_e]: _c, + }, + [_m, _fL], + [0, () => ValidationExceptionFieldList], + + __ValidationException +); +export var ValidationExceptionField = struct(n0, _VEF, 0, [_p, _m], [0, 0]); +export var ClientOptionalDefaults = struct(n1, _COD, 0, [_me], [1]); +export var ComplexError = error( + n1, + _CE, + { + [_e]: _c, + }, + [_TLo, _N], + [0, () => ComplexNestedErrorData], + + __ComplexError +); +export var ComplexNestedErrorData = struct(n1, _CNED, 0, [_Fo], [0]); +export var Defaults = struct( + n1, + _De, + 0, + [ + _dS, + _dB, + _dL, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var EmptyStructure = struct(n1, _ES, 0, [], []); +export var Float16Output = struct(n1, _FO, 0, [_v], [1]); +export var FractionalSecondsOutput = struct(n1, _FSO, 0, [_d], [5]); +export var GreetingWithErrorsOutput = struct(n1, _GWEO, 0, [_g], [0]); +export var InvalidGreeting = error( + n1, + _IG, + { + [_e]: _c, + }, + [_M], + [0], + + __InvalidGreeting +); +export var OperationWithDefaultsInput = struct( + n1, + _OWDI, + 0, + [_de, _cOD, _tLD, _oTLD], + [() => Defaults, () => ClientOptionalDefaults, 0, 1] +); +export var OperationWithDefaultsOutput = struct( + n1, + _OWDO, + 0, + [ + _dS, + _dB, + _dL, + _dT, + _dBe, + _dBef, + _dSe, + _dI, + _dLe, + _dF, + _dD, + _dM, + _dE, + _dIE, + _eS, + _fB, + _eB, + _zB, + _zS, + _zI, + _zL, + _zF, + _zD, + ], + [0, 2, 64 | 0, 4, 21, 1, 1, 1, 1, 1, 1, 128 | 0, 0, 1, 0, 2, 21, 1, 1, 1, 1, 1, 1] +); +export var RecursiveShapesInputOutput = struct(n1, _RSIO, 0, [_n], [() => RecursiveShapesInputOutputNested1]); +export var RecursiveShapesInputOutputNested1 = struct( + n1, + _RSION, + 0, + [_f, _n], + [0, () => RecursiveShapesInputOutputNested2] +); +export var RecursiveShapesInputOutputNested2 = struct( + n1, + _RSIONe, + 0, + [_b, _rM], + [0, () => RecursiveShapesInputOutputNested1] +); +export var RpcV2CborDenseMapsInputOutput = struct( + n1, + _RVCDMIO, + 0, + [_dSM, _dNM, _dBM, _dSMe, _dSMen], + [() => DenseStructMap, 128 | 1, 128 | 2, 128 | 0, map(n1, _DSMe, 0, 0, 64 | 0)] +); +export var RpcV2CborListInputOutput = struct( + n1, + _RVCLIO, + 0, + [_sL, _sS, _iL, _bL, _tL, _eL, _iEL, _nSL, _sLt, _bLl], + [64 | 0, 64 | 0, 64 | 1, 64 | 2, 64 | 4, 64 | 0, 64 | 1, list(n2, _NSL, 0, 64 | 0), () => StructureList, 64 | 21] +); +export var RpcV2CborSparseMapsInputOutput = struct( + n1, + _RVCSMIO, + 0, + [_sSM, _sNM, _sBM, _sSMp, _sSMpa], + [ + [() => SparseStructMap, 0], + [() => SparseNumberMap, 0], + [() => SparseBooleanMap, 0], + [() => SparseStringMap, 0], + [() => SparseSetMap, 0], + ] +); +export var SimpleScalarStructure = struct( + n1, + _SSS, + 0, + [_tBV, _fBV, _bV, _dV, _fV, _iV, _lV, _sV, _sVt, _bVl], + [2, 2, 1, 1, 1, 1, 1, 1, 0, 21] +); +export var SimpleStructure = struct(n1, _SSi, 0, [_v], [0]); +export var SparseNullsOperationInputOutput = struct( + n1, + _SNOIO, + 0, + [_sSL, _sSMp], + [ + [() => SparseStringList, 0], + [() => SparseStringMap, 0], + ] +); +export var StructureListMember = struct(n1, _SLM, 0, [_a, _b_], [0, 0]); +export var GreetingStruct = struct(n2, _GS, 0, [_h], [0]); +export var RpcV2ProtocolServiceException = error( + "awssdkjs.synthetic.smithy.protocoltests.rpcv2Cbor", + "RpcV2ProtocolServiceException", + 0, + [], + [], + __RpcV2ProtocolServiceException +); +export var ValidationExceptionFieldList = list(n0, _VEFL, 0, () => ValidationExceptionField); +export var StructureList = list(n1, _SLt, 0, () => StructureListMember); +export var TestStringList = 64 | 0; + +export var BlobList = 64 | 21; + +export var BooleanList = 64 | 2; + +export var FooEnumList = 64 | 0; + +export var IntegerEnumList = 64 | 1; + +export var IntegerList = 64 | 1; + +export var NestedStringList = list(n2, _NSL, 0, 64 | 0); +export var SparseStringList = list( + n2, + _SSL, + { + [_s]: 1, + }, + 0 +); +export var StringList = 64 | 0; + +export var StringSet = 64 | 0; + +export var TimestampList = 64 | 4; + +export var DenseBooleanMap = 128 | 2; + +export var DenseNumberMap = 128 | 1; + +export var DenseSetMap = map(n1, _DSMe, 0, 0, 64 | 0); +export var DenseStringMap = 128 | 0; + +export var DenseStructMap = map(n1, _DSMen, 0, 0, () => GreetingStruct); +export var SparseBooleanMap = map( + n1, + _SBM, + { + [_s]: 1, + }, + 0, + 2 +); +export var SparseNumberMap = map( + n1, + _SNM, + { + [_s]: 1, + }, + 0, + 1 +); +export var SparseSetMap = map( + n1, + _SSMp, + { + [_s]: 1, + }, + 0, + 64 | 0 +); +export var SparseStructMap = map( + n1, + _SSMpa, + { + [_s]: 1, + }, + 0, + () => GreetingStruct +); +export var TestStringMap = 128 | 0; + +export var SparseStringMap = map( + n2, + _SSM, + { + [_s]: 1, + }, + 0, + 0 +); +export var EmptyInputOutput = op( + n1, + _EIO, + 0, + () => EmptyStructure, + () => EmptyStructure +); +export var Float16 = op( + n1, + _Fl, + 0, + () => Unit, + () => Float16Output +); +export var FractionalSeconds = op( + n1, + _FS, + 0, + () => Unit, + () => FractionalSecondsOutput +); +export var GreetingWithErrors = op( + n1, + _GWE, + 2, + () => Unit, + () => GreetingWithErrorsOutput +); +export var NoInputOutput = op( + n1, + _NIO, + 0, + () => Unit, + () => Unit +); +export var OperationWithDefaults = op( + n1, + _OWD, + 0, + () => OperationWithDefaultsInput, + () => OperationWithDefaultsOutput +); +export var OptionalInputOutput = op( + n1, + _OIO, + 0, + () => SimpleStructure, + () => SimpleStructure +); +export var RecursiveShapes = op( + n1, + _RS, + 0, + () => RecursiveShapesInputOutput, + () => RecursiveShapesInputOutput +); +export var RpcV2CborDenseMaps = op( + n1, + _RVCDM, + 0, + () => RpcV2CborDenseMapsInputOutput, + () => RpcV2CborDenseMapsInputOutput +); +export var RpcV2CborLists = op( + n1, + _RVCL, + 2, + () => RpcV2CborListInputOutput, + () => RpcV2CborListInputOutput +); +export var RpcV2CborSparseMaps = op( + n1, + _RVCSM, + 0, + () => RpcV2CborSparseMapsInputOutput, + () => RpcV2CborSparseMapsInputOutput +); +export var SimpleScalarProperties = op( + n1, + _SSP, + 0, + () => SimpleScalarStructure, + () => SimpleScalarStructure +); +export var SparseNullsOperation = op( + n1, + _SNO, + 0, + () => SparseNullsOperationInputOutput, + () => SparseNullsOperationInputOutput +); diff --git a/scripts/copy-smithy-dist-files.js b/scripts/copy-smithy-dist-files.js index 93d2ef11538b7..61795a523b4aa 100644 --- a/scripts/copy-smithy-dist-files.js +++ b/scripts/copy-smithy-dist-files.js @@ -36,4 +36,16 @@ const adjacentSmithyPkgs = fs.readdirSync(smithyPackages); } process.stdout.write("."); } + + const smithyCoreRoot = path.join(smithyPackages, "core"); + const destination = path.join(node_modules, "@smithy", "core"); + for (const file of fs.readdirSync(smithyCoreRoot)) { + if (file.endsWith(".js")) { + fs.cpSync(path.join(smithyCoreRoot, file), path.join(destination, file)); + fs.cpSync( + path.join(smithyCoreRoot, file.replace(".js", ".d.ts")), + path.join(destination, file.replace(".js", ".d.ts")) + ); + } + } })();